harnesstap 1.4.0 → 1.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.
Files changed (210) hide show
  1. package/README.md +2 -0
  2. package/dist/apply-FTAIL3X3.js +50 -0
  3. package/dist/{approve-FBGYQGWN.js → approve-R6AWQB3I.js} +10 -13
  4. package/dist/{approve-FBGYQGWN.js.map → approve-R6AWQB3I.js.map} +1 -1
  5. package/dist/{audit-VI4QZ6X2.js → audit-2HNKFPSU.js} +11 -15
  6. package/dist/{audit-VI4QZ6X2.js.map → audit-2HNKFPSU.js.map} +1 -1
  7. package/dist/{auth-4CQCDS2W.js → auth-C54KRLNF.js} +10 -12
  8. package/dist/{auth-4CQCDS2W.js.map → auth-C54KRLNF.js.map} +1 -1
  9. package/dist/bin.js +13 -34
  10. package/dist/bin.js.map +1 -1
  11. package/dist/{chunk-IE7B6Q5K.js → chunk-2XDYQXP2.js} +17 -18
  12. package/dist/chunk-2XDYQXP2.js.map +1 -0
  13. package/dist/{chunk-L6YZE5MY.js → chunk-3277RVZT.js} +5 -7
  14. package/dist/{chunk-L6YZE5MY.js.map → chunk-3277RVZT.js.map} +1 -1
  15. package/dist/{chunk-QA5U36JN.js → chunk-3Q72LZPJ.js} +764 -340
  16. package/dist/chunk-3Q72LZPJ.js.map +1 -0
  17. package/dist/{chunk-OML4HXKT.js → chunk-42E2MPES.js} +16 -22
  18. package/dist/chunk-42E2MPES.js.map +1 -0
  19. package/dist/{chunk-4ZQ2SCGY.js → chunk-5HACBPK2.js} +509 -207
  20. package/dist/chunk-5HACBPK2.js.map +1 -0
  21. package/dist/{chunk-GRASK6M6.js → chunk-6FXJIKEG.js} +5 -5
  22. package/dist/{chunk-73OJQTBW.js → chunk-A3TZT4WT.js} +2 -2
  23. package/dist/{chunk-ZUASVASP.js → chunk-BUA7WFI4.js} +27034 -18024
  24. package/dist/chunk-BUA7WFI4.js.map +1 -0
  25. package/dist/{chunk-U6DXASQP.js → chunk-CBSDMRMY.js} +2 -2
  26. package/dist/{chunk-RDG5DT7S.js → chunk-CR2TYMKC.js} +54 -40
  27. package/dist/chunk-CR2TYMKC.js.map +1 -0
  28. package/dist/{chunk-REHRUNBB.js → chunk-CWXCZBJR.js} +70 -5
  29. package/dist/chunk-CWXCZBJR.js.map +1 -0
  30. package/dist/{chunk-R7ZOYVN3.js → chunk-D7R577XZ.js} +187 -59
  31. package/dist/chunk-D7R577XZ.js.map +1 -0
  32. package/dist/{chunk-P2C7JPLD.js → chunk-EPXAOEBB.js} +6 -6
  33. package/dist/{chunk-D432JAXV.js → chunk-GZU4LVFF.js} +153 -25
  34. package/dist/chunk-GZU4LVFF.js.map +1 -0
  35. package/dist/chunk-HV3ENT2F.js +61 -0
  36. package/dist/chunk-HV3ENT2F.js.map +1 -0
  37. package/dist/{chunk-3P6BWL5F.js → chunk-K4UDZUJ2.js} +2 -2
  38. package/dist/{chunk-ULCD6DJE.js → chunk-L6BJCRBU.js} +14 -39
  39. package/dist/chunk-L6BJCRBU.js.map +1 -0
  40. package/dist/{chunk-M4KLHJ6U.js → chunk-M6FEDSHY.js} +8 -10
  41. package/dist/{chunk-M4KLHJ6U.js.map → chunk-M6FEDSHY.js.map} +1 -1
  42. package/dist/chunk-M7PHQ3UC.js +31491 -0
  43. package/dist/chunk-M7PHQ3UC.js.map +1 -0
  44. package/dist/{chunk-PNGF5EV2.js → chunk-MHLAIGIM.js} +2 -2
  45. package/dist/{chunk-BPWFQKI5.js → chunk-MHMFF6A5.js} +2 -2
  46. package/dist/chunk-MKLJBW5N.js +14 -0
  47. package/dist/{chunk-MR7IOHSX.js → chunk-MQCAPCAF.js} +16 -22
  48. package/dist/{chunk-MR7IOHSX.js.map → chunk-MQCAPCAF.js.map} +1 -1
  49. package/dist/{chunk-N3VGY3T3.js → chunk-MQCH3YZ5.js} +7 -5
  50. package/dist/{chunk-N3VGY3T3.js.map → chunk-MQCH3YZ5.js.map} +1 -1
  51. package/dist/{chunk-WG5A6EAU.js → chunk-OHZNDV4A.js} +821 -28
  52. package/dist/chunk-OHZNDV4A.js.map +1 -0
  53. package/dist/{chunk-WGP4GUYZ.js → chunk-OWE3OSX6.js} +9 -11
  54. package/dist/{chunk-WGP4GUYZ.js.map → chunk-OWE3OSX6.js.map} +1 -1
  55. package/dist/{chunk-RVEXPMM3.js → chunk-PCNHBMBU.js} +3 -5
  56. package/dist/{chunk-RVEXPMM3.js.map → chunk-PCNHBMBU.js.map} +1 -1
  57. package/dist/{chunk-23XSG7LI.js → chunk-QGTDQNVV.js} +4 -4
  58. package/dist/{chunk-UVVZHWD2.js → chunk-R27VZIF6.js} +2 -2
  59. package/dist/{chunk-TQ2NA4Z4.js → chunk-R4NV3Q7G.js} +8 -2
  60. package/dist/chunk-R4NV3Q7G.js.map +1 -0
  61. package/dist/{chunk-EOPFER6N.js → chunk-R6VFJKZB.js} +19 -5
  62. package/dist/chunk-R6VFJKZB.js.map +1 -0
  63. package/dist/{chunk-3FS775NP.js → chunk-RQLVXJH2.js} +85 -4
  64. package/dist/chunk-RQLVXJH2.js.map +1 -0
  65. package/dist/{chunk-JQOKQKQT.js → chunk-S2D5PWAO.js} +2 -2
  66. package/dist/{chunk-43BDGVN3.js → chunk-T4EKNX2Q.js} +56 -9
  67. package/dist/chunk-T4EKNX2Q.js.map +1 -0
  68. package/dist/{chunk-XTVGCVU4.js → chunk-TERYL7JH.js} +36 -37
  69. package/dist/chunk-TERYL7JH.js.map +1 -0
  70. package/dist/{chunk-6LTLYV5D.js → chunk-UC27MQ3T.js} +1064 -265
  71. package/dist/chunk-UC27MQ3T.js.map +1 -0
  72. package/dist/chunk-UEA4NCY2.js +106 -0
  73. package/dist/chunk-UEA4NCY2.js.map +1 -0
  74. package/dist/{chunk-7HP6AAI3.js → chunk-UK2IV2ZQ.js} +2 -2
  75. package/dist/{chunk-PCMON7Y2.js → chunk-UZCAYOIQ.js} +8 -10
  76. package/dist/{chunk-PCMON7Y2.js.map → chunk-UZCAYOIQ.js.map} +1 -1
  77. package/dist/{chunk-N3ZCH64F.js → chunk-V4UNYSZO.js} +86 -32
  78. package/dist/chunk-V4UNYSZO.js.map +1 -0
  79. package/dist/chunk-VAPCU2FX.js +70 -0
  80. package/dist/chunk-VAPCU2FX.js.map +1 -0
  81. package/dist/{chunk-RFQ3N7FB.js → chunk-WGVU3LA5.js} +11 -9
  82. package/dist/chunk-WGVU3LA5.js.map +1 -0
  83. package/dist/{chunk-IMROMZ2K.js → chunk-WQ3F4O7U.js} +19 -14
  84. package/dist/chunk-WQ3F4O7U.js.map +1 -0
  85. package/dist/chunk-XNS4I3W6.js +102 -0
  86. package/dist/chunk-XNS4I3W6.js.map +1 -0
  87. package/dist/{chunk-2A36HWDE.js → chunk-Y4I7ZCAE.js} +129 -136
  88. package/dist/chunk-Y4I7ZCAE.js.map +1 -0
  89. package/dist/{chunk-TPEJFLV7.js → chunk-ZKMSHLXP.js} +4 -6
  90. package/dist/{chunk-TPEJFLV7.js.map → chunk-ZKMSHLXP.js.map} +1 -1
  91. package/dist/{compile-GXADKGH5.js → compile-B2QG6BAQ.js} +33 -37
  92. package/dist/{compile-GXADKGH5.js.map → compile-B2QG6BAQ.js.map} +1 -1
  93. package/dist/{config-JMHNA2U5.js → config-D3F6ICZ2.js} +16 -21
  94. package/dist/{config-JMHNA2U5.js.map → config-D3F6ICZ2.js.map} +1 -1
  95. package/dist/{cursor-local-install-46RWRBDT.js → cursor-local-install-4HDIBX22.js} +8 -12
  96. package/dist/{cursor-local-install-46RWRBDT.js.map → cursor-local-install-4HDIBX22.js.map} +1 -1
  97. package/dist/cursor-local-install-LL367GZY.js +94 -0
  98. package/dist/cursor-local-install-LL367GZY.js.map +1 -0
  99. package/dist/{doctor-N7ZULPOL.js → doctor-QSGETVDE.js} +14 -17
  100. package/dist/doctor-QSGETVDE.js.map +1 -0
  101. package/dist/{environment-OBB3WU5B.js → environment-2JS4RWQA.js} +42 -50
  102. package/dist/environment-2JS4RWQA.js.map +1 -0
  103. package/dist/{github-PBYBGOLH.js → github-JXSTHLY2.js} +9 -10
  104. package/dist/{github-PBYBGOLH.js.map → github-JXSTHLY2.js.map} +1 -1
  105. package/dist/{harness-7KYATIV6.js → harness-GBI3AMLH.js} +25 -31
  106. package/dist/{harness-7KYATIV6.js.map → harness-GBI3AMLH.js.map} +1 -1
  107. package/dist/{help-EE3AJQD4.js → help-EC52ERIE.js} +15 -20
  108. package/dist/{help-EE3AJQD4.js.map → help-EC52ERIE.js.map} +1 -1
  109. package/dist/{help-VXWKLQ6A.js → help-VIRMBOPJ.js} +57 -575
  110. package/dist/help-VIRMBOPJ.js.map +1 -0
  111. package/dist/host-plugin-view-kept-XKHD6NGU.js +139 -0
  112. package/dist/host-plugin-view-kept-XKHD6NGU.js.map +1 -0
  113. package/dist/index.js +12 -16
  114. package/dist/{init-LBTMPDVJ.js → init-OK3K6ILG.js} +33 -41
  115. package/dist/{init-LBTMPDVJ.js.map → init-OK3K6ILG.js.map} +1 -1
  116. package/dist/live-read-cache-ESQQJBNS.js +13 -0
  117. package/dist/live-read-cache-WPUFHVMZ.js +12 -0
  118. package/dist/{lock-WLJRXRVK.js → lock-AA2F4I3K.js} +9 -12
  119. package/dist/{lock-WLJRXRVK.js.map → lock-AA2F4I3K.js.map} +1 -1
  120. package/dist/{marketplace-GXSV6QIY.js → marketplace-QUYCV23F.js} +26 -79
  121. package/dist/marketplace-QUYCV23F.js.map +1 -0
  122. package/dist/{mcp-XPDWWU75.js → mcp-CIHSR4DD.js} +33 -37
  123. package/dist/{mcp-XPDWWU75.js.map → mcp-CIHSR4DD.js.map} +1 -1
  124. package/dist/{migrate-SBUIWN3U.js → migrate-TQPEZYS5.js} +93 -34
  125. package/dist/migrate-TQPEZYS5.js.map +1 -0
  126. package/dist/notifications-TAELTPDW.js +154 -0
  127. package/dist/notifications-TAELTPDW.js.map +1 -0
  128. package/dist/open-D3GWGDSQ.js +20 -0
  129. package/dist/{pack-A73LDVOX.js → pack-VUO4UBWL.js} +10 -14
  130. package/dist/{pack-A73LDVOX.js.map → pack-VUO4UBWL.js.map} +1 -1
  131. package/dist/plugin-L3466DHK.js +47 -0
  132. package/dist/plugin-from-project-U5UGKTJH.js +15 -0
  133. package/dist/{policy-6VY3CMSU.js → policy-Z5TL4N3V.js} +9 -12
  134. package/dist/{policy-6VY3CMSU.js.map → policy-Z5TL4N3V.js.map} +1 -1
  135. package/dist/{profile-YCKPMRRU.js → profile-QFI7SL3S.js} +108 -78
  136. package/dist/profile-QFI7SL3S.js.map +1 -0
  137. package/dist/{project-KHPPBKPN.js → project-3KR3EPYR.js} +486 -60
  138. package/dist/project-3KR3EPYR.js.map +1 -0
  139. package/dist/{resource-IJU3FAN5.js → resource-45BPRQ7V.js} +55 -45
  140. package/dist/resource-45BPRQ7V.js.map +1 -0
  141. package/dist/status-refresh-worker.js +1155 -0
  142. package/dist/status-refresh-worker.js.map +1 -0
  143. package/dist/{version-Z66FWWMQ.js → version-QUJZGTZ5.js} +3 -3
  144. package/dist/version-QUJZGTZ5.js.map +1 -0
  145. package/package.json +16 -11
  146. package/dist/apply-SUNDXRJ3.js +0 -54
  147. package/dist/chunk-2A36HWDE.js.map +0 -1
  148. package/dist/chunk-2H7UOFLK.js +0 -11
  149. package/dist/chunk-3FS775NP.js.map +0 -1
  150. package/dist/chunk-43BDGVN3.js.map +0 -1
  151. package/dist/chunk-4ZQ2SCGY.js.map +0 -1
  152. package/dist/chunk-6LTLYV5D.js.map +0 -1
  153. package/dist/chunk-D432JAXV.js.map +0 -1
  154. package/dist/chunk-DF4Z7LAD.js +0 -3463
  155. package/dist/chunk-DF4Z7LAD.js.map +0 -1
  156. package/dist/chunk-EOPFER6N.js.map +0 -1
  157. package/dist/chunk-G6WKY2W4.js +0 -389
  158. package/dist/chunk-G6WKY2W4.js.map +0 -1
  159. package/dist/chunk-IE7B6Q5K.js.map +0 -1
  160. package/dist/chunk-IMROMZ2K.js.map +0 -1
  161. package/dist/chunk-M2U3J7UX.js +0 -46
  162. package/dist/chunk-M2U3J7UX.js.map +0 -1
  163. package/dist/chunk-N3ZCH64F.js.map +0 -1
  164. package/dist/chunk-NAGAJ5UM.js +0 -145
  165. package/dist/chunk-NAGAJ5UM.js.map +0 -1
  166. package/dist/chunk-OML4HXKT.js.map +0 -1
  167. package/dist/chunk-QA5U36JN.js.map +0 -1
  168. package/dist/chunk-R7ZOYVN3.js.map +0 -1
  169. package/dist/chunk-RDG5DT7S.js.map +0 -1
  170. package/dist/chunk-REHRUNBB.js.map +0 -1
  171. package/dist/chunk-RFQ3N7FB.js.map +0 -1
  172. package/dist/chunk-TQ2NA4Z4.js.map +0 -1
  173. package/dist/chunk-ULCD6DJE.js.map +0 -1
  174. package/dist/chunk-WG5A6EAU.js.map +0 -1
  175. package/dist/chunk-XGTTOO4R.js +0 -84
  176. package/dist/chunk-XGTTOO4R.js.map +0 -1
  177. package/dist/chunk-XTVGCVU4.js.map +0 -1
  178. package/dist/chunk-XUJKZQZA.js +0 -235
  179. package/dist/chunk-XUJKZQZA.js.map +0 -1
  180. package/dist/chunk-ZUASVASP.js.map +0 -1
  181. package/dist/doctor-N7ZULPOL.js.map +0 -1
  182. package/dist/environment-OBB3WU5B.js.map +0 -1
  183. package/dist/help-VXWKLQ6A.js.map +0 -1
  184. package/dist/live-read-cache-TUSP7U3D.js +0 -10
  185. package/dist/marketplace-GXSV6QIY.js.map +0 -1
  186. package/dist/migrate-SBUIWN3U.js.map +0 -1
  187. package/dist/open-HDGLYYVU.js +0 -24
  188. package/dist/plugin-CEO6ZJM5.js +0 -51
  189. package/dist/plugin-from-project-UK7VJVUP.js +0 -18
  190. package/dist/profile-YCKPMRRU.js.map +0 -1
  191. package/dist/project-KHPPBKPN.js.map +0 -1
  192. package/dist/resource-IJU3FAN5.js.map +0 -1
  193. /package/dist/{apply-SUNDXRJ3.js.map → apply-FTAIL3X3.js.map} +0 -0
  194. /package/dist/{chunk-GRASK6M6.js.map → chunk-6FXJIKEG.js.map} +0 -0
  195. /package/dist/{chunk-73OJQTBW.js.map → chunk-A3TZT4WT.js.map} +0 -0
  196. /package/dist/{chunk-U6DXASQP.js.map → chunk-CBSDMRMY.js.map} +0 -0
  197. /package/dist/{chunk-P2C7JPLD.js.map → chunk-EPXAOEBB.js.map} +0 -0
  198. /package/dist/{chunk-3P6BWL5F.js.map → chunk-K4UDZUJ2.js.map} +0 -0
  199. /package/dist/{chunk-PNGF5EV2.js.map → chunk-MHLAIGIM.js.map} +0 -0
  200. /package/dist/{chunk-BPWFQKI5.js.map → chunk-MHMFF6A5.js.map} +0 -0
  201. /package/dist/{chunk-2H7UOFLK.js.map → chunk-MKLJBW5N.js.map} +0 -0
  202. /package/dist/{chunk-23XSG7LI.js.map → chunk-QGTDQNVV.js.map} +0 -0
  203. /package/dist/{chunk-UVVZHWD2.js.map → chunk-R27VZIF6.js.map} +0 -0
  204. /package/dist/{chunk-JQOKQKQT.js.map → chunk-S2D5PWAO.js.map} +0 -0
  205. /package/dist/{chunk-7HP6AAI3.js.map → chunk-UK2IV2ZQ.js.map} +0 -0
  206. /package/dist/{live-read-cache-TUSP7U3D.js.map → live-read-cache-ESQQJBNS.js.map} +0 -0
  207. /package/dist/{open-HDGLYYVU.js.map → live-read-cache-WPUFHVMZ.js.map} +0 -0
  208. /package/dist/{plugin-CEO6ZJM5.js.map → open-D3GWGDSQ.js.map} +0 -0
  209. /package/dist/{plugin-from-project-UK7VJVUP.js.map → plugin-L3466DHK.js.map} +0 -0
  210. /package/dist/{version-Z66FWWMQ.js.map → plugin-from-project-U5UGKTJH.js.map} +0 -0
