harnesstap 1.1.0 → 1.3.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 (202) hide show
  1. package/README.md +33 -16
  2. package/dist/apply-QSS4242W.js +67 -0
  3. package/dist/apply-QSS4242W.js.map +1 -0
  4. package/dist/approve-CNYQY6DC.js +181 -0
  5. package/dist/approve-CNYQY6DC.js.map +1 -0
  6. package/dist/audit-V4SUV7KA.js +434 -0
  7. package/dist/audit-V4SUV7KA.js.map +1 -0
  8. package/dist/auth-63FOHIQ3.js +220 -0
  9. package/dist/auth-63FOHIQ3.js.map +1 -0
  10. package/dist/bin.js +166 -0
  11. package/dist/bin.js.map +1 -0
  12. package/dist/chunk-2H7UOFLK.js +11 -0
  13. package/dist/chunk-2H7UOFLK.js.map +1 -0
  14. package/dist/chunk-2NE3QYMP.js +103 -0
  15. package/dist/chunk-2NE3QYMP.js.map +1 -0
  16. package/dist/chunk-2P2EOYEW.js +1140 -0
  17. package/dist/chunk-2P2EOYEW.js.map +1 -0
  18. package/dist/chunk-37E5M4JX.js +34 -0
  19. package/dist/chunk-37E5M4JX.js.map +1 -0
  20. package/dist/chunk-37LQQWMF.js +496 -0
  21. package/dist/chunk-37LQQWMF.js.map +1 -0
  22. package/dist/chunk-3FIWOI3H.js +98 -0
  23. package/dist/chunk-3FIWOI3H.js.map +1 -0
  24. package/dist/chunk-3PGC6OA3.js +540 -0
  25. package/dist/chunk-3PGC6OA3.js.map +1 -0
  26. package/dist/chunk-4IHKBIY3.js +118 -0
  27. package/dist/chunk-4IHKBIY3.js.map +1 -0
  28. package/dist/chunk-4ZUBRLSP.js +17 -0
  29. package/dist/chunk-4ZUBRLSP.js.map +1 -0
  30. package/dist/chunk-5F3LNDZG.js +9 -0
  31. package/dist/chunk-5F3LNDZG.js.map +1 -0
  32. package/dist/chunk-5TXI6BI2.js +1359 -0
  33. package/dist/chunk-5TXI6BI2.js.map +1 -0
  34. package/dist/chunk-6P5IO4BX.js +235 -0
  35. package/dist/chunk-6P5IO4BX.js.map +1 -0
  36. package/dist/chunk-ABXUKHAU.js +571 -0
  37. package/dist/chunk-ABXUKHAU.js.map +1 -0
  38. package/dist/chunk-AOUDSNRK.js +1357 -0
  39. package/dist/chunk-AOUDSNRK.js.map +1 -0
  40. package/dist/chunk-BNDJJAEI.js +311 -0
  41. package/dist/chunk-BNDJJAEI.js.map +1 -0
  42. package/dist/chunk-C2IWSFF5.js +818 -0
  43. package/dist/chunk-C2IWSFF5.js.map +1 -0
  44. package/dist/chunk-CHQGE2HF.js +283 -0
  45. package/dist/chunk-CHQGE2HF.js.map +1 -0
  46. package/dist/chunk-DEJLP7QJ.js +681 -0
  47. package/dist/chunk-DEJLP7QJ.js.map +1 -0
  48. package/dist/chunk-DJ6FN6EW.js +532 -0
  49. package/dist/chunk-DJ6FN6EW.js.map +1 -0
  50. package/dist/chunk-E4WRTRMH.js +1173 -0
  51. package/dist/chunk-E4WRTRMH.js.map +1 -0
  52. package/dist/chunk-E5QXNU3K.js +238 -0
  53. package/dist/chunk-E5QXNU3K.js.map +1 -0
  54. package/dist/chunk-EMTBGOR3.js +2959 -0
  55. package/dist/chunk-EMTBGOR3.js.map +1 -0
  56. package/dist/chunk-FFWYIGQ4.js +18 -0
  57. package/dist/chunk-FFWYIGQ4.js.map +1 -0
  58. package/dist/chunk-I6XFZLTJ.js +9 -0
  59. package/dist/chunk-I6XFZLTJ.js.map +1 -0
  60. package/dist/chunk-IHWAOIAU.js +172 -0
  61. package/dist/chunk-IHWAOIAU.js.map +1 -0
  62. package/dist/chunk-IHZUYG66.js +583 -0
  63. package/dist/chunk-IHZUYG66.js.map +1 -0
  64. package/dist/chunk-JQOKQKQT.js +158 -0
  65. package/dist/chunk-JQOKQKQT.js.map +1 -0
  66. package/dist/chunk-JRFUTIEH.js +426 -0
  67. package/dist/chunk-JRFUTIEH.js.map +1 -0
  68. package/dist/chunk-KCBI6JQC.js +115 -0
  69. package/dist/chunk-KCBI6JQC.js.map +1 -0
  70. package/dist/chunk-KDUQMINL.js +60 -0
  71. package/dist/chunk-KDUQMINL.js.map +1 -0
  72. package/dist/chunk-KLR2DURP.js +656 -0
  73. package/dist/chunk-KLR2DURP.js.map +1 -0
  74. package/dist/chunk-KRI4R7EM.js +25 -0
  75. package/dist/chunk-KRI4R7EM.js.map +1 -0
  76. package/dist/chunk-LYQMK6SV.js +87 -0
  77. package/dist/chunk-LYQMK6SV.js.map +1 -0
  78. package/dist/chunk-MK3Q37ZN.js +183 -0
  79. package/dist/chunk-MK3Q37ZN.js.map +1 -0
  80. package/dist/chunk-MSGAGV7B.js +346 -0
  81. package/dist/chunk-MSGAGV7B.js.map +1 -0
  82. package/dist/chunk-MZQRSERO.js +430 -0
  83. package/dist/chunk-MZQRSERO.js.map +1 -0
  84. package/dist/chunk-N3WIJXXM.js +691 -0
  85. package/dist/chunk-N3WIJXXM.js.map +1 -0
  86. package/dist/chunk-NAGAJ5UM.js +145 -0
  87. package/dist/chunk-NAGAJ5UM.js.map +1 -0
  88. package/dist/chunk-NFYPBTKO.js +302 -0
  89. package/dist/chunk-NFYPBTKO.js.map +1 -0
  90. package/dist/chunk-NPO2IG6G.js +491 -0
  91. package/dist/chunk-NPO2IG6G.js.map +1 -0
  92. package/dist/chunk-OS6NUIBJ.js +38 -0
  93. package/dist/chunk-OS6NUIBJ.js.map +1 -0
  94. package/dist/chunk-PFUK3HJ4.js +296 -0
  95. package/dist/chunk-PFUK3HJ4.js.map +1 -0
  96. package/dist/chunk-PMQ55GDB.js +115 -0
  97. package/dist/chunk-PMQ55GDB.js.map +1 -0
  98. package/dist/chunk-QIVE2YFJ.js +514 -0
  99. package/dist/chunk-QIVE2YFJ.js.map +1 -0
  100. package/dist/chunk-QKXD3EUF.js +691 -0
  101. package/dist/chunk-QKXD3EUF.js.map +1 -0
  102. package/dist/chunk-RNQYUWF6.js +32 -0
  103. package/dist/chunk-RNQYUWF6.js.map +1 -0
  104. package/dist/chunk-S2E4SSQV.js +41 -0
  105. package/dist/chunk-S2E4SSQV.js.map +1 -0
  106. package/dist/chunk-SN4BXX3B.js +186 -0
  107. package/dist/chunk-SN4BXX3B.js.map +1 -0
  108. package/dist/chunk-SNVAMWB7.js +40 -0
  109. package/dist/chunk-SNVAMWB7.js.map +1 -0
  110. package/dist/chunk-T5VRREN4.js +696 -0
  111. package/dist/chunk-T5VRREN4.js.map +1 -0
  112. package/dist/chunk-TKBMHZTS.js +10945 -0
  113. package/dist/chunk-TKBMHZTS.js.map +1 -0
  114. package/dist/chunk-TNJPTUE4.js +35 -0
  115. package/dist/chunk-TNJPTUE4.js.map +1 -0
  116. package/dist/chunk-TQ2NA4Z4.js +24 -0
  117. package/dist/chunk-TQ2NA4Z4.js.map +1 -0
  118. package/dist/chunk-TXXDMDPN.js +998 -0
  119. package/dist/chunk-TXXDMDPN.js.map +1 -0
  120. package/dist/chunk-UWXUBU7V.js +184 -0
  121. package/dist/chunk-UWXUBU7V.js.map +1 -0
  122. package/dist/chunk-UYRK2H24.js +141 -0
  123. package/dist/chunk-UYRK2H24.js.map +1 -0
  124. package/dist/chunk-V4IXIM3C.js +806 -0
  125. package/dist/chunk-V4IXIM3C.js.map +1 -0
  126. package/dist/chunk-VFHVXXP4.js +6438 -0
  127. package/dist/chunk-VFHVXXP4.js.map +1 -0
  128. package/dist/chunk-VQVUJYYY.js +244 -0
  129. package/dist/chunk-VQVUJYYY.js.map +1 -0
  130. package/dist/chunk-VZQG2JDV.js +9 -0
  131. package/dist/chunk-VZQG2JDV.js.map +1 -0
  132. package/dist/chunk-W7HQ5X3S.js +610 -0
  133. package/dist/chunk-W7HQ5X3S.js.map +1 -0
  134. package/dist/chunk-WMSQAFK5.js +65 -0
  135. package/dist/chunk-WMSQAFK5.js.map +1 -0
  136. package/dist/chunk-WMYTBJPB.js +364 -0
  137. package/dist/chunk-WMYTBJPB.js.map +1 -0
  138. package/dist/chunk-WNLFNCOH.js +7795 -0
  139. package/dist/chunk-WNLFNCOH.js.map +1 -0
  140. package/dist/chunk-WRX7CB2M.js +6448 -0
  141. package/dist/chunk-WRX7CB2M.js.map +1 -0
  142. package/dist/chunk-XGTTOO4R.js +84 -0
  143. package/dist/chunk-XGTTOO4R.js.map +1 -0
  144. package/dist/chunk-YSXRBUR4.js +682 -0
  145. package/dist/chunk-YSXRBUR4.js.map +1 -0
  146. package/dist/chunk-YTC2EG64.js +1759 -0
  147. package/dist/chunk-YTC2EG64.js.map +1 -0
  148. package/dist/compile-J3UGQSS3.js +161 -0
  149. package/dist/compile-J3UGQSS3.js.map +1 -0
  150. package/dist/config-5BPSZND3.js +438 -0
  151. package/dist/config-5BPSZND3.js.map +1 -0
  152. package/dist/doctor-BVFKLJVO.js +111 -0
  153. package/dist/doctor-BVFKLJVO.js.map +1 -0
  154. package/dist/environment-3RI5H32O.js +2745 -0
  155. package/dist/environment-3RI5H32O.js.map +1 -0
  156. package/dist/github-YFJQVH5K.js +114 -0
  157. package/dist/github-YFJQVH5K.js.map +1 -0
  158. package/dist/harness-ECGHPEKA.js +746 -0
  159. package/dist/harness-ECGHPEKA.js.map +1 -0
  160. package/dist/help-ELPNPPEM.js +2079 -0
  161. package/dist/help-ELPNPPEM.js.map +1 -0
  162. package/dist/help-UL5XLY3I.js +1892 -0
  163. package/dist/help-UL5XLY3I.js.map +1 -0
  164. package/dist/index.d.ts +164 -1
  165. package/dist/index.js +50 -54362
  166. package/dist/index.js.map +1 -1
  167. package/dist/init-UJQTDHW7.js +873 -0
  168. package/dist/init-UJQTDHW7.js.map +1 -0
  169. package/dist/lock-XUMJ63NZ.js +455 -0
  170. package/dist/lock-XUMJ63NZ.js.map +1 -0
  171. package/dist/marketplace-ZUMOLVXE.js +495 -0
  172. package/dist/marketplace-ZUMOLVXE.js.map +1 -0
  173. package/dist/mcp-RZA5O2ND.js +202 -0
  174. package/dist/mcp-RZA5O2ND.js.map +1 -0
  175. package/dist/migrate-CYQI2FH6.js +1043 -0
  176. package/dist/migrate-CYQI2FH6.js.map +1 -0
  177. package/dist/open-AWOAWLKO.js +32 -0
  178. package/dist/open-AWOAWLKO.js.map +1 -0
  179. package/dist/pack-2QD5ZUIO.js +99 -0
  180. package/dist/pack-2QD5ZUIO.js.map +1 -0
  181. package/dist/plugin-GQSSSFX4.js +64 -0
  182. package/dist/plugin-GQSSSFX4.js.map +1 -0
  183. package/dist/plugin-from-project-SIQUFYIO.js +16 -0
  184. package/dist/plugin-from-project-SIQUFYIO.js.map +1 -0
  185. package/dist/policy-CT4JRCJI.js +105 -0
  186. package/dist/policy-CT4JRCJI.js.map +1 -0
  187. package/dist/profile-4JQ6LECP.js +1886 -0
  188. package/dist/profile-4JQ6LECP.js.map +1 -0
  189. package/dist/project-JG7QWXRG.js +1392 -0
  190. package/dist/project-JG7QWXRG.js.map +1 -0
  191. package/dist/resource-QRMR6CSD.js +555 -0
  192. package/dist/resource-QRMR6CSD.js.map +1 -0
  193. package/dist/version-LZ5POOXY.js +17 -0
  194. package/dist/version-LZ5POOXY.js.map +1 -0
  195. package/package.json +25 -14
  196. package/schemas/ap-package.v1.json +36 -0
  197. package/schemas/fixtures/catalog-missing-schema.ap.json +13 -0
  198. package/schemas/fixtures/confidence.ap.json +13 -0
  199. package/schemas/fixtures/context7.ap.json +13 -0
  200. package/schemas/fixtures/minimal-with-schema.ap.json +13 -0
  201. package/schemas/fixtures/superpowers.ap.json +13 -0
  202. package/schemas/fixtures/third-party-skills.ap.json +13 -0
