create-agdf 0.20.0 → 0.20.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (114) hide show
  1. package/README.md +38 -19
  2. package/generated/.agdf/control/templates/artefacts/SD.md +7 -1
  3. package/generated/.agdf/control/templates/artefacts/TP.md +4 -0
  4. package/generated/.opencode/contracts/quality.md +71 -4
  5. package/generated/.opencode/contracts/sd-definition.md +16 -0
  6. package/generated/.opencode/contracts/tp-definition.md +6 -0
  7. package/generated/.opencode/skills/agdf-clean-implementation-review/SKILL.md +2 -0
  8. package/generated/.opencode/skills/agdf-code-review/SKILL.md +2 -0
  9. package/generated/.opencode/skills/agdf-qa-gate/SKILL.md +10 -9
  10. package/generated/.opencode/skills/agdf-sd-definition/SKILL.md +2 -1
  11. package/generated/.opencode/skills/agdf-task-plan-review/SKILL.md +2 -0
  12. package/generated/.opencode/skills/agdf-tp-definition/SKILL.md +2 -1
  13. package/generated/plugins/agdf/.claude-plugin/plugin.json +1 -1
  14. package/generated/plugins/agdf/.codex-plugin/plugin.json +1 -1
  15. package/generated/plugins/agdf/control/templates/artefacts/SD.md +7 -1
  16. package/generated/plugins/agdf/control/templates/artefacts/TP.md +4 -0
  17. package/generated/plugins/agdf/mcp/server/README.md +5 -5
  18. package/generated/plugins/agdf/mcp/server/package.json +2 -2
  19. package/generated/plugins/agdf/mcp/server/src/server.js +21 -8
  20. package/generated/plugins/agdf/mcp/server/src/ui-capability.js +49 -1
  21. package/generated/plugins/agdf/meta/agdf-mcp-capability.json +2 -2
  22. package/generated/plugins/agdf/meta/agdf-plugin.definition.json +106 -13
  23. package/generated/plugins/agdf/meta/contracts/quality.md +71 -4
  24. package/generated/plugins/agdf/meta/contracts/sd-definition.md +16 -0
  25. package/generated/plugins/agdf/meta/contracts/tp-definition.md +6 -0
  26. package/generated/plugins/agdf/meta/copilot-payload-baseline.json +2 -2
  27. package/generated/plugins/agdf/meta/distribution-profile-history.json +14 -0
  28. package/generated/plugins/agdf/runtime/create-agdf/generated/plugins/agdf/meta/agdf-plugin.definition.json +106 -13
  29. package/generated/plugins/agdf/runtime/create-agdf/generated/plugins/agdf/meta/contracts/quality.md +71 -4
  30. package/generated/plugins/agdf/runtime/create-agdf/generated/plugins/agdf/meta/contracts/sd-definition.md +16 -0
  31. package/generated/plugins/agdf/runtime/create-agdf/generated/plugins/agdf/meta/contracts/tp-definition.md +6 -0
  32. package/generated/plugins/agdf/runtime/create-agdf/lib/mcp-dispatch-runtime.js +10 -2
  33. package/generated/plugins/agdf/runtime/create-agdf/package.json +1 -1
  34. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/contract.js +26 -34
  35. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/service.js +26 -8
  36. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-command-contract.js +140 -9
  37. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-presentation-render.js +2 -2
  38. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/interaction-presentation.js +1 -1
  39. package/generated/plugins/agdf/runtime/runtime-manifest.json +2 -2
  40. package/generated/plugins/agdf/skills/clean-implementation-review/SKILL.md +2 -0
  41. package/generated/plugins/agdf/skills/code-review/SKILL.md +2 -0
  42. package/generated/plugins/agdf/skills/qa-gate/SKILL.md +10 -9
  43. package/generated/plugins/agdf/skills/sd-definition/SKILL.md +2 -1
  44. package/generated/plugins/agdf/skills/task-plan-review/SKILL.md +2 -0
  45. package/generated/plugins/agdf/skills/tp-definition/SKILL.md +2 -1
  46. package/generated/plugins/agdf/submission/openai/availability.md +1 -1
  47. package/generated/plugins/agdf/submission/openai/capability-matrix.json +1 -1
  48. package/generated/plugins/agdf/submission/openai/release-notes.md +1 -1
  49. package/generated/plugins/agdf/submission/openai/reviewer-cases.json +1 -1
  50. package/generated/plugins/copilot/agdf/.agdf-payload-inventory.json +74 -74
  51. package/generated/plugins/copilot/agdf/control/templates/artefacts/SD.md +7 -1
  52. package/generated/plugins/copilot/agdf/control/templates/artefacts/TP.md +4 -0
  53. package/generated/plugins/copilot/agdf/mcp/server/README.md +5 -5
  54. package/generated/plugins/copilot/agdf/mcp/server/package.json +2 -2
  55. package/generated/plugins/copilot/agdf/mcp/server/src/server.js +21 -8
  56. package/generated/plugins/copilot/agdf/mcp/server/src/ui-capability.js +49 -1
  57. package/generated/plugins/copilot/agdf/meta/agdf-plugin.definition.json +106 -13
  58. package/generated/plugins/copilot/agdf/meta/distribution-profile-history.json +14 -0
  59. package/generated/plugins/copilot/agdf/plugin.json +1 -1
  60. package/generated/plugins/copilot/agdf/runtime/create-agdf/generated/plugins/agdf/meta/agdf-plugin.definition.json +106 -13
  61. package/generated/plugins/copilot/agdf/runtime/create-agdf/generated/plugins/agdf/meta/contracts/quality.md +71 -4
  62. package/generated/plugins/copilot/agdf/runtime/create-agdf/generated/plugins/agdf/meta/contracts/sd-definition.md +16 -0
  63. package/generated/plugins/copilot/agdf/runtime/create-agdf/generated/plugins/agdf/meta/contracts/tp-definition.md +6 -0
  64. package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/mcp-dispatch-runtime.js +10 -2
  65. package/generated/plugins/copilot/agdf/runtime/create-agdf/package.json +1 -1
  66. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/contract.js +26 -34
  67. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/service.js +26 -8
  68. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-command-contract.js +140 -9
  69. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-presentation-render.js +2 -2
  70. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/interaction-presentation.js +1 -1
  71. package/generated/plugins/copilot/agdf/runtime/runtime-manifest.json +2 -2
  72. package/generated/plugins/copilot/agdf/skills/agdf-clean-implementation-review/SKILL.md +2 -0
  73. package/generated/plugins/copilot/agdf/skills/agdf-code-review/SKILL.md +2 -0
  74. package/generated/plugins/copilot/agdf/skills/agdf-qa-gate/SKILL.md +10 -9
  75. package/generated/plugins/copilot/agdf/skills/agdf-sd-definition/SKILL.md +2 -1
  76. package/generated/plugins/copilot/agdf/skills/agdf-task-plan-review/SKILL.md +2 -0
  77. package/generated/plugins/copilot/agdf/skills/agdf-tp-definition/SKILL.md +2 -1
  78. package/generated/plugins/copilot/agdf/skills/contracts/quality.md +71 -4
  79. package/generated/plugins/copilot/agdf/skills/contracts/sd-definition.md +16 -0
  80. package/generated/plugins/copilot/agdf/skills/contracts/tp-definition.md +6 -0
  81. package/generated/submissions/openai/agdf/.codex-plugin/plugin.json +1 -1
  82. package/generated/submissions/openai/agdf/meta/agdf-plugin.definition.json +106 -13
  83. package/generated/submissions/openai/agdf/meta/contracts/quality.md +71 -4
  84. package/generated/submissions/openai/agdf/meta/contracts/sd-definition.md +16 -0
  85. package/generated/submissions/openai/agdf/meta/contracts/tp-definition.md +6 -0
  86. package/generated/submissions/openai/agdf/meta/copilot-payload-baseline.json +2 -2
  87. package/generated/submissions/openai/agdf/meta/distribution-profile-history.json +14 -0
  88. package/generated/submissions/openai/agdf/plugin.json +1 -1
  89. package/generated/submissions/openai/agdf/skills/clean-implementation-review/SKILL.md +2 -0
  90. package/generated/submissions/openai/agdf/skills/code-review/SKILL.md +2 -0
  91. package/generated/submissions/openai/agdf/skills/qa-gate/SKILL.md +10 -9
  92. package/generated/submissions/openai/agdf/skills/sd-definition/SKILL.md +2 -1
  93. package/generated/submissions/openai/agdf/skills/task-plan-review/SKILL.md +2 -0
  94. package/generated/submissions/openai/agdf/skills/tp-definition/SKILL.md +2 -1
  95. package/generated/submissions/openai/agdf/submission/openai/availability.md +1 -1
  96. package/generated/submissions/openai/agdf/submission/openai/capability-matrix.json +1 -1
  97. package/generated/submissions/openai/agdf/submission/openai/inventory.json +21 -21
  98. package/generated/submissions/openai/agdf/submission/openai/listing.json +1 -1
  99. package/generated/submissions/openai/agdf/submission/openai/readiness.json +2 -2
  100. package/generated/submissions/openai/agdf/submission/openai/readiness.md +2 -2
  101. package/generated/submissions/openai/agdf/submission/openai/release-notes.md +1 -1
  102. package/generated/submissions/openai/agdf/submission/openai/reviewer-cases.json +1 -1
  103. package/lib/host-adapters/codex/config-source.js +48 -0
  104. package/lib/mcp-dispatch-runtime.js +10 -2
  105. package/lib/mcp-lifecycle/adapters/codex.js +40 -29
  106. package/lib/mcp-lifecycle/adapters/copilot.js +13 -7
  107. package/lib/mcp-lifecycle/adapters/opencode.js +97 -8
  108. package/lib/mcp-lifecycle/profile.js +2 -1
  109. package/package.json +1 -1
  110. package/runtime/core/lib/control-inspect/contract.js +26 -34
  111. package/runtime/core/lib/control-inspect/service.js +26 -8
  112. package/runtime/core/lib/control-state/run-command-contract.js +140 -9
  113. package/runtime/core/lib/control-state/run-presentation-render.js +2 -2
  114. package/runtime/core/lib/interaction-presentation.js +1 -1