@@ -2,28 +2,24 @@ import "./chunk-I6XFZLTJ.js";
2
2
  import {
3
3
  parseOutputFormat,
4
4
  printJson
5
- } from "./chunk-TQ2NA4Z4.js";
5
+ } from "./chunk-R4NV3Q7G.js";
6
6
  import {
7
7
  fail,
8
8
  formatCommand,
9
9
  isVerboseMode
10
- } from "./chunk-RFQ3N7FB.js";
10
+ } from "./chunk-WGVU3LA5.js";
11
11
  import {
12
12
  PackError,
13
13
  packProject
14
- } from "./chunk-ZUASVASP.js";
15
- import "./chunk-6LTLYV5D.js";
16
- import "./chunk-N3ZCH64F.js";
17
- import "./chunk-REHRUNBB.js";
14
+ } from "./chunk-BUA7WFI4.js";
15
+ import "./chunk-UC27MQ3T.js";
16
+ import "./chunk-V4UNYSZO.js";
17
+ import "./chunk-CWXCZBJR.js";
18
+ import "./chunk-A3TZT4WT.js";
18
19
  import {
20
+ formatCount,
19
21
  ui
20
- } from "./chunk-2A36HWDE.js";
21
- import "./chunk-DF4Z7LAD.js";
22
- import "./chunk-G6WKY2W4.js";
23
- import "./chunk-73OJQTBW.js";
24
- import {
25
- formatCount
26
- } from "./chunk-WG5A6EAU.js";
22
+ } from "./chunk-OHZNDV4A.js";
27
23
 
