@skillsmith/core 0.9.0 → 0.11.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 (404) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/dist/.tsbuildinfo +1 -1
  3. package/dist/src/analysis/tree-sitter/pythonIncremental.d.ts +23 -0
  4. package/dist/src/analysis/tree-sitter/pythonIncremental.d.ts.map +1 -1
  5. package/dist/src/analysis/tree-sitter/pythonIncremental.hardening.test.js +137 -0
  6. package/dist/src/analysis/tree-sitter/pythonIncremental.hardening.test.js.map +1 -1
  7. package/dist/src/analysis/tree-sitter/pythonIncremental.js +83 -10
  8. package/dist/src/analysis/tree-sitter/pythonIncremental.js.map +1 -1
  9. package/dist/src/analysis/tree-sitter/queryExtractionMatchesOrExceedsRegex.test.js +6 -1
  10. package/dist/src/analysis/tree-sitter/queryExtractionMatchesOrExceedsRegex.test.js.map +1 -1
  11. package/dist/src/api/client.d.ts.map +1 -1
  12. package/dist/src/api/client.js +6 -0
  13. package/dist/src/api/client.js.map +1 -1
  14. package/dist/src/api/client.test.d.ts +9 -0
  15. package/dist/src/api/client.test.d.ts.map +1 -0
  16. package/dist/src/api/client.test.js +81 -0
  17. package/dist/src/api/client.test.js.map +1 -0
  18. package/dist/src/config/audit-notify-state.d.ts +46 -0
  19. package/dist/src/config/audit-notify-state.d.ts.map +1 -0
  20. package/dist/src/config/audit-notify-state.js +55 -0
  21. package/dist/src/config/audit-notify-state.js.map +1 -0
  22. package/dist/src/config/audit-notify-state.test.d.ts +9 -0
  23. package/dist/src/config/audit-notify-state.test.d.ts.map +1 -0
  24. package/dist/src/config/audit-notify-state.test.js +63 -0
  25. package/dist/src/config/audit-notify-state.test.js.map +1 -0
  26. package/dist/src/config/index.d.ts +10 -0
  27. package/dist/src/config/index.d.ts.map +1 -1
  28. package/dist/src/config/index.js.map +1 -1
  29. package/dist/src/exports/services.d.ts +3 -1
  30. package/dist/src/exports/services.d.ts.map +1 -1
  31. package/dist/src/exports/services.js +9 -1
  32. package/dist/src/exports/services.js.map +1 -1
  33. package/dist/src/index.d.ts +6 -3
  34. package/dist/src/index.d.ts.map +1 -1
  35. package/dist/src/index.js +11 -2
  36. package/dist/src/index.js.map +1 -1
  37. package/dist/src/install/agent-config-merge.json-array.d.ts +29 -0
  38. package/dist/src/install/agent-config-merge.json-array.d.ts.map +1 -0
  39. package/dist/src/install/agent-config-merge.json-array.js +100 -0
  40. package/dist/src/install/agent-config-merge.json-array.js.map +1 -0
  41. package/dist/src/install/agent-config-merge.json.d.ts +37 -0
  42. package/dist/src/install/agent-config-merge.json.d.ts.map +1 -0
  43. package/dist/src/install/agent-config-merge.json.js +134 -0
  44. package/dist/src/install/agent-config-merge.json.js.map +1 -0
  45. package/dist/src/install/agent-config-merge.toml-block.d.ts +48 -0
  46. package/dist/src/install/agent-config-merge.toml-block.d.ts.map +1 -0
  47. package/dist/src/install/agent-config-merge.toml-block.js +107 -0
  48. package/dist/src/install/agent-config-merge.toml-block.js.map +1 -0
  49. package/dist/src/install/agent-config-merge.types.d.ts +87 -0
  50. package/dist/src/install/agent-config-merge.types.d.ts.map +1 -0
  51. package/dist/src/install/agent-config-merge.types.js +83 -0
  52. package/dist/src/install/agent-config-merge.types.js.map +1 -0
  53. package/dist/src/install/agent-config-merge.yaml.d.ts +46 -0
  54. package/dist/src/install/agent-config-merge.yaml.d.ts.map +1 -0
  55. package/dist/src/install/agent-config-merge.yaml.js +133 -0
  56. package/dist/src/install/agent-config-merge.yaml.js.map +1 -0
  57. package/dist/src/install/agent-config-merge.yaml.test.d.ts +2 -0
  58. package/dist/src/install/agent-config-merge.yaml.test.d.ts.map +1 -0
  59. package/dist/src/install/agent-config-merge.yaml.test.js +210 -0
  60. package/dist/src/install/agent-config-merge.yaml.test.js.map +1 -0
  61. package/dist/src/install/agent-harness-targets.d.ts +98 -0
  62. package/dist/src/install/agent-harness-targets.d.ts.map +1 -0
  63. package/dist/src/install/agent-harness-targets.js +154 -0
  64. package/dist/src/install/agent-harness-targets.js.map +1 -0
  65. package/dist/src/install/agent-home-relocate.d.ts +29 -0
  66. package/dist/src/install/agent-home-relocate.d.ts.map +1 -0
  67. package/dist/src/install/agent-home-relocate.js +38 -0
  68. package/dist/src/install/agent-home-relocate.js.map +1 -0
  69. package/dist/src/install/agent-manifest-path-guard.d.ts +55 -0
  70. package/dist/src/install/agent-manifest-path-guard.d.ts.map +1 -0
  71. package/dist/src/install/agent-manifest-path-guard.js +109 -0
  72. package/dist/src/install/agent-manifest-path-guard.js.map +1 -0
  73. package/dist/src/install/agent-manifest-path-guard.test.d.ts +2 -0
  74. package/dist/src/install/agent-manifest-path-guard.test.d.ts.map +1 -0
  75. package/dist/src/install/agent-manifest-path-guard.test.js +72 -0
  76. package/dist/src/install/agent-manifest-path-guard.test.js.map +1 -0
  77. package/dist/src/install/agent-manifest.d.ts +58 -0
  78. package/dist/src/install/agent-manifest.d.ts.map +1 -0
  79. package/dist/src/install/agent-manifest.js +103 -0
  80. package/dist/src/install/agent-manifest.js.map +1 -0
  81. package/dist/src/install/agent-pack-installer.d.ts +39 -0
  82. package/dist/src/install/agent-pack-installer.d.ts.map +1 -0
  83. package/dist/src/install/agent-pack-installer.entry.d.ts +55 -0
  84. package/dist/src/install/agent-pack-installer.entry.d.ts.map +1 -0
  85. package/dist/src/install/agent-pack-installer.entry.js +90 -0
  86. package/dist/src/install/agent-pack-installer.entry.js.map +1 -0
  87. package/dist/src/install/agent-pack-installer.fs-helpers.d.ts +33 -0
  88. package/dist/src/install/agent-pack-installer.fs-helpers.d.ts.map +1 -0
  89. package/dist/src/install/agent-pack-installer.fs-helpers.js +59 -0
  90. package/dist/src/install/agent-pack-installer.fs-helpers.js.map +1 -0
  91. package/dist/src/install/agent-pack-installer.harness.d.ts +66 -0
  92. package/dist/src/install/agent-pack-installer.harness.d.ts.map +1 -0
  93. package/dist/src/install/agent-pack-installer.harness.js +310 -0
  94. package/dist/src/install/agent-pack-installer.harness.js.map +1 -0
  95. package/dist/src/install/agent-pack-installer.js +221 -0
  96. package/dist/src/install/agent-pack-installer.js.map +1 -0
  97. package/dist/src/install/agent-pack-installer.preserve.test.d.ts +11 -0
  98. package/dist/src/install/agent-pack-installer.preserve.test.d.ts.map +1 -0
  99. package/dist/src/install/agent-pack-installer.preserve.test.js +72 -0
  100. package/dist/src/install/agent-pack-installer.preserve.test.js.map +1 -0
  101. package/dist/src/install/agent-pack-installer.test.d.ts +2 -0
  102. package/dist/src/install/agent-pack-installer.test.d.ts.map +1 -0
  103. package/dist/src/install/agent-pack-installer.test.js +350 -0
  104. package/dist/src/install/agent-pack-installer.test.js.map +1 -0
  105. package/dist/src/install/agent-pack-installer.types.d.ts +51 -0
  106. package/dist/src/install/agent-pack-installer.types.d.ts.map +1 -0
  107. package/dist/src/install/agent-pack-installer.types.js +16 -0
  108. package/dist/src/install/agent-pack-installer.types.js.map +1 -0
  109. package/dist/src/install/agent-pack-uninstaller.d.ts +43 -0
  110. package/dist/src/install/agent-pack-uninstaller.d.ts.map +1 -0
  111. package/dist/src/install/agent-pack-uninstaller.js +113 -0
  112. package/dist/src/install/agent-pack-uninstaller.js.map +1 -0
  113. package/dist/src/install/agent-pack-uninstaller.test.d.ts +2 -0
  114. package/dist/src/install/agent-pack-uninstaller.test.d.ts.map +1 -0
  115. package/dist/src/install/agent-pack-uninstaller.test.js +212 -0
  116. package/dist/src/install/agent-pack-uninstaller.test.js.map +1 -0
  117. package/dist/src/install/index.d.ts +7 -0
  118. package/dist/src/install/index.d.ts.map +1 -1
  119. package/dist/src/install/index.js +7 -0
  120. package/dist/src/install/index.js.map +1 -1
  121. package/dist/src/install/paths.d.ts +1 -1
  122. package/dist/src/install/paths.d.ts.map +1 -1
  123. package/dist/src/install/paths.js +4 -0
  124. package/dist/src/install/paths.js.map +1 -1
  125. package/dist/src/install/paths.test.js +15 -0
  126. package/dist/src/install/paths.test.js.map +1 -1
  127. package/dist/src/journal/hash.d.ts +13 -0
  128. package/dist/src/journal/hash.d.ts.map +1 -0
  129. package/dist/src/journal/hash.js +16 -0
  130. package/dist/src/journal/hash.js.map +1 -0
  131. package/dist/src/journal/index.d.ts +15 -0
  132. package/dist/src/journal/index.d.ts.map +1 -0
  133. package/dist/src/journal/index.js +15 -0
  134. package/dist/src/journal/index.js.map +1 -0
  135. package/dist/src/journal/journal.test.d.ts +16 -0
  136. package/dist/src/journal/journal.test.d.ts.map +1 -0
  137. package/dist/src/journal/journal.test.js +171 -0
  138. package/dist/src/journal/journal.test.js.map +1 -0
  139. package/dist/src/journal/path.d.ts +44 -0
  140. package/dist/src/journal/path.d.ts.map +1 -0
  141. package/dist/src/journal/path.js +61 -0
  142. package/dist/src/journal/path.js.map +1 -0
  143. package/dist/src/journal/reader.d.ts +38 -0
  144. package/dist/src/journal/reader.d.ts.map +1 -0
  145. package/dist/src/journal/reader.js +93 -0
  146. package/dist/src/journal/reader.js.map +1 -0
  147. package/dist/src/journal/types.d.ts +87 -0
  148. package/dist/src/journal/types.d.ts.map +1 -0
  149. package/dist/src/journal/types.js +21 -0
  150. package/dist/src/journal/types.js.map +1 -0
  151. package/dist/src/journal/writer.d.ts +52 -0
  152. package/dist/src/journal/writer.d.ts.map +1 -0
  153. package/dist/src/journal/writer.js +125 -0
  154. package/dist/src/journal/writer.js.map +1 -0
  155. package/dist/src/logging/context.d.ts +58 -0
  156. package/dist/src/logging/context.d.ts.map +1 -0
  157. package/dist/src/logging/context.js +62 -0
  158. package/dist/src/logging/context.js.map +1 -0
  159. package/dist/src/logging/context.test.d.ts +14 -0
  160. package/dist/src/logging/context.test.d.ts.map +1 -0
  161. package/dist/src/logging/context.test.js +88 -0
  162. package/dist/src/logging/context.test.js.map +1 -0
  163. package/dist/src/logging/index.d.ts +13 -0
  164. package/dist/src/logging/index.d.ts.map +1 -0
  165. package/dist/src/logging/index.js +12 -0
  166. package/dist/src/logging/index.js.map +1 -0
  167. package/dist/src/logging/logger.d.ts +71 -0
  168. package/dist/src/logging/logger.d.ts.map +1 -0
  169. package/dist/src/logging/logger.js +264 -0
  170. package/dist/src/logging/logger.js.map +1 -0
  171. package/dist/src/logging/logger.test.d.ts +9 -0
  172. package/dist/src/logging/logger.test.d.ts.map +1 -0
  173. package/dist/src/logging/logger.test.js +320 -0
  174. package/dist/src/logging/logger.test.js.map +1 -0
  175. package/dist/src/logging/redact.d.ts +35 -0
  176. package/dist/src/logging/redact.d.ts.map +1 -0
  177. package/dist/src/logging/redact.js +152 -0
  178. package/dist/src/logging/redact.js.map +1 -0
  179. package/dist/src/logging/redact.test.d.ts +8 -0
  180. package/dist/src/logging/redact.test.d.ts.map +1 -0
  181. package/dist/src/logging/redact.test.js +330 -0
  182. package/dist/src/logging/redact.test.js.map +1 -0
  183. package/dist/src/logging/rotation.d.ts +75 -0
  184. package/dist/src/logging/rotation.d.ts.map +1 -0
  185. package/dist/src/logging/rotation.js +284 -0
  186. package/dist/src/logging/rotation.js.map +1 -0
  187. package/dist/src/logging/rotation.test.d.ts +11 -0
  188. package/dist/src/logging/rotation.test.d.ts.map +1 -0
  189. package/dist/src/logging/rotation.test.js +132 -0
  190. package/dist/src/logging/rotation.test.js.map +1 -0
  191. package/dist/src/logging/types.d.ts +69 -0
  192. package/dist/src/logging/types.d.ts.map +1 -0
  193. package/dist/src/logging/types.js +9 -0
  194. package/dist/src/logging/types.js.map +1 -0
  195. package/dist/src/paywall-triggers/index.d.ts +13 -0
  196. package/dist/src/paywall-triggers/index.d.ts.map +1 -0
  197. package/dist/src/paywall-triggers/index.js +13 -0
  198. package/dist/src/paywall-triggers/index.js.map +1 -0
  199. package/dist/src/paywall-triggers/path.d.ts +47 -0
  200. package/dist/src/paywall-triggers/path.d.ts.map +1 -0
  201. package/dist/src/paywall-triggers/path.js +73 -0
  202. package/dist/src/paywall-triggers/path.js.map +1 -0
  203. package/dist/src/paywall-triggers/store.d.ts +75 -0
  204. package/dist/src/paywall-triggers/store.d.ts.map +1 -0
  205. package/dist/src/paywall-triggers/store.js +122 -0
  206. package/dist/src/paywall-triggers/store.js.map +1 -0
  207. package/dist/src/paywall-triggers/store.test.d.ts +2 -0
  208. package/dist/src/paywall-triggers/store.test.d.ts.map +1 -0
  209. package/dist/src/paywall-triggers/store.test.js +121 -0
  210. package/dist/src/paywall-triggers/store.test.js.map +1 -0
  211. package/dist/src/paywall-triggers/types.d.ts +24 -0
  212. package/dist/src/paywall-triggers/types.d.ts.map +1 -0
  213. package/dist/src/paywall-triggers/types.js +13 -0
  214. package/dist/src/paywall-triggers/types.js.map +1 -0
  215. package/dist/src/security/index.d.ts +2 -0
  216. package/dist/src/security/index.d.ts.map +1 -1
  217. package/dist/src/security/index.js +4 -0
  218. package/dist/src/security/index.js.map +1 -1
  219. package/dist/src/security/scanner/SecurityScanner.compound.d.ts +13 -0
  220. package/dist/src/security/scanner/SecurityScanner.compound.d.ts.map +1 -0
  221. package/dist/src/security/scanner/SecurityScanner.compound.js +127 -0
  222. package/dist/src/security/scanner/SecurityScanner.compound.js.map +1 -0
  223. package/dist/src/security/scanner/SecurityScanner.d.ts.map +1 -1
  224. package/dist/src/security/scanner/SecurityScanner.hostile-update.d.ts +46 -0
  225. package/dist/src/security/scanner/SecurityScanner.hostile-update.d.ts.map +1 -0
  226. package/dist/src/security/scanner/SecurityScanner.hostile-update.js +209 -0
  227. package/dist/src/security/scanner/SecurityScanner.hostile-update.js.map +1 -0
  228. package/dist/src/security/scanner/SecurityScanner.js +10 -1
  229. package/dist/src/security/scanner/SecurityScanner.js.map +1 -1
  230. package/dist/src/security/scanner/SecurityScanner.pii.d.ts +23 -0
  231. package/dist/src/security/scanner/SecurityScanner.pii.d.ts.map +1 -0
  232. package/dist/src/security/scanner/SecurityScanner.pii.js +152 -0
  233. package/dist/src/security/scanner/SecurityScanner.pii.js.map +1 -0
  234. package/dist/src/security/scanner/SecurityScanner.scanners.d.ts +5 -12
  235. package/dist/src/security/scanner/SecurityScanner.scanners.d.ts.map +1 -1
  236. package/dist/src/security/scanner/SecurityScanner.scanners.js +63 -137
  237. package/dist/src/security/scanner/SecurityScanner.scanners.js.map +1 -1
  238. package/dist/src/security/scanner/index.d.ts +2 -1
  239. package/dist/src/security/scanner/index.d.ts.map +1 -1
  240. package/dist/src/security/scanner/index.js +2 -0
  241. package/dist/src/security/scanner/index.js.map +1 -1
  242. package/dist/src/security/scanner/patterns.d.ts +2 -0
  243. package/dist/src/security/scanner/patterns.d.ts.map +1 -1
  244. package/dist/src/security/scanner/patterns.js +79 -11
  245. package/dist/src/security/scanner/patterns.js.map +1 -1
  246. package/dist/src/security/scanner/types.d.ts +23 -0
  247. package/dist/src/security/scanner/types.d.ts.map +1 -1
  248. package/dist/src/services/agent-pack/agent-pack.test.d.ts +18 -0
  249. package/dist/src/services/agent-pack/agent-pack.test.d.ts.map +1 -0
  250. package/dist/src/services/agent-pack/agent-pack.test.js +344 -0
  251. package/dist/src/services/agent-pack/agent-pack.test.js.map +1 -0
  252. package/dist/src/services/agent-pack/hooks.d.ts +29 -0
  253. package/dist/src/services/agent-pack/hooks.d.ts.map +1 -0
  254. package/dist/src/services/agent-pack/hooks.js +139 -0
  255. package/dist/src/services/agent-pack/hooks.js.map +1 -0
  256. package/dist/src/services/agent-pack/index.d.ts +26 -0
  257. package/dist/src/services/agent-pack/index.d.ts.map +1 -0
  258. package/dist/src/services/agent-pack/index.js +109 -0
  259. package/dist/src/services/agent-pack/index.js.map +1 -0
  260. package/dist/src/services/agent-pack/prompt-source.d.ts +47 -0
  261. package/dist/src/services/agent-pack/prompt-source.d.ts.map +1 -0
  262. package/dist/src/services/agent-pack/prompt-source.js +182 -0
  263. package/dist/src/services/agent-pack/prompt-source.js.map +1 -0
  264. package/dist/src/services/agent-pack/shims.d.ts +40 -0
  265. package/dist/src/services/agent-pack/shims.d.ts.map +1 -0
  266. package/dist/src/services/agent-pack/shims.js +96 -0
  267. package/dist/src/services/agent-pack/shims.js.map +1 -0
  268. package/dist/src/services/agent-pack/skill-md.d.ts +35 -0
  269. package/dist/src/services/agent-pack/skill-md.d.ts.map +1 -0
  270. package/dist/src/services/agent-pack/skill-md.js +89 -0
  271. package/dist/src/services/agent-pack/skill-md.js.map +1 -0
  272. package/dist/src/services/agent-pack/types.d.ts +118 -0
  273. package/dist/src/services/agent-pack/types.d.ts.map +1 -0
  274. package/dist/src/services/agent-pack/types.js +61 -0
  275. package/dist/src/services/agent-pack/types.js.map +1 -0
  276. package/dist/src/services/agent-tool-profile.d.ts +59 -0
  277. package/dist/src/services/agent-tool-profile.d.ts.map +1 -0
  278. package/dist/src/services/agent-tool-profile.js +76 -0
  279. package/dist/src/services/agent-tool-profile.js.map +1 -0
  280. package/dist/src/services/agent-tool-profile.test.d.ts +2 -0
  281. package/dist/src/services/agent-tool-profile.test.d.ts.map +1 -0
  282. package/dist/src/services/agent-tool-profile.test.js +28 -0
  283. package/dist/src/services/agent-tool-profile.test.js.map +1 -0
  284. package/dist/src/services/bundled-sibling-scan.d.ts +111 -0
  285. package/dist/src/services/bundled-sibling-scan.d.ts.map +1 -0
  286. package/dist/src/services/bundled-sibling-scan.js +170 -0
  287. package/dist/src/services/bundled-sibling-scan.js.map +1 -0
  288. package/dist/src/services/skill-installation.io.d.ts +16 -5
  289. package/dist/src/services/skill-installation.io.d.ts.map +1 -1
  290. package/dist/src/services/skill-installation.io.js +63 -22
  291. package/dist/src/services/skill-installation.io.js.map +1 -1
  292. package/dist/src/services/skill-installation.policy.d.ts +96 -0
  293. package/dist/src/services/skill-installation.policy.d.ts.map +1 -0
  294. package/dist/src/services/skill-installation.policy.js +144 -0
  295. package/dist/src/services/skill-installation.policy.js.map +1 -0
  296. package/dist/src/services/skill-installation.service.d.ts.map +1 -1
  297. package/dist/src/services/skill-installation.service.js +9 -3
  298. package/dist/src/services/skill-installation.service.js.map +1 -1
  299. package/dist/src/sources/index.d.ts +1 -0
  300. package/dist/src/sources/index.d.ts.map +1 -1
  301. package/dist/src/sources/index.js +4 -0
  302. package/dist/src/sources/index.js.map +1 -1
  303. package/dist/src/sync/access-token.d.ts +27 -0
  304. package/dist/src/sync/access-token.d.ts.map +1 -0
  305. package/dist/src/sync/access-token.js +40 -0
  306. package/dist/src/sync/access-token.js.map +1 -0
  307. package/dist/src/sync/audit-notify-client.d.ts +83 -0
  308. package/dist/src/sync/audit-notify-client.d.ts.map +1 -0
  309. package/dist/src/sync/audit-notify-client.js +126 -0
  310. package/dist/src/sync/audit-notify-client.js.map +1 -0
  311. package/dist/src/sync/audit-notify-client.test.d.ts +14 -0
  312. package/dist/src/sync/audit-notify-client.test.d.ts.map +1 -0
  313. package/dist/src/sync/audit-notify-client.test.js +133 -0
  314. package/dist/src/sync/audit-notify-client.test.js.map +1 -0
  315. package/dist/src/sync/index.d.ts +2 -1
  316. package/dist/src/sync/index.d.ts.map +1 -1
  317. package/dist/src/sync/index.js +3 -1
  318. package/dist/src/sync/index.js.map +1 -1
  319. package/dist/src/sync/inventory-client.d.ts +16 -0
  320. package/dist/src/sync/inventory-client.d.ts.map +1 -1
  321. package/dist/src/sync/inventory-client.js +59 -16
  322. package/dist/src/sync/inventory-client.js.map +1 -1
  323. package/dist/src/sync/inventory-client.test.js +67 -1
  324. package/dist/src/sync/inventory-client.test.js.map +1 -1
  325. package/dist/src/sync/inventory-collector.d.ts.map +1 -1
  326. package/dist/src/sync/inventory-collector.js +32 -5
  327. package/dist/src/sync/inventory-collector.js.map +1 -1
  328. package/dist/src/sync/inventory-collector.test.js +50 -1
  329. package/dist/src/sync/inventory-collector.test.js.map +1 -1
  330. package/dist/src/sync/inventory-types.d.ts +9 -0
  331. package/dist/src/sync/inventory-types.d.ts.map +1 -1
  332. package/dist/src/sync/inventory-types.js +3 -0
  333. package/dist/src/sync/inventory-types.js.map +1 -1
  334. package/dist/src/telemetry/agent-marker.d.ts +137 -0
  335. package/dist/src/telemetry/agent-marker.d.ts.map +1 -0
  336. package/dist/src/telemetry/agent-marker.js +242 -0
  337. package/dist/src/telemetry/agent-marker.js.map +1 -0
  338. package/dist/src/telemetry/agent-marker.test.d.ts +13 -0
  339. package/dist/src/telemetry/agent-marker.test.d.ts.map +1 -0
  340. package/dist/src/telemetry/agent-marker.test.js +202 -0
  341. package/dist/src/telemetry/agent-marker.test.js.map +1 -0
  342. package/dist/src/telemetry/index.d.ts +2 -1
  343. package/dist/src/telemetry/index.d.ts.map +1 -1
  344. package/dist/src/telemetry/index.js +6 -1
  345. package/dist/src/telemetry/index.js.map +1 -1
  346. package/dist/src/telemetry/posthog.d.ts +25 -0
  347. package/dist/src/telemetry/posthog.d.ts.map +1 -1
  348. package/dist/src/telemetry/posthog.js +10 -1
  349. package/dist/src/telemetry/posthog.js.map +1 -1
  350. package/dist/src/telemetry/wrap.bench.js +5 -0
  351. package/dist/src/telemetry/wrap.bench.js.map +1 -1
  352. package/dist/src/telemetry/wrap.correlation.test.d.ts +20 -0
  353. package/dist/src/telemetry/wrap.correlation.test.d.ts.map +1 -0
  354. package/dist/src/telemetry/wrap.correlation.test.js +174 -0
  355. package/dist/src/telemetry/wrap.correlation.test.js.map +1 -0
  356. package/dist/src/telemetry/wrap.d.ts +28 -7
  357. package/dist/src/telemetry/wrap.d.ts.map +1 -1
  358. package/dist/src/telemetry/wrap.gate.test.d.ts +22 -0
  359. package/dist/src/telemetry/wrap.gate.test.d.ts.map +1 -0
  360. package/dist/src/telemetry/wrap.gate.test.js +202 -0
  361. package/dist/src/telemetry/wrap.gate.test.js.map +1 -0
  362. package/dist/src/telemetry/wrap.js +196 -52
  363. package/dist/src/telemetry/wrap.js.map +1 -1
  364. package/dist/src/telemetry/wrap.marker.test.d.ts +16 -0
  365. package/dist/src/telemetry/wrap.marker.test.d.ts.map +1 -0
  366. package/dist/src/telemetry/wrap.marker.test.js +190 -0
  367. package/dist/src/telemetry/wrap.marker.test.js.map +1 -0
  368. package/dist/src/telemetry/wrap.test.js +14 -0
  369. package/dist/src/telemetry/wrap.test.js.map +1 -1
  370. package/dist/src/types.d.ts +6 -0
  371. package/dist/src/types.d.ts.map +1 -1
  372. package/dist/tests/SecurityScanner.exec.test.js +60 -0
  373. package/dist/tests/SecurityScanner.exec.test.js.map +1 -1
  374. package/dist/tests/security/ContinuousSecurity.test.js +10 -4
  375. package/dist/tests/security/ContinuousSecurity.test.js.map +1 -1
  376. package/dist/tests/security/SecurityScanner.chmod-evasion.test.d.ts +2 -0
  377. package/dist/tests/security/SecurityScanner.chmod-evasion.test.d.ts.map +1 -0
  378. package/dist/tests/security/SecurityScanner.chmod-evasion.test.js +126 -0
  379. package/dist/tests/security/SecurityScanner.chmod-evasion.test.js.map +1 -0
  380. package/dist/tests/security/chmod-compound.test.d.ts +2 -0
  381. package/dist/tests/security/chmod-compound.test.d.ts.map +1 -0
  382. package/dist/tests/security/chmod-compound.test.js +188 -0
  383. package/dist/tests/security/chmod-compound.test.js.map +1 -0
  384. package/dist/tests/security/pii-detection.test.js +24 -0
  385. package/dist/tests/security/pii-detection.test.js.map +1 -1
  386. package/dist/tests/security/scanner-regression-guard.test.d.ts +23 -7
  387. package/dist/tests/security/scanner-regression-guard.test.d.ts.map +1 -1
  388. package/dist/tests/security/scanner-regression-guard.test.js +206 -12
  389. package/dist/tests/security/scanner-regression-guard.test.js.map +1 -1
  390. package/dist/tests/security/sensitive-path-fp.test.d.ts +2 -0
  391. package/dist/tests/security/sensitive-path-fp.test.d.ts.map +1 -0
  392. package/dist/tests/security/sensitive-path-fp.test.js +142 -0
  393. package/dist/tests/security/sensitive-path-fp.test.js.map +1 -0
  394. package/dist/tests/services/bundled-sibling-scan.test.d.ts +2 -0
  395. package/dist/tests/services/bundled-sibling-scan.test.d.ts.map +1 -0
  396. package/dist/tests/services/bundled-sibling-scan.test.js +139 -0
  397. package/dist/tests/services/bundled-sibling-scan.test.js.map +1 -0
  398. package/dist/tests/unit/services/skill-installation.io.test.js +166 -0
  399. package/dist/tests/unit/services/skill-installation.io.test.js.map +1 -1
  400. package/dist/tests/unit/services/skill-installation.policy.test.d.ts +8 -0
  401. package/dist/tests/unit/services/skill-installation.policy.test.d.ts.map +1 -0
  402. package/dist/tests/unit/services/skill-installation.policy.test.js +151 -0
  403. package/dist/tests/unit/services/skill-installation.policy.test.js.map +1 -0
  404. package/package.json +28 -3
