@plasius/mcp-admin-contracts 0.2.9 → 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/dist/index.cjs CHANGED
@@ -20,14 +20,41 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
20
20
  // src/index.ts
21
21
  var index_exports = {};
22
22
  __export(index_exports, {
23
+ ECONOMY_ADMIN_HISTORY_FLAG_ID: () => ECONOMY_ADMIN_HISTORY_FLAG_ID,
24
+ ECONOMY_FINANCE_OPERATIONS_VIEW_CAPABILITY: () => ECONOMY_FINANCE_OPERATIONS_VIEW_CAPABILITY,
25
+ ECONOMY_OWNER_ADJUSTMENTS_FLAG_ID: () => ECONOMY_OWNER_ADJUSTMENTS_FLAG_ID,
26
+ MCP_ACCESS_SCOPE: () => MCP_ACCESS_SCOPE,
23
27
  MCP_ADMIN_ACTIONS: () => MCP_ADMIN_ACTIONS,
24
28
  MCP_ADMIN_ANALYTICS_DIMENSIONS: () => MCP_ADMIN_ANALYTICS_DIMENSIONS,
25
29
  MCP_ADMIN_ANALYTICS_FLAG_ID: () => MCP_ADMIN_ANALYTICS_FLAG_ID,
26
30
  MCP_ADMIN_ANALYTICS_METRICS: () => MCP_ADMIN_ANALYTICS_METRICS,
27
31
  MCP_ADMIN_ANALYTICS_PRESETS: () => MCP_ADMIN_ANALYTICS_PRESETS,
32
+ MCP_ADMIN_BASE_OAUTH_SCOPE: () => MCP_ADMIN_BASE_OAUTH_SCOPE,
28
33
  MCP_ADMIN_CONTEXT_SHAPE: () => MCP_ADMIN_CONTEXT_SHAPE,
29
34
  MCP_ADMIN_CONTRACT_VERSION: () => MCP_ADMIN_CONTRACT_VERSION,
35
+ MCP_ADMIN_ECONOMY_ADJUSTMENTS_FLAG_ID: () => MCP_ADMIN_ECONOMY_ADJUSTMENTS_FLAG_ID,
36
+ MCP_ADMIN_ECONOMY_HISTORY_FLAG_ID: () => MCP_ADMIN_ECONOMY_HISTORY_FLAG_ID,
37
+ MCP_ADMIN_ECONOMY_READ_CAPABILITY: () => MCP_ADMIN_ECONOMY_READ_CAPABILITY,
30
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,
31
58
  MCP_ADMIN_FOUNDATION_DISABLED_CODE: () => MCP_ADMIN_FOUNDATION_DISABLED_CODE,
32
59
  MCP_ADMIN_FOUNDATION_ENV_VAR: () => MCP_ADMIN_FOUNDATION_ENV_VAR,
33
60
  MCP_ADMIN_FOUNDATION_FLAG_ID: () => MCP_ADMIN_FOUNDATION_FLAG_ID,
@@ -35,6 +62,13 @@ __export(index_exports, {
35
62
  MCP_ADMIN_PRODUCTION_READINESS_ENV_VAR: () => MCP_ADMIN_PRODUCTION_READINESS_ENV_VAR,
36
63
  MCP_ADMIN_PRODUCTION_READINESS_FLAG_ID: () => MCP_ADMIN_PRODUCTION_READINESS_FLAG_ID,
37
64
  MCP_ADMIN_REGISTRY_SOURCE: () => MCP_ADMIN_REGISTRY_SOURCE,
65
+ MCP_ADMIN_TOKEN_ACTIVITY_SORTS: () => MCP_ADMIN_TOKEN_ACTIVITY_SORTS,
66
+ MCP_ADMIN_TOKEN_ACTIVITY_SOURCES: () => MCP_ADMIN_TOKEN_ACTIVITY_SOURCES,
67
+ MCP_ADMIN_TOKEN_ACTIVITY_STATUSES: () => MCP_ADMIN_TOKEN_ACTIVITY_STATUSES,
68
+ MCP_ADMIN_TOKEN_ACTIVITY_TYPES: () => MCP_ADMIN_TOKEN_ACTIVITY_TYPES,
69
+ MCP_ADMIN_TOKEN_WALLET_COMPONENTS: () => MCP_ADMIN_TOKEN_WALLET_COMPONENTS,
70
+ MCP_ADMIN_TOKEN_WALLET_SORTS: () => MCP_ADMIN_TOKEN_WALLET_SORTS,
71
+ MCP_ADMIN_TOKEN_WALLET_STATUSES: () => MCP_ADMIN_TOKEN_WALLET_STATUSES,
38
72
  MCP_ADMIN_USER_AGGREGATION_DIMENSIONS: () => MCP_ADMIN_USER_AGGREGATION_DIMENSIONS,
39
73
  MCP_ADMIN_USER_AGGREGATION_METRICS: () => MCP_ADMIN_USER_AGGREGATION_METRICS,
40
74
  MCP_ADMIN_USER_AGGREGATION_PRESETS: () => MCP_ADMIN_USER_AGGREGATION_PRESETS,
@@ -48,6 +82,9 @@ __export(index_exports, {
48
82
  MCP_ASSET_SOURCE_ADAPTERS: () => MCP_ASSET_SOURCE_ADAPTERS,
49
83
  MCP_ASSET_SOURCE_MANAGE_CAPABILITY: () => MCP_ASSET_SOURCE_MANAGE_CAPABILITY,
50
84
  MCP_ASSET_SOURCE_TIERS: () => MCP_ASSET_SOURCE_TIERS,
85
+ MCP_ECONOMY_FINANCE_ADJUST_CAPABILITY: () => MCP_ECONOMY_FINANCE_ADJUST_CAPABILITY,
86
+ MCP_ECONOMY_FINANCE_APPROVE_CAPABILITY: () => MCP_ECONOMY_FINANCE_APPROVE_CAPABILITY,
87
+ MCP_ECONOMY_FINANCE_VIEW_CAPABILITY: () => MCP_ECONOMY_FINANCE_VIEW_CAPABILITY,
51
88
  buildAiPluginManifest: () => buildAiPluginManifest,
52
89
  buildMcpContextResponse: () => buildMcpContextResponse,
53
90
  buildMcpDiscoveryResponse: () => buildMcpDiscoveryResponse,
@@ -60,11 +97,12 @@ __export(index_exports, {
60
97
  mcpAdminContractsTranslations: () => mcpAdminContractsTranslations
61
98
  });
62
99
  module.exports = __toCommonJS(index_exports);
100
+ var import_schema = require("@plasius/schema");
63
101
 
64
102
  // src/translations/en-GB.ts
65
103
  var mcpAdminContractsEnGbTranslations = {
66
- "mcpAdminContracts.manifest.descriptionForModel": "OAuth-protected MCP discovery manifest for the Plasius admin control plane covering feature flags, capabilities, analytics, and audit-backed operations.",
67
- "mcpAdminContracts.manifest.description": "Authenticated admin MCP discovery for the Plasius feature flag, capability, analytics, and audit control plane.",
104
+ "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.",
105
+ "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.",
68
106
  "mcpAdminContracts.action.listFeatureFlags.description": "List existing feature flags from the admin rollout control plane.",
69
107
  "mcpAdminContracts.action.getFeatureFlag.description": "Fetch one feature flag by stable key.",
70
108
  "mcpAdminContracts.action.updateFeatureFlag.description": "Patch an existing feature flag without bypassing the current admin update semantics.",
@@ -84,6 +122,15 @@ var mcpAdminContractsEnGbTranslations = {
84
122
  "mcpAdminContracts.action.listAggregationDimensions.description": "List the approved user-aggregation dimensions from the MCP whitelist.",
85
123
  "mcpAdminContracts.action.aggregateUsers.description": "Run grouped user aggregation over the bounded admin user data surface.",
86
124
  "mcpAdminContracts.action.aggregateUsersByPreset.description": "Run a curated user-aggregation preset against the bounded aggregation route.",
125
+ "mcpAdminContracts.action.listAdminTokenActivity.description": "List bounded pseudonymous Token activity after re-checking MCP scope, finance capabilities, and stored rollout flags.",
126
+ "mcpAdminContracts.action.getAdminTokenEconomyOverview.description": "Read the identifier-free global Token balance, lifetime totals, wallet counts, and authoritative projection freshness.",
127
+ "mcpAdminContracts.action.listAdminTokenWalletBalances.description": "List bounded pseudonymous Token wallet balances without exposing account, payment, provider, or raw wallet identifiers.",
128
+ "mcpAdminContracts.action.getAdminTokenTrends.description": "Read privacy-suppressed Token acquisition and usage trends with explainable advisory anomaly indicators.",
129
+ "mcpAdminContracts.action.getFeedbackBugHealth.description": "Read a bounded immutable hourly bug-health materialisation.",
130
+ "mcpAdminContracts.action.getFeedbackSatisfaction.description": "Read a bounded immutable daily satisfaction materialisation.",
131
+ "mcpAdminContracts.action.listFeedbackAlerts.description": "List bounded deterministic feedback advisories using an opaque cursor.",
132
+ "mcpAdminContracts.action.getFeedbackFreshness.description": "Read safe freshness metadata for the hourly bug and daily satisfaction processors.",
133
+ "mcpAdminContracts.action.listFeedbackStructuredEntries.description": "List bounded reporter-identifier-free structured feedback entries without narrative or storage references.",
87
134
  "mcpAdminContracts.action.searchAssetCatalog.description": "Search promoted asset catalog records without live third-party lookup.",
88
135
  "mcpAdminContracts.action.getAssetManifest.description": "Fetch a promoted player-safe runtime asset manifest reference.",
89
136
  "mcpAdminContracts.action.requestAsset.description": "Queue a governed missing-asset request when no promoted catalog match exists.",
@@ -97,13 +144,21 @@ var mcpAdminContractsEnGbTranslations = {
97
144
  "mcpAdminContracts.action.promoteAsset.description": "Promote an approved asset candidate to an immutable runtime manifest reference.",
98
145
  "mcpAdminContracts.action.rollbackAsset.description": "Rollback an asset runtime channel to a previous promoted manifest version.",
99
146
  "mcpAdminContracts.action.getAssetJobStatus.description": "Read governed asset job status, planned processing work, and evidence references.",
147
+ "mcpAdminContracts.action.getUserTokenWallet.description": "Read an account's server-resolved Token wallet summary without exposing provider or payment data.",
148
+ "mcpAdminContracts.action.listUserTokenActivity.description": "Read a bounded, cursor-paginated Token activity history for one account.",
149
+ "mcpAdminContracts.action.listTokenAdjustments.description": "List audited Token adjustment proposals and their approval state.",
150
+ "mcpAdminContracts.action.proposeTokenCredit.description": "Propose a positive Token credit for a server-resolved personal wallet; a distinct owner must approve it.",
151
+ "mcpAdminContracts.action.approveTokenCredit.description": "Approve a preview-bound Token credit proposed by a different owner.",
152
+ "mcpAdminContracts.action.rejectTokenCredit.description": "Reject a pending Token credit without mutating the wallet.",
153
+ "mcpAdminContracts.action.reverseTokenCredit.description": "Propose an immutable compensating reversal of an earlier owner Token credit.",
100
154
  "mcpAdminContracts.verification.enableFeatureFlag.description": "Use admin audit history to verify the rollout change.",
101
155
  "mcpAdminContracts.verification.disableFeatureFlag.description": "Use admin audit history to verify the rollout change.",
102
156
  "mcpAdminContracts.verification.assignCapability.description": "Use admin audit history to verify the stored rule written by the capability assignment.",
103
157
  "mcpAdminContracts.verification.unassignCapability.description": "Use admin audit history to verify capability-rule deletion.",
104
158
  "mcpAdminContracts.verification.updateCapability.description": "Use admin audit history to verify the stored rule updated by the capability mutation.",
105
159
  "mcpAdminContracts.verification.promoteAsset.description": "Use asset promotion history and admin audit events to verify the immutable runtime manifest promotion.",
106
- "mcpAdminContracts.verification.rollbackAsset.description": "Use asset promotion history and admin audit events to verify the runtime channel rollback."
160
+ "mcpAdminContracts.verification.rollbackAsset.description": "Use asset promotion history and admin audit events to verify the runtime channel rollback.",
161
+ "mcpAdminContracts.verification.tokenAdjustment.description": "Read the adjustment and Token activity history to verify its immutable proposal, decision, and ledger result."
107
162
  };
108
163
 
109
164
  // src/i18n.ts
@@ -129,6 +184,15 @@ var mcpAdminContractDescriptionKeys = {
129
184
  actionListAggregationDimensions: "mcpAdminContracts.action.listAggregationDimensions.description",
130
185
  actionAggregateUsers: "mcpAdminContracts.action.aggregateUsers.description",
131
186
  actionAggregateUsersByPreset: "mcpAdminContracts.action.aggregateUsersByPreset.description",
187
+ actionListAdminTokenActivity: "mcpAdminContracts.action.listAdminTokenActivity.description",
188
+ actionGetAdminTokenEconomyOverview: "mcpAdminContracts.action.getAdminTokenEconomyOverview.description",
189
+ actionListAdminTokenWalletBalances: "mcpAdminContracts.action.listAdminTokenWalletBalances.description",
190
+ actionGetAdminTokenTrends: "mcpAdminContracts.action.getAdminTokenTrends.description",
191
+ actionGetFeedbackBugHealth: "mcpAdminContracts.action.getFeedbackBugHealth.description",
192
+ actionGetFeedbackSatisfaction: "mcpAdminContracts.action.getFeedbackSatisfaction.description",
193
+ actionListFeedbackAlerts: "mcpAdminContracts.action.listFeedbackAlerts.description",
194
+ actionGetFeedbackFreshness: "mcpAdminContracts.action.getFeedbackFreshness.description",
195
+ actionListFeedbackStructuredEntries: "mcpAdminContracts.action.listFeedbackStructuredEntries.description",
132
196
  actionSearchAssetCatalog: "mcpAdminContracts.action.searchAssetCatalog.description",
133
197
  actionGetAssetManifest: "mcpAdminContracts.action.getAssetManifest.description",
134
198
  actionRequestAsset: "mcpAdminContracts.action.requestAsset.description",
@@ -142,13 +206,21 @@ var mcpAdminContractDescriptionKeys = {
142
206
  actionPromoteAsset: "mcpAdminContracts.action.promoteAsset.description",
143
207
  actionRollbackAsset: "mcpAdminContracts.action.rollbackAsset.description",
144
208
  actionGetAssetJobStatus: "mcpAdminContracts.action.getAssetJobStatus.description",
209
+ actionGetUserTokenWallet: "mcpAdminContracts.action.getUserTokenWallet.description",
210
+ actionListUserTokenActivity: "mcpAdminContracts.action.listUserTokenActivity.description",
211
+ actionListTokenAdjustments: "mcpAdminContracts.action.listTokenAdjustments.description",
212
+ actionProposeTokenCredit: "mcpAdminContracts.action.proposeTokenCredit.description",
213
+ actionApproveTokenCredit: "mcpAdminContracts.action.approveTokenCredit.description",
214
+ actionRejectTokenCredit: "mcpAdminContracts.action.rejectTokenCredit.description",
215
+ actionReverseTokenCredit: "mcpAdminContracts.action.reverseTokenCredit.description",
145
216
  verificationEnableFeatureFlag: "mcpAdminContracts.verification.enableFeatureFlag.description",
146
217
  verificationDisableFeatureFlag: "mcpAdminContracts.verification.disableFeatureFlag.description",
147
218
  verificationAssignCapability: "mcpAdminContracts.verification.assignCapability.description",
148
219
  verificationUnassignCapability: "mcpAdminContracts.verification.unassignCapability.description",
149
220
  verificationUpdateCapability: "mcpAdminContracts.verification.updateCapability.description",
150
221
  verificationPromoteAsset: "mcpAdminContracts.verification.promoteAsset.description",
151
- verificationRollbackAsset: "mcpAdminContracts.verification.rollbackAsset.description"
222
+ verificationRollbackAsset: "mcpAdminContracts.verification.rollbackAsset.description",
223
+ verificationTokenAdjustment: "mcpAdminContracts.verification.tokenAdjustment.description"
152
224
  };
153
225
  var mcpAdminContractsTranslations = {
154
226
  "en-GB": mcpAdminContractsEnGbTranslations
@@ -158,13 +230,18 @@ function getMcpAdminContractDefaultTranslation(key) {
158
230
  }
159
231
 
160
232
  // src/index.ts
161
- var MCP_ADMIN_CONTRACT_VERSION = "2026-04-28.v3";
233
+ var MCP_ADMIN_CONTRACT_VERSION = "2026-08-11.v6";
162
234
  var MCP_ADMIN_REGISTRY_SOURCE = "@plasius/mcp-admin-contracts";
163
235
  var MCP_ADMIN_FOUNDATION_FLAG_ID = "mcp.admin.foundation.enabled";
236
+ var MCP_ACCESS_SCOPE = "mcp:access";
164
237
  var MCP_ADMIN_FOUNDATION_ENV_VAR = "MCP_ADMIN_FOUNDATION_ENABLED";
165
238
  var MCP_ADMIN_FOUNDATION_DISABLED_CODE = "MCP_ADMIN_FOUNDATION_DISABLED";
166
239
  var MCP_ADMIN_LIVEOPS_FLAG_ID = "mcp.admin.liveops-controls.enabled";
167
240
  var MCP_ADMIN_ANALYTICS_FLAG_ID = "mcp.admin.analytics.enabled";
241
+ var ECONOMY_ADMIN_HISTORY_FLAG_ID = "economy.admin-history.enabled";
242
+ var MCP_ADMIN_ECONOMY_HISTORY_FLAG_ID = "mcp.admin-economy-history.enabled";
243
+ var MCP_ADMIN_ECONOMY_READ_CAPABILITY = "admin.economy.read";
244
+ var ECONOMY_FINANCE_OPERATIONS_VIEW_CAPABILITY = "economy.finance-operations.view";
168
245
  var MCP_ADMIN_PRODUCTION_READINESS_FLAG_ID = "mcp.admin.production-readiness.enabled";
169
246
  var MCP_ADMIN_PRODUCTION_READINESS_ENV_VAR = "MCP_ADMIN_PRODUCTION_READINESS_ENABLED";
170
247
  var MCP_ASSET_PIPELINE_FLAG_ID = "asset.pipeline.unified-ai-assets.enabled";
@@ -173,6 +250,90 @@ var MCP_ASSET_CATALOG_REQUEST_CAPABILITY = "asset.catalog.request";
173
250
  var MCP_ASSET_PIPELINE_MANAGE_CAPABILITY = "asset.pipeline.mcp.manage";
174
251
  var MCP_ASSET_SOURCE_MANAGE_CAPABILITY = "asset.source.manage";
175
252
  var MCP_ASSET_CATALOG_REVIEW_CAPABILITY = "asset.catalog.review";
253
+ var MCP_ADMIN_FEEDBACK_FLAG_ID = "feedback.mcp.enabled";
254
+ var MCP_ADMIN_FEEDBACK_READ_CAPABILITY = "admin.feedback.read";
255
+ var MCP_ADMIN_BASE_OAUTH_SCOPE = MCP_ACCESS_SCOPE;
256
+ var MCP_ADMIN_FEEDBACK_READ_OAUTH_SCOPE = MCP_ADMIN_FEEDBACK_READ_CAPABILITY;
257
+ var MCP_ADMIN_FEEDBACK_REQUIRED_OAUTH_SCOPES = Object.freeze([
258
+ MCP_ADMIN_BASE_OAUTH_SCOPE,
259
+ MCP_ADMIN_FEEDBACK_READ_OAUTH_SCOPE
260
+ ]);
261
+ var MCP_ADMIN_FEEDBACK_SCHEMA_PACKAGE = "@plasius/schema";
262
+ var MCP_ADMIN_FEEDBACK_SCHEMA_CONTRACT_VERSION = import_schema.FEEDBACK_CONTRACT_VERSION;
263
+ var MCP_ADMIN_FEEDBACK_WINDOWS = [
264
+ "previous-utc-hour",
265
+ "last-24-hours",
266
+ "last-7-days",
267
+ "last-30-days",
268
+ "last-90-days"
269
+ ];
270
+ var MCP_ADMIN_FEEDBACK_PACKET_TYPES = [
271
+ "feedback-bug-packet",
272
+ "feedback-review-packet"
273
+ ];
274
+ var MCP_ADMIN_FEEDBACK_REPORT_TYPES = [
275
+ "feedback-hourly-bug-report",
276
+ "feedback-daily-satisfaction-report"
277
+ ];
278
+ var MCP_ADMIN_FEEDBACK_PROCESSORS = [
279
+ "bug-hourly",
280
+ "review-daily",
281
+ "commit-reconciliation"
282
+ ];
283
+ var MCP_ADMIN_FEEDBACK_PRIVACY_EXCLUSIONS = [
284
+ "account-identifiers",
285
+ "reporter-pseudonyms",
286
+ "network-identifiers",
287
+ "session-identifiers",
288
+ "user-agents",
289
+ "locales",
290
+ "client-timestamps",
291
+ "referrers",
292
+ "credential-material",
293
+ "financial-identifiers",
294
+ "government-identifiers",
295
+ "narrative",
296
+ "generated-summaries",
297
+ "quotations",
298
+ "embeddings",
299
+ "content-hashes",
300
+ "matched-values",
301
+ "model-traces",
302
+ "binary-images",
303
+ "filenames",
304
+ "exact-coordinates",
305
+ "exact-dimensions",
306
+ "adapter-fingerprints",
307
+ "raw-warnings",
308
+ "blob-references",
309
+ "raw-urls",
310
+ "unrestricted-scans",
311
+ "mutations"
312
+ ];
313
+ var MCP_ADMIN_ECONOMY_ADJUSTMENTS_FLAG_ID = "mcp.admin-economy-adjustments.enabled";
314
+ var ECONOMY_OWNER_ADJUSTMENTS_FLAG_ID = "economy.tokens.owner-adjustments.enabled";
315
+ var MCP_ECONOMY_FINANCE_VIEW_CAPABILITY = "economy.finance-operations.view";
316
+ var MCP_ECONOMY_FINANCE_ADJUST_CAPABILITY = "economy.finance-operations.adjust";
317
+ var MCP_ECONOMY_FINANCE_APPROVE_CAPABILITY = "economy.finance-operations.approve-adjustment";
318
+ var canonicalFeedbackSchemas = Object.freeze({
319
+ FeedbackBugPacketSchema: import_schema.FeedbackBugPacketSchema,
320
+ FeedbackReviewPacketSchema: import_schema.FeedbackReviewPacketSchema,
321
+ FeedbackHourlyBugReportSchema: import_schema.FeedbackHourlyBugReportSchema,
322
+ FeedbackDailySatisfactionReportSchema: import_schema.FeedbackDailySatisfactionReportSchema,
323
+ FeedbackProcessorCheckpointSchema: import_schema.FeedbackProcessorCheckpointSchema
324
+ });
325
+ var feedbackSchemaSource = (...schemaNames) => {
326
+ for (const schemaName of schemaNames) {
327
+ if (canonicalFeedbackSchemas[schemaName].meta.version !== MCP_ADMIN_FEEDBACK_SCHEMA_CONTRACT_VERSION) {
328
+ throw new TypeError("Canonical feedback schema version mismatch.");
329
+ }
330
+ }
331
+ return {
332
+ packageName: MCP_ADMIN_FEEDBACK_SCHEMA_PACKAGE,
333
+ contractVersion: MCP_ADMIN_FEEDBACK_SCHEMA_CONTRACT_VERSION,
334
+ schemaNames: [...schemaNames]
335
+ };
336
+ };
176
337
  var stringField = (description, options = {}) => ({
177
338
  type: "string",
178
339
  description,
@@ -188,18 +349,41 @@ var numberField = (description, options = {}) => ({
188
349
  description,
189
350
  ...options
190
351
  });
352
+ var integerField = (description, options = {}) => ({
353
+ type: "integer",
354
+ description,
355
+ ...options
356
+ });
191
357
  var objectField = (description, properties, options = {}) => ({
192
358
  type: "object",
193
359
  description,
194
360
  properties,
195
361
  ...options
196
362
  });
363
+ var feedbackClosedObjectField = (description, properties, options = {}) => objectField(description, properties, {
364
+ ...options,
365
+ additionalProperties: false
366
+ });
197
367
  var arrayField = (description, itemType, options = {}) => ({
198
368
  type: "array",
199
369
  description,
200
370
  itemType,
201
371
  ...options
202
372
  });
373
+ var arrayOfField = (description, itemType, items, options = {}) => ({
374
+ type: "array",
375
+ description,
376
+ itemType,
377
+ items,
378
+ ...options
379
+ });
380
+ var discriminatedUnionField = (description, discriminator, variants, options = {}) => ({
381
+ type: "discriminated-union",
382
+ description,
383
+ discriminator,
384
+ oneOf: variants,
385
+ ...options
386
+ });
203
387
  var translatedDescription = (descriptionKey) => {
204
388
  const descriptionDefault = getMcpAdminContractDefaultTranslation(descriptionKey);
205
389
  return {
@@ -240,6 +424,42 @@ var MCP_ADMIN_USER_AGGREGATION_PRESETS = [
240
424
  "usersByNotificationPreference",
241
425
  "usersByAccountAgeBand"
242
426
  ];
427
+ var MCP_ADMIN_TOKEN_ACTIVITY_TYPES = [
428
+ "acquisition",
429
+ "spend",
430
+ "reversal",
431
+ "hold",
432
+ "failure"
433
+ ];
434
+ var MCP_ADMIN_TOKEN_ACTIVITY_STATUSES = [
435
+ "pending",
436
+ "held",
437
+ "settled",
438
+ "reversed",
439
+ "failed"
440
+ ];
441
+ var MCP_ADMIN_TOKEN_WALLET_COMPONENTS = [
442
+ "household",
443
+ "personal",
444
+ "gameplay-allocation"
445
+ ];
446
+ var MCP_ADMIN_TOKEN_WALLET_STATUSES = ["active", "closed"];
447
+ var MCP_ADMIN_TOKEN_WALLET_SORTS = [
448
+ "available-desc",
449
+ "updated-at-desc"
450
+ ];
451
+ var MCP_ADMIN_TOKEN_ACTIVITY_SOURCES = [
452
+ "paid-purchase",
453
+ "subscription",
454
+ "rewarded-activity",
455
+ "gameplay",
456
+ "system-adjustment",
457
+ "unknown"
458
+ ];
459
+ var MCP_ADMIN_TOKEN_ACTIVITY_SORTS = [
460
+ "occurred-at-desc",
461
+ "amount-absolute-desc"
462
+ ];
243
463
  var MCP_ASSET_SOURCE_ADAPTERS = [
244
464
  "polyhaven",
245
465
  "kenney",
@@ -386,6 +606,1210 @@ var assetOperationAcceptedOutput = {
386
606
  job: assetJobStatusField("Governed asset job created or updated by the operation."),
387
607
  nextAction: stringField("Next expected lifecycle action.", { required: false })
388
608
  };
609
+ var tokenAdjustmentOutput = {
610
+ adjustment: objectField("Audited Token adjustment state.", {
611
+ adjustmentId: stringField("Stable adjustment identifier."),
612
+ targetAccountId: stringField("Target account identifier."),
613
+ targetWalletId: stringField("Server-resolved target wallet identifier."),
614
+ targetWalletKind: stringField("Server-resolved target wallet kind.", {
615
+ enum: ["personal"]
616
+ }),
617
+ amountTokenSubunits: stringField(
618
+ "Exact positive base-10 TokenSubunit amount; 1 Token is 1,000 subunits."
619
+ ),
620
+ status: stringField("Current immutable workflow status.", {
621
+ enum: ["pending", "approved", "rejected", "executed", "failed", "expired"]
622
+ }),
623
+ previewHash: stringField("Canonical preview hash bound to the proposal."),
624
+ proposalHash: stringField("Canonical proposal hash bound to decisions."),
625
+ proposerAccountId: stringField("Stable proposing owner account identifier."),
626
+ approverAccountId: stringField("Distinct approving owner account identifier.", {
627
+ required: false
628
+ }),
629
+ createdAt: stringField("ISO-8601 proposal timestamp."),
630
+ expiresAt: stringField("ISO-8601 proposal expiry timestamp."),
631
+ transactionId: stringField("Immutable ledger transaction identifier.", {
632
+ required: false
633
+ })
634
+ })
635
+ };
636
+ var adminEconomyReadAccess = {
637
+ oauthScopes: [MCP_ACCESS_SCOPE],
638
+ capabilities: [
639
+ MCP_ADMIN_ECONOMY_READ_CAPABILITY,
640
+ ECONOMY_FINANCE_OPERATIONS_VIEW_CAPABILITY
641
+ ],
642
+ rolloutFlags: [
643
+ ECONOMY_ADMIN_HISTORY_FLAG_ID,
644
+ MCP_ADMIN_ECONOMY_HISTORY_FLAG_ID
645
+ ],
646
+ mode: "read-only",
647
+ identityResolution: "not-available"
648
+ };
649
+ var adminTokenReportingWindowInput = {
650
+ lookbackDays: numberField(
651
+ "Optional whole-day lookback ending now; defaults to 30, cannot exceed 365, and hourly trend calls are further limited to 31. Do not combine with explicit timestamps.",
652
+ {
653
+ required: false,
654
+ minimum: 1,
655
+ maximum: 365,
656
+ default: 30
657
+ }
658
+ ),
659
+ fromInclusive: stringField(
660
+ "Optional inclusive ISO-8601 UTC start; the normalized interactive window cannot exceed 365 days.",
661
+ { required: false, format: "date-time" }
662
+ ),
663
+ toExclusive: stringField(
664
+ "Optional exclusive ISO-8601 UTC end; defaults to the request time.",
665
+ { required: false, format: "date-time" }
666
+ )
667
+ };
668
+ var adminTokenActivityEntryField = objectField(
669
+ "One pseudonymous Token activity row with no raw financial or identity identifiers.",
670
+ {
671
+ schemaVersion: stringField("Economy reporting contract version.", {
672
+ enum: ["1"]
673
+ }),
674
+ occurredAt: stringField("ISO-8601 UTC activity timestamp.", {
675
+ format: "date-time"
676
+ }),
677
+ activityType: stringField("Normalized Token activity type.", {
678
+ enum: MCP_ADMIN_TOKEN_ACTIVITY_TYPES
679
+ }),
680
+ status: stringField("Normalized activity status.", {
681
+ enum: MCP_ADMIN_TOKEN_ACTIVITY_STATUSES
682
+ }),
683
+ source: stringField(
684
+ "Provider-neutral source grouping; provider names and identifiers are excluded.",
685
+ { enum: MCP_ADMIN_TOKEN_ACTIVITY_SOURCES }
686
+ ),
687
+ amount: stringField(
688
+ "Exact signed TokenSubunit amount as a canonical base-10 integer string.",
689
+ { format: "int64-string" }
690
+ ),
691
+ safeLabel: stringField(
692
+ "Bounded source-owned display label with no account, payment, or provider metadata."
693
+ ),
694
+ rowAlias: stringField(
695
+ "Versioned audience-separated opaque alias for this reporting row.",
696
+ { format: "pseudonymous-alias" }
697
+ ),
698
+ subjectAlias: stringField(
699
+ "Versioned audience-separated opaque alias for the activity subject.",
700
+ { format: "pseudonymous-alias" }
701
+ )
702
+ }
703
+ );
704
+ var adminTokenAggregateBalancesField = objectField(
705
+ "Identifier-free exact aggregate Token balance categories.",
706
+ {
707
+ schemaVersion: stringField("Economy reporting contract version.", {
708
+ enum: ["1"]
709
+ }),
710
+ available: stringField("Exact available TokenSubunits.", {
711
+ format: "int64-string"
712
+ }),
713
+ reserved: stringField("Exact reserved TokenSubunits.", {
714
+ format: "int64-string"
715
+ }),
716
+ held: stringField("Exact held TokenSubunits.", {
717
+ format: "int64-string"
718
+ }),
719
+ rewardProgress: stringField("Exact accumulated reward TokenSubunits.", {
720
+ format: "int64-string"
721
+ })
722
+ }
723
+ );
724
+ var adminTokenAggregateLifetimeField = objectField(
725
+ "Identifier-free exact aggregate lifetime Token metrics.",
726
+ {
727
+ schemaVersion: stringField("Economy reporting contract version.", {
728
+ enum: ["1"]
729
+ }),
730
+ bought: stringField("Exact lifetime bought TokenSubunits.", {
731
+ format: "int64-string"
732
+ }),
733
+ earned: stringField("Exact lifetime earned TokenSubunits.", {
734
+ format: "int64-string"
735
+ }),
736
+ allocated: stringField("Exact lifetime allocated TokenSubunits.", {
737
+ format: "int64-string"
738
+ }),
739
+ reclaimed: stringField("Exact lifetime reclaimed TokenSubunits.", {
740
+ format: "int64-string"
741
+ }),
742
+ spent: stringField("Exact lifetime spent TokenSubunits.", {
743
+ format: "int64-string"
744
+ }),
745
+ reversed: stringField("Exact lifetime reversed TokenSubunits.", {
746
+ format: "int64-string"
747
+ })
748
+ }
749
+ );
750
+ var adminTokenWalletBalanceEntryField = objectField(
751
+ "One pseudonymous Token wallet balance with no raw account or wallet identifier.",
752
+ {
753
+ schemaVersion: stringField("Economy reporting contract version.", {
754
+ enum: ["1"]
755
+ }),
756
+ walletAlias: stringField("MCP-audience opaque wallet alias.", {
757
+ format: "pseudonymous-alias"
758
+ }),
759
+ subjectAlias: stringField("MCP-audience opaque subject alias.", {
760
+ format: "pseudonymous-alias"
761
+ }),
762
+ component: stringField("Provider-neutral wallet component.", {
763
+ enum: MCP_ADMIN_TOKEN_WALLET_COMPONENTS
764
+ }),
765
+ status: stringField("Wallet projection status.", {
766
+ enum: MCP_ADMIN_TOKEN_WALLET_STATUSES
767
+ }),
768
+ available: stringField("Exact available TokenSubunits.", {
769
+ format: "int64-string"
770
+ }),
771
+ reserved: stringField("Exact reserved TokenSubunits.", {
772
+ format: "int64-string"
773
+ }),
774
+ held: stringField("Exact held TokenSubunits.", {
775
+ format: "int64-string"
776
+ }),
777
+ rewardProgress: stringField("Exact reward-progress TokenSubunits.", {
778
+ format: "int64-string"
779
+ }),
780
+ updatedAt: stringField("UTC time of the included wallet projection.", {
781
+ format: "date-time"
782
+ }),
783
+ authoritySequence: stringField(
784
+ "Canonical positive authority sequence through which this row is current.",
785
+ { format: "uint64-string" }
786
+ )
787
+ }
788
+ );
789
+ var adminTokenAnomalyField = objectField(
790
+ "Explainable advisory indicator; it never triggers a financial mutation.",
791
+ {
792
+ method: stringField("Server-owned baseline method.", {
793
+ enum: ["same-window-median-mad-v1"]
794
+ }),
795
+ status: stringField("Advisory irregularity classification.", {
796
+ enum: ["normal", "irregular-spike"]
797
+ }),
798
+ baselineWindowCount: numberField(
799
+ "Count of preceding same-window samples used by the baseline.",
800
+ { minimum: 28, maximum: 28, default: 28 }
801
+ ),
802
+ medianAmount: stringField("Exact median signed TokenSubunit amount.", {
803
+ format: "int64-string"
804
+ }),
805
+ medianAbsoluteDeviation: stringField(
806
+ "Exact median absolute deviation in TokenSubunits.",
807
+ { format: "int64-string" }
808
+ ),
809
+ minimumAbsoluteDelta: stringField(
810
+ "Server-owned exact absolute minimum required before a spike is reported.",
811
+ { format: "int64-string" }
812
+ ),
813
+ deviationFromMedian: stringField(
814
+ "Exact signed TokenSubunit deviation from the baseline median.",
815
+ { format: "int64-string" }
816
+ ),
817
+ madMultiplierMilli: numberField(
818
+ "Fixed-point MAD multiplier where 1,000 represents one MAD.",
819
+ { minimum: 1, maximum: 1e6 }
820
+ ),
821
+ explanationCode: stringField("Stable explanation code for operator review.")
822
+ },
823
+ { required: false }
824
+ );
825
+ var adminTokenTrendPointField = objectField(
826
+ "One hourly or daily activity-type trend point.",
827
+ {
828
+ schemaVersion: stringField("Economy reporting contract version.", {
829
+ enum: ["1"]
830
+ }),
831
+ bucketStart: stringField("Inclusive aligned bucket start.", {
832
+ format: "date-time"
833
+ }),
834
+ bucketEnd: stringField("Exclusive aligned bucket end.", {
835
+ format: "date-time"
836
+ }),
837
+ activityType: stringField("Normalized Token activity type.", {
838
+ enum: MCP_ADMIN_TOKEN_ACTIVITY_TYPES
839
+ }),
840
+ aggregate: objectField(
841
+ "Reported aggregate or a suppression marker. Suppressed points omit counts, amounts, and anomaly details.",
842
+ {
843
+ visibility: stringField("Privacy visibility state.", {
844
+ enum: ["reported", "suppressed"]
845
+ }),
846
+ reason: stringField(
847
+ "Present only when the cohort is suppressed.",
848
+ {
849
+ required: false,
850
+ enum: ["cohort-below-minimum"]
851
+ }
852
+ ),
853
+ distinctSubjects: numberField(
854
+ "Distinct pseudonymous subjects; present only for cohorts of at least five.",
855
+ { required: false, minimum: 5 }
856
+ ),
857
+ activityCount: numberField(
858
+ "Activity row count; absent for suppressed cohorts.",
859
+ { required: false, minimum: 5 }
860
+ ),
861
+ signedAmount: stringField(
862
+ "Exact aggregate signed TokenSubunits; absent for suppressed cohorts.",
863
+ { required: false, format: "int64-string" }
864
+ ),
865
+ threshold: numberField(
866
+ "Fixed minimum cohort size; present on suppression markers.",
867
+ {
868
+ required: false,
869
+ minimum: 5,
870
+ maximum: 5,
871
+ default: 5
872
+ }
873
+ )
874
+ }
875
+ ),
876
+ anomaly: adminTokenAnomalyField
877
+ }
878
+ );
879
+ var MCP_ADMIN_FEEDBACK_MAX_PAGE_SIZE = 100;
880
+ var MCP_ADMIN_FEEDBACK_MAX_CURSOR_LENGTH = 512;
881
+ var MCP_ADMIN_FEEDBACK_BUG_HEALTH_WINDOWS = [
882
+ "previous-utc-hour",
883
+ "last-24-hours",
884
+ "last-7-days"
885
+ ];
886
+ var MCP_ADMIN_FEEDBACK_SATISFACTION_WINDOWS = [
887
+ "last-7-days",
888
+ "last-30-days",
889
+ "last-90-days"
890
+ ];
891
+ var MCP_ADMIN_FEEDBACK_ENTRY_WINDOWS = [
892
+ "last-24-hours",
893
+ "last-7-days",
894
+ "last-30-days",
895
+ "last-90-days"
896
+ ];
897
+ var MCP_ADMIN_FEEDBACK_ALERT_WINDOWS = [
898
+ "last-24-hours",
899
+ "last-7-days"
900
+ ];
901
+ var MCP_ADMIN_FEEDBACK_PRIVACY_METADATA = Object.freeze({
902
+ classification: "public-safe-structured-only",
903
+ readOnly: true,
904
+ bounded: true,
905
+ excludes: Object.freeze([...MCP_ADMIN_FEEDBACK_PRIVACY_EXCLUSIONS]),
906
+ notes: Object.freeze([
907
+ "Responses contain only schema-validated structured fields and materialised report metadata.",
908
+ "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.",
909
+ "Narrative-derived values are closed classifications only; no summaries, quotations, embeddings, hashes, matched values, or model traces are permitted."
910
+ ])
911
+ });
912
+ var feedbackReadAccess = {
913
+ oauthScopes: [...MCP_ADMIN_FEEDBACK_REQUIRED_OAUTH_SCOPES],
914
+ capabilities: [MCP_ADMIN_FEEDBACK_READ_CAPABILITY],
915
+ rolloutFlags: [MCP_ADMIN_FEEDBACK_FLAG_ID],
916
+ mode: "read-only",
917
+ identityResolution: "not-available"
918
+ };
919
+ var feedbackPageMetadataField = (allowedWindows) => feedbackClosedObjectField("Bounded read-response metadata.", {
920
+ window: stringField("Closed server-owned response window.", {
921
+ enum: [...allowedWindows]
922
+ }),
923
+ windowStart: stringField("Inclusive UTC response-window boundary.", {
924
+ format: "date-time"
925
+ }),
926
+ windowEnd: stringField("Exclusive UTC response-window boundary.", {
927
+ format: "date-time"
928
+ }),
929
+ generatedAt: stringField("UTC time at which this response projection was produced.", {
930
+ format: "date-time"
931
+ }),
932
+ returnedCount: integerField("Number of records in this bounded page.", {
933
+ minimum: 0,
934
+ maximum: MCP_ADMIN_FEEDBACK_MAX_PAGE_SIZE
935
+ }),
936
+ nextCursor: stringField("Opaque continuation cursor when more results exist.", {
937
+ required: false,
938
+ minLength: 1,
939
+ maxLength: MCP_ADMIN_FEEDBACK_MAX_CURSOR_LENGTH,
940
+ pattern: "^[A-Za-z0-9_-]+$"
941
+ })
942
+ });
943
+ var FEEDBACK_SCHEMA_MAX_COUNT = 1e9;
944
+ 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}$";
945
+ var FEEDBACK_SCHEMA_SAFE_ID_PATTERN = "^[A-Za-z0-9][A-Za-z0-9._:-]*$";
946
+ var FEEDBACK_SCHEMA_SURFACE_IDS = import_schema.FEEDBACK_SURFACE_IDS;
947
+ var FEEDBACK_SCHEMA_PERSISTABLE_ISSUE_TYPES = import_schema.FEEDBACK_PERSISTABLE_ISSUE_TYPES;
948
+ var FEEDBACK_SCHEMA_SENTIMENT_BUCKETS = import_schema.FEEDBACK_SENTIMENT_BUCKETS;
949
+ var FEEDBACK_SCHEMA_INTENT_IDS = import_schema.FEEDBACK_INTENT_IDS;
950
+ var FEEDBACK_SCHEMA_THEME_IDS = import_schema.FEEDBACK_THEME_IDS;
951
+ var FEEDBACK_SCHEMA_RENDERER_BUCKETS = import_schema.FEEDBACK_RENDERER_BUCKETS;
952
+ var FEEDBACK_SCHEMA_BACKEND_BUCKETS = import_schema.FEEDBACK_BACKEND_BUCKETS;
953
+ var FEEDBACK_SCHEMA_VIEWPORT_BUCKETS = import_schema.FEEDBACK_VIEWPORT_BUCKETS;
954
+ var FEEDBACK_SCHEMA_FRAME_RATE_BUCKETS = import_schema.FEEDBACK_FRAME_RATE_BUCKETS;
955
+ var FEEDBACK_SCHEMA_FRAME_TIME_BUCKETS = import_schema.FEEDBACK_FRAME_TIME_BUCKETS;
956
+ var FEEDBACK_SCHEMA_GAME_FEATURE_IDS = import_schema.FEEDBACK_GAME_FEATURE_IDS;
957
+ var FEEDBACK_SCHEMA_GAME_COUNTER_CODES = import_schema.FEEDBACK_GAME_COUNTER_CODES;
958
+ var FEEDBACK_SCHEMA_GAME_ERROR_CODES = import_schema.FEEDBACK_GAME_ERROR_CODES;
959
+ var requireCanonicalStringEnum = (field) => {
960
+ const values = field?.enumValues;
961
+ if (values === void 0 || values.length === 0 || values.some((value) => typeof value !== "string")) {
962
+ throw new TypeError("Canonical feedback schema enum is unavailable.");
963
+ }
964
+ return Object.freeze([...values]);
965
+ };
966
+ var canonicalHourlyBugShape = import_schema.FeedbackHourlyBugReportSchema._shape;
967
+ var canonicalAdvisoryShape = canonicalHourlyBugShape.advisories?.itemType?._shape;
968
+ var FEEDBACK_SCHEMA_ADVISORY_CODES = requireCanonicalStringEnum(
969
+ canonicalAdvisoryShape?.code
970
+ );
971
+ var FEEDBACK_SCHEMA_RECOMMENDATION_IDS = requireCanonicalStringEnum(
972
+ canonicalAdvisoryShape?.recommendationIds?.itemType
973
+ );
974
+ var FEEDBACK_SCHEMA_ABUSE_BLOCK_BANDS = requireCanonicalStringEnum(
975
+ canonicalHourlyBugShape.abuseBlockBands?.itemType?._shape?.id
976
+ );
977
+ var canonicalLiteralStringField = (description, value) => stringField(description, {
978
+ enum: [value],
979
+ constValue: value
980
+ });
981
+ var canonicalUuidV4Field = (description) => stringField(description, {
982
+ format: "uuid",
983
+ minLength: 36,
984
+ maxLength: 36,
985
+ pattern: FEEDBACK_SCHEMA_UUID_V4_PATTERN
986
+ });
987
+ var canonicalSafeIdField = (description, maximum = 128) => stringField(description, {
988
+ minLength: 1,
989
+ maxLength: maximum,
990
+ pattern: FEEDBACK_SCHEMA_SAFE_ID_PATTERN
991
+ });
992
+ var canonicalDateTimeField = (description) => stringField(description, {
993
+ format: "date-time"
994
+ });
995
+ var canonicalCountField = (description, options = {}) => integerField(description, {
996
+ minimum: 0,
997
+ maximum: FEEDBACK_SCHEMA_MAX_COUNT,
998
+ ...options
999
+ });
1000
+ var canonicalSchemaIdentityFields = (type) => ({
1001
+ type: canonicalLiteralStringField("Canonical @plasius/schema identity.", type),
1002
+ version: canonicalLiteralStringField(
1003
+ "Canonical feedback contract version.",
1004
+ MCP_ADMIN_FEEDBACK_SCHEMA_CONTRACT_VERSION
1005
+ )
1006
+ });
1007
+ var canonicalStringArrayField = (description, enumValues, maximum, options = {}) => arrayOfField(
1008
+ description,
1009
+ "string",
1010
+ stringField("Closed canonical value.", { enum: [...enumValues] }),
1011
+ { maxItems: maximum, ...options }
1012
+ );
1013
+ var canonicalAnalyzedProjectionField = feedbackClosedObjectField(
1014
+ "Canonical analyzed `FeedbackDerivedAnalysis` projection.",
1015
+ {
1016
+ ...canonicalSchemaIdentityFields("feedback-derived-analysis"),
1017
+ status: canonicalLiteralStringField(
1018
+ "Canonical analysis status.",
1019
+ "analyzed"
1020
+ ),
1021
+ sentiment: stringField("Closed canonical sentiment bucket.", {
1022
+ enum: [...FEEDBACK_SCHEMA_SENTIMENT_BUCKETS]
1023
+ }),
1024
+ intentIds: canonicalStringArrayField(
1025
+ "Unique closed canonical intent identifiers.",
1026
+ FEEDBACK_SCHEMA_INTENT_IDS,
1027
+ 8
1028
+ ),
1029
+ themeIds: canonicalStringArrayField(
1030
+ "Unique closed canonical theme identifiers.",
1031
+ FEEDBACK_SCHEMA_THEME_IDS,
1032
+ 8
1033
+ ),
1034
+ confidence: stringField("Closed classifier confidence.", {
1035
+ enum: ["low", "medium", "high"]
1036
+ }),
1037
+ policyVersion: stringField("Pinned canonical privacy policy version.", {
1038
+ enum: ["feedback-privacy-en-v1"]
1039
+ }),
1040
+ modelVersion: stringField("Pinned canonical local model version.", {
1041
+ enum: ["feedback-en-rules-v1"]
1042
+ }),
1043
+ deterministicRedactionCount: canonicalCountField(
1044
+ "Browser deterministic-redaction count.",
1045
+ { maximum: 4e3 }
1046
+ ),
1047
+ scannerRedactionCount: canonicalCountField(
1048
+ "Private-scanner redaction count.",
1049
+ { maximum: 4e3 }
1050
+ )
1051
+ }
1052
+ );
1053
+ var canonicalStructuredOnlyProjectionField = feedbackClosedObjectField(
1054
+ "Canonical structured-only `FeedbackDerivedAnalysis` projection.",
1055
+ {
1056
+ ...canonicalSchemaIdentityFields("feedback-derived-analysis"),
1057
+ status: canonicalLiteralStringField(
1058
+ "Canonical analysis status.",
1059
+ "structured-only"
1060
+ ),
1061
+ intentIds: canonicalStringArrayField(
1062
+ "Structured-only projections contain no intent identifiers.",
1063
+ FEEDBACK_SCHEMA_INTENT_IDS,
1064
+ 0
1065
+ ),
1066
+ themeIds: canonicalStringArrayField(
1067
+ "Structured-only projections contain no theme identifiers.",
1068
+ FEEDBACK_SCHEMA_THEME_IDS,
1069
+ 0
1070
+ ),
1071
+ policyVersion: stringField("Pinned canonical privacy policy version.", {
1072
+ enum: ["feedback-privacy-en-v1"]
1073
+ }),
1074
+ modelVersion: stringField("Pinned canonical local model version.", {
1075
+ enum: ["feedback-en-rules-v1"]
1076
+ }),
1077
+ deterministicRedactionCount: canonicalCountField(
1078
+ "Browser deterministic-redaction count.",
1079
+ { maximum: 4e3 }
1080
+ ),
1081
+ scannerRedactionCount: canonicalCountField(
1082
+ "Private-scanner redaction count.",
1083
+ { maximum: 4e3 }
1084
+ )
1085
+ }
1086
+ );
1087
+ var canonicalAnalysisProjectionField = discriminatedUnionField(
1088
+ "Canonical closed `FeedbackDerivedAnalysis` projection.",
1089
+ "status",
1090
+ [
1091
+ canonicalAnalyzedProjectionField,
1092
+ canonicalStructuredOnlyProjectionField
1093
+ ],
1094
+ { required: false }
1095
+ );
1096
+ var canonicalGameCounterField = feedbackClosedObjectField(
1097
+ "Canonical bounded renderer diagnostic counter.",
1098
+ {
1099
+ code: stringField("Closed canonical counter code.", {
1100
+ enum: [...FEEDBACK_SCHEMA_GAME_COUNTER_CODES]
1101
+ }),
1102
+ count: canonicalCountField("Positive bounded counter value.", {
1103
+ minimum: 1,
1104
+ maximum: 1e4
1105
+ })
1106
+ }
1107
+ );
1108
+ var canonicalGameDiagnosticsVariantField = (surfaceId, provenanceContractId) => feedbackClosedObjectField("Canonical bounded renderer-owned game diagnostics.", {
1109
+ ...canonicalSchemaIdentityFields("feedback-game-diagnostics"),
1110
+ surfaceId: canonicalLiteralStringField(
1111
+ "Canonical diagnostics-eligible surface.",
1112
+ surfaceId
1113
+ ),
1114
+ consentConfirmed: booleanField("Explicit diagnostics consent.", {
1115
+ constValue: true
1116
+ }),
1117
+ provenanceContractId: canonicalLiteralStringField(
1118
+ "Renderer-owned provenance contract.",
1119
+ provenanceContractId
1120
+ ),
1121
+ renderer: stringField("Coarse canonical renderer bucket.", {
1122
+ enum: [...FEEDBACK_SCHEMA_RENDERER_BUCKETS]
1123
+ }),
1124
+ backend: stringField("Coarse canonical execution-backend bucket.", {
1125
+ enum: [...FEEDBACK_SCHEMA_BACKEND_BUCKETS]
1126
+ }),
1127
+ viewportBucket: stringField("Coarse canonical viewport bucket.", {
1128
+ enum: [...FEEDBACK_SCHEMA_VIEWPORT_BUCKETS]
1129
+ }),
1130
+ frameRateBucket: stringField("Coarse canonical frame-rate bucket.", {
1131
+ enum: [...FEEDBACK_SCHEMA_FRAME_RATE_BUCKETS]
1132
+ }),
1133
+ frameTimeBucket: stringField("Coarse canonical frame-time bucket.", {
1134
+ enum: [...FEEDBACK_SCHEMA_FRAME_TIME_BUCKETS]
1135
+ }),
1136
+ featureIds: canonicalStringArrayField(
1137
+ "Unique closed renderer feature identifiers.",
1138
+ FEEDBACK_SCHEMA_GAME_FEATURE_IDS,
1139
+ FEEDBACK_SCHEMA_GAME_FEATURE_IDS.length
1140
+ ),
1141
+ counters: arrayOfField(
1142
+ "Unique bounded renderer counters.",
1143
+ "FeedbackGameDiagnosticCounter",
1144
+ canonicalGameCounterField,
1145
+ { maxItems: 32 }
1146
+ ),
1147
+ errorCodes: canonicalStringArrayField(
1148
+ "Unique closed renderer error codes.",
1149
+ FEEDBACK_SCHEMA_GAME_ERROR_CODES,
1150
+ FEEDBACK_SCHEMA_GAME_ERROR_CODES.length
1151
+ )
1152
+ });
1153
+ var canonicalGameDiagnosticsField = discriminatedUnionField(
1154
+ "Canonical `FeedbackGameDiagnostics`; its surface must equal the containing bug packet surface and it cannot express pixels, DOM, text, URLs, filenames, coordinates, or adapter fingerprints.",
1155
+ "surfaceId",
1156
+ [
1157
+ canonicalGameDiagnosticsVariantField(
1158
+ "site.generator",
1159
+ "generator.renderer-diagnostics.v1"
1160
+ ),
1161
+ canonicalGameDiagnosticsVariantField(
1162
+ "site.gpu-demo",
1163
+ "gpu-demo.renderer-diagnostics.v1"
1164
+ )
1165
+ ],
1166
+ { required: false }
1167
+ );
1168
+ var canonicalBugPacketField = feedbackClosedObjectField(
1169
+ "Canonical identifier-free immutable `FeedbackBugPacket`.",
1170
+ {
1171
+ ...canonicalSchemaIdentityFields("feedback-bug-packet"),
1172
+ packetId: canonicalUuidV4Field("Opaque canonical packet UUIDv4."),
1173
+ acceptedAt: canonicalDateTimeField("Server-owned packet acceptance time."),
1174
+ surfaceId: stringField("Canonical capability-projected surface identifier.", {
1175
+ enum: [...FEEDBACK_SCHEMA_SURFACE_IDS]
1176
+ }),
1177
+ issueType: stringField("Canonical persistable issue type.", {
1178
+ enum: [...FEEDBACK_SCHEMA_PERSISTABLE_ISSUE_TYPES]
1179
+ }),
1180
+ severity: integerField("Canonical bug severity.", {
1181
+ minimum: 1,
1182
+ maximum: 5
1183
+ }),
1184
+ releaseId: canonicalSafeIdField("Server-owned release identifier."),
1185
+ buildId: canonicalSafeIdField("Server-owned build identifier."),
1186
+ analysis: canonicalAnalysisProjectionField,
1187
+ gameDiagnostics: canonicalGameDiagnosticsField
1188
+ }
1189
+ );
1190
+ var canonicalReviewPacketField = feedbackClosedObjectField(
1191
+ "Canonical identifier-free immutable `FeedbackReviewPacket`.",
1192
+ {
1193
+ ...canonicalSchemaIdentityFields("feedback-review-packet"),
1194
+ packetId: canonicalUuidV4Field("Opaque canonical packet UUIDv4."),
1195
+ acceptedAt: canonicalDateTimeField("Server-owned packet acceptance time."),
1196
+ satisfaction: integerField("Canonical satisfaction rating.", {
1197
+ minimum: 1,
1198
+ maximum: 5
1199
+ }),
1200
+ analysis: canonicalAnalysisProjectionField
1201
+ }
1202
+ );
1203
+ var canonicalFeedbackPacketField = discriminatedUnionField(
1204
+ "Canonical bug/review packet discriminated by exact schema identity.",
1205
+ "type",
1206
+ [canonicalBugPacketField, canonicalReviewPacketField]
1207
+ );
1208
+ var canonicalDistributionField = (description, idField, maximum) => arrayOfField(
1209
+ `${description} Bucket identifiers are unique as required by the canonical schema.`,
1210
+ "FeedbackCountBucket",
1211
+ feedbackClosedObjectField("Canonical count bucket.", {
1212
+ id: idField,
1213
+ count: canonicalCountField("Canonical non-negative bucket count.")
1214
+ }),
1215
+ { maxItems: maximum }
1216
+ );
1217
+ var canonicalAdvisoryField = feedbackClosedObjectField(
1218
+ "Canonical deterministic feedback advisory.",
1219
+ {
1220
+ code: stringField("Closed canonical advisory code.", {
1221
+ enum: [...FEEDBACK_SCHEMA_ADVISORY_CODES]
1222
+ }),
1223
+ level: stringField("Canonical advisory level.", {
1224
+ enum: ["advisory", "critical"]
1225
+ }),
1226
+ triggerCount: canonicalCountField("Positive deterministic trigger count.", {
1227
+ minimum: 1
1228
+ }),
1229
+ recommendationIds: canonicalStringArrayField(
1230
+ "One to eight deterministic recommendation identifiers.",
1231
+ FEEDBACK_SCHEMA_RECOMMENDATION_IDS,
1232
+ 8,
1233
+ { minItems: 1 }
1234
+ )
1235
+ }
1236
+ );
1237
+ var canonicalAdvisoriesField = arrayOfField(
1238
+ "Canonical deterministic advisories.",
1239
+ "FeedbackAdvisory",
1240
+ canonicalAdvisoryField,
1241
+ { maxItems: 32 }
1242
+ );
1243
+ var canonicalHourlyBugReportField = feedbackClosedObjectField(
1244
+ "Canonical materialised `FeedbackHourlyBugReport`.",
1245
+ {
1246
+ ...canonicalSchemaIdentityFields("feedback-hourly-bug-report"),
1247
+ reportId: canonicalUuidV4Field("Opaque canonical report UUIDv4."),
1248
+ windowStart: canonicalDateTimeField("Inclusive aligned UTC hour boundary."),
1249
+ windowEnd: canonicalDateTimeField("Exclusive aligned UTC hour boundary."),
1250
+ revision: integerField("Positive canonical materialisation revision.", {
1251
+ minimum: 1,
1252
+ maximum: 1e6
1253
+ }),
1254
+ generatedAt: canonicalDateTimeField("Canonical materialisation time."),
1255
+ acceptedCount: canonicalCountField("Accepted bug-packet count."),
1256
+ rejectedCount: canonicalCountField("Rejected bug-submission count."),
1257
+ diagnosticsAttachedCount: canonicalCountField(
1258
+ "Accepted packets carrying canonical game diagnostics."
1259
+ ),
1260
+ deterministicRedactionCount: canonicalCountField(
1261
+ "Total browser deterministic redactions."
1262
+ ),
1263
+ scannerRedactionCount: canonicalCountField(
1264
+ "Total private-scanner redactions."
1265
+ ),
1266
+ processorLagSeconds: canonicalCountField(
1267
+ "Exact materialisation lag from `windowEnd`."
1268
+ ),
1269
+ rates: feedbackClosedObjectField("Canonical rejection and redaction rates.", {
1270
+ rejectionRate: numberField("Rejected share of submitted records.", {
1271
+ minimum: 0,
1272
+ maximum: 1
1273
+ }),
1274
+ deterministicRedactionsPerAccepted: numberField(
1275
+ "Deterministic redactions per accepted packet.",
1276
+ { minimum: 0, maximum: 4e3 }
1277
+ ),
1278
+ scannerRedactionsPerAccepted: numberField(
1279
+ "Scanner redactions per accepted packet.",
1280
+ { minimum: 0, maximum: 4e3 }
1281
+ )
1282
+ }),
1283
+ traffic: feedbackClosedObjectField("Safe precomputed traffic denominator.", {
1284
+ denominator: canonicalCountField("Safe traffic denominator."),
1285
+ acceptedPerTenThousand: numberField(
1286
+ "Accepted bugs per ten thousand traffic units when denominator is non-zero.",
1287
+ {
1288
+ required: false,
1289
+ minimum: 0,
1290
+ maximum: FEEDBACK_SCHEMA_MAX_COUNT
1291
+ }
1292
+ )
1293
+ }),
1294
+ targetDistribution: canonicalDistributionField(
1295
+ "Counts by canonical feedback surface.",
1296
+ stringField("Canonical surface identifier.", {
1297
+ enum: [...FEEDBACK_SCHEMA_SURFACE_IDS]
1298
+ }),
1299
+ 256
1300
+ ),
1301
+ issueTypeDistribution: canonicalDistributionField(
1302
+ "Counts by canonical persistable issue type.",
1303
+ stringField("Canonical persistable issue type.", {
1304
+ enum: [...FEEDBACK_SCHEMA_PERSISTABLE_ISSUE_TYPES]
1305
+ }),
1306
+ 9
1307
+ ),
1308
+ severityDistribution: canonicalDistributionField(
1309
+ "Counts by canonical severity identifier.",
1310
+ stringField("Canonical severity identifier.", {
1311
+ enum: ["1", "2", "3", "4", "5"]
1312
+ }),
1313
+ 5
1314
+ ),
1315
+ intentDistribution: canonicalDistributionField(
1316
+ "Counts by canonical derived intent.",
1317
+ stringField("Canonical intent identifier.", {
1318
+ enum: [...FEEDBACK_SCHEMA_INTENT_IDS]
1319
+ }),
1320
+ FEEDBACK_SCHEMA_INTENT_IDS.length
1321
+ ),
1322
+ buildDistribution: canonicalDistributionField(
1323
+ "Counts by server-owned build identifier.",
1324
+ canonicalSafeIdField("Server-owned build identifier."),
1325
+ 128
1326
+ ),
1327
+ rendererDistribution: canonicalDistributionField(
1328
+ "Counts by canonical renderer bucket.",
1329
+ stringField("Canonical renderer bucket.", {
1330
+ enum: [...FEEDBACK_SCHEMA_RENDERER_BUCKETS]
1331
+ }),
1332
+ FEEDBACK_SCHEMA_RENDERER_BUCKETS.length
1333
+ ),
1334
+ backendDistribution: canonicalDistributionField(
1335
+ "Counts by canonical execution-backend bucket.",
1336
+ stringField("Canonical backend bucket.", {
1337
+ enum: [...FEEDBACK_SCHEMA_BACKEND_BUCKETS]
1338
+ }),
1339
+ FEEDBACK_SCHEMA_BACKEND_BUCKETS.length
1340
+ ),
1341
+ viewportDistribution: canonicalDistributionField(
1342
+ "Counts by canonical viewport bucket.",
1343
+ stringField("Canonical viewport bucket.", {
1344
+ enum: [...FEEDBACK_SCHEMA_VIEWPORT_BUCKETS]
1345
+ }),
1346
+ FEEDBACK_SCHEMA_VIEWPORT_BUCKETS.length
1347
+ ),
1348
+ frameRateDistribution: canonicalDistributionField(
1349
+ "Counts by canonical frame-rate bucket.",
1350
+ stringField("Canonical frame-rate bucket.", {
1351
+ enum: [...FEEDBACK_SCHEMA_FRAME_RATE_BUCKETS]
1352
+ }),
1353
+ FEEDBACK_SCHEMA_FRAME_RATE_BUCKETS.length
1354
+ ),
1355
+ frameTimeDistribution: canonicalDistributionField(
1356
+ "Counts by canonical frame-time bucket.",
1357
+ stringField("Canonical frame-time bucket.", {
1358
+ enum: [...FEEDBACK_SCHEMA_FRAME_TIME_BUCKETS]
1359
+ }),
1360
+ FEEDBACK_SCHEMA_FRAME_TIME_BUCKETS.length
1361
+ ),
1362
+ diagnosticFeatureDistribution: canonicalDistributionField(
1363
+ "Counts by canonical renderer feature identifier.",
1364
+ stringField("Canonical renderer feature identifier.", {
1365
+ enum: [...FEEDBACK_SCHEMA_GAME_FEATURE_IDS]
1366
+ }),
1367
+ FEEDBACK_SCHEMA_GAME_FEATURE_IDS.length
1368
+ ),
1369
+ diagnosticCounterDistribution: canonicalDistributionField(
1370
+ "Summed canonical renderer counters.",
1371
+ stringField("Canonical renderer counter code.", {
1372
+ enum: [...FEEDBACK_SCHEMA_GAME_COUNTER_CODES]
1373
+ }),
1374
+ FEEDBACK_SCHEMA_GAME_COUNTER_CODES.length
1375
+ ),
1376
+ diagnosticErrorDistribution: canonicalDistributionField(
1377
+ "Counts by canonical renderer error code.",
1378
+ stringField("Canonical renderer error code.", {
1379
+ enum: [...FEEDBACK_SCHEMA_GAME_ERROR_CODES]
1380
+ }),
1381
+ FEEDBACK_SCHEMA_GAME_ERROR_CODES.length
1382
+ ),
1383
+ abuseBlockBands: canonicalDistributionField(
1384
+ "Counts by canonical abuse-block band.",
1385
+ stringField("Canonical abuse-block band.", {
1386
+ enum: [...FEEDBACK_SCHEMA_ABUSE_BLOCK_BANDS]
1387
+ }),
1388
+ 16
1389
+ ),
1390
+ comparison: feedbackClosedObjectField("Canonical prior-period comparison.", {
1391
+ previousHourRatio: numberField("Ratio to the previous UTC hour.", {
1392
+ minimum: 0,
1393
+ maximum: 1e3
1394
+ }),
1395
+ sevenDaySameHourRatio: numberField(
1396
+ "Ratio to the seven-day same-hour baseline.",
1397
+ { minimum: 0, maximum: 1e3 }
1398
+ )
1399
+ }),
1400
+ advisories: canonicalAdvisoriesField
1401
+ }
1402
+ );
1403
+ var canonicalDailySatisfactionReportField = feedbackClosedObjectField(
1404
+ "Canonical materialised `FeedbackDailySatisfactionReport`.",
1405
+ {
1406
+ ...canonicalSchemaIdentityFields("feedback-daily-satisfaction-report"),
1407
+ reportId: canonicalUuidV4Field("Opaque canonical report UUIDv4."),
1408
+ windowStart: canonicalDateTimeField("Inclusive aligned UTC day boundary."),
1409
+ windowEnd: canonicalDateTimeField("Exclusive aligned UTC day boundary."),
1410
+ revision: integerField("Positive canonical materialisation revision.", {
1411
+ minimum: 1,
1412
+ maximum: 1e6
1413
+ }),
1414
+ generatedAt: canonicalDateTimeField("Canonical materialisation time."),
1415
+ processorLagSeconds: canonicalCountField(
1416
+ "Exact materialisation lag from `windowEnd`."
1417
+ ),
1418
+ acceptedReviewCount: canonicalCountField("Accepted review-packet count."),
1419
+ meanStars: numberField(
1420
+ "Mean stars; absent exactly when `acceptedReviewCount` is zero.",
1421
+ { required: false, minimum: 1, maximum: 5 }
1422
+ ),
1423
+ medianStars: numberField(
1424
+ "Median stars; absent exactly when `acceptedReviewCount` is zero.",
1425
+ { required: false, minimum: 1, maximum: 5 }
1426
+ ),
1427
+ starDistribution: canonicalDistributionField(
1428
+ "Counts by canonical star identifier.",
1429
+ stringField("Canonical star identifier.", {
1430
+ enum: ["1", "2", "3", "4", "5"]
1431
+ }),
1432
+ 5
1433
+ ),
1434
+ sentimentDistribution: canonicalDistributionField(
1435
+ "Counts by canonical sentiment bucket.",
1436
+ stringField("Canonical sentiment bucket.", {
1437
+ enum: [...FEEDBACK_SCHEMA_SENTIMENT_BUCKETS]
1438
+ }),
1439
+ FEEDBACK_SCHEMA_SENTIMENT_BUCKETS.length
1440
+ ),
1441
+ intentDistribution: canonicalDistributionField(
1442
+ "Counts by canonical derived intent.",
1443
+ stringField("Canonical intent identifier.", {
1444
+ enum: [...FEEDBACK_SCHEMA_INTENT_IDS]
1445
+ }),
1446
+ FEEDBACK_SCHEMA_INTENT_IDS.length
1447
+ ),
1448
+ rollingWindows: arrayOfField(
1449
+ "Exactly one canonical 7-, 30-, and 90-day rolling window.",
1450
+ "FeedbackRollingSatisfaction",
1451
+ feedbackClosedObjectField("Canonical rolling satisfaction window.", {
1452
+ period: stringField("Canonical rolling period.", {
1453
+ enum: ["7-days", "30-days", "90-days"]
1454
+ }),
1455
+ reviewCount: canonicalCountField("Accepted reviews in the period."),
1456
+ meanStars: numberField(
1457
+ "Mean stars; absent exactly when `reviewCount` is zero.",
1458
+ { required: false, minimum: 1, maximum: 5 }
1459
+ )
1460
+ }),
1461
+ { minItems: 3, maxItems: 3 }
1462
+ ),
1463
+ previousPeriodDeltaStars: numberField(
1464
+ "Seven-day mean-star delta from the preceding seven-day period.",
1465
+ { required: false, minimum: -4, maximum: 4 }
1466
+ ),
1467
+ advisories: canonicalAdvisoriesField
1468
+ }
1469
+ );
1470
+ var canonicalProcessorCheckpointVariantField = (processor) => feedbackClosedObjectField("Canonical replay-safe processor checkpoint.", {
1471
+ ...canonicalSchemaIdentityFields("feedback-processor-checkpoint"),
1472
+ checkpointId: canonicalSafeIdField(
1473
+ "Canonical checkpoint identifier.",
1474
+ 160
1475
+ ),
1476
+ processor: canonicalLiteralStringField(
1477
+ "Canonical feedback processor.",
1478
+ processor
1479
+ ),
1480
+ windowKey: canonicalSafeIdField("Canonical processor window key.", 160),
1481
+ revision: integerField("Positive canonical processor revision.", {
1482
+ minimum: 1,
1483
+ maximum: 1e6
1484
+ }),
1485
+ completedAt: canonicalDateTimeField("Canonical completion time."),
1486
+ ...processor === "commit-reconciliation" ? {} : {
1487
+ reportId: canonicalUuidV4Field(
1488
+ "Opaque UUIDv4 of the materialised report."
1489
+ )
1490
+ }
1491
+ });
1492
+ var canonicalProcessorCheckpointField = discriminatedUnionField(
1493
+ "Canonical `FeedbackProcessorCheckpoint`.",
1494
+ "processor",
1495
+ MCP_ADMIN_FEEDBACK_PROCESSORS.map(canonicalProcessorCheckpointVariantField)
1496
+ );
1497
+ var feedbackCanonicalReportListMetadataField = (allowedWindows, maximumReports) => feedbackClosedObjectField("Bounded report-list response metadata.", {
1498
+ window: stringField("Closed server-owned lookback selector.", {
1499
+ enum: [...allowedWindows]
1500
+ }),
1501
+ windowStart: canonicalDateTimeField("Inclusive returned range boundary."),
1502
+ windowEnd: canonicalDateTimeField("Exclusive returned range boundary."),
1503
+ generatedAt: canonicalDateTimeField("Response projection time."),
1504
+ returnedCount: canonicalCountField("Reports returned.", {
1505
+ maximum: maximumReports
1506
+ })
1507
+ });
1508
+ var canonicalAlertProjectionField = feedbackClosedObjectField(
1509
+ "Bounded projection of an advisory from one canonical report.",
1510
+ {
1511
+ reportId: canonicalUuidV4Field("Canonical source report UUIDv4."),
1512
+ reportType: stringField("Canonical source report identity.", {
1513
+ enum: [...MCP_ADMIN_FEEDBACK_REPORT_TYPES]
1514
+ }),
1515
+ windowStart: canonicalDateTimeField("Canonical report window start."),
1516
+ windowEnd: canonicalDateTimeField("Canonical report window end."),
1517
+ advisory: canonicalAdvisoryField
1518
+ }
1519
+ );
1520
+ var canonicalFreshnessProjectionField = feedbackClosedObjectField(
1521
+ "Freshness derived from one canonical processor checkpoint.",
1522
+ {
1523
+ checkpoint: canonicalProcessorCheckpointField,
1524
+ freshness: stringField("Closed derived freshness state.", {
1525
+ enum: ["fresh", "stale"]
1526
+ }),
1527
+ lagSeconds: canonicalCountField(
1528
+ "Whole seconds from checkpoint completion to `checkedAt`."
1529
+ )
1530
+ }
1531
+ );
1532
+ var feedbackStructuredEntryCommonFilterFields = () => ({
1533
+ window: stringField("Closed server-owned entry lookback.", {
1534
+ required: true,
1535
+ enum: [...MCP_ADMIN_FEEDBACK_ENTRY_WINDOWS]
1536
+ }),
1537
+ limit: integerField("Maximum structured entries returned.", {
1538
+ required: false,
1539
+ minimum: 1,
1540
+ maximum: MCP_ADMIN_FEEDBACK_MAX_PAGE_SIZE
1541
+ }),
1542
+ cursor: stringField("Opaque server-issued continuation cursor.", {
1543
+ required: false,
1544
+ minLength: 1,
1545
+ maxLength: MCP_ADMIN_FEEDBACK_MAX_CURSOR_LENGTH,
1546
+ pattern: "^[A-Za-z0-9_-]+$"
1547
+ })
1548
+ });
1549
+ var feedbackStructuredEntryFiltersField = discriminatedUnionField(
1550
+ "Exact bounded structured-entry filters. The selected `packetType` variant is closed so bug-only and review-only filters cannot be combined.",
1551
+ "packetType",
1552
+ [
1553
+ feedbackClosedObjectField(
1554
+ "Filters for canonical bug packets only.",
1555
+ {
1556
+ packetType: canonicalLiteralStringField(
1557
+ "Canonical bug-packet identity.",
1558
+ MCP_ADMIN_FEEDBACK_PACKET_TYPES[0]
1559
+ ),
1560
+ ...feedbackStructuredEntryCommonFilterFields(),
1561
+ surfaceId: stringField(
1562
+ "Optional exact allowlisted bug-surface identifier.",
1563
+ {
1564
+ required: false,
1565
+ enum: [...FEEDBACK_SCHEMA_SURFACE_IDS]
1566
+ }
1567
+ ),
1568
+ buildId: stringField(
1569
+ "Optional exact server-owned bug build identifier.",
1570
+ {
1571
+ required: false,
1572
+ maxLength: 128,
1573
+ pattern: "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$"
1574
+ }
1575
+ ),
1576
+ severity: integerField("Optional exact bug severity.", {
1577
+ required: false,
1578
+ minimum: 1,
1579
+ maximum: 5
1580
+ })
1581
+ },
1582
+ { additionalProperties: false }
1583
+ ),
1584
+ feedbackClosedObjectField(
1585
+ "Filters for canonical review packets only.",
1586
+ {
1587
+ packetType: canonicalLiteralStringField(
1588
+ "Canonical review-packet identity.",
1589
+ MCP_ADMIN_FEEDBACK_PACKET_TYPES[1]
1590
+ ),
1591
+ ...feedbackStructuredEntryCommonFilterFields(),
1592
+ satisfaction: integerField("Optional exact satisfaction score.", {
1593
+ required: false,
1594
+ minimum: 1,
1595
+ maximum: 5
1596
+ })
1597
+ },
1598
+ { additionalProperties: false }
1599
+ )
1600
+ ],
1601
+ { required: true }
1602
+ );
1603
+ function deepFreeze(value) {
1604
+ if (value === null || typeof value !== "object" && typeof value !== "function") {
1605
+ return value;
1606
+ }
1607
+ for (const propertyValue of Object.values(value)) {
1608
+ deepFreeze(propertyValue);
1609
+ }
1610
+ return Object.freeze(value);
1611
+ }
1612
+ var feedbackDescriptorMetadata = {
1613
+ domain: "feedback",
1614
+ rolloutFlag: MCP_ADMIN_FEEDBACK_FLAG_ID,
1615
+ requiredCapability: MCP_ADMIN_FEEDBACK_READ_CAPABILITY,
1616
+ oauthScopes: [...MCP_ADMIN_FEEDBACK_REQUIRED_OAUTH_SCOPES],
1617
+ privacy: MCP_ADMIN_FEEDBACK_PRIVACY_METADATA,
1618
+ access: feedbackReadAccess,
1619
+ availability: "near-future"
1620
+ };
1621
+ var MCP_ADMIN_FEEDBACK_ACTIONS = deepFreeze([
1622
+ {
1623
+ name: "getFeedbackBugHealth",
1624
+ ...translatedDescription(
1625
+ mcpAdminContractDescriptionKeys.actionGetFeedbackBugHealth
1626
+ ),
1627
+ ...feedbackDescriptorMetadata,
1628
+ schemaSource: feedbackSchemaSource("FeedbackHourlyBugReportSchema"),
1629
+ execution: {
1630
+ method: "GET",
1631
+ path: "/api/admin/feedback/bug-health",
1632
+ source: "near-future-route",
1633
+ notes: [
1634
+ "Reads immutable hourly materialisations only; it does not scan packets or Blob Storage on request.",
1635
+ "Returns identifier-free structured distributions, fixed advisories, and deterministic recommendation identifiers only."
1636
+ ]
1637
+ },
1638
+ input: {
1639
+ window: stringField("Closed server-owned bug-health report window.", {
1640
+ required: true,
1641
+ enum: [...MCP_ADMIN_FEEDBACK_BUG_HEALTH_WINDOWS]
1642
+ })
1643
+ },
1644
+ output: {
1645
+ metadata: feedbackCanonicalReportListMetadataField(
1646
+ MCP_ADMIN_FEEDBACK_BUG_HEALTH_WINDOWS,
1647
+ 168
1648
+ ),
1649
+ reports: arrayOfField(
1650
+ "At most 168 canonical immutable hourly bug-health reports.",
1651
+ "FeedbackHourlyBugReport",
1652
+ canonicalHourlyBugReportField,
1653
+ { maxItems: 168 }
1654
+ )
1655
+ }
1656
+ },
1657
+ {
1658
+ name: "getFeedbackSatisfaction",
1659
+ ...translatedDescription(
1660
+ mcpAdminContractDescriptionKeys.actionGetFeedbackSatisfaction
1661
+ ),
1662
+ ...feedbackDescriptorMetadata,
1663
+ schemaSource: feedbackSchemaSource(
1664
+ "FeedbackDailySatisfactionReportSchema"
1665
+ ),
1666
+ execution: {
1667
+ method: "GET",
1668
+ path: "/api/admin/feedback/satisfaction",
1669
+ source: "near-future-route",
1670
+ notes: [
1671
+ "Reads immutable daily materialisations only; it does not calculate from raw review packets on request.",
1672
+ "Returns star statistics and closed derived classifications without narrative or reporter correlation."
1673
+ ]
1674
+ },
1675
+ input: {
1676
+ window: stringField("Closed server-owned satisfaction report window.", {
1677
+ required: true,
1678
+ enum: [...MCP_ADMIN_FEEDBACK_SATISFACTION_WINDOWS]
1679
+ })
1680
+ },
1681
+ output: {
1682
+ metadata: feedbackCanonicalReportListMetadataField(
1683
+ MCP_ADMIN_FEEDBACK_SATISFACTION_WINDOWS,
1684
+ 90
1685
+ ),
1686
+ reports: arrayOfField(
1687
+ "At most 90 canonical immutable daily satisfaction reports.",
1688
+ "FeedbackDailySatisfactionReport",
1689
+ canonicalDailySatisfactionReportField,
1690
+ { maxItems: 90 }
1691
+ )
1692
+ }
1693
+ },
1694
+ {
1695
+ name: "listFeedbackAlerts",
1696
+ ...translatedDescription(
1697
+ mcpAdminContractDescriptionKeys.actionListFeedbackAlerts
1698
+ ),
1699
+ ...feedbackDescriptorMetadata,
1700
+ schemaSource: feedbackSchemaSource(
1701
+ "FeedbackHourlyBugReportSchema",
1702
+ "FeedbackDailySatisfactionReportSchema"
1703
+ ),
1704
+ execution: {
1705
+ method: "GET",
1706
+ path: "/api/admin/feedback/alerts",
1707
+ source: "near-future-route",
1708
+ notes: [
1709
+ "Reads deterministic advisories only; no generated summaries, operator notes, or mutation controls are exposed.",
1710
+ "Pagination is server-cursor based and capped at 100 advisories per call."
1711
+ ]
1712
+ },
1713
+ input: {
1714
+ window: stringField("Closed server-owned advisory lookback.", {
1715
+ required: true,
1716
+ enum: [...MCP_ADMIN_FEEDBACK_ALERT_WINDOWS]
1717
+ }),
1718
+ reportType: stringField("Optional canonical source-report identity.", {
1719
+ required: false,
1720
+ enum: [...MCP_ADMIN_FEEDBACK_REPORT_TYPES]
1721
+ }),
1722
+ limit: integerField("Maximum advisories returned.", {
1723
+ required: false,
1724
+ minimum: 1,
1725
+ maximum: MCP_ADMIN_FEEDBACK_MAX_PAGE_SIZE
1726
+ }),
1727
+ cursor: stringField("Opaque server-issued continuation cursor.", {
1728
+ required: false,
1729
+ minLength: 1,
1730
+ maxLength: MCP_ADMIN_FEEDBACK_MAX_CURSOR_LENGTH,
1731
+ pattern: "^[A-Za-z0-9_-]+$"
1732
+ })
1733
+ },
1734
+ output: {
1735
+ metadata: feedbackPageMetadataField(MCP_ADMIN_FEEDBACK_ALERT_WINDOWS),
1736
+ items: arrayOfField(
1737
+ "Canonical deterministic advisories with bounded source-report metadata.",
1738
+ "FeedbackAdvisoryProjection",
1739
+ canonicalAlertProjectionField,
1740
+ { maxItems: MCP_ADMIN_FEEDBACK_MAX_PAGE_SIZE }
1741
+ )
1742
+ }
1743
+ },
1744
+ {
1745
+ name: "getFeedbackFreshness",
1746
+ ...translatedDescription(
1747
+ mcpAdminContractDescriptionKeys.actionGetFeedbackFreshness
1748
+ ),
1749
+ ...feedbackDescriptorMetadata,
1750
+ schemaSource: feedbackSchemaSource(
1751
+ "FeedbackProcessorCheckpointSchema"
1752
+ ),
1753
+ execution: {
1754
+ method: "GET",
1755
+ path: "/api/admin/feedback/freshness",
1756
+ source: "near-future-route",
1757
+ notes: [
1758
+ "Returns freshness derived from canonical processor checkpoints only; no logs, exception text, or storage references are exposed."
1759
+ ]
1760
+ },
1761
+ input: {
1762
+ processor: stringField("Optional canonical processor filter.", {
1763
+ required: false,
1764
+ enum: [...MCP_ADMIN_FEEDBACK_PROCESSORS]
1765
+ })
1766
+ },
1767
+ output: {
1768
+ checkedAt: canonicalDateTimeField(
1769
+ "UTC time at which processor freshness was read."
1770
+ ),
1771
+ processors: arrayOfField(
1772
+ "Freshness derived from canonical feedback processor checkpoints.",
1773
+ "FeedbackProcessorFreshness",
1774
+ canonicalFreshnessProjectionField,
1775
+ { maxItems: MCP_ADMIN_FEEDBACK_PROCESSORS.length }
1776
+ )
1777
+ }
1778
+ },
1779
+ {
1780
+ name: "listFeedbackStructuredEntries",
1781
+ ...translatedDescription(
1782
+ mcpAdminContractDescriptionKeys.actionListFeedbackStructuredEntries
1783
+ ),
1784
+ ...feedbackDescriptorMetadata,
1785
+ schemaSource: feedbackSchemaSource(
1786
+ "FeedbackBugPacketSchema",
1787
+ "FeedbackReviewPacketSchema"
1788
+ ),
1789
+ execution: {
1790
+ method: "GET",
1791
+ path: "/api/admin/feedback/entries",
1792
+ source: "near-future-route",
1793
+ notes: [
1794
+ "Returns schema-validated identifier-free structured entries only; narrative, reporter control state, pixels, URLs, and direct storage references are never available.",
1795
+ "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.",
1796
+ "Only closed window selectors, allowlisted packet-specific filters, opaque cursors, and a maximum page size of 100 are accepted; unrestricted scans are not represented."
1797
+ ]
1798
+ },
1799
+ input: {
1800
+ filters: feedbackStructuredEntryFiltersField
1801
+ },
1802
+ output: {
1803
+ metadata: feedbackPageMetadataField(MCP_ADMIN_FEEDBACK_ENTRY_WINDOWS),
1804
+ items: arrayOfField(
1805
+ "Reporter-identifier-free structured feedback entries.",
1806
+ "FeedbackPacket",
1807
+ canonicalFeedbackPacketField,
1808
+ { maxItems: MCP_ADMIN_FEEDBACK_MAX_PAGE_SIZE }
1809
+ )
1810
+ }
1811
+ }
1812
+ ]);
389
1813
  var MCP_ADMIN_ACTIONS = [
390
1814
  {
391
1815
  name: "listFeatureFlags",
@@ -1152,6 +2576,342 @@ var MCP_ADMIN_ACTIONS = [
1152
2576
  )
1153
2577
  }
1154
2578
  },
2579
+ {
2580
+ name: "get_admin_token_economy_overview",
2581
+ ...translatedDescription(
2582
+ mcpAdminContractDescriptionKeys.actionGetAdminTokenEconomyOverview
2583
+ ),
2584
+ domain: "economy",
2585
+ rolloutFlag: MCP_ADMIN_ECONOMY_HISTORY_FLAG_ID,
2586
+ availability: "near-future",
2587
+ access: adminEconomyReadAccess,
2588
+ execution: {
2589
+ method: "GET",
2590
+ path: "/api/mcp/economy/token-overview",
2591
+ source: "near-future-route",
2592
+ notes: [
2593
+ "The hosted site must register this descriptor as a JSON-RPC MCP tool; publishing this package does not create the runtime route.",
2594
+ "The result is an identifier-free point read of the rebuildable authoritative projection and is never derived by summing a page.",
2595
+ "The tool is read-only and cannot resolve identity or mutate a Token balance."
2596
+ ]
2597
+ },
2598
+ input: {},
2599
+ output: {
2600
+ schemaVersion: stringField("Economy reporting contract version.", {
2601
+ enum: ["1"]
2602
+ }),
2603
+ generatedAt: stringField("UTC time the response was generated.", {
2604
+ format: "date-time"
2605
+ }),
2606
+ projectionAsOf: stringField(
2607
+ "UTC time of the included global projection.",
2608
+ { format: "date-time" }
2609
+ ),
2610
+ authoritySequence: stringField(
2611
+ "Canonical positive authority sequence through which the projection is current.",
2612
+ { format: "uint64-string" }
2613
+ ),
2614
+ walletCount: numberField("Total represented Token wallets.", {
2615
+ minimum: 0
2616
+ }),
2617
+ activeWalletCount: numberField("Active represented Token wallets.", {
2618
+ minimum: 0
2619
+ }),
2620
+ balances: adminTokenAggregateBalancesField,
2621
+ lifetime: adminTokenAggregateLifetimeField,
2622
+ rawIdentifiersIncluded: booleanField(
2623
+ "Always false for this identifier-free contract.",
2624
+ { default: false }
2625
+ )
2626
+ }
2627
+ },
2628
+ {
2629
+ name: "list_admin_token_wallet_balances",
2630
+ ...translatedDescription(
2631
+ mcpAdminContractDescriptionKeys.actionListAdminTokenWalletBalances
2632
+ ),
2633
+ domain: "economy",
2634
+ rolloutFlag: MCP_ADMIN_ECONOMY_HISTORY_FLAG_ID,
2635
+ availability: "near-future",
2636
+ access: adminEconomyReadAccess,
2637
+ execution: {
2638
+ method: "GET",
2639
+ path: "/api/mcp/economy/token-wallet-balances",
2640
+ source: "near-future-route",
2641
+ notes: [
2642
+ "The hosted site must register this descriptor as a JSON-RPC MCP tool; publishing this package does not create the runtime route.",
2643
+ "Responses are private/no-store and bounded to 100 pseudonymous projection rows.",
2644
+ "Raw account, wallet, household, payment, and provider identifiers are excluded and identity resolution is unavailable."
2645
+ ]
2646
+ },
2647
+ input: {
2648
+ limit: numberField("Maximum wallet balance rows to return.", {
2649
+ required: false,
2650
+ minimum: 1,
2651
+ maximum: 100,
2652
+ default: 100
2653
+ }),
2654
+ cursor: stringField(
2655
+ "Opaque query-bound cursor returned by the preceding page.",
2656
+ { required: false, format: "opaque-cursor" }
2657
+ ),
2658
+ components: arrayField(
2659
+ "Optional provider-neutral wallet-component filters.",
2660
+ "string",
2661
+ {
2662
+ required: false,
2663
+ enum: MCP_ADMIN_TOKEN_WALLET_COMPONENTS,
2664
+ maxItems: MCP_ADMIN_TOKEN_WALLET_COMPONENTS.length
2665
+ }
2666
+ ),
2667
+ statuses: arrayField("Optional wallet-status filters.", "string", {
2668
+ required: false,
2669
+ enum: MCP_ADMIN_TOKEN_WALLET_STATUSES,
2670
+ maxItems: MCP_ADMIN_TOKEN_WALLET_STATUSES.length
2671
+ }),
2672
+ subjectAlias: stringField(
2673
+ "Optional exact MCP-audience subject alias; raw account identifiers are not accepted.",
2674
+ { required: false, format: "pseudonymous-alias" }
2675
+ ),
2676
+ sort: stringField("Allowlisted stable wallet sort.", {
2677
+ required: false,
2678
+ enum: MCP_ADMIN_TOKEN_WALLET_SORTS,
2679
+ default: "available-desc"
2680
+ })
2681
+ },
2682
+ output: {
2683
+ schemaVersion: stringField("Economy reporting contract version.", {
2684
+ enum: ["1"]
2685
+ }),
2686
+ items: arrayField(
2687
+ "Pseudonymous wallet balances without raw account, wallet, household, payment, or provider identifiers.",
2688
+ "AdminTokenWalletBalanceEntryV1",
2689
+ {
2690
+ items: adminTokenWalletBalanceEntryField,
2691
+ maxItems: 100
2692
+ }
2693
+ ),
2694
+ hasMore: booleanField("Whether another bounded page exists."),
2695
+ nextCursor: stringField("Opaque cursor for the next page.", {
2696
+ required: false,
2697
+ format: "opaque-cursor"
2698
+ }),
2699
+ metadata: objectField("Privacy and normalized wallet query metadata.", {
2700
+ schemaVersion: stringField("Economy reporting contract version.", {
2701
+ enum: ["1"]
2702
+ }),
2703
+ generatedAt: stringField("UTC time the result was generated.", {
2704
+ format: "date-time"
2705
+ }),
2706
+ sort: stringField("Applied stable sort.", {
2707
+ enum: MCP_ADMIN_TOKEN_WALLET_SORTS
2708
+ }),
2709
+ pageLimit: numberField("Applied page bound.", {
2710
+ minimum: 1,
2711
+ maximum: 100
2712
+ }),
2713
+ audience: stringField("Pseudonym audience fixed by the MCP endpoint.", {
2714
+ enum: ["mcp-token-balances"]
2715
+ }),
2716
+ pseudonymVersion: stringField("Active opaque pseudonym key version."),
2717
+ rawIdentifiersIncluded: booleanField(
2718
+ "Always false for this public-safe contract.",
2719
+ { default: false }
2720
+ )
2721
+ })
2722
+ }
2723
+ },
2724
+ {
2725
+ name: "list_admin_token_activity",
2726
+ ...translatedDescription(
2727
+ mcpAdminContractDescriptionKeys.actionListAdminTokenActivity
2728
+ ),
2729
+ domain: "economy",
2730
+ rolloutFlag: MCP_ADMIN_ECONOMY_HISTORY_FLAG_ID,
2731
+ availability: "near-future",
2732
+ access: adminEconomyReadAccess,
2733
+ execution: {
2734
+ method: "GET",
2735
+ path: "/api/mcp/economy/token-activity",
2736
+ source: "near-future-route",
2737
+ notes: [
2738
+ "The hosted site must register this descriptor as a JSON-RPC MCP tool; publishing this package does not create the runtime route.",
2739
+ "Responses are private/no-store, bounded to 100 rows, and contain only audience-separated pseudonyms plus source-owned labels.",
2740
+ "The tool is read-only and cannot resolve a pseudonym or mutate a financial record."
2741
+ ]
2742
+ },
2743
+ input: {
2744
+ ...adminTokenReportingWindowInput,
2745
+ limit: numberField("Maximum activity rows to return.", {
2746
+ required: false,
2747
+ minimum: 1,
2748
+ maximum: 100,
2749
+ default: 100
2750
+ }),
2751
+ cursor: stringField(
2752
+ "Opaque query-bound cursor returned by the preceding page.",
2753
+ { required: false, format: "opaque-cursor" }
2754
+ ),
2755
+ activityTypes: arrayField(
2756
+ "Optional allowlisted activity-type filters.",
2757
+ "string",
2758
+ {
2759
+ required: false,
2760
+ enum: MCP_ADMIN_TOKEN_ACTIVITY_TYPES,
2761
+ maxItems: MCP_ADMIN_TOKEN_ACTIVITY_TYPES.length
2762
+ }
2763
+ ),
2764
+ statuses: arrayField("Optional allowlisted activity-status filters.", "string", {
2765
+ required: false,
2766
+ enum: MCP_ADMIN_TOKEN_ACTIVITY_STATUSES,
2767
+ maxItems: MCP_ADMIN_TOKEN_ACTIVITY_STATUSES.length
2768
+ }),
2769
+ sources: arrayField(
2770
+ "Optional provider-neutral source-group filters.",
2771
+ "string",
2772
+ {
2773
+ required: false,
2774
+ enum: MCP_ADMIN_TOKEN_ACTIVITY_SOURCES,
2775
+ maxItems: MCP_ADMIN_TOKEN_ACTIVITY_SOURCES.length
2776
+ }
2777
+ ),
2778
+ subjectAlias: stringField(
2779
+ "Optional exact MCP-audience subject alias; raw account identifiers are not accepted.",
2780
+ { required: false, format: "pseudonymous-alias" }
2781
+ ),
2782
+ sort: stringField("Allowlisted stable sort.", {
2783
+ required: false,
2784
+ enum: MCP_ADMIN_TOKEN_ACTIVITY_SORTS,
2785
+ default: "occurred-at-desc"
2786
+ })
2787
+ },
2788
+ output: {
2789
+ schemaVersion: stringField("Economy reporting contract version.", {
2790
+ enum: ["1"]
2791
+ }),
2792
+ items: arrayField(
2793
+ "Pseudonymous activity rows; no account, wallet, transaction, order, payment, provider-event, idempotency, or journal-integrity identifiers.",
2794
+ "AdminTokenActivityEntryV1",
2795
+ {
2796
+ items: adminTokenActivityEntryField,
2797
+ maxItems: 100
2798
+ }
2799
+ ),
2800
+ hasMore: booleanField("Whether another bounded page exists."),
2801
+ nextCursor: stringField("Opaque cursor for the next page.", {
2802
+ required: false,
2803
+ format: "opaque-cursor"
2804
+ }),
2805
+ metadata: objectField("Privacy and normalized query metadata.", {
2806
+ schemaVersion: stringField("Economy reporting contract version.", {
2807
+ enum: ["1"]
2808
+ }),
2809
+ generatedAt: stringField("UTC time the result was generated.", {
2810
+ format: "date-time"
2811
+ }),
2812
+ fromInclusive: stringField("Normalized inclusive UTC window start.", {
2813
+ format: "date-time"
2814
+ }),
2815
+ toExclusive: stringField("Normalized exclusive UTC window end.", {
2816
+ format: "date-time"
2817
+ }),
2818
+ sort: stringField("Applied stable sort.", {
2819
+ enum: MCP_ADMIN_TOKEN_ACTIVITY_SORTS
2820
+ }),
2821
+ pageLimit: numberField("Applied page bound.", {
2822
+ minimum: 1,
2823
+ maximum: 100
2824
+ }),
2825
+ audience: stringField("Pseudonym audience fixed by the MCP endpoint.", {
2826
+ enum: ["mcp-token-activity"]
2827
+ }),
2828
+ pseudonymVersion: stringField("Active opaque pseudonym key version."),
2829
+ rawIdentifiersIncluded: booleanField(
2830
+ "Always false for this public-safe contract.",
2831
+ { default: false }
2832
+ )
2833
+ })
2834
+ }
2835
+ },
2836
+ {
2837
+ name: "get_admin_token_trends",
2838
+ ...translatedDescription(
2839
+ mcpAdminContractDescriptionKeys.actionGetAdminTokenTrends
2840
+ ),
2841
+ domain: "economy",
2842
+ rolloutFlag: MCP_ADMIN_ECONOMY_HISTORY_FLAG_ID,
2843
+ availability: "near-future",
2844
+ access: adminEconomyReadAccess,
2845
+ execution: {
2846
+ method: "GET",
2847
+ path: "/api/mcp/economy/token-trends",
2848
+ source: "near-future-route",
2849
+ notes: [
2850
+ "The hosted site must register this descriptor as a JSON-RPC MCP tool; publishing this package does not create the runtime route.",
2851
+ "Cohorts below five are suppression markers with no counts, amounts, aliases, or anomaly details.",
2852
+ "Anomalies are explainable review signals and never mutate financial records."
2853
+ ]
2854
+ },
2855
+ input: {
2856
+ ...adminTokenReportingWindowInput,
2857
+ granularity: stringField("Hourly or daily UTC aggregation.", {
2858
+ required: false,
2859
+ enum: ["hour", "day"],
2860
+ default: "day"
2861
+ }),
2862
+ activityTypes: arrayField(
2863
+ "Optional allowlisted trend activity types.",
2864
+ "string",
2865
+ {
2866
+ required: false,
2867
+ enum: MCP_ADMIN_TOKEN_ACTIVITY_TYPES,
2868
+ maxItems: MCP_ADMIN_TOKEN_ACTIVITY_TYPES.length
2869
+ }
2870
+ )
2871
+ },
2872
+ output: {
2873
+ schemaVersion: stringField("Economy reporting contract version.", {
2874
+ enum: ["1"]
2875
+ }),
2876
+ series: arrayField(
2877
+ "Bounded, stably ordered trend points.",
2878
+ "AdminTokenTrendPointV1",
2879
+ {
2880
+ items: adminTokenTrendPointField,
2881
+ maxItems: 1e3
2882
+ }
2883
+ ),
2884
+ metadata: objectField("Trend privacy and baseline metadata.", {
2885
+ schemaVersion: stringField("Economy reporting contract version.", {
2886
+ enum: ["1"]
2887
+ }),
2888
+ generatedAt: stringField("UTC time the result was generated.", {
2889
+ format: "date-time"
2890
+ }),
2891
+ fromInclusive: stringField("Normalized inclusive UTC window start.", {
2892
+ format: "date-time"
2893
+ }),
2894
+ toExclusive: stringField("Normalized exclusive UTC window end.", {
2895
+ format: "date-time"
2896
+ }),
2897
+ granularity: stringField("Applied UTC aggregation granularity.", {
2898
+ enum: ["hour", "day"]
2899
+ }),
2900
+ minimumCohortSize: numberField(
2901
+ "Fixed minimum distinct-subject cohort before aggregate disclosure.",
2902
+ { minimum: 5, maximum: 5, default: 5 }
2903
+ ),
2904
+ anomalyBaselineDays: numberField(
2905
+ "Fixed same-window median/MAD baseline length.",
2906
+ { minimum: 28, maximum: 28, default: 28 }
2907
+ ),
2908
+ rawIdentifiersIncluded: booleanField(
2909
+ "Always false for this public-safe contract.",
2910
+ { default: false }
2911
+ )
2912
+ })
2913
+ }
2914
+ },
1155
2915
  {
1156
2916
  name: "searchAssetCatalog",
1157
2917
  ...translatedDescription(mcpAdminContractDescriptionKeys.actionSearchAssetCatalog),
@@ -1482,7 +3242,256 @@ var MCP_ADMIN_ACTIONS = [
1482
3242
  plannedOperations: arrayField("Processing or review operations planned for the job.", "string"),
1483
3243
  evidence: arrayField("Review and processing evidence references available to the caller.", "AssetEvidence")
1484
3244
  }
1485
- }
3245
+ },
3246
+ {
3247
+ name: "getUserTokenWallet",
3248
+ ...translatedDescription(mcpAdminContractDescriptionKeys.actionGetUserTokenWallet),
3249
+ domain: "economyAdjustments",
3250
+ rolloutFlag: MCP_ADMIN_ECONOMY_ADJUSTMENTS_FLAG_ID,
3251
+ availability: "near-future",
3252
+ requiredCapability: MCP_ECONOMY_FINANCE_VIEW_CAPABILITY,
3253
+ requiredTokenScopes: ["mcp:access", MCP_ECONOMY_FINANCE_VIEW_CAPABILITY],
3254
+ execution: {
3255
+ method: "GET",
3256
+ path: "/api/mcp/economy/users/{accountId}/wallet",
3257
+ source: "near-future-route",
3258
+ notes: [
3259
+ "The backend resolves the personal wallet from the account id; callers cannot select an arbitrary wallet."
3260
+ ]
3261
+ },
3262
+ input: {
3263
+ accountId: stringField("Stable target account identifier.", { required: true })
3264
+ },
3265
+ output: {
3266
+ wallet: objectField("Authorized Token wallet summary.", {
3267
+ accountId: stringField("Stable target account identifier."),
3268
+ initialized: booleanField(
3269
+ "Whether the authoritative personal wallet has been initialized."
3270
+ ),
3271
+ walletId: stringField("Server-resolved wallet identifier.", {
3272
+ required: false
3273
+ }),
3274
+ walletKind: stringField("Server-resolved wallet kind.", { enum: ["personal"] }),
3275
+ availableTokenSubunits: stringField("Exact available TokenSubunits as base-10 text."),
3276
+ heldTokenSubunits: stringField("Exact held TokenSubunits as base-10 text."),
3277
+ lifetimeCreditedTokenSubunits: stringField(
3278
+ "Exact lifetime credited TokenSubunits as base-10 text."
3279
+ ),
3280
+ lifetimeReversedTokenSubunits: stringField(
3281
+ "Exact lifetime reversed TokenSubunits as base-10 text."
3282
+ ),
3283
+ projectionVersion: stringField("Optimistic concurrency projection version.", {
3284
+ required: false
3285
+ })
3286
+ })
3287
+ }
3288
+ },
3289
+ {
3290
+ name: "listUserTokenActivity",
3291
+ ...translatedDescription(mcpAdminContractDescriptionKeys.actionListUserTokenActivity),
3292
+ domain: "economyAdjustments",
3293
+ rolloutFlag: MCP_ADMIN_ECONOMY_ADJUSTMENTS_FLAG_ID,
3294
+ availability: "near-future",
3295
+ requiredCapability: MCP_ECONOMY_FINANCE_VIEW_CAPABILITY,
3296
+ requiredTokenScopes: ["mcp:access", MCP_ECONOMY_FINANCE_VIEW_CAPABILITY],
3297
+ execution: {
3298
+ method: "GET",
3299
+ path: "/api/mcp/economy/users/{accountId}/activity",
3300
+ source: "near-future-route"
3301
+ },
3302
+ input: {
3303
+ accountId: stringField("Stable target account identifier.", { required: true }),
3304
+ cursor: stringField("Opaque continuation cursor.", { required: false }),
3305
+ limit: numberField("Maximum results; the backend applies a bounded ceiling.", {
3306
+ required: false
3307
+ })
3308
+ },
3309
+ output: {
3310
+ items: arrayField("Immutable Token activity entries.", "WalletActivityEntryV1"),
3311
+ nextCursor: stringField("Opaque cursor for the next page.", { required: false })
3312
+ }
3313
+ },
3314
+ {
3315
+ name: "listTokenAdjustments",
3316
+ ...translatedDescription(mcpAdminContractDescriptionKeys.actionListTokenAdjustments),
3317
+ domain: "economyAdjustments",
3318
+ rolloutFlag: MCP_ADMIN_ECONOMY_ADJUSTMENTS_FLAG_ID,
3319
+ availability: "near-future",
3320
+ requiredCapability: MCP_ECONOMY_FINANCE_VIEW_CAPABILITY,
3321
+ requiredTokenScopes: ["mcp:access", MCP_ECONOMY_FINANCE_VIEW_CAPABILITY],
3322
+ execution: {
3323
+ method: "GET",
3324
+ path: "/api/mcp/economy/adjustments",
3325
+ source: "near-future-route"
3326
+ },
3327
+ input: {
3328
+ targetAccountId: stringField("Optional target account filter.", { required: false }),
3329
+ status: stringField("Optional workflow status filter.", {
3330
+ required: false,
3331
+ enum: ["pending", "approved", "rejected", "executed", "failed", "expired"]
3332
+ }),
3333
+ cursor: stringField("Opaque continuation cursor.", { required: false }),
3334
+ limit: numberField("Maximum results; the backend applies a bounded ceiling.", {
3335
+ required: false
3336
+ })
3337
+ },
3338
+ output: {
3339
+ items: arrayField("Audited adjustment workflow records.", "OperatorAdjustmentProposalV1"),
3340
+ nextCursor: stringField("Opaque cursor for the next page.", { required: false })
3341
+ }
3342
+ },
3343
+ {
3344
+ name: "proposeTokenCredit",
3345
+ ...translatedDescription(mcpAdminContractDescriptionKeys.actionProposeTokenCredit),
3346
+ domain: "economyAdjustments",
3347
+ rolloutFlag: MCP_ADMIN_ECONOMY_ADJUSTMENTS_FLAG_ID,
3348
+ availability: "near-future",
3349
+ requiredCapability: MCP_ECONOMY_FINANCE_ADJUST_CAPABILITY,
3350
+ requiredTokenScopes: ["mcp:access", MCP_ECONOMY_FINANCE_ADJUST_CAPABILITY],
3351
+ execution: {
3352
+ method: "POST",
3353
+ path: "/api/mcp/economy/adjustments/token-credits",
3354
+ source: "near-future-route",
3355
+ notes: [
3356
+ "This creates a preview-bound proposal only; it does not credit the wallet until a distinct owner approves it.",
3357
+ "Raw idempotency keys and ticket references are fingerprinted before authoritative persistence."
3358
+ ]
3359
+ },
3360
+ input: {
3361
+ targetAccountId: stringField("Stable target account identifier.", { required: true }),
3362
+ targetWalletKind: stringField("Permitted server-resolved wallet kind.", {
3363
+ required: true,
3364
+ enum: ["personal"]
3365
+ }),
3366
+ amountTokenSubunits: stringField(
3367
+ "Exact positive base-10 TokenSubunit amount; 1 Token is 1,000 subunits.",
3368
+ { required: true }
3369
+ ),
3370
+ reasonCode: stringField("Allowlisted operator reason code.", { required: true }),
3371
+ ticketReference: stringField("Support or change ticket reference.", { required: true }),
3372
+ idempotencyKey: stringField("Caller-generated idempotency key.", { required: true })
3373
+ },
3374
+ output: tokenAdjustmentOutput,
3375
+ verification: {
3376
+ method: "GET",
3377
+ path: "/api/mcp/economy/adjustments",
3378
+ query: ["adjustmentId={adjustmentId}"],
3379
+ ...translatedDescription(
3380
+ mcpAdminContractDescriptionKeys.verificationTokenAdjustment
3381
+ )
3382
+ }
3383
+ },
3384
+ {
3385
+ name: "approveTokenCredit",
3386
+ ...translatedDescription(mcpAdminContractDescriptionKeys.actionApproveTokenCredit),
3387
+ domain: "economyAdjustments",
3388
+ rolloutFlag: MCP_ADMIN_ECONOMY_ADJUSTMENTS_FLAG_ID,
3389
+ availability: "near-future",
3390
+ requiredCapability: MCP_ECONOMY_FINANCE_APPROVE_CAPABILITY,
3391
+ requiredTokenScopes: [
3392
+ "mcp:access",
3393
+ MCP_ECONOMY_FINANCE_APPROVE_CAPABILITY
3394
+ ],
3395
+ execution: {
3396
+ method: "POST",
3397
+ path: "/api/mcp/economy/adjustments/{adjustmentId}/approve",
3398
+ source: "near-future-route",
3399
+ notes: [
3400
+ "The authenticated approver must be a different stable platform-owner account from the proposer."
3401
+ ]
3402
+ },
3403
+ input: {
3404
+ adjustmentId: stringField("Stable pending adjustment identifier.", { required: true }),
3405
+ expectedPreviewHash: stringField("Preview hash displayed to the approver.", {
3406
+ required: true
3407
+ }),
3408
+ expectedProposalHash: stringField("Proposal hash displayed to the approver.", {
3409
+ required: true
3410
+ }),
3411
+ idempotencyKey: stringField("Caller-generated idempotency key.", { required: true })
3412
+ },
3413
+ output: tokenAdjustmentOutput,
3414
+ verification: {
3415
+ method: "GET",
3416
+ path: "/api/mcp/economy/adjustments",
3417
+ query: ["adjustmentId={adjustmentId}"],
3418
+ ...translatedDescription(
3419
+ mcpAdminContractDescriptionKeys.verificationTokenAdjustment
3420
+ )
3421
+ }
3422
+ },
3423
+ {
3424
+ name: "rejectTokenCredit",
3425
+ ...translatedDescription(mcpAdminContractDescriptionKeys.actionRejectTokenCredit),
3426
+ domain: "economyAdjustments",
3427
+ rolloutFlag: MCP_ADMIN_ECONOMY_ADJUSTMENTS_FLAG_ID,
3428
+ availability: "near-future",
3429
+ requiredCapability: MCP_ECONOMY_FINANCE_APPROVE_CAPABILITY,
3430
+ requiredTokenScopes: [
3431
+ "mcp:access",
3432
+ MCP_ECONOMY_FINANCE_APPROVE_CAPABILITY
3433
+ ],
3434
+ execution: {
3435
+ method: "POST",
3436
+ path: "/api/mcp/economy/adjustments/{adjustmentId}/reject",
3437
+ source: "near-future-route"
3438
+ },
3439
+ input: {
3440
+ adjustmentId: stringField("Stable pending adjustment identifier.", { required: true }),
3441
+ expectedPreviewHash: stringField("Preview hash displayed to the approver.", {
3442
+ required: true
3443
+ }),
3444
+ expectedProposalHash: stringField("Proposal hash displayed to the approver.", {
3445
+ required: true
3446
+ }),
3447
+ reasonCode: stringField("Allowlisted rejection reason code.", { required: true }),
3448
+ idempotencyKey: stringField("Caller-generated idempotency key.", { required: true })
3449
+ },
3450
+ output: tokenAdjustmentOutput,
3451
+ verification: {
3452
+ method: "GET",
3453
+ path: "/api/mcp/economy/adjustments",
3454
+ query: ["adjustmentId={adjustmentId}"],
3455
+ ...translatedDescription(
3456
+ mcpAdminContractDescriptionKeys.verificationTokenAdjustment
3457
+ )
3458
+ }
3459
+ },
3460
+ {
3461
+ name: "reverseTokenCredit",
3462
+ ...translatedDescription(mcpAdminContractDescriptionKeys.actionReverseTokenCredit),
3463
+ domain: "economyAdjustments",
3464
+ rolloutFlag: MCP_ADMIN_ECONOMY_ADJUSTMENTS_FLAG_ID,
3465
+ availability: "near-future",
3466
+ requiredCapability: MCP_ECONOMY_FINANCE_ADJUST_CAPABILITY,
3467
+ requiredTokenScopes: ["mcp:access", MCP_ECONOMY_FINANCE_ADJUST_CAPABILITY],
3468
+ execution: {
3469
+ method: "POST",
3470
+ path: "/api/mcp/economy/adjustments/{adjustmentId}/reverse",
3471
+ source: "near-future-route",
3472
+ notes: [
3473
+ "A reversal is a separately approved compensating transaction; the original credit is never updated or deleted."
3474
+ ]
3475
+ },
3476
+ input: {
3477
+ originalAdjustmentId: stringField("Executed credit adjustment to reverse.", {
3478
+ required: true
3479
+ }),
3480
+ reasonCode: stringField("Allowlisted reversal reason code.", { required: true }),
3481
+ ticketReference: stringField("Support or change ticket reference.", { required: true }),
3482
+ idempotencyKey: stringField("Caller-generated idempotency key.", { required: true })
3483
+ },
3484
+ output: tokenAdjustmentOutput,
3485
+ verification: {
3486
+ method: "GET",
3487
+ path: "/api/mcp/economy/adjustments",
3488
+ query: ["adjustmentId={adjustmentId}"],
3489
+ ...translatedDescription(
3490
+ mcpAdminContractDescriptionKeys.verificationTokenAdjustment
3491
+ )
3492
+ }
3493
+ },
3494
+ ...MCP_ADMIN_FEEDBACK_ACTIONS
1486
3495
  ];
1487
3496
  function listMcpActionSummaries() {
1488
3497
  return MCP_ADMIN_ACTIONS.map((action) => ({
@@ -1492,8 +3501,14 @@ function listMcpActionSummaries() {
1492
3501
  descriptionDefault: action.descriptionDefault,
1493
3502
  domain: action.domain,
1494
3503
  rolloutFlag: action.rolloutFlag,
3504
+ ...action.oauthScopes === void 0 ? {} : { oauthScopes: action.oauthScopes },
3505
+ ...action.privacy === void 0 ? {} : { privacy: action.privacy },
3506
+ ...action.schemaSource === void 0 ? {} : { schemaSource: action.schemaSource },
1495
3507
  availability: action.availability,
1496
- execution: action.execution
3508
+ execution: action.execution,
3509
+ requiredCapability: action.requiredCapability,
3510
+ requiredTokenScopes: action.requiredTokenScopes,
3511
+ access: action.access
1497
3512
  }));
1498
3513
  }
1499
3514
  var MCP_ADMIN_CONTEXT_SHAPE = {
@@ -1537,7 +3552,8 @@ var MCP_ADMIN_EXTENSION_RULES = {
1537
3552
  singleResourceMutations: true,
1538
3553
  notes: [
1539
3554
  "Future game/admin asset actions must reuse the same descriptor shape instead of adding a second discovery contract.",
1540
- "New descriptors must define rolloutFlag, execution mapping, input shape, output shape, and verification notes where applicable."
3555
+ "New descriptors must define rolloutFlag, execution mapping, input shape, output shape, and verification notes where applicable.",
3556
+ "Sensitive read descriptors must publish their OAuth scope, capability, rollout, read-only, and identity-resolution metadata without treating discovery as authorization."
1541
3557
  ]
1542
3558
  };
1543
3559
  function buildMcpSurfaceUrls(origin) {
@@ -1574,7 +3590,7 @@ function buildAiPluginManifest(origin) {
1574
3590
  client_url: `${urls.apiBaseUrl}/login`,
1575
3591
  authorization_url: `${urls.apiBaseUrl}/oauth/authorize`,
1576
3592
  token_url: `${urls.apiBaseUrl}/oauth/token`,
1577
- scope: "openid email profile",
3593
+ scope: `openid email profile ${MCP_ACCESS_SCOPE}`,
1578
3594
  authorization_content_type: "application/x-www-form-urlencoded",
1579
3595
  instructions: "Sign in with an admin-capable Google or Microsoft account to access the Plasius MCP control plane."
1580
3596
  }
@@ -1594,10 +3610,16 @@ function buildMcpSchemaResponse() {
1594
3610
  {
1595
3611
  domain: action.domain,
1596
3612
  rolloutFlag: action.rolloutFlag,
3613
+ ...action.oauthScopes === void 0 ? {} : { oauthScopes: action.oauthScopes },
3614
+ ...action.privacy === void 0 ? {} : { privacy: action.privacy },
3615
+ ...action.schemaSource === void 0 ? {} : { schemaSource: action.schemaSource },
1597
3616
  availability: action.availability,
1598
3617
  execution: action.execution,
1599
3618
  input: action.input,
1600
3619
  output: action.output,
3620
+ requiredCapability: action.requiredCapability,
3621
+ requiredTokenScopes: action.requiredTokenScopes,
3622
+ access: action.access,
1601
3623
  verification: action.verification
1602
3624
  }
1603
3625
  ])
@@ -1642,6 +3664,18 @@ function buildMcpActionFamilies() {
1642
3664
  rolloutFlag: MCP_ADMIN_ANALYTICS_FLAG_ID,
1643
3665
  actions: getActionsByDomain("userAggregation")
1644
3666
  },
3667
+ {
3668
+ domain: "economy",
3669
+ rolloutFlag: MCP_ADMIN_ECONOMY_HISTORY_FLAG_ID,
3670
+ actions: getActionsByDomain("economy")
3671
+ },
3672
+ {
3673
+ domain: "feedback",
3674
+ rolloutFlag: MCP_ADMIN_FEEDBACK_FLAG_ID,
3675
+ requiredCapability: MCP_ADMIN_FEEDBACK_READ_CAPABILITY,
3676
+ oauthScopes: [...MCP_ADMIN_FEEDBACK_REQUIRED_OAUTH_SCOPES],
3677
+ actions: getActionsByDomain("feedback")
3678
+ },
1645
3679
  {
1646
3680
  domain: "assetCatalog",
1647
3681
  rolloutFlag: MCP_ASSET_PIPELINE_FLAG_ID,
@@ -1662,6 +3696,11 @@ function buildMcpActionFamilies() {
1662
3696
  rolloutFlag: MCP_ASSET_PIPELINE_FLAG_ID,
1663
3697
  actions: getActionsByDomain("assetReview")
1664
3698
  },
3699
+ {
3700
+ domain: "economyAdjustments",
3701
+ rolloutFlag: MCP_ADMIN_ECONOMY_ADJUSTMENTS_FLAG_ID,
3702
+ actions: getActionsByDomain("economyAdjustments")
3703
+ },
1665
3704
  {
1666
3705
  domain: "productionReadiness",
1667
3706
  rolloutFlag: MCP_ADMIN_PRODUCTION_READINESS_FLAG_ID,
@@ -1697,14 +3736,41 @@ function normalizeOptionalString(value) {
1697
3736
  }
1698
3737
  // Annotate the CommonJS export names for ESM import in node:
1699
3738
  0 && (module.exports = {
3739
+ ECONOMY_ADMIN_HISTORY_FLAG_ID,
3740
+ ECONOMY_FINANCE_OPERATIONS_VIEW_CAPABILITY,
3741
+ ECONOMY_OWNER_ADJUSTMENTS_FLAG_ID,
3742
+ MCP_ACCESS_SCOPE,
1700
3743
  MCP_ADMIN_ACTIONS,
1701
3744
  MCP_ADMIN_ANALYTICS_DIMENSIONS,
1702
3745
  MCP_ADMIN_ANALYTICS_FLAG_ID,
1703
3746
  MCP_ADMIN_ANALYTICS_METRICS,
1704
3747
  MCP_ADMIN_ANALYTICS_PRESETS,
3748
+ MCP_ADMIN_BASE_OAUTH_SCOPE,
1705
3749
  MCP_ADMIN_CONTEXT_SHAPE,
1706
3750
  MCP_ADMIN_CONTRACT_VERSION,
3751
+ MCP_ADMIN_ECONOMY_ADJUSTMENTS_FLAG_ID,
3752
+ MCP_ADMIN_ECONOMY_HISTORY_FLAG_ID,
3753
+ MCP_ADMIN_ECONOMY_READ_CAPABILITY,
1707
3754
  MCP_ADMIN_EXTENSION_RULES,
3755
+ MCP_ADMIN_FEEDBACK_ACTIONS,
3756
+ MCP_ADMIN_FEEDBACK_ALERT_WINDOWS,
3757
+ MCP_ADMIN_FEEDBACK_BUG_HEALTH_WINDOWS,
3758
+ MCP_ADMIN_FEEDBACK_ENTRY_WINDOWS,
3759
+ MCP_ADMIN_FEEDBACK_FLAG_ID,
3760
+ MCP_ADMIN_FEEDBACK_MAX_CURSOR_LENGTH,
3761
+ MCP_ADMIN_FEEDBACK_MAX_PAGE_SIZE,
3762
+ MCP_ADMIN_FEEDBACK_PACKET_TYPES,
3763
+ MCP_ADMIN_FEEDBACK_PRIVACY_EXCLUSIONS,
3764
+ MCP_ADMIN_FEEDBACK_PRIVACY_METADATA,
3765
+ MCP_ADMIN_FEEDBACK_PROCESSORS,
3766
+ MCP_ADMIN_FEEDBACK_READ_CAPABILITY,
3767
+ MCP_ADMIN_FEEDBACK_READ_OAUTH_SCOPE,
3768
+ MCP_ADMIN_FEEDBACK_REPORT_TYPES,
3769
+ MCP_ADMIN_FEEDBACK_REQUIRED_OAUTH_SCOPES,
3770
+ MCP_ADMIN_FEEDBACK_SATISFACTION_WINDOWS,
3771
+ MCP_ADMIN_FEEDBACK_SCHEMA_CONTRACT_VERSION,
3772
+ MCP_ADMIN_FEEDBACK_SCHEMA_PACKAGE,
3773
+ MCP_ADMIN_FEEDBACK_WINDOWS,
1708
3774
  MCP_ADMIN_FOUNDATION_DISABLED_CODE,
1709
3775
  MCP_ADMIN_FOUNDATION_ENV_VAR,
1710
3776
  MCP_ADMIN_FOUNDATION_FLAG_ID,
@@ -1712,6 +3778,13 @@ function normalizeOptionalString(value) {
1712
3778
  MCP_ADMIN_PRODUCTION_READINESS_ENV_VAR,
1713
3779
  MCP_ADMIN_PRODUCTION_READINESS_FLAG_ID,
1714
3780
  MCP_ADMIN_REGISTRY_SOURCE,
3781
+ MCP_ADMIN_TOKEN_ACTIVITY_SORTS,
3782
+ MCP_ADMIN_TOKEN_ACTIVITY_SOURCES,
3783
+ MCP_ADMIN_TOKEN_ACTIVITY_STATUSES,
3784
+ MCP_ADMIN_TOKEN_ACTIVITY_TYPES,
3785
+ MCP_ADMIN_TOKEN_WALLET_COMPONENTS,
3786
+ MCP_ADMIN_TOKEN_WALLET_SORTS,
3787
+ MCP_ADMIN_TOKEN_WALLET_STATUSES,
1715
3788
  MCP_ADMIN_USER_AGGREGATION_DIMENSIONS,
1716
3789
  MCP_ADMIN_USER_AGGREGATION_METRICS,
1717
3790
  MCP_ADMIN_USER_AGGREGATION_PRESETS,
@@ -1725,6 +3798,9 @@ function normalizeOptionalString(value) {
1725
3798
  MCP_ASSET_SOURCE_ADAPTERS,
1726
3799
  MCP_ASSET_SOURCE_MANAGE_CAPABILITY,
1727
3800
  MCP_ASSET_SOURCE_TIERS,
3801
+ MCP_ECONOMY_FINANCE_ADJUST_CAPABILITY,
3802
+ MCP_ECONOMY_FINANCE_APPROVE_CAPABILITY,
3803
+ MCP_ECONOMY_FINANCE_VIEW_CAPABILITY,
1728
3804
  buildAiPluginManifest,
1729
3805
  buildMcpContextResponse,
1730
3806
  buildMcpDiscoveryResponse,