28
24
  // src/cli/commands/pack.ts
29
25
  import { resolve } from "path";
@@ -90,4 +86,4 @@ export {
90
86
  handlePackCommand,
91
87
  registerPackCommand
92
88
  };
93
- //# sourceMappingURL=pack-A73LDVOX.js.map
89
+ //# sourceMappingURL=pack-VUO4UBWL.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/cli/commands/pack.ts"],"sourcesContent":["import type { Command } from \"commander\";\nimport { resolve } from \"node:path\";\nimport { packProject, PackError } from \"../../services/apm-pack.js\";\nimport { parseOutputFormat, printJson } from \"../../utils/output-format.js\";\nimport { ui } from \"../../ui/index.js\";\nimport { formatCount } from \"../formatting.js\";\nimport {\n fail,\n formatCommand,\n isVerboseMode,\n} from \"../shared.js\";\n\nexport interface PackCommandOpts {\n project?: string;\n output?: string;\n archive?: boolean;\n dryRun?: boolean;\n verbose?: boolean;\n format?: string;\n}\n\nexport function handlePackCommand(opts: PackCommandOpts): void {\n const format = parseOutputFormat(opts.format);\n const verbose = Boolean(opts.verbose) || isVerboseMode();\n\n try {\n const result = packProject({\n projectRoot: resolve(opts.project ?? \".\"),\n outputDir: opts.output,\n archive: opts.archive,\n dryRun: opts.dryRun,\n verbose,\n });\n\n if (format === \"json\") {\n printJson({\n name: result.name,\n version: result.version,\n output: result.outputPath,\n archive: result.archive,\n dry_run: result.dryRun,\n file_count: result.fileCount,\n files: result.files,\n warnings: result.warnings,\n });\n return;\n }\n\n for (const warning of result.warnings) {\n ui.warn(warning);\n }\n if (verbose) {\n for (const file of result.files) {\n const remap = file.remappedFrom ? ` ← ${file.remappedFrom}` : \"\";\n console.log(` ${file.path}${remap}`);\n }\n }\n\n const dest = result.dryRun ? `${result.outputPath} (dry run)` : result.outputPath;\n ui.success(`Packed ${formatCount(result.fileCount, \"file\")} -> ${dest}`);\n console.log(\n ui.theme.muted(\n \"Plugin bundle ready: contains plugin.json plus plugin-native directories (agents/, skills/, commands/, hooks/) and an embedded apm.lock.yaml for install-time integrity verification.\",\n ),\n );\n ui.info(`Share with: ${formatCommand([\"apply\", result.outputPath])}`);\n } catch (error) {\n process.exitCode = 1;\n if (error instanceof PackError) {\n fail(error.message, {\n hints: [formatCommand(\"config init\"), formatCommand(\"apply\")],\n });\n return;\n }\n fail(error instanceof Error ? error.message : String(error));\n }\n}\n\nexport function registerPackCommand(root: Command): void {\n root\n .command(\"pack\")\n .description(\n \"Pack an apm.yml project into an Agent Plugins 1.0 bundle (plugin.json + primitives + apm.lock.yaml)\",\n )\n .option(\"--project <path>\", \"Project directory\", \".\")\n .option(\"-o, --output <dir>\", \"Bundle output directory\", \"build\")\n .option(\"--archive\", \"Write a .zip archive instead of a directory\")\n .option(\"--dry-run\", \"Print what would be packed without writing\")\n .option(\"--verbose\", \"List every packed file and remapping\")\n .option(\"--format <mode>\", \"Output format: human or json\", \"human\")\n .action((opts: PackCommandOpts) => {\n handlePackCommand(opts);\n });\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,SAAS,eAAe;AAoBjB,SAAS,kBAAkB,MAA6B;AAC7D,QAAM,SAAS,kBAAkB,KAAK,MAAM;AAC5C,QAAM,UAAU,QAAQ,KAAK,OAAO,KAAK,cAAc;AAEvD,MAAI;AACF,UAAM,SAAS,YAAY;AA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,MAAM,EACd;AAAA,IACC;AAAA,EACF,EACC,OAAO,oBAAoB,qBAAqB,GAAG,EACnD,OAAO,sBAAsB,2BAA2B,OAAO,EAC/D,OAAO,aAAa,6CAA6C,EACjE,OAAO,aAAa,4CAA4C,EAChE,OAAO,aAAa,sCAAsC,EAC1D,OAAO,mBAAmB,gCAAgC,OAAO,EACjE,OAAO,CAAC,SAA0B;AACjC,sBAAkB,IAAI;AAAA,EACxB,CAAC;AACL;","names":[]}
1
+ {"version":3,"sources":["../src/cli/commands/pack.ts"],"sourcesContent":["import type { Command } from \"commander\";\nimport { resolve } from \"node:path\";\nimport { packProject, PackError } from \"../../services/apm-pack.js\";\nimport { parseOutputFormat, printJson } from \"../../utils/output-format.js\";\nimport { ui } from \"../../ui/index.js\";\nimport { formatCount } from \"../formatting.js\";\nimport {\n fail,\n formatCommand,\n isVerboseMode,\n} from \"../shared.js\";\n\nexport interface PackCommandOpts {\n project?: string;\n output?: string;\n archive?: boolean;\n dryRun?: boolean;\n verbose?: boolean;\n format?: string;\n}\n\nexport function handlePackCommand(opts: PackCommandOpts): void {\n const format = parseOutputFormat(opts.format);\n const verbose = Boolean(opts.verbose) || isVerboseMode();\n\n try {\n const result = packProject({\n projectRoot: resolve(opts.project ?? \".\"),\n outputDir: opts.output,\n archive: opts.archive,\n dryRun: opts.dryRun,\n verbose,\n });\n\n if (format === \"json\") {\n printJson({\n name: result.name,\n version: result.version,\n output: result.outputPath,\n archive: result.archive,\n dry_run: result.dryRun,\n file_count: result.fileCount,\n files: result.files,\n warnings: result.warnings,\n });\n return;\n }\n\n for (const warning of result.warnings) {\n ui.warn(warning);\n }\n if (verbose) {\n for (const file of result.files) {\n const remap = file.remappedFrom ? ` ← ${file.remappedFrom}` : \"\";\n console.log(` ${file.path}${remap}`);\n }\n }\n\n const dest = result.dryRun ? `${result.outputPath} (dry run)` : result.outputPath;\n ui.success(`Packed ${formatCount(result.fileCount, \"file\")} -> ${dest}`);\n console.log(\n ui.theme.muted(\n \"Plugin bundle ready: contains plugin.json plus plugin-native directories (agents/, skills/, commands/, hooks/) and an embedded apm.lock.yaml for install-time integrity verification.\",\n ),\n );\n ui.info(`Share with: ${formatCommand([\"apply\", result.outputPath])}`);\n } catch (error) {\n process.exitCode = 1;\n if (error instanceof PackError) {\n fail(error.message, {\n hints: [formatCommand(\"config init\"), formatCommand(\"apply\")],\n });\n return;\n }\n fail(error instanceof Error ? error.message : String(error));\n }\n}\n\nexport function registerPackCommand(root: Command): void {\n root\n .command(\"pack\")\n .description(\n \"Pack an apm.yml project into an Agent Plugins 1.0 bundle (plugin.json + primitives + apm.lock.yaml)\",\n )\n .option(\"--project <path>\", \"Project directory\", \".\")\n .option(\"-o, --output <dir>\", \"Bundle output directory\", \"build\")\n .option(\"--archive\", \"Write a .zip archive instead of a directory\")\n .option(\"--dry-run\", \"Print what would be packed without writing\")\n .option(\"--verbose\", \"List every packed file and remapping\")\n .option(\"--format <mode>\", \"Output format: human or json\", \"human\")\n .action((opts: PackCommandOpts) => {\n handlePackCommand(opts);\n });\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AACA,SAAS,eAAe;AAoBjB,SAAS,kBAAkB,MAA6B;AAC7D,QAAM,SAAS,kBAAkB,KAAK,MAAM;AAC5C,QAAM,UAAU,QAAQ,KAAK,OAAO,KAAK,cAAc;AAEvD,MAAI;AACF,UAAM,SAAS,YAAY;AAAA,MACzB,aAAa,QAAQ,KAAK,WAAW,GAAG;AAAA,MACxC,WAAW,KAAK;AAAA,MAChB,SAAS,KAAK;AAAA,MACd,QAAQ,KAAK;AAAA,MACb;AAAA,IACF,CAAC;AAED,QAAI,WAAW,QAAQ;AACrB,gBAAU;AAAA,QACR,MAAM,OAAO;AAAA,QACb,SAAS,OAAO;AAAA,QAChB,QAAQ,OAAO;AAAA,QACf,SAAS,OAAO;AAAA,QAChB,SAAS,OAAO;AAAA,QAChB,YAAY,OAAO;AAAA,QACnB,OAAO,OAAO;AAAA,QACd,UAAU,OAAO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ias,
4
+ registerPluginCommands
5
+ } from "./chunk-3Q72LZPJ.js";
6
+ import "./chunk-5HACBPK2.js";
7
+ import "./chunk-D7R577XZ.js";
8
+ import "./chunk-GZU4LVFF.js";
9
+ import "./chunk-MQCAPCAF.js";
10
+ import "./chunk-R6VFJKZB.js";
11
+ import "./chunk-42E2MPES.js";
12
+ import "./chunk-CHQGE2HF.js";
13
+ import "./chunk-HV3ENT2F.js";
14
+ import "./chunk-UK2IV2ZQ.js";
15
+ import "./chunk-L6BJCRBU.js";
16
+ import "./chunk-MQCH3YZ5.js";
17
+ import "./chunk-6FXJIKEG.js";
18
+ import "./chunk-VZQG2JDV.js";
19
+ import "./chunk-MHLAIGIM.js";
20
+ import "./chunk-EPXAOEBB.js";
21
+ import "./chunk-R27VZIF6.js";
22
+ import "./chunk-K4UDZUJ2.js";
23
+ import "./chunk-KRI4R7EM.js";
24
+ import "./chunk-37E5M4JX.js";
25
+ import "./chunk-S2D5PWAO.js";
26
+ import "./chunk-3FIWOI3H.js";
27
+ import "./chunk-CR2TYMKC.js";
28
+ import "./chunk-RQLVXJH2.js";
29
+ import "./chunk-T4EKNX2Q.js";
30
+ import "./chunk-XNS4I3W6.js";
31
+ import "./chunk-I6XFZLTJ.js";
32
+ import "./chunk-MHMFF6A5.js";
33
+ import "./chunk-QGTDQNVV.js";
34
+ import "./chunk-R4NV3Q7G.js";
35
+ import "./chunk-WGVU3LA5.js";
36
+ import "./chunk-BUA7WFI4.js";
37
+ import "./chunk-UC27MQ3T.js";
38
+ import "./chunk-V4UNYSZO.js";
39
+ import "./chunk-CWXCZBJR.js";
40
+ import "./chunk-A3TZT4WT.js";
41
+ import "./chunk-OHZNDV4A.js";
42
+ export {
43
+ handleProjectApplyCommand,
44
+ registerDeprecatedLayerAlias,
45
+ registerPluginCommands
46
+ };
47
+ //# sourceMappingURL=plugin-L3466DHK.js.map
@@ -0,0 +1,15 @@
1
+ import {
2
+ createPluginFromProject,
3
+ previewPluginFromProject
4
+ } from "./chunk-MHMFF6A5.js";
5
+ import "./chunk-BUA7WFI4.js";
6
+ import "./chunk-UC27MQ3T.js";
7
+ import "./chunk-V4UNYSZO.js";
8
+ import "./chunk-CWXCZBJR.js";
9
+ import "./chunk-A3TZT4WT.js";
10
+ import "./chunk-OHZNDV4A.js";
11
+ export {
12
+ createPluginFromProject,
13
+ previewPluginFromProject
14
+ };
15
+ //# sourceMappingURL=plugin-from-project-U5UGKTJH.js.map
@@ -5,24 +5,21 @@ import {
5
5
  exactGrantMatch,
6
6
  execStatusFromDecisions,
7
7
  installedTrustReports
8
- } from "./chunk-23XSG7LI.js";
8
+ } from "./chunk-QGTDQNVV.js";
9
9
  import {
10
10
  parseOutputFormat,
11
11
  printJson
12
- } from "./chunk-TQ2NA4Z4.js";
12
+ } from "./chunk-R4NV3Q7G.js";
13
13
  import {
14
14
  readLockfile
15
- } from "./chunk-ZUASVASP.js";
16
- import "./chunk-6LTLYV5D.js";
17
- import "./chunk-N3ZCH64F.js";
18
- import "./chunk-REHRUNBB.js";
15
+ } from "./chunk-BUA7WFI4.js";
16
+ import "./chunk-UC27MQ3T.js";
17
+ import "./chunk-V4UNYSZO.js";
18
+ import "./chunk-CWXCZBJR.js";
19
+ import "./chunk-A3TZT4WT.js";
19
20
  import {
20
21
  ui
21
- } from "./chunk-2A36HWDE.js";
22
- import "./chunk-DF4Z7LAD.js";
23
- import "./chunk-G6WKY2W4.js";
24
- import "./chunk-73OJQTBW.js";
25
- import "./chunk-WG5A6EAU.js";
22
+ } from "./chunk-OHZNDV4A.js";
26
23
 
