harnesstap 1.3.1 → 1.3.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 (175) hide show
  1. package/dist/apply-Q5SFF3FY.js +67 -0
  2. package/dist/{approve-KQNCNH2R.js → approve-L7IFSYBO.js} +12 -12
  3. package/dist/{audit-SLYOZCMI.js → audit-PBJDK7A4.js} +16 -16
  4. package/dist/{auth-3IEVICFT.js → auth-OM73RLNS.js} +8 -8
  5. package/dist/bin.js +2 -2
  6. package/dist/{chunk-DWVAR4BP.js → chunk-24V5ZSIF.js} +6 -4
  7. package/dist/chunk-24V5ZSIF.js.map +1 -0
  8. package/dist/{chunk-NJ7WRKIQ.js → chunk-3EGM4IUI.js} +3 -3
  9. package/dist/{chunk-GRJY22U6.js → chunk-3JOPDYQD.js} +45 -6
  10. package/dist/chunk-3JOPDYQD.js.map +1 -0
  11. package/dist/{chunk-XQFT4PEP.js → chunk-555XE3NJ.js} +2 -2
  12. package/dist/{chunk-3RBYT7QN.js → chunk-64R32MG2.js} +7 -7
  13. package/dist/{chunk-XFZQVYIN.js → chunk-6I3RY6R5.js} +4 -4
  14. package/dist/{chunk-SZNBUIDR.js → chunk-6JMVGKMD.js} +47 -47
  15. package/dist/chunk-6JMVGKMD.js.map +1 -0
  16. package/dist/{chunk-KCQC7YBK.js → chunk-6ZWKF3YZ.js} +13 -13
  17. package/dist/{chunk-BSOBXLYI.js → chunk-AFKCNFPP.js} +6 -6
  18. package/dist/{chunk-UJYFTXHV.js → chunk-AUWWL6KX.js} +5 -5
  19. package/dist/{chunk-KDAV2GUT.js → chunk-AVZOFMJX.js} +11 -11
  20. package/dist/{chunk-KMWHZSEG.js → chunk-BXSS2S4W.js} +2 -2
  21. package/dist/{chunk-TYULB6ZY.js → chunk-CZ4T75PP.js} +19 -19
  22. package/dist/{chunk-MWXA4PFE.js → chunk-ENHDEB7Z.js} +3 -3
  23. package/dist/{chunk-C4QBVVEH.js → chunk-EY4ES5MG.js} +3 -3
  24. package/dist/{chunk-VL2NWCZV.js → chunk-FBYAIBHP.js} +2 -2
  25. package/dist/{chunk-J4CKQXQ6.js → chunk-FUV7QYBS.js} +5 -5
  26. package/dist/{chunk-DV74UZJI.js → chunk-G5RWVZZ7.js} +3 -3
  27. package/dist/{chunk-F2L4VNQK.js → chunk-GWQVYGRD.js} +16 -16
  28. package/dist/{chunk-3IZ7SEGT.js → chunk-HENOKIBB.js} +3 -3
  29. package/dist/{chunk-PXU2OS26.js → chunk-HWL67OCJ.js} +2 -2
  30. package/dist/{chunk-7LWH5SWH.js → chunk-IAZNF35S.js} +2 -2
  31. package/dist/{chunk-JKGSJGCC.js → chunk-IHW4PCDT.js} +4 -4
  32. package/dist/{chunk-ZY2MZ2KQ.js → chunk-IKAGGJEO.js} +2 -2
  33. package/dist/{chunk-G26HZZDJ.js → chunk-JJJJ2RAD.js} +4 -4
  34. package/dist/{chunk-2EIJYDNI.js → chunk-KJIFZLHN.js} +191 -70
  35. package/dist/chunk-KJIFZLHN.js.map +1 -0
  36. package/dist/{chunk-YDD3ES2K.js → chunk-LDVXYN6F.js} +2 -2
  37. package/dist/{chunk-QRZPQNLX.js → chunk-LGWUTV5Q.js} +8 -8
  38. package/dist/{chunk-LNJ3WZZX.js → chunk-MFCZN253.js} +7 -7
  39. package/dist/{chunk-SPRVUATR.js → chunk-MHOTXMD2.js} +4 -4
  40. package/dist/{chunk-SY7G5QEI.js → chunk-NEPUP33Q.js} +2 -2
  41. package/dist/{chunk-GQKKX7OE.js → chunk-OPVIX7E4.js} +2 -2
  42. package/dist/{chunk-BIBUCC2E.js → chunk-OQ4KBUN2.js} +4 -4
  43. package/dist/{chunk-K2BPYEH5.js → chunk-OXVCYRZB.js} +2 -2
  44. package/dist/{chunk-MY62SSKC.js → chunk-PJQAMC6L.js} +3 -3
  45. package/dist/{chunk-HVVPTCKR.js → chunk-PW5QXRBA.js} +4 -4
  46. package/dist/{chunk-IK524ZDW.js → chunk-QNAIDM6W.js} +2 -2
  47. package/dist/{chunk-63U7QWNY.js → chunk-R4PTE774.js} +14 -14
  48. package/dist/{chunk-7L2K4N25.js → chunk-S2E4KSYW.js} +6 -6
  49. package/dist/{chunk-H6DVP2SI.js → chunk-U472S6IB.js} +10 -10
  50. package/dist/{chunk-4KNQZDZC.js → chunk-UEHDEADL.js} +5 -5
  51. package/dist/{chunk-VC6OKCJF.js → chunk-UNRR4KH5.js} +6 -4
  52. package/dist/{chunk-VC6OKCJF.js.map → chunk-UNRR4KH5.js.map} +1 -1
  53. package/dist/{chunk-IRU7NBOT.js → chunk-WXRPQICX.js} +2 -2
  54. package/dist/{chunk-IBOABSIA.js → chunk-XCPWLGPB.js} +2 -2
  55. package/dist/{chunk-VL7BGD47.js → chunk-XRXFJTAT.js} +7 -7
  56. package/dist/{chunk-DXKAKKLP.js → chunk-Y2JGMICO.js} +2 -2
  57. package/dist/{chunk-KDDXZBMC.js → chunk-YRGM7RAD.js} +5 -5
  58. package/dist/{chunk-QO4LBDVI.js → chunk-YVJQ2QDG.js} +34 -34
  59. package/dist/{chunk-EIWXS4RM.js → chunk-YX7MVSDA.js} +3 -3
  60. package/dist/{chunk-EWBCFAF3.js → chunk-ZGRBIBO7.js} +4 -4
  61. package/dist/{chunk-3IWTJCPA.js → chunk-ZTBAMBAI.js} +4 -4
  62. package/dist/{chunk-6BY4BV5G.js → chunk-ZVANUFPF.js} +40 -3
  63. package/dist/chunk-ZVANUFPF.js.map +1 -0
  64. package/dist/{compile-57EEIUMB.js → compile-SDOASKGL.js} +44 -44
  65. package/dist/{config-4EJ3D7QJ.js → config-4VZTVZKF.js} +22 -22
  66. package/dist/{doctor-EEV6P5CH.js → doctor-HH6CFBRQ.js} +11 -11
  67. package/dist/{environment-WFEG4DAT.js → environment-K7YMJJYN.js} +24 -24
  68. package/dist/{github-BSMQD72A.js → github-A6TYG7WS.js} +7 -7
  69. package/dist/{harness-VX3PNVQW.js → harness-772XBFZQ.js} +20 -20
  70. package/dist/{help-AW2HKX63.js → help-QR4VTJZU.js} +16 -16
  71. package/dist/{help-BVFOZD7E.js → help-TLHNRJJ6.js} +2 -2
  72. package/dist/index.js +19 -19
  73. package/dist/{init-SPN2GEZ4.js → init-AOKFPZHG.js} +28 -28
  74. package/dist/{lock-K2LLUU7H.js → lock-INAXNLMC.js} +11 -11
  75. package/dist/{marketplace-VEKSWGX3.js → marketplace-TUVLLPBG.js} +7 -7
  76. package/dist/{mcp-T6DKIKSF.js → mcp-MMWGRASN.js} +44 -44
  77. package/dist/{migrate-OO37WSB2.js → migrate-55S4XODX.js} +24 -24
  78. package/dist/open-SLFQV45J.js +32 -0
  79. package/dist/{pack-V32UPC7W.js → pack-VZIBS42E.js} +16 -16
  80. package/dist/plugin-WLEFFBRY.js +64 -0
  81. package/dist/plugin-from-project-UV2O364T.js +16 -0
  82. package/dist/{policy-F5MKZNOC.js → policy-P3HGLEZS.js} +11 -11
  83. package/dist/{profile-H4PMH4XT.js → profile-STS3CZUK.js} +41 -41
  84. package/dist/{project-QVNEJJGH.js → project-R4DGM3ZG.js} +26 -26
  85. package/dist/{resource-GL4RLSGI.js → resource-GJVEDXVZ.js} +33 -33
  86. package/dist/{version-PBHZK44K.js → version-FUHV4O6U.js} +2 -2
  87. package/package.json +3 -1
  88. package/schemas/fixtures/confidence.ap.json +1 -1
  89. package/schemas/fixtures/context7.ap.json +1 -1
  90. package/schemas/fixtures/legacy-schema-v1.ap.json +13 -0
  91. package/schemas/fixtures/legacy-schemas-v1.ap.json +13 -0
  92. package/schemas/fixtures/minimal-with-schema.ap.json +1 -1
  93. package/schemas/fixtures/superpowers.ap.json +1 -1
  94. package/schemas/fixtures/third-party-skills.ap.json +1 -1
  95. package/dist/apply-2GRNKR5H.js +0 -67
  96. package/dist/chunk-2EIJYDNI.js.map +0 -1
  97. package/dist/chunk-6BY4BV5G.js.map +0 -1
  98. package/dist/chunk-DWVAR4BP.js.map +0 -1
  99. package/dist/chunk-GRJY22U6.js.map +0 -1
  100. package/dist/chunk-SZNBUIDR.js.map +0 -1
  101. package/dist/open-3V3QK5RK.js +0 -32
  102. package/dist/plugin-KOBNQ7GT.js +0 -64
  103. package/dist/plugin-from-project-X3VO3MB6.js +0 -16
  104. /package/dist/{apply-2GRNKR5H.js.map → apply-Q5SFF3FY.js.map} +0 -0
  105. /package/dist/{approve-KQNCNH2R.js.map → approve-L7IFSYBO.js.map} +0 -0
  106. /package/dist/{audit-SLYOZCMI.js.map → audit-PBJDK7A4.js.map} +0 -0
  107. /package/dist/{auth-3IEVICFT.js.map → auth-OM73RLNS.js.map} +0 -0
  108. /package/dist/{chunk-NJ7WRKIQ.js.map → chunk-3EGM4IUI.js.map} +0 -0
  109. /package/dist/{chunk-XQFT4PEP.js.map → chunk-555XE3NJ.js.map} +0 -0
  110. /package/dist/{chunk-3RBYT7QN.js.map → chunk-64R32MG2.js.map} +0 -0
  111. /package/dist/{chunk-XFZQVYIN.js.map → chunk-6I3RY6R5.js.map} +0 -0
  112. /package/dist/{chunk-KCQC7YBK.js.map → chunk-6ZWKF3YZ.js.map} +0 -0
  113. /package/dist/{chunk-BSOBXLYI.js.map → chunk-AFKCNFPP.js.map} +0 -0
  114. /package/dist/{chunk-UJYFTXHV.js.map → chunk-AUWWL6KX.js.map} +0 -0
  115. /package/dist/{chunk-KDAV2GUT.js.map → chunk-AVZOFMJX.js.map} +0 -0
  116. /package/dist/{chunk-KMWHZSEG.js.map → chunk-BXSS2S4W.js.map} +0 -0
  117. /package/dist/{chunk-TYULB6ZY.js.map → chunk-CZ4T75PP.js.map} +0 -0
  118. /package/dist/{chunk-MWXA4PFE.js.map → chunk-ENHDEB7Z.js.map} +0 -0
  119. /package/dist/{chunk-C4QBVVEH.js.map → chunk-EY4ES5MG.js.map} +0 -0
  120. /package/dist/{chunk-VL2NWCZV.js.map → chunk-FBYAIBHP.js.map} +0 -0
  121. /package/dist/{chunk-J4CKQXQ6.js.map → chunk-FUV7QYBS.js.map} +0 -0
  122. /package/dist/{chunk-DV74UZJI.js.map → chunk-G5RWVZZ7.js.map} +0 -0
  123. /package/dist/{chunk-F2L4VNQK.js.map → chunk-GWQVYGRD.js.map} +0 -0
  124. /package/dist/{chunk-3IZ7SEGT.js.map → chunk-HENOKIBB.js.map} +0 -0
  125. /package/dist/{chunk-PXU2OS26.js.map → chunk-HWL67OCJ.js.map} +0 -0
  126. /package/dist/{chunk-7LWH5SWH.js.map → chunk-IAZNF35S.js.map} +0 -0
  127. /package/dist/{chunk-JKGSJGCC.js.map → chunk-IHW4PCDT.js.map} +0 -0
  128. /package/dist/{chunk-ZY2MZ2KQ.js.map → chunk-IKAGGJEO.js.map} +0 -0
  129. /package/dist/{chunk-G26HZZDJ.js.map → chunk-JJJJ2RAD.js.map} +0 -0
  130. /package/dist/{chunk-YDD3ES2K.js.map → chunk-LDVXYN6F.js.map} +0 -0
  131. /package/dist/{chunk-QRZPQNLX.js.map → chunk-LGWUTV5Q.js.map} +0 -0
  132. /package/dist/{chunk-LNJ3WZZX.js.map → chunk-MFCZN253.js.map} +0 -0
  133. /package/dist/{chunk-SPRVUATR.js.map → chunk-MHOTXMD2.js.map} +0 -0
  134. /package/dist/{chunk-SY7G5QEI.js.map → chunk-NEPUP33Q.js.map} +0 -0
  135. /package/dist/{chunk-GQKKX7OE.js.map → chunk-OPVIX7E4.js.map} +0 -0
  136. /package/dist/{chunk-BIBUCC2E.js.map → chunk-OQ4KBUN2.js.map} +0 -0
  137. /package/dist/{chunk-K2BPYEH5.js.map → chunk-OXVCYRZB.js.map} +0 -0
  138. /package/dist/{chunk-MY62SSKC.js.map → chunk-PJQAMC6L.js.map} +0 -0
  139. /package/dist/{chunk-HVVPTCKR.js.map → chunk-PW5QXRBA.js.map} +0 -0
  140. /package/dist/{chunk-IK524ZDW.js.map → chunk-QNAIDM6W.js.map} +0 -0
  141. /package/dist/{chunk-63U7QWNY.js.map → chunk-R4PTE774.js.map} +0 -0
  142. /package/dist/{chunk-7L2K4N25.js.map → chunk-S2E4KSYW.js.map} +0 -0
  143. /package/dist/{chunk-H6DVP2SI.js.map → chunk-U472S6IB.js.map} +0 -0
  144. /package/dist/{chunk-4KNQZDZC.js.map → chunk-UEHDEADL.js.map} +0 -0
  145. /package/dist/{chunk-IRU7NBOT.js.map → chunk-WXRPQICX.js.map} +0 -0
  146. /package/dist/{chunk-IBOABSIA.js.map → chunk-XCPWLGPB.js.map} +0 -0
  147. /package/dist/{chunk-VL7BGD47.js.map → chunk-XRXFJTAT.js.map} +0 -0
  148. /package/dist/{chunk-DXKAKKLP.js.map → chunk-Y2JGMICO.js.map} +0 -0
  149. /package/dist/{chunk-KDDXZBMC.js.map → chunk-YRGM7RAD.js.map} +0 -0
  150. /package/dist/{chunk-QO4LBDVI.js.map → chunk-YVJQ2QDG.js.map} +0 -0
  151. /package/dist/{chunk-EIWXS4RM.js.map → chunk-YX7MVSDA.js.map} +0 -0
  152. /package/dist/{chunk-EWBCFAF3.js.map → chunk-ZGRBIBO7.js.map} +0 -0
  153. /package/dist/{chunk-3IWTJCPA.js.map → chunk-ZTBAMBAI.js.map} +0 -0
  154. /package/dist/{compile-57EEIUMB.js.map → compile-SDOASKGL.js.map} +0 -0
  155. /package/dist/{config-4EJ3D7QJ.js.map → config-4VZTVZKF.js.map} +0 -0
  156. /package/dist/{doctor-EEV6P5CH.js.map → doctor-HH6CFBRQ.js.map} +0 -0
  157. /package/dist/{environment-WFEG4DAT.js.map → environment-K7YMJJYN.js.map} +0 -0
  158. /package/dist/{github-BSMQD72A.js.map → github-A6TYG7WS.js.map} +0 -0
  159. /package/dist/{harness-VX3PNVQW.js.map → harness-772XBFZQ.js.map} +0 -0
  160. /package/dist/{help-AW2HKX63.js.map → help-QR4VTJZU.js.map} +0 -0
  161. /package/dist/{help-BVFOZD7E.js.map → help-TLHNRJJ6.js.map} +0 -0
  162. /package/dist/{init-SPN2GEZ4.js.map → init-AOKFPZHG.js.map} +0 -0
  163. /package/dist/{lock-K2LLUU7H.js.map → lock-INAXNLMC.js.map} +0 -0
  164. /package/dist/{marketplace-VEKSWGX3.js.map → marketplace-TUVLLPBG.js.map} +0 -0
  165. /package/dist/{mcp-T6DKIKSF.js.map → mcp-MMWGRASN.js.map} +0 -0
  166. /package/dist/{migrate-OO37WSB2.js.map → migrate-55S4XODX.js.map} +0 -0
  167. /package/dist/{open-3V3QK5RK.js.map → open-SLFQV45J.js.map} +0 -0
  168. /package/dist/{pack-V32UPC7W.js.map → pack-VZIBS42E.js.map} +0 -0
  169. /package/dist/{plugin-KOBNQ7GT.js.map → plugin-WLEFFBRY.js.map} +0 -0
  170. /package/dist/{plugin-from-project-X3VO3MB6.js.map → plugin-from-project-UV2O364T.js.map} +0 -0
  171. /package/dist/{policy-F5MKZNOC.js.map → policy-P3HGLEZS.js.map} +0 -0
  172. /package/dist/{profile-H4PMH4XT.js.map → profile-STS3CZUK.js.map} +0 -0
  173. /package/dist/{project-QVNEJJGH.js.map → project-R4DGM3ZG.js.map} +0 -0
  174. /package/dist/{resource-GL4RLSGI.js.map → resource-GJVEDXVZ.js.map} +0 -0
  175. /package/dist/{version-PBHZK44K.js.map → version-FUHV4O6U.js.map} +0 -0
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  formatCommand,
3
3
  resolveInvocationName
