@plasius/mcp-admin-contracts 0.4.0 → 0.5.1
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 +69 -0
- package/README.md +125 -0
- package/dist/index.cjs +1307 -13
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +165 -11
- package/dist/index.d.ts +165 -11
- package/dist/index.js +1315 -13
- package/dist/index.js.map +1 -1
- package/docs/adrs/adr-0005-privacy-safe-read-only-feedback-contract.md +100 -0
- package/docs/adrs/adr-0006-canonical-model-resolution-discovery.md +66 -0
- package/docs/adrs/index.md +2 -0
- package/package.json +9 -3
package/dist/index.cjs
CHANGED
|
@@ -29,16 +29,41 @@ __export(index_exports, {
|
|
|
29
29
|
MCP_ADMIN_ANALYTICS_FLAG_ID: () => MCP_ADMIN_ANALYTICS_FLAG_ID,
|
|
30
30
|
MCP_ADMIN_ANALYTICS_METRICS: () => MCP_ADMIN_ANALYTICS_METRICS,
|
|
31
31
|
MCP_ADMIN_ANALYTICS_PRESETS: () => MCP_ADMIN_ANALYTICS_PRESETS,
|
|
32
|
+
MCP_ADMIN_BASE_OAUTH_SCOPE: () => MCP_ADMIN_BASE_OAUTH_SCOPE,
|
|
32
33
|
MCP_ADMIN_CONTEXT_SHAPE: () => MCP_ADMIN_CONTEXT_SHAPE,
|
|
33
34
|
MCP_ADMIN_CONTRACT_VERSION: () => MCP_ADMIN_CONTRACT_VERSION,
|
|
34
35
|
MCP_ADMIN_ECONOMY_ADJUSTMENTS_FLAG_ID: () => MCP_ADMIN_ECONOMY_ADJUSTMENTS_FLAG_ID,
|
|
35
36
|
MCP_ADMIN_ECONOMY_HISTORY_FLAG_ID: () => MCP_ADMIN_ECONOMY_HISTORY_FLAG_ID,
|
|
36
37
|
MCP_ADMIN_ECONOMY_READ_CAPABILITY: () => MCP_ADMIN_ECONOMY_READ_CAPABILITY,
|
|
37
38
|
MCP_ADMIN_EXTENSION_RULES: () => MCP_ADMIN_EXTENSION_RULES,
|
|
39
|
+
MCP_ADMIN_FEEDBACK_ACTIONS: () => MCP_ADMIN_FEEDBACK_ACTIONS,
|
|
40
|
+
MCP_ADMIN_FEEDBACK_ALERT_WINDOWS: () => MCP_ADMIN_FEEDBACK_ALERT_WINDOWS,
|
|
41
|
+
MCP_ADMIN_FEEDBACK_BUG_HEALTH_WINDOWS: () => MCP_ADMIN_FEEDBACK_BUG_HEALTH_WINDOWS,
|
|
42
|
+
MCP_ADMIN_FEEDBACK_ENTRY_WINDOWS: () => MCP_ADMIN_FEEDBACK_ENTRY_WINDOWS,
|
|
43
|
+
MCP_ADMIN_FEEDBACK_FLAG_ID: () => MCP_ADMIN_FEEDBACK_FLAG_ID,
|
|
44
|
+
MCP_ADMIN_FEEDBACK_MAX_CURSOR_LENGTH: () => MCP_ADMIN_FEEDBACK_MAX_CURSOR_LENGTH,
|
|
45
|
+
MCP_ADMIN_FEEDBACK_MAX_PAGE_SIZE: () => MCP_ADMIN_FEEDBACK_MAX_PAGE_SIZE,
|
|
46
|
+
MCP_ADMIN_FEEDBACK_PACKET_TYPES: () => MCP_ADMIN_FEEDBACK_PACKET_TYPES,
|
|
47
|
+
MCP_ADMIN_FEEDBACK_PRIVACY_EXCLUSIONS: () => MCP_ADMIN_FEEDBACK_PRIVACY_EXCLUSIONS,
|
|
48
|
+
MCP_ADMIN_FEEDBACK_PRIVACY_METADATA: () => MCP_ADMIN_FEEDBACK_PRIVACY_METADATA,
|
|
49
|
+
MCP_ADMIN_FEEDBACK_PROCESSORS: () => MCP_ADMIN_FEEDBACK_PROCESSORS,
|
|
50
|
+
MCP_ADMIN_FEEDBACK_READ_CAPABILITY: () => MCP_ADMIN_FEEDBACK_READ_CAPABILITY,
|
|
51
|
+
MCP_ADMIN_FEEDBACK_READ_OAUTH_SCOPE: () => MCP_ADMIN_FEEDBACK_READ_OAUTH_SCOPE,
|
|
52
|
+
MCP_ADMIN_FEEDBACK_REPORT_TYPES: () => MCP_ADMIN_FEEDBACK_REPORT_TYPES,
|
|
53
|
+
MCP_ADMIN_FEEDBACK_REQUIRED_OAUTH_SCOPES: () => MCP_ADMIN_FEEDBACK_REQUIRED_OAUTH_SCOPES,
|
|
54
|
+
MCP_ADMIN_FEEDBACK_SATISFACTION_WINDOWS: () => MCP_ADMIN_FEEDBACK_SATISFACTION_WINDOWS,
|
|
55
|
+
MCP_ADMIN_FEEDBACK_SCHEMA_CONTRACT_VERSION: () => MCP_ADMIN_FEEDBACK_SCHEMA_CONTRACT_VERSION,
|
|
56
|
+
MCP_ADMIN_FEEDBACK_SCHEMA_PACKAGE: () => MCP_ADMIN_FEEDBACK_SCHEMA_PACKAGE,
|
|
57
|
+
MCP_ADMIN_FEEDBACK_WINDOWS: () => MCP_ADMIN_FEEDBACK_WINDOWS,
|
|
38
58
|
MCP_ADMIN_FOUNDATION_DISABLED_CODE: () => MCP_ADMIN_FOUNDATION_DISABLED_CODE,
|
|
39
59
|
MCP_ADMIN_FOUNDATION_ENV_VAR: () => MCP_ADMIN_FOUNDATION_ENV_VAR,
|
|
40
60
|
MCP_ADMIN_FOUNDATION_FLAG_ID: () => MCP_ADMIN_FOUNDATION_FLAG_ID,
|
|
41
61
|
MCP_ADMIN_LIVEOPS_FLAG_ID: () => MCP_ADMIN_LIVEOPS_FLAG_ID,
|
|
62
|
+
MCP_ADMIN_MODEL_CAPABILITIES: () => MCP_ADMIN_MODEL_CAPABILITIES,
|
|
63
|
+
MCP_ADMIN_MODEL_OAUTH_SCOPES: () => MCP_ADMIN_MODEL_OAUTH_SCOPES,
|
|
64
|
+
MCP_ADMIN_MODEL_REGISTRY_SOURCE: () => MCP_ADMIN_MODEL_REGISTRY_SOURCE,
|
|
65
|
+
MCP_ADMIN_MODEL_RESOLUTION_CONTRACT_VERSION: () => MCP_ADMIN_MODEL_RESOLUTION_CONTRACT_VERSION,
|
|
66
|
+
MCP_ADMIN_MODEL_TOOL_CONTRACT_VERSION: () => MCP_ADMIN_MODEL_TOOL_CONTRACT_VERSION,
|
|
42
67
|
MCP_ADMIN_PRODUCTION_READINESS_ENV_VAR: () => MCP_ADMIN_PRODUCTION_READINESS_ENV_VAR,
|
|
43
68
|
MCP_ADMIN_PRODUCTION_READINESS_FLAG_ID: () => MCP_ADMIN_PRODUCTION_READINESS_FLAG_ID,
|
|
44
69
|
MCP_ADMIN_REGISTRY_SOURCE: () => MCP_ADMIN_REGISTRY_SOURCE,
|
|
@@ -52,6 +77,7 @@ __export(index_exports, {
|
|
|
52
77
|
MCP_ADMIN_USER_AGGREGATION_DIMENSIONS: () => MCP_ADMIN_USER_AGGREGATION_DIMENSIONS,
|
|
53
78
|
MCP_ADMIN_USER_AGGREGATION_METRICS: () => MCP_ADMIN_USER_AGGREGATION_METRICS,
|
|
54
79
|
MCP_ADMIN_USER_AGGREGATION_PRESETS: () => MCP_ADMIN_USER_AGGREGATION_PRESETS,
|
|
80
|
+
MCP_ASSET_CATALOG_CONFIRM_CAPABILITY: () => MCP_ASSET_CATALOG_CONFIRM_CAPABILITY,
|
|
55
81
|
MCP_ASSET_CATALOG_REQUEST_CAPABILITY: () => MCP_ASSET_CATALOG_REQUEST_CAPABILITY,
|
|
56
82
|
MCP_ASSET_CATALOG_REVIEW_CAPABILITY: () => MCP_ASSET_CATALOG_REVIEW_CAPABILITY,
|
|
57
83
|
MCP_ASSET_EXTERNAL_HARVEST_FLAG_ID: () => MCP_ASSET_EXTERNAL_HARVEST_FLAG_ID,
|
|
@@ -72,16 +98,21 @@ __export(index_exports, {
|
|
|
72
98
|
buildMcpSurfaceUrls: () => buildMcpSurfaceUrls,
|
|
73
99
|
getMcpAdminContractDefaultTranslation: () => getMcpAdminContractDefaultTranslation,
|
|
74
100
|
listMcpActionSummaries: () => listMcpActionSummaries,
|
|
101
|
+
listMcpModelResourceTemplates: () => listMcpModelResourceTemplates,
|
|
102
|
+
listMcpModelToolSummaries: () => listMcpModelToolSummaries,
|
|
75
103
|
mcpAdminContractDescriptionKeys: () => mcpAdminContractDescriptionKeys,
|
|
76
104
|
mcpAdminContractsEnGbTranslations: () => mcpAdminContractsEnGbTranslations,
|
|
77
105
|
mcpAdminContractsTranslations: () => mcpAdminContractsTranslations
|
|
78
106
|
});
|
|
79
107
|
module.exports = __toCommonJS(index_exports);
|
|
108
|
+
var import_schema = require("@plasius/schema");
|
|
109
|
+
var import_asset_contracts = require("@plasius/asset-contracts");
|
|
110
|
+
var import_asset_mcp = require("@plasius/asset-mcp");
|
|
80
111
|
|
|
81
112
|
// src/translations/en-GB.ts
|
|
82
113
|
var mcpAdminContractsEnGbTranslations = {
|
|
83
|
-
"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.",
|
|
84
|
-
"mcpAdminContracts.manifest.description": "Authenticated admin MCP discovery for the Plasius feature flag, capability, analytics, pseudonymous Token reporting, and audit control plane.",
|
|
114
|
+
"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.",
|
|
115
|
+
"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.",
|
|
85
116
|
"mcpAdminContracts.action.listFeatureFlags.description": "List existing feature flags from the admin rollout control plane.",
|
|
86
117
|
"mcpAdminContracts.action.getFeatureFlag.description": "Fetch one feature flag by stable key.",
|
|
87
118
|
"mcpAdminContracts.action.updateFeatureFlag.description": "Patch an existing feature flag without bypassing the current admin update semantics.",
|
|
@@ -105,6 +136,11 @@ var mcpAdminContractsEnGbTranslations = {
|
|
|
105
136
|
"mcpAdminContracts.action.getAdminTokenEconomyOverview.description": "Read the identifier-free global Token balance, lifetime totals, wallet counts, and authoritative projection freshness.",
|
|
106
137
|
"mcpAdminContracts.action.listAdminTokenWalletBalances.description": "List bounded pseudonymous Token wallet balances without exposing account, payment, provider, or raw wallet identifiers.",
|
|
107
138
|
"mcpAdminContracts.action.getAdminTokenTrends.description": "Read privacy-suppressed Token acquisition and usage trends with explainable advisory anomaly indicators.",
|
|
139
|
+
"mcpAdminContracts.action.getFeedbackBugHealth.description": "Read a bounded immutable hourly bug-health materialisation.",
|
|
140
|
+
"mcpAdminContracts.action.getFeedbackSatisfaction.description": "Read a bounded immutable daily satisfaction materialisation.",
|
|
141
|
+
"mcpAdminContracts.action.listFeedbackAlerts.description": "List bounded deterministic feedback advisories using an opaque cursor.",
|
|
142
|
+
"mcpAdminContracts.action.getFeedbackFreshness.description": "Read safe freshness metadata for the hourly bug and daily satisfaction processors.",
|
|
143
|
+
"mcpAdminContracts.action.listFeedbackStructuredEntries.description": "List bounded reporter-identifier-free structured feedback entries without narrative or storage references.",
|
|
108
144
|
"mcpAdminContracts.action.searchAssetCatalog.description": "Search promoted asset catalog records without live third-party lookup.",
|
|
109
145
|
"mcpAdminContracts.action.getAssetManifest.description": "Fetch a promoted player-safe runtime asset manifest reference.",
|
|
110
146
|
"mcpAdminContracts.action.requestAsset.description": "Queue a governed missing-asset request when no promoted catalog match exists.",
|
|
@@ -118,6 +154,14 @@ var mcpAdminContractsEnGbTranslations = {
|
|
|
118
154
|
"mcpAdminContracts.action.promoteAsset.description": "Promote an approved asset candidate to an immutable runtime manifest reference.",
|
|
119
155
|
"mcpAdminContracts.action.rollbackAsset.description": "Rollback an asset runtime channel to a previous promoted manifest version.",
|
|
120
156
|
"mcpAdminContracts.action.getAssetJobStatus.description": "Read governed asset job status, planned processing work, and evidence references.",
|
|
157
|
+
"mcpAdminContracts.action.listModelSearchRankers.description": "List allowlisted, calibrated model-search rankers and their current readiness without selecting a substitute.",
|
|
158
|
+
"mcpAdminContracts.action.searchModelCatalog.description": "Search promoted model catalog versions using hard constraints and one exact calibrated ranker selection.",
|
|
159
|
+
"mcpAdminContracts.action.resolveModelRequest.description": "Search the catalog and idempotently create asynchronous provider or generator fallback work when needed.",
|
|
160
|
+
"mcpAdminContracts.action.getModelResolution.description": "Read an owned immutable model-resolution revision, progress, questions, and review evidence.",
|
|
161
|
+
"mcpAdminContracts.action.confirmModelCandidate.description": "Confirm one exact four-view candidate; low assurance additionally requires explicit semantic-risk acceptance.",
|
|
162
|
+
"mcpAdminContracts.action.retryModelResolution.description": "Create the next immutable request revision from bounded refinement answers and candidate exclusions.",
|
|
163
|
+
"mcpAdminContracts.action.cancelModelResolution.description": "Idempotently cancel unfinished work owned by the requester.",
|
|
164
|
+
"mcpAdminContracts.action.rebuildModelCatalogIndex.description": "Run an operator-only idempotent full, backfill, or repair rebuild of the promoted model catalog index.",
|
|
121
165
|
"mcpAdminContracts.action.getUserTokenWallet.description": "Read an account's server-resolved Token wallet summary without exposing provider or payment data.",
|
|
122
166
|
"mcpAdminContracts.action.listUserTokenActivity.description": "Read a bounded, cursor-paginated Token activity history for one account.",
|
|
123
167
|
"mcpAdminContracts.action.listTokenAdjustments.description": "List audited Token adjustment proposals and their approval state.",
|
|
@@ -162,6 +206,11 @@ var mcpAdminContractDescriptionKeys = {
|
|
|
162
206
|
actionGetAdminTokenEconomyOverview: "mcpAdminContracts.action.getAdminTokenEconomyOverview.description",
|
|
163
207
|
actionListAdminTokenWalletBalances: "mcpAdminContracts.action.listAdminTokenWalletBalances.description",
|
|
164
208
|
actionGetAdminTokenTrends: "mcpAdminContracts.action.getAdminTokenTrends.description",
|
|
209
|
+
actionGetFeedbackBugHealth: "mcpAdminContracts.action.getFeedbackBugHealth.description",
|
|
210
|
+
actionGetFeedbackSatisfaction: "mcpAdminContracts.action.getFeedbackSatisfaction.description",
|
|
211
|
+
actionListFeedbackAlerts: "mcpAdminContracts.action.listFeedbackAlerts.description",
|
|
212
|
+
actionGetFeedbackFreshness: "mcpAdminContracts.action.getFeedbackFreshness.description",
|
|
213
|
+
actionListFeedbackStructuredEntries: "mcpAdminContracts.action.listFeedbackStructuredEntries.description",
|
|
165
214
|
actionSearchAssetCatalog: "mcpAdminContracts.action.searchAssetCatalog.description",
|
|
166
215
|
actionGetAssetManifest: "mcpAdminContracts.action.getAssetManifest.description",
|
|
167
216
|
actionRequestAsset: "mcpAdminContracts.action.requestAsset.description",
|
|
@@ -175,6 +224,14 @@ var mcpAdminContractDescriptionKeys = {
|
|
|
175
224
|
actionPromoteAsset: "mcpAdminContracts.action.promoteAsset.description",
|
|
176
225
|
actionRollbackAsset: "mcpAdminContracts.action.rollbackAsset.description",
|
|
177
226
|
actionGetAssetJobStatus: "mcpAdminContracts.action.getAssetJobStatus.description",
|
|
227
|
+
actionListModelSearchRankers: "mcpAdminContracts.action.listModelSearchRankers.description",
|
|
228
|
+
actionSearchModelCatalog: "mcpAdminContracts.action.searchModelCatalog.description",
|
|
229
|
+
actionResolveModelRequest: "mcpAdminContracts.action.resolveModelRequest.description",
|
|
230
|
+
actionGetModelResolution: "mcpAdminContracts.action.getModelResolution.description",
|
|
231
|
+
actionConfirmModelCandidate: "mcpAdminContracts.action.confirmModelCandidate.description",
|
|
232
|
+
actionRetryModelResolution: "mcpAdminContracts.action.retryModelResolution.description",
|
|
233
|
+
actionCancelModelResolution: "mcpAdminContracts.action.cancelModelResolution.description",
|
|
234
|
+
actionRebuildModelCatalogIndex: "mcpAdminContracts.action.rebuildModelCatalogIndex.description",
|
|
178
235
|
actionGetUserTokenWallet: "mcpAdminContracts.action.getUserTokenWallet.description",
|
|
179
236
|
actionListUserTokenActivity: "mcpAdminContracts.action.listUserTokenActivity.description",
|
|
180
237
|
actionListTokenAdjustments: "mcpAdminContracts.action.listTokenAdjustments.description",
|
|
@@ -199,7 +256,7 @@ function getMcpAdminContractDefaultTranslation(key) {
|
|
|
199
256
|
}
|
|
200
257
|
|
|
201
258
|
// src/index.ts
|
|
202
|
-
var MCP_ADMIN_CONTRACT_VERSION = "2026-08-
|
|
259
|
+
var MCP_ADMIN_CONTRACT_VERSION = "2026-08-20.v7";
|
|
203
260
|
var MCP_ADMIN_REGISTRY_SOURCE = "@plasius/mcp-admin-contracts";
|
|
204
261
|
var MCP_ADMIN_FOUNDATION_FLAG_ID = "mcp.admin.foundation.enabled";
|
|
205
262
|
var MCP_ACCESS_SCOPE = "mcp:access";
|
|
@@ -215,15 +272,114 @@ var MCP_ADMIN_PRODUCTION_READINESS_FLAG_ID = "mcp.admin.production-readiness.ena
|
|
|
215
272
|
var MCP_ADMIN_PRODUCTION_READINESS_ENV_VAR = "MCP_ADMIN_PRODUCTION_READINESS_ENABLED";
|
|
216
273
|
var MCP_ASSET_PIPELINE_FLAG_ID = "asset.pipeline.unified-ai-assets.enabled";
|
|
217
274
|
var MCP_ASSET_EXTERNAL_HARVEST_FLAG_ID = "asset.pipeline.external-model-harvest.enabled";
|
|
218
|
-
var MCP_ASSET_CATALOG_REQUEST_CAPABILITY =
|
|
219
|
-
var
|
|
220
|
-
var
|
|
221
|
-
var
|
|
275
|
+
var MCP_ASSET_CATALOG_REQUEST_CAPABILITY = import_asset_mcp.MODEL_MCP_CATALOG_REQUEST_CAPABILITY;
|
|
276
|
+
var MCP_ASSET_CATALOG_CONFIRM_CAPABILITY = import_asset_mcp.MODEL_MCP_CATALOG_CONFIRM_CAPABILITY;
|
|
277
|
+
var MCP_ASSET_PIPELINE_MANAGE_CAPABILITY = import_asset_mcp.MODEL_MCP_PIPELINE_MANAGE_CAPABILITY;
|
|
278
|
+
var MCP_ASSET_SOURCE_MANAGE_CAPABILITY = import_asset_mcp.MODEL_MCP_SOURCE_MANAGE_CAPABILITY;
|
|
279
|
+
var MCP_ASSET_CATALOG_REVIEW_CAPABILITY = import_asset_mcp.MODEL_MCP_CATALOG_REVIEW_CAPABILITY;
|
|
280
|
+
var MCP_ADMIN_MODEL_TOOL_CONTRACT_VERSION = import_asset_mcp.MODEL_MCP_CONTRACT_VERSION;
|
|
281
|
+
var MCP_ADMIN_MODEL_REGISTRY_SOURCE = import_asset_mcp.ASSET_MCP_PACKAGE;
|
|
282
|
+
var MCP_ADMIN_MODEL_RESOLUTION_CONTRACT_VERSION = import_asset_contracts.MODEL_RESOLUTION_CONTRACT_VERSION;
|
|
283
|
+
var MCP_ADMIN_MODEL_CAPABILITIES = Object.freeze({
|
|
284
|
+
catalogRequest: import_asset_mcp.MODEL_MCP_CATALOG_REQUEST_CAPABILITY,
|
|
285
|
+
catalogConfirm: import_asset_mcp.MODEL_MCP_CATALOG_CONFIRM_CAPABILITY,
|
|
286
|
+
catalogReview: import_asset_mcp.MODEL_MCP_CATALOG_REVIEW_CAPABILITY,
|
|
287
|
+
sourceManage: import_asset_mcp.MODEL_MCP_SOURCE_MANAGE_CAPABILITY,
|
|
288
|
+
pipelineManage: import_asset_mcp.MODEL_MCP_PIPELINE_MANAGE_CAPABILITY
|
|
289
|
+
});
|
|
290
|
+
var MCP_ADMIN_MODEL_OAUTH_SCOPES = Object.freeze([
|
|
291
|
+
MCP_ACCESS_SCOPE,
|
|
292
|
+
import_asset_mcp.MODEL_MCP_CATALOG_REQUEST_CAPABILITY,
|
|
293
|
+
import_asset_mcp.MODEL_MCP_CATALOG_CONFIRM_CAPABILITY,
|
|
294
|
+
import_asset_mcp.MODEL_MCP_CATALOG_REVIEW_CAPABILITY,
|
|
295
|
+
import_asset_mcp.MODEL_MCP_SOURCE_MANAGE_CAPABILITY,
|
|
296
|
+
import_asset_mcp.MODEL_MCP_PIPELINE_MANAGE_CAPABILITY
|
|
297
|
+
]);
|
|
298
|
+
var canonicalModelToolDefinitions = (0, import_asset_mcp.listModelMcpToolDefinitions)();
|
|
299
|
+
var MCP_ADMIN_FEEDBACK_FLAG_ID = "feedback.mcp.enabled";
|
|
300
|
+
var MCP_ADMIN_FEEDBACK_READ_CAPABILITY = "admin.feedback.read";
|
|
301
|
+
var MCP_ADMIN_BASE_OAUTH_SCOPE = MCP_ACCESS_SCOPE;
|
|
302
|
+
var MCP_ADMIN_FEEDBACK_READ_OAUTH_SCOPE = MCP_ADMIN_FEEDBACK_READ_CAPABILITY;
|
|
303
|
+
var MCP_ADMIN_FEEDBACK_REQUIRED_OAUTH_SCOPES = Object.freeze([
|
|
304
|
+
MCP_ADMIN_BASE_OAUTH_SCOPE,
|
|
305
|
+
MCP_ADMIN_FEEDBACK_READ_OAUTH_SCOPE
|
|
306
|
+
]);
|
|
307
|
+
var MCP_ADMIN_FEEDBACK_SCHEMA_PACKAGE = "@plasius/schema";
|
|
308
|
+
var MCP_ADMIN_FEEDBACK_SCHEMA_CONTRACT_VERSION = import_schema.FEEDBACK_CONTRACT_VERSION;
|
|
309
|
+
var MCP_ADMIN_FEEDBACK_WINDOWS = [
|
|
310
|
+
"previous-utc-hour",
|
|
311
|
+
"last-24-hours",
|
|
312
|
+
"last-7-days",
|
|
313
|
+
"last-30-days",
|
|
314
|
+
"last-90-days"
|
|
315
|
+
];
|
|
316
|
+
var MCP_ADMIN_FEEDBACK_PACKET_TYPES = [
|
|
317
|
+
"feedback-bug-packet",
|
|
318
|
+
"feedback-review-packet"
|
|
319
|
+
];
|
|
320
|
+
var MCP_ADMIN_FEEDBACK_REPORT_TYPES = [
|
|
321
|
+
"feedback-hourly-bug-report",
|
|
322
|
+
"feedback-daily-satisfaction-report"
|
|
323
|
+
];
|
|
324
|
+
var MCP_ADMIN_FEEDBACK_PROCESSORS = [
|
|
325
|
+
"bug-hourly",
|
|
326
|
+
"review-daily",
|
|
327
|
+
"commit-reconciliation"
|
|
328
|
+
];
|
|
329
|
+
var MCP_ADMIN_FEEDBACK_PRIVACY_EXCLUSIONS = [
|
|
330
|
+
"account-identifiers",
|
|
331
|
+
"reporter-pseudonyms",
|
|
332
|
+
"network-identifiers",
|
|
333
|
+
"session-identifiers",
|
|
334
|
+
"user-agents",
|
|
335
|
+
"locales",
|
|
336
|
+
"client-timestamps",
|
|
337
|
+
"referrers",
|
|
338
|
+
"credential-material",
|
|
339
|
+
"financial-identifiers",
|
|
340
|
+
"government-identifiers",
|
|
341
|
+
"narrative",
|
|
342
|
+
"generated-summaries",
|
|
343
|
+
"quotations",
|
|
344
|
+
"embeddings",
|
|
345
|
+
"content-hashes",
|
|
346
|
+
"matched-values",
|
|
347
|
+
"model-traces",
|
|
348
|
+
"binary-images",
|
|
349
|
+
"filenames",
|
|
350
|
+
"exact-coordinates",
|
|
351
|
+
"exact-dimensions",
|
|
352
|
+
"adapter-fingerprints",
|
|
353
|
+
"raw-warnings",
|
|
354
|
+
"blob-references",
|
|
355
|
+
"raw-urls",
|
|
356
|
+
"unrestricted-scans",
|
|
357
|
+
"mutations"
|
|
358
|
+
];
|
|
222
359
|
var MCP_ADMIN_ECONOMY_ADJUSTMENTS_FLAG_ID = "mcp.admin-economy-adjustments.enabled";
|
|
223
360
|
var ECONOMY_OWNER_ADJUSTMENTS_FLAG_ID = "economy.tokens.owner-adjustments.enabled";
|
|
224
361
|
var MCP_ECONOMY_FINANCE_VIEW_CAPABILITY = "economy.finance-operations.view";
|
|
225
362
|
var MCP_ECONOMY_FINANCE_ADJUST_CAPABILITY = "economy.finance-operations.adjust";
|
|
226
363
|
var MCP_ECONOMY_FINANCE_APPROVE_CAPABILITY = "economy.finance-operations.approve-adjustment";
|
|
364
|
+
var canonicalFeedbackSchemas = Object.freeze({
|
|
365
|
+
FeedbackBugPacketSchema: import_schema.FeedbackBugPacketSchema,
|
|
366
|
+
FeedbackReviewPacketSchema: import_schema.FeedbackReviewPacketSchema,
|
|
367
|
+
FeedbackHourlyBugReportSchema: import_schema.FeedbackHourlyBugReportSchema,
|
|
368
|
+
FeedbackDailySatisfactionReportSchema: import_schema.FeedbackDailySatisfactionReportSchema,
|
|
369
|
+
FeedbackProcessorCheckpointSchema: import_schema.FeedbackProcessorCheckpointSchema
|
|
370
|
+
});
|
|
371
|
+
var feedbackSchemaSource = (...schemaNames) => {
|
|
372
|
+
for (const schemaName of schemaNames) {
|
|
373
|
+
if (canonicalFeedbackSchemas[schemaName].meta.version !== MCP_ADMIN_FEEDBACK_SCHEMA_CONTRACT_VERSION) {
|
|
374
|
+
throw new TypeError("Canonical feedback schema version mismatch.");
|
|
375
|
+
}
|
|
376
|
+
}
|
|
377
|
+
return {
|
|
378
|
+
packageName: MCP_ADMIN_FEEDBACK_SCHEMA_PACKAGE,
|
|
379
|
+
contractVersion: MCP_ADMIN_FEEDBACK_SCHEMA_CONTRACT_VERSION,
|
|
380
|
+
schemaNames: [...schemaNames]
|
|
381
|
+
};
|
|
382
|
+
};
|
|
227
383
|
var stringField = (description, options = {}) => ({
|
|
228
384
|
type: "string",
|
|
229
385
|
description,
|
|
@@ -239,18 +395,41 @@ var numberField = (description, options = {}) => ({
|
|
|
239
395
|
description,
|
|
240
396
|
...options
|
|
241
397
|
});
|
|
398
|
+
var integerField = (description, options = {}) => ({
|
|
399
|
+
type: "integer",
|
|
400
|
+
description,
|
|
401
|
+
...options
|
|
402
|
+
});
|
|
242
403
|
var objectField = (description, properties, options = {}) => ({
|
|
243
404
|
type: "object",
|
|
244
405
|
description,
|
|
245
406
|
properties,
|
|
246
407
|
...options
|
|
247
408
|
});
|
|
409
|
+
var feedbackClosedObjectField = (description, properties, options = {}) => objectField(description, properties, {
|
|
410
|
+
...options,
|
|
411
|
+
additionalProperties: false
|
|
412
|
+
});
|
|
248
413
|
var arrayField = (description, itemType, options = {}) => ({
|
|
249
414
|
type: "array",
|
|
250
415
|
description,
|
|
251
416
|
itemType,
|
|
252
417
|
...options
|
|
253
418
|
});
|
|
419
|
+
var arrayOfField = (description, itemType, items, options = {}) => ({
|
|
420
|
+
type: "array",
|
|
421
|
+
description,
|
|
422
|
+
itemType,
|
|
423
|
+
items,
|
|
424
|
+
...options
|
|
425
|
+
});
|
|
426
|
+
var discriminatedUnionField = (description, discriminator, variants, options = {}) => ({
|
|
427
|
+
type: "discriminated-union",
|
|
428
|
+
description,
|
|
429
|
+
discriminator,
|
|
430
|
+
oneOf: variants,
|
|
431
|
+
...options
|
|
432
|
+
});
|
|
254
433
|
var translatedDescription = (descriptionKey) => {
|
|
255
434
|
const descriptionDefault = getMcpAdminContractDefaultTranslation(descriptionKey);
|
|
256
435
|
return {
|
|
@@ -743,6 +922,940 @@ var adminTokenTrendPointField = objectField(
|
|
|
743
922
|
anomaly: adminTokenAnomalyField
|
|
744
923
|
}
|
|
745
924
|
);
|
|
925
|
+
var MCP_ADMIN_FEEDBACK_MAX_PAGE_SIZE = 100;
|
|
926
|
+
var MCP_ADMIN_FEEDBACK_MAX_CURSOR_LENGTH = 512;
|
|
927
|
+
var MCP_ADMIN_FEEDBACK_BUG_HEALTH_WINDOWS = [
|
|
928
|
+
"previous-utc-hour",
|
|
929
|
+
"last-24-hours",
|
|
930
|
+
"last-7-days"
|
|
931
|
+
];
|
|
932
|
+
var MCP_ADMIN_FEEDBACK_SATISFACTION_WINDOWS = [
|
|
933
|
+
"last-7-days",
|
|
934
|
+
"last-30-days",
|
|
935
|
+
"last-90-days"
|
|
936
|
+
];
|
|
937
|
+
var MCP_ADMIN_FEEDBACK_ENTRY_WINDOWS = [
|
|
938
|
+
"last-24-hours",
|
|
939
|
+
"last-7-days",
|
|
940
|
+
"last-30-days",
|
|
941
|
+
"last-90-days"
|
|
942
|
+
];
|
|
943
|
+
var MCP_ADMIN_FEEDBACK_ALERT_WINDOWS = [
|
|
944
|
+
"last-24-hours",
|
|
945
|
+
"last-7-days"
|
|
946
|
+
];
|
|
947
|
+
var MCP_ADMIN_FEEDBACK_PRIVACY_METADATA = Object.freeze({
|
|
948
|
+
classification: "public-safe-structured-only",
|
|
949
|
+
readOnly: true,
|
|
950
|
+
bounded: true,
|
|
951
|
+
excludes: Object.freeze([...MCP_ADMIN_FEEDBACK_PRIVACY_EXCLUSIONS]),
|
|
952
|
+
notes: Object.freeze([
|
|
953
|
+
"Responses contain only schema-validated structured fields and materialised report metadata.",
|
|
954
|
+
"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.",
|
|
955
|
+
"Narrative-derived values are closed classifications only; no summaries, quotations, embeddings, hashes, matched values, or model traces are permitted."
|
|
956
|
+
])
|
|
957
|
+
});
|
|
958
|
+
var feedbackReadAccess = {
|
|
959
|
+
oauthScopes: [...MCP_ADMIN_FEEDBACK_REQUIRED_OAUTH_SCOPES],
|
|
960
|
+
capabilities: [MCP_ADMIN_FEEDBACK_READ_CAPABILITY],
|
|
961
|
+
rolloutFlags: [MCP_ADMIN_FEEDBACK_FLAG_ID],
|
|
962
|
+
mode: "read-only",
|
|
963
|
+
identityResolution: "not-available"
|
|
964
|
+
};
|
|
965
|
+
var feedbackPageMetadataField = (allowedWindows) => feedbackClosedObjectField("Bounded read-response metadata.", {
|
|
966
|
+
window: stringField("Closed server-owned response window.", {
|
|
967
|
+
enum: [...allowedWindows]
|
|
968
|
+
}),
|
|
969
|
+
windowStart: stringField("Inclusive UTC response-window boundary.", {
|
|
970
|
+
format: "date-time"
|
|
971
|
+
}),
|
|
972
|
+
windowEnd: stringField("Exclusive UTC response-window boundary.", {
|
|
973
|
+
format: "date-time"
|
|
974
|
+
}),
|
|
975
|
+
generatedAt: stringField("UTC time at which this response projection was produced.", {
|
|
976
|
+
format: "date-time"
|
|
977
|
+
}),
|
|
978
|
+
returnedCount: integerField("Number of records in this bounded page.", {
|
|
979
|
+
minimum: 0,
|
|
980
|
+
maximum: MCP_ADMIN_FEEDBACK_MAX_PAGE_SIZE
|
|
981
|
+
}),
|
|
982
|
+
nextCursor: stringField("Opaque continuation cursor when more results exist.", {
|
|
983
|
+
required: false,
|
|
984
|
+
minLength: 1,
|
|
985
|
+
maxLength: MCP_ADMIN_FEEDBACK_MAX_CURSOR_LENGTH,
|
|
986
|
+
pattern: "^[A-Za-z0-9_-]+$"
|
|
987
|
+
})
|
|
988
|
+
});
|
|
989
|
+
var FEEDBACK_SCHEMA_MAX_COUNT = 1e9;
|
|
990
|
+
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}$";
|
|
991
|
+
var FEEDBACK_SCHEMA_SAFE_ID_PATTERN = "^[A-Za-z0-9][A-Za-z0-9._:-]*$";
|
|
992
|
+
var FEEDBACK_SCHEMA_SURFACE_IDS = import_schema.FEEDBACK_SURFACE_IDS;
|
|
993
|
+
var FEEDBACK_SCHEMA_PERSISTABLE_ISSUE_TYPES = import_schema.FEEDBACK_PERSISTABLE_ISSUE_TYPES;
|
|
994
|
+
var FEEDBACK_SCHEMA_SENTIMENT_BUCKETS = import_schema.FEEDBACK_SENTIMENT_BUCKETS;
|
|
995
|
+
var FEEDBACK_SCHEMA_INTENT_IDS = import_schema.FEEDBACK_INTENT_IDS;
|
|
996
|
+
var FEEDBACK_SCHEMA_THEME_IDS = import_schema.FEEDBACK_THEME_IDS;
|
|
997
|
+
var FEEDBACK_SCHEMA_RENDERER_BUCKETS = import_schema.FEEDBACK_RENDERER_BUCKETS;
|
|
998
|
+
var FEEDBACK_SCHEMA_BACKEND_BUCKETS = import_schema.FEEDBACK_BACKEND_BUCKETS;
|
|
999
|
+
var FEEDBACK_SCHEMA_VIEWPORT_BUCKETS = import_schema.FEEDBACK_VIEWPORT_BUCKETS;
|
|
1000
|
+
var FEEDBACK_SCHEMA_FRAME_RATE_BUCKETS = import_schema.FEEDBACK_FRAME_RATE_BUCKETS;
|
|
1001
|
+
var FEEDBACK_SCHEMA_FRAME_TIME_BUCKETS = import_schema.FEEDBACK_FRAME_TIME_BUCKETS;
|
|
1002
|
+
var FEEDBACK_SCHEMA_GAME_FEATURE_IDS = import_schema.FEEDBACK_GAME_FEATURE_IDS;
|
|
1003
|
+
var FEEDBACK_SCHEMA_GAME_COUNTER_CODES = import_schema.FEEDBACK_GAME_COUNTER_CODES;
|
|
1004
|
+
var FEEDBACK_SCHEMA_GAME_ERROR_CODES = import_schema.FEEDBACK_GAME_ERROR_CODES;
|
|
1005
|
+
var requireCanonicalStringEnum = (field) => {
|
|
1006
|
+
const values = field?.enumValues;
|
|
1007
|
+
if (values === void 0 || values.length === 0 || values.some((value) => typeof value !== "string")) {
|
|
1008
|
+
throw new TypeError("Canonical feedback schema enum is unavailable.");
|
|
1009
|
+
}
|
|
1010
|
+
return Object.freeze([...values]);
|
|
1011
|
+
};
|
|
1012
|
+
var canonicalHourlyBugShape = import_schema.FeedbackHourlyBugReportSchema._shape;
|
|
1013
|
+
var canonicalAdvisoryShape = canonicalHourlyBugShape.advisories?.itemType?._shape;
|
|
1014
|
+
var FEEDBACK_SCHEMA_ADVISORY_CODES = requireCanonicalStringEnum(
|
|
1015
|
+
canonicalAdvisoryShape?.code
|
|
1016
|
+
);
|
|
1017
|
+
var FEEDBACK_SCHEMA_RECOMMENDATION_IDS = requireCanonicalStringEnum(
|
|
1018
|
+
canonicalAdvisoryShape?.recommendationIds?.itemType
|
|
1019
|
+
);
|
|
1020
|
+
var FEEDBACK_SCHEMA_ABUSE_BLOCK_BANDS = requireCanonicalStringEnum(
|
|
1021
|
+
canonicalHourlyBugShape.abuseBlockBands?.itemType?._shape?.id
|
|
1022
|
+
);
|
|
1023
|
+
var canonicalLiteralStringField = (description, value) => stringField(description, {
|
|
1024
|
+
enum: [value],
|
|
1025
|
+
constValue: value
|
|
1026
|
+
});
|
|
1027
|
+
var canonicalUuidV4Field = (description) => stringField(description, {
|
|
1028
|
+
format: "uuid",
|
|
1029
|
+
minLength: 36,
|
|
1030
|
+
maxLength: 36,
|
|
1031
|
+
pattern: FEEDBACK_SCHEMA_UUID_V4_PATTERN
|
|
1032
|
+
});
|
|
1033
|
+
var canonicalSafeIdField = (description, maximum = 128) => stringField(description, {
|
|
1034
|
+
minLength: 1,
|
|
1035
|
+
maxLength: maximum,
|
|
1036
|
+
pattern: FEEDBACK_SCHEMA_SAFE_ID_PATTERN
|
|
1037
|
+
});
|
|
1038
|
+
var canonicalDateTimeField = (description) => stringField(description, {
|
|
1039
|
+
format: "date-time"
|
|
1040
|
+
});
|
|
1041
|
+
var canonicalCountField = (description, options = {}) => integerField(description, {
|
|
1042
|
+
minimum: 0,
|
|
1043
|
+
maximum: FEEDBACK_SCHEMA_MAX_COUNT,
|
|
1044
|
+
...options
|
|
1045
|
+
});
|
|
1046
|
+
var canonicalSchemaIdentityFields = (type) => ({
|
|
1047
|
+
type: canonicalLiteralStringField("Canonical @plasius/schema identity.", type),
|
|
1048
|
+
version: canonicalLiteralStringField(
|
|
1049
|
+
"Canonical feedback contract version.",
|
|
1050
|
+
MCP_ADMIN_FEEDBACK_SCHEMA_CONTRACT_VERSION
|
|
1051
|
+
)
|
|
1052
|
+
});
|
|
1053
|
+
var canonicalStringArrayField = (description, enumValues, maximum, options = {}) => arrayOfField(
|
|
1054
|
+
description,
|
|
1055
|
+
"string",
|
|
1056
|
+
stringField("Closed canonical value.", { enum: [...enumValues] }),
|
|
1057
|
+
{ maxItems: maximum, ...options }
|
|
1058
|
+
);
|
|
1059
|
+
var canonicalAnalyzedProjectionField = feedbackClosedObjectField(
|
|
1060
|
+
"Canonical analyzed `FeedbackDerivedAnalysis` projection.",
|
|
1061
|
+
{
|
|
1062
|
+
...canonicalSchemaIdentityFields("feedback-derived-analysis"),
|
|
1063
|
+
status: canonicalLiteralStringField(
|
|
1064
|
+
"Canonical analysis status.",
|
|
1065
|
+
"analyzed"
|
|
1066
|
+
),
|
|
1067
|
+
sentiment: stringField("Closed canonical sentiment bucket.", {
|
|
1068
|
+
enum: [...FEEDBACK_SCHEMA_SENTIMENT_BUCKETS]
|
|
1069
|
+
}),
|
|
1070
|
+
intentIds: canonicalStringArrayField(
|
|
1071
|
+
"Unique closed canonical intent identifiers.",
|
|
1072
|
+
FEEDBACK_SCHEMA_INTENT_IDS,
|
|
1073
|
+
8
|
|
1074
|
+
),
|
|
1075
|
+
themeIds: canonicalStringArrayField(
|
|
1076
|
+
"Unique closed canonical theme identifiers.",
|
|
1077
|
+
FEEDBACK_SCHEMA_THEME_IDS,
|
|
1078
|
+
8
|
|
1079
|
+
),
|
|
1080
|
+
confidence: stringField("Closed classifier confidence.", {
|
|
1081
|
+
enum: ["low", "medium", "high"]
|
|
1082
|
+
}),
|
|
1083
|
+
policyVersion: stringField("Pinned canonical privacy policy version.", {
|
|
1084
|
+
enum: ["feedback-privacy-en-v1"]
|
|
1085
|
+
}),
|
|
1086
|
+
modelVersion: stringField("Pinned canonical local model version.", {
|
|
1087
|
+
enum: ["feedback-en-rules-v1"]
|
|
1088
|
+
}),
|
|
1089
|
+
deterministicRedactionCount: canonicalCountField(
|
|
1090
|
+
"Browser deterministic-redaction count.",
|
|
1091
|
+
{ maximum: 4e3 }
|
|
1092
|
+
),
|
|
1093
|
+
scannerRedactionCount: canonicalCountField(
|
|
1094
|
+
"Private-scanner redaction count.",
|
|
1095
|
+
{ maximum: 4e3 }
|
|
1096
|
+
)
|
|
1097
|
+
}
|
|
1098
|
+
);
|
|
1099
|
+
var canonicalStructuredOnlyProjectionField = feedbackClosedObjectField(
|
|
1100
|
+
"Canonical structured-only `FeedbackDerivedAnalysis` projection.",
|
|
1101
|
+
{
|
|
1102
|
+
...canonicalSchemaIdentityFields("feedback-derived-analysis"),
|
|
1103
|
+
status: canonicalLiteralStringField(
|
|
1104
|
+
"Canonical analysis status.",
|
|
1105
|
+
"structured-only"
|
|
1106
|
+
),
|
|
1107
|
+
intentIds: canonicalStringArrayField(
|
|
1108
|
+
"Structured-only projections contain no intent identifiers.",
|
|
1109
|
+
FEEDBACK_SCHEMA_INTENT_IDS,
|
|
1110
|
+
0
|
|
1111
|
+
),
|
|
1112
|
+
themeIds: canonicalStringArrayField(
|
|
1113
|
+
"Structured-only projections contain no theme identifiers.",
|
|
1114
|
+
FEEDBACK_SCHEMA_THEME_IDS,
|
|
1115
|
+
0
|
|
1116
|
+
),
|
|
1117
|
+
policyVersion: stringField("Pinned canonical privacy policy version.", {
|
|
1118
|
+
enum: ["feedback-privacy-en-v1"]
|
|
1119
|
+
}),
|
|
1120
|
+
modelVersion: stringField("Pinned canonical local model version.", {
|
|
1121
|
+
enum: ["feedback-en-rules-v1"]
|
|
1122
|
+
}),
|
|
1123
|
+
deterministicRedactionCount: canonicalCountField(
|
|
1124
|
+
"Browser deterministic-redaction count.",
|
|
1125
|
+
{ maximum: 4e3 }
|
|
1126
|
+
),
|
|
1127
|
+
scannerRedactionCount: canonicalCountField(
|
|
1128
|
+
"Private-scanner redaction count.",
|
|
1129
|
+
{ maximum: 4e3 }
|
|
1130
|
+
)
|
|
1131
|
+
}
|
|
1132
|
+
);
|
|
1133
|
+
var canonicalAnalysisProjectionField = discriminatedUnionField(
|
|
1134
|
+
"Canonical closed `FeedbackDerivedAnalysis` projection.",
|
|
1135
|
+
"status",
|
|
1136
|
+
[
|
|
1137
|
+
canonicalAnalyzedProjectionField,
|
|
1138
|
+
canonicalStructuredOnlyProjectionField
|
|
1139
|
+
],
|
|
1140
|
+
{ required: false }
|
|
1141
|
+
);
|
|
1142
|
+
var canonicalGameCounterField = feedbackClosedObjectField(
|
|
1143
|
+
"Canonical bounded renderer diagnostic counter.",
|
|
1144
|
+
{
|
|
1145
|
+
code: stringField("Closed canonical counter code.", {
|
|
1146
|
+
enum: [...FEEDBACK_SCHEMA_GAME_COUNTER_CODES]
|
|
1147
|
+
}),
|
|
1148
|
+
count: canonicalCountField("Positive bounded counter value.", {
|
|
1149
|
+
minimum: 1,
|
|
1150
|
+
maximum: 1e4
|
|
1151
|
+
})
|
|
1152
|
+
}
|
|
1153
|
+
);
|
|
1154
|
+
var canonicalGameDiagnosticsVariantField = (surfaceId, provenanceContractId) => feedbackClosedObjectField("Canonical bounded renderer-owned game diagnostics.", {
|
|
1155
|
+
...canonicalSchemaIdentityFields("feedback-game-diagnostics"),
|
|
1156
|
+
surfaceId: canonicalLiteralStringField(
|
|
1157
|
+
"Canonical diagnostics-eligible surface.",
|
|
1158
|
+
surfaceId
|
|
1159
|
+
),
|
|
1160
|
+
consentConfirmed: booleanField("Explicit diagnostics consent.", {
|
|
1161
|
+
constValue: true
|
|
1162
|
+
}),
|
|
1163
|
+
provenanceContractId: canonicalLiteralStringField(
|
|
1164
|
+
"Renderer-owned provenance contract.",
|
|
1165
|
+
provenanceContractId
|
|
1166
|
+
),
|
|
1167
|
+
renderer: stringField("Coarse canonical renderer bucket.", {
|
|
1168
|
+
enum: [...FEEDBACK_SCHEMA_RENDERER_BUCKETS]
|
|
1169
|
+
}),
|
|
1170
|
+
backend: stringField("Coarse canonical execution-backend bucket.", {
|
|
1171
|
+
enum: [...FEEDBACK_SCHEMA_BACKEND_BUCKETS]
|
|
1172
|
+
}),
|
|
1173
|
+
viewportBucket: stringField("Coarse canonical viewport bucket.", {
|
|
1174
|
+
enum: [...FEEDBACK_SCHEMA_VIEWPORT_BUCKETS]
|
|
1175
|
+
}),
|
|
1176
|
+
frameRateBucket: stringField("Coarse canonical frame-rate bucket.", {
|
|
1177
|
+
enum: [...FEEDBACK_SCHEMA_FRAME_RATE_BUCKETS]
|
|
1178
|
+
}),
|
|
1179
|
+
frameTimeBucket: stringField("Coarse canonical frame-time bucket.", {
|
|
1180
|
+
enum: [...FEEDBACK_SCHEMA_FRAME_TIME_BUCKETS]
|
|
1181
|
+
}),
|
|
1182
|
+
featureIds: canonicalStringArrayField(
|
|
1183
|
+
"Unique closed renderer feature identifiers.",
|
|
1184
|
+
FEEDBACK_SCHEMA_GAME_FEATURE_IDS,
|
|
1185
|
+
FEEDBACK_SCHEMA_GAME_FEATURE_IDS.length
|
|
1186
|
+
),
|
|
1187
|
+
counters: arrayOfField(
|
|
1188
|
+
"Unique bounded renderer counters.",
|
|
1189
|
+
"FeedbackGameDiagnosticCounter",
|
|
1190
|
+
canonicalGameCounterField,
|
|
1191
|
+
{ maxItems: 32 }
|
|
1192
|
+
),
|
|
1193
|
+
errorCodes: canonicalStringArrayField(
|
|
1194
|
+
"Unique closed renderer error codes.",
|
|
1195
|
+
FEEDBACK_SCHEMA_GAME_ERROR_CODES,
|
|
1196
|
+
FEEDBACK_SCHEMA_GAME_ERROR_CODES.length
|
|
1197
|
+
)
|
|
1198
|
+
});
|
|
1199
|
+
var canonicalGameDiagnosticsField = discriminatedUnionField(
|
|
1200
|
+
"Canonical `FeedbackGameDiagnostics`; its surface must equal the containing bug packet surface and it cannot express pixels, DOM, text, URLs, filenames, coordinates, or adapter fingerprints.",
|
|
1201
|
+
"surfaceId",
|
|
1202
|
+
[
|
|
1203
|
+
canonicalGameDiagnosticsVariantField(
|
|
1204
|
+
"site.generator",
|
|
1205
|
+
"generator.renderer-diagnostics.v1"
|
|
1206
|
+
),
|
|
1207
|
+
canonicalGameDiagnosticsVariantField(
|
|
1208
|
+
"site.gpu-demo",
|
|
1209
|
+
"gpu-demo.renderer-diagnostics.v1"
|
|
1210
|
+
)
|
|
1211
|
+
],
|
|
1212
|
+
{ required: false }
|
|
1213
|
+
);
|
|
1214
|
+
var canonicalBugPacketField = feedbackClosedObjectField(
|
|
1215
|
+
"Canonical identifier-free immutable `FeedbackBugPacket`.",
|
|
1216
|
+
{
|
|
1217
|
+
...canonicalSchemaIdentityFields("feedback-bug-packet"),
|
|
1218
|
+
packetId: canonicalUuidV4Field("Opaque canonical packet UUIDv4."),
|
|
1219
|
+
acceptedAt: canonicalDateTimeField("Server-owned packet acceptance time."),
|
|
1220
|
+
surfaceId: stringField("Canonical capability-projected surface identifier.", {
|
|
1221
|
+
enum: [...FEEDBACK_SCHEMA_SURFACE_IDS]
|
|
1222
|
+
}),
|
|
1223
|
+
issueType: stringField("Canonical persistable issue type.", {
|
|
1224
|
+
enum: [...FEEDBACK_SCHEMA_PERSISTABLE_ISSUE_TYPES]
|
|
1225
|
+
}),
|
|
1226
|
+
severity: integerField("Canonical bug severity.", {
|
|
1227
|
+
minimum: 1,
|
|
1228
|
+
maximum: 5
|
|
1229
|
+
}),
|
|
1230
|
+
releaseId: canonicalSafeIdField("Server-owned release identifier."),
|
|
1231
|
+
buildId: canonicalSafeIdField("Server-owned build identifier."),
|
|
1232
|
+
analysis: canonicalAnalysisProjectionField,
|
|
1233
|
+
gameDiagnostics: canonicalGameDiagnosticsField
|
|
1234
|
+
}
|
|
1235
|
+
);
|
|
1236
|
+
var canonicalReviewPacketField = feedbackClosedObjectField(
|
|
1237
|
+
"Canonical identifier-free immutable `FeedbackReviewPacket`.",
|
|
1238
|
+
{
|
|
1239
|
+
...canonicalSchemaIdentityFields("feedback-review-packet"),
|
|
1240
|
+
packetId: canonicalUuidV4Field("Opaque canonical packet UUIDv4."),
|
|
1241
|
+
acceptedAt: canonicalDateTimeField("Server-owned packet acceptance time."),
|
|
1242
|
+
satisfaction: integerField("Canonical satisfaction rating.", {
|
|
1243
|
+
minimum: 1,
|
|
1244
|
+
maximum: 5
|
|
1245
|
+
}),
|
|
1246
|
+
analysis: canonicalAnalysisProjectionField
|
|
1247
|
+
}
|
|
1248
|
+
);
|
|
1249
|
+
var canonicalFeedbackPacketField = discriminatedUnionField(
|
|
1250
|
+
"Canonical bug/review packet discriminated by exact schema identity.",
|
|
1251
|
+
"type",
|
|
1252
|
+
[canonicalBugPacketField, canonicalReviewPacketField]
|
|
1253
|
+
);
|
|
1254
|
+
var canonicalDistributionField = (description, idField, maximum) => arrayOfField(
|
|
1255
|
+
`${description} Bucket identifiers are unique as required by the canonical schema.`,
|
|
1256
|
+
"FeedbackCountBucket",
|
|
1257
|
+
feedbackClosedObjectField("Canonical count bucket.", {
|
|
1258
|
+
id: idField,
|
|
1259
|
+
count: canonicalCountField("Canonical non-negative bucket count.")
|
|
1260
|
+
}),
|
|
1261
|
+
{ maxItems: maximum }
|
|
1262
|
+
);
|
|
1263
|
+
var canonicalAdvisoryField = feedbackClosedObjectField(
|
|
1264
|
+
"Canonical deterministic feedback advisory.",
|
|
1265
|
+
{
|
|
1266
|
+
code: stringField("Closed canonical advisory code.", {
|
|
1267
|
+
enum: [...FEEDBACK_SCHEMA_ADVISORY_CODES]
|
|
1268
|
+
}),
|
|
1269
|
+
level: stringField("Canonical advisory level.", {
|
|
1270
|
+
enum: ["advisory", "critical"]
|
|
1271
|
+
}),
|
|
1272
|
+
triggerCount: canonicalCountField("Positive deterministic trigger count.", {
|
|
1273
|
+
minimum: 1
|
|
1274
|
+
}),
|
|
1275
|
+
recommendationIds: canonicalStringArrayField(
|
|
1276
|
+
"One to eight deterministic recommendation identifiers.",
|
|
1277
|
+
FEEDBACK_SCHEMA_RECOMMENDATION_IDS,
|
|
1278
|
+
8,
|
|
1279
|
+
{ minItems: 1 }
|
|
1280
|
+
)
|
|
1281
|
+
}
|
|
1282
|
+
);
|
|
1283
|
+
var canonicalAdvisoriesField = arrayOfField(
|
|
1284
|
+
"Canonical deterministic advisories.",
|
|
1285
|
+
"FeedbackAdvisory",
|
|
1286
|
+
canonicalAdvisoryField,
|
|
1287
|
+
{ maxItems: 32 }
|
|
1288
|
+
);
|
|
1289
|
+
var canonicalHourlyBugReportField = feedbackClosedObjectField(
|
|
1290
|
+
"Canonical materialised `FeedbackHourlyBugReport`.",
|
|
1291
|
+
{
|
|
1292
|
+
...canonicalSchemaIdentityFields("feedback-hourly-bug-report"),
|
|
1293
|
+
reportId: canonicalUuidV4Field("Opaque canonical report UUIDv4."),
|
|
1294
|
+
windowStart: canonicalDateTimeField("Inclusive aligned UTC hour boundary."),
|
|
1295
|
+
windowEnd: canonicalDateTimeField("Exclusive aligned UTC hour boundary."),
|
|
1296
|
+
revision: integerField("Positive canonical materialisation revision.", {
|
|
1297
|
+
minimum: 1,
|
|
1298
|
+
maximum: 1e6
|
|
1299
|
+
}),
|
|
1300
|
+
generatedAt: canonicalDateTimeField("Canonical materialisation time."),
|
|
1301
|
+
acceptedCount: canonicalCountField("Accepted bug-packet count."),
|
|
1302
|
+
rejectedCount: canonicalCountField("Rejected bug-submission count."),
|
|
1303
|
+
diagnosticsAttachedCount: canonicalCountField(
|
|
1304
|
+
"Accepted packets carrying canonical game diagnostics."
|
|
1305
|
+
),
|
|
1306
|
+
deterministicRedactionCount: canonicalCountField(
|
|
1307
|
+
"Total browser deterministic redactions."
|
|
1308
|
+
),
|
|
1309
|
+
scannerRedactionCount: canonicalCountField(
|
|
1310
|
+
"Total private-scanner redactions."
|
|
1311
|
+
),
|
|
1312
|
+
processorLagSeconds: canonicalCountField(
|
|
1313
|
+
"Exact materialisation lag from `windowEnd`."
|
|
1314
|
+
),
|
|
1315
|
+
rates: feedbackClosedObjectField("Canonical rejection and redaction rates.", {
|
|
1316
|
+
rejectionRate: numberField("Rejected share of submitted records.", {
|
|
1317
|
+
minimum: 0,
|
|
1318
|
+
maximum: 1
|
|
1319
|
+
}),
|
|
1320
|
+
deterministicRedactionsPerAccepted: numberField(
|
|
1321
|
+
"Deterministic redactions per accepted packet.",
|
|
1322
|
+
{ minimum: 0, maximum: 4e3 }
|
|
1323
|
+
),
|
|
1324
|
+
scannerRedactionsPerAccepted: numberField(
|
|
1325
|
+
"Scanner redactions per accepted packet.",
|
|
1326
|
+
{ minimum: 0, maximum: 4e3 }
|
|
1327
|
+
)
|
|
1328
|
+
}),
|
|
1329
|
+
traffic: feedbackClosedObjectField("Safe precomputed traffic denominator.", {
|
|
1330
|
+
denominator: canonicalCountField("Safe traffic denominator."),
|
|
1331
|
+
acceptedPerTenThousand: numberField(
|
|
1332
|
+
"Accepted bugs per ten thousand traffic units when denominator is non-zero.",
|
|
1333
|
+
{
|
|
1334
|
+
required: false,
|
|
1335
|
+
minimum: 0,
|
|
1336
|
+
maximum: FEEDBACK_SCHEMA_MAX_COUNT
|
|
1337
|
+
}
|
|
1338
|
+
)
|
|
1339
|
+
}),
|
|
1340
|
+
targetDistribution: canonicalDistributionField(
|
|
1341
|
+
"Counts by canonical feedback surface.",
|
|
1342
|
+
stringField("Canonical surface identifier.", {
|
|
1343
|
+
enum: [...FEEDBACK_SCHEMA_SURFACE_IDS]
|
|
1344
|
+
}),
|
|
1345
|
+
256
|
|
1346
|
+
),
|
|
1347
|
+
issueTypeDistribution: canonicalDistributionField(
|
|
1348
|
+
"Counts by canonical persistable issue type.",
|
|
1349
|
+
stringField("Canonical persistable issue type.", {
|
|
1350
|
+
enum: [...FEEDBACK_SCHEMA_PERSISTABLE_ISSUE_TYPES]
|
|
1351
|
+
}),
|
|
1352
|
+
9
|
|
1353
|
+
),
|
|
1354
|
+
severityDistribution: canonicalDistributionField(
|
|
1355
|
+
"Counts by canonical severity identifier.",
|
|
1356
|
+
stringField("Canonical severity identifier.", {
|
|
1357
|
+
enum: ["1", "2", "3", "4", "5"]
|
|
1358
|
+
}),
|
|
1359
|
+
5
|
|
1360
|
+
),
|
|
1361
|
+
intentDistribution: canonicalDistributionField(
|
|
1362
|
+
"Counts by canonical derived intent.",
|
|
1363
|
+
stringField("Canonical intent identifier.", {
|
|
1364
|
+
enum: [...FEEDBACK_SCHEMA_INTENT_IDS]
|
|
1365
|
+
}),
|
|
1366
|
+
FEEDBACK_SCHEMA_INTENT_IDS.length
|
|
1367
|
+
),
|
|
1368
|
+
buildDistribution: canonicalDistributionField(
|
|
1369
|
+
"Counts by server-owned build identifier.",
|
|
1370
|
+
canonicalSafeIdField("Server-owned build identifier."),
|
|
1371
|
+
128
|
|
1372
|
+
),
|
|
1373
|
+
rendererDistribution: canonicalDistributionField(
|
|
1374
|
+
"Counts by canonical renderer bucket.",
|
|
1375
|
+
stringField("Canonical renderer bucket.", {
|
|
1376
|
+
enum: [...FEEDBACK_SCHEMA_RENDERER_BUCKETS]
|
|
1377
|
+
}),
|
|
1378
|
+
FEEDBACK_SCHEMA_RENDERER_BUCKETS.length
|
|
1379
|
+
),
|
|
1380
|
+
backendDistribution: canonicalDistributionField(
|
|
1381
|
+
"Counts by canonical execution-backend bucket.",
|
|
1382
|
+
stringField("Canonical backend bucket.", {
|
|
1383
|
+
enum: [...FEEDBACK_SCHEMA_BACKEND_BUCKETS]
|
|
1384
|
+
}),
|
|
1385
|
+
FEEDBACK_SCHEMA_BACKEND_BUCKETS.length
|
|
1386
|
+
),
|
|
1387
|
+
viewportDistribution: canonicalDistributionField(
|
|
1388
|
+
"Counts by canonical viewport bucket.",
|
|
1389
|
+
stringField("Canonical viewport bucket.", {
|
|
1390
|
+
enum: [...FEEDBACK_SCHEMA_VIEWPORT_BUCKETS]
|
|
1391
|
+
}),
|
|
1392
|
+
FEEDBACK_SCHEMA_VIEWPORT_BUCKETS.length
|
|
1393
|
+
),
|
|
1394
|
+
frameRateDistribution: canonicalDistributionField(
|
|
1395
|
+
"Counts by canonical frame-rate bucket.",
|
|
1396
|
+
stringField("Canonical frame-rate bucket.", {
|
|
1397
|
+
enum: [...FEEDBACK_SCHEMA_FRAME_RATE_BUCKETS]
|
|
1398
|
+
}),
|
|
1399
|
+
FEEDBACK_SCHEMA_FRAME_RATE_BUCKETS.length
|
|
1400
|
+
),
|
|
1401
|
+
frameTimeDistribution: canonicalDistributionField(
|
|
1402
|
+
"Counts by canonical frame-time bucket.",
|
|
1403
|
+
stringField("Canonical frame-time bucket.", {
|
|
1404
|
+
enum: [...FEEDBACK_SCHEMA_FRAME_TIME_BUCKETS]
|
|
1405
|
+
}),
|
|
1406
|
+
FEEDBACK_SCHEMA_FRAME_TIME_BUCKETS.length
|
|
1407
|
+
),
|
|
1408
|
+
diagnosticFeatureDistribution: canonicalDistributionField(
|
|
1409
|
+
"Counts by canonical renderer feature identifier.",
|
|
1410
|
+
stringField("Canonical renderer feature identifier.", {
|
|
1411
|
+
enum: [...FEEDBACK_SCHEMA_GAME_FEATURE_IDS]
|
|
1412
|
+
}),
|
|
1413
|
+
FEEDBACK_SCHEMA_GAME_FEATURE_IDS.length
|
|
1414
|
+
),
|
|
1415
|
+
diagnosticCounterDistribution: canonicalDistributionField(
|
|
1416
|
+
"Summed canonical renderer counters.",
|
|
1417
|
+
stringField("Canonical renderer counter code.", {
|
|
1418
|
+
enum: [...FEEDBACK_SCHEMA_GAME_COUNTER_CODES]
|
|
1419
|
+
}),
|
|
1420
|
+
FEEDBACK_SCHEMA_GAME_COUNTER_CODES.length
|
|
1421
|
+
),
|
|
1422
|
+
diagnosticErrorDistribution: canonicalDistributionField(
|
|
1423
|
+
"Counts by canonical renderer error code.",
|
|
1424
|
+
stringField("Canonical renderer error code.", {
|
|
1425
|
+
enum: [...FEEDBACK_SCHEMA_GAME_ERROR_CODES]
|
|
1426
|
+
}),
|
|
1427
|
+
FEEDBACK_SCHEMA_GAME_ERROR_CODES.length
|
|
1428
|
+
),
|
|
1429
|
+
abuseBlockBands: canonicalDistributionField(
|
|
1430
|
+
"Counts by canonical abuse-block band.",
|
|
1431
|
+
stringField("Canonical abuse-block band.", {
|
|
1432
|
+
enum: [...FEEDBACK_SCHEMA_ABUSE_BLOCK_BANDS]
|
|
1433
|
+
}),
|
|
1434
|
+
16
|
|
1435
|
+
),
|
|
1436
|
+
comparison: feedbackClosedObjectField("Canonical prior-period comparison.", {
|
|
1437
|
+
previousHourRatio: numberField("Ratio to the previous UTC hour.", {
|
|
1438
|
+
minimum: 0,
|
|
1439
|
+
maximum: 1e3
|
|
1440
|
+
}),
|
|
1441
|
+
sevenDaySameHourRatio: numberField(
|
|
1442
|
+
"Ratio to the seven-day same-hour baseline.",
|
|
1443
|
+
{ minimum: 0, maximum: 1e3 }
|
|
1444
|
+
)
|
|
1445
|
+
}),
|
|
1446
|
+
advisories: canonicalAdvisoriesField
|
|
1447
|
+
}
|
|
1448
|
+
);
|
|
1449
|
+
var canonicalDailySatisfactionReportField = feedbackClosedObjectField(
|
|
1450
|
+
"Canonical materialised `FeedbackDailySatisfactionReport`.",
|
|
1451
|
+
{
|
|
1452
|
+
...canonicalSchemaIdentityFields("feedback-daily-satisfaction-report"),
|
|
1453
|
+
reportId: canonicalUuidV4Field("Opaque canonical report UUIDv4."),
|
|
1454
|
+
windowStart: canonicalDateTimeField("Inclusive aligned UTC day boundary."),
|
|
1455
|
+
windowEnd: canonicalDateTimeField("Exclusive aligned UTC day boundary."),
|
|
1456
|
+
revision: integerField("Positive canonical materialisation revision.", {
|
|
1457
|
+
minimum: 1,
|
|
1458
|
+
maximum: 1e6
|
|
1459
|
+
}),
|
|
1460
|
+
generatedAt: canonicalDateTimeField("Canonical materialisation time."),
|
|
1461
|
+
processorLagSeconds: canonicalCountField(
|
|
1462
|
+
"Exact materialisation lag from `windowEnd`."
|
|
1463
|
+
),
|
|
1464
|
+
acceptedReviewCount: canonicalCountField("Accepted review-packet count."),
|
|
1465
|
+
meanStars: numberField(
|
|
1466
|
+
"Mean stars; absent exactly when `acceptedReviewCount` is zero.",
|
|
1467
|
+
{ required: false, minimum: 1, maximum: 5 }
|
|
1468
|
+
),
|
|
1469
|
+
medianStars: numberField(
|
|
1470
|
+
"Median stars; absent exactly when `acceptedReviewCount` is zero.",
|
|
1471
|
+
{ required: false, minimum: 1, maximum: 5 }
|
|
1472
|
+
),
|
|
1473
|
+
starDistribution: canonicalDistributionField(
|
|
1474
|
+
"Counts by canonical star identifier.",
|
|
1475
|
+
stringField("Canonical star identifier.", {
|
|
1476
|
+
enum: ["1", "2", "3", "4", "5"]
|
|
1477
|
+
}),
|
|
1478
|
+
5
|
|
1479
|
+
),
|
|
1480
|
+
sentimentDistribution: canonicalDistributionField(
|
|
1481
|
+
"Counts by canonical sentiment bucket.",
|
|
1482
|
+
stringField("Canonical sentiment bucket.", {
|
|
1483
|
+
enum: [...FEEDBACK_SCHEMA_SENTIMENT_BUCKETS]
|
|
1484
|
+
}),
|
|
1485
|
+
FEEDBACK_SCHEMA_SENTIMENT_BUCKETS.length
|
|
1486
|
+
),
|
|
1487
|
+
intentDistribution: canonicalDistributionField(
|
|
1488
|
+
"Counts by canonical derived intent.",
|
|
1489
|
+
stringField("Canonical intent identifier.", {
|
|
1490
|
+
enum: [...FEEDBACK_SCHEMA_INTENT_IDS]
|
|
1491
|
+
}),
|
|
1492
|
+
FEEDBACK_SCHEMA_INTENT_IDS.length
|
|
1493
|
+
),
|
|
1494
|
+
rollingWindows: arrayOfField(
|
|
1495
|
+
"Exactly one canonical 7-, 30-, and 90-day rolling window.",
|
|
1496
|
+
"FeedbackRollingSatisfaction",
|
|
1497
|
+
feedbackClosedObjectField("Canonical rolling satisfaction window.", {
|
|
1498
|
+
period: stringField("Canonical rolling period.", {
|
|
1499
|
+
enum: ["7-days", "30-days", "90-days"]
|
|
1500
|
+
}),
|
|
1501
|
+
reviewCount: canonicalCountField("Accepted reviews in the period."),
|
|
1502
|
+
meanStars: numberField(
|
|
1503
|
+
"Mean stars; absent exactly when `reviewCount` is zero.",
|
|
1504
|
+
{ required: false, minimum: 1, maximum: 5 }
|
|
1505
|
+
)
|
|
1506
|
+
}),
|
|
1507
|
+
{ minItems: 3, maxItems: 3 }
|
|
1508
|
+
),
|
|
1509
|
+
previousPeriodDeltaStars: numberField(
|
|
1510
|
+
"Seven-day mean-star delta from the preceding seven-day period.",
|
|
1511
|
+
{ required: false, minimum: -4, maximum: 4 }
|
|
1512
|
+
),
|
|
1513
|
+
advisories: canonicalAdvisoriesField
|
|
1514
|
+
}
|
|
1515
|
+
);
|
|
1516
|
+
var canonicalProcessorCheckpointVariantField = (processor) => feedbackClosedObjectField("Canonical replay-safe processor checkpoint.", {
|
|
1517
|
+
...canonicalSchemaIdentityFields("feedback-processor-checkpoint"),
|
|
1518
|
+
checkpointId: canonicalSafeIdField(
|
|
1519
|
+
"Canonical checkpoint identifier.",
|
|
1520
|
+
160
|
|
1521
|
+
),
|
|
1522
|
+
processor: canonicalLiteralStringField(
|
|
1523
|
+
"Canonical feedback processor.",
|
|
1524
|
+
processor
|
|
1525
|
+
),
|
|
1526
|
+
windowKey: canonicalSafeIdField("Canonical processor window key.", 160),
|
|
1527
|
+
revision: integerField("Positive canonical processor revision.", {
|
|
1528
|
+
minimum: 1,
|
|
1529
|
+
maximum: 1e6
|
|
1530
|
+
}),
|
|
1531
|
+
completedAt: canonicalDateTimeField("Canonical completion time."),
|
|
1532
|
+
...processor === "commit-reconciliation" ? {} : {
|
|
1533
|
+
reportId: canonicalUuidV4Field(
|
|
1534
|
+
"Opaque UUIDv4 of the materialised report."
|
|
1535
|
+
)
|
|
1536
|
+
}
|
|
1537
|
+
});
|
|
1538
|
+
var canonicalProcessorCheckpointField = discriminatedUnionField(
|
|
1539
|
+
"Canonical `FeedbackProcessorCheckpoint`.",
|
|
1540
|
+
"processor",
|
|
1541
|
+
MCP_ADMIN_FEEDBACK_PROCESSORS.map(canonicalProcessorCheckpointVariantField)
|
|
1542
|
+
);
|
|
1543
|
+
var feedbackCanonicalReportListMetadataField = (allowedWindows, maximumReports) => feedbackClosedObjectField("Bounded report-list response metadata.", {
|
|
1544
|
+
window: stringField("Closed server-owned lookback selector.", {
|
|
1545
|
+
enum: [...allowedWindows]
|
|
1546
|
+
}),
|
|
1547
|
+
windowStart: canonicalDateTimeField("Inclusive returned range boundary."),
|
|
1548
|
+
windowEnd: canonicalDateTimeField("Exclusive returned range boundary."),
|
|
1549
|
+
generatedAt: canonicalDateTimeField("Response projection time."),
|
|
1550
|
+
returnedCount: canonicalCountField("Reports returned.", {
|
|
1551
|
+
maximum: maximumReports
|
|
1552
|
+
})
|
|
1553
|
+
});
|
|
1554
|
+
var canonicalAlertProjectionField = feedbackClosedObjectField(
|
|
1555
|
+
"Bounded projection of an advisory from one canonical report.",
|
|
1556
|
+
{
|
|
1557
|
+
reportId: canonicalUuidV4Field("Canonical source report UUIDv4."),
|
|
1558
|
+
reportType: stringField("Canonical source report identity.", {
|
|
1559
|
+
enum: [...MCP_ADMIN_FEEDBACK_REPORT_TYPES]
|
|
1560
|
+
}),
|
|
1561
|
+
windowStart: canonicalDateTimeField("Canonical report window start."),
|
|
1562
|
+
windowEnd: canonicalDateTimeField("Canonical report window end."),
|
|
1563
|
+
advisory: canonicalAdvisoryField
|
|
1564
|
+
}
|
|
1565
|
+
);
|
|
1566
|
+
var canonicalFreshnessProjectionField = feedbackClosedObjectField(
|
|
1567
|
+
"Freshness derived from one canonical processor checkpoint.",
|
|
1568
|
+
{
|
|
1569
|
+
checkpoint: canonicalProcessorCheckpointField,
|
|
1570
|
+
freshness: stringField("Closed derived freshness state.", {
|
|
1571
|
+
enum: ["fresh", "stale"]
|
|
1572
|
+
}),
|
|
1573
|
+
lagSeconds: canonicalCountField(
|
|
1574
|
+
"Whole seconds from checkpoint completion to `checkedAt`."
|
|
1575
|
+
)
|
|
1576
|
+
}
|
|
1577
|
+
);
|
|
1578
|
+
var feedbackStructuredEntryCommonFilterFields = () => ({
|
|
1579
|
+
window: stringField("Closed server-owned entry lookback.", {
|
|
1580
|
+
required: true,
|
|
1581
|
+
enum: [...MCP_ADMIN_FEEDBACK_ENTRY_WINDOWS]
|
|
1582
|
+
}),
|
|
1583
|
+
limit: integerField("Maximum structured entries returned.", {
|
|
1584
|
+
required: false,
|
|
1585
|
+
minimum: 1,
|
|
1586
|
+
maximum: MCP_ADMIN_FEEDBACK_MAX_PAGE_SIZE
|
|
1587
|
+
}),
|
|
1588
|
+
cursor: stringField("Opaque server-issued continuation cursor.", {
|
|
1589
|
+
required: false,
|
|
1590
|
+
minLength: 1,
|
|
1591
|
+
maxLength: MCP_ADMIN_FEEDBACK_MAX_CURSOR_LENGTH,
|
|
1592
|
+
pattern: "^[A-Za-z0-9_-]+$"
|
|
1593
|
+
})
|
|
1594
|
+
});
|
|
1595
|
+
var feedbackStructuredEntryFiltersField = discriminatedUnionField(
|
|
1596
|
+
"Exact bounded structured-entry filters. The selected `packetType` variant is closed so bug-only and review-only filters cannot be combined.",
|
|
1597
|
+
"packetType",
|
|
1598
|
+
[
|
|
1599
|
+
feedbackClosedObjectField(
|
|
1600
|
+
"Filters for canonical bug packets only.",
|
|
1601
|
+
{
|
|
1602
|
+
packetType: canonicalLiteralStringField(
|
|
1603
|
+
"Canonical bug-packet identity.",
|
|
1604
|
+
MCP_ADMIN_FEEDBACK_PACKET_TYPES[0]
|
|
1605
|
+
),
|
|
1606
|
+
...feedbackStructuredEntryCommonFilterFields(),
|
|
1607
|
+
surfaceId: stringField(
|
|
1608
|
+
"Optional exact allowlisted bug-surface identifier.",
|
|
1609
|
+
{
|
|
1610
|
+
required: false,
|
|
1611
|
+
enum: [...FEEDBACK_SCHEMA_SURFACE_IDS]
|
|
1612
|
+
}
|
|
1613
|
+
),
|
|
1614
|
+
buildId: stringField(
|
|
1615
|
+
"Optional exact server-owned bug build identifier.",
|
|
1616
|
+
{
|
|
1617
|
+
required: false,
|
|
1618
|
+
maxLength: 128,
|
|
1619
|
+
pattern: "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$"
|
|
1620
|
+
}
|
|
1621
|
+
),
|
|
1622
|
+
severity: integerField("Optional exact bug severity.", {
|
|
1623
|
+
required: false,
|
|
1624
|
+
minimum: 1,
|
|
1625
|
+
maximum: 5
|
|
1626
|
+
})
|
|
1627
|
+
},
|
|
1628
|
+
{ additionalProperties: false }
|
|
1629
|
+
),
|
|
1630
|
+
feedbackClosedObjectField(
|
|
1631
|
+
"Filters for canonical review packets only.",
|
|
1632
|
+
{
|
|
1633
|
+
packetType: canonicalLiteralStringField(
|
|
1634
|
+
"Canonical review-packet identity.",
|
|
1635
|
+
MCP_ADMIN_FEEDBACK_PACKET_TYPES[1]
|
|
1636
|
+
),
|
|
1637
|
+
...feedbackStructuredEntryCommonFilterFields(),
|
|
1638
|
+
satisfaction: integerField("Optional exact satisfaction score.", {
|
|
1639
|
+
required: false,
|
|
1640
|
+
minimum: 1,
|
|
1641
|
+
maximum: 5
|
|
1642
|
+
})
|
|
1643
|
+
},
|
|
1644
|
+
{ additionalProperties: false }
|
|
1645
|
+
)
|
|
1646
|
+
],
|
|
1647
|
+
{ required: true }
|
|
1648
|
+
);
|
|
1649
|
+
function deepFreeze(value) {
|
|
1650
|
+
if (value === null || typeof value !== "object" && typeof value !== "function") {
|
|
1651
|
+
return value;
|
|
1652
|
+
}
|
|
1653
|
+
for (const propertyValue of Object.values(value)) {
|
|
1654
|
+
deepFreeze(propertyValue);
|
|
1655
|
+
}
|
|
1656
|
+
return Object.freeze(value);
|
|
1657
|
+
}
|
|
1658
|
+
var feedbackDescriptorMetadata = {
|
|
1659
|
+
domain: "feedback",
|
|
1660
|
+
rolloutFlag: MCP_ADMIN_FEEDBACK_FLAG_ID,
|
|
1661
|
+
requiredCapability: MCP_ADMIN_FEEDBACK_READ_CAPABILITY,
|
|
1662
|
+
oauthScopes: [...MCP_ADMIN_FEEDBACK_REQUIRED_OAUTH_SCOPES],
|
|
1663
|
+
privacy: MCP_ADMIN_FEEDBACK_PRIVACY_METADATA,
|
|
1664
|
+
access: feedbackReadAccess,
|
|
1665
|
+
availability: "near-future"
|
|
1666
|
+
};
|
|
1667
|
+
var MCP_ADMIN_FEEDBACK_ACTIONS = deepFreeze([
|
|
1668
|
+
{
|
|
1669
|
+
name: "getFeedbackBugHealth",
|
|
1670
|
+
...translatedDescription(
|
|
1671
|
+
mcpAdminContractDescriptionKeys.actionGetFeedbackBugHealth
|
|
1672
|
+
),
|
|
1673
|
+
...feedbackDescriptorMetadata,
|
|
1674
|
+
schemaSource: feedbackSchemaSource("FeedbackHourlyBugReportSchema"),
|
|
1675
|
+
execution: {
|
|
1676
|
+
method: "GET",
|
|
1677
|
+
path: "/api/admin/feedback/bug-health",
|
|
1678
|
+
source: "near-future-route",
|
|
1679
|
+
notes: [
|
|
1680
|
+
"Reads immutable hourly materialisations only; it does not scan packets or Blob Storage on request.",
|
|
1681
|
+
"Returns identifier-free structured distributions, fixed advisories, and deterministic recommendation identifiers only."
|
|
1682
|
+
]
|
|
1683
|
+
},
|
|
1684
|
+
input: {
|
|
1685
|
+
window: stringField("Closed server-owned bug-health report window.", {
|
|
1686
|
+
required: true,
|
|
1687
|
+
enum: [...MCP_ADMIN_FEEDBACK_BUG_HEALTH_WINDOWS]
|
|
1688
|
+
})
|
|
1689
|
+
},
|
|
1690
|
+
output: {
|
|
1691
|
+
metadata: feedbackCanonicalReportListMetadataField(
|
|
1692
|
+
MCP_ADMIN_FEEDBACK_BUG_HEALTH_WINDOWS,
|
|
1693
|
+
168
|
|
1694
|
+
),
|
|
1695
|
+
reports: arrayOfField(
|
|
1696
|
+
"At most 168 canonical immutable hourly bug-health reports.",
|
|
1697
|
+
"FeedbackHourlyBugReport",
|
|
1698
|
+
canonicalHourlyBugReportField,
|
|
1699
|
+
{ maxItems: 168 }
|
|
1700
|
+
)
|
|
1701
|
+
}
|
|
1702
|
+
},
|
|
1703
|
+
{
|
|
1704
|
+
name: "getFeedbackSatisfaction",
|
|
1705
|
+
...translatedDescription(
|
|
1706
|
+
mcpAdminContractDescriptionKeys.actionGetFeedbackSatisfaction
|
|
1707
|
+
),
|
|
1708
|
+
...feedbackDescriptorMetadata,
|
|
1709
|
+
schemaSource: feedbackSchemaSource(
|
|
1710
|
+
"FeedbackDailySatisfactionReportSchema"
|
|
1711
|
+
),
|
|
1712
|
+
execution: {
|
|
1713
|
+
method: "GET",
|
|
1714
|
+
path: "/api/admin/feedback/satisfaction",
|
|
1715
|
+
source: "near-future-route",
|
|
1716
|
+
notes: [
|
|
1717
|
+
"Reads immutable daily materialisations only; it does not calculate from raw review packets on request.",
|
|
1718
|
+
"Returns star statistics and closed derived classifications without narrative or reporter correlation."
|
|
1719
|
+
]
|
|
1720
|
+
},
|
|
1721
|
+
input: {
|
|
1722
|
+
window: stringField("Closed server-owned satisfaction report window.", {
|
|
1723
|
+
required: true,
|
|
1724
|
+
enum: [...MCP_ADMIN_FEEDBACK_SATISFACTION_WINDOWS]
|
|
1725
|
+
})
|
|
1726
|
+
},
|
|
1727
|
+
output: {
|
|
1728
|
+
metadata: feedbackCanonicalReportListMetadataField(
|
|
1729
|
+
MCP_ADMIN_FEEDBACK_SATISFACTION_WINDOWS,
|
|
1730
|
+
90
|
|
1731
|
+
),
|
|
1732
|
+
reports: arrayOfField(
|
|
1733
|
+
"At most 90 canonical immutable daily satisfaction reports.",
|
|
1734
|
+
"FeedbackDailySatisfactionReport",
|
|
1735
|
+
canonicalDailySatisfactionReportField,
|
|
1736
|
+
{ maxItems: 90 }
|
|
1737
|
+
)
|
|
1738
|
+
}
|
|
1739
|
+
},
|
|
1740
|
+
{
|
|
1741
|
+
name: "listFeedbackAlerts",
|
|
1742
|
+
...translatedDescription(
|
|
1743
|
+
mcpAdminContractDescriptionKeys.actionListFeedbackAlerts
|
|
1744
|
+
),
|
|
1745
|
+
...feedbackDescriptorMetadata,
|
|
1746
|
+
schemaSource: feedbackSchemaSource(
|
|
1747
|
+
"FeedbackHourlyBugReportSchema",
|
|
1748
|
+
"FeedbackDailySatisfactionReportSchema"
|
|
1749
|
+
),
|
|
1750
|
+
execution: {
|
|
1751
|
+
method: "GET",
|
|
1752
|
+
path: "/api/admin/feedback/alerts",
|
|
1753
|
+
source: "near-future-route",
|
|
1754
|
+
notes: [
|
|
1755
|
+
"Reads deterministic advisories only; no generated summaries, operator notes, or mutation controls are exposed.",
|
|
1756
|
+
"Pagination is server-cursor based and capped at 100 advisories per call."
|
|
1757
|
+
]
|
|
1758
|
+
},
|
|
1759
|
+
input: {
|
|
1760
|
+
window: stringField("Closed server-owned advisory lookback.", {
|
|
1761
|
+
required: true,
|
|
1762
|
+
enum: [...MCP_ADMIN_FEEDBACK_ALERT_WINDOWS]
|
|
1763
|
+
}),
|
|
1764
|
+
reportType: stringField("Optional canonical source-report identity.", {
|
|
1765
|
+
required: false,
|
|
1766
|
+
enum: [...MCP_ADMIN_FEEDBACK_REPORT_TYPES]
|
|
1767
|
+
}),
|
|
1768
|
+
limit: integerField("Maximum advisories returned.", {
|
|
1769
|
+
required: false,
|
|
1770
|
+
minimum: 1,
|
|
1771
|
+
maximum: MCP_ADMIN_FEEDBACK_MAX_PAGE_SIZE
|
|
1772
|
+
}),
|
|
1773
|
+
cursor: stringField("Opaque server-issued continuation cursor.", {
|
|
1774
|
+
required: false,
|
|
1775
|
+
minLength: 1,
|
|
1776
|
+
maxLength: MCP_ADMIN_FEEDBACK_MAX_CURSOR_LENGTH,
|
|
1777
|
+
pattern: "^[A-Za-z0-9_-]+$"
|
|
1778
|
+
})
|
|
1779
|
+
},
|
|
1780
|
+
output: {
|
|
1781
|
+
metadata: feedbackPageMetadataField(MCP_ADMIN_FEEDBACK_ALERT_WINDOWS),
|
|
1782
|
+
items: arrayOfField(
|
|
1783
|
+
"Canonical deterministic advisories with bounded source-report metadata.",
|
|
1784
|
+
"FeedbackAdvisoryProjection",
|
|
1785
|
+
canonicalAlertProjectionField,
|
|
1786
|
+
{ maxItems: MCP_ADMIN_FEEDBACK_MAX_PAGE_SIZE }
|
|
1787
|
+
)
|
|
1788
|
+
}
|
|
1789
|
+
},
|
|
1790
|
+
{
|
|
1791
|
+
name: "getFeedbackFreshness",
|
|
1792
|
+
...translatedDescription(
|
|
1793
|
+
mcpAdminContractDescriptionKeys.actionGetFeedbackFreshness
|
|
1794
|
+
),
|
|
1795
|
+
...feedbackDescriptorMetadata,
|
|
1796
|
+
schemaSource: feedbackSchemaSource(
|
|
1797
|
+
"FeedbackProcessorCheckpointSchema"
|
|
1798
|
+
),
|
|
1799
|
+
execution: {
|
|
1800
|
+
method: "GET",
|
|
1801
|
+
path: "/api/admin/feedback/freshness",
|
|
1802
|
+
source: "near-future-route",
|
|
1803
|
+
notes: [
|
|
1804
|
+
"Returns freshness derived from canonical processor checkpoints only; no logs, exception text, or storage references are exposed."
|
|
1805
|
+
]
|
|
1806
|
+
},
|
|
1807
|
+
input: {
|
|
1808
|
+
processor: stringField("Optional canonical processor filter.", {
|
|
1809
|
+
required: false,
|
|
1810
|
+
enum: [...MCP_ADMIN_FEEDBACK_PROCESSORS]
|
|
1811
|
+
})
|
|
1812
|
+
},
|
|
1813
|
+
output: {
|
|
1814
|
+
checkedAt: canonicalDateTimeField(
|
|
1815
|
+
"UTC time at which processor freshness was read."
|
|
1816
|
+
),
|
|
1817
|
+
processors: arrayOfField(
|
|
1818
|
+
"Freshness derived from canonical feedback processor checkpoints.",
|
|
1819
|
+
"FeedbackProcessorFreshness",
|
|
1820
|
+
canonicalFreshnessProjectionField,
|
|
1821
|
+
{ maxItems: MCP_ADMIN_FEEDBACK_PROCESSORS.length }
|
|
1822
|
+
)
|
|
1823
|
+
}
|
|
1824
|
+
},
|
|
1825
|
+
{
|
|
1826
|
+
name: "listFeedbackStructuredEntries",
|
|
1827
|
+
...translatedDescription(
|
|
1828
|
+
mcpAdminContractDescriptionKeys.actionListFeedbackStructuredEntries
|
|
1829
|
+
),
|
|
1830
|
+
...feedbackDescriptorMetadata,
|
|
1831
|
+
schemaSource: feedbackSchemaSource(
|
|
1832
|
+
"FeedbackBugPacketSchema",
|
|
1833
|
+
"FeedbackReviewPacketSchema"
|
|
1834
|
+
),
|
|
1835
|
+
execution: {
|
|
1836
|
+
method: "GET",
|
|
1837
|
+
path: "/api/admin/feedback/entries",
|
|
1838
|
+
source: "near-future-route",
|
|
1839
|
+
notes: [
|
|
1840
|
+
"Returns schema-validated identifier-free structured entries only; narrative, reporter control state, pixels, URLs, and direct storage references are never available.",
|
|
1841
|
+
"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.",
|
|
1842
|
+
"Only closed window selectors, allowlisted packet-specific filters, opaque cursors, and a maximum page size of 100 are accepted; unrestricted scans are not represented."
|
|
1843
|
+
]
|
|
1844
|
+
},
|
|
1845
|
+
input: {
|
|
1846
|
+
filters: feedbackStructuredEntryFiltersField
|
|
1847
|
+
},
|
|
1848
|
+
output: {
|
|
1849
|
+
metadata: feedbackPageMetadataField(MCP_ADMIN_FEEDBACK_ENTRY_WINDOWS),
|
|
1850
|
+
items: arrayOfField(
|
|
1851
|
+
"Reporter-identifier-free structured feedback entries.",
|
|
1852
|
+
"FeedbackPacket",
|
|
1853
|
+
canonicalFeedbackPacketField,
|
|
1854
|
+
{ maxItems: MCP_ADMIN_FEEDBACK_MAX_PAGE_SIZE }
|
|
1855
|
+
)
|
|
1856
|
+
}
|
|
1857
|
+
}
|
|
1858
|
+
]);
|
|
746
1859
|
var MCP_ADMIN_ACTIONS = [
|
|
747
1860
|
{
|
|
748
1861
|
name: "listFeatureFlags",
|
|
@@ -2423,8 +3536,103 @@ var MCP_ADMIN_ACTIONS = [
|
|
|
2423
3536
|
mcpAdminContractDescriptionKeys.verificationTokenAdjustment
|
|
2424
3537
|
)
|
|
2425
3538
|
}
|
|
2426
|
-
}
|
|
3539
|
+
},
|
|
3540
|
+
...MCP_ADMIN_FEEDBACK_ACTIONS
|
|
2427
3541
|
];
|
|
3542
|
+
var modelDescriptionKeys = {
|
|
3543
|
+
list_model_search_rankers: mcpAdminContractDescriptionKeys.actionListModelSearchRankers,
|
|
3544
|
+
search_model_catalog: mcpAdminContractDescriptionKeys.actionSearchModelCatalog,
|
|
3545
|
+
resolve_model_request: mcpAdminContractDescriptionKeys.actionResolveModelRequest,
|
|
3546
|
+
get_model_resolution: mcpAdminContractDescriptionKeys.actionGetModelResolution,
|
|
3547
|
+
confirm_model_candidate: mcpAdminContractDescriptionKeys.actionConfirmModelCandidate,
|
|
3548
|
+
retry_model_resolution: mcpAdminContractDescriptionKeys.actionRetryModelResolution,
|
|
3549
|
+
cancel_model_resolution: mcpAdminContractDescriptionKeys.actionCancelModelResolution,
|
|
3550
|
+
rebuild_model_catalog_index: mcpAdminContractDescriptionKeys.actionRebuildModelCatalogIndex
|
|
3551
|
+
};
|
|
3552
|
+
var modelVerificationNotes = deepFreeze({
|
|
3553
|
+
list_model_search_rankers: [
|
|
3554
|
+
"Validate the returned ranker list and no-substitution policy against the canonical output schema."
|
|
3555
|
+
],
|
|
3556
|
+
search_model_catalog: [
|
|
3557
|
+
"Validate ranked catalog evidence and any four-view image pack against the canonical structured output schema."
|
|
3558
|
+
],
|
|
3559
|
+
resolve_model_request: [
|
|
3560
|
+
"Use get_model_resolution with the returned resolution identifier to verify durable progress and candidate evidence."
|
|
3561
|
+
],
|
|
3562
|
+
get_model_resolution: [
|
|
3563
|
+
"Validate the owned immutable revision, state, questions, and any four-view image pack against the canonical output schema."
|
|
3564
|
+
],
|
|
3565
|
+
confirm_model_candidate: [
|
|
3566
|
+
"Use get_model_resolution to verify completion and the immutable final asset reference after confirmation."
|
|
3567
|
+
],
|
|
3568
|
+
retry_model_resolution: [
|
|
3569
|
+
"Use get_model_resolution to verify the newly created immutable request revision and excluded candidates."
|
|
3570
|
+
],
|
|
3571
|
+
cancel_model_resolution: [
|
|
3572
|
+
"Use get_model_resolution to verify that unfinished requester-owned work reached the cancelled state."
|
|
3573
|
+
],
|
|
3574
|
+
rebuild_model_catalog_index: [
|
|
3575
|
+
"Validate the idempotent operation identifier and state against the canonical output schema and operator audit record."
|
|
3576
|
+
]
|
|
3577
|
+
});
|
|
3578
|
+
var modelToolExecution = (toolName) => ({
|
|
3579
|
+
protocol: "json-rpc-2.0",
|
|
3580
|
+
method: "POST",
|
|
3581
|
+
path: "/api/mcp",
|
|
3582
|
+
rpcMethod: "tools/call",
|
|
3583
|
+
toolName
|
|
3584
|
+
});
|
|
3585
|
+
var modelToolTranslation = (definition) => {
|
|
3586
|
+
const translation = translatedDescription(modelDescriptionKeys[definition.name]);
|
|
3587
|
+
if (translation.descriptionDefault !== definition.description) {
|
|
3588
|
+
throw new TypeError("Canonical model tool description translation mismatch.");
|
|
3589
|
+
}
|
|
3590
|
+
return translation;
|
|
3591
|
+
};
|
|
3592
|
+
function listMcpModelToolSummaries() {
|
|
3593
|
+
return canonicalModelToolDefinitions.map((definition) => {
|
|
3594
|
+
const { inputSchema: _inputSchema, outputSchema: _outputSchema, ...summary } = definition;
|
|
3595
|
+
return {
|
|
3596
|
+
...summary,
|
|
3597
|
+
...modelToolTranslation(definition),
|
|
3598
|
+
availability: "near-future",
|
|
3599
|
+
execution: modelToolExecution(definition.name),
|
|
3600
|
+
verificationNotes: modelVerificationNotes[definition.name]
|
|
3601
|
+
};
|
|
3602
|
+
});
|
|
3603
|
+
}
|
|
3604
|
+
function listMcpModelResourceTemplates() {
|
|
3605
|
+
return (0, import_asset_mcp.listModelMcpResourceTemplates)();
|
|
3606
|
+
}
|
|
3607
|
+
var buildMcpModelToolSchemaDescriptors = () => Object.fromEntries(
|
|
3608
|
+
canonicalModelToolDefinitions.map((definition) => [
|
|
3609
|
+
definition.name,
|
|
3610
|
+
{
|
|
3611
|
+
...definition,
|
|
3612
|
+
...modelToolTranslation(definition),
|
|
3613
|
+
availability: "near-future",
|
|
3614
|
+
execution: modelToolExecution(definition.name),
|
|
3615
|
+
verificationNotes: modelVerificationNotes[definition.name]
|
|
3616
|
+
}
|
|
3617
|
+
])
|
|
3618
|
+
);
|
|
3619
|
+
var buildMcpModelResolutionContext = () => ({
|
|
3620
|
+
toolContractVersion: import_asset_mcp.MODEL_MCP_CONTRACT_VERSION,
|
|
3621
|
+
sourceOfTruth: import_asset_mcp.ASSET_MCP_PACKAGE,
|
|
3622
|
+
resolutionContractVersion: import_asset_contracts.MODEL_RESOLUTION_CONTRACT_VERSION,
|
|
3623
|
+
endpoint: "/api/mcp",
|
|
3624
|
+
protocol: "json-rpc-2.0",
|
|
3625
|
+
rpcMethod: "tools/call",
|
|
3626
|
+
requiredFeatureFlag: import_asset_mcp.MODEL_MCP_UNIFIED_FEATURE_FLAG_ID,
|
|
3627
|
+
conditionalFeatureFlags: [
|
|
3628
|
+
import_asset_mcp.MODEL_MCP_EXTERNAL_HARVEST_FEATURE_FLAG_ID,
|
|
3629
|
+
import_asset_mcp.MODEL_MCP_GENERATION_FEATURE_FLAG_ID
|
|
3630
|
+
],
|
|
3631
|
+
tools: [...import_asset_mcp.MODEL_MCP_TOOL_NAMES],
|
|
3632
|
+
resourceTemplates: (0, import_asset_mcp.listModelMcpResourceTemplates)().map(
|
|
3633
|
+
({ uriTemplate }) => uriTemplate
|
|
3634
|
+
)
|
|
3635
|
+
});
|
|
2428
3636
|
function listMcpActionSummaries() {
|
|
2429
3637
|
return MCP_ADMIN_ACTIONS.map((action) => ({
|
|
2430
3638
|
name: action.name,
|
|
@@ -2433,6 +3641,9 @@ function listMcpActionSummaries() {
|
|
|
2433
3641
|
descriptionDefault: action.descriptionDefault,
|
|
2434
3642
|
domain: action.domain,
|
|
2435
3643
|
rolloutFlag: action.rolloutFlag,
|
|
3644
|
+
...action.oauthScopes === void 0 ? {} : { oauthScopes: action.oauthScopes },
|
|
3645
|
+
...action.privacy === void 0 ? {} : { privacy: action.privacy },
|
|
3646
|
+
...action.schemaSource === void 0 ? {} : { schemaSource: action.schemaSource },
|
|
2436
3647
|
availability: action.availability,
|
|
2437
3648
|
execution: action.execution,
|
|
2438
3649
|
requiredCapability: action.requiredCapability,
|
|
@@ -2440,7 +3651,7 @@ function listMcpActionSummaries() {
|
|
|
2440
3651
|
access: action.access
|
|
2441
3652
|
}));
|
|
2442
3653
|
}
|
|
2443
|
-
var MCP_ADMIN_CONTEXT_SHAPE = {
|
|
3654
|
+
var MCP_ADMIN_CONTEXT_SHAPE = deepFreeze({
|
|
2444
3655
|
contractVersion: stringField("Versioned discovery contract identifier."),
|
|
2445
3656
|
authenticatedUser: objectField("Authenticated admin session context.", {
|
|
2446
3657
|
id: stringField("Authenticated user identifier."),
|
|
@@ -2466,6 +3677,44 @@ var MCP_ADMIN_CONTEXT_SHAPE = {
|
|
|
2466
3677
|
)
|
|
2467
3678
|
}),
|
|
2468
3679
|
actionFamilies: arrayField("Approved action families grouped by rollout domain.", "McpActionFamily"),
|
|
3680
|
+
modelResolution: objectField(
|
|
3681
|
+
"Canonical model-resolution JSON-RPC discovery metadata.",
|
|
3682
|
+
{
|
|
3683
|
+
toolContractVersion: stringField(
|
|
3684
|
+
"Contract version imported from @plasius/asset-mcp.",
|
|
3685
|
+
{ constValue: import_asset_mcp.MODEL_MCP_CONTRACT_VERSION }
|
|
3686
|
+
),
|
|
3687
|
+
sourceOfTruth: stringField("Package that owns the canonical tool registry.", {
|
|
3688
|
+
constValue: import_asset_mcp.ASSET_MCP_PACKAGE
|
|
3689
|
+
}),
|
|
3690
|
+
resolutionContractVersion: stringField(
|
|
3691
|
+
"Resolution contract version imported from @plasius/asset-contracts.",
|
|
3692
|
+
{ constValue: import_asset_contracts.MODEL_RESOLUTION_CONTRACT_VERSION }
|
|
3693
|
+
),
|
|
3694
|
+
endpoint: stringField("Hosted MCP JSON-RPC endpoint.", {
|
|
3695
|
+
constValue: "/api/mcp"
|
|
3696
|
+
}),
|
|
3697
|
+
protocol: stringField("MCP transport protocol.", {
|
|
3698
|
+
constValue: "json-rpc-2.0"
|
|
3699
|
+
}),
|
|
3700
|
+
rpcMethod: stringField("JSON-RPC method used to execute a named tool.", {
|
|
3701
|
+
constValue: "tools/call"
|
|
3702
|
+
}),
|
|
3703
|
+
requiredFeatureFlag: stringField(
|
|
3704
|
+
"Parent rollout flag required for every model-resolution tool.",
|
|
3705
|
+
{ constValue: import_asset_mcp.MODEL_MCP_UNIFIED_FEATURE_FLAG_ID }
|
|
3706
|
+
),
|
|
3707
|
+
conditionalFeatureFlags: arrayField(
|
|
3708
|
+
"Provider and generator flags evaluated only when their fallback is attempted.",
|
|
3709
|
+
"string"
|
|
3710
|
+
),
|
|
3711
|
+
tools: arrayField("Canonical snake_case model-resolution tool names.", "string"),
|
|
3712
|
+
resourceTemplates: arrayField(
|
|
3713
|
+
"Authenticated canonical mcp://models resource templates.",
|
|
3714
|
+
"string"
|
|
3715
|
+
)
|
|
3716
|
+
}
|
|
3717
|
+
),
|
|
2469
3718
|
extensionRules: objectField("Rules for extending the registry without changing the discovery shape.", {
|
|
2470
3719
|
sourceOfTruth: stringField("Package that owns the approved MCP registry."),
|
|
2471
3720
|
addOnlyWithinV1: booleanField("Whether v1 additions must be additive."),
|
|
@@ -2473,7 +3722,7 @@ var MCP_ADMIN_CONTEXT_SHAPE = {
|
|
|
2473
3722
|
singleResourceMutations: booleanField("Whether mutations must target one resource at a time."),
|
|
2474
3723
|
notes: arrayField("Extension notes for future MCP tool families.", "string")
|
|
2475
3724
|
})
|
|
2476
|
-
};
|
|
3725
|
+
});
|
|
2477
3726
|
var MCP_ADMIN_EXTENSION_RULES = {
|
|
2478
3727
|
sourceOfTruth: MCP_ADMIN_REGISTRY_SOURCE,
|
|
2479
3728
|
addOnlyWithinV1: true,
|
|
@@ -2529,7 +3778,10 @@ function buildMcpDiscoveryResponse() {
|
|
|
2529
3778
|
return {
|
|
2530
3779
|
contractVersion: MCP_ADMIN_CONTRACT_VERSION,
|
|
2531
3780
|
sourceOfTruth: MCP_ADMIN_REGISTRY_SOURCE,
|
|
2532
|
-
actions: listMcpActionSummaries()
|
|
3781
|
+
actions: listMcpActionSummaries(),
|
|
3782
|
+
modelTools: listMcpModelToolSummaries(),
|
|
3783
|
+
modelResources: listMcpModelResourceTemplates(),
|
|
3784
|
+
modelSourceOfTruth: import_asset_mcp.ASSET_MCP_PACKAGE
|
|
2533
3785
|
};
|
|
2534
3786
|
}
|
|
2535
3787
|
function buildMcpSchemaResponse() {
|
|
@@ -2539,6 +3791,9 @@ function buildMcpSchemaResponse() {
|
|
|
2539
3791
|
{
|
|
2540
3792
|
domain: action.domain,
|
|
2541
3793
|
rolloutFlag: action.rolloutFlag,
|
|
3794
|
+
...action.oauthScopes === void 0 ? {} : { oauthScopes: action.oauthScopes },
|
|
3795
|
+
...action.privacy === void 0 ? {} : { privacy: action.privacy },
|
|
3796
|
+
...action.schemaSource === void 0 ? {} : { schemaSource: action.schemaSource },
|
|
2542
3797
|
availability: action.availability,
|
|
2543
3798
|
execution: action.execution,
|
|
2544
3799
|
input: action.input,
|
|
@@ -2555,7 +3810,10 @@ function buildMcpSchemaResponse() {
|
|
|
2555
3810
|
sourceOfTruth: MCP_ADMIN_REGISTRY_SOURCE,
|
|
2556
3811
|
actions,
|
|
2557
3812
|
contextShape: MCP_ADMIN_CONTEXT_SHAPE,
|
|
2558
|
-
extensionRules: MCP_ADMIN_EXTENSION_RULES
|
|
3813
|
+
extensionRules: MCP_ADMIN_EXTENSION_RULES,
|
|
3814
|
+
modelTools: buildMcpModelToolSchemaDescriptors(),
|
|
3815
|
+
modelResources: listMcpModelResourceTemplates(),
|
|
3816
|
+
modelSourceOfTruth: import_asset_mcp.ASSET_MCP_PACKAGE
|
|
2559
3817
|
};
|
|
2560
3818
|
}
|
|
2561
3819
|
function buildMcpContextResponse(options) {
|
|
@@ -2565,7 +3823,8 @@ function buildMcpContextResponse(options) {
|
|
|
2565
3823
|
surface: buildMcpSurfaceUrls(options.origin),
|
|
2566
3824
|
rollout: options.rollout,
|
|
2567
3825
|
actionFamilies: buildMcpActionFamilies(),
|
|
2568
|
-
extensionRules: MCP_ADMIN_EXTENSION_RULES
|
|
3826
|
+
extensionRules: MCP_ADMIN_EXTENSION_RULES,
|
|
3827
|
+
modelResolution: buildMcpModelResolutionContext()
|
|
2569
3828
|
};
|
|
2570
3829
|
}
|
|
2571
3830
|
function buildMcpActionFamilies() {
|
|
@@ -2595,6 +3854,13 @@ function buildMcpActionFamilies() {
|
|
|
2595
3854
|
rolloutFlag: MCP_ADMIN_ECONOMY_HISTORY_FLAG_ID,
|
|
2596
3855
|
actions: getActionsByDomain("economy")
|
|
2597
3856
|
},
|
|
3857
|
+
{
|
|
3858
|
+
domain: "feedback",
|
|
3859
|
+
rolloutFlag: MCP_ADMIN_FEEDBACK_FLAG_ID,
|
|
3860
|
+
requiredCapability: MCP_ADMIN_FEEDBACK_READ_CAPABILITY,
|
|
3861
|
+
oauthScopes: [...MCP_ADMIN_FEEDBACK_REQUIRED_OAUTH_SCOPES],
|
|
3862
|
+
actions: getActionsByDomain("feedback")
|
|
3863
|
+
},
|
|
2598
3864
|
{
|
|
2599
3865
|
domain: "assetCatalog",
|
|
2600
3866
|
rolloutFlag: MCP_ASSET_PIPELINE_FLAG_ID,
|
|
@@ -2664,16 +3930,41 @@ function normalizeOptionalString(value) {
|
|
|
2664
3930
|
MCP_ADMIN_ANALYTICS_FLAG_ID,
|
|
2665
3931
|
MCP_ADMIN_ANALYTICS_METRICS,
|
|
2666
3932
|
MCP_ADMIN_ANALYTICS_PRESETS,
|
|
3933
|
+
MCP_ADMIN_BASE_OAUTH_SCOPE,
|
|
2667
3934
|
MCP_ADMIN_CONTEXT_SHAPE,
|
|
2668
3935
|
MCP_ADMIN_CONTRACT_VERSION,
|
|
2669
3936
|
MCP_ADMIN_ECONOMY_ADJUSTMENTS_FLAG_ID,
|
|
2670
3937
|
MCP_ADMIN_ECONOMY_HISTORY_FLAG_ID,
|
|
2671
3938
|
MCP_ADMIN_ECONOMY_READ_CAPABILITY,
|
|
2672
3939
|
MCP_ADMIN_EXTENSION_RULES,
|
|
3940
|
+
MCP_ADMIN_FEEDBACK_ACTIONS,
|
|
3941
|
+
MCP_ADMIN_FEEDBACK_ALERT_WINDOWS,
|
|
3942
|
+
MCP_ADMIN_FEEDBACK_BUG_HEALTH_WINDOWS,
|
|
3943
|
+
MCP_ADMIN_FEEDBACK_ENTRY_WINDOWS,
|
|
3944
|
+
MCP_ADMIN_FEEDBACK_FLAG_ID,
|
|
3945
|
+
MCP_ADMIN_FEEDBACK_MAX_CURSOR_LENGTH,
|
|
3946
|
+
MCP_ADMIN_FEEDBACK_MAX_PAGE_SIZE,
|
|
3947
|
+
MCP_ADMIN_FEEDBACK_PACKET_TYPES,
|
|
3948
|
+
MCP_ADMIN_FEEDBACK_PRIVACY_EXCLUSIONS,
|
|
3949
|
+
MCP_ADMIN_FEEDBACK_PRIVACY_METADATA,
|
|
3950
|
+
MCP_ADMIN_FEEDBACK_PROCESSORS,
|
|
3951
|
+
MCP_ADMIN_FEEDBACK_READ_CAPABILITY,
|
|
3952
|
+
MCP_ADMIN_FEEDBACK_READ_OAUTH_SCOPE,
|
|
3953
|
+
MCP_ADMIN_FEEDBACK_REPORT_TYPES,
|
|
3954
|
+
MCP_ADMIN_FEEDBACK_REQUIRED_OAUTH_SCOPES,
|
|
3955
|
+
MCP_ADMIN_FEEDBACK_SATISFACTION_WINDOWS,
|
|
3956
|
+
MCP_ADMIN_FEEDBACK_SCHEMA_CONTRACT_VERSION,
|
|
3957
|
+
MCP_ADMIN_FEEDBACK_SCHEMA_PACKAGE,
|
|
3958
|
+
MCP_ADMIN_FEEDBACK_WINDOWS,
|
|
2673
3959
|
MCP_ADMIN_FOUNDATION_DISABLED_CODE,
|
|
2674
3960
|
MCP_ADMIN_FOUNDATION_ENV_VAR,
|
|
2675
3961
|
MCP_ADMIN_FOUNDATION_FLAG_ID,
|
|
2676
3962
|
MCP_ADMIN_LIVEOPS_FLAG_ID,
|
|
3963
|
+
MCP_ADMIN_MODEL_CAPABILITIES,
|
|
3964
|
+
MCP_ADMIN_MODEL_OAUTH_SCOPES,
|
|
3965
|
+
MCP_ADMIN_MODEL_REGISTRY_SOURCE,
|
|
3966
|
+
MCP_ADMIN_MODEL_RESOLUTION_CONTRACT_VERSION,
|
|
3967
|
+
MCP_ADMIN_MODEL_TOOL_CONTRACT_VERSION,
|
|
2677
3968
|
MCP_ADMIN_PRODUCTION_READINESS_ENV_VAR,
|
|
2678
3969
|
MCP_ADMIN_PRODUCTION_READINESS_FLAG_ID,
|
|
2679
3970
|
MCP_ADMIN_REGISTRY_SOURCE,
|
|
@@ -2687,6 +3978,7 @@ function normalizeOptionalString(value) {
|
|
|
2687
3978
|
MCP_ADMIN_USER_AGGREGATION_DIMENSIONS,
|
|
2688
3979
|
MCP_ADMIN_USER_AGGREGATION_METRICS,
|
|
2689
3980
|
MCP_ADMIN_USER_AGGREGATION_PRESETS,
|
|
3981
|
+
MCP_ASSET_CATALOG_CONFIRM_CAPABILITY,
|
|
2690
3982
|
MCP_ASSET_CATALOG_REQUEST_CAPABILITY,
|
|
2691
3983
|
MCP_ASSET_CATALOG_REVIEW_CAPABILITY,
|
|
2692
3984
|
MCP_ASSET_EXTERNAL_HARVEST_FLAG_ID,
|
|
@@ -2707,6 +3999,8 @@ function normalizeOptionalString(value) {
|
|
|
2707
3999
|
buildMcpSurfaceUrls,
|
|
2708
4000
|
getMcpAdminContractDefaultTranslation,
|
|
2709
4001
|
listMcpActionSummaries,
|
|
4002
|
+
listMcpModelResourceTemplates,
|
|
4003
|
+
listMcpModelToolSummaries,
|
|
2710
4004
|
mcpAdminContractDescriptionKeys,
|
|
2711
4005
|
mcpAdminContractsEnGbTranslations,
|
|
2712
4006
|
mcpAdminContractsTranslations
|