27
24
  // src/cli/commands/policy.ts
28
25
  import { resolve } from "path";
@@ -101,4 +98,4 @@ export {
101
98
  handlePolicyExplainCommand,
102
99
  registerPolicyCommands
103
100
  };
104
- //# sourceMappingURL=policy-6VY3CMSU.js.map
101
+ //# sourceMappingURL=policy-Z5TL4N3V.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/cli/commands/policy.ts"],"sourcesContent":["import type { Command } from \"commander\";\nimport { resolve } from \"node:path\";\nimport {\n buildExecutableTrustContext,\n evaluateExecutableType,\n exactGrantMatch,\n EXEC_TYPES,\n execStatusFromDecisions,\n installedTrustReports,\n type PackageTrustReport,\n} from \"../../services/executable-trust.js\";\nimport { readLockfile } from \"../../services/lockfile.js\";\nimport { parseOutputFormat, printJson } from \"../../utils/output-format.js\";\nimport { ui } from \"../../ui/index.js\";\n\nexport interface PolicyExplainOpts {\n project?: string;\n format?: string;\n}\n\nfunction shadowedLine(decision: PackageTrustReport[\"decisions\"][number]): string {\n if (decision.shadowed.length === 0) {\n return \"none\";\n }\n return decision.shadowed\n .map((entry) => `${entry.layer} (${entry.outcome})`)\n .join(\", \");\n}\n\nfunction printExplain(report: PackageTrustReport, optedIn: boolean): void {\n if (!optedIn) {\n ui.info(`${report.ref} gate off`);\n return;\n }\n ui.info(`${report.ref} ${report.execStatus}`);\n const types = report.gatedTypes.length > 0 ? report.gatedTypes : EXEC_TYPES;\n for (const type of types) {\n const decision = report.decisions.find((entry) => entry.type === type);\n if (!decision) continue;\n ui.info(\n ` ${type} ${decision.outcome} layer ${decision.layer} shadowed ${shadowedLine(decision)}`,\n );\n }\n}\n\nfunction reportForRef(\n packageRef: string,\n installed: PackageTrustReport[],\n context: ReturnType<typeof buildExecutableTrustContext>,\n): PackageTrustReport {\n const existing = installed.find((entry) =>\n exactGrantMatch(packageRef, [entry.ref, entry.name, ...entry.identities]),\n );\n if (existing) {\n return existing;\n }\n const identities = [packageRef];\n const decisions = EXEC_TYPES.map((type) => evaluateExecutableType(context, identities, type));\n return {\n ref: packageRef,\n name: packageRef,\n version: \"\",\n identities,\n gatedTypes: [...EXEC_TYPES],\n decisions,\n execStatus: execStatusFromDecisions([...EXEC_TYPES], decisions),\n };\n}\n\nexport function handlePolicyExplainCommand(\n packageRef: string,\n opts: PolicyExplainOpts,\n): void {\n const format = parseOutputFormat(opts.format);\n const projectRoot = resolve(opts.project ?? \".\");\n const context = buildExecutableTrustContext({ projectRoot });\n const lock = readLockfile(projectRoot);\n const installed = installedTrustReports(context, { ...(lock ? { lock } : {}) });\n const report = reportForRef(packageRef, installed, context);\n\n if (format === \"json\") {\n printJson({\n ref: report.ref,\n name: report.name,\n version: report.version,\n exec_status: report.execStatus,\n opted_in: context.optedIn,\n deciding_layer: report.decisions[0]?.layer,\n decisions: report.decisions,\n warnings: context.warnings,\n });\n return;\n }\n for (const warning of context.warnings) {\n ui.warn(warning);\n }\n printExplain(report, context.optedIn);\n}\n\nexport function registerPolicyCommands(root: Command): void {\n const policy = root\n .command(\"policy\")\n .description(\"Inspect executable-trust and apm-policy.yml decisions\");\n\n policy\n .command(\"explain\")\n .description(\"Print the effective executable-trust decision for a package\")\n .argument(\"<PACKAGE_REF>\", \"Package to explain (owner/repo)\")\n .option(\"--project <path>\", \"Project directory\", \".\")\n .option(\"--format <mode>\", \"Output format: human or json\", \"human\")\n .action((ref: string, explainOpts: PolicyExplainOpts) => {\n handlePolicyExplainCommand(ref, explainOpts);\n });\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,SAAS,eAAe;AAmBxB,SAAS,aAAa,UAA2D;AAC/E,MAAI,SAAS,SAAS,WAAW,GAAG;AAClC,WAAO;AAAA,EACT;AACA,SAAO,SAAS,SACb,IAAI,CAAC,UAAU,GAAG,MAAM,KAAK,KAAK,MAAM,OAAO,GAAG,EAClD,KAAK,IAAI;AACd;AAEA,SAAS,aAAa,QAA4B,SAAwB;AACxE,MAAI,CAAC,SAAS;AACZ,OAAG,KAAK,GAAG,OAAO,GAAG,YAAY;AACjC;AAAA,EACF;AACA,KAAG,KAAK,GAAG,OAAO,GAAG,KAAK,OAAO,UAAU,EAAE;AAC7C,QAAM,QAAQ,OAAO,WAAW,SAAS,IAAI,OAAO,aAAa;AACjE,aAAW,QAAQ,OAAO;AACxB,UAAM,WAAW,OAAO,UAAU,KAAK,CAAC,UAAU,MAAM,SAAS,IAAI;AACrE,QAAI,CAAC,SAAU;AACf,OAAG;AAAA,MAC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,UAAU;AACtC,OAAG,KAAK,OAAO;AAAA,EACjB;AACA,eAAa,QAAQ,QAAQ,OAAO;AACtC;AAEO,SAAS,uBAAuB,MAAqB;AAC1D,QAAM,SAAS,KACZ,QAAQ,QAAQ,EAChB,YAAY,uDAAuD;AAEtE,SACG,QAAQ,SAAS,EACjB,YAAY,6DAA6D,EACzE,SAAS,iBAAiB,iCAAiC,EAC3D,OAAO,oBAAoB,qBAAqB,GAAG,EACnD,OAAO,mBAAmB,gCAAgC,OAAO,EACjE,OAAO,CAAC,KAAa,gBAAmC;AACvD,+BAA2B,KAAK,WAAW;AAAA,EAC7C,CAAC;AACL;","names":[]}
1
+ {"version":3,"sources":["../src/cli/commands/policy.ts"],"sourcesContent":["import type { Command } from \"commander\";\nimport { resolve } from \"node:path\";\nimport {\n buildExecutableTrustContext,\n evaluateExecutableType,\n exactGrantMatch,\n EXEC_TYPES,\n execStatusFromDecisions,\n installedTrustReports,\n type PackageTrustReport,\n} from \"../../services/executable-trust.js\";\nimport { readLockfile } from \"../../services/lockfile.js\";\nimport { parseOutputFormat, printJson } from \"../../utils/output-format.js\";\nimport { ui } from \"../../ui/index.js\";\n\nexport interface PolicyExplainOpts {\n project?: string;\n format?: string;\n}\n\nfunction shadowedLine(decision: PackageTrustReport[\"decisions\"][number]): string {\n if (decision.shadowed.length === 0) {\n return \"none\";\n }\n return decision.shadowed\n .map((entry) => `${entry.layer} (${entry.outcome})`)\n .join(\", \");\n}\n\nfunction printExplain(report: PackageTrustReport, optedIn: boolean): void {\n if (!optedIn) {\n ui.info(`${report.ref} gate off`);\n return;\n }\n ui.info(`${report.ref} ${report.execStatus}`);\n const types = report.gatedTypes.length > 0 ? report.gatedTypes : EXEC_TYPES;\n for (const type of types) {\n const decision = report.decisions.find((entry) => entry.type === type);\n if (!decision) continue;\n ui.info(\n ` ${type} ${decision.outcome} layer ${decision.layer} shadowed ${shadowedLine(decision)}`,\n );\n }\n}\n\nfunction reportForRef(\n packageRef: string,\n installed: PackageTrustReport[],\n context: ReturnType<typeof buildExecutableTrustContext>,\n): PackageTrustReport {\n const existing = installed.find((entry) =>\n exactGrantMatch(packageRef, [entry.ref, entry.name, ...entry.identities]),\n );\n if (existing) {\n return existing;\n }\n const identities = [packageRef];\n const decisions = EXEC_TYPES.map((type) => evaluateExecutableType(context, identities, type));\n return {\n ref: packageRef,\n name: packageRef,\n version: \"\",\n identities,\n gatedTypes: [...EXEC_TYPES],\n decisions,\n execStatus: execStatusFromDecisions([...EXEC_TYPES], decisions),\n };\n}\n\nexport function handlePolicyExplainCommand(\n packageRef: string,\n opts: PolicyExplainOpts,\n): void {\n const format = parseOutputFormat(opts.format);\n const projectRoot = resolve(opts.project ?? \".\");\n const context = buildExecutableTrustContext({ projectRoot });\n const lock = readLockfile(projectRoot);\n const installed = installedTrustReports(context, { ...(lock ? { lock } : {}) });\n const report = reportForRef(packageRef, installed, context);\n\n if (format === \"json\") {\n printJson({\n ref: report.ref,\n name: report.name,\n version: report.version,\n exec_status: report.execStatus,\n opted_in: context.optedIn,\n deciding_layer: report.decisions[0]?.layer,\n decisions: report.decisions,\n warnings: context.warnings,\n });\n return;\n }\n for (const warning of context.warnings) {\n ui.warn(warning);\n }\n printExplain(report, context.optedIn);\n}\n\nexport function registerPolicyCommands(root: Command): void {\n const policy = root\n .command(\"policy\")\n .description(\"Inspect executable-trust and apm-policy.yml decisions\");\n\n policy\n .command(\"explain\")\n .description(\"Print the effective executable-trust decision for a package\")\n .argument(\"<PACKAGE_REF>\", \"Package to explain (owner/repo)\")\n .option(\"--project <path>\", \"Project directory\", \".\")\n .option(\"--format <mode>\", \"Output format: human or json\", \"human\")\n .action((ref: string, explainOpts: PolicyExplainOpts) => {\n handlePolicyExplainCommand(ref, explainOpts);\n });\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AACA,SAAS,eAAe;AAmBxB,SAAS,aAAa,UAA2D;AAC/E,MAAI,SAAS,SAAS,WAAW,GAAG;AAClC,WAAO;AAAA,EACT;A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AAC3D,QAAM,OAAO,aAAa,WAAW;AACrC,QAAM,YAAY,sBAAsB,SAAS,EAAE,GAAI,OAAO,EAAE,KAAK,IAAI,CAAC,EAAG,CAAC;AAC9E,QAAM,SAAS,aAAa,YAAY,WAAW,OAAO;AAE1D,MAAI,WAAW,QAAQ;AACrB,cAAU;AAAA,MACR,KAAK,OAAO;AAAA,MACZ,MAAM,OAAO;AAAA,MACb,SAAS,OAAO;AAAA,MAChB,aAAa,OAAO;AAAA,MACpB,UAAU,QAAQ;AAAA,MAClB,gBAAgB,OAAO,UAAU,CAAC,GAAG;AAAA,MACrC,WAAW,OAAO;AAAA,MAClB,UAAU,QAAQ;AAAA,IACpB,CAAC;AACD;AAAA,EACF;AACA,aAAW,WAAW,QAAQ,UAAU;AACtC,OAAG,KAAK,OAAO;AAAA,EACjB;AACA,eAAa,QAAQ,QAAQ,OAAO;AACtC;AAEO,SAAS,uBAAuB,MAAqB;AAC1D,QAAM,SAAS,KACZ,QAAQ,QAAQ,EAChB,YAAY,uDAAuD;AAEtE,SACG,QAAQ,SAAS,EACjB,YAAY,6DAA6D,EACzE,SAAS,iBAAiB,iCAAiC,EAC3D,OAAO,oBAAoB,qBAAqB,GAAG,EACnD,OAAO,mBAAmB,gCAAgC,OAAO,EACjE,OAAO,CAAC,KAAa,gBAAmC;AACvD,+BAA2B,KAAK,WAAW;AAAA,EAC7C,CAAC;AACL;","names":[]}
@@ -1,12 +1,13 @@
1
1
  import {
2
2
  mapProfileUseDelegationOptions,
3
3
  renderProjectUseHuman
4
- } from "./chunk-M4KLHJ6U.js";
4
+ } from "./chunk-M6FEDSHY.js";
5
5
  import {
6
+ harnessDisplayName,
6
7
  registerProfileParityCommands
7
- } from "./chunk-XTVGCVU4.js";
8
- import "./chunk-PCMON7Y2.js";
9
- import "./chunk-WGP4GUYZ.js";
8
+ } from "./chunk-TERYL7JH.js";
9
+ import "./chunk-UZCAYOIQ.js";
10
+ import "./chunk-OWE3OSX6.js";
10
11
  import {
11
12
  countMaterialPluginResources,
12
13
  createPluginFromSource,
@@ -14,13 +15,15 @@ import {
14
15
  handlePluginListCommand,
15
16
  handlePluginPublishCommand,
16
17
  handlePluginShowCommand,
18
+ registerProfileDuplicateCommands,
17
19
  runPluginCreateFromSourceWizard
18
- } from "./chunk-4ZQ2SCGY.js";
20
+ } from "./chunk-5HACBPK2.js";
19
21
  import {
20
22
  applyProfileStashCommand,
21
23
  buildProjectProfileChoices,
22
24
  detectGlobalProfileStatus,
23
25
  executeProjectUse,
26
+ globalProfileStatusGaps,
24
27
  listProfileStashEntries,
25
28
  maybeSyncActiveProfileBeforeSwitch,
26
29
  popProfileStashCommand,
@@ -32,54 +35,45 @@ import {
32
35
  resolveExpectedPluginName,
33
36
  resolveUserPath,
34
37
  stashProfileCommand
35
- } from "./chunk-R7ZOYVN3.js";
38
+ } from "./chunk-D7R577XZ.js";
36
39
  import {
37
40
  resolvePluginMutationTarget
38
- } from "./chunk-MR7IOHSX.js";
39
- import "./chunk-EOPFER6N.js";
41
+ } from "./chunk-MQCAPCAF.js";
42
+ import "./chunk-R6VFJKZB.js";
40
43
  import {
41
44
  resolveSkillPackageCheckout
42
- } from "./chunk-OML4HXKT.js";
43
- import "./chunk-XUJKZQZA.js";
44
- import "./chunk-7HP6AAI3.js";
45
- import "./chunk-N3VGY3T3.js";
46
- import "./chunk-GRASK6M6.js";
45
+ } from "./chunk-42E2MPES.js";
46
+ import "./chunk-UK2IV2ZQ.js";
47
+ import "./chunk-MQCH3YZ5.js";
48
+ import "./chunk-6FXJIKEG.js";
47
49
  import "./chunk-VZQG2JDV.js";
