@plasius/mcp-admin-contracts 0.5.0 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +54 -0
- package/README.md +87 -7
- package/dist/index.cjs +272 -13
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +100 -7
- package/dist/index.d.ts +100 -7
- package/dist/index.js +278 -13
- package/dist/index.js.map +1 -1
- package/docs/adrs/adr-0006-canonical-model-resolution-discovery.md +66 -0
- package/docs/adrs/adr-0007-safe-game-reconstruction-point-read.md +81 -0
- package/docs/adrs/index.md +2 -0
- package/package.json +3 -1
package/dist/index.js
CHANGED
|
@@ -16,10 +16,27 @@ import {
|
|
|
16
16
|
FEEDBACK_VIEWPORT_BUCKETS,
|
|
17
17
|
FeedbackBugPacketSchema,
|
|
18
18
|
FeedbackDailySatisfactionReportSchema,
|
|
19
|
+
FeedbackGameReconstructionManifestSchema,
|
|
19
20
|
FeedbackHourlyBugReportSchema,
|
|
20
21
|
FeedbackProcessorCheckpointSchema,
|
|
21
22
|
FeedbackReviewPacketSchema
|
|
22
23
|
} from "@plasius/schema";
|
|
24
|
+
import { MODEL_RESOLUTION_CONTRACT_VERSION } from "@plasius/asset-contracts";
|
|
25
|
+
import {
|
|
26
|
+
ASSET_MCP_PACKAGE,
|
|
27
|
+
MODEL_MCP_CATALOG_CONFIRM_CAPABILITY,
|
|
28
|
+
MODEL_MCP_CATALOG_REQUEST_CAPABILITY,
|
|
29
|
+
MODEL_MCP_CATALOG_REVIEW_CAPABILITY,
|
|
30
|
+
MODEL_MCP_CONTRACT_VERSION,
|
|
31
|
+
MODEL_MCP_EXTERNAL_HARVEST_FEATURE_FLAG_ID,
|
|
32
|
+
MODEL_MCP_GENERATION_FEATURE_FLAG_ID,
|
|
33
|
+
MODEL_MCP_PIPELINE_MANAGE_CAPABILITY,
|
|
34
|
+
MODEL_MCP_SOURCE_MANAGE_CAPABILITY,
|
|
35
|
+
MODEL_MCP_TOOL_NAMES,
|
|
36
|
+
MODEL_MCP_UNIFIED_FEATURE_FLAG_ID,
|
|
37
|
+
listModelMcpResourceTemplates,
|
|
38
|
+
listModelMcpToolDefinitions
|
|
39
|
+
} from "@plasius/asset-mcp";
|
|
23
40
|
|
|
24
41
|
// src/translations/en-GB.ts
|
|
25
42
|
var mcpAdminContractsEnGbTranslations = {
|
|
@@ -53,6 +70,7 @@ var mcpAdminContractsEnGbTranslations = {
|
|
|
53
70
|
"mcpAdminContracts.action.listFeedbackAlerts.description": "List bounded deterministic feedback advisories using an opaque cursor.",
|
|
54
71
|
"mcpAdminContracts.action.getFeedbackFreshness.description": "Read safe freshness metadata for the hourly bug and daily satisfaction processors.",
|
|
55
72
|
"mcpAdminContracts.action.listFeedbackStructuredEntries.description": "List bounded reporter-identifier-free structured feedback entries without narrative or storage references.",
|
|
73
|
+
"mcpAdminContracts.action.getFeedbackGameReconstruction.description": "Read one clearly labelled safe in-game reconstruction manifest without captured pixels, narrative, reporter identity, or storage references.",
|
|
56
74
|
"mcpAdminContracts.action.searchAssetCatalog.description": "Search promoted asset catalog records without live third-party lookup.",
|
|
57
75
|
"mcpAdminContracts.action.getAssetManifest.description": "Fetch a promoted player-safe runtime asset manifest reference.",
|
|
58
76
|
"mcpAdminContracts.action.requestAsset.description": "Queue a governed missing-asset request when no promoted catalog match exists.",
|
|
@@ -66,6 +84,14 @@ var mcpAdminContractsEnGbTranslations = {
|
|
|
66
84
|
"mcpAdminContracts.action.promoteAsset.description": "Promote an approved asset candidate to an immutable runtime manifest reference.",
|
|
67
85
|
"mcpAdminContracts.action.rollbackAsset.description": "Rollback an asset runtime channel to a previous promoted manifest version.",
|
|
68
86
|
"mcpAdminContracts.action.getAssetJobStatus.description": "Read governed asset job status, planned processing work, and evidence references.",
|
|
87
|
+
"mcpAdminContracts.action.listModelSearchRankers.description": "List allowlisted, calibrated model-search rankers and their current readiness without selecting a substitute.",
|
|
88
|
+
"mcpAdminContracts.action.searchModelCatalog.description": "Search promoted model catalog versions using hard constraints and one exact calibrated ranker selection.",
|
|
89
|
+
"mcpAdminContracts.action.resolveModelRequest.description": "Search the catalog and idempotently create asynchronous provider or generator fallback work when needed.",
|
|
90
|
+
"mcpAdminContracts.action.getModelResolution.description": "Read an owned immutable model-resolution revision, progress, questions, and review evidence.",
|
|
91
|
+
"mcpAdminContracts.action.confirmModelCandidate.description": "Confirm one exact four-view candidate; low assurance additionally requires explicit semantic-risk acceptance.",
|
|
92
|
+
"mcpAdminContracts.action.retryModelResolution.description": "Create the next immutable request revision from bounded refinement answers and candidate exclusions.",
|
|
93
|
+
"mcpAdminContracts.action.cancelModelResolution.description": "Idempotently cancel unfinished work owned by the requester.",
|
|
94
|
+
"mcpAdminContracts.action.rebuildModelCatalogIndex.description": "Run an operator-only idempotent full, backfill, or repair rebuild of the promoted model catalog index.",
|
|
69
95
|
"mcpAdminContracts.action.getUserTokenWallet.description": "Read an account's server-resolved Token wallet summary without exposing provider or payment data.",
|
|
70
96
|
"mcpAdminContracts.action.listUserTokenActivity.description": "Read a bounded, cursor-paginated Token activity history for one account.",
|
|
71
97
|
"mcpAdminContracts.action.listTokenAdjustments.description": "List audited Token adjustment proposals and their approval state.",
|
|
@@ -115,6 +141,7 @@ var mcpAdminContractDescriptionKeys = {
|
|
|
115
141
|
actionListFeedbackAlerts: "mcpAdminContracts.action.listFeedbackAlerts.description",
|
|
116
142
|
actionGetFeedbackFreshness: "mcpAdminContracts.action.getFeedbackFreshness.description",
|
|
117
143
|
actionListFeedbackStructuredEntries: "mcpAdminContracts.action.listFeedbackStructuredEntries.description",
|
|
144
|
+
actionGetFeedbackGameReconstruction: "mcpAdminContracts.action.getFeedbackGameReconstruction.description",
|
|
118
145
|
actionSearchAssetCatalog: "mcpAdminContracts.action.searchAssetCatalog.description",
|
|
119
146
|
actionGetAssetManifest: "mcpAdminContracts.action.getAssetManifest.description",
|
|
120
147
|
actionRequestAsset: "mcpAdminContracts.action.requestAsset.description",
|
|
@@ -128,6 +155,14 @@ var mcpAdminContractDescriptionKeys = {
|
|
|
128
155
|
actionPromoteAsset: "mcpAdminContracts.action.promoteAsset.description",
|
|
129
156
|
actionRollbackAsset: "mcpAdminContracts.action.rollbackAsset.description",
|
|
130
157
|
actionGetAssetJobStatus: "mcpAdminContracts.action.getAssetJobStatus.description",
|
|
158
|
+
actionListModelSearchRankers: "mcpAdminContracts.action.listModelSearchRankers.description",
|
|
159
|
+
actionSearchModelCatalog: "mcpAdminContracts.action.searchModelCatalog.description",
|
|
160
|
+
actionResolveModelRequest: "mcpAdminContracts.action.resolveModelRequest.description",
|
|
161
|
+
actionGetModelResolution: "mcpAdminContracts.action.getModelResolution.description",
|
|
162
|
+
actionConfirmModelCandidate: "mcpAdminContracts.action.confirmModelCandidate.description",
|
|
163
|
+
actionRetryModelResolution: "mcpAdminContracts.action.retryModelResolution.description",
|
|
164
|
+
actionCancelModelResolution: "mcpAdminContracts.action.cancelModelResolution.description",
|
|
165
|
+
actionRebuildModelCatalogIndex: "mcpAdminContracts.action.rebuildModelCatalogIndex.description",
|
|
131
166
|
actionGetUserTokenWallet: "mcpAdminContracts.action.getUserTokenWallet.description",
|
|
132
167
|
actionListUserTokenActivity: "mcpAdminContracts.action.listUserTokenActivity.description",
|
|
133
168
|
actionListTokenAdjustments: "mcpAdminContracts.action.listTokenAdjustments.description",
|
|
@@ -152,7 +187,7 @@ function getMcpAdminContractDefaultTranslation(key) {
|
|
|
152
187
|
}
|
|
153
188
|
|
|
154
189
|
// src/index.ts
|
|
155
|
-
var MCP_ADMIN_CONTRACT_VERSION = "2026-08-
|
|
190
|
+
var MCP_ADMIN_CONTRACT_VERSION = "2026-08-26.v8";
|
|
156
191
|
var MCP_ADMIN_REGISTRY_SOURCE = "@plasius/mcp-admin-contracts";
|
|
157
192
|
var MCP_ADMIN_FOUNDATION_FLAG_ID = "mcp.admin.foundation.enabled";
|
|
158
193
|
var MCP_ACCESS_SCOPE = "mcp:access";
|
|
@@ -168,11 +203,32 @@ var MCP_ADMIN_PRODUCTION_READINESS_FLAG_ID = "mcp.admin.production-readiness.ena
|
|
|
168
203
|
var MCP_ADMIN_PRODUCTION_READINESS_ENV_VAR = "MCP_ADMIN_PRODUCTION_READINESS_ENABLED";
|
|
169
204
|
var MCP_ASSET_PIPELINE_FLAG_ID = "asset.pipeline.unified-ai-assets.enabled";
|
|
170
205
|
var MCP_ASSET_EXTERNAL_HARVEST_FLAG_ID = "asset.pipeline.external-model-harvest.enabled";
|
|
171
|
-
var MCP_ASSET_CATALOG_REQUEST_CAPABILITY =
|
|
172
|
-
var
|
|
173
|
-
var
|
|
174
|
-
var
|
|
206
|
+
var MCP_ASSET_CATALOG_REQUEST_CAPABILITY = MODEL_MCP_CATALOG_REQUEST_CAPABILITY;
|
|
207
|
+
var MCP_ASSET_CATALOG_CONFIRM_CAPABILITY = MODEL_MCP_CATALOG_CONFIRM_CAPABILITY;
|
|
208
|
+
var MCP_ASSET_PIPELINE_MANAGE_CAPABILITY = MODEL_MCP_PIPELINE_MANAGE_CAPABILITY;
|
|
209
|
+
var MCP_ASSET_SOURCE_MANAGE_CAPABILITY = MODEL_MCP_SOURCE_MANAGE_CAPABILITY;
|
|
210
|
+
var MCP_ASSET_CATALOG_REVIEW_CAPABILITY = MODEL_MCP_CATALOG_REVIEW_CAPABILITY;
|
|
211
|
+
var MCP_ADMIN_MODEL_TOOL_CONTRACT_VERSION = MODEL_MCP_CONTRACT_VERSION;
|
|
212
|
+
var MCP_ADMIN_MODEL_REGISTRY_SOURCE = ASSET_MCP_PACKAGE;
|
|
213
|
+
var MCP_ADMIN_MODEL_RESOLUTION_CONTRACT_VERSION = MODEL_RESOLUTION_CONTRACT_VERSION;
|
|
214
|
+
var MCP_ADMIN_MODEL_CAPABILITIES = Object.freeze({
|
|
215
|
+
catalogRequest: MODEL_MCP_CATALOG_REQUEST_CAPABILITY,
|
|
216
|
+
catalogConfirm: MODEL_MCP_CATALOG_CONFIRM_CAPABILITY,
|
|
217
|
+
catalogReview: MODEL_MCP_CATALOG_REVIEW_CAPABILITY,
|
|
218
|
+
sourceManage: MODEL_MCP_SOURCE_MANAGE_CAPABILITY,
|
|
219
|
+
pipelineManage: MODEL_MCP_PIPELINE_MANAGE_CAPABILITY
|
|
220
|
+
});
|
|
221
|
+
var MCP_ADMIN_MODEL_OAUTH_SCOPES = Object.freeze([
|
|
222
|
+
MCP_ACCESS_SCOPE,
|
|
223
|
+
MODEL_MCP_CATALOG_REQUEST_CAPABILITY,
|
|
224
|
+
MODEL_MCP_CATALOG_CONFIRM_CAPABILITY,
|
|
225
|
+
MODEL_MCP_CATALOG_REVIEW_CAPABILITY,
|
|
226
|
+
MODEL_MCP_SOURCE_MANAGE_CAPABILITY,
|
|
227
|
+
MODEL_MCP_PIPELINE_MANAGE_CAPABILITY
|
|
228
|
+
]);
|
|
229
|
+
var canonicalModelToolDefinitions = listModelMcpToolDefinitions();
|
|
175
230
|
var MCP_ADMIN_FEEDBACK_FLAG_ID = "feedback.mcp.enabled";
|
|
231
|
+
var MCP_ADMIN_FEEDBACK_HOST_DEFAULT_ENABLED = false;
|
|
176
232
|
var MCP_ADMIN_FEEDBACK_READ_CAPABILITY = "admin.feedback.read";
|
|
177
233
|
var MCP_ADMIN_BASE_OAUTH_SCOPE = MCP_ACCESS_SCOPE;
|
|
178
234
|
var MCP_ADMIN_FEEDBACK_READ_OAUTH_SCOPE = MCP_ADMIN_FEEDBACK_READ_CAPABILITY;
|
|
@@ -222,12 +278,14 @@ var MCP_ADMIN_FEEDBACK_PRIVACY_EXCLUSIONS = [
|
|
|
222
278
|
"matched-values",
|
|
223
279
|
"model-traces",
|
|
224
280
|
"binary-images",
|
|
281
|
+
"client-pixels",
|
|
225
282
|
"filenames",
|
|
226
283
|
"exact-coordinates",
|
|
227
284
|
"exact-dimensions",
|
|
228
285
|
"adapter-fingerprints",
|
|
229
286
|
"raw-warnings",
|
|
230
287
|
"blob-references",
|
|
288
|
+
"request-telemetry",
|
|
231
289
|
"raw-urls",
|
|
232
290
|
"unrestricted-scans",
|
|
233
291
|
"mutations"
|
|
@@ -240,6 +298,7 @@ var MCP_ECONOMY_FINANCE_APPROVE_CAPABILITY = "economy.finance-operations.approve
|
|
|
240
298
|
var canonicalFeedbackSchemas = Object.freeze({
|
|
241
299
|
FeedbackBugPacketSchema,
|
|
242
300
|
FeedbackReviewPacketSchema,
|
|
301
|
+
FeedbackGameReconstructionManifestSchema,
|
|
243
302
|
FeedbackHourlyBugReportSchema,
|
|
244
303
|
FeedbackDailySatisfactionReportSchema,
|
|
245
304
|
FeedbackProcessorCheckpointSchema
|
|
@@ -1072,7 +1131,7 @@ var canonicalGameDiagnosticsVariantField = (surfaceId, provenanceContractId) =>
|
|
|
1072
1131
|
FEEDBACK_SCHEMA_GAME_ERROR_CODES.length
|
|
1073
1132
|
)
|
|
1074
1133
|
});
|
|
1075
|
-
var canonicalGameDiagnosticsField = discriminatedUnionField(
|
|
1134
|
+
var canonicalGameDiagnosticsField = (required) => discriminatedUnionField(
|
|
1076
1135
|
"Canonical `FeedbackGameDiagnostics`; its surface must equal the containing bug packet surface and it cannot express pixels, DOM, text, URLs, filenames, coordinates, or adapter fingerprints.",
|
|
1077
1136
|
"surfaceId",
|
|
1078
1137
|
[
|
|
@@ -1085,7 +1144,7 @@ var canonicalGameDiagnosticsField = discriminatedUnionField(
|
|
|
1085
1144
|
"gpu-demo.renderer-diagnostics.v1"
|
|
1086
1145
|
)
|
|
1087
1146
|
],
|
|
1088
|
-
{ required: false }
|
|
1147
|
+
required ? {} : { required: false }
|
|
1089
1148
|
);
|
|
1090
1149
|
var canonicalBugPacketField = feedbackClosedObjectField(
|
|
1091
1150
|
"Canonical identifier-free immutable `FeedbackBugPacket`.",
|
|
@@ -1106,7 +1165,7 @@ var canonicalBugPacketField = feedbackClosedObjectField(
|
|
|
1106
1165
|
releaseId: canonicalSafeIdField("Server-owned release identifier."),
|
|
1107
1166
|
buildId: canonicalSafeIdField("Server-owned build identifier."),
|
|
1108
1167
|
analysis: canonicalAnalysisProjectionField,
|
|
1109
|
-
gameDiagnostics: canonicalGameDiagnosticsField
|
|
1168
|
+
gameDiagnostics: canonicalGameDiagnosticsField(false)
|
|
1110
1169
|
}
|
|
1111
1170
|
);
|
|
1112
1171
|
var canonicalReviewPacketField = feedbackClosedObjectField(
|
|
@@ -1127,6 +1186,32 @@ var canonicalFeedbackPacketField = discriminatedUnionField(
|
|
|
1127
1186
|
"type",
|
|
1128
1187
|
[canonicalBugPacketField, canonicalReviewPacketField]
|
|
1129
1188
|
);
|
|
1189
|
+
var canonicalGameReconstructionManifestField = feedbackClosedObjectField(
|
|
1190
|
+
"Canonical safe server-side reconstruction manifest. It is a labelled reconstruction from curated public assets and consented coarse diagnostics, not a literal screenshot.",
|
|
1191
|
+
{
|
|
1192
|
+
...canonicalSchemaIdentityFields("feedback-game-reconstruction-manifest"),
|
|
1193
|
+
reconstructionId: canonicalUuidV4Field(
|
|
1194
|
+
"Opaque canonical reconstruction UUIDv4."
|
|
1195
|
+
),
|
|
1196
|
+
bugPacketId: canonicalUuidV4Field(
|
|
1197
|
+
"Opaque canonical source bug-packet UUIDv4; it cannot identify a reporter."
|
|
1198
|
+
),
|
|
1199
|
+
createdAt: canonicalDateTimeField(
|
|
1200
|
+
"Server-owned reconstruction creation time."
|
|
1201
|
+
),
|
|
1202
|
+
expiresAt: canonicalDateTimeField(
|
|
1203
|
+
"Server-owned expiry, strictly after creation and no more than 30 days later."
|
|
1204
|
+
),
|
|
1205
|
+
curatedAssetSetId: canonicalSafeIdField(
|
|
1206
|
+
"Allowlisted curated public asset-set identifier; never a path, URL, or Blob reference."
|
|
1207
|
+
),
|
|
1208
|
+
noticeKey: canonicalSafeIdField(
|
|
1209
|
+
"Stable translation key labelling this as a reconstruction rather than a screenshot.",
|
|
1210
|
+
160
|
|
1211
|
+
),
|
|
1212
|
+
diagnostics: canonicalGameDiagnosticsField(true)
|
|
1213
|
+
}
|
|
1214
|
+
);
|
|
1130
1215
|
var canonicalDistributionField = (description, idField, maximum) => arrayOfField(
|
|
1131
1216
|
`${description} Bucket identifiers are unique as required by the canonical schema.`,
|
|
1132
1217
|
"FeedbackCountBucket",
|
|
@@ -1730,6 +1815,38 @@ var MCP_ADMIN_FEEDBACK_ACTIONS = deepFreeze([
|
|
|
1730
1815
|
{ maxItems: MCP_ADMIN_FEEDBACK_MAX_PAGE_SIZE }
|
|
1731
1816
|
)
|
|
1732
1817
|
}
|
|
1818
|
+
},
|
|
1819
|
+
{
|
|
1820
|
+
name: "getFeedbackGameReconstruction",
|
|
1821
|
+
...translatedDescription(
|
|
1822
|
+
mcpAdminContractDescriptionKeys.actionGetFeedbackGameReconstruction
|
|
1823
|
+
),
|
|
1824
|
+
...feedbackDescriptorMetadata,
|
|
1825
|
+
schemaSource: feedbackSchemaSource(
|
|
1826
|
+
"FeedbackGameReconstructionManifestSchema"
|
|
1827
|
+
),
|
|
1828
|
+
execution: {
|
|
1829
|
+
method: "GET",
|
|
1830
|
+
path: "/api/admin/feedback/reconstructions/{bugPacketId}",
|
|
1831
|
+
source: "near-future-route",
|
|
1832
|
+
notes: [
|
|
1833
|
+
"Reads one schema-validated, clearly labelled server-side reconstruction manifest from consented coarse diagnostics and curated public assets; it is not a literal screenshot.",
|
|
1834
|
+
"Returns no binary image, client pixels, DOM, narrative, reporter or control identity, request telemetry, URL, arbitrary asset, direct Blob reference, or storage locator.",
|
|
1835
|
+
"The runtime must validate the exact lowercase UUIDv4 path value, enforce fail-closed rate limits and dedicated audit, and return one uniform not-found response for absent, expired, or unavailable manifests.",
|
|
1836
|
+
"This point-read contract has no list, scan, cursor, free-form query, or mutation operation."
|
|
1837
|
+
]
|
|
1838
|
+
},
|
|
1839
|
+
input: {
|
|
1840
|
+
bugPacketId: {
|
|
1841
|
+
...canonicalUuidV4Field(
|
|
1842
|
+
"Exact opaque bug-packet UUIDv4 for one approved reconstruction."
|
|
1843
|
+
),
|
|
1844
|
+
required: true
|
|
1845
|
+
}
|
|
1846
|
+
},
|
|
1847
|
+
output: {
|
|
1848
|
+
item: canonicalGameReconstructionManifestField
|
|
1849
|
+
}
|
|
1733
1850
|
}
|
|
1734
1851
|
]);
|
|
1735
1852
|
var MCP_ADMIN_ACTIONS = [
|
|
@@ -3415,6 +3532,100 @@ var MCP_ADMIN_ACTIONS = [
|
|
|
3415
3532
|
},
|
|
3416
3533
|
...MCP_ADMIN_FEEDBACK_ACTIONS
|
|
3417
3534
|
];
|
|
3535
|
+
var modelDescriptionKeys = {
|
|
3536
|
+
list_model_search_rankers: mcpAdminContractDescriptionKeys.actionListModelSearchRankers,
|
|
3537
|
+
search_model_catalog: mcpAdminContractDescriptionKeys.actionSearchModelCatalog,
|
|
3538
|
+
resolve_model_request: mcpAdminContractDescriptionKeys.actionResolveModelRequest,
|
|
3539
|
+
get_model_resolution: mcpAdminContractDescriptionKeys.actionGetModelResolution,
|
|
3540
|
+
confirm_model_candidate: mcpAdminContractDescriptionKeys.actionConfirmModelCandidate,
|
|
3541
|
+
retry_model_resolution: mcpAdminContractDescriptionKeys.actionRetryModelResolution,
|
|
3542
|
+
cancel_model_resolution: mcpAdminContractDescriptionKeys.actionCancelModelResolution,
|
|
3543
|
+
rebuild_model_catalog_index: mcpAdminContractDescriptionKeys.actionRebuildModelCatalogIndex
|
|
3544
|
+
};
|
|
3545
|
+
var modelVerificationNotes = deepFreeze({
|
|
3546
|
+
list_model_search_rankers: [
|
|
3547
|
+
"Validate the returned ranker list and no-substitution policy against the canonical output schema."
|
|
3548
|
+
],
|
|
3549
|
+
search_model_catalog: [
|
|
3550
|
+
"Validate ranked catalog evidence and any four-view image pack against the canonical structured output schema."
|
|
3551
|
+
],
|
|
3552
|
+
resolve_model_request: [
|
|
3553
|
+
"Use get_model_resolution with the returned resolution identifier to verify durable progress and candidate evidence."
|
|
3554
|
+
],
|
|
3555
|
+
get_model_resolution: [
|
|
3556
|
+
"Validate the owned immutable revision, state, questions, and any four-view image pack against the canonical output schema."
|
|
3557
|
+
],
|
|
3558
|
+
confirm_model_candidate: [
|
|
3559
|
+
"Use get_model_resolution to verify completion and the immutable final asset reference after confirmation."
|
|
3560
|
+
],
|
|
3561
|
+
retry_model_resolution: [
|
|
3562
|
+
"Use get_model_resolution to verify the newly created immutable request revision and excluded candidates."
|
|
3563
|
+
],
|
|
3564
|
+
cancel_model_resolution: [
|
|
3565
|
+
"Use get_model_resolution to verify that unfinished requester-owned work reached the cancelled state."
|
|
3566
|
+
],
|
|
3567
|
+
rebuild_model_catalog_index: [
|
|
3568
|
+
"Validate the idempotent operation identifier and state against the canonical output schema and operator audit record."
|
|
3569
|
+
]
|
|
3570
|
+
});
|
|
3571
|
+
var modelToolExecution = (toolName) => ({
|
|
3572
|
+
protocol: "json-rpc-2.0",
|
|
3573
|
+
method: "POST",
|
|
3574
|
+
path: "/api/mcp",
|
|
3575
|
+
rpcMethod: "tools/call",
|
|
3576
|
+
toolName
|
|
3577
|
+
});
|
|
3578
|
+
var modelToolTranslation = (definition) => {
|
|
3579
|
+
const translation = translatedDescription(modelDescriptionKeys[definition.name]);
|
|
3580
|
+
if (translation.descriptionDefault !== definition.description) {
|
|
3581
|
+
throw new TypeError("Canonical model tool description translation mismatch.");
|
|
3582
|
+
}
|
|
3583
|
+
return translation;
|
|
3584
|
+
};
|
|
3585
|
+
function listMcpModelToolSummaries() {
|
|
3586
|
+
return canonicalModelToolDefinitions.map((definition) => {
|
|
3587
|
+
const { inputSchema: _inputSchema, outputSchema: _outputSchema, ...summary } = definition;
|
|
3588
|
+
return {
|
|
3589
|
+
...summary,
|
|
3590
|
+
...modelToolTranslation(definition),
|
|
3591
|
+
availability: "near-future",
|
|
3592
|
+
execution: modelToolExecution(definition.name),
|
|
3593
|
+
verificationNotes: modelVerificationNotes[definition.name]
|
|
3594
|
+
};
|
|
3595
|
+
});
|
|
3596
|
+
}
|
|
3597
|
+
function listMcpModelResourceTemplates() {
|
|
3598
|
+
return listModelMcpResourceTemplates();
|
|
3599
|
+
}
|
|
3600
|
+
var buildMcpModelToolSchemaDescriptors = () => Object.fromEntries(
|
|
3601
|
+
canonicalModelToolDefinitions.map((definition) => [
|
|
3602
|
+
definition.name,
|
|
3603
|
+
{
|
|
3604
|
+
...definition,
|
|
3605
|
+
...modelToolTranslation(definition),
|
|
3606
|
+
availability: "near-future",
|
|
3607
|
+
execution: modelToolExecution(definition.name),
|
|
3608
|
+
verificationNotes: modelVerificationNotes[definition.name]
|
|
3609
|
+
}
|
|
3610
|
+
])
|
|
3611
|
+
);
|
|
3612
|
+
var buildMcpModelResolutionContext = () => ({
|
|
3613
|
+
toolContractVersion: MODEL_MCP_CONTRACT_VERSION,
|
|
3614
|
+
sourceOfTruth: ASSET_MCP_PACKAGE,
|
|
3615
|
+
resolutionContractVersion: MODEL_RESOLUTION_CONTRACT_VERSION,
|
|
3616
|
+
endpoint: "/api/mcp",
|
|
3617
|
+
protocol: "json-rpc-2.0",
|
|
3618
|
+
rpcMethod: "tools/call",
|
|
3619
|
+
requiredFeatureFlag: MODEL_MCP_UNIFIED_FEATURE_FLAG_ID,
|
|
3620
|
+
conditionalFeatureFlags: [
|
|
3621
|
+
MODEL_MCP_EXTERNAL_HARVEST_FEATURE_FLAG_ID,
|
|
3622
|
+
MODEL_MCP_GENERATION_FEATURE_FLAG_ID
|
|
3623
|
+
],
|
|
3624
|
+
tools: [...MODEL_MCP_TOOL_NAMES],
|
|
3625
|
+
resourceTemplates: listModelMcpResourceTemplates().map(
|
|
3626
|
+
({ uriTemplate }) => uriTemplate
|
|
3627
|
+
)
|
|
3628
|
+
});
|
|
3418
3629
|
function listMcpActionSummaries() {
|
|
3419
3630
|
return MCP_ADMIN_ACTIONS.map((action) => ({
|
|
3420
3631
|
name: action.name,
|
|
@@ -3433,7 +3644,7 @@ function listMcpActionSummaries() {
|
|
|
3433
3644
|
access: action.access
|
|
3434
3645
|
}));
|
|
3435
3646
|
}
|
|
3436
|
-
var MCP_ADMIN_CONTEXT_SHAPE = {
|
|
3647
|
+
var MCP_ADMIN_CONTEXT_SHAPE = deepFreeze({
|
|
3437
3648
|
contractVersion: stringField("Versioned discovery contract identifier."),
|
|
3438
3649
|
authenticatedUser: objectField("Authenticated admin session context.", {
|
|
3439
3650
|
id: stringField("Authenticated user identifier."),
|
|
@@ -3459,6 +3670,44 @@ var MCP_ADMIN_CONTEXT_SHAPE = {
|
|
|
3459
3670
|
)
|
|
3460
3671
|
}),
|
|
3461
3672
|
actionFamilies: arrayField("Approved action families grouped by rollout domain.", "McpActionFamily"),
|
|
3673
|
+
modelResolution: objectField(
|
|
3674
|
+
"Canonical model-resolution JSON-RPC discovery metadata.",
|
|
3675
|
+
{
|
|
3676
|
+
toolContractVersion: stringField(
|
|
3677
|
+
"Contract version imported from @plasius/asset-mcp.",
|
|
3678
|
+
{ constValue: MODEL_MCP_CONTRACT_VERSION }
|
|
3679
|
+
),
|
|
3680
|
+
sourceOfTruth: stringField("Package that owns the canonical tool registry.", {
|
|
3681
|
+
constValue: ASSET_MCP_PACKAGE
|
|
3682
|
+
}),
|
|
3683
|
+
resolutionContractVersion: stringField(
|
|
3684
|
+
"Resolution contract version imported from @plasius/asset-contracts.",
|
|
3685
|
+
{ constValue: MODEL_RESOLUTION_CONTRACT_VERSION }
|
|
3686
|
+
),
|
|
3687
|
+
endpoint: stringField("Hosted MCP JSON-RPC endpoint.", {
|
|
3688
|
+
constValue: "/api/mcp"
|
|
3689
|
+
}),
|
|
3690
|
+
protocol: stringField("MCP transport protocol.", {
|
|
3691
|
+
constValue: "json-rpc-2.0"
|
|
3692
|
+
}),
|
|
3693
|
+
rpcMethod: stringField("JSON-RPC method used to execute a named tool.", {
|
|
3694
|
+
constValue: "tools/call"
|
|
3695
|
+
}),
|
|
3696
|
+
requiredFeatureFlag: stringField(
|
|
3697
|
+
"Parent rollout flag required for every model-resolution tool.",
|
|
3698
|
+
{ constValue: MODEL_MCP_UNIFIED_FEATURE_FLAG_ID }
|
|
3699
|
+
),
|
|
3700
|
+
conditionalFeatureFlags: arrayField(
|
|
3701
|
+
"Provider and generator flags evaluated only when their fallback is attempted.",
|
|
3702
|
+
"string"
|
|
3703
|
+
),
|
|
3704
|
+
tools: arrayField("Canonical snake_case model-resolution tool names.", "string"),
|
|
3705
|
+
resourceTemplates: arrayField(
|
|
3706
|
+
"Authenticated canonical mcp://models resource templates.",
|
|
3707
|
+
"string"
|
|
3708
|
+
)
|
|
3709
|
+
}
|
|
3710
|
+
),
|
|
3462
3711
|
extensionRules: objectField("Rules for extending the registry without changing the discovery shape.", {
|
|
3463
3712
|
sourceOfTruth: stringField("Package that owns the approved MCP registry."),
|
|
3464
3713
|
addOnlyWithinV1: booleanField("Whether v1 additions must be additive."),
|
|
@@ -3466,7 +3715,7 @@ var MCP_ADMIN_CONTEXT_SHAPE = {
|
|
|
3466
3715
|
singleResourceMutations: booleanField("Whether mutations must target one resource at a time."),
|
|
3467
3716
|
notes: arrayField("Extension notes for future MCP tool families.", "string")
|
|
3468
3717
|
})
|
|
3469
|
-
};
|
|
3718
|
+
});
|
|
3470
3719
|
var MCP_ADMIN_EXTENSION_RULES = {
|
|
3471
3720
|
sourceOfTruth: MCP_ADMIN_REGISTRY_SOURCE,
|
|
3472
3721
|
addOnlyWithinV1: true,
|
|
@@ -3522,7 +3771,10 @@ function buildMcpDiscoveryResponse() {
|
|
|
3522
3771
|
return {
|
|
3523
3772
|
contractVersion: MCP_ADMIN_CONTRACT_VERSION,
|
|
3524
3773
|
sourceOfTruth: MCP_ADMIN_REGISTRY_SOURCE,
|
|
3525
|
-
actions: listMcpActionSummaries()
|
|
3774
|
+
actions: listMcpActionSummaries(),
|
|
3775
|
+
modelTools: listMcpModelToolSummaries(),
|
|
3776
|
+
modelResources: listMcpModelResourceTemplates(),
|
|
3777
|
+
modelSourceOfTruth: ASSET_MCP_PACKAGE
|
|
3526
3778
|
};
|
|
3527
3779
|
}
|
|
3528
3780
|
function buildMcpSchemaResponse() {
|
|
@@ -3551,7 +3803,10 @@ function buildMcpSchemaResponse() {
|
|
|
3551
3803
|
sourceOfTruth: MCP_ADMIN_REGISTRY_SOURCE,
|
|
3552
3804
|
actions,
|
|
3553
3805
|
contextShape: MCP_ADMIN_CONTEXT_SHAPE,
|
|
3554
|
-
extensionRules: MCP_ADMIN_EXTENSION_RULES
|
|
3806
|
+
extensionRules: MCP_ADMIN_EXTENSION_RULES,
|
|
3807
|
+
modelTools: buildMcpModelToolSchemaDescriptors(),
|
|
3808
|
+
modelResources: listMcpModelResourceTemplates(),
|
|
3809
|
+
modelSourceOfTruth: ASSET_MCP_PACKAGE
|
|
3555
3810
|
};
|
|
3556
3811
|
}
|
|
3557
3812
|
function buildMcpContextResponse(options) {
|
|
@@ -3561,7 +3816,8 @@ function buildMcpContextResponse(options) {
|
|
|
3561
3816
|
surface: buildMcpSurfaceUrls(options.origin),
|
|
3562
3817
|
rollout: options.rollout,
|
|
3563
3818
|
actionFamilies: buildMcpActionFamilies(),
|
|
3564
|
-
extensionRules: MCP_ADMIN_EXTENSION_RULES
|
|
3819
|
+
extensionRules: MCP_ADMIN_EXTENSION_RULES,
|
|
3820
|
+
modelResolution: buildMcpModelResolutionContext()
|
|
3565
3821
|
};
|
|
3566
3822
|
}
|
|
3567
3823
|
function buildMcpActionFamilies() {
|
|
@@ -3678,6 +3934,7 @@ export {
|
|
|
3678
3934
|
MCP_ADMIN_FEEDBACK_BUG_HEALTH_WINDOWS,
|
|
3679
3935
|
MCP_ADMIN_FEEDBACK_ENTRY_WINDOWS,
|
|
3680
3936
|
MCP_ADMIN_FEEDBACK_FLAG_ID,
|
|
3937
|
+
MCP_ADMIN_FEEDBACK_HOST_DEFAULT_ENABLED,
|
|
3681
3938
|
MCP_ADMIN_FEEDBACK_MAX_CURSOR_LENGTH,
|
|
3682
3939
|
MCP_ADMIN_FEEDBACK_MAX_PAGE_SIZE,
|
|
3683
3940
|
MCP_ADMIN_FEEDBACK_PACKET_TYPES,
|
|
@@ -3696,6 +3953,11 @@ export {
|
|
|
3696
3953
|
MCP_ADMIN_FOUNDATION_ENV_VAR,
|
|
3697
3954
|
MCP_ADMIN_FOUNDATION_FLAG_ID,
|
|
3698
3955
|
MCP_ADMIN_LIVEOPS_FLAG_ID,
|
|
3956
|
+
MCP_ADMIN_MODEL_CAPABILITIES,
|
|
3957
|
+
MCP_ADMIN_MODEL_OAUTH_SCOPES,
|
|
3958
|
+
MCP_ADMIN_MODEL_REGISTRY_SOURCE,
|
|
3959
|
+
MCP_ADMIN_MODEL_RESOLUTION_CONTRACT_VERSION,
|
|
3960
|
+
MCP_ADMIN_MODEL_TOOL_CONTRACT_VERSION,
|
|
3699
3961
|
MCP_ADMIN_PRODUCTION_READINESS_ENV_VAR,
|
|
3700
3962
|
MCP_ADMIN_PRODUCTION_READINESS_FLAG_ID,
|
|
3701
3963
|
MCP_ADMIN_REGISTRY_SOURCE,
|
|
@@ -3709,6 +3971,7 @@ export {
|
|
|
3709
3971
|
MCP_ADMIN_USER_AGGREGATION_DIMENSIONS,
|
|
3710
3972
|
MCP_ADMIN_USER_AGGREGATION_METRICS,
|
|
3711
3973
|
MCP_ADMIN_USER_AGGREGATION_PRESETS,
|
|
3974
|
+
MCP_ASSET_CATALOG_CONFIRM_CAPABILITY,
|
|
3712
3975
|
MCP_ASSET_CATALOG_REQUEST_CAPABILITY,
|
|
3713
3976
|
MCP_ASSET_CATALOG_REVIEW_CAPABILITY,
|
|
3714
3977
|
MCP_ASSET_EXTERNAL_HARVEST_FLAG_ID,
|
|
@@ -3729,6 +3992,8 @@ export {
|
|
|
3729
3992
|
buildMcpSurfaceUrls,
|
|
3730
3993
|
getMcpAdminContractDefaultTranslation,
|
|
3731
3994
|
listMcpActionSummaries,
|
|
3995
|
+
listMcpModelResourceTemplates,
|
|
3996
|
+
listMcpModelToolSummaries,
|
|
3732
3997
|
mcpAdminContractDescriptionKeys,
|
|
3733
3998
|
mcpAdminContractsEnGbTranslations,
|
|
3734
3999
|
mcpAdminContractsTranslations
|