harnesstap 1.4.0 → 1.6.1

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 (211) hide show
  1. package/README.md +3 -1
  2. package/dist/apply-ZGEAY6YZ.js +50 -0
  3. package/dist/{approve-FBGYQGWN.js → approve-VPVMU2MM.js} +10 -13
  4. package/dist/{approve-FBGYQGWN.js.map → approve-VPVMU2MM.js.map} +1 -1
  5. package/dist/{audit-VI4QZ6X2.js → audit-AO7AGET3.js} +11 -15
  6. package/dist/{audit-VI4QZ6X2.js.map → audit-AO7AGET3.js.map} +1 -1
  7. package/dist/{auth-4CQCDS2W.js → auth-7YRIJNXU.js} +10 -12
  8. package/dist/{auth-4CQCDS2W.js.map → auth-7YRIJNXU.js.map} +1 -1
  9. package/dist/bin.js +13 -34
  10. package/dist/bin.js.map +1 -1
  11. package/dist/{chunk-OML4HXKT.js → chunk-262KZULH.js} +16 -22
  12. package/dist/chunk-262KZULH.js.map +1 -0
  13. package/dist/{chunk-ZUASVASP.js → chunk-26QGX47N.js} +26097 -16881
  14. package/dist/chunk-26QGX47N.js.map +1 -0
  15. package/dist/{chunk-3P6BWL5F.js → chunk-27IPOVKQ.js} +2 -2
  16. package/dist/{chunk-M4KLHJ6U.js → chunk-2BESDRYP.js} +8 -10
  17. package/dist/{chunk-M4KLHJ6U.js.map → chunk-2BESDRYP.js.map} +1 -1
  18. package/dist/{chunk-PCMON7Y2.js → chunk-2BWIEB2G.js} +8 -10
  19. package/dist/{chunk-PCMON7Y2.js.map → chunk-2BWIEB2G.js.map} +1 -1
  20. package/dist/{chunk-XTVGCVU4.js → chunk-2NMLWSUH.js} +41 -42
  21. package/dist/chunk-2NMLWSUH.js.map +1 -0
  22. package/dist/{chunk-TQ2NA4Z4.js → chunk-4E3G4H5B.js} +8 -2
  23. package/dist/chunk-4E3G4H5B.js.map +1 -0
  24. package/dist/chunk-4QCGTUTM.js +61 -0
  25. package/dist/chunk-4QCGTUTM.js.map +1 -0
  26. package/dist/{chunk-TPEJFLV7.js → chunk-6RKJZW2N.js} +4 -6
  27. package/dist/{chunk-TPEJFLV7.js.map → chunk-6RKJZW2N.js.map} +1 -1
  28. package/dist/{chunk-JQOKQKQT.js → chunk-7IBFH736.js} +2 -2
  29. package/dist/{chunk-P2C7JPLD.js → chunk-CKJIS2FM.js} +6 -6
  30. package/dist/{chunk-R7ZOYVN3.js → chunk-CUOEQQFI.js} +187 -59
  31. package/dist/chunk-CUOEQQFI.js.map +1 -0
  32. package/dist/{chunk-REHRUNBB.js → chunk-CWXCZBJR.js} +70 -5
  33. package/dist/chunk-CWXCZBJR.js.map +1 -0
  34. package/dist/{chunk-4ZQ2SCGY.js → chunk-FLYQEB6D.js} +509 -207
  35. package/dist/chunk-FLYQEB6D.js.map +1 -0
  36. package/dist/{chunk-U6DXASQP.js → chunk-HC7IZY75.js} +2 -2
  37. package/dist/{chunk-UVVZHWD2.js → chunk-I4DKV63E.js} +2 -2
  38. package/dist/{chunk-PNGF5EV2.js → chunk-JEC5PWNH.js} +2 -2
  39. package/dist/{chunk-MR7IOHSX.js → chunk-KFIRABC7.js} +16 -22
  40. package/dist/{chunk-MR7IOHSX.js.map → chunk-KFIRABC7.js.map} +1 -1
  41. package/dist/{chunk-6LTLYV5D.js → chunk-LGWFLVZQ.js} +1064 -265
  42. package/dist/chunk-LGWFLVZQ.js.map +1 -0
  43. package/dist/{chunk-RDG5DT7S.js → chunk-LX6PMOOC.js} +54 -40
  44. package/dist/chunk-LX6PMOOC.js.map +1 -0
  45. package/dist/{chunk-WGP4GUYZ.js → chunk-MILGCNBK.js} +9 -11
  46. package/dist/{chunk-WGP4GUYZ.js.map → chunk-MILGCNBK.js.map} +1 -1
  47. package/dist/chunk-MKLJBW5N.js +14 -0
  48. package/dist/{chunk-N3ZCH64F.js → chunk-MSKTWYHG.js} +86 -32
  49. package/dist/chunk-MSKTWYHG.js.map +1 -0
  50. package/dist/{chunk-WG5A6EAU.js → chunk-MTCCUYBZ.js} +821 -28
  51. package/dist/chunk-MTCCUYBZ.js.map +1 -0
  52. package/dist/{chunk-BPWFQKI5.js → chunk-NIFKCS7J.js} +2 -2
  53. package/dist/{chunk-43BDGVN3.js → chunk-NWOYPK2O.js} +56 -9
  54. package/dist/chunk-NWOYPK2O.js.map +1 -0
  55. package/dist/{chunk-3FS775NP.js → chunk-NXILQDJG.js} +85 -4
  56. package/dist/chunk-NXILQDJG.js.map +1 -0
  57. package/dist/chunk-QF73VLAW.js +31673 -0
  58. package/dist/chunk-QF73VLAW.js.map +1 -0
  59. package/dist/{chunk-RFQ3N7FB.js → chunk-QHCGA6LC.js} +11 -19
  60. package/dist/chunk-QHCGA6LC.js.map +1 -0
  61. package/dist/{chunk-L6YZE5MY.js → chunk-QPJZKWML.js} +5 -7
  62. package/dist/{chunk-L6YZE5MY.js.map → chunk-QPJZKWML.js.map} +1 -1
  63. package/dist/{chunk-ULCD6DJE.js → chunk-RM7VP6ID.js} +24 -61
  64. package/dist/chunk-RM7VP6ID.js.map +1 -0
  65. package/dist/{chunk-7HP6AAI3.js → chunk-SMLO5YPI.js} +2 -2
  66. package/dist/{chunk-73OJQTBW.js → chunk-T2JBSRGG.js} +2 -2
  67. package/dist/{chunk-IE7B6Q5K.js → chunk-U5Y6WKKT.js} +17 -18
  68. package/dist/chunk-U5Y6WKKT.js.map +1 -0
  69. package/dist/chunk-UEA4NCY2.js +106 -0
  70. package/dist/chunk-UEA4NCY2.js.map +1 -0
  71. package/dist/chunk-VAPCU2FX.js +70 -0
  72. package/dist/chunk-VAPCU2FX.js.map +1 -0
  73. package/dist/{chunk-RVEXPMM3.js → chunk-WEJVFNRO.js} +3 -5
  74. package/dist/{chunk-RVEXPMM3.js.map → chunk-WEJVFNRO.js.map} +1 -1
  75. package/dist/{chunk-IMROMZ2K.js → chunk-WWFVMCTR.js} +19 -14
  76. package/dist/chunk-WWFVMCTR.js.map +1 -0
  77. package/dist/chunk-XPONNOBR.js +102 -0
  78. package/dist/chunk-XPONNOBR.js.map +1 -0
  79. package/dist/{chunk-N3VGY3T3.js → chunk-Y3HJ2F2W.js} +7 -5
  80. package/dist/{chunk-N3VGY3T3.js.map → chunk-Y3HJ2F2W.js.map} +1 -1
  81. package/dist/{chunk-2A36HWDE.js → chunk-Y4I7ZCAE.js} +129 -136
  82. package/dist/chunk-Y4I7ZCAE.js.map +1 -0
  83. package/dist/{chunk-GRASK6M6.js → chunk-ZREU2UHM.js} +5 -5
  84. package/dist/{chunk-QA5U36JN.js → chunk-ZT7ANP3H.js} +774 -364
  85. package/dist/chunk-ZT7ANP3H.js.map +1 -0
  86. package/dist/{chunk-EOPFER6N.js → chunk-ZUXFPAVX.js} +19 -5
  87. package/dist/chunk-ZUXFPAVX.js.map +1 -0
  88. package/dist/{chunk-D432JAXV.js → chunk-ZWB6YXVQ.js} +153 -25
  89. package/dist/chunk-ZWB6YXVQ.js.map +1 -0
  90. package/dist/{chunk-23XSG7LI.js → chunk-ZZQDJGWX.js} +4 -4
  91. package/dist/{compile-GXADKGH5.js → compile-IMJHVXQO.js} +33 -37
  92. package/dist/{compile-GXADKGH5.js.map → compile-IMJHVXQO.js.map} +1 -1
  93. package/dist/{config-JMHNA2U5.js → config-FVVN3NWL.js} +16 -21
  94. package/dist/{config-JMHNA2U5.js.map → config-FVVN3NWL.js.map} +1 -1
  95. package/dist/cursor-local-install-JS5KSOES.js +94 -0
  96. package/dist/{cursor-local-install-46RWRBDT.js.map → cursor-local-install-JS5KSOES.js.map} +1 -1
  97. package/dist/{cursor-local-install-46RWRBDT.js → cursor-local-install-QU5R2FV5.js} +8 -12
  98. package/dist/cursor-local-install-QU5R2FV5.js.map +1 -0
  99. package/dist/{doctor-N7ZULPOL.js → doctor-A7VUJSCP.js} +14 -17
  100. package/dist/doctor-A7VUJSCP.js.map +1 -0
  101. package/dist/{environment-OBB3WU5B.js → environment-6INIUBNC.js} +42 -50
  102. package/dist/environment-6INIUBNC.js.map +1 -0
  103. package/dist/{github-PBYBGOLH.js → github-TFJT3P53.js} +9 -10
  104. package/dist/{github-PBYBGOLH.js.map → github-TFJT3P53.js.map} +1 -1
  105. package/dist/{harness-7KYATIV6.js → harness-WQNC5HPZ.js} +46 -84
  106. package/dist/harness-WQNC5HPZ.js.map +1 -0
  107. package/dist/{help-EE3AJQD4.js → help-NMS3EXJB.js} +15 -20
  108. package/dist/{help-EE3AJQD4.js.map → help-NMS3EXJB.js.map} +1 -1
  109. package/dist/{help-VXWKLQ6A.js → help-VW4RIICD.js} +57 -575
  110. package/dist/help-VW4RIICD.js.map +1 -0
  111. package/dist/host-plugin-view-kept-HYCHDB4D.js +139 -0
  112. package/dist/host-plugin-view-kept-HYCHDB4D.js.map +1 -0
  113. package/dist/index.js +12 -16
  114. package/dist/{init-LBTMPDVJ.js → init-RXYL5ZUE.js} +33 -41
  115. package/dist/{init-LBTMPDVJ.js.map → init-RXYL5ZUE.js.map} +1 -1
  116. package/dist/live-read-cache-BHU6L7MA.js +13 -0
  117. package/dist/live-read-cache-NQU7M2C7.js +12 -0
  118. package/dist/{lock-WLJRXRVK.js → lock-3H3Z65DS.js} +9 -12
  119. package/dist/{lock-WLJRXRVK.js.map → lock-3H3Z65DS.js.map} +1 -1
  120. package/dist/{marketplace-GXSV6QIY.js → marketplace-KW35PJCY.js} +26 -79
  121. package/dist/marketplace-KW35PJCY.js.map +1 -0
  122. package/dist/{mcp-XPDWWU75.js → mcp-2HUGVDJ5.js} +33 -37
  123. package/dist/{mcp-XPDWWU75.js.map → mcp-2HUGVDJ5.js.map} +1 -1
  124. package/dist/{migrate-SBUIWN3U.js → migrate-6VAPYNXI.js} +93 -34
  125. package/dist/migrate-6VAPYNXI.js.map +1 -0
  126. package/dist/notifications-Y7KQCN6K.js +154 -0
  127. package/dist/notifications-Y7KQCN6K.js.map +1 -0
  128. package/dist/open-FADABB2S.js +20 -0
  129. package/dist/{pack-A73LDVOX.js → pack-NTECD3BZ.js} +10 -14
  130. package/dist/{pack-A73LDVOX.js.map → pack-NTECD3BZ.js.map} +1 -1
  131. package/dist/plugin-T2YFCYIO.js +47 -0
  132. package/dist/plugin-from-project-FGX5AHW6.js +15 -0
  133. package/dist/{policy-6VY3CMSU.js → policy-3FOWB4GR.js} +9 -12
  134. package/dist/{policy-6VY3CMSU.js.map → policy-3FOWB4GR.js.map} +1 -1
  135. package/dist/{profile-YCKPMRRU.js → profile-HM3ROXXB.js} +108 -78
  136. package/dist/profile-HM3ROXXB.js.map +1 -0
  137. package/dist/{project-KHPPBKPN.js → project-3DTXKMI6.js} +512 -119
  138. package/dist/project-3DTXKMI6.js.map +1 -0
  139. package/dist/{resource-IJU3FAN5.js → resource-TZDZAVZ6.js} +55 -45
  140. package/dist/resource-TZDZAVZ6.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-AMZJHJIB.js} +3 -3
  144. package/dist/version-AMZJHJIB.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/harness-7KYATIV6.js.map +0 -1
  184. package/dist/help-VXWKLQ6A.js.map +0 -1
  185. package/dist/live-read-cache-TUSP7U3D.js +0 -10
  186. package/dist/marketplace-GXSV6QIY.js.map +0 -1
  187. package/dist/migrate-SBUIWN3U.js.map +0 -1
  188. package/dist/open-HDGLYYVU.js +0 -24
  189. package/dist/plugin-CEO6ZJM5.js +0 -51
  190. package/dist/plugin-from-project-UK7VJVUP.js +0 -18
  191. package/dist/profile-YCKPMRRU.js.map +0 -1
  192. package/dist/project-KHPPBKPN.js.map +0 -1
  193. package/dist/resource-IJU3FAN5.js.map +0 -1
  194. /package/dist/{apply-SUNDXRJ3.js.map → apply-ZGEAY6YZ.js.map} +0 -0
  195. /package/dist/{chunk-3P6BWL5F.js.map → chunk-27IPOVKQ.js.map} +0 -0
  196. /package/dist/{chunk-JQOKQKQT.js.map → chunk-7IBFH736.js.map} +0 -0
  197. /package/dist/{chunk-P2C7JPLD.js.map → chunk-CKJIS2FM.js.map} +0 -0
  198. /package/dist/{chunk-U6DXASQP.js.map → chunk-HC7IZY75.js.map} +0 -0
  199. /package/dist/{chunk-UVVZHWD2.js.map → chunk-I4DKV63E.js.map} +0 -0
  200. /package/dist/{chunk-PNGF5EV2.js.map → chunk-JEC5PWNH.js.map} +0 -0
  201. /package/dist/{chunk-2H7UOFLK.js.map → chunk-MKLJBW5N.js.map} +0 -0
  202. /package/dist/{chunk-BPWFQKI5.js.map → chunk-NIFKCS7J.js.map} +0 -0
  203. /package/dist/{chunk-7HP6AAI3.js.map → chunk-SMLO5YPI.js.map} +0 -0
  204. /package/dist/{chunk-73OJQTBW.js.map → chunk-T2JBSRGG.js.map} +0 -0
  205. /package/dist/{chunk-GRASK6M6.js.map → chunk-ZREU2UHM.js.map} +0 -0
  206. /package/dist/{chunk-23XSG7LI.js.map → chunk-ZZQDJGWX.js.map} +0 -0
  207. /package/dist/{live-read-cache-TUSP7U3D.js.map → live-read-cache-BHU6L7MA.js.map} +0 -0
  208. /package/dist/{open-HDGLYYVU.js.map → live-read-cache-NQU7M2C7.js.map} +0 -0
  209. /package/dist/{plugin-CEO6ZJM5.js.map → open-FADABB2S.js.map} +0 -0
  210. /package/dist/{plugin-from-project-UK7VJVUP.js.map → plugin-T2YFCYIO.js.map} +0 -0
  211. /package/dist/{version-Z66FWWMQ.js.map → plugin-from-project-FGX5AHW6.js.map} +0 -0