48
- import "./chunk-P2C7JPLD.js";
49
- import "./chunk-UVVZHWD2.js";
50
+ import "./chunk-EPXAOEBB.js";
51
+ import "./chunk-R27VZIF6.js";
50
52
  import "./chunk-KRI4R7EM.js";
51
- import "./chunk-XGTTOO4R.js";
52
53
  import {
53
54
  parseCommaSeparatedList
54
55
  } from "./chunk-37E5M4JX.js";
55
- import "./chunk-JQOKQKQT.js";
56
+ import "./chunk-S2D5PWAO.js";
56
57
  import "./chunk-3FIWOI3H.js";
57
58
  import {
58
59
  renderCliError
59
- } from "./chunk-RDG5DT7S.js";
60
- import {
61
- isPromptCancellationError,
62
- promptForChoice,
63
- promptForConfirmation,
64
- promptForSearchableChoice,
65
- shouldUseWizard
66
- } from "./chunk-NAGAJ5UM.js";
60
+ } from "./chunk-CR2TYMKC.js";
67
61
  import {
68
62
  initializeSchema
69
- } from "./chunk-3FS775NP.js";
63
+ } from "./chunk-RQLVXJH2.js";
70
64
  import {
71
65
  configureCommandGroup
72
- } from "./chunk-43BDGVN3.js";
73
- import {
74
- previewPluginFromProject
75
- } from "./chunk-BPWFQKI5.js";
66
+ } from "./chunk-T4EKNX2Q.js";
76
67
  import {
77
68
  formatPluginLabel
78
69
  } from "./chunk-I6XFZLTJ.js";