@@ -0,0 +1,96 @@
1
+ /**
2
+ * A2-A5 renderers — the per-harness named-agent shims.
3
+ *
4
+ * Every shim carries the SAME four things and nothing else: the agent name, a
5
+ * one-line description, the curated tool references (the full profile passed
6
+ * in), and a pointer into the SKILL.md pack that holds the actual operating
7
+ * instructions. Shims are invocation sugar; they contain zero behavioral logic,
8
+ * so if a harness spec drifts it breaks the sugar, never the behavior (PRD §5.2
9
+ * risk f). The authoritative tool gating is server-side (the curated profile);
10
+ * a shim's tool list is a reference, not the enforcement point.
11
+ */
12
+ import { AGENT_PACK_DISPLAY_NAME, AGENT_PACK_SKILL_NAME } from './types.js';
13
+ /** Short one-liner for shim frontmatter (the SKILL.md carries the full one). ASCII only. */
14
+ export const SHIM_DESCRIPTION = 'Named entry point for the Skillsmith Agent: delegate keeping your agent skills current, auditing your inventory, and vetting skills before install. Operating instructions live in the Skillsmith Agent skill pack.';
15
+ /**
16
+ * The pointer body shared by every markdown shim. Plain prose, no runtime
17
+ * logic. `harnessLabel` names the surface for readers of the file only.
18
+ */
19
+ function pointerBody(harnessLabel) {
20
+ return [
21
+ `This file is the ${harnessLabel} named-agent shim for the ${AGENT_PACK_DISPLAY_NAME}.`,
22
+ '',
23
+ `It carries no behavior of its own. The agent's operating instructions are the ${AGENT_PACK_DISPLAY_NAME} skill pack: the SKILL.md installed as \`${AGENT_PACK_SKILL_NAME}\`. Follow that skill: diagnose in full for free, propose a batched plan, and change files only with per-changeset approval, with one-step undo.`,
24
+ '',
25
+ 'All capability, tier gating, and the safety split between diagnosing and changing files live in the Skillsmith MCP server, so they hold regardless of which runtime loaded this shim.',
26
+ ].join('\n');
27
+ }
28
+ /** Render a comma-separated tool reference line from the profile. */
29
+ function toolCsv(toolProfile) {
30
+ return toolProfile.join(', ');
31
+ }
32
+ /**
33
+ * A2 — Claude-format agent markdown (`.claude/agents/*.md`). Read natively by
34
+ * Claude Code, Cursor, and the Copilot VS Code surface.
35
+ */
36
+ export function renderClaudeShim(toolProfile) {
37
+ const frontmatter = [
38
+ '---',
39
+ `name: ${AGENT_PACK_SKILL_NAME}`,
40
+ `description: ${JSON.stringify(SHIM_DESCRIPTION)}`,
41
+ `tools: ${toolCsv(toolProfile)}`,
42
+ '---',
43
+ ].join('\n');
44
+ return `${frontmatter}\n\n${pointerBody('Claude-format')}\n`;
45
+ }
46
+ /**
47
+ * A5 — Copilot `.agent.md` (Copilot cloud-agent + CLI surfaces, which do not
48
+ * read `.claude/agents`).
49
+ */
50
+ export function renderCopilotShim(toolProfile) {
51
+ const frontmatter = [
52
+ '---',
53
+ `name: ${AGENT_PACK_SKILL_NAME}`,
54
+ `description: ${JSON.stringify(SHIM_DESCRIPTION)}`,
55
+ `tools: ${toolCsv(toolProfile)}`,
56
+ '---',
57
+ ].join('\n');
58
+ return `${frontmatter}\n\n${pointerBody('Copilot')}\n`;
59
+ }
60
+ /**
61
+ * A4 — OpenCode agent markdown (OpenCode's own format).
62
+ *
63
+ * OpenCode's frontmatter `tools` field is a permission map, not a plain list;
64
+ * setting it wrong would restrict tools rather than reference them, so the tool
65
+ * references live in the body (a `Curated tools:` line) and the frontmatter
66
+ * carries only `description` + `mode`. The server profile is the real gate.
67
+ */
68
+ export function renderOpenCodeShim(toolProfile) {
69
+ const frontmatter = [
70
+ '---',
71
+ `description: ${JSON.stringify(SHIM_DESCRIPTION)}`,
72
+ 'mode: subagent',
73
+ '---',
74
+ ].join('\n');
75
+ const body = [pointerBody('OpenCode'), '', `Curated tools: ${toolCsv(toolProfile)}.`].join('\n');
76
+ return `${frontmatter}\n\n${body}\n`;
77
+ }
78
+ /**
79
+ * A3 — Codex TOML `[agents]` entry. The one non-markdown shim. Strings are
80
+ * emitted via `JSON.stringify`, which produces valid TOML basic strings for the
81
+ * ASCII/UTF-8 text used here; the `tools` array is a TOML array of basic
82
+ * strings. Verified to parse in the pack tests.
83
+ */
84
+ export function renderCodexToml(toolProfile) {
85
+ const toolsArray = toolProfile.map((name) => JSON.stringify(name)).join(', ');
86
+ const instructions = `See the ${AGENT_PACK_DISPLAY_NAME} skill pack (SKILL.md installed as ${AGENT_PACK_SKILL_NAME}) for operating instructions. This entry carries no behavior of its own.`;
87
+ return [
88
+ `# ${AGENT_PACK_DISPLAY_NAME} - Codex agent entry. Generated; do not edit by hand.`,
89
+ `[agents.${AGENT_PACK_SKILL_NAME}]`,
90
+ `description = ${JSON.stringify(SHIM_DESCRIPTION)}`,
91
+ `instructions = ${JSON.stringify(instructions)}`,
92
+ `tools = [${toolsArray}]`,
93
+ '',
94
+ ].join('\n');
95
+ }
96
+ //# sourceMappingURL=shims.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shims.js","sourceRoot":"","sources":["../../../../src/services/agent-pack/shims.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,uBAAuB,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAA;AAE3E,4FAA4F;AAC5F,MAAM,CAAC,MAAM,gBAAgB,GAC3B,qNAAqN,CAAA;AAEvN;;;GAGG;AACH,SAAS,WAAW,CAAC,YAAoB;IACvC,OAAO;QACL,oBAAoB,YAAY,6BAA6B,uBAAuB,GAAG;QACvF,EAAE;QACF,iFAAiF,uBAAuB,4CAA4C,qBAAqB,kJAAkJ;QAC3T,EAAE;QACF,uLAAuL;KACxL,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;AACd,CAAC;AAED,qEAAqE;AACrE,SAAS,OAAO,CAAC,WAA8B;IAC7C,OAAO,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;AAC/B,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,gBAAgB,CAAC,WAA8B;IAC7D,MAAM,WAAW,GAAG;QAClB,KAAK;QACL,SAAS,qBAAqB,EAAE;QAChC,gBAAgB,IAAI,CAAC,SAAS,CAAC,gBAAgB,CAAC,EAAE;QAClD,UAAU,OAAO,CAAC,WAAW,CAAC,EAAE;QAChC,KAAK;KACN,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;IACZ,OAAO,GAAG,WAAW,OAAO,WAAW,CAAC,eAAe,CAAC,IAAI,CAAA;AAC9D,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,iBAAiB,CAAC,WAA8B;IAC9D,MAAM,WAAW,GAAG;QAClB,KAAK;QACL,SAAS,qBAAqB,EAAE;QAChC,gBAAgB,IAAI,CAAC,SAAS,CAAC,gBAAgB,CAAC,EAAE;QAClD,UAAU,OAAO,CAAC,WAAW,CAAC,EAAE;QAChC,KAAK;KACN,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;IACZ,OAAO,GAAG,WAAW,OAAO,WAAW,CAAC,SAAS,CAAC,IAAI,CAAA;AACxD,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,kBAAkB,CAAC,WAA8B;IAC/D,MAAM,WAAW,GAAG;QAClB,KAAK;QACL,gBAAgB,IAAI,CAAC,SAAS,CAAC,gBAAgB,CAAC,EAAE;QAClD,gBAAgB;QAChB,KAAK;KACN,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;IACZ,MAAM,IAAI,GAAG,CAAC,WAAW,CAAC,UAAU,CAAC,EAAE,EAAE,EAAE,kBAAkB,OAAO,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;IAChG,OAAO,GAAG,WAAW,OAAO,IAAI,IAAI,CAAA;AACtC,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,eAAe,CAAC,WAA8B;IAC5D,MAAM,UAAU,GAAG,WAAW,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;IAC7E,MAAM,YAAY,GAAG,WAAW,uBAAuB,sCAAsC,qBAAqB,0EAA0E,CAAA;IAC5L,OAAO;QACL,KAAK,uBAAuB,uDAAuD;QACnF,WAAW,qBAAqB,GAAG;QACnC,iBAAiB,IAAI,CAAC,SAAS,CAAC,gBAAgB,CAAC,EAAE;QACnD,kBAAkB,IAAI,CAAC,SAAS,CAAC,YAAY,CAAC,EAAE;QAChD,YAAY,UAAU,GAAG;QACzB,EAAE;KACH,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;AACd,CAAC"}
@@ -0,0 +1,35 @@
1
+ /**
2
+ * A1 renderer — the SKILL.md prompt pack (agentskills.io spec).
3
+ *
4
+ * The pack's frontmatter core is `name` + `description` (the only stable fields
5
+ * the agentskills spec guarantees, PRD §5.2 risk f3); the body is the agent's
6
+ * operating instructions, assembled from the one prompt source. Deterministic:
7
+ * pure string concatenation over static data, no clock or randomness.
8
+ */
9
+ /**
10
+ * Render the SKILL.md pack body. Exported so the shims can point at the exact
11
+ * section names without duplicating them, and so assembly tests can assert each
12
+ * section appears exactly once.
13
+ */
14
+ export declare function renderAgentSkillBody(): string;
15
+ /**
16
+ * Render the full SKILL.md artifact (frontmatter + body).
17
+ *
18
+ * Frontmatter is emitted by hand (not via a YAML serializer) so the output is
19
+ * byte-stable and the `description` stays a single quoted line — both are
20
+ * verified by the pack tests.
21
+ *
22
+ * `name` is the lowercase-hyphen slug, NOT the display name: the agentskills.io
23
+ * spec requires the frontmatter name to match the parent skill directory, and
24
+ * the installer writes the pack to `<skills-root>/${AGENT_PACK_SKILL_NAME}/`.
25
+ * The human display name appears only in the H1 title and the description.
26
+ *
27
+ * `version` is required by the repo's own `skill_validate` (semver string);
28
+ * `repository` + `compatibility` are its published-skill recommendations —
29
+ * emitting all three keeps the pack validating with zero errors AND zero
30
+ * warnings. Each is sourced from its `types.ts` constant (single definition
31
+ * site); `compatibility` values must stay within the validator's SMI-2760
32
+ * vocabulary (see {@link AGENT_PACK_COMPATIBILITY}).
33
+ */
34
+ export declare function renderAgentSkillMd(): string;
35
+ //# sourceMappingURL=skill-md.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"skill-md.d.ts","sourceRoot":"","sources":["../../../../src/services/agent-pack/skill-md.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AA+BH;;;;GAIG;AACH,wBAAgB,oBAAoB,IAAI,MAAM,CA0C7C;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,kBAAkB,IAAI,MAAM,CAa3C"}
@@ -0,0 +1,89 @@
1
+ /**
2
+ * A1 renderer — the SKILL.md prompt pack (agentskills.io spec).
3
+ *
4
+ * The pack's frontmatter core is `name` + `description` (the only stable fields
5
+ * the agentskills spec guarantees, PRD §5.2 risk f3); the body is the agent's
6
+ * operating instructions, assembled from the one prompt source. Deterministic:
7
+ * pure string concatenation over static data, no clock or randomness.
8
+ */
9
+ import { INTRO_PARAGRAPHS, JOBS, OPERATING_PARAGRAPHS, PACK_DESCRIPTION, PAYWALL_PRINCIPLES, PAYWALL_TRIGGERS, TRUST_CLAUSES, UNDO_PARAGRAPHS, WILL_NOT, } from './prompt-source.js';
10
+ import { AGENT_PACK_COMPATIBILITY, AGENT_PACK_DISPLAY_NAME, AGENT_PACK_REPOSITORY, AGENT_PACK_SKILL_NAME, AGENT_PACK_VERSION, } from './types.js';
11
+ /** Render an ordered markdown list from strings. */
12
+ function numberedOrProse(paragraphs) {
13
+ return paragraphs.join('\n\n');
14
+ }
15
+ /** Render a bullet list. */
16
+ function bullets(items) {
17
+ return items.map((item) => `- ${item}`).join('\n');
18
+ }
19
+ /**
20
+ * Render the SKILL.md pack body. Exported so the shims can point at the exact
21
+ * section names without duplicating them, and so assembly tests can assert each
22
+ * section appears exactly once.
23
+ */
24
+ export function renderAgentSkillBody() {
25
+ const sections = [];
26
+ sections.push(`# ${AGENT_PACK_DISPLAY_NAME}`);
27
+ sections.push(numberedOrProse(INTRO_PARAGRAPHS));
28
+ sections.push('## How I work');
29
+ sections.push(numberedOrProse(OPERATING_PARAGRAPHS));
30
+ sections.push('## Trust and safety (non-negotiable)');
31
+ sections.push('These rules hold on every request, regardless of runtime or model. They are what makes delegation safe.');
32
+ for (const clause of TRUST_CLAUSES) {
33
+ sections.push(`### ${clause.title}`);
34
+ sections.push(clause.body);
35
+ }
36
+ sections.push('## Jobs I can do');
37
+ for (const job of JOBS) {
38
+ sections.push(`### ${job.title}`);
39
+ sections.push(job.body);
40
+ if (job.tools.length > 0) {
41
+ sections.push(`Tools: ${job.tools.join(', ')}.`);
42
+ }
43
+ }
44
+ sections.push('## Upgrade prompts (when to mention a paid tier)');
45
+ sections.push(numberedOrProse(PAYWALL_PRINCIPLES));
46
+ for (const trigger of PAYWALL_TRIGGERS) {
47
+ sections.push(`### ${trigger.title}`);
48
+ sections.push(trigger.body);
49
+ }
50
+ sections.push('## Undo and recovery');
51
+ sections.push(numberedOrProse(UNDO_PARAGRAPHS));
52
+ sections.push('## What I will not do');
53
+ sections.push(bullets(WILL_NOT));
54
+ // Trailing newline: POSIX text files end with one; keeps snapshots stable.
55
+ return `${sections.join('\n\n')}\n`;
56
+ }
57
+ /**
58
+ * Render the full SKILL.md artifact (frontmatter + body).
59
+ *
60
+ * Frontmatter is emitted by hand (not via a YAML serializer) so the output is
61
+ * byte-stable and the `description` stays a single quoted line — both are
62
+ * verified by the pack tests.
63
+ *
64
+ * `name` is the lowercase-hyphen slug, NOT the display name: the agentskills.io
65
+ * spec requires the frontmatter name to match the parent skill directory, and
66
+ * the installer writes the pack to `<skills-root>/${AGENT_PACK_SKILL_NAME}/`.
67
+ * The human display name appears only in the H1 title and the description.
68
+ *
69
+ * `version` is required by the repo's own `skill_validate` (semver string);
70
+ * `repository` + `compatibility` are its published-skill recommendations —
71
+ * emitting all three keeps the pack validating with zero errors AND zero
72
+ * warnings. Each is sourced from its `types.ts` constant (single definition
73
+ * site); `compatibility` values must stay within the validator's SMI-2760
74
+ * vocabulary (see {@link AGENT_PACK_COMPATIBILITY}).
75
+ */
76
+ export function renderAgentSkillMd() {
77
+ const compatibility = AGENT_PACK_COMPATIBILITY.map((slug) => JSON.stringify(slug)).join(', ');
78
+ const frontmatter = [
79
+ '---',
80
+ `name: ${AGENT_PACK_SKILL_NAME}`,
81
+ `description: ${JSON.stringify(PACK_DESCRIPTION)}`,
82
+ `version: ${JSON.stringify(AGENT_PACK_VERSION)}`,
83
+ `repository: ${JSON.stringify(AGENT_PACK_REPOSITORY)}`,
84
+ `compatibility: [${compatibility}]`,
85
+ '---',
86
+ ].join('\n');
87
+ return `${frontmatter}\n\n${renderAgentSkillBody()}`;
88
+ }
89
+ //# sourceMappingURL=skill-md.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"skill-md.js","sourceRoot":"","sources":["../../../../src/services/agent-pack/skill-md.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EACL,gBAAgB,EAChB,IAAI,EACJ,oBAAoB,EACpB,gBAAgB,EAChB,kBAAkB,EAClB,gBAAgB,EAChB,aAAa,EACb,eAAe,EACf,QAAQ,GACT,MAAM,oBAAoB,CAAA;AAC3B,OAAO,EACL,wBAAwB,EACxB,uBAAuB,EACvB,qBAAqB,EACrB,qBAAqB,EACrB,kBAAkB,GACnB,MAAM,YAAY,CAAA;AAEnB,oDAAoD;AACpD,SAAS,eAAe,CAAC,UAA6B;IACpD,OAAO,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;AAChC,CAAC;AAED,4BAA4B;AAC5B,SAAS,OAAO,CAAC,KAAwB;IACvC,OAAO,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;AACpD,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,oBAAoB;IAClC,MAAM,QAAQ,GAAa,EAAE,CAAA;IAE7B,QAAQ,CAAC,IAAI,CAAC,KAAK,uBAAuB,EAAE,CAAC,CAAA;IAC7C,QAAQ,CAAC,IAAI,CAAC,eAAe,CAAC,gBAAgB,CAAC,CAAC,CAAA;IAEhD,QAAQ,CAAC,IAAI,CAAC,eAAe,CAAC,CAAA;IAC9B,QAAQ,CAAC,IAAI,CAAC,eAAe,CAAC,oBAAoB,CAAC,CAAC,CAAA;IAEpD,QAAQ,CAAC,IAAI,CAAC,sCAAsC,CAAC,CAAA;IACrD,QAAQ,CAAC,IAAI,CACX,yGAAyG,CAC1G,CAAA;IACD,KAAK,MAAM,MAAM,IAAI,aAAa,EAAE,CAAC;QACnC,QAAQ,CAAC,IAAI,CAAC,OAAO,MAAM,CAAC,KAAK,EAAE,CAAC,CAAA;QACpC,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAA;IAC5B,CAAC;IAED,QAAQ,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAA;IACjC,KAAK,MAAM,GAAG,IAAI,IAAI,EAAE,CAAC;QACvB,QAAQ,CAAC,IAAI,CAAC,OAAO,GAAG,CAAC,KAAK,EAAE,CAAC,CAAA;QACjC,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,CAAA;QACvB,IAAI,GAAG,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YACzB,QAAQ,CAAC,IAAI,CAAC,UAAU,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;QAClD,CAAC;IACH,CAAC;IAED,QAAQ,CAAC,IAAI,CAAC,kDAAkD,CAAC,CAAA;IACjE,QAAQ,CAAC,IAAI,CAAC,eAAe,CAAC,kBAAkB,CAAC,CAAC,CAAA;IAClD,KAAK,MAAM,OAAO,IAAI,gBAAgB,EAAE,CAAC;QACvC,QAAQ,CAAC,IAAI,CAAC,OAAO,OAAO,CAAC,KAAK,EAAE,CAAC,CAAA;QACrC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAA;IAC7B,CAAC;IAED,QAAQ,CAAC,IAAI,CAAC,sBAAsB,CAAC,CAAA;IACrC,QAAQ,CAAC,IAAI,CAAC,eAAe,CAAC,eAAe,CAAC,CAAC,CAAA;IAE/C,QAAQ,CAAC,IAAI,CAAC,uBAAuB,CAAC,CAAA;IACtC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAA;IAEhC,2EAA2E;IAC3E,OAAO,GAAG,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAA;AACrC,CAAC;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,UAAU,kBAAkB;IAChC,MAAM,aAAa,GAAG,wBAAwB,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;IAC7F,MAAM,WAAW,GAAG;QAClB,KAAK;QACL,SAAS,qBAAqB,EAAE;QAChC,gBAAgB,IAAI,CAAC,SAAS,CAAC,gBAAgB,CAAC,EAAE;QAClD,YAAY,IAAI,CAAC,SAAS,CAAC,kBAAkB,CAAC,EAAE;QAChD,eAAe,IAAI,CAAC,SAAS,CAAC,qBAAqB,CAAC,EAAE;QACtD,mBAAmB,aAAa,GAAG;QACnC,KAAK;KACN,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;IAEZ,OAAO,GAAG,WAAW,OAAO,oBAAoB,EAAE,EAAE,CAAA;AACtD,CAAC"}
@@ -0,0 +1,118 @@
1
+ /**
2
+ * Skillsmith Agent pack — shared types + constants (SMI-5456 Wave 1 Step 4).
3
+ *
4
+ * The portable agent pack IS the Skillsmith Agent product: one prompt source
5
+ * (the SKILL.md brain), thin per-harness shims that carry invocation sugar and
6
+ * zero logic, and SessionStart/SessionEnd hook artifacts that feed the
7
+ * mediation marker channel. Everything is generated from this one source at
8
+ * build time and versioned with the `@skillsmith/mcp-server` release — the
9
+ * mitigation for definition rot across harness targets (PRD §5.2 risk f).
10
+ *
11
+ * This module is intentionally free of any `@skillsmith/mcp-server` import: the
12
+ * curated tool profile is passed in as {@link AgentPackInput.toolProfile} so the
13
+ * dependency direction stays core → (consumed by) mcp-server, never circular.
14
+ *
15
+ * @see docs/internal/product/prd-skillsmith-agent.md
16
+ * @see docs/internal/architecture/skillsmith-agent-architecture.md (artifacts A1-A6)
17
+ */
18
+ /** Skill directory + agentskills.io `name` slug for the generated pack. */
19
+ export declare const AGENT_PACK_SKILL_NAME = "skillsmith-agent";
20
+ /** Human-facing display name used in prose and shim descriptions. */
21
+ export declare const AGENT_PACK_DISPLAY_NAME = "Skillsmith Agent";
22
+ /**
23
+ * On-disk pack schema version. Bump on any breaking change to artifact SHAPE
24
+ * (paths, frontmatter fields, hook contract) so the installer can detect an
25
+ * incompatible pack. NOT the npm version — keeping it a fixed code constant is
26
+ * what makes generation deterministic (no release-number churn in artifacts).
27
+ */
28
+ export declare const AGENT_PACK_SCHEMA_VERSION = 1;
29
+ /**
30
+ * SKILL.md frontmatter `version` (semver string — the repo's own
31
+ * `skill_validate` requires it). Static for Wave 1; bump when the pack's
32
+ * CONTENT changes materially. Independent of {@link AGENT_PACK_SCHEMA_VERSION}
33
+ * (artifact shape) and of the npm release number (determinism: artifacts must
34
+ * not churn with every release).
35
+ */
36
+ export declare const AGENT_PACK_VERSION = "1.0.0";
37
+ /** SKILL.md frontmatter `repository` (source transparency for a published skill). */
38
+ export declare const AGENT_PACK_REPOSITORY = "https://github.com/smith-horn/skillsmith";
39
+ /**
40
+ * SKILL.md frontmatter `compatibility`, constrained to the validator's SMI-2760
41
+ * vocabulary (`KNOWN_IDES`/`KNOWN_LLMS` in mcp-server `utils/validation.ts`) so
42
+ * the pack validates with ZERO warnings. In Tier order; `vscode` is that
43
+ * vocabulary's designated slug for the Copilot/VS Code surface. `codex`,
44
+ * `opencode`, and `hermes` are supported harnesses but have no slug in the
45
+ * vocabulary yet — add them here when the SMI-2760 enum gains them.
46
+ */
47
+ export declare const AGENT_PACK_COMPATIBILITY: readonly string[];
48
+ /** Harness identifiers the pack targets. */
49
+ export type HarnessId = 'claude-code' | 'cursor' | 'codex' | 'copilot' | 'opencode';
50
+ /**
51
+ * Harnesses that get a generated SessionStart/SessionEnd hook (PRD §3.1,
52
+ * spike report §(e)). Hermes has no session-start equivalent (spike verified
53
+ * absent) and Windsurf has no hook system — both excluded. Copilot/OpenCode
54
+ * hooks (preview / JS-plugin format) are out of Wave-1 hook scope by decision;
55
+ * they still get shims.
56
+ */
57
+ export declare const HOOK_HARNESSES: readonly HarnessId[];
58
+ /** Artifact class. */
59
+ export type AgentArtifactKind = 'skill' | 'shim' | 'hook';
60
+ /**
61
+ * A single generated artifact. `path` is POSIX-relative to the agent-pack root;
62
+ * `content` is deterministic (no timestamps / randomness — snapshot tests depend
63
+ * on it). The installer (Step 5) consumes this typed shape directly rather than
64
+ * re-deriving intent from the path.
65
+ */
66
+ export interface AgentPackArtifact {
67
+ /** Path relative to the agent-pack root (POSIX separators). */
68
+ path: string;
69
+ /** File contents. Byte-identical across runs for identical input. */
70
+ content: string;
71
+ /** What kind of artifact this is. */
72
+ kind: AgentArtifactKind;
73
+ /** Harness this artifact targets, or `null` for the harness-neutral skill pack. */
74
+ harness: HarnessId | null;
75
+ /** True when the installer must mark the file executable (hook scripts). */
76
+ executable: boolean;
77
+ }
78
+ /** Input to {@link generateAgentPack}. */
79
+ export interface AgentPackInput {
80
+ /**
81
+ * The curated MCP tool profile — the single source of truth is
82
+ * `@skillsmith/mcp-server`'s `AGENT_TOOL_PROFILE_NAMES`, passed in here by
83
+ * the generation script and by tests. Every tool the prompt source references
84
+ * must be a member, or {@link generateAgentPack} throws (build-time fail-fast).
85
+ */
86
+ toolProfile: readonly string[];
87
+ }
88
+ /**
89
+ * A delegable job the pack teaches. Jobs 1-3 are full MVP orchestrations; jobs
90
+ * 4/8/9 are routing-only (find/recommend, author-away, team-share).
91
+ */
92
+ export interface JobDefinition {
93
+ /** Stable id for assembly tests. */
94
+ id: string;
95
+ /** Section heading (no leading `###`). */
96
+ title: string;
97
+ /** Prose body — plain-language operating instructions for this job. */
98
+ body: string;
99
+ /**
100
+ * Tools this job orchestrates, by MCP name. Empty for routing-only jobs that
101
+ * hand off to another skill/tier rather than calling tools. Every entry is
102
+ * validated against {@link AgentPackInput.toolProfile}.
103
+ */
104
+ tools: readonly string[];
105
+ }
106
+ /** A trust/safety clause rendered verbatim-in-spirit from PRD §7. */
107
+ export interface TrustClause {
108
+ id: string;
109
+ title: string;
110
+ body: string;
111
+ }
112
+ /** A paywall trigger's wording + when-to-mention rule (PRD §8.1). */
113
+ export interface PaywallTrigger {
114
+ id: string;
115
+ title: string;
116
+ body: string;
117
+ }
118
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/services/agent-pack/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,2EAA2E;AAC3E,eAAO,MAAM,qBAAqB,qBAAqB,CAAA;AAEvD,qEAAqE;AACrE,eAAO,MAAM,uBAAuB,qBAAqB,CAAA;AAEzD;;;;;GAKG;AACH,eAAO,MAAM,yBAAyB,IAAI,CAAA;AAE1C;;;;;;GAMG;AACH,eAAO,MAAM,kBAAkB,UAAU,CAAA;AAEzC,qFAAqF;AACrF,eAAO,MAAM,qBAAqB,6CAA6C,CAAA;AAE/E;;;;;;;GAOG;AACH,eAAO,MAAM,wBAAwB,EAAE,SAAS,MAAM,EAKrD,CAAA;AAED,4CAA4C;AAC5C,MAAM,MAAM,SAAS,GAAG,aAAa,GAAG,QAAQ,GAAG,OAAO,GAAG,SAAS,GAAG,UAAU,CAAA;AAEnF;;;;;;GAMG;AACH,eAAO,MAAM,cAAc,EAAE,SAAS,SAAS,EAAuC,CAAA;AAEtF,sBAAsB;AACtB,MAAM,MAAM,iBAAiB,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,CAAA;AAEzD;;;;;GAKG;AACH,MAAM,WAAW,iBAAiB;IAChC,+DAA+D;IAC/D,IAAI,EAAE,MAAM,CAAA;IACZ,qEAAqE;IACrE,OAAO,EAAE,MAAM,CAAA;IACf,qCAAqC;IACrC,IAAI,EAAE,iBAAiB,CAAA;IACvB,mFAAmF;IACnF,OAAO,EAAE,SAAS,GAAG,IAAI,CAAA;IACzB,4EAA4E;IAC5E,UAAU,EAAE,OAAO,CAAA;CACpB;AAED,0CAA0C;AAC1C,MAAM,WAAW,cAAc;IAC7B;;;;;OAKG;IACH,WAAW,EAAE,SAAS,MAAM,EAAE,CAAA;CAC/B;AAED;;;GAGG;AACH,MAAM,WAAW,aAAa;IAC5B,oCAAoC;IACpC,EAAE,EAAE,MAAM,CAAA;IACV,0CAA0C;IAC1C,KAAK,EAAE,MAAM,CAAA;IACb,uEAAuE;IACvE,IAAI,EAAE,MAAM,CAAA;IACZ;;;;OAIG;IACH,KAAK,EAAE,SAAS,MAAM,EAAE,CAAA;CACzB;AAED,qEAAqE;AACrE,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,MAAM,CAAA;CACb;AAED,qEAAqE;AACrE,MAAM,WAAW,cAAc;IAC7B,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,MAAM,CAAA;CACb"}
@@ -0,0 +1,61 @@
1
+ /**
2
+ * Skillsmith Agent pack — shared types + constants (SMI-5456 Wave 1 Step 4).
3
+ *
4
+ * The portable agent pack IS the Skillsmith Agent product: one prompt source
5
+ * (the SKILL.md brain), thin per-harness shims that carry invocation sugar and
6
+ * zero logic, and SessionStart/SessionEnd hook artifacts that feed the
7
+ * mediation marker channel. Everything is generated from this one source at
8
+ * build time and versioned with the `@skillsmith/mcp-server` release — the
9
+ * mitigation for definition rot across harness targets (PRD §5.2 risk f).
10
+ *
11
+ * This module is intentionally free of any `@skillsmith/mcp-server` import: the
12
+ * curated tool profile is passed in as {@link AgentPackInput.toolProfile} so the
13
+ * dependency direction stays core → (consumed by) mcp-server, never circular.
14
+ *
15
+ * @see docs/internal/product/prd-skillsmith-agent.md
16
+ * @see docs/internal/architecture/skillsmith-agent-architecture.md (artifacts A1-A6)
17
+ */
18
+ /** Skill directory + agentskills.io `name` slug for the generated pack. */
19
+ export const AGENT_PACK_SKILL_NAME = 'skillsmith-agent';
20
+ /** Human-facing display name used in prose and shim descriptions. */
21
+ export const AGENT_PACK_DISPLAY_NAME = 'Skillsmith Agent';
22
+ /**
23
+ * On-disk pack schema version. Bump on any breaking change to artifact SHAPE
24
+ * (paths, frontmatter fields, hook contract) so the installer can detect an
25
+ * incompatible pack. NOT the npm version — keeping it a fixed code constant is
26
+ * what makes generation deterministic (no release-number churn in artifacts).
27
+ */
28
+ export const AGENT_PACK_SCHEMA_VERSION = 1;
29
+ /**
30
+ * SKILL.md frontmatter `version` (semver string — the repo's own
31
+ * `skill_validate` requires it). Static for Wave 1; bump when the pack's
32
+ * CONTENT changes materially. Independent of {@link AGENT_PACK_SCHEMA_VERSION}
33
+ * (artifact shape) and of the npm release number (determinism: artifacts must
34
+ * not churn with every release).
35
+ */
36
+ export const AGENT_PACK_VERSION = '1.0.0';
37
+ /** SKILL.md frontmatter `repository` (source transparency for a published skill). */
38
+ export const AGENT_PACK_REPOSITORY = 'https://github.com/smith-horn/skillsmith';
39
+ /**
40
+ * SKILL.md frontmatter `compatibility`, constrained to the validator's SMI-2760
41
+ * vocabulary (`KNOWN_IDES`/`KNOWN_LLMS` in mcp-server `utils/validation.ts`) so
42
+ * the pack validates with ZERO warnings. In Tier order; `vscode` is that
43
+ * vocabulary's designated slug for the Copilot/VS Code surface. `codex`,
44
+ * `opencode`, and `hermes` are supported harnesses but have no slug in the
45
+ * vocabulary yet — add them here when the SMI-2760 enum gains them.
46
+ */
47
+ export const AGENT_PACK_COMPATIBILITY = [
48
+ 'claude-code',
49
+ 'cursor',
50
+ 'vscode',
51
+ 'windsurf',
52
+ ];
53
+ /**
54
+ * Harnesses that get a generated SessionStart/SessionEnd hook (PRD §3.1,
55
+ * spike report §(e)). Hermes has no session-start equivalent (spike verified
56
+ * absent) and Windsurf has no hook system — both excluded. Copilot/OpenCode
57
+ * hooks (preview / JS-plugin format) are out of Wave-1 hook scope by decision;
58
+ * they still get shims.
59
+ */
60
+ export const HOOK_HARNESSES = ['claude-code', 'cursor', 'codex'];
61
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/services/agent-pack/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,2EAA2E;AAC3E,MAAM,CAAC,MAAM,qBAAqB,GAAG,kBAAkB,CAAA;AAEvD,qEAAqE;AACrE,MAAM,CAAC,MAAM,uBAAuB,GAAG,kBAAkB,CAAA;AAEzD;;;;;GAKG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC,CAAA;AAE1C;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,OAAO,CAAA;AAEzC,qFAAqF;AACrF,MAAM,CAAC,MAAM,qBAAqB,GAAG,0CAA0C,CAAA;AAE/E;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAsB;IACzD,aAAa;IACb,QAAQ;IACR,QAAQ;IACR,UAAU;CACX,CAAA;AAKD;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,cAAc,GAAyB,CAAC,aAAa,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAA"}
@@ -0,0 +1,59 @@
1
+ /**
2
+ * Curated agent tool profile — canonical home (SMI-5456 Wave 1 Step 5, QD-1).
3
+ *
4
+ * These three constants were originally defined in
5
+ * `@skillsmith/mcp-server`'s `middleware/toolProfile.ts` (Step 2). Step 5's
6
+ * `sklx agent install` needs to call `generateAgentPack({ toolProfile })`
7
+ * with the SAME list the mcp-server's generation script uses, so the
8
+ * installer produces byte-identical artifacts to the committed pack
9
+ * (determinism is the drift guard — see `agent-pack.assets.test.ts`).
10
+ * Relocating here lets `@skillsmith/cli` depend on `@skillsmith/core` only
11
+ * (already a runtime-shaped dependency) instead of pulling in
12
+ * `@skillsmith/mcp-server` (a devDependency that bundles the full MCP SDK +
13
+ * server bootstrap) just to read a string array.
14
+ *
15
+ * `packages/mcp-server/src/middleware/toolProfile.ts` now imports + re-exports
16
+ * these three constants so every existing import path (including the
17
+ * generation script and `agent-pack.assets.test.ts`) keeps working unchanged.
18
+ * `isAgentToolProfileActive` / `filterToolsForAgentProfile` stay in
19
+ * mcp-server — they operate on `ListTools` output + `process.env`, which is
20
+ * mcp-server-specific runtime behavior, not shared constant data.
21
+ *
22
+ * DEVIATION FROM THE QD-1 SPEC: the plan's queen decision named the target
23
+ * location as `packages/core/src/services/agent-pack/` (e.g. `types.ts` or a
24
+ * small `constants.ts`). That directory was locked for a concurrent
25
+ * governance audit for the duration of this Step-5 implementation (worker
26
+ * S4), so this module lives as a SIBLING file instead
27
+ * (`services/agent-tool-profile.ts`, not `services/agent-pack/*.ts`) to avoid
28
+ * touching the locked path. Functionally this is identical to the spec'd
29
+ * location — same package, same import surface via `@skillsmith/core`. A
30
+ * follow-up should fold this file into `services/agent-pack/` proper once the
31
+ * lock lifts, purely as a file-move (no behavior change).
32
+ *
33
+ * @module @skillsmith/core/services/agent-tool-profile
34
+ * @see docs/internal/implementation/smi-5456-skillsmith-agent-wave1.md
35
+ */
36
+ /** Env var that activates the curated agent profile (mcp-server ListTools filter). */
37
+ export declare const AGENT_TOOL_PROFILE_ENV_VAR = "SKILLSMITH_TOOL_PROFILE";
38
+ /** The only value of {@link AGENT_TOOL_PROFILE_ENV_VAR} that activates the profile. */
39
+ export declare const AGENT_TOOL_PROFILE_VALUE = "agent";
40
+ /**
41
+ * Membership list for the curated agent profile.
42
+ *
43
+ * The first 15 names were verified against actual `tools/*.ts`
44
+ * registrations on 2026-07-01 via:
45
+ *
46
+ * grep -rhoE "name: '[a-z_]+'" packages/mcp-server/src/tools/ \
47
+ * --include='*.ts' | grep -v test | sort -u
48
+ *
49
+ * `undo_apply` shipped in SMI-5470 (Wave 1 Step 3, the change-journal + undo
50
+ * tool). This list is the single source of truth consumed by BOTH
51
+ * `generateAgentPack` call sites: the mcp-server build-time generation script
52
+ * (`packages/mcp-server/scripts/generate-agent-pack.ts`, via the re-export in
53
+ * `middleware/toolProfile.ts`) and the CLI installer
54
+ * (`packages/cli/src/commands/agent.action.ts`, via this module directly).
55
+ * Determinism of `generateAgentPack` is what guarantees both call sites
56
+ * produce byte-identical output from the same input.
57
+ */
58
+ export declare const AGENT_TOOL_PROFILE_NAMES: readonly string[];
59
+ //# sourceMappingURL=agent-tool-profile.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agent-tool-profile.d.ts","sourceRoot":"","sources":["../../../src/services/agent-tool-profile.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AAEH,sFAAsF;AACtF,eAAO,MAAM,0BAA0B,4BAA4B,CAAA;AAEnE,uFAAuF;AACvF,eAAO,MAAM,wBAAwB,UAAU,CAAA;AAE/C;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,wBAAwB,EAAE,SAAS,MAAM,EAiBrD,CAAA"}
@@ -0,0 +1,76 @@
1
+ /**
2
+ * Curated agent tool profile — canonical home (SMI-5456 Wave 1 Step 5, QD-1).
3
+ *
4
+ * These three constants were originally defined in
5
+ * `@skillsmith/mcp-server`'s `middleware/toolProfile.ts` (Step 2). Step 5's
6
+ * `sklx agent install` needs to call `generateAgentPack({ toolProfile })`
7
+ * with the SAME list the mcp-server's generation script uses, so the
8
+ * installer produces byte-identical artifacts to the committed pack
9
+ * (determinism is the drift guard — see `agent-pack.assets.test.ts`).
10
+ * Relocating here lets `@skillsmith/cli` depend on `@skillsmith/core` only
11
+ * (already a runtime-shaped dependency) instead of pulling in
12
+ * `@skillsmith/mcp-server` (a devDependency that bundles the full MCP SDK +
13
+ * server bootstrap) just to read a string array.
14
+ *
15
+ * `packages/mcp-server/src/middleware/toolProfile.ts` now imports + re-exports
16
+ * these three constants so every existing import path (including the
17
+ * generation script and `agent-pack.assets.test.ts`) keeps working unchanged.
18
+ * `isAgentToolProfileActive` / `filterToolsForAgentProfile` stay in
19
+ * mcp-server — they operate on `ListTools` output + `process.env`, which is
20
+ * mcp-server-specific runtime behavior, not shared constant data.
21
+ *
22
+ * DEVIATION FROM THE QD-1 SPEC: the plan's queen decision named the target
23
+ * location as `packages/core/src/services/agent-pack/` (e.g. `types.ts` or a
24
+ * small `constants.ts`). That directory was locked for a concurrent
25
+ * governance audit for the duration of this Step-5 implementation (worker
26
+ * S4), so this module lives as a SIBLING file instead
27
+ * (`services/agent-tool-profile.ts`, not `services/agent-pack/*.ts`) to avoid
28
+ * touching the locked path. Functionally this is identical to the spec'd
29
+ * location — same package, same import surface via `@skillsmith/core`. A
30
+ * follow-up should fold this file into `services/agent-pack/` proper once the
31
+ * lock lifts, purely as a file-move (no behavior change).
32
+ *
33
+ * @module @skillsmith/core/services/agent-tool-profile
34
+ * @see docs/internal/implementation/smi-5456-skillsmith-agent-wave1.md
35
+ */
36
+ /** Env var that activates the curated agent profile (mcp-server ListTools filter). */
37
+ export const AGENT_TOOL_PROFILE_ENV_VAR = 'SKILLSMITH_TOOL_PROFILE';
38
+ /** The only value of {@link AGENT_TOOL_PROFILE_ENV_VAR} that activates the profile. */
39
+ export const AGENT_TOOL_PROFILE_VALUE = 'agent';
40
+ /**
41
+ * Membership list for the curated agent profile.
42
+ *
43
+ * The first 15 names were verified against actual `tools/*.ts`
44
+ * registrations on 2026-07-01 via:
45
+ *
46
+ * grep -rhoE "name: '[a-z_]+'" packages/mcp-server/src/tools/ \
47
+ * --include='*.ts' | grep -v test | sort -u
48
+ *
49
+ * `undo_apply` shipped in SMI-5470 (Wave 1 Step 3, the change-journal + undo
50
+ * tool). This list is the single source of truth consumed by BOTH
51
+ * `generateAgentPack` call sites: the mcp-server build-time generation script
52
+ * (`packages/mcp-server/scripts/generate-agent-pack.ts`, via the re-export in
53
+ * `middleware/toolProfile.ts`) and the CLI installer
54
+ * (`packages/cli/src/commands/agent.action.ts`, via this module directly).
55
+ * Determinism of `generateAgentPack` is what guarantees both call sites
56
+ * produce byte-identical output from the same input.
57
+ */
58
+ export const AGENT_TOOL_PROFILE_NAMES = [
59
+ 'search',
60
+ 'get_skill',
61
+ 'install_skill',
62
+ 'uninstall_skill',
63
+ 'skill_recommend',
64
+ 'skill_validate',
65
+ 'skill_compare',
66
+ 'skill_outdated',
67
+ 'skill_updates',
68
+ 'skill_diff',
69
+ 'skill_pack_audit',
70
+ 'skill_inventory_audit',
71
+ 'apply_namespace_rename',
72
+ 'apply_recommended_edit',
73
+ 'skill_audit',
74
+ 'undo_apply',
75
+ ];
76
+ //# sourceMappingURL=agent-tool-profile.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agent-tool-profile.js","sourceRoot":"","sources":["../../../src/services/agent-tool-profile.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AAEH,sFAAsF;AACtF,MAAM,CAAC,MAAM,0BAA0B,GAAG,yBAAyB,CAAA;AAEnE,uFAAuF;AACvF,MAAM,CAAC,MAAM,wBAAwB,GAAG,OAAO,CAAA;AAE/C;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAsB;IACzD,QAAQ;IACR,WAAW;IACX,eAAe;IACf,iBAAiB;IACjB,iBAAiB;IACjB,gBAAgB;IAChB,eAAe;IACf,gBAAgB;IAChB,eAAe;IACf,YAAY;IACZ,kBAAkB;IAClB,uBAAuB;IACvB,wBAAwB;IACxB,wBAAwB;IACxB,aAAa;IACb,YAAY;CACb,CAAA"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=agent-tool-profile.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agent-tool-profile.test.d.ts","sourceRoot":"","sources":["../../../src/services/agent-tool-profile.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,28 @@
1
+ /**
2
+ * @fileoverview Tests for the relocated curated-agent-tool-profile constants
3
+ * (SMI-5456 Wave 1 Step 5, QD-1).
4
+ * @module @skillsmith/core/services/agent-tool-profile.test
5
+ */
6
+ import { describe, expect, it } from 'vitest';
7
+ import { AGENT_TOOL_PROFILE_ENV_VAR, AGENT_TOOL_PROFILE_NAMES, AGENT_TOOL_PROFILE_VALUE, } from './agent-tool-profile.js';
8
+ describe('AGENT_TOOL_PROFILE_NAMES (core, QD-1 relocation)', () => {
9
+ it('has 16 entries', () => {
10
+ expect(AGENT_TOOL_PROFILE_NAMES).toHaveLength(16);
11
+ });
12
+ it('contains undo_apply', () => {
13
+ expect(AGENT_TOOL_PROFILE_NAMES).toContain('undo_apply');
14
+ });
15
+ it('every entry is a non-empty snake_case tool name', () => {
16
+ for (const name of AGENT_TOOL_PROFILE_NAMES) {
17
+ expect(name).toMatch(/^[a-z][a-z_]*[a-z]$/);
18
+ }
19
+ });
20
+ it('has no duplicate entries', () => {
21
+ expect(new Set(AGENT_TOOL_PROFILE_NAMES).size).toBe(AGENT_TOOL_PROFILE_NAMES.length);
22
+ });
23
+ it('env var name + value match the mcp-server ListTools filter contract', () => {
24
+ expect(AGENT_TOOL_PROFILE_ENV_VAR).toBe('SKILLSMITH_TOOL_PROFILE');
25
+ expect(AGENT_TOOL_PROFILE_VALUE).toBe('agent');
26
+ });
27
+ });
28
+ //# sourceMappingURL=agent-tool-profile.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agent-tool-profile.test.js","sourceRoot":"","sources":["../../../src/services/agent-tool-profile.test.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAA;AAE7C,OAAO,EACL,0BAA0B,EAC1B,wBAAwB,EACxB,wBAAwB,GACzB,MAAM,yBAAyB,CAAA;AAEhC,QAAQ,CAAC,kDAAkD,EAAE,GAAG,EAAE;IAChE,EAAE,CAAC,gBAAgB,EAAE,GAAG,EAAE;QACxB,MAAM,CAAC,wBAAwB,CAAC,CAAC,YAAY,CAAC,EAAE,CAAC,CAAA;IACnD,CAAC,CAAC,CAAA;IAEF,EAAE,CAAC,qBAAqB,EAAE,GAAG,EAAE;QAC7B,MAAM,CAAC,wBAAwB,CAAC,CAAC,SAAS,CAAC,YAAY,CAAC,CAAA;IAC1D,CAAC,CAAC,CAAA;IAEF,EAAE,CAAC,iDAAiD,EAAE,GAAG,EAAE;QACzD,KAAK,MAAM,IAAI,IAAI,wBAAwB,EAAE,CAAC;YAC5C,MAAM,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,qBAAqB,CAAC,CAAA;QAC7C,CAAC;IACH,CAAC,CAAC,CAAA;IAEF,EAAE,CAAC,0BAA0B,EAAE,GAAG,EAAE;QAClC,MAAM,CAAC,IAAI,GAAG,CAAC,wBAAwB,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,wBAAwB,CAAC,MAAM,CAAC,CAAA;IACtF,CAAC,CAAC,CAAA;IAEF,EAAE,CAAC,qEAAqE,EAAE,GAAG,EAAE;QAC7E,MAAM,CAAC,0BAA0B,CAAC,CAAC,IAAI,CAAC,yBAAyB,CAAC,CAAA;QAClE,MAAM,CAAC,wBAAwB,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;IAChD,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA"}