@@ -62,6 +62,8 @@ If `context_graph_required_action` is not `none`, the affected task is complete
62
62
  Applicable review gaps must use `../../meta/contracts/quality.md` §Normalized Review Gaps. This skill
63
63
  must not maintain its own type-to-route mapping.
64
64
 
65
+ Verify scoped coverage, reuse applicability and remaining obligations under quality.md Proportionate Tests And Evidence and Verification Effectiveness And Completion. Reuse valid results without replacing this review assessment; a later gate alone requires no recollection.
66
+
65
67
  ## Rules
66
68
  1. The Task Plan is the reference, not plausible code.
67
69
  2. No assumptions without evidence.
@@ -8,7 +8,8 @@ description: "Use this skill for this scope: bound TP content. Boundary: content
8
8
  ## Runtime Contract
9
9
 
10
10
  Use the returned `continuation.runtime_contracts` after `skill_continuation`. If absent, load
11
- `../../meta/contracts/tp-definition.md` and `../../meta/contracts/gate-artifact-preparation.md`
11
+ `../../meta/contracts/tp-definition.md`, `../../meta/contracts/gate-artifact-preparation.md`
12
+ and `../../meta/contracts/quality.md`
12
13
  through the supplied contract reader or bundled files.
13
14
  Missing contract or invalid binding: stop. This skill owns TP content; gate-check owns readiness.
14
15
 
@@ -1,6 +1,6 @@
1
1
  # Availability Decision Record
2
2
 
3
- - release: `0.20.0`
3
+ - release: `0.20.2`
4
4
  - decision_state: `pending`
5
5
  - decision_owner: verified publisher