@@ -1,93 +1,102 @@
1
1
  import {
2
2
  isTransparentCrossHarnessGap,
3
+ liveSkillCopiesForMissingPath,
3
4
  resourceScopesForPlugins,
4
5
  withAffectedResources
5
- } from "./chunk-EOPFER6N.js";
6
+ } from "./chunk-ZUXFPAVX.js";
6
7
  import {
7
8
  formatEnvironmentToml,
8
9
  importEnvironmentToml
9
- } from "./chunk-7HP6AAI3.js";
10
+ } from "./chunk-SMLO5YPI.js";
10
11
  import {
11
12
  MISSING_PROJECT_CONFIG_MESSAGE
12
13
  } from "./chunk-VZQG2JDV.js";
13
- import {
14
- promptForChoice,
15
- promptForConfirmation,
16
- promptForSearchableChoice,
17
- shouldUseBrowsePicker,
18
- shouldUseWizard
19
- } from "./chunk-NAGAJ5UM.js";
20
14
  import {
21
15
  ON_CONFLICT_VALUE_HELP,
22
16
  parseOnConflict
23
- } from "./chunk-RFQ3N7FB.js";
17
+ } from "./chunk-QHCGA6LC.js";
24
18
  import {
19
+ CLAUDE_KNOWN_MARKETPLACES_PATH,
20
+ HARNESSTAP_CLAUDE_MARKETPLACES_ROOT,
25
21
  addResourceToPlugin,
26
22
  applyProfilePlugin,
23
+ binaryExpectedFileMatchesDisk,
27
24
  buildContentsFromResources,
25
+ buildHarnessLiveStatusMap,
28
26
  buildHostManagedStatus,
29
27
  buildProfileContents,
30
28
  captureUntrackedResourcesForStash,
29
+ classifyGlobalDriftChanges,
30
+ claudeChangedMarketplaces,
31
+ clearActiveProfileName,
31
32
  clearGlobalProfileApply,
33
+ collectOwnedGlobalProfileFiles,
32
34
  collectProfilePluginIds,
33
35
  commitManagedPathFromLive,
36
+ computeGlobalProfilePanelStatus,
37
+ countMissingHarnessRows,
34
38
  createPlugin,
39
+ declaredMcpFromExpectedFiles,
35
40
  detectNotStagedProfileResources,
41
+ diffHostPluginView,
42
+ driftChangeIsKept,
43
+ emittedHostPluginTree,
36
44
  fileContentsEquivalentForDrift,
45
+ filesOnlyMarketplacePinRefs,
37
46
  findProjectConfig,
38
47
  flattenLiveRestoreFiles,
48
+ getActiveProfileName,
39
49
  getGlobalActiveEnvironmentName,
50
+ getLatestGlobalApplySnapshotForProfile,
40
51
  getProfileEntry,
52
+ harnessTapClaudeMarketplaceManifestPath,
41
53
  hashOnDiskFile,
54
+ hostPluginPackageDir,
42
55
  installPluginFromCatalog,
56
+ isClaudePluginRegistryPath,
43
57
  isEmptyBuiltinProfile,
44
58
  isNativeAgentPluginCachePath,
45
59
  isProfilePlugin,
46
60
  listMaterializationsForRootPath,
61
+ listMissingHarnessRows,
47
62
  mergePluginsForApply,
48
63
  normalizeResourceInput,
49
64
  profileSkillNameMap,
50
65
  readDiskTextOnce,
66
+ readUpstreamCheckSummary,
51
67
  removeUntrackedStashFiles,
52
68
  resolvePluginSelector,
53
69
  resolveProfileEnvironment,
70
+ resolveProjectDriftSummary,
54
71
  resourceKeyFromManagedPath,
55
72
  restoreUntrackedStashFiles,
56
73
  stashedFilesToDriftChanges,
74
+ unreadNotificationCount,
57
75
  upsertResource,
58
76
  useEnvironmentCommand,
59
77
  useProfileCommand,
60
- withProfileApplyLock
61
- } from "./chunk-ZUASVASP.js";
62
- import {
63
- parsePluginSelector,
64
- resolveRemotePluginSelector
65
- } from "./chunk-N3ZCH64F.js";
66
- import {
67
- ui
68
- } from "./chunk-2A36HWDE.js";
69
- import {
70
- buildHarnessLiveStatusMap,
71
- classifyGlobalDriftChanges,
72
- clearActiveProfileName,
73
- collectOwnedGlobalProfileFiles,
74
- computeGlobalProfilePanelStatus,
75
- countMissingHarnessRows,
76
- declaredMcpFromExpectedFiles,
77
- driftChangeIsKept,
78
- getActiveProfileName,
79
- getLatestGlobalApplySnapshotForProfile,
80
- resolveHomeRoot,
81
- resolveProjectDriftSummary,
78
+ withProfileApplyLock,
82
79
  withStatusReadCache
83
- } from "./chunk-DF4Z7LAD.js";
80
+ } from "./chunk-26QGX47N.js";
84
81
  import {
85
82
  inStatusComputation,
86
- runInStatusComputation
87
- } from "./chunk-G6WKY2W4.js";
83
+ promptForChoice,
84
+ promptForConfirmation,
85
+ promptForSearchableChoice,
86
+ resolveHomeRoot,
87
+ runInStatusComputation,
88
+ shouldUseBrowsePicker,
89
+ shouldUseWizard
90
+ } from "./chunk-LGWFLVZQ.js";
91
+ import {
92
+ parsePluginSelector,
93
+ resolveRemotePluginSelector
94
+ } from "./chunk-MSKTWYHG.js";
88
95
  import {
89
96
  CLI_COPY,
97
+ CLI_HINTS,
90
98
  SWITCH_CHANGES_VALUES,
99
+ allKeptHostPluginViewPaths,
91
100
  applyCancelledMessage,
92
101
  applyHeaderLine,
93
102
  applyWroteLine,
@@ -95,18 +104,25 @@ import {
95
104
  discardedChangesLine,
96
105
  dryRunSectionHeader,
97
106
  dryRunWouldLine,
107
+ forceRemoveHintLine,
98
108
  getHarnesstapDir,
109
+ harnesstapDirForHomeRoot,
110
+ hostPluginViewChangeCounts,
111
+ hostPluginViewForceReplace,
99
112
  keptFilesHeader,
100
113
  keptReasonLabel,
114
+ keptReportedBeforeLine,
101
115
  onConflictReplaceHint,
116
+ pendingKeptHostPluginViewPaths,
102
117
  savedChangesLine,
103
118
  snapshotSavedUndoLine,
104
119
  stashedChangesLine,
105
120
  traceCount,
106
121
  traceSpan,
122
+ ui,
107
123
  unsavedChangesFlagHint,
108
124
  unsavedChangesLine
109
- } from "./chunk-WG5A6EAU.js";
125
+ } from "./chunk-MTCCUYBZ.js";
110
126
 