70
+ import {
71
+ previewPluginFromProject
72
+ } from "./chunk-MHMFF6A5.js";
79
73
  import {
80
74
  parseOutputFormat,
81
75
  printJson
82
- } from "./chunk-TQ2NA4Z4.js";
76
+ } from "./chunk-R4NV3Q7G.js";
83
77
  import {
84
78
  ON_CONFLICT_APPLY_HELP,
85
79
  ON_CONFLICT_PLUGIN_IMPORT_HELP,
@@ -90,7 +84,7 @@ import {
90
84
  formatHintCommand,
91
85
  parseOnConflict,
92
86
  toPluginImportOnConflict
93
- } from "./chunk-RFQ3N7FB.js";
87
+ } from "./chunk-WGVU3LA5.js";
94
88
  import {
95
89
  PROFILE_PLUGIN_TAG,
96
90
  PinnedPluginInstallConsentError,
@@ -98,13 +92,16 @@ import {
98
92
  addPluginAttachment,
99
93
  addResourceToPlugin,
100
94
  assertSupportedHarnessTargets,
95
+ clearLiveReadCaches,
101
96
  createPlugin,
102
97
  createProfileCommand,
103
98
  deletePlugin,
104
99
  deleteProfileCommand,
105
100
  diskCaptureHarnessScope,
101
+ driftChangeIsKept,
106
102
  findProjectConfig,
107
103
  formatPluginRef,
104
+ getActiveProfileName,
108
105
  getPlugin,
109
106
  getPluginByName,
110
107
  getProfileEntry,
@@ -118,29 +115,27 @@ import {
118
115
  listResources,
119
116
  persistMergedProjectScan,
120
117
  persistScanResults,
121
- resolvePluginSelector,
118
+ resolveProfileUseTarget,
122
119
  scanHomeDefaults,
123
120
  showProfileCommand,
124
121
  tagProfileCommand,
125
122
  useProfileCommand,
126
123
  useProfileCommandUnlocked,
127
124
  withProfileApplyLock
128
- } from "./chunk-ZUASVASP.js";
129
- import "./chunk-6LTLYV5D.js";
130
- import "./chunk-N3ZCH64F.js";
131
- import "./chunk-REHRUNBB.js";
132
- import {
133
- missingRequiredArg,
134
- ui
135
- } from "./chunk-2A36HWDE.js";
125
+ } from "./chunk-BUA7WFI4.js";
136
126
  import {
137
- clearLiveReadCaches,
138
- getActiveProfileName,
139
- resolveHomeRoot
140
- } from "./chunk-DF4Z7LAD.js";
141
- import "./chunk-G6WKY2W4.js";
142
- import "./chunk-73OJQTBW.js";
127
+ isPromptCancellationError,
128
+ promptForChoice,
129
+ promptForConfirmation,
130
+ promptForSearchableChoice,
131
+ resolveHomeRoot,
132
+ shouldUseWizard
133
+ } from "./chunk-UC27MQ3T.js";
134
+ import "./chunk-V4UNYSZO.js";
135
+ import "./chunk-CWXCZBJR.js";
136
+ import "./chunk-A3TZT4WT.js";
143
137
  import {
138
+ CLI_COPY,
144
139
  CLI_ERRORS,
145
140
  CLI_HINTS,
146
141
  SWITCH_CHANGES_FLAG_HELP,
@@ -148,8 +143,10 @@ import {
148
143
  formatCount,
149
144
  formatHtArgs,
150
145
  getDb,
151
- getHarnesstapDir
152
- } from "./chunk-WG5A6EAU.js";
146
+ getHarnesstapDir,
147
+ missingRequiredArg,
148
+ ui
149
+ } from "./chunk-OHZNDV4A.js";
153
150
 