4
- } from "./chunk-DXKAKKLP.js";
4
+ } from "./chunk-Y2JGMICO.js";
5
5
  import {
6
6
  ui
7
- } from "./chunk-YDD3ES2K.js";
7
+ } from "./chunk-LDVXYN6F.js";
8
8
  import {
9
9
  PACKAGE_VERSION
10
- } from "./chunk-DWVAR4BP.js";
10
+ } from "./chunk-24V5ZSIF.js";
11
11
 
12
12
  // src/services/cli-help-registry.ts
13
13
  var COMMAND_HELP_REGISTRY = {
@@ -1356,4 +1356,4 @@ export {
1356
1356
  configureCommandGroup,
1357
1357
  configureProgramHelp
1358
1358
  };
1359
- //# sourceMappingURL=chunk-G26HZZDJ.js.map
1359
+ //# sourceMappingURL=chunk-JJJJ2RAD.js.map
@@ -1,4 +1,6 @@
1
1
  import {
2
+ AP_MCP_SCHEMA_URL,
3
+ AP_SCHEMA_URL,
2
4
  DEFAULT_GIT_CLONE_TIMEOUT_MS,
3
5
  builtinMarketplaceGitUrl,
4
6
  cursorCacheRoot,
@@ -6,7 +8,9 @@ import {
6
8
  cursorMarketplacesRoot,
7
9
  cursorProjectsMcpsRoot,
8
10
  ensureMarketplaceCatalog,
11
+ isAgentPluginsSchemaId,
9
12
  listMarketplaces,
13
+ lookupApSchema,
10
14
  marketplaceCacheDir,
11
15
  parsePluginRef,
12
16
  readFirstHostPluginManifest,
@@ -14,10 +18,10 @@ import {
14
18
  refreshGitSource,
15
19
  refreshMarketplaceCatalog,
16
20
  runCommandWithTimeout
17
- } from "./chunk-6BY4BV5G.js";
21
+ } from "./chunk-ZVANUFPF.js";
18
22
  import {
19
23
  ensureGithubGitConfigArgs
20
- } from "./chunk-GQKKX7OE.js";
24
+ } from "./chunk-OPVIX7E4.js";
21
25
  import {
22
26
  AP_PACKAGE_MEDIA_TYPE,
23
27
  DEFAULT_CATALOG_SLUG,
@@ -30,7 +34,7 @@ import {
30
34
  isSelectorInCatalogScope,
31
35
  parsePluginSelector,
32
36
  resolveCatalogScope
33
- } from "./chunk-ZY2MZ2KQ.js";
37
+ } from "./chunk-IKAGGJEO.js";
34
38
  import {
35
39
  loadSettings
36
40
  } from "./chunk-VQVUJYYY.js";
@@ -40,7 +44,7 @@ import {
40
44
  getDb,
41
45
  getHarnesstapDir,
42
46
  harnesstapDirForHomeRoot
43
- } from "./chunk-DWVAR4BP.js";
47
+ } from "./chunk-24V5ZSIF.js";
44
48
 