111
127
  // src/utils/user-path.ts
112
128
  import { existsSync } from "fs";
@@ -174,7 +190,10 @@ async function promptMaterializationConflict(conflict) {
174
190
  function keptFromSkippedRemovals(skipped) {
175
191
  return (skipped ?? []).flatMap((entry) => {
176
192
  const reason = removalSkipReason(entry.reason);
177
- return reason ? [{ path: entry.path, reason }] : [];
193
+ if (!reason) return [];
194
+ return [
195
+ entry.forceable === false ? { path: entry.path, reason, forceable: false } : { path: entry.path, reason }
196
+ ];
178
197
  });
179
198
  }
180
199
  function printApplyPayload(payload) {
@@ -210,9 +229,6 @@ function printApplyPayload(payload) {
210
229
  ui.warn(skipped.message);
211
230
  }
212
231
  }
213
- if (!payload.dry_run && payload.removal_backup && (payload.removed_files?.length ?? 0) > 0) {
214
- ui.info(`Backup: ${payload.removal_backup}`);
215
- }
216
232
  }
217
233
  function printApplyDryRun(input) {
218
234
  if (input.header !== false) {
@@ -234,7 +250,7 @@ function printApplyDryRun(input) {
234
250
  if (input.wouldKeep.length > 0) {
235
251
  console.log(dryRunSectionHeader("keep", input.wouldKeep.length));
236
252
  for (const entry of input.wouldKeep) {
237
- console.log(` ${entry.path} ${keptReasonLabel(entry.reason)}`);
253
+ console.log(` ${entry.path} ${keptReasonLabel(entry.reason, entry.path)}`);
238
254
  }
239
255
  }
240
256
  console.log("");
@@ -253,22 +269,39 @@ function printKeptFiles(kept) {
253
269
  }
254
270
  console.log(keptFilesHeader(kept.length));
255
271
  for (const entry of kept) {
256
- console.log(` ${entry.path} ${keptReasonLabel(entry.reason)}`);
272
+ console.log(` ${entry.path} ${keptReasonLabel(entry.reason, entry.path)}`);
273
+ }
274
+ if (kept.every((entry) => isClaudePluginRegistryPath(entry.path))) {
275
+ return;
257
276
  }
258
- console.log(`${CLI_COPY.forceRemoveHint} ht apply --force-remove`);
277
+ const forceable = kept.filter(
278
+ (entry) => entry.forceable !== false && !isClaudePluginRegistryPath(entry.path)
279
+ );
280
+ console.log(
281
+ hostPluginViewForceReplace() || forceable.length === 0 ? CLI_HINTS.forceRemoveAlreadyUsed : forceRemoveHintLine(forceable.length)
282
+ );
259
283
  }
260
284
  function printApplySuccess(input) {
261
285
  console.log(applyHeaderLine(input.name, input.harnessCount));
286
+ const pluginFolder = hostPluginViewChangeCounts();
287
+ const folderKept = new Set(pendingKeptHostPluginViewPaths());
288
+ const kept = input.kept.filter((entry) => !folderKept.has(entry.path));
289
+ const listedPaths = /* @__PURE__ */ new Set([...folderKept, ...kept.map((entry) => entry.path)]);
290
+ const reportedBefore = allKeptHostPluginViewPaths().filter((path) => !listedPaths.has(path));
291
+ const keptTotal = listedPaths.size + new Set(reportedBefore).size;
262
292
  console.log(
263
293
  applyWroteLine({
264
- wrote: input.wrote,
265
- removed: input.removed,
266
- kept: input.kept.length,
294
+ wrote: input.wrote + pluginFolder.replaced + pluginFolder.added,
295
+ removed: input.removed + pluginFolder.removed,
296
+ kept: keptTotal,
267
297
  unchanged: input.unchanged
268
298
  })
269
299
  );
270
- if (input.kept.length > 0) {
271
- printKeptFiles(input.kept);
300
+ if (kept.length > 0) {
301
+ printKeptFiles(kept);
302
+ }
303
+ if (reportedBefore.length > 0) {
304
+ console.log(keptReportedBeforeLine(new Set(reportedBefore).size));
272
305
  }
273
306
  if (input.snapshotId) {
274
307
  console.log(snapshotSavedUndoLine(`ht revert ${input.snapshotId}`));
@@ -294,6 +327,75 @@ function driftCore(fields, harness, homeRoot) {
294
327
  );
295
328
  return { fields, harness, watchedPaths };
296
329
  }
330
+ function globalProfileStatusGaps(status) {
331
+ const missing = status.depth === "full" ? listMissingHarnessRows(status.harnesses) : [];
332
+ return { inSync: !status.has_drift && missing.length === 0, missing };
333
+ }
334
+ var HOST_PLUGIN_VIEW_PATH = /^(\.claude\/plugins\/cache\/([^/]+)\/([^/]+)\/([^/]+))\//;
335
+ function isHostPluginViewPath(path) {
336
+ return HOST_PLUGIN_VIEW_PATH.test(path.replaceAll("\\", "/"));
337
+ }
338
+ function hostPluginFolderChanges(homeRoot, expectedFiles, known) {
339
+ const folders = /* @__PURE__ */ new Map();
340
+ for (const file of expectedFiles) {
341
+ const match = HOST_PLUGIN_VIEW_PATH.exec(file.path.replaceAll("\\", "/"));
342
+ if (!match?.[1] || !match[2] || !match[3] || !match[4]) continue;
343
+ folders.set(match[1], { marketplace: match[2], name: match[3], version: match[4] });
344
+ }
345
+ if (folders.size === 0) return [];
346
+ const seen = new Set(known.map((change) => change.path));
347
+ const harnesstapDir = harnesstapDirForHomeRoot(homeRoot);
348
+ const changes = [];
349
+ for (const [folder, plugin] of folders) {
350
+ const canonicalDir = hostPluginPackageDir(harnesstapDir, plugin.marketplace, plugin.name, plugin.version);
351
+ const differences = diffHostPluginView({
352
+ homeRoot,
353
+ hostView: join2(homeRoot, folder),
354
+ canonicalDir
355
+ });
356
+ const emitted = differences.length > 0 ? emittedHostPluginTree(canonicalDir, "claude-code", plugin.name) : /* @__PURE__ */ new Map();
357
+ for (const difference of differences) {
358
+ const path = `${folder}/${difference.path}`;
359
+ if (seen.has(path)) continue;
360
+ const written = emitted.get(difference.path);
361
+ if (difference.state === "missing" ? !written : matchesEmitted(join2(homeRoot, path), written)) {
362
+ continue;
363
+ }
364
+ seen.add(path);
365
+ if (difference.state === "missing") changes.push({ path, type: "deleted" });
366
+ else if (difference.state === "stale") changes.push({ path, type: "modified" });
367
+ else if (difference.state === "modified") {
368
+ changes.push({ path, type: "modified", removal_group: "owned_modified", changed_by: "claude-code" });
369
+ } else {
370
+ changes.push({ path, type: "modified", removal_group: "unmanaged" });
371
+ }
372
+ }
373
+ }
374
+ return changes;
375
+ }
376
+ function matchesEmitted(fullPath, file) {
377
+ if (!file) return false;
378
+ const binary = binaryExpectedFileMatchesDisk(fullPath, file);
379
+ if (binary !== void 0) return binary;
380
+ try {
381
+ return readFileSync(fullPath, "utf-8") === file.content;
382
+ } catch {
383
+ return false;
384
+ }
385
+ }
386
+ function isHarnessTapClaudeMarketplaceFile(path) {
387
+ return path.replaceAll("\\", "/").startsWith(`${HARNESSTAP_CLAUDE_MARKETPLACES_ROOT}/`);
388
+ }
389
+ function claudeChangedMarketplaceEntries(homeRoot, expectedFiles) {
390
+ const wanted = new Set(expectedFiles.map((file) => file.path));
391
+ return [...claudeChangedMarketplaces(homeRoot)].filter((marketplace) => wanted.has(harnessTapClaudeMarketplaceManifestPath(marketplace))).sort().map((marketplace) => ({
392
+ path: CLAUDE_KNOWN_MARKETPLACES_PATH,
393
+ type: "modified",
394
+ removal_group: "owned_modified",
395
+ changed_by: "claude-code",
396
+ detail: `marketplace ${marketplace}`
397
+ }));
398
+ }
297
399
  function keptContentDiff(path, keptModified, keptUnmanaged) {
298
400
  if (keptModified.has(path)) {
299
401
  return { path, type: "modified", removal_group: "owned_modified" };
@@ -303,7 +405,7 @@ function keptContentDiff(path, keptModified, keptUnmanaged) {
303
405
  }
304
406
  return { path, type: "modified" };
305
407
  }
306
- function isMissingExpectedFileTransparent(homeRoot, path, expectedPathsByResource, scopeByResource) {
408
+ function isMissingExpectedFileTransparent(homeRoot, path, expectedPathsByResource, scopeByResource, harnesses) {
307
409
  const mapped = resourceKeyFromManagedPath(path);
308
410
  if (!mapped) {
309
411
  return true;
@@ -313,6 +415,9 @@ function isMissingExpectedFileTransparent(homeRoot, path, expectedPathsByResourc
313
415
  const onDiskSiblingPaths = siblings.filter(
314
416
  (sibling) => sibling !== path && readGlobalFile(homeRoot, sibling) !== null
315
417
  );
418
+ for (const live of liveSkillCopiesForMissingPath(path, harnesses, (candidate) => readGlobalFile(homeRoot, candidate) !== null)) {
419
+ if (!onDiskSiblingPaths.includes(live)) onDiskSiblingPaths.push(live);
420
+ }
316
421
  return isTransparentCrossHarnessGap({
317
422
  path,
318
423
  onDiskSiblingPaths,
@@ -364,10 +469,15 @@ function buildBaseStatusFields(input) {
364
469
  const declaredPins = input.pluginIds && input.pluginIds.length > 0 ? traceSpan("base.merge-plugins", () => mergePluginsForApply(input.pluginIds ?? []).pluginPins) : [];
365
470
  const declaredFromExpected = input.expectedApply ? declaredMcpFromExpectedApply(input.expectedApply) : null;
366
471
  const declaredMcpByHarness = declaredFromExpected?.namesByHarness ?? (input.pluginIds ? declaredMcpNamesFromMergedPlugins(input.pluginIds) : { "claude-code": [], cursor: [] });
472
+ const filesOnlyPinRefs = input.expectedApply?.resolution ? {
473
+ "claude-code": filesOnlyMarketplacePinRefs(input.expectedApply.resolution, "claude-code"),
474
+ cursor: filesOnlyMarketplacePinRefs(input.expectedApply.resolution, "cursor")
475
+ } : void 0;
367
476
  const harnesses = traceSpan("base.harness-live-status", () => buildHarnessLiveStatusMap({
368
477
  depth: input.depth,
369
478
  homeRoot,
370
479
  declaredPins,
480
+ ...filesOnlyPinRefs ? { filesOnlyPinRefs } : {},
371
481
  declaredMcpByHarness,
372
482
  ...declaredFromExpected ? { expectedMcpConfigsByHarness: declaredFromExpected.configsByHarness } : {}
373
483
  }));
@@ -468,7 +578,10 @@ async function detectGlobalProfileStatus(input = {}) {
468
578
  return {
469
579
  ...status,
470
580
  as_of: (/* @__PURE__ */ new Date()).toISOString(),
471
- refreshing: status.refreshing === true
581
+ refreshing: status.refreshing === true,
582
+ // Outside the cache: one indexed read, so a finished check shows at once.
583
+ updates: readUpstreamCheckSummary(),
584
+ unread_count: unreadNotificationCount()
472
585
  };
473
586
  }
474
587
  async function loadDriftCore(input) {
@@ -613,6 +726,8 @@ async function loadDriftCore(input) {
613
726
  traceSpan("drift.compare-files", () => {
614
727
  for (const file of expectedApply.expected_files ?? []) {
615
728
  if (isNativeAgentPluginCachePath(file.path)) continue;
729
+ if (isHostPluginViewPath(file.path)) continue;
730
+ if (binaryExpectedFileMatchesDisk(join2(homeRoot, file.path), file)) continue;
616
731
  const current = readGlobalFile(homeRoot, file.path);
617
732
  const owned = listMaterializationsForRootPath(homeRoot, file.path);
618
733
  if (current === null) {
@@ -620,7 +735,8 @@ async function loadDriftCore(input) {
620
735
  homeRoot,
621
736
  file.path,
622
737
  expectedPathsByResource,
623
- scopeByResource
738
+ scopeByResource,
739
+ expectedApply.harnesses
624
740
  )) {
625
741
  continue;
626
742
  }
@@ -637,6 +753,10 @@ async function loadDriftCore(input) {
637
753
  if (fileContentsEquivalentForDrift(file.path, current, file.content)) {
638
754
  continue;
639
755
  }
756
+ if (isHarnessTapClaudeMarketplaceFile(file.path)) {
757
+ changes.push({ path: file.path, type: "modified", removal_group: "owned_modified", changed_by: "claude-code" });
758
+ continue;
759
+ }
640
760
  changes.push(
641
761
  withAffectedResources(
642
762
  keptContentDiff(file.path, keptModified, keptUnmanaged),
@@ -657,6 +777,10 @@ async function loadDriftCore(input) {
657
777
  }
658
778
  }
659
779
  });
780
+ traceSpan("drift.host-plugin-folders", () => {
781
+ changes.push(...hostPluginFolderChanges(homeRoot, expectedApply.expected_files ?? [], changes));
782
+ });
783
+ changes.push(...claudeChangedMarketplaceEntries(homeRoot, expectedApply.expected_files ?? []));
660
784
  const applied = Boolean(latestSnapshot);
661
785
  const blockingChanges = changes.filter((change) => !driftChangeIsKept(change));
662
786
  const hasDrift = !applied || !stackInSync || blockingChanges.length > 0;
@@ -813,7 +937,9 @@ function readHomeFile(homeRoot, relativePath) {
813
937
  return null;
814
938
  }
815
939
  try {
816
- return readFileSync2(fullPath, "utf-8");
940
+ const bytes = readFileSync2(fullPath);
941
+ const text = bytes.toString("utf-8");
942
+ return Buffer.from(text, "utf-8").equals(bytes) ? text : null;
817
943
  } catch {
818
944
  return null;
819
945
  }
@@ -823,7 +949,7 @@ function lastWrittenContent(profileName, relativePath) {
823
949
  if (!snapshot?.state) {
824
950
  return void 0;
825
951
  }
826
- return flattenLiveRestoreFiles(snapshot.state).find((file) => file.path === relativePath)?.content;
952
+ return flattenLiveRestoreFiles(snapshot.state, snapshot.id).find((file) => file.path === relativePath)?.bytes;
827
953
  }
828
954
  async function stashManagedDriftChanges(input) {
829
955
  return withProfileApplyLock(async () => {
@@ -850,7 +976,7 @@ async function stashManagedDriftChanges(input) {
850
976
  }
851
977
  const fullPath = resolve2(homeRoot, file.path);
852
978
  mkdirSync(dirname(fullPath), { recursive: true });
853
- writeFileSync(fullPath, previous, "utf-8");
979
+ writeFileSync(fullPath, previous);
854
980
  }
855
981
  }
856
982
  if (input.dryRun) {
@@ -1015,10 +1141,11 @@ async function maybeSyncActiveProfileBeforeSwitch(input) {
1015
1141
  if (!status.active_profile || status.active_profile === input.targetProfileName) {
1016
1142
  return "continue";
1017
1143
  }
1018
- if (status.changes.length === 0) {
1144
+ const changes = status.changes.filter((change) => !isHostPluginViewPath(change.path) && change.changed_by !== "claude-code");
1145
+ if (changes.length === 0) {
1019
1146
  return "continue";
1020
1147
  }
1021
- const count = status.changes.length;
1148
+ const count = changes.length;
1022
1149
  const parsedChanges = parseSwitchChanges(input.changes);
1023
1150
  if (parsedChanges === "invalid") {
1024
1151
  ui.danger("Error: Invalid --changes. Use save, stash or discard.");
@@ -1051,7 +1178,7 @@ async function maybeSyncActiveProfileBeforeSwitch(input) {
1051
1178
  case "cancel":
1052
1179
  return "abort";
1053
1180
  case "save": {
1054
- for (const change of status.changes) {
1181
+ for (const change of changes) {
1055
1182
  try {
1056
1183
  await commitManagedPathFromLive({
1057
1184
  profileSelector: status.active_profile,
@@ -1067,7 +1194,7 @@ async function maybeSyncActiveProfileBeforeSwitch(input) {
1067
1194
  }
1068
1195
  case "stash": {
1069
1196
  await stashManagedDriftChanges({
1070
- changes: status.changes
1197
+ changes
1071
1198
  });
1072
1199
  ui.success(stashedChangesLine(count, "ht profile stash pop"));
1073
1200
  return "continue";
@@ -1457,6 +1584,7 @@ export {
1457
1584
  printApplyDryRun,
1458
1585
  printApplySuccess,
1459
1586
  removalSkipReason,
1587
+ globalProfileStatusGaps,
1460
1588
  detectGlobalProfileStatus,
1461
1589
  buildProjectProfileChoices,
1462
1590
  listProfileStashEntries,
@@ -1469,4 +1597,4 @@ export {
1469
1597
  importProjectConfigEnvironments,
1470
1598
  executeProjectUse
1471
1599
  };
1472
- //# sourceMappingURL=chunk-R7ZOYVN3.js.map
1600
+ //# sourceMappingURL=chunk-CUOEQQFI.js.map