154
151
  // src/cli/commands/profile.ts
155
152
  import { Option } from "commander";
@@ -1185,7 +1182,7 @@ async function handleProfileCreateCommand(name, opts) {
1185
1182
  const result = createProfileCommand({
1186
1183
  name,
1187
1184
  description: opts.description,
1188
- version
1185
+ ...opts.version ? { version: opts.version } : {}
1189
1186
  });
1190
1187
  if (format === "json" && !opts.use) {
1191
1188
  printJson(result);
@@ -1280,7 +1277,7 @@ function registerProfileCreateSourceOptions(command) {
1280
1277
  ).option("--from-home", "Import from global home harness files").option("--from-project <path>", "Import from a project path").option("--preview", "Print create preview without writing").option("--no-interactive", "Don't open the compose picker");
1281
1278
  }
1282
1279
  function registerProfileCreateCommand(profileCmd) {
1283
- const createCmd = profileCmd.command("create").argument("<name>", "Profile plugin name").option("-d, --description <text>", "Profile description").option("--version <semver>", "Plugin version when creating from a source", "1.0.0").option(
1280
+ const createCmd = profileCmd.command("create").argument("<name>", "Profile plugin name").option("-d, --description <text>", "Profile description").option("--version <semver>", "Plugin version for a new profile (default 1.0.0)").option(
1284
1281
  "--from <source>",
1285
1282
  "Skill package source (owner/repo, git URL, or local path)"
1286
1283
  ).option("--skill <names>", "Comma-separated skills to attach when using --from").option("--all", "Attach all discovered skills when using --from").option(
@@ -1310,7 +1307,7 @@ function registerProfileCreateCommand(profileCmd) {
1310
1307
 
1311
1308
  // src/cli/commands/profile.ts
1312
1309
  async function handleProfilePullCommand(selector, opts) {
1313
- const installed = await handlePluginInstallCommand(selector, opts);
1310
+ const installed = await handlePluginInstallCommand(selector, { ...opts, profile: true });
1314
1311
  if (!installed || process.exitCode) {
1315
1312
  return;
1316
1313
  }
@@ -1330,23 +1327,6 @@ function warnProfilePublishValidation(plugin) {
1330
1327
  `Profile ${ui.theme.accent(plugin.name)} has no plugin references and no material resources.`
1331
1328
  );
1332
1329
  }
1333
- const unresolvedLocalRefs = [];
1334
- for (const ref of refs) {
1335
- const local = resolvePluginSelector(
1336
- ref.version_constraint ? `${ref.dependency_name}@${ref.version_constraint}` : ref.dependency_name
1337
- );
1338
- if (!local) {
1339
- continue;
1340
- }
1341
- if (!local.org_slug || !local.catalog_slug) {
1342
- unresolvedLocalRefs.push(ref.dependency_name);
1343
- }
1344
- }
1345
- if (unresolvedLocalRefs.length > 0) {
1346
- ui.warn(
1347
- `Profile ${ui.theme.accent(plugin.name)} references unpublished local plugins: ${unresolvedLocalRefs.join(", ")}`
1348
- );
1349
- }
1350
1330
  }
1351
1331
  async function handleProfilePublishCommand(pluginName, opts) {
1352
1332
  const db = getDb();
@@ -1426,6 +1406,7 @@ function registerProfileCommands(root) {
1426
1406
  depth,
1427
1407
  projectPath: opts.project
1428
1408
  });
1409
+ const gaps = globalProfileStatusGaps(status);
1429
1410
  if (format === "json") {
1430
1411
  printJson(status);
1431
1412
  } else if (!status.active_profile) {
@@ -1439,8 +1420,9 @@ function registerProfileCommands(root) {
1439
1420
  ui.hint(
1440
1421
  `Run ${formatHintCommand(["profile", "use", status.active_profile])} to materialize home harness files.`
1441
1422
  );
1442
- } else if (!status.has_drift) {
1423
+ } else if (gaps.inSync) {
1443
1424
  ui.success(`Global harness files are in sync with profile ${ui.theme.accent(status.active_profile)}.`);
1425
+ printKeptStatusChanges(status.changes);
1444
1426
  } else {
1445
1427
  ui.warn(
1446
1428
  `Global harness files are out of sync with profile ${ui.theme.accent(status.active_profile)}.`
@@ -1453,9 +1435,15 @@ function registerProfileCommands(root) {
1453
1435
  `${formatCount(status.changes.length, "file")} ${status.changes.length === 1 ? "differs" : "differ"} on disk.`
1454
1436
  );
1455
1437
  for (const change of status.changes) {
1456
- console.log(` ${change.path}`);
1438
+ console.log(driftChangeIsKept(change) ? ` ${change.path} ${keptStatusReason(change)}` : ` ${change.path}`);
1457
1439
  }
1458
1440
  }
1441
+ for (const gap of gaps.missing) {
1442
+ const harnessName = harnessDisplayName(gap.harness);
1443
+ ui.dim(
1444
+ gap.kind === "plugin" ? `Plugin ${gap.id} is not installed in ${harnessName}.` : `MCP server ${gap.id} is missing or different in ${harnessName}.`
1445
+ );
1446
+ }
1459
1447
  ui.hint(
1460
1448
  `Run ${formatHintCommand(["profile", "use", status.active_profile])} to refresh global harness files.`
1461
1449
  );
@@ -1469,7 +1457,7 @@ function registerProfileCommands(root) {
1469
1457
  "Cursor built-ins live under ~/.cursor/skills-cursor/ (read-only inventory). User skills belong in ~/.cursor/skills/."
1470
1458
  );
1471
1459
  }
1472
- if (opts.check && status.has_drift) {
1460
+ if (opts.check && !gaps.inSync) {
1473
1461
  process.exitCode = 1;
1474
1462
  }
1475
1463
  } catch (err) {
@@ -1477,6 +1465,22 @@ function registerProfileCommands(root) {
1477
1465
  fail(err instanceof Error ? err.message : String(err));
1478
1466
  }
1479
1467
  });
1468
+ function printKeptStatusChanges(changes) {
1469
+ const kept = changes.filter(driftChangeIsKept);
1470
+ if (kept.length === 0) return;
1471
+ ui.dim(
1472
+ `${formatCount(kept.length, "file")} ${kept.length === 1 ? "differs" : "differ"} from the profile and apply keeps ${kept.length === 1 ? "it" : "them"} as ${kept.length === 1 ? "it is" : "they are"}:`
1473
+ );
1474
+ for (const change of kept) {
1475
+ console.log(` ${change.path} ${keptStatusReason(change)}`);
1476
+ }
1477
+ }
1478
+ function keptStatusReason(change) {
1479
+ if (change.changed_by === "claude-code") {
1480
+ return change.detail ? `Claude Code changed ${change.detail}` : CLI_COPY.keptClaudeChanged;
1481
+ }
1482
+ return change.removal_group === "owned_modified" ? "you changed it" : "not made by HarnessTap";
1483
+ }
1480
1484
  profileCmd.command("use").argument("[name]", "Profile plugin name or selector").option("--profile <name>", "Profile key from apm.yml").option("--project <path>", "Project directory for apm.yml discovery", ".").option("--dry-run", "Show what would be written or removed").option(
1481
1485
  "--harness <slugs>",
1482
1486
  "Comma-separated harness slugs (defaults to global harness preference)"
@@ -1486,7 +1490,7 @@ function registerProfileCommands(root) {
1486
1490
  ).option(
1487
1491
  "--force-remove",
1488
1492
  "Also remove user-modified managed files and unmanaged files in the planned removal set"
1489
- ).option("--account <name>", "Cloud account name for dependency pulls").option("--base-url <url>", "Cloud base URL for dependency pulls").option("--no-pull", "Do not auto-pull missing published plugin dependencies").option("--force", "Apply even when the profile is already active and in sync").option("--no-interactive", "Disable interactive prompts").option("--interactive", "Enable interactive prompts").option("-y, --yes", "Install pinned marketplace plugins without a prompt").option("--format <mode>", "Output format: human or json", "human").option(
1493
+ ).option("--account <name>", "Cloud account name for dependency pulls").option("--base-url <url>", "Cloud base URL for dependency pulls").option("--no-pull", "Do not pull the profile or its missing published plugin dependencies from the catalog").option("--force", "Apply even when the profile is already active and in sync").option("--no-interactive", "Disable interactive prompts").option("--interactive", "Enable interactive prompts").option("-y, --yes", "Install pinned marketplace plugins without a prompt").option("--format <mode>", "Output format: human or json", "human").option(
1490
1494
  "--changes <action>",
1491
1495
  SWITCH_CHANGES_FLAG_HELP
1492
1496
  ).description("Switch the active profile and apply globally to harness home paths").action(async (name, opts) => {
@@ -1532,9 +1536,21 @@ function registerProfileCommands(root) {
1532
1536
  noInteractive: opts.noInteractive ?? format === "json"
1533
1537
  });
1534
1538
  try {
1539
+ const target = await resolveProfileUseTarget(name, {
1540
+ pull: opts.pull,
1541
+ dryRun: opts.dryRun,
1542
+ account: opts.account,
1543
+ baseUrl: opts.baseUrl,
1544
+ interactive: opts.interactive,
1545
+ noInteractive: opts.noInteractive,
1546
+ format
1547
+ });
1548
+ if (target.pulled && format !== "json") {
1549
+ ui.info(`Pulled profile ${ui.theme.accent(target.pulled.plugin_name)} from ${target.pulled.source}`);
1550
+ }
1535
1551
  if (!opts.dryRun) {
1536
1552
  const sync = await maybeSyncActiveProfileBeforeSwitch({
1537
- targetProfileName: name,
1553
+ targetProfileName: target.name,
1538
1554
  harness: opts.harness,
1539
1555
  format,
1540
1556
  changes: opts.changes,
@@ -1545,8 +1561,9 @@ function registerProfileCommands(root) {
1545
1561
  return;
1546
1562
  }
1547
1563
  }
1548
- const payload = await useProfileCommand(name, {
1564
+ const payload = await useProfileCommand(target.selector, {
1549
1565
  dryRun: opts.dryRun,
1566
+ planPluginFolders: opts.dryRun,
1550
1567
  harness: opts.harness,
1551
1568
  pull: opts.pull,
1552
1569
  account: opts.account,
@@ -1561,7 +1578,7 @@ function registerProfileCommands(root) {
1561
1578
  process.exitCode = 1;
1562
1579
  }
1563
1580
  if (format === "json") {
1564
- printJson(payload);
1581
+ printJson(target.pulled ? { ...payload, pulled_profile: target.pulled } : payload);
1565
1582
  return;
1566
1583
  }
1567
1584
  if (payload.cancelled) {
@@ -1771,9 +1788,21 @@ function registerProfileCommands(root) {
1771
1788
  noInteractive: opts.noInteractive ?? format === "json"
1772
1789
  });
1773
1790
  try {
1791
+ const target = await resolveProfileUseTarget(name, {
1792
+ pull: opts.pull,
1793
+ dryRun: opts.dryRun,
1794
+ account: opts.account,
1795
+ baseUrl: opts.baseUrl,
1796
+ interactive: opts.interactive,
1797
+ noInteractive: opts.noInteractive,
1798
+ format
1799
+ });
1800
+ if (target.pulled && format !== "json") {
1801
+ ui.info(`Pulled profile ${ui.theme.accent(target.pulled.plugin_name)} from ${target.pulled.source}`);
1802
+ }
1774
1803
  if (!opts.dryRun) {
1775
1804
  const sync = await maybeSyncActiveProfileBeforeSwitch({
1776
- targetProfileName: name,
1805
+ targetProfileName: target.name,
1777
1806
  harness: opts.harness,
1778
1807
  format,
1779
1808
  changes: opts.changes,
@@ -1827,6 +1856,7 @@ function registerProfileCommands(root) {
1827
1856
  }
1828
1857
  });
1829
1858
  registerProfileCreateCommand(profileCmd);
1859
+ registerProfileDuplicateCommands(profileCmd);
1830
1860
  profileCmd.command("delete").argument("<name>", "Profile plugin name or selector").option("--plugin", "Also delete the underlying plugin without prompting").option("-y, --yes", "Skip the interactive plugin delete prompt").option("--format <mode>", "Output format: human or json", "human").description("Demote a profile plugin and optionally delete the underlying plugin").action(async (name, opts) => {
1831
1861
  const db = getDb();
1832
1862
  initializeSchema(db);
@@ -1877,4 +1907,4 @@ function registerProfileCommands(root) {
1877
1907
  export {
1878
1908
  registerProfileCommands
1879
1909
  };
1880
- //# sourceMappingURL=profile-YCKPMRRU.js.map
1910
+ //# sourceMappingURL=profile-QFI7SL3S.js.map