package/README.md CHANGED
@@ -8,7 +8,7 @@
8
8
 
9
9
  Scan existing setup → store canonical resources → compose **plugins** → share offline or via catalog → materialize into any supported harness.
10
10
 
11
- Use the **CLI** (`ht`) or **Desktop** — both talk to the same local library at `~/.harnesstap`.
11
+ Use the **CLI** (`ht`) or **Desktop**. Both talk to the same local library at `~/.harnesstap`.
12
12
 
13
13
  <br />
14
14
 
@@ -16,7 +16,7 @@ Use the **CLI** (`ht`) or **Desktop** — both talk to the same local library at
16
16
  [![Docs](https://img.shields.io/badge/docs-harnesstap.com-0ea5e9)](https://harnesstap.com/docs)
17
17
  [![License](https://img.shields.io/github/license/harnesstap/harnesstap)](LICENSE)
18
18
  [![npm](https://img.shields.io/npm/v/harnesstap?color=cb3837&logo=npm&logoColor=white)](https://www.npmjs.com/package/harnesstap)
19
- [![Node](https://img.shields.io/badge/node-%3E%3D20-339933?logo=node.js&logoColor=white)](https://nodejs.org)
19
+ [![Node](https://img.shields.io/badge/node-%3E%3D22.18-339933?logo=node.js&logoColor=white)](https://nodejs.org)
20
20
 
21
21
  <br />
22
22
 
@@ -61,13 +61,13 @@ Use the **CLI** (`ht`) or **Desktop** — both talk to the same local library at
61
61
  | **Machine transfer** | Export the local library and harness preferences for another machine |
62
62
  | **Desktop** | Browse plugins, profiles, and apply from a local app that shares the CLI library |
63
63
 
64
- **42 harnesses** are registered today. Native serializers: Claude Code, Cursor, Codex, Goose, OpenCode, GitHub Copilot, Copilot CLI, Gemini CLI, Grok Build, DeepSeek Harness. The rest use a path-driven serializer. Full matrix: [Supported harnesses](docs/supported-harnesses.md).
64
+ **44 harnesses** are registered today. Native serializers: Claude Code, Cursor, Codex, Goose, OpenCode, GitHub Copilot, Copilot CLI, Gemini CLI, Grok Build, DeepSeek Harness, Muse Code, MiniMax Code. The rest use a path-driven serializer. Full matrix: [Supported harnesses](docs/supported-harnesses.md).
65
65
 
66
66
  ---
67
67
 
68
68
  ## Install
69
69
 
70
- **Requirements:** Node.js 20+ to run the published CLI.
70
+ **Requirements:** Node.js 22.12+ or 24 to run the published CLI.
71
71
 
72
72
  ### Recommended: npx (no global install)
73
73
 
@@ -92,7 +92,7 @@ bun install -g harnesstap
92
92
  ht init
93
93
  ```
94
94
 
95
- Or without a global install: `bunx harnesstap@latest init`.
95
+ Or without a global install: `bun x harnesstap@latest init`.
96
96
 
97
97
  </details>
98
98
 
@@ -132,7 +132,7 @@ Default onboarding in a repo that already has `apm.yml`. Same loop as `ht apply`
132
132
  ### Project: scan and apply
133
133
 
134
134
  ```bash
135
- ht init --main codex --aliases claude-code,cursor
135
+ ht init --harnesses codex,claude-code,cursor
136
136
  ht scan .
137
137
  ht resource list
138
138
  ht apply engineering-foundation --project .
@@ -144,7 +144,7 @@ ht status .
144
144
  ### Machine: profile switch
145
145
 
146
146
  ```bash
147
- ht init --main claude-code --aliases cursor,codex
147
+ ht init --harnesses claude-code,cursor,codex
148
148
  ht profile use "global default"
149
149
  # after you compose a `work` profile:
150
150
  ht work
@@ -184,14 +184,14 @@ Details, sidecar notes, and e2e: [apps/desktop/README.md](apps/desktop/README.md
184
184
 
185
185
  ## Demo
186
186
 
187
- Initialise HarnessTap, scan an existing repository, browse catalog plugins, apply one, and confirm the final state — all in about a minute.
187
+ Initialise HarnessTap, scan an existing repository, browse catalog plugins, apply one, and confirm the final state, all in about a minute.
188
188
 
189
189
  [![Existing repo adoption walkthrough](docs/scenarios/vhs/output/01-existing-repo-adoption.gif)](docs/scenarios/vhs/walkthroughs/01-existing-repo-adoption.md)
190
190
 
191
191
  [Full walkthrough →](docs/scenarios/vhs/walkthroughs/01-existing-repo-adoption.md)
192
192
 
193
193
  ```bash
194
- ht init --main codex --aliases claude-code,cursor
194
+ ht init --harnesses codex,claude-code,cursor
195
195
  ht scan . # detect existing resources
196
196
  ht resource list # review discovered resources
197
197
  ht plugin list --search foundation --remote-only
@@ -203,13 +203,13 @@ ht status . # confirm the final state
203
203
 
204
204
  ## Concept model
205
205
 
206
- HarnessTap keeps one library of **resources** — skills, rules, MCP servers, hooks, agents, commands. You group them into **plugins**. `ht apply <plugin>` (project) or `ht profile use <plugin>` (home) resolves the dependency graph and writes harness files. When two plugins disagree, the one closest to what you applied wins; genuine ambiguity is an error you fix with an override. An **environment** fills in the values a plugin needs — model, permissions, tokens by reference. Secrets are never stored in a plugin.
206
+ HarnessTap keeps one library of **resources**: skills, rules, MCP servers, hooks, agents, commands. You group them into **plugins**. `ht apply <plugin>` (project) or `ht profile use <plugin>` (home) resolves the dependency graph and writes harness files. When two plugins disagree, the one closest to what you applied wins; genuine ambiguity is an error you fix with an override. An **environment** fills in the values a plugin needs: model, permissions, tokens by reference. Secrets are never stored in a plugin.
207
207
 
208
208
  | Concept | Role |
209
209
  | --- | --- |
210
210
  | **Resource** | Atomic instruction, skill, rule, MCP, hook, etc. |
211
211
  | **Plugin** | Versioned package of resources, optional dependencies, and a `needs` contract |
212
- | **Environment** | Named *how* values (and secret refs) — prod, staging, personal |
212
+ | **Environment** | Named *how* values (and secret refs): prod, staging, personal |
213
213
  | **Profile** | A plugin tagged for machine-wide switching (`ht work`, `profile use`) |
214
214
  | **Workspace** | Local library at `~/.harnesstap` |
215
215
 
@@ -256,7 +256,7 @@ flowchart TB
256
256
 
257
257
  ## Catalog and Cloud
258
258
 
259
- Starter plugins such as `engineering-foundation` live in the **HarnessTap Cloud** public catalog — not inside the npm package. Bare names on `ht apply` resolve against that catalog (and any orgs you have connected).
259
+ Starter plugins such as `engineering-foundation` live in the **HarnessTap Cloud** public catalog: not inside the npm package. Bare names on `ht apply` resolve against that catalog (and any orgs you have connected).
260
260
 
261
261
  ```bash
262
262
  ht plugin list --search foundation --remote-only
@@ -269,8 +269,12 @@ ht plugin publish my-setup
269
269
 
270
270
  To opt out of anonymous public catalog lookups, set `catalog.publicCatalog: false` in `~/.harnesstap/config.jsonc` or export `HARNESSTAP_PUBLIC_CATALOG=0`.
271
271
 
272
+ CLI and Desktop can send anonymous product analytics (install, Cloud connect, plugin apply) to the HarnessTap EU PostHog project after you opt in. Desktop asks on first start. CLI prints a one-time warning with `HARNESSTAP_TELEMETRY=0` / `"telemetry": { "enabled": false }` disable instructions (and how to enable). Details: [Telemetry](docs/telemetry.md).
273
+
272
274
  Auth, orgs, pull, and publish: [HarnessTap Cloud](docs/cli/cloud.md).
273
275
 
276
+ Private GitHub marketplaces: `ht github login`.
277
+
274
278
  ---
275
279
 
276
280
  ## Supported harnesses
@@ -278,10 +282,19 @@ Auth, orgs, pull, and publish: [HarnessTap Cloud](docs/cli/cloud.md).
278
282
  ```bash
279
283
  ht harness list
280
284
  ht harness list --supported # native serializers only
281
- ht harness set --main claude-code --aliases cursor,codex
285
+ ht harness set --harnesses claude-code,cursor,codex
282
286
  ```
283
287
 
284
- See the full matrix — resource types, skill emission, plugin support, and paths — in **[Supported harnesses](docs/supported-harnesses.md)**.
288
+ See the full matrix (resource types, skill emission, plugin support, and paths) in **[Supported harnesses](docs/supported-harnesses.md)**.
289
+
290
+ Warp and Jules share the generic `.agents/skills/` / `AGENTS.md` layout with many other harnesses. A plain `~/.agents` directory is not evidence that either is installed.
291
+
292
+ | Harness | Distinctive markers |
293
+ | ------- | ------------------- |
294
+ | **warp** | `~/.warp` (home), `.warp/` (project) |
295
+ | **jules** | `~/.jules` or `~/JULES.md` (home), `JULES.md` (project) |
296
+
297
+ Skills and instructions still emit to the shared `.agents` paths when those harnesses are registered. Detection and apply targeting stay separate: global apply uses the registered set, not filesystem guesses.
285
298
 
286
299
  ---
287
300
 
@@ -291,15 +304,19 @@ Operational state lives in `~/.harnesstap/harnesstap.db` (resources, plugins, en
291
304
 
292
305
  Override the base directory with `HARNESSTAP_HOME`.
293
306
 
307
+ Anonymous telemetry state (distinct id and first-run stamps) lives in `~/.harnesstap/telemetry-state.json`. See [Telemetry](docs/telemetry.md).
308
+
294
309
  `ht init` also checks registered home folders (e.g. `~/.claude/`, `~/.codex/`) and imports supported resources it finds.
295
310
 
296
- Move a library between machines with `ht migrate export` / `import`. Older databases that cannot upgrade in place still open read-only for export — see [machine migration](docs/scenarios/details/28-machine-migration.md).
311
+ Move a library between machines with `ht migrate export` / `import`. Older databases that cannot upgrade in place still open read-only for export: see [machine migration](docs/scenarios/details/28-machine-migration.md).
312
+
313
+ GitHub session: `~/.harnesstap/github-session.json`.
297
314
 
298
315
  ---
299
316
 
300
317
  ## Next steps
301
318
 
302
- | I want to… | Start here |
319
+ | I want to... | Start here |
303
320
  | --- | --- |
304
321
  | Learn every command | [CLI reference](docs/cli/command-reference.md) |
305
322
  | Compose, doctor, or diff plugins | [Plugin concepts](docs/cli/concepts/plugins.md) · `ht plugin doctor` · `ht plugin from-project` |
@@ -0,0 +1,67 @@
1
+ import {
2
+ handleApplyCommand,
3
+ handleInstallCommand,
4
+ registerApplyCommand,
5
+ registerInstallCommand
6
+ } from "./chunk-WMYTBJPB.js";
7
+ import "./chunk-VFHVXXP4.js";
8
+ import "./chunk-3PGC6OA3.js";
9
+ import "./chunk-T5VRREN4.js";
10
+ import "./chunk-EMTBGOR3.js";
11
+ import "./chunk-QIVE2YFJ.js";
12
+ import "./chunk-MK3Q37ZN.js";
13
+ import "./chunk-PMQ55GDB.js";
14
+ import "./chunk-QKXD3EUF.js";
15
+ import "./chunk-AOUDSNRK.js";
16
+ import "./chunk-V4IXIM3C.js";
17
+ import "./chunk-UYRK2H24.js";
18
+ import "./chunk-VZQG2JDV.js";
19
+ import "./chunk-4IHKBIY3.js";
20
+ import "./chunk-4ZUBRLSP.js";
21
+ import "./chunk-DJ6FN6EW.js";
22
+ import "./chunk-KRI4R7EM.js";
23
+ import "./chunk-YSXRBUR4.js";
24
+ import "./chunk-6P5IO4BX.js";
25
+ import "./chunk-BNDJJAEI.js";
26
+ import "./chunk-S2E4SSQV.js";
27
+ import "./chunk-XGTTOO4R.js";
28
+ import "./chunk-37E5M4JX.js";
29
+ import "./chunk-JQOKQKQT.js";
30
+ import "./chunk-3FIWOI3H.js";
31
+ import "./chunk-CHQGE2HF.js";
32
+ import "./chunk-37LQQWMF.js";
33
+ import "./chunk-WNLFNCOH.js";
34
+ import "./chunk-E5QXNU3K.js";
35
+ import "./chunk-NAGAJ5UM.js";
36
+ import "./chunk-N3WIJXXM.js";
37
+ import "./chunk-TNJPTUE4.js";
38
+ import "./chunk-KDUQMINL.js";
39
+ import "./chunk-2NE3QYMP.js";
40
+ import "./chunk-MSGAGV7B.js";
41
+ import "./chunk-I6XFZLTJ.js";
42
+ import "./chunk-W7HQ5X3S.js";
43
+ import "./chunk-JRFUTIEH.js";
44
+ import "./chunk-PFUK3HJ4.js";
45
+ import "./chunk-WRX7CB2M.js";
46
+ import "./chunk-IHZUYG66.js";
47
+ import "./chunk-E4WRTRMH.js";
48
+ import "./chunk-MZQRSERO.js";
49
+ import "./chunk-DEJLP7QJ.js";
50
+ import "./chunk-TKBMHZTS.js";
51
+ import "./chunk-TXXDMDPN.js";
52
+ import "./chunk-C2IWSFF5.js";
53
+ import "./chunk-NPO2IG6G.js";
54
+ import "./chunk-5TXI6BI2.js";
55
+ import "./chunk-TQ2NA4Z4.js";
56
+ import "./chunk-NFYPBTKO.js";
57
+ import "./chunk-ABXUKHAU.js";
58
+ import "./chunk-2P2EOYEW.js";
59
+ import "./chunk-VQVUJYYY.js";
60
+ import "./chunk-KLR2DURP.js";
61
+ export {
62
+ handleApplyCommand,
63
+ handleInstallCommand,
64
+ registerApplyCommand,
65
+ registerInstallCommand
66
+ };
67
+ //# sourceMappingURL=apply-QSS4242W.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,181 @@
1
+ import {
2
+ buildExecutableTrustContext,
3
+ formatApproveRemedy,
4
+ installedTrustReports,
5
+ pendingRefs,
6
+ recommendRefs,
7
+ writeProjectExecutableGrant,
8
+ writeUserExecutableGrant
9
+ } from "./chunk-IHZUYG66.js";
10
+ import "./chunk-E4WRTRMH.js";
11
+ import {
12
+ readLockfile
13
+ } from "./chunk-MZQRSERO.js";
14
+ import "./chunk-DEJLP7QJ.js";
15
+ import "./chunk-TKBMHZTS.js";
16
+ import "./chunk-TXXDMDPN.js";
17
+ import "./chunk-C2IWSFF5.js";
18
+ import {
19
+ parseOutputFormat,
20
+ printJson
21
+ } from "./chunk-TQ2NA4Z4.js";
22
+ import {
23
+ fail,
24
+ formatCommand
25
+ } from "./chunk-NFYPBTKO.js";
26
+ import {
27
+ ui
28
+ } from "./chunk-ABXUKHAU.js";
29
+ import "./chunk-2P2EOYEW.js";
30
+ import "./chunk-VQVUJYYY.js";
31
+ import "./chunk-KLR2DURP.js";
32
+
33
+ // src/cli/commands/approve.ts
34
+ import { resolve } from "path";
35
+ function layerLabel(report) {
36
+ const deciding = report.decisions.filter((decision) => report.gatedTypes.includes(decision.type)).map((decision) => decision.layer);
37
+ return deciding[0] ?? "none";
38
+ }
39
+ function printReports(reports) {
40
+ if (reports.length === 0) {
41
+ ui.info("No installed dependency packages");
42
+ return;
43
+ }
44
+ for (const report of reports) {
45
+ const types = report.gatedTypes.length > 0 ? report.gatedTypes.join(", ") : "none";
46
+ ui.info(
47
+ `${report.ref} ${report.execStatus} ${types} layer ${layerLabel(report)}`
48
+ );
49
+ }
50
+ }
51
+ function exclusiveFlags(opts) {
52
+ return [
53
+ opts.pending ? "--pending" : void 0,
54
+ opts.all ? "--all" : void 0,
55
+ opts.recommended ? "--recommended" : void 0,
56
+ opts.list ? "--list" : void 0
57
+ ].filter((value) => value !== void 0);
58
+ }
59
+ function handleApproveCommand(refs, opts) {
60
+ const format = parseOutputFormat(opts.format);
61
+ const projectRoot = resolve(opts.project ?? ".");
62
+ const flags = exclusiveFlags(opts);
63
+ if (flags.length > 1) {
64
+ process.exitCode = 1;
65
+ fail(`Use only one of ${flags.join(", ")}`);
66
+ return;
67
+ }
68
+ const context = buildExecutableTrustContext({ projectRoot });
69
+ const lock = readLockfile(projectRoot);
70
+ const reports = installedTrustReports(context, { ...lock ? { lock } : {} });
71
+ if (opts.list) {
72
+ if (format === "json") {
73
+ printJson({ packages: reports });
74
+ return;
75
+ }
76
+ printReports(reports);
77
+ return;
78
+ }
79
+ if (opts.pending) {
80
+ const pending = reports.filter((report) => report.execStatus === "gated_pending_approval");
81
+ if (format === "json") {
82
+ printJson({ pending: pending.map((report) => report.ref) });
83
+ return;
84
+ }
85
+ if (pending.length === 0) {
86
+ ui.success("No packages awaiting approval");
87
+ return;
88
+ }
89
+ for (const report of pending) {
90
+ ui.info(`${report.ref} ${report.gatedTypes.join(", ")}`);
91
+ }
92
+ ui.hint(formatApproveRemedy(pending.map((report) => report.ref)));
93
+ return;
94
+ }
95
+ let targets = refs;
96
+ if (opts.all) {
97
+ targets = pendingRefs(reports);
98
+ if (targets.length === 0) {
99
+ ui.success("No packages awaiting approval");
100
+ return;
101
+ }
102
+ } else if (opts.recommended) {
103
+ targets = recommendRefs(context.org);
104
+ if (targets.length === 0) {
105
+ ui.info("No org-recommended packages");
106
+ return;
107
+ }
108
+ }
109
+ if (targets.length === 0) {
110
+ process.exitCode = 1;
111
+ fail("Provide a package ref, or use --pending, --all, --recommended, or --list", {
112
+ hints: [formatCommand("approve --pending"), formatCommand("approve owner/repo")]
113
+ });
114
+ return;
115
+ }
116
+ if (opts.user) {
117
+ writeUserExecutableGrant({ side: "allow", refs: targets });
118
+ } else {
119
+ writeProjectExecutableGrant({ projectRoot, side: "allow", refs: targets });
120
+ }
121
+ if (format === "json") {
122
+ printJson({
123
+ written: opts.user ? "user" : "project",
124
+ side: "allow",
125
+ refs: targets
126
+ });
127
+ return;
128
+ }
129
+ ui.success(
130
+ `Approved ${targets.join(", ")} in ${opts.user ? "~/.harnesstap/config.jsonc" : "apm.yml"}`
131
+ );
132
+ }
133
+ function registerApproveCommand(root) {
134
+ root.command("approve").description("Approve executable primitives from dependency packages").argument("[PACKAGE_REF...]", "Packages to approve (owner/repo)").option("--project <path>", "Project directory", ".").option("--user", "Write ~/.harnesstap/config.jsonc instead of apm.yml").option("--pending", "List packages with unapproved executables").option("--all", "Approve all currently pending packages").option("--recommended", "Approve the org executables.recommend set").option("--list", "Show effective trust decision per installed package").option("--format <mode>", "Output format: human or json", "human").action((refs, opts) => {
135
+ handleApproveCommand(refs, opts);
136
+ });
137
+ }
138
+ function handleDenyCommand(refs, opts) {
139
+ const format = parseOutputFormat(opts.format);
140
+ const projectRoot = resolve(opts.project ?? ".");
141
+ if (opts.pending || opts.all || opts.recommended || opts.list) {
142
+ process.exitCode = 1;
143
+ fail("ht deny writes a deny grant; use ht approve --pending/--list to inspect");
144
+ return;
145
+ }
146
+ if (refs.length === 0) {
147
+ process.exitCode = 1;
148
+ fail("Provide one or more package refs to deny", {
149
+ hints: [formatCommand("deny owner/repo"), formatCommand("deny --user owner/repo")]
150
+ });
151
+ return;
152
+ }
153
+ if (opts.user) {
154
+ writeUserExecutableGrant({ side: "deny", refs });
155
+ } else {
156
+ writeProjectExecutableGrant({ projectRoot, side: "deny", refs });
157
+ }
158
+ if (format === "json") {
159
+ printJson({
160
+ written: opts.user ? "user" : "project",
161
+ side: "deny",
162
+ refs
163
+ });
164
+ return;
165
+ }
166
+ ui.success(
167
+ `Denied ${refs.join(", ")} in ${opts.user ? "~/.harnesstap/config.jsonc" : "apm.yml"}`
168
+ );
169
+ }
170
+ function registerDenyCommand(root) {
171
+ root.command("deny").description("Deny executable primitives from dependency packages").argument("[PACKAGE_REF...]", "Packages to deny (owner/repo)").option("--project <path>", "Project directory", ".").option("--user", "Write ~/.harnesstap/config.jsonc instead of apm.yml").option("--format <mode>", "Output format: human or json", "human").action((refs, opts) => {
172
+ handleDenyCommand(refs, opts);
173
+ });
174
+ }
175
+ export {
176
+ handleApproveCommand,
177
+ handleDenyCommand,
178
+ registerApproveCommand,
179
+ registerDenyCommand
180
+ };
181
+ //# sourceMappingURL=approve-CNYQY6DC.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/cli/commands/approve.ts"],"sourcesContent":["import type { Command } from \"commander\";\nimport { resolve } from \"node:path\";\nimport {\n buildExecutableTrustContext,\n formatApproveRemedy,\n installedTrustReports,\n pendingRefs,\n recommendRefs,\n writeProjectExecutableGrant,\n writeUserExecutableGrant,\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\";\nimport {\n fail,\n formatCommand,\n} from \"../shared.js\";\n\nexport interface ApproveCommandOpts {\n project?: string;\n user?: boolean;\n pending?: boolean;\n all?: boolean;\n recommended?: boolean;\n list?: boolean;\n format?: string;\n}\n\nfunction layerLabel(report: PackageTrustReport): string {\n const deciding = report.decisions\n .filter((decision) => report.gatedTypes.includes(decision.type))\n .map((decision) => decision.layer);\n return deciding[0] ?? \"none\";\n}\n\nfunction printReports(reports: PackageTrustReport[]): void {\n if (reports.length === 0) {\n ui.info(\"No installed dependency packages\");\n return;\n }\n for (const report of reports) {\n const types = report.gatedTypes.length > 0 ? report.gatedTypes.join(\", \") : \"none\";\n ui.info(\n `${report.ref} ${report.execStatus} ${types} layer ${layerLabel(report)}`,\n );\n }\n}\n\nfunction exclusiveFlags(opts: ApproveCommandOpts): string[] {\n return [\n opts.pending ? \"--pending\" : undefined,\n opts.all ? \"--all\" : undefined,\n opts.recommended ? \"--recommended\" : undefined,\n opts.list ? \"--list\" : undefined,\n ].filter((value): value is string => value !== undefined);\n}\n\nexport function handleApproveCommand(refs: string[], opts: ApproveCommandOpts): void {\n const format = parseOutputFormat(opts.format);\n const projectRoot = resolve(opts.project ?? \".\");\n const flags = exclusiveFlags(opts);\n if (flags.length > 1) {\n process.exitCode = 1;\n fail(`Use only one of ${flags.join(\", \")}`);\n return;\n }\n\n const context = buildExecutableTrustContext({ projectRoot });\n const lock = readLockfile(projectRoot);\n const reports = installedTrustReports(context, { ...(lock ? { lock } : {}) });\n\n if (opts.list) {\n if (format === \"json\") {\n printJson({ packages: reports });\n return;\n }\n printReports(reports);\n return;\n }\n\n if (opts.pending) {\n const pending = reports.filter((report) => report.execStatus === \"gated_pending_approval\");\n if (format === \"json\") {\n printJson({ pending: pending.map((report) => report.ref) });\n return;\n }\n if (pending.length === 0) {\n ui.success(\"No packages awaiting approval\");\n return;\n }\n for (const report of pending) {\n ui.info(`${report.ref} ${report.gatedTypes.join(\", \")}`);\n }\n ui.hint(formatApproveRemedy(pending.map((report) => report.ref)));\n return;\n }\n\n let targets = refs;\n if (opts.all) {\n targets = pendingRefs(reports);\n if (targets.length === 0) {\n ui.success(\"No packages awaiting approval\");\n return;\n }\n } else if (opts.recommended) {\n targets = recommendRefs(context.org);\n if (targets.length === 0) {\n ui.info(\"No org-recommended packages\");\n return;\n }\n }\n\n if (targets.length === 0) {\n process.exitCode = 1;\n fail(\"Provide a package ref, or use --pending, --all, --recommended, or --list\", {\n hints: [formatCommand(\"approve --pending\"), formatCommand(\"approve owner/repo\")],\n });\n return;\n }\n\n if (opts.user) {\n writeUserExecutableGrant({ side: \"allow\", refs: targets });\n } else {\n writeProjectExecutableGrant({ projectRoot, side: \"allow\", refs: targets });\n }\n\n if (format === \"json\") {\n printJson({\n written: opts.user ? \"user\" : \"project\",\n side: \"allow\",\n refs: targets,\n });\n return;\n }\n ui.success(\n `Approved ${targets.join(\", \")} in ${opts.user ? \"~/.harnesstap/config.jsonc\" : \"apm.yml\"}`,\n );\n}\n\nexport function registerApproveCommand(root: Command): void {\n root\n .command(\"approve\")\n .description(\"Approve executable primitives from dependency packages\")\n .argument(\"[PACKAGE_REF...]\", \"Packages to approve (owner/repo)\")\n .option(\"--project <path>\", \"Project directory\", \".\")\n .option(\"--user\", \"Write ~/.harnesstap/config.jsonc instead of apm.yml\")\n .option(\"--pending\", \"List packages with unapproved executables\")\n .option(\"--all\", \"Approve all currently pending packages\")\n .option(\"--recommended\", \"Approve the org executables.recommend set\")\n .option(\"--list\", \"Show effective trust decision per installed package\")\n .option(\"--format <mode>\", \"Output format: human or json\", \"human\")\n .action((refs: string[], opts: ApproveCommandOpts) => {\n handleApproveCommand(refs, opts);\n });\n}\n\nexport function handleDenyCommand(refs: string[], opts: ApproveCommandOpts): void {\n const format = parseOutputFormat(opts.format);\n const projectRoot = resolve(opts.project ?? \".\");\n if (opts.pending || opts.all || opts.recommended || opts.list) {\n process.exitCode = 1;\n fail(\"ht deny writes a deny grant; use ht approve --pending/--list to inspect\");\n return;\n }\n if (refs.length === 0) {\n process.exitCode = 1;\n fail(\"Provide one or more package refs to deny\", {\n hints: [formatCommand(\"deny owner/repo\"), formatCommand(\"deny --user owner/repo\")],\n });\n return;\n }\n\n if (opts.user) {\n writeUserExecutableGrant({ side: \"deny\", refs });\n } else {\n writeProjectExecutableGrant({ projectRoot, side: \"deny\", refs });\n }\n\n if (format === \"json\") {\n printJson({\n written: opts.user ? \"user\" : \"project\",\n side: \"deny\",\n refs,\n });\n return;\n }\n ui.success(\n `Denied ${refs.join(\", \")} in ${opts.user ? \"~/.harnesstap/config.jsonc\" : \"apm.yml\"}`,\n );\n}\n\nexport function registerDenyCommand(root: Command): void {\n root\n .command(\"deny\")\n .description(\"Deny executable primitives from dependency packages\")\n .argument(\"[PACKAGE_REF...]\", \"Packages to deny (owner/repo)\")\n .option(\"--project <path>\", \"Project directory\", \".\")\n .option(\"--user\", \"Write ~/.harnesstap/config.jsonc instead of apm.yml\")\n .option(\"--format <mode>\", \"Output format: human or json\", \"human\")\n .action((refs: string[], opts: ApproveCommandOpts) => {\n handleDenyCommand(refs, opts);\n });\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,SAAS,eAAe;AA6BxB,SAAS,WAAW,QAAoC;AACtD,QAAM,WAAW,OAAO,UACrB,OAAO,CAAC,aAAa,OAAO,WAAW,SAAS,SAAS,IAAI,CAAC,EAC9D,IAAI,CAAC,aAAa,SAAS,KAAK;AACnC,SAAO,SAAS,CAAC,KAAK;AACxB;AAEA,SAAS,aAAa,SAAqC;AACzD,MAAI,QAAQ,WAAW,GAAG;AACxB,OAAG,KAAK,kCAAkC;AAC1C;AAAA,EACF;AACA,aAAW,UAAU,SAAS;AAC5B,UAAM,QAAQ,OAAO,WAAW,SAAS,IAAI,OAAO,WAAW,KAAK,IAAI,IAAI;AAC5E,OAAG;AAAA,MACD,GAAG,OAAO,GAAG,KAAK,OAAO,UAAU,KAAK,KAAK,WAAW,WAAW,MAAM,CAAC;AAAA,IAC5E;AAAA,EACF;AACF;AAEA,SAAS,eAAe,MAAoC;AAC1D,SAAO;AAAA,IACL,KAAK,UAAU,cAAc;AAAA,IAC7B,KAAK,MAAM,UAAU;AAAA,IACrB,KAAK,cAAc,kBAA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