45
49
  // src/types.ts
46
50
  var MATERIAL_RESOURCE_TYPES = [
@@ -1028,7 +1032,7 @@ function readJson(path) {
1028
1032
  }
1029
1033
  }
1030
1034
  function isAgentPluginManifest(manifest, installPath) {
1031
- if (typeof manifest.$schema === "string" && manifest.$schema.includes("agent-plugins")) {
1035
+ if (isAgentPluginsSchemaId(manifest.$schema)) {
1032
1036
  return true;
1033
1037
  }
1034
1038
  return existsSync4(join4(installPath, "skills")) || existsSync4(join4(installPath, "mcp.json"));
@@ -2080,13 +2084,13 @@ function emitMarkdownAgent(agent, flavor) {
2080
2084
  return _exhaustive;
2081
2085
  }
2082
2086
  }
2083
- const nonEmpty = Object.entries(frontmatter).filter(
2087
+ const nonEmpty2 = Object.entries(frontmatter).filter(
2084
2088
  ([, value]) => value !== void 0 && value !== null && value !== ""
2085
2089
  );
2086
- if (nonEmpty.length === 0) {
2090
+ if (nonEmpty2.length === 0) {
2087
2091
  return agent.instructions.trimStart();
2088
2092
  }
2089
- return matter.stringify(agent.instructions, Object.fromEntries(nonEmpty));
2093
+ return matter.stringify(agent.instructions, Object.fromEntries(nonEmpty2));
2090
2094
  }
2091
2095
  function serializedAgentDocument(resource, flavor) {
2092
2096
  if (resource.content.startsWith("---")) {
@@ -2754,10 +2758,14 @@ function parseMcpServersDocument(document) {
2754
2758
  if (!isRecord2(serversRaw)) {
2755
2759
  return {};
2756
2760
  }
2761
+ const isAgentPluginsMcp = document.$schema === AP_MCP_SCHEMA_URL;
2757
2762
  const result = {};
2758
2763
  for (const [name, serverEntry] of Object.entries(serversRaw)) {
2759
2764
  const metadata = parseMcpServerEntry(serverEntry);
2760
2765
  if (metadata) {
2766
+ if (isAgentPluginsMcp && metadata.connection_type !== "sse") {
2767
+ delete metadata.connection_type;
2768
+ }
2761
2769
  result[name] = metadata;
2762
2770
  }
2763
2771
  }
@@ -4533,7 +4541,6 @@ function slugifyApName(source) {
4533
4541
  }
4534
4542
 
4535
4543
  // src/services/agent-plugins/validate.ts
4536
- var AP_SCHEMA_URL = "https://agentplugins.org/schema/v1/plugin.schema.json";
4537
4544
  var CORE_FIELDS = /* @__PURE__ */ new Set([
4538
4545
  "$schema",
4539
4546
  "name",
@@ -4555,6 +4562,9 @@ ${problems.map((p) => ` ${p}`).join("\n")}`);
4555
4562
  this.problems = problems;
4556
4563
  }
4557
4564
  };
4565
+ function isVerbose() {
4566
+ return process.argv.includes("-v") || process.argv.includes("--verbose");
4567
+ }
4558
4568
  function withDefaultedApSchema(manifest) {
4559
4569
  if (typeof manifest !== "object" || manifest === null || Array.isArray(manifest)) {
4560
4570
  return { manifest, defaulted: false };
@@ -4562,12 +4572,22 @@ function withDefaultedApSchema(manifest) {
4562
4572
  const document = manifest;
4563
4573
  const schema = document.$schema;
4564
4574
  if (typeof schema === "string" && schema.length > 0) {
4575
+ if (lookupApSchema(schema).kind === "legacy") {
4576
+ if (isVerbose()) {
4577
+ console.error(`plugin.json uses legacy $schema ${schema}; reading it as ${AP_SCHEMA_URL}`);
4578
+ }
4579
+ return {
4580
+ manifest: { ...document, $schema: AP_SCHEMA_URL },
4581
+ defaulted: false,
4582
+ upgradedFrom: schema
4583
+ };
4584
+ }
4565
4585
  return { manifest, defaulted: false };
4566
4586
  }
4567
4587
  if (schema !== void 0 && typeof schema !== "string") {
4568
4588
  return { manifest, defaulted: false };
4569
4589
  }
4570
- if (process.argv.includes("-v") || process.argv.includes("--verbose")) {
4590
+ if (isVerbose()) {
4571
4591
  console.error(`plugin.json is missing $schema; defaulting to ${AP_SCHEMA_URL}`);
4572
4592
  }
4573
4593
  return {
@@ -4590,6 +4610,10 @@ function validateApManifest(manifest) {
4590
4610
  }
4591
4611
  if (typeof document.$schema !== "string" || document.$schema.length === 0) {
4592
4612
  problems.push("$schema is required and must be a string");
4613
+ } else if (lookupApSchema(document.$schema).kind === "unsupported-spec") {
4614
+ problems.push(
4615
+ `unsupported Agent Plugins version: $schema "${document.$schema}" (this HarnessTap version reads ${AP_SCHEMA_URL})`
4616
+ );
4593
4617
  }
4594
4618
  if (typeof document.name !== "string") {
4595
4619
  problems.push("name is required and must be a string");
@@ -4828,16 +4852,108 @@ function buildApManifest(pluginId) {
4828
4852
  };
4829
4853
  }
4830
4854
 
4855
+ // src/services/agent-plugins/spec-mcp.ts
4856
+ var HT_MCP_EXTRAS_PATH = `${HT_EXTENSION_NAMESPACE}/mcp.toml`;
4857
+ var RESERVED_ENV_NAMES = /* @__PURE__ */ new Set(["PLUGIN_ROOT", "PLUGIN_DATA"]);
4858
+ function nonEmpty(record) {
4859
+ return record !== void 0 && Object.keys(record).length > 0;
4860
+ }
4861
+ function specRemoteType(meta) {
4862
+ return meta.connection_type?.toLowerCase() === "sse" ? "sse" : "streamable-http";
4863
+ }
4864
+ function toSpecEntry(meta, options) {
4865
+ const extra = {};
4866
+ let entry;
4867
+ if (meta.transport === "http" && meta.url) {
4868
+ const type = specRemoteType(meta);
4869
+ entry = { type, url: meta.url };
4870
+ if (nonEmpty(meta.headers)) entry.headers = meta.headers;
4871
+ if (nonEmpty(meta.env)) extra.env = meta.env;
4872
+ if (meta.connection_type !== void 0 && meta.connection_type !== "sse") {
4873
+ extra.connection_type = meta.connection_type;
4874
+ }
4875
+ } else if (meta.command) {
4876
+ entry = { type: "stdio", command: meta.command };
4877
+ if (meta.args) entry.args = meta.args;
4878
+ const env = {};
4879
+ const reserved = {};
4880
+ for (const [key, value] of Object.entries(meta.env ?? {})) {
4881
+ (RESERVED_ENV_NAMES.has(key) ? reserved : env)[key] = value;
4882
+ }
4883
+ if (nonEmpty(env)) entry.env = env;
4884
+ if (nonEmpty(reserved)) extra.env = reserved;
4885
+ if (meta.transport !== "stdio") extra.transport = meta.transport;
4886
+ if (meta.connection_type !== void 0) extra.connection_type = meta.connection_type;
4887
+ } else {
4888
+ extra.transport = meta.transport;
4889
+ if (meta.url !== void 0) extra.url = meta.url;
4890
+ if (meta.args) extra.args = meta.args;
4891
+ if (nonEmpty(meta.env)) extra.env = meta.env;
4892
+ if (nonEmpty(meta.headers)) extra.headers = meta.headers;
4893
+ if (meta.connection_type !== void 0) extra.connection_type = meta.connection_type;
4894
+ }
4895
+ for (const key of options?.carry ?? []) {
4896
+ const value = meta[key];
4897
+ if (value !== void 0 && extra[key] === void 0) extra[key] = value;
4898
+ }
4899
+ return { ...entry ? { entry } : {}, extra };
4900
+ }
4901
+ function buildSpecMcpJson(servers, options) {
4902
+ const mcpServers = {};
4903
+ const extras = {};
4904
+ for (const name of Object.keys(servers).sort()) {
4905
+ const meta = servers[name];
4906
+ if (!meta) continue;
4907
+ const { entry, extra } = toSpecEntry(meta, options);
4908
+ if (entry) mcpServers[name] = entry;
4909
+ if (Object.keys(extra).length > 0) extras[name] = extra;
4910
+ }
4911
+ return { document: { $schema: AP_MCP_SCHEMA_URL, mcpServers }, extras };
4912
+ }
4913
+ function formatSpecMcpJson(document) {
4914
+ return JSON.stringify(document, null, 2);
4915
+ }
4916
+ function formatMcpExtrasToml(extras) {
4917
+ return formatTransportToml({ schema: HT_EXTENSION_SCHEMA, servers: extras });
4918
+ }
4919
+ function isSpecMcpDocument(document) {
4920
+ return typeof document === "object" && document !== null && !Array.isArray(document) && document.$schema === AP_MCP_SCHEMA_URL;
4921
+ }
4922
+ function isRecord3(value) {
4923
+ return typeof value === "object" && value !== null && !Array.isArray(value);
4924
+ }
4925
+ function readApMcpServers(document, extrasDocument) {
4926
+ const servers = parseMcpServersDocument(document);
4927
+ const extras = isRecord3(extrasDocument?.servers) ? extrasDocument.servers : {};
4928
+ for (const [name, rawExtra] of Object.entries(extras)) {
4929
+ if (!isRecord3(rawExtra)) continue;
4930
+ const base = servers[name];
4931
+ const merged = { ...base ?? {} };
4932
+ for (const [key, value] of Object.entries(rawExtra)) {
4933
+ if (key === "env" && isRecord3(value)) {
4934
+ merged.env = { ...isRecord3(merged.env) ? merged.env : {}, ...value };
4935
+ } else {
4936
+ merged[key] = value;
4937
+ }
4938
+ }
4939
+ if (merged.transport !== "stdio" && merged.transport !== "http") {
4940
+ merged.transport = typeof merged.url === "string" ? "http" : "stdio";
4941
+ }
4942
+ servers[name] = merged;
4943
+ }
4944
+ return servers;
4945
+ }
4946
+
4831
4947
  // src/services/agent-plugins/files.ts
4832
4948
  var AP_PACKAGE_SCHEMA = "urn:harnesstap:ap-package:v1";
4833
4949
  var MARKDOWN_COMPONENT_TYPES = ["instruction", "rule", "agent", "command"];
4834
4950
  var TOML_COMPONENT_TYPES = ["hook", "permission", "env_var", "model_config"];
4835
4951
  function emitFrontmatter(data, content) {
4836
- const nonEmpty = Object.entries(data).filter(
4952
+ const nonEmpty2 = Object.entries(data).filter(
4837
4953
  ([, value]) => value !== void 0 && value !== null && value !== ""
4838
4954
  );
4839
- if (nonEmpty.length === 0) return content;
4840
- return matter4.stringify(content, Object.fromEntries(nonEmpty));
4955
+ if (nonEmpty2.length === 0) return content;
4956
+ return matter4.stringify(content, Object.fromEntries(nonEmpty2));
4841
4957
  }
4842
4958
  function put(files, relativePath2, entry) {
4843
4959
  if (relativePath2.split("/").includes("..")) {
@@ -4849,23 +4965,17 @@ function put(files, relativePath2, entry) {
4849
4965
  function putUtf8(files, relativePath2, content) {
4850
4966
  put(files, relativePath2, { encoding: "utf8", content });
4851
4967
  }
4852
- function mcpEntryFromResource(resource) {
4968
+ function exportedMcpMetadata(resource) {
4853
4969
  const meta = resource.metadata;
4854
- const entry = {};
4855
- if (meta.transport === "http" && meta.url) {
4856
- entry.type = "http";
4857
- entry.url = meta.url;
4858
- if (meta.headers && Object.keys(meta.headers).length > 0) {
4859
- entry.headers = meta.headers;
4860
- }
4861
- } else {
4862
- if (meta.command) entry.command = meta.command;
4863
- if (meta.args) entry.args = meta.args;
4864
- }
4865
- if (meta.env && Object.keys(meta.env).length > 0) {
4866
- entry.env = meta.env;
4867
- }
4868
- return entry;
4970
+ return {
4971
+ transport: meta.transport,
4972
+ ...meta.command !== void 0 ? { command: meta.command } : {},
4973
+ ...meta.url !== void 0 ? { url: meta.url } : {},
4974
+ ...meta.args !== void 0 ? { args: meta.args } : {},
4975
+ ...meta.env !== void 0 ? { env: meta.env } : {},
4976
+ ...meta.headers !== void 0 ? { headers: meta.headers } : {},
4977
+ ...meta.connection_type !== void 0 ? { connection_type: meta.connection_type } : {}
4978
+ };
4869
4979
  }
4870
4980
  function buildTomlComponentDocument(type, resources) {
4871
4981
  const layout = COMPONENT_LAYOUT[type];
@@ -4937,11 +5047,15 @@ function emitResourceFiles(files, resources, options) {
4937
5047
  }
4938
5048
  const mcpServers = byType.get("mcp_server") ?? [];
4939
5049
  if (mcpServers.length > 0) {
4940
- const mcpConfig = {};
4941
- for (const resource of [...mcpServers].sort((a, b) => a.name.localeCompare(b.name))) {
4942
- mcpConfig[resource.name] = mcpEntryFromResource(resource);
5050
+ const servers = {};
5051
+ for (const resource of mcpServers) {
5052
+ servers[resource.name] = exportedMcpMetadata(resource);
5053
+ }
5054
+ const { document, extras } = buildSpecMcpJson(servers);
5055
+ putUtf8(files, "mcp.json", formatSpecMcpJson(document));
5056
+ if (Object.keys(extras).length > 0) {
5057
+ putUtf8(files, HT_MCP_EXTRAS_PATH, formatMcpExtrasToml(extras));
4943
5058
  }
4944
- putUtf8(files, "mcp.json", JSON.stringify({ mcpServers: mcpConfig }, null, 2));
4945
5059
  }
4946
5060
  for (const type of MARKDOWN_COMPONENT_TYPES) {
4947
5061
  const layout = COMPONENT_LAYOUT[type];
@@ -5086,7 +5200,7 @@ function isProbablyText(buffer) {
5086
5200
 
5087
5201
  // src/services/agent-plugins/import.ts
5088
5202
  var RESOURCE_SOURCE = "ap-package";
5089
- function isRecord3(value) {
5203
+ function isRecord4(value) {
5090
5204
  return value !== null && typeof value === "object" && !Array.isArray(value);
5091
5205
  }
5092
5206
  function fileText(entry) {
@@ -5096,17 +5210,17 @@ function isDependencySourceKind(value) {
5096
5210
  return typeof value === "string" && DEPENDENCY_SOURCE_KINDS.includes(value);
5097
5211
  }
5098
5212
  function parseOverrides(raw) {
5099
- if (!isRecord3(raw)) {
5213
+ if (!isRecord4(raw)) {
5100
5214
  return { versions: {}, resources: {} };
5101
5215
  }
5102
5216
  const versions = {};
5103
5217
  const resources = {};
5104
- if (isRecord3(raw.versions)) {
5218
+ if (isRecord4(raw.versions)) {
5105
5219
  for (const [key, value] of Object.entries(raw.versions)) {
5106
5220
  if (typeof value === "string") versions[key] = value;
5107
5221
  }
5108
5222
  }
5109
- if (isRecord3(raw.resources)) {
5223
+ if (isRecord4(raw.resources)) {
5110
5224
  for (const [key, value] of Object.entries(raw.resources)) {
5111
5225
  if (typeof value === "string") resources[key] = value;
5112
5226
  }
@@ -5117,7 +5231,7 @@ function parseDependencies(raw) {
5117
5231
  if (!Array.isArray(raw)) return [];
5118
5232
  const dependencies = [];
5119
5233
  for (const entry of raw) {
5120
- if (!isRecord3(entry) || typeof entry.name !== "string") continue;
5234
+ if (!isRecord4(entry) || typeof entry.name !== "string") continue;
5121
5235
  dependencies.push({
5122
5236
  name: entry.name,
5123
5237
  constraint: typeof entry.constraint === "string" ? entry.constraint : "*",
@@ -5127,7 +5241,7 @@ function parseDependencies(raw) {
5127
5241
  return dependencies;
5128
5242
  }
5129
5243
  function parseHarnessScopes(raw) {
5130
- if (!isRecord3(raw)) return {};
5244
+ if (!isRecord4(raw)) return {};
5131
5245
  const scopes = {};
5132
5246
  for (const [key, value] of Object.entries(raw)) {
5133
5247
  const parsed = parseHarnessScope(value);
@@ -5138,7 +5252,7 @@ function parseHarnessScopes(raw) {
5138
5252
  return scopes;
5139
5253
  }
5140
5254
  function parseExtension(raw, apName) {
5141
- if (!isRecord3(raw)) {
5255
+ if (!isRecord4(raw)) {
5142
5256
  return {
5143
5257
  sourceName: apName,
5144
5258
  profile: false,
@@ -5182,7 +5296,7 @@ function parseNativeMarkdownResources(type, dirName, files) {
5182
5296
  const entry = files[relativePath2];
5183
5297
  if (!entry) continue;
5184
5298
  const parsed = matter5(fileText(entry));
5185
- const data = isRecord3(parsed.data) ? { ...parsed.data } : {};
5299
+ const data = isRecord4(parsed.data) ? { ...parsed.data } : {};
5186
5300
  const fallback = nativeBasename(relativePath2, prefix);
5187
5301
  const name = typeof data.name === "string" && data.name.length > 0 ? data.name : fallback;
5188
5302
  const description = typeof data.description === "string" ? data.description : "";
@@ -5234,7 +5348,7 @@ function parseSkillResources(files) {
5234
5348
  const entry = files[relativePath2];
5235
5349
  if (!entry) continue;
5236
5350
  const parsed = matter5(fileText(entry));
5237
- const data = isRecord3(parsed.data) ? parsed.data : {};
5351
+ const data = isRecord4(parsed.data) ? parsed.data : {};
5238
5352
  const name = typeof data.name === "string" && data.name.length > 0 ? data.name : skillName;
5239
5353
  const description = typeof data.description === "string" ? data.description : "";
5240
5354
  const scripts = listSkillAuxNames(files, skillName, "scripts");
@@ -5268,7 +5382,9 @@ function parseMcpResources(files) {
5268
5382
  } catch {
5269
5383
  throw new Error("Invalid mcp.json: expected JSON");
5270
5384
  }
5271
- const servers = parseMcpServersDocument(document);
5385
+ const extrasEntry = files[HT_MCP_EXTRAS_PATH];
5386
+ const extras = extrasEntry ? parseTransportToml(fileText(extrasEntry), "MCP extension") : void 0;
5387
+ const servers = readApMcpServers(document, extras);
5272
5388
  return Object.keys(servers).sort().map((name) => {
5273
5389
  const metadata = servers[name];
5274
5390
  if (!metadata) {
@@ -5294,7 +5410,7 @@ function parseMarkdownComponent(type, layoutPath, files) {
5294
5410
  const basename4 = relativePath2.slice(prefix.length, -".md".length);
5295
5411
  if (!basename4 || basename4.includes("/")) continue;
5296
5412
  const parsed = matter5(fileText(entry));
5297
- const data = isRecord3(parsed.data) ? { ...parsed.data } : {};
5413
+ const data = isRecord4(parsed.data) ? { ...parsed.data } : {};
5298
5414
  const name = typeof data.name === "string" && data.name.length > 0 ? data.name : basename4;
5299
5415
  const description = typeof data.description === "string" ? data.description : "";
5300
5416
  delete data.name;
@@ -5316,7 +5432,7 @@ function parseTomlComponent(type, layout, files) {
5316
5432
  const document = parseTransportToml(fileText(entry), layout.path);
5317
5433
  if (type === "env_var") {
5318
5434
  const vars = document.vars;
5319
- if (!isRecord3(vars)) return [];
5435
+ if (!isRecord4(vars)) return [];
5320
5436
  return Object.keys(vars).sort().map((key) => ({
5321
5437
  type: "env_var",
5322
5438
  name: key,
@@ -5330,7 +5446,7 @@ function parseTomlComponent(type, layout, files) {
5330
5446
  if (!Array.isArray(rows)) return [];
5331
5447
  const resources = [];
5332
5448
  for (const row of rows) {
5333
- if (!isRecord3(row) || typeof row.name !== "string") continue;
5449
+ if (!isRecord4(row) || typeof row.name !== "string") continue;
5334
5450
  const { name, description, content, ...metadata } = row;
5335
5451
  resources.push({
5336
5452
  type,
@@ -5360,7 +5476,7 @@ function parseClaudeConfig(files) {
5360
5476
  if (!entry) return void 0;
5361
5477
  const document = parseTransportToml(fileText(entry), "claude config");
5362
5478
  const { schema: _schema, ...rest } = document;
5363
- if (!isRecord3(rest) || Object.keys(rest).length === 0) {
5479
+ if (!isRecord4(rest) || Object.keys(rest).length === 0) {
5364
5480
  return void 0;
5365
5481
  }
5366
5482
  return rest;
@@ -6680,7 +6796,7 @@ var MARKETPLACE_MANIFEST_RELATIVE_PATHS = [
6680
6796
  ".cursor-plugin/marketplace.json",
6681
6797
  "marketplace.json"
6682
6798
  ];
6683
- function isRecord4(value) {
6799
+ function isRecord5(value) {
6684
6800
  return typeof value === "object" && value !== null && !Array.isArray(value);
6685
6801
  }
6686
6802
  function stripGitSuffix(value) {
@@ -6725,7 +6841,7 @@ function isRelativePluginSourcePath(path) {
6725
6841
  return true;
6726
6842
  }
6727
6843
  function parseMarketplacePluginSource(entry) {
6728
- if (!isRecord4(entry)) {
6844
+ if (!isRecord5(entry)) {
6729
6845
  return null;
6730
6846
  }
6731
6847
  const version = typeof entry.version === "string" && entry.version.trim() ? entry.version.trim() : null;
@@ -6737,7 +6853,7 @@ function parseMarketplacePluginSource(entry) {
6737
6853
  }
6738
6854
  return { version, url: null, gitRef: null, path: raw };
6739
6855
  }
6740
- if (!isRecord4(source)) {
6856
+ if (!isRecord5(source)) {
6741
6857
  return { version, url: null, gitRef: null, path: null };
6742
6858
  }
6743
6859
  const kind = typeof source.source === "string" ? source.source : "";
@@ -6795,14 +6911,14 @@ function readClaudeKnownMarketplace(homeRoot, marketplace) {
6795
6911
  "known_marketplaces.json"
6796
6912
  );
6797
6913
  const known = readJsonFile(knownPath);
6798
- if (!known || !isRecord4(known)) {
6914
+ if (!known || !isRecord5(known)) {
6799
6915
  return null;
6800
6916
  }
6801
6917
  const value = known[marketplace];
6802
- if (!isRecord4(value)) {
6918
+ if (!isRecord5(value)) {
6803
6919
  return null;
6804
6920
  }
6805
- const source = isRecord4(value.source) ? value.source : {};
6921
+ const source = isRecord5(value.source) ? value.source : {};
6806
6922
  const kind = typeof source.source === "string" ? source.source : "";
6807
6923
  const installLocation = typeof value.installLocation === "string" && value.installLocation.trim() ? value.installLocation.trim() : null;
6808
6924
  let url = null;
@@ -6852,7 +6968,7 @@ function marketplaceNotInstalledMessage(marketplace) {
6852
6968
  function readMarketplaceManifestRecord(root) {
6853
6969
  for (const relative7 of MARKETPLACE_MANIFEST_RELATIVE_PATHS) {
6854
6970
  const file = readJsonFile(join16(root, relative7));
6855
- if (file && isRecord4(file)) {
6971
+ if (file && isRecord5(file)) {
6856
6972
  return file;
6857
6973
  }
6858
6974
  }
@@ -6874,7 +6990,7 @@ function marketplaceManifestRepositoryUrl(root) {
6874
6990
  if (typeof repository === "string" && repository.trim()) {
6875
6991
  return githubCloneUrl(repository.trim());
6876
6992
  }
6877
- if (isRecord4(repository) && typeof repository.url === "string" && repository.url.trim()) {
6993
+ if (isRecord5(repository) && typeof repository.url === "string" && repository.url.trim()) {
6878
6994
  return githubCloneUrl(repository.url.trim());
6879
6995
  }
6880
6996
  return null;
@@ -6920,7 +7036,7 @@ function readMarketplacePluginSource(homeRoot, marketplace, pluginName) {
6920
7036
  }
6921
7037
  const file = readMarketplaceFile(root);
6922
7038
  const entry = file?.plugins?.find((plugin) => {
6923
- if (!isRecord4(plugin)) {
7039
+ if (!isRecord5(plugin)) {
6924
7040
  return false;
6925
7041
  }
6926
7042
  return plugin.name === pluginName;
@@ -6938,7 +7054,7 @@ function readHostPluginSourceSnapshot(originRef, harnesstapDir = getHarnesstapDi
6938
7054
  snapshotPath(harnesstapDir)
6939
7055
  );
6940
7056
  const row = raw?.[originRef];
6941
- if (!row || !isRecord4(row) || !isRecord4(row.git_refs)) {
7057
+ if (!row || !isRecord5(row) || !isRecord5(row.git_refs)) {
6942
7058
  return null;
6943
7059
  }
6944
7060
  return row;
@@ -7773,13 +7889,13 @@ function canonicalJson(value) {
7773
7889
  function jsonValuesEqual(left, right) {
7774
7890
  return canonicalJson(left) === canonicalJson(right);
7775
7891
  }
7776
- function isRecord5(value) {
7892
+ function isRecord6(value) {
7777
7893
  return typeof value === "object" && value !== null && Array.isArray(value) === false;
7778
7894
  }
7779
7895
  function parseJsonObject(raw) {
7780
7896
  const errors = [];
7781
7897
  const parsed = parseJsonc(raw, errors, { allowTrailingComma: true });
7782
- if (errors.length > 0 || !isRecord5(parsed)) {
7898
+ if (errors.length > 0 || !isRecord6(parsed)) {
7783
7899
  return null;
7784
7900
  }
7785
7901
  return parsed;
@@ -7805,7 +7921,7 @@ function stringifyNewJson(value, tabSize = 2) {
7805
7921
  function overlayRecords(existing, overlay, mergeObjectKeys) {
7806
7922
  const merged = { ...existing };
7807
7923
  for (const [key, value] of Object.entries(overlay)) {
7808
- if (mergeObjectKeys.has(key) && isRecord5(existing[key]) && isRecord5(value)) {
7924
+ if (mergeObjectKeys.has(key) && isRecord6(existing[key]) && isRecord6(value)) {
7809
7925
  merged[key] = { ...existing[key], ...value };
7810
7926
  continue;
7811
7927
  }
@@ -7822,7 +7938,7 @@ function collectChangedPaths(existing, merged, prefix, mergeObjectKeys, removeMi
7822
7938
  if (jsonValuesEqual(prev, next)) {
7823
7939
  continue;
7824
7940
  }
7825
- if (prefix.length === 0 && mergeObjectKeys.has(key) && isRecord5(prev) && isRecord5(next)) {
7941
+ if (prefix.length === 0 && mergeObjectKeys.has(key) && isRecord6(prev) && isRecord6(next)) {
7826
7942
  diffs.push(...collectChangedPaths(prev, next, path, /* @__PURE__ */ new Set(), removeMissing));
7827
7943
  continue;
7828
7944
  }
@@ -7903,7 +8019,7 @@ function formatTomlScalar(value) {
7903
8019
  if (Array.isArray(value)) {
7904
8020
  return `[${value.map((entry) => formatTomlScalar(entry)).join(", ")}]`;
7905
8021
  }
7906
- if (isRecord5(value)) {
8022
+ if (isRecord6(value)) {
7907
8023
  return formatInlineTomlTable(value);
7908
8024
  }
7909
8025
  return JSON.stringify(String(value));
@@ -7971,7 +8087,7 @@ function replaceInTable(text, tablePath, key, value) {
7971
8087
  if (next !== text) {
7972
8088
  return next;
7973
8089
  }
7974
- if (isRecord5(value)) {
8090
+ if (isRecord6(value)) {
7975
8091
  return appendTomlFragment(text, [key], value);
7976
8092
  }
7977
8093
  return insertRootAssignment(text, key, value);
@@ -8025,11 +8141,11 @@ function upsertTomlObject(text, tablePath, existing, merged, removeMissing) {
8025
8141
  if (jsonValuesEqual(previous, value)) {
8026
8142
  continue;
8027
8143
  }
8028
- if (isRecord5(value) && isRecord5(previous)) {
8144
+ if (isRecord6(value) && isRecord6(previous)) {
8029
8145
  next = upsertTomlObject(next, [...tablePath, key], previous, value, removeMissing);
8030
8146
  continue;
8031
8147
  }
8032
- if (isRecord5(value) && previous === void 0) {
8148
+ if (isRecord6(value) && previous === void 0) {
8033
8149
  next = appendTomlFragment(next, [...tablePath, key], value);
8034
8150
  continue;
8035
8151
  }
@@ -8040,7 +8156,7 @@ function upsertTomlObject(text, tablePath, existing, merged, removeMissing) {
8040
8156
  if (key in merged) {
8041
8157
  continue;
8042
8158
  }
8043
- if (isRecord5(existing[key])) {
8159
+ if (isRecord6(existing[key])) {
8044
8160
  next = removeTomlTable(next, [...tablePath, key]);
8045
8161
  continue;
8046
8162
  }
@@ -8069,7 +8185,7 @@ function overlayTomlPreservingFormat(existingRaw, overlay, mergeDocuments) {
8069
8185
  let existing;
8070
8186
  try {
8071
8187
  const parsed = parseToml2(existingRaw);
8072
- existing = isRecord5(parsed) ? parsed : {};
8188
+ existing = isRecord6(parsed) ? parsed : {};
8073
8189
  } catch {
8074
8190
  return ensureTrailingNewline(stringifyToml(overlay));
8075
8191
  }
@@ -8084,7 +8200,7 @@ function applyTomlObjectUpdatePreservingFormat(existingRaw, next) {
8084
8200
  let existing;
8085
8201
  try {
8086
8202
  const parsed = parseToml2(existingRaw);
8087
- existing = isRecord5(parsed) ? parsed : {};
8203
+ existing = isRecord6(parsed) ? parsed : {};
8088
8204
  } catch {
8089
8205
  return ensureTrailingNewline(stringifyToml(next));
8090
8206
  }
@@ -10800,8 +10916,8 @@ export {
10800
10916
  formatTransportToml,
10801
10917
  isValidApName,
10802
10918
  slugifyApName,
10803
- AP_SCHEMA_URL,
10804
10919
  ManifestValidationError,
10920
+ withDefaultedApSchema,
10805
10921
  validateApManifest,
10806
10922
  HARNESS_SCOPE_ALL,
10807
10923
  harnessScopeWire,
@@ -10809,6 +10925,11 @@ export {
10809
10925
  unionHarnessScopes,
10810
10926
  resourceAppliesToHarness,
10811
10927
  diskCaptureHarnessScope,
10928
+ HT_MCP_EXTRAS_PATH,
10929
+ buildSpecMcpJson,
10930
+ formatSpecMcpJson,
10931
+ formatMcpExtrasToml,
10932
+ isSpecMcpDocument,
10812
10933
  buildApPackageFiles,
10813
10934
  buildApPackageFilesForResource,
10814
10935
  writeApPackageFiles,
@@ -10942,4 +11063,4 @@ export {
10942
11063
  resolvePluginSelector,
10943
11064
  listPluginVersions
10944
11065
  };
10945
- //# sourceMappingURL=chunk-2EIJYDNI.js.map
11066
+ //# sourceMappingURL=chunk-KJIFZLHN.js.map