6
6
  - countries: not selected
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
- "releaseVersion": "0.20.0",
3
+ "releaseVersion": "0.20.2",
4
4
  "evidenceStates": [
5
5
  "common",
6
6
  "codex-specific",
@@ -1,4 +1,4 @@
1
- # AGDF 0.20.0 — Initial OpenAI Public Plugin Candidate
1
+ # AGDF 0.20.2 — Initial OpenAI Public Plugin Candidate
2
2
 
3
3
  This candidate packages the canonical AGDF workflow skills for public discovery in ChatGPT and
4
4
  Codex. It helps users assess delivery fit, preserve explicit human approvals, inspect existing-system
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
- "releaseVersion": "0.20.0",
3
+ "releaseVersion": "0.20.2",
4
4
  "cases": [
5
5
  {
6
6
  "id": "positive-proportional-fit",
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "schema_version": 1,
3
3
  "profile_id": "copilot-runtime-plugin",
4
- "version": "0.20.0",
4
+ "version": "0.20.2",
5
5
  "baseline": {
6
6
  "max_files": 397,
7
- "max_bytes": 3491406
7
+ "max_bytes": 3522791
8
8
  },
9
9
  "stats": {
10
10
  "files": 397,
11
- "bytes": 3491406
11
+ "bytes": 3522791
12
12
  },
13
13
  "entries": [
14
14
  {
@@ -29,7 +29,7 @@
29
29
  "rule": "render_copilot_hook",
30
30
  "requirement": "consent-bound session start check",
31
31
  "source": "plugins/agdf/meta/agdf-plugin.definition.json",
32
- "source_digest": "d9640b4138ca76f31fdeaa812376c248a431617cd3843a66e6325fe31b57a394",
32
+ "source_digest": "c0d263e644b1a55658954b2eb5bbd260db2436cd5330bb83034c5a831d7b9a3e",
33
33
  "digest": "60d7cd31d6c9483c720c5e775c10d94ba7fd214a0b15b046703ced3953bd489f",
34
34
  "bytes": 273
35
35
  },
@@ -161,9 +161,9 @@
161
161
  "rule": "copy",
162
162
  "requirement": "canonical control templates for bound artefact authoring",
163
163
  "source": "plugins/agdf/control/templates/artefacts/SD.md",
164
- "source_digest": "193b4d75ea397b0115863e9c61690c8845997f6f75b0df8264871c5a5a1df502",
165
- "digest": "193b4d75ea397b0115863e9c61690c8845997f6f75b0df8264871c5a5a1df502",
166
- "bytes": 2562
164
+ "source_digest": "1bb2f883bd5bc6a548db79dbdc91296718e438f459a0bfcf50e44bdad6b08ff2",
165
+ "digest": "1bb2f883bd5bc6a548db79dbdc91296718e438f459a0bfcf50e44bdad6b08ff2",
166
+ "bytes": 3062
167
167
  },
168
168
  {
169
169
  "destination": "control/templates/artefacts/TP.md",
@@ -172,9 +172,9 @@
172
172
  "rule": "copy",
173
173
  "requirement": "canonical control templates for bound artefact authoring",
174
174
  "source": "plugins/agdf/control/templates/artefacts/TP.md",
175
- "source_digest": "e1edd0902dfa1f22d8af9ccbab97ce50184c6f6fb96926e1ec471bdae2c70cd3",
176
- "digest": "e1edd0902dfa1f22d8af9ccbab97ce50184c6f6fb96926e1ec471bdae2c70cd3",
177
- "bytes": 2719
175
+ "source_digest": "cc35f454045dd4a625ec48aa85b3054668d2f4cf54eeaa9d78cff9e41c9b5839",
176
+ "digest": "cc35f454045dd4a625ec48aa85b3054668d2f4cf54eeaa9d78cff9e41c9b5839",
177
+ "bytes": 3061
178
178
  },
179
179
  {
180
180
  "destination": "control/templates/artefacts/UR.md",
@@ -260,8 +260,8 @@
260
260
  "owner": "scripts/sync-plugin-mcp.js",
261
261
  "rule": "generated_exact_mcp_runtime",
262
262
  "requirement": "plugin-managed MCP runtime",
263
- "digest": "8f5a93c38a57ef3395e4556ef0b62677be105cb3c31d92297908c24771e3dea8",
264
- "bytes": 9591
263
+ "digest": "d36a92b08d61e107d42c2def761902a9270026679931f74019e2566d58fb333e",
264
+ "bytes": 9544
265
265
  },
266
266
  {
267
267
  "destination": "mcp/server/bin/agdf-mcp.js",
@@ -278,7 +278,7 @@
278
278
  "owner": "scripts/sync-plugin-mcp.js",
279
279
  "rule": "generated_exact_mcp_runtime",
280
280
  "requirement": "plugin-managed MCP runtime",
281
- "digest": "048bf2b1d025cf06a620dbdd879cd37a0064dd00af2f78c2822bbb59d8b31478",
281
+ "digest": "84fb59f267c803a6b88ab14a396f1791dc3ac41c0b11059f3109e9ead361d5a9",
282
282
  "bytes": 2343
283
283
  },
284
284
  {
@@ -332,8 +332,8 @@
332
332
  "owner": "scripts/sync-plugin-mcp.js",
333
333
  "rule": "generated_exact_mcp_runtime",
334
334
  "requirement": "plugin-managed MCP runtime",
335
- "digest": "3569c4805780ed0672e93f1c1c63fa322e81b9e03a821fa9262fa42b75af8faf",
336
- "bytes": 11124
335
+ "digest": "a79f7d535b0ae85f300d286cee301cc860f29c9788a1b14b4ba539c1304e2cb5",
336
+ "bytes": 11882
337
337
  },
338
338
  {
339
339
  "destination": "mcp/server/src/ui-capability.js",
@@ -341,8 +341,8 @@
341
341
  "owner": "scripts/sync-plugin-mcp.js",
342
342
  "rule": "generated_exact_mcp_runtime",
343
343
  "requirement": "plugin-managed MCP runtime",
344
- "digest": "343da845674023f2440dc9d3c752b2c50e12aad9aec642129f36725aceea0274",
345
- "bytes": 1142
344
+ "digest": "468a1686d37e4b7a5ba0675bbc2c863e3fd6a47e024de17ae0526813f75294ed",
345
+ "bytes": 3865
346
346
  },
347
347
  {
348
348
  "destination": "mcp/server/src/worker-entry.js",
@@ -400,9 +400,9 @@
400
400
  "rule": "copy",
401
401
  "requirement": "local validator and session orientation dependency",
402
402
  "source": "plugins/agdf/meta/agdf-plugin.definition.json",
403
- "source_digest": "d9640b4138ca76f31fdeaa812376c248a431617cd3843a66e6325fe31b57a394",
404
- "digest": "d9640b4138ca76f31fdeaa812376c248a431617cd3843a66e6325fe31b57a394",
405
- "bytes": 19432
403
+ "source_digest": "c0d263e644b1a55658954b2eb5bbd260db2436cd5330bb83034c5a831d7b9a3e",
404
+ "digest": "c0d263e644b1a55658954b2eb5bbd260db2436cd5330bb83034c5a831d7b9a3e",
405
+ "bytes": 20304
406
406
  },
407
407
  {
408
408
  "destination": "meta/agdf-runtime-contract.md",
@@ -422,9 +422,9 @@
422
422
  "rule": "copy",
423
423
  "requirement": "local validator and session orientation dependency",
424
424
  "source": "plugins/agdf/meta/distribution-profile-history.json",
425
- "source_digest": "8c56e91579b5349eec7d0d0097642d5ffdd79002edf958da6fd4839c4636762f",
426
- "digest": "8c56e91579b5349eec7d0d0097642d5ffdd79002edf958da6fd4839c4636762f",
427
- "bytes": 4655
425
+ "source_digest": "0ec135acd06c0acfdc593c05d1e8cc0d8348614ead3ef0f5c3500264c2118e70",
426
+ "digest": "0ec135acd06c0acfdc593c05d1e8cc0d8348614ead3ef0f5c3500264c2118e70",
427
+ "bytes": 5169
428
428
  },
429
429
  {
430
430
  "destination": "plugin.json",
@@ -433,8 +433,8 @@
433
433
  "rule": "render_copilot_manifest",
434
434
  "requirement": "Copilot plugin discovery",
435
435
  "source": "plugins/agdf/meta/agdf-plugin.definition.json",
436
- "source_digest": "d9640b4138ca76f31fdeaa812376c248a431617cd3843a66e6325fe31b57a394",
437
- "digest": "0a35b8881896a3635251c761489a3bb223cf13a27886c5fecca5a215f6918f13",
436
+ "source_digest": "c0d263e644b1a55658954b2eb5bbd260db2436cd5330bb83034c5a831d7b9a3e",
437
+ "digest": "c030726431531be1b624f47ed2f7bb361a4fb4515480bfa34c6935713dbf2c4d",
438
438
  "bytes": 526
439
439
  },
440
440
  {
@@ -488,8 +488,8 @@
488
488
  "owner": "scripts/sync-plugin-runtime.js",
489
489
  "rule": "generated_exact_runtime",
490
490
  "requirement": "offline exact-version validator and session check",
491
- "digest": "d9640b4138ca76f31fdeaa812376c248a431617cd3843a66e6325fe31b57a394",
492
- "bytes": 19432
491
+ "digest": "c0d263e644b1a55658954b2eb5bbd260db2436cd5330bb83034c5a831d7b9a3e",
492
+ "bytes": 20304
493
493
  },
494
494
  {
495
495
  "destination": "runtime/create-agdf/generated/plugins/agdf/meta/contracts/closeout.md",
@@ -569,8 +569,8 @@
569
569
  "owner": "scripts/sync-plugin-runtime.js",
570
570
  "rule": "generated_exact_runtime",
571
571
  "requirement": "offline exact-version validator and session check",
572
- "digest": "92522ec24f9fa96ae2258c3c5e2e0ea786a2c79a9cd07b2a9cc51c5a0d249bf8",
573
- "bytes": 14363
572
+ "digest": "75be32ae784d0a8483e9427b701c30302377ee18faa860a005b4ae4d14907197",
573
+ "bytes": 19154
574
574
  },
575
575
  {
576
576
  "destination": "runtime/create-agdf/generated/plugins/agdf/meta/contracts/request-activation.md",
@@ -587,8 +587,8 @@
587
587
  "owner": "scripts/sync-plugin-runtime.js",
588
588
  "rule": "generated_exact_runtime",
589
589
  "requirement": "offline exact-version validator and session check",
590
- "digest": "21d667b5a020ae651a5d3ef4748b7eb19247cfe62f3f97c38f57385adaf671eb",
591
- "bytes": 5157
590
+ "digest": "9ec104f39f1e080a78b41c735791dd1520267aa608c64e6a40344885176d15ba",
591
+ "bytes": 6393
592
592
  },
593
593
  {
594
594
  "destination": "runtime/create-agdf/generated/plugins/agdf/meta/contracts/task-target-resolution.md",
@@ -605,8 +605,8 @@
605
605
  "owner": "scripts/sync-plugin-runtime.js",
606
606
  "rule": "generated_exact_runtime",
607
607
  "requirement": "offline exact-version validator and session check",
608
- "digest": "0c7530bdee6458b3088d8785eec2acdd258297fdd0aaef670fd8662efd51e99f",
609
- "bytes": 6046
608
+ "digest": "72232f6fc3411e97e752f8aa7d0d993a5c5b3587595e82ef28a5e176208fefb7",
609
+ "bytes": 6466
610
610
  },
611
611
  {
612
612
  "destination": "runtime/create-agdf/generated/plugins/agdf/meta/contracts/ur-definition.md",
@@ -893,8 +893,8 @@
893
893
  "owner": "scripts/sync-plugin-runtime.js",
894
894
  "rule": "generated_exact_runtime",
895
895
  "requirement": "offline exact-version validator and session check",
896
- "digest": "9928abfdee7d5f0917ea79f6256fb2c7a47557ce0cf9913daac3cc738fe680bb",
897
- "bytes": 24194
896
+ "digest": "7a34620ed59eb5ba9b3c3fc90d7f82088946688ff902c805fc2db4b464764b27",
897
+ "bytes": 24776
898
898
  },
899
899
  {
900
900
  "destination": "runtime/create-agdf/lib/mcp-lifecycle/facade-entry.js",
@@ -1046,7 +1046,7 @@
1046
1046
  "owner": "scripts/sync-plugin-runtime.js",
1047
1047
  "rule": "generated_exact_runtime",
1048
1048
  "requirement": "offline exact-version validator and session check",
1049
- "digest": "b841e9f94406e490ecf345f6a517451476ef15b0b7e7dd101abdae2501445c73",
1049
+ "digest": "67e6bcfc24da8dc321a7520c5226583bb401a2f6d822655ca1a6821ba35d5d2d",
1050
1050
  "bytes": 220
1051
1051
  },
1052
1052
  {
@@ -1325,8 +1325,8 @@
1325
1325
  "owner": "scripts/sync-plugin-runtime.js",
1326
1326
  "rule": "generated_exact_runtime",
1327
1327
  "requirement": "offline exact-version validator and session check",
1328
- "digest": "0c12ccd8adb3ed431f301d4eabe9ec5c0748411581896f2320b299f30845c138",
1329
- "bytes": 25208
1328
+ "digest": "ef57f82385cd7ffb3805e8fb723318b874d62d8ec100308dd746a5dcdd2bb57e",
1329
+ "bytes": 23711
1330
1330
  },
1331
1331
  {
1332
1332
  "destination": "runtime/create-agdf/runtime/core/lib/control-inspect/selection.js",
@@ -1343,8 +1343,8 @@
1343
1343
  "owner": "scripts/sync-plugin-runtime.js",
1344
1344
  "rule": "generated_exact_runtime",
1345
1345
  "requirement": "offline exact-version validator and session check",
1346
- "digest": "f0b87807a370f52ead1c55de2ac40a9cd071681e6eb65988a024a238fb0a0f9a",
1347
- "bytes": 19578
1346
+ "digest": "0e3e4557c0cabeee4706c6c6965ae356462c36d98df6e9b8807dbbe54ff05b2a",
1347
+ "bytes": 21075
1348
1348
  },
1349
1349
  {
1350
1350
  "destination": "runtime/create-agdf/runtime/core/lib/control-maintenance/compatibility.js",
@@ -1676,8 +1676,8 @@
1676
1676
  "owner": "scripts/sync-plugin-runtime.js",
1677
1677
  "rule": "generated_exact_runtime",
1678
1678
  "requirement": "offline exact-version validator and session check",
1679
- "digest": "e1812f50cc16d5f0e2f0d37579dbcc5da6d5b21a473d0b7d0ee0978f758c86a8",
1680
- "bytes": 14432
1679
+ "digest": "62b04a393dfa663e6356bf96c95673b4851d046b0c573b7833bd7ed97ed1561e",
1680
+ "bytes": 24731
1681
1681
  },
1682
1682
  {
1683
1683
  "destination": "runtime/create-agdf/runtime/core/lib/control-state/run-command-service.js",
@@ -1757,8 +1757,8 @@
1757
1757
  "owner": "scripts/sync-plugin-runtime.js",
1758
1758
  "rule": "generated_exact_runtime",
1759
1759
  "requirement": "offline exact-version validator and session check",
1760
- "digest": "f4f60db46996ddeb4588a8b20389ec9d6f213d93be6fe4c580a9839f57ab9c72",
1761
- "bytes": 29797
1760
+ "digest": "776ba633f89bae7fa49816a31b162f1d72588e2252506cc05cddd2655af589d6",
1761
+ "bytes": 29721
1762
1762
  },
1763
1763
  {
1764
1764
  "destination": "runtime/create-agdf/runtime/core/lib/control-state/run-presentation.js",
@@ -2063,8 +2063,8 @@
2063
2063
  "owner": "scripts/sync-plugin-runtime.js",
2064
2064
  "rule": "generated_exact_runtime",
2065
2065
  "requirement": "offline exact-version validator and session check",
2066
- "digest": "83c5447585f45e989dfd1d812c37646c3c5d93cf8fb6a60a9c1053f26d3c5c78",
2067
- "bytes": 67929
2066
+ "digest": "c993e8806b4a777db8e49aa474de9c0f2d1585ba24eab4996dfeb400654b5dd0",
2067
+ "bytes": 67932
2068
2068
  },
2069
2069
  {
2070
2070
  "destination": "runtime/create-agdf/runtime/core/lib/mcp-resource-contract.js",
@@ -3359,7 +3359,7 @@
3359
3359
  "owner": "scripts/sync-plugin-runtime.js",
3360
3360
  "rule": "generated_exact_runtime",
3361
3361
  "requirement": "offline exact-version validator and session check",
3362
- "digest": "52acc109bccb64c4e1216ec4a7b8b0f7cdbb4b595333d0836cead54a8c3333e0",
3362
+ "digest": "8531597c680cbe057e073c981aae54a4d1eb6976867b76a6aab93a00342396fe",
3363
3363
  "bytes": 236
3364
3364
  },
3365
3365
  {
@@ -3380,9 +3380,9 @@
3380
3380
  "rule": "copilot_name_projection",
3381
3381
  "requirement": "Copilot skill agdf-clean-implementation-review",
3382
3382
  "source": "plugins/agdf/skills/clean-implementation-review/SKILL.md",
3383
- "source_digest": "b89b5fb38560ebf49faf9444c1bd5816835fb4399d0fc4a8aab1e92527eb1ab7",
3384
- "digest": "fc5f1208dd73cc4088a6a2a61f031481d97e8db55e0b281592bd64ce29f1271d",
3385
- "bytes": 7501
3383
+ "source_digest": "ad59db78f10035d6439d4ce58743934e68e3a6e94b3384376b5c7346e4d54c78",
3384
+ "digest": "e3082b715dc57ba277cac3d407550ad4641e0bddb1b21cf4bc8eb18e2e413193",
3385
+ "bytes": 7767
3386
3386
  },
3387
3387
  {
3388
3388
  "destination": "skills/agdf-code-review/SKILL.md",
@@ -3391,9 +3391,9 @@
3391
3391
  "rule": "copilot_name_projection",
3392
3392
  "requirement": "Copilot skill agdf-code-review",
3393
3393
  "source": "plugins/agdf/skills/code-review/SKILL.md",
3394
- "source_digest": "21870b51430849b30d3480aa28f0c6137ebcd41ea94b3ed6e57c0644bd45e9fe",
3395
- "digest": "6075815ebc40460a69329a76e2b3f03191dd2f110d13921f84199cfccb57ea8a",
3396
- "bytes": 7600
3394
+ "source_digest": "5e31849f6e20b3bae599702c91a8b1159991c6cdef3a8721821e002994d0e574",
3395
+ "digest": "c27319f2a9d9a10bbd978f201c753e268624b977d1e2ebd982362c08fb0122be",
3396
+ "bytes": 7894
3397
3397
  },
3398
3398
  {
3399
3399
  "destination": "skills/agdf-delivery-closeout/SKILL.md",
@@ -3457,9 +3457,9 @@
3457
3457
  "rule": "copilot_name_projection",
3458
3458
  "requirement": "Copilot skill agdf-qa-gate",
3459
3459
  "source": "plugins/agdf/skills/qa-gate/SKILL.md",
3460
- "source_digest": "c6db8f795391ac1a73cb312e0ea20e8d5426fbd99a321387c2946740ecea01e0",
3461
- "digest": "937be805f72890182f0833007ff89214ed575e97c51813cafe4fb27473ebb49d",
3462
- "bytes": 11263
3460
+ "source_digest": "ad0ebdbc69a1f36e9ccb86991b053baee4063a9fcf9428ae5ea735e5ada229c5",
3461
+ "digest": "66eecc3ddb02662000f2d1da215b8e93f07bf658660133f71dbcd312ec3e6226",
3462
+ "bytes": 11523
3463
3463
  },
3464
3464
  {
3465
3465
  "destination": "skills/agdf-release-or/SKILL.md",
@@ -3490,9 +3490,9 @@
3490
3490
  "rule": "copilot_name_projection",
3491
3491
  "requirement": "Copilot skill agdf-sd-definition",
3492
3492
  "source": "plugins/agdf/skills/sd-definition/SKILL.md",
3493
- "source_digest": "30bb53adda60c665cb8e800b5b80622cef908f244a5909e768e90add240da4d4",
3494
- "digest": "98ee0e369a0e91740fb475c9c72ecae0a510db626644b16749f31b6ecb6a1e70",
3495
- "bytes": 3692
3493
+ "source_digest": "b38cc4320f12aa11a21c14fc9b8bf4f3aa7a45f22bf5262506811106bf2f581f",
3494
+ "digest": "d894eb70d8d7343586d1bed14e18d6eb9a44e74f9c11dc44bc6879c4d16d6a0e",
3495
+ "bytes": 3719
3496
3496
  },
3497
3497
  {
3498
3498
  "destination": "skills/agdf-task-plan-review/SKILL.md",
@@ -3501,9 +3501,9 @@
3501
3501
  "rule": "copilot_name_projection",
3502
3502
  "requirement": "Copilot skill agdf-task-plan-review",
3503
3503
  "source": "plugins/agdf/skills/task-plan-review/SKILL.md",
3504
- "source_digest": "145e9b7b3c9ea51e43a45031289ee3778ad468d8e7cce92cbdf65f9ae0e8ba1c",
3505
- "digest": "0ca69e63d70a496acc531f44cc66803c425cd22c13ed7a017bb0077ac1d50432",
3506
- "bytes": 8249
3504
+ "source_digest": "8ae9cc237863484a19bdc94c8fc7f3c10b7a13386888bbfb2fc8cdde372aaf01",
3505
+ "digest": "17c4251faf5919569236d68865c3d473fa7d4c0483d88202499f48f4560265d8",
3506
+ "bytes": 8524
3507
3507
  },
3508
3508
  {
3509
3509
  "destination": "skills/agdf-tp-definition/SKILL.md",
@@ -3512,9 +3512,9 @@
3512
3512
  "rule": "copilot_name_projection",
3513
3513
  "requirement": "Copilot skill agdf-tp-definition",
3514
3514
  "source": "plugins/agdf/skills/tp-definition/SKILL.md",
3515
- "source_digest": "bc219fb14bec7cc863951996850dad2f5dd4229cab82fb16a7b92f5d11bb0cdb",
3516
- "digest": "8a075e3ec06380e15d480c7a30d1ae2d5e7a1a12831c2dfad0a54b026b855361",
3517
- "bytes": 3696
3515
+ "source_digest": "825f5ba1856f665f0fa89c6fbb2c2cde293bf1f16949ba35a29974cf01896da1",
3516
+ "digest": "68b4584bc02429e148ddff1193c34def951aa84e87c1d3a6710dd1825000c55e",
3517
+ "bytes": 3723
3518
3518
  },
3519
3519
  {
3520
3520
  "destination": "skills/agdf-ur-definition/SKILL.md",
@@ -3633,9 +3633,9 @@
3633
3633
  "rule": "copilot_name_projection",
3634
3634
  "requirement": "focused runtime contract",
3635
3635
  "source": "plugins/agdf/meta/contracts/quality.md",
3636
- "source_digest": "92522ec24f9fa96ae2258c3c5e2e0ea786a2c79a9cd07b2a9cc51c5a0d249bf8",
3637
- "digest": "92522ec24f9fa96ae2258c3c5e2e0ea786a2c79a9cd07b2a9cc51c5a0d249bf8",
3638
- "bytes": 14363
3636
+ "source_digest": "75be32ae784d0a8483e9427b701c30302377ee18faa860a005b4ae4d14907197",
3637
+ "digest": "75be32ae784d0a8483e9427b701c30302377ee18faa860a005b4ae4d14907197",
3638
+ "bytes": 19154
3639
3639
  },
3640
3640
  {
3641
3641
  "destination": "skills/contracts/request-activation.md",
@@ -3655,9 +3655,9 @@
3655
3655
  "rule": "copilot_name_projection",
3656
3656
  "requirement": "focused runtime contract",
3657
3657
  "source": "plugins/agdf/meta/contracts/sd-definition.md",
3658
- "source_digest": "21d667b5a020ae651a5d3ef4748b7eb19247cfe62f3f97c38f57385adaf671eb",
3659
- "digest": "21d667b5a020ae651a5d3ef4748b7eb19247cfe62f3f97c38f57385adaf671eb",
3660
- "bytes": 5157
3658
+ "source_digest": "9ec104f39f1e080a78b41c735791dd1520267aa608c64e6a40344885176d15ba",
3659
+ "digest": "9ec104f39f1e080a78b41c735791dd1520267aa608c64e6a40344885176d15ba",
3660
+ "bytes": 6393
3661
3661
  },
3662
3662
  {
3663
3663
  "destination": "skills/contracts/task-target-resolution.md",
@@ -3677,9 +3677,9 @@
3677
3677
  "rule": "copilot_name_projection",
3678
3678
  "requirement": "focused runtime contract",
3679
3679
  "source": "plugins/agdf/meta/contracts/tp-definition.md",
3680
- "source_digest": "0c7530bdee6458b3088d8785eec2acdd258297fdd0aaef670fd8662efd51e99f",
3681
- "digest": "0c7530bdee6458b3088d8785eec2acdd258297fdd0aaef670fd8662efd51e99f",
3682
- "bytes": 6046
3680
+ "source_digest": "72232f6fc3411e97e752f8aa7d0d993a5c5b3587595e82ef28a5e176208fefb7",
3681
+ "digest": "72232f6fc3411e97e752f8aa7d0d993a5c5b3587595e82ef28a5e176208fefb7",
3682
+ "bytes": 6466
3683
3683
  },
3684
3684
  {
3685
3685
  "destination": "skills/contracts/ur-definition.md",
@@ -22,6 +22,9 @@ Which existing modules, documents, services or owners remain authoritative?
22
22
  Use one bullet per binding decision in the form `SDD-...: <decision>; rationale: <why>; consequence: <trade-off>`.
23
23
  Use stable IDs. If no binding design decision is needed, record one reasoned bullet beginning
24
24
  `none —`. The Acceptance Traceability table below must reference every listed ID and no others.
25
+ When a decision selects or changes external technology (framework, library, API, protocol,
26
+ service or major version), name the checked authoritative source, version and check date in its
27
+ rationale.
25
28
 
26
29
  ## 4. Integration Points
27
30
 
@@ -33,7 +36,10 @@ Which constraints must implementation preserve?
33
36
 
34
37
  ## 6. Test And Evidence Strategy
35
38
 
36
- Which evidence must TP and QA later collect?
39
+ Apply quality.md Proportionate Tests And Evidence and Verification Effectiveness And
40
+ Completion. What existing coverage can be reused, what risks/interfaces need new proof,
41
+ and which Run/CI/available-nightly checks must finish before which decision? Explain
42
+ applicability, uncertainty and gaps proportionately here; do not create a second policy.
37
43
 
38
44
  ## 7. Acceptance Traceability
39
45
 
@@ -30,6 +30,10 @@ boundary or failure scenarios where they matter to the criterion.
30
30
 
31
31
  ## 3. Test Plan
32
32
 
33
+ Apply quality.md Proportionate Tests And Evidence and Verification Effectiveness And
34
+ Completion. Reuse applicable proof before planning new collection; record grouped
35
+ scope/risk, validity and timing rationale here or in existing evidence fields. Derive
36
+ expected outcomes from requirements, retain gaps and define when checking is sufficient.
33
37
  For each applicable verification scenario name its concrete execution prerequisites and failure action.
34
38
 
35
39
  | criterion_id | scenario_id | test_route | environment | prerequisites_permissions | owner | expected_evidence | unavailable_action |
@@ -1,11 +1,12 @@
1
1
  # @agdf/mcp-server
2
2
 
3
- Local STDIO MCP adapter for AGDF dispatch and control inspection.
3
+ Local STDIO MCP adapter.
4
4
 
5
5
  MCP tools: `agdf_dispatch`, `agdf_inspect`, `agdf_prepare`, `agdf_record`, `agdf_approve`, `agdf_revise`, `agdf_closeout`.
6
6
 
7
- The bounded write groups, selected contract/status reads, original-operation recovery and
8
- focused app-only decision facade are described in [Core and MCP command flow](../../docs/architecture/core-mcp-command-flow.md).
7
+ [Integration guide](../../docs/architecture/09-mcp-integrationsrichtlinien.md).
8
+ [Command flow](../../docs/architecture/core-mcp-command-flow.md): bounded writes,
9
+ contract/status reads, original-operation recovery and the app-only decision facade.
9
10
  Host tool permission is separate from a deliberate gate decision. The source candidate's
10
11
  click actions remain disabled while native app-only mediation is unqualified.
11
12
 
@@ -53,8 +54,7 @@ service itself remains read-only. Accordingly, `agdf_dispatch` declares `readOnl
53
54
 
54
55
  > [!IMPORTANT]
55
56
  > This package documents the repository development build. The previously published AGDF 0.14.5 release
56
- > did not include the MCP support described here. Repository assemblies and local plugin builds still
57
- > carry the canonical version `0.14.5`, but can contain these newer MCP features. The version alone
57
+ > did not include the MCP support described here. Current assemblies and local plugin builds take their version from the canonical package manifests. The version alone
58
58
  > does not identify the payload: verify the assembly or installed runtime digests and the loaded session.
59
59
  > These development instructions do not establish what a current npm `@latest` resolution contains.
60
60
 
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agdf/mcp-server",
3
- "version": "0.20.0",
3
+ "version": "0.20.2",
4
4
  "description": "Local MCP adapter for version-matched AGDF dispatch and control inspection.",
5
5
  "type": "module",
6
6
  "files": [
@@ -32,7 +32,7 @@
32
32
  },
33
33
  "dependencies": {
34
34
  "@modelcontextprotocol/server": "2.0.0",
35
- "create-agdf": "0.20.0"
35
+ "create-agdf": "0.20.2"
36
36
  },
37
37
  "devDependencies": {
38
38
  "@modelcontextprotocol/client": "2.0.0"
@@ -5,7 +5,8 @@ import { randomUUID } from 'node:crypto';
5
5
  import { fileURLToPath } from 'node:url';
6
6
  import { DispatchExecutionError, createWorkerDispatchExecutor } from "./worker.js";
7
7
  import { loadCockpitResource } from './cockpit-resource.js';
8
- import { requestDeclaresMcpAppUi, requestMcpClientInfo, requestMcpClientCapabilities } from "./ui-capability.js";
8
+ import { requestDeclaresMcpAppUi, requestMcpClientInfo, requestMcpClientCapabilities, requiresMcpAppUi,
9
+ missingMcpAppUi, capabilityTransport, modernToolUiDenial } from "./ui-capability.js";
9
10
 
10
11
  export const SERVER_NAME = "agdf-mcp";
11
12
 
@@ -38,7 +39,7 @@ function toolResult(runtime, name, input, result, serialize = runtime.serialize,
38
39
  return response;
39
40
  }
40
41
 
41
- export function buildAgdfServer({ runtime, executor } = {}) {
42
+ export function buildAgdfServer({ runtime, executor, era } = {}) {
42
43
  if (!runtime?.definition || typeof runtime.serialize !== "function") {
43
44
  throw new TypeError("AGDF MCP runtime is required");
44
45
  }
@@ -57,7 +58,14 @@ export function buildAgdfServer({ runtime, executor } = {}) {
57
58
  },
58
59
  close: async () => runtime.close?.(),
59
60
  };
60
- const server = new McpServer(
61
+ const registrations = new Map();
62
+ class AgdfServer extends McpServer {
63
+ async connect(transport) {
64
+ return super.connect(capabilityTransport(transport, message => modernToolUiDenial(message,
65
+ { era: era ?? (this.server.getNegotiatedProtocolVersion() === '2026-07-28' ? 'modern' : 'legacy'), runtime, registrations })));
66
+ }
67
+ }
68
+ const server = new AgdfServer(
61
69
  { name: SERVER_NAME, version: runtime.trustedContext.expectedVersion },
62
70
  { capabilities: { tools: {}, ...(runtime.ui ? { resources: {} } : {}) } },
63
71
  );
@@ -87,12 +95,13 @@ export function buildAgdfServer({ runtime, executor } = {}) {
87
95
  } };
88
96
  for (const tool of tools) {
89
97
  const { name, definition, serialize } = tool;
90
- server.registerTool(
98
+ const schema = fromJsonSchema(definition.inputSchema, deferredSchemas);
99
+ const registered = server.registerTool(
91
100
  name,
92
101
  {
93
102
  description: definition.description,
94
103
  annotations: definition.annotations,
95
- inputSchema: fromJsonSchema(definition.inputSchema, deferredSchemas),
104
+ inputSchema: schema,
96
105
  ...(definition.outputSchema ? { outputSchema: fromJsonSchema(definition.outputSchema, deferredSchemas) } : {}),
97
106
  ...(definition._meta ? { _meta: definition._meta } : {}),
98
107
  },
@@ -125,12 +134,16 @@ export function buildAgdfServer({ runtime, executor } = {}) {
125
134
  }
126
135
  },
127
136
  );
137
+ registrations.set(name, { tool, schema, registered });
128
138
  }
129
139
  if (runtime.ui) {
130
140
  const resource = loadCockpitResource(runtime.ui);
131
141
  server.registerResource(runtime.mode === 'decision' ? 'AGDF Gate Decision' : runtime.ui.label ?? 'AGDF Cockpit', resource.uri, { mimeType: resource.mimeType, _meta: resource._meta },
132
142
  async (_uri, context) => {
133
- if (!uiAllowed(context) || runtime.mode === 'decision' && !supportsUi(context)) throw new ProtocolError(ProtocolErrorCode.InvalidParams, "resource_denied");
143
+ if (requiresMcpAppUi(runtime, { requiresUi: runtime.mode === 'decision' }) && !supportsUi(context)) {
144
+ if ((era ?? (server.server.getNegotiatedProtocolVersion() === '2026-07-28' ? 'modern' : 'legacy')) === 'modern') throw missingMcpAppUi(runtime.ui.mimeType);
145
+ throw new ProtocolError(ProtocolErrorCode.InvalidParams, "resource_denied");
146
+ }
134
147
  return { contents: [resource] };
135
148
  });
136
149
  if (gated || runtime.mode === 'decision') {
@@ -155,8 +168,8 @@ export function buildAgdfServer({ runtime, executor } = {}) {
155
168
 
156
169
  export function serveAgdfStdio({ runtime, executor, onerror } = {}) {
157
170
  const instances = new Set();
158
- const handle = serveStdio(() => {
159
- const server = buildAgdfServer({ runtime, executor });
171
+ const handle = serveStdio(({ era }) => {
172
+ const server = buildAgdfServer({ runtime, executor, era });
160
173
  instances.add(server);
161
174
  return server;
162
175
  }, {
@@ -1,7 +1,55 @@
1
- import { CLIENT_CAPABILITIES_META_KEY, CLIENT_INFO_META_KEY } from "@modelcontextprotocol/server";
1
+ import { CLIENT_CAPABILITIES_META_KEY, CLIENT_INFO_META_KEY, MissingRequiredClientCapabilityError, classifyInboundRequest } from "@modelcontextprotocol/server";
2
2
 
3
3
  // Extension id under which MCP Apps hosts declare UI support (@modelcontextprotocol/ext-apps EXTENSION_ID).
4
4
  export const MCP_APP_UI_EXTENSION = "io.modelcontextprotocol/ui";
5
+ export const requiresMcpAppUi = (runtime, tool) => runtime.mode === 'cockpit' && runtime.uiCapabilityRequired === true || tool?.requiresUi === true;
6
+ export const missingMcpAppUi = mimeType => new MissingRequiredClientCapabilityError({
7
+ requiredCapabilities: { extensions: { [MCP_APP_UI_EXTENSION]: { mimeTypes: [mimeType] } } },
8
+ }, 'resource_denied');
9
+
10
+ // One narrow Transport decorator; framing, request dispatch, validation and
11
+ // pending-id/drain accounting remain with the original SDK connection.
12
+ export function capabilityTransport(transport, denial) {
13
+ const wrapped = {
14
+ onmessage: transport.onmessage,
15
+ onerror: transport.onerror,
16
+ onclose: transport.onclose,
17
+ start: () => transport.start(),
18
+ send: (message, options) => transport.send(message, options),
19
+ close: () => transport.close(),
20
+ get sessionId() { return transport.sessionId; },
21
+ set sessionId(value) { transport.sessionId = value; },
22
+ get hasPerRequestStream() { return transport.hasPerRequestStream; },
23
+ };
24
+ for (const method of ['setProtocolVersion', 'setSupportedProtocolVersions']) {
25
+ if (transport[method]) wrapped[method] = (...args) => transport[method](...args);
26
+ }
27
+ transport.onerror = error => wrapped.onerror?.(error);
28
+ transport.onclose = () => wrapped.onclose?.();
29
+ transport.onmessage = (message, extra) => {
30
+ const error = denial(message);
31
+ if (!error) { wrapped.onmessage?.(message, extra); return; }
32
+ // Sending through the original channel settles its pending request id.
33
+ Promise.resolve().then(() => transport.send({ jsonrpc: '2.0', id: message.id,
34
+ error: { code: error.code, message: error.message, data: error.data } }))
35
+ .catch(cause => wrapped.onerror?.(cause));
36
+ };
37
+ return wrapped;
38
+ }
39
+
40
+ export function modernToolUiDenial(message, { era, runtime, registrations }) {
41
+ if (era !== 'modern' || message?.method !== 'tools/call') return null;
42
+ const classified = classifyInboundRequest({ httpMethod: 'POST', body: message });
43
+ if (classified.kind !== 'modern' || classified.messageKind !== 'request') return null;
44
+ const entry = registrations.get(message.params?.name);
45
+ if (!entry?.registered.enabled || !requiresMcpAppUi(runtime, entry.tool)
46
+ || declaresMcpAppUi(message.params?._meta?.[CLIENT_CAPABILITIES_META_KEY], runtime.ui.mimeType)) return null;
47
+ const checked = entry.schema['~standard'].validate(message.params.arguments ?? {});
48
+ // The pinned fromJsonSchema provider is synchronous. Never treat an unknown
49
+ // asynchronous provider as proof that arguments passed validation.
50
+ if (checked?.then || checked.issues?.length) return null;
51
+ return missingMcpAppUi(runtime.ui.mimeType);
52
+ }
5
53
  export const requestMcpClientInfo = (server, context) => context?.mcpReq?.envelope?.[CLIENT_INFO_META_KEY] ?? server.getClientVersion();
6
54
  export const requestMcpClientCapabilities = (server, context) => context?.mcpReq?.envelope?.[CLIENT_CAPABILITIES_META_KEY] ?? server.getClientCapabilities();
7
55