@skillsmith/core 0.12.0 → 0.12.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (290) hide show
  1. package/CHANGELOG.md +166 -1
  2. package/README.md +7 -8
  3. package/dist/.tsbuildinfo +1 -1
  4. package/dist/src/api/client.d.ts +5 -3
  5. package/dist/src/api/client.d.ts.map +1 -1
  6. package/dist/src/api/client.js +23 -33
  7. package/dist/src/api/client.js.map +1 -1
  8. package/dist/src/api/client.registry-sync.d.ts +28 -0
  9. package/dist/src/api/client.registry-sync.d.ts.map +1 -0
  10. package/dist/src/api/client.registry-sync.js +36 -0
  11. package/dist/src/api/client.registry-sync.js.map +1 -0
  12. package/dist/src/api/client.test.js +185 -0
  13. package/dist/src/api/client.test.js.map +1 -1
  14. package/dist/src/api/client.toSkill.d.ts +16 -0
  15. package/dist/src/api/client.toSkill.d.ts.map +1 -0
  16. package/dist/src/api/client.toSkill.js +46 -0
  17. package/dist/src/api/client.toSkill.js.map +1 -0
  18. package/dist/src/api/client.types.d.ts +22 -0
  19. package/dist/src/api/client.types.d.ts.map +1 -1
  20. package/dist/src/api/index.d.ts +1 -1
  21. package/dist/src/api/index.d.ts.map +1 -1
  22. package/dist/src/api/index.js.map +1 -1
  23. package/dist/src/api/schemas.d.ts +28 -0
  24. package/dist/src/api/schemas.d.ts.map +1 -1
  25. package/dist/src/api/schemas.js +13 -0
  26. package/dist/src/api/schemas.js.map +1 -1
  27. package/dist/src/audit/remote-audit.d.ts +85 -0
  28. package/dist/src/audit/remote-audit.d.ts.map +1 -1
  29. package/dist/src/audit/remote-audit.js +126 -3
  30. package/dist/src/audit/remote-audit.js.map +1 -1
  31. package/dist/src/audit/remote-audit.test.js +217 -1
  32. package/dist/src/audit/remote-audit.test.js.map +1 -1
  33. package/dist/src/config/index.d.ts +1 -0
  34. package/dist/src/config/index.d.ts.map +1 -1
  35. package/dist/src/config/index.js.map +1 -1
  36. package/dist/src/config/token-credentials.d.ts +20 -0
  37. package/dist/src/config/token-credentials.d.ts.map +1 -1
  38. package/dist/src/config/token-credentials.js +59 -0
  39. package/dist/src/config/token-credentials.js.map +1 -1
  40. package/dist/src/config/token-credentials.test.d.ts +3 -0
  41. package/dist/src/config/token-credentials.test.d.ts.map +1 -1
  42. package/dist/src/config/token-credentials.test.js +68 -0
  43. package/dist/src/config/token-credentials.test.js.map +1 -1
  44. package/dist/src/db/migration-runner.d.ts.map +1 -1
  45. package/dist/src/db/migration-runner.js +6 -0
  46. package/dist/src/db/migration-runner.js.map +1 -1
  47. package/dist/src/db/migrations/v18-skill-versions-real-content-hash.d.ts +36 -0
  48. package/dist/src/db/migrations/v18-skill-versions-real-content-hash.d.ts.map +1 -0
  49. package/dist/src/db/migrations/v18-skill-versions-real-content-hash.js +38 -0
  50. package/dist/src/db/migrations/v18-skill-versions-real-content-hash.js.map +1 -0
  51. package/dist/src/db/schema.d.ts +1 -1
  52. package/dist/src/db/schema.d.ts.map +1 -1
  53. package/dist/src/db/schema.js +3 -1
  54. package/dist/src/db/schema.js.map +1 -1
  55. package/dist/src/exports/services.d.ts +3 -7
  56. package/dist/src/exports/services.d.ts.map +1 -1
  57. package/dist/src/exports/services.install.d.ts +18 -0
  58. package/dist/src/exports/services.install.d.ts.map +1 -0
  59. package/dist/src/exports/services.install.js +62 -0
  60. package/dist/src/exports/services.install.js.map +1 -0
  61. package/dist/src/exports/services.js +12 -32
  62. package/dist/src/exports/services.js.map +1 -1
  63. package/dist/src/exports/types.d.ts +1 -1
  64. package/dist/src/exports/types.d.ts.map +1 -1
  65. package/dist/src/index.d.ts +6 -6
  66. package/dist/src/index.d.ts.map +1 -1
  67. package/dist/src/index.js +8 -5
  68. package/dist/src/index.js.map +1 -1
  69. package/dist/src/install/agent-config-merge.json.d.ts +5 -4
  70. package/dist/src/install/agent-config-merge.json.d.ts.map +1 -1
  71. package/dist/src/install/agent-config-merge.json.js +10 -9
  72. package/dist/src/install/agent-config-merge.json.js.map +1 -1
  73. package/dist/src/install/agent-config-merge.types.d.ts +11 -1
  74. package/dist/src/install/agent-config-merge.types.d.ts.map +1 -1
  75. package/dist/src/install/agent-config-merge.types.js.map +1 -1
  76. package/dist/src/install/agent-harness-targets.d.ts +30 -2
  77. package/dist/src/install/agent-harness-targets.d.ts.map +1 -1
  78. package/dist/src/install/agent-harness-targets.js +17 -0
  79. package/dist/src/install/agent-harness-targets.js.map +1 -1
  80. package/dist/src/install/agent-manifest-path-guard.d.ts +28 -3
  81. package/dist/src/install/agent-manifest-path-guard.d.ts.map +1 -1
  82. package/dist/src/install/agent-manifest-path-guard.js +59 -3
  83. package/dist/src/install/agent-manifest-path-guard.js.map +1 -1
  84. package/dist/src/install/agent-manifest-path-guard.test.js +27 -1
  85. package/dist/src/install/agent-manifest-path-guard.test.js.map +1 -1
  86. package/dist/src/install/agent-pack-installer.antigravity-mcp.d.ts +74 -0
  87. package/dist/src/install/agent-pack-installer.antigravity-mcp.d.ts.map +1 -0
  88. package/dist/src/install/agent-pack-installer.antigravity-mcp.js +106 -0
  89. package/dist/src/install/agent-pack-installer.antigravity-mcp.js.map +1 -0
  90. package/dist/src/install/agent-pack-installer.antigravity-mcp.test.d.ts +2 -0
  91. package/dist/src/install/agent-pack-installer.antigravity-mcp.test.d.ts.map +1 -0
  92. package/dist/src/install/agent-pack-installer.antigravity-mcp.test.js +157 -0
  93. package/dist/src/install/agent-pack-installer.antigravity-mcp.test.js.map +1 -0
  94. package/dist/src/install/agent-pack-installer.cursor-mcp.d.ts +53 -0
  95. package/dist/src/install/agent-pack-installer.cursor-mcp.d.ts.map +1 -0
  96. package/dist/src/install/agent-pack-installer.cursor-mcp.js +207 -0
  97. package/dist/src/install/agent-pack-installer.cursor-mcp.js.map +1 -0
  98. package/dist/src/install/agent-pack-installer.cursor-mcp.test.d.ts +2 -0
  99. package/dist/src/install/agent-pack-installer.cursor-mcp.test.d.ts.map +1 -0
  100. package/dist/src/install/agent-pack-installer.cursor-mcp.test.js +285 -0
  101. package/dist/src/install/agent-pack-installer.cursor-mcp.test.js.map +1 -0
  102. package/dist/src/install/agent-pack-installer.d.ts +8 -0
  103. package/dist/src/install/agent-pack-installer.d.ts.map +1 -1
  104. package/dist/src/install/agent-pack-installer.entry.d.ts +120 -3
  105. package/dist/src/install/agent-pack-installer.entry.d.ts.map +1 -1
  106. package/dist/src/install/agent-pack-installer.entry.js +166 -3
  107. package/dist/src/install/agent-pack-installer.entry.js.map +1 -1
  108. package/dist/src/install/agent-pack-installer.js +97 -3
  109. package/dist/src/install/agent-pack-installer.js.map +1 -1
  110. package/dist/src/install/agent-pack-installer.types.d.ts +27 -0
  111. package/dist/src/install/agent-pack-installer.types.d.ts.map +1 -1
  112. package/dist/src/install/agent-pack-installer.types.js +6 -0
  113. package/dist/src/install/agent-pack-installer.types.js.map +1 -1
  114. package/dist/src/install/agent-pack-installer.workspace-scope.test.d.ts +2 -0
  115. package/dist/src/install/agent-pack-installer.workspace-scope.test.d.ts.map +1 -0
  116. package/dist/src/install/agent-pack-installer.workspace-scope.test.js +148 -0
  117. package/dist/src/install/agent-pack-installer.workspace-scope.test.js.map +1 -0
  118. package/dist/src/install/agent-pack-uninstaller.d.ts +18 -7
  119. package/dist/src/install/agent-pack-uninstaller.d.ts.map +1 -1
  120. package/dist/src/install/agent-pack-uninstaller.js +59 -9
  121. package/dist/src/install/agent-pack-uninstaller.js.map +1 -1
  122. package/dist/src/install/agent-pack-uninstaller.test.js +74 -1
  123. package/dist/src/install/agent-pack-uninstaller.test.js.map +1 -1
  124. package/dist/src/install/fan-out.d.ts.map +1 -1
  125. package/dist/src/install/fan-out.js +6 -0
  126. package/dist/src/install/fan-out.js.map +1 -1
  127. package/dist/src/install/index.d.ts +2 -0
  128. package/dist/src/install/index.d.ts.map +1 -1
  129. package/dist/src/install/index.js +2 -0
  130. package/dist/src/install/index.js.map +1 -1
  131. package/dist/src/install/workspace-scope.d.ts +207 -0
  132. package/dist/src/install/workspace-scope.d.ts.map +1 -0
  133. package/dist/src/install/workspace-scope.js +275 -0
  134. package/dist/src/install/workspace-scope.js.map +1 -0
  135. package/dist/src/install/workspace-scope.test.d.ts +2 -0
  136. package/dist/src/install/workspace-scope.test.d.ts.map +1 -0
  137. package/dist/src/install/workspace-scope.test.js +378 -0
  138. package/dist/src/install/workspace-scope.test.js.map +1 -0
  139. package/dist/src/security/__tests__/pathValidation.test.js +30 -1
  140. package/dist/src/security/__tests__/pathValidation.test.js.map +1 -1
  141. package/dist/src/services/SubagentGenerator.client-profiles.d.ts +258 -0
  142. package/dist/src/services/SubagentGenerator.client-profiles.d.ts.map +1 -0
  143. package/dist/src/services/SubagentGenerator.client-profiles.js +260 -0
  144. package/dist/src/services/SubagentGenerator.client-profiles.js.map +1 -0
  145. package/dist/src/services/SubagentGenerator.d.ts +19 -41
  146. package/dist/src/services/SubagentGenerator.d.ts.map +1 -1
  147. package/dist/src/services/SubagentGenerator.helpers.d.ts +64 -0
  148. package/dist/src/services/SubagentGenerator.helpers.d.ts.map +1 -0
  149. package/dist/src/services/SubagentGenerator.helpers.js +228 -0
  150. package/dist/src/services/SubagentGenerator.helpers.js.map +1 -0
  151. package/dist/src/services/SubagentGenerator.js +66 -208
  152. package/dist/src/services/SubagentGenerator.js.map +1 -1
  153. package/dist/src/services/SubagentGenerator.types.d.ts +45 -0
  154. package/dist/src/services/SubagentGenerator.types.d.ts.map +1 -0
  155. package/dist/src/services/SubagentGenerator.types.js +14 -0
  156. package/dist/src/services/SubagentGenerator.types.js.map +1 -0
  157. package/dist/src/services/TransformationService.d.ts +18 -61
  158. package/dist/src/services/TransformationService.d.ts.map +1 -1
  159. package/dist/src/services/TransformationService.js +29 -17
  160. package/dist/src/services/TransformationService.js.map +1 -1
  161. package/dist/src/services/TransformationService.types.d.ts +74 -0
  162. package/dist/src/services/TransformationService.types.d.ts.map +1 -0
  163. package/dist/src/services/TransformationService.types.js +8 -0
  164. package/dist/src/services/TransformationService.types.js.map +1 -0
  165. package/dist/src/services/__tests__/SubagentGenerator.client-profiles.test.d.ts +5 -0
  166. package/dist/src/services/__tests__/SubagentGenerator.client-profiles.test.d.ts.map +1 -0
  167. package/dist/src/services/__tests__/SubagentGenerator.client-profiles.test.js +72 -0
  168. package/dist/src/services/__tests__/SubagentGenerator.client-profiles.test.js.map +1 -0
  169. package/dist/src/services/__tests__/SubagentGenerator.helpers.test.d.ts +2 -0
  170. package/dist/src/services/__tests__/SubagentGenerator.helpers.test.d.ts.map +1 -0
  171. package/dist/src/services/__tests__/SubagentGenerator.helpers.test.js +61 -0
  172. package/dist/src/services/__tests__/SubagentGenerator.helpers.test.js.map +1 -0
  173. package/dist/src/services/__tests__/SubagentGenerator.test.js +155 -0
  174. package/dist/src/services/__tests__/SubagentGenerator.test.js.map +1 -1
  175. package/dist/src/services/__tests__/TransformationService.test.js +48 -0
  176. package/dist/src/services/__tests__/TransformationService.test.js.map +1 -1
  177. package/dist/src/services/agent-pack/agent-pack.test.js +1 -0
  178. package/dist/src/services/agent-pack/agent-pack.test.js.map +1 -1
  179. package/dist/src/services/agent-pack/prompt-source.d.ts +1 -1
  180. package/dist/src/services/agent-pack/prompt-source.d.ts.map +1 -1
  181. package/dist/src/services/agent-pack/prompt-source.js +10 -3
  182. package/dist/src/services/agent-pack/prompt-source.js.map +1 -1
  183. package/dist/src/services/agent-pack/types.d.ts +26 -2
  184. package/dist/src/services/agent-pack/types.d.ts.map +1 -1
  185. package/dist/src/services/agent-pack/types.js +13 -0
  186. package/dist/src/services/agent-pack/types.js.map +1 -1
  187. package/dist/src/services/agent-tool-profile.d.ts.map +1 -1
  188. package/dist/src/services/agent-tool-profile.js +7 -0
  189. package/dist/src/services/agent-tool-profile.js.map +1 -1
  190. package/dist/src/services/agent-tool-profile.test.js +2 -2
  191. package/dist/src/services/skill-content-comparison.d.ts +71 -0
  192. package/dist/src/services/skill-content-comparison.d.ts.map +1 -0
  193. package/dist/src/services/skill-content-comparison.js +90 -0
  194. package/dist/src/services/skill-content-comparison.js.map +1 -0
  195. package/dist/src/services/skill-content-comparison.test.d.ts +6 -0
  196. package/dist/src/services/skill-content-comparison.test.d.ts.map +1 -0
  197. package/dist/src/services/skill-content-comparison.test.js +83 -0
  198. package/dist/src/services/skill-content-comparison.test.js.map +1 -0
  199. package/dist/src/services/skill-identity-classification.d.ts +202 -0
  200. package/dist/src/services/skill-identity-classification.d.ts.map +1 -0
  201. package/dist/src/services/skill-identity-classification.js +295 -0
  202. package/dist/src/services/skill-identity-classification.js.map +1 -0
  203. package/dist/src/services/skill-identity-classification.test.d.ts +6 -0
  204. package/dist/src/services/skill-identity-classification.test.d.ts.map +1 -0
  205. package/dist/src/services/skill-identity-classification.test.js +314 -0
  206. package/dist/src/services/skill-identity-classification.test.js.map +1 -0
  207. package/dist/src/services/skill-installation.content.d.ts.map +1 -1
  208. package/dist/src/services/skill-installation.content.js +6 -1
  209. package/dist/src/services/skill-installation.content.js.map +1 -1
  210. package/dist/src/services/skill-installation.helpers.d.ts +8 -15
  211. package/dist/src/services/skill-installation.helpers.d.ts.map +1 -1
  212. package/dist/src/services/skill-installation.helpers.js +11 -105
  213. package/dist/src/services/skill-installation.helpers.js.map +1 -1
  214. package/dist/src/services/skill-installation.helpers.test.js +106 -1
  215. package/dist/src/services/skill-installation.helpers.test.js.map +1 -1
  216. package/dist/src/services/skill-installation.service.js +1 -1
  217. package/dist/src/services/skill-installation.service.js.map +1 -1
  218. package/dist/src/services/skill-installation.types.d.ts +33 -0
  219. package/dist/src/services/skill-installation.types.d.ts.map +1 -1
  220. package/dist/src/services/skill-installation.types.js.map +1 -1
  221. package/dist/src/services/skill-installation.uninstall.d.ts +84 -0
  222. package/dist/src/services/skill-installation.uninstall.d.ts.map +1 -0
  223. package/dist/src/services/skill-installation.uninstall.js +252 -0
  224. package/dist/src/services/skill-installation.uninstall.js.map +1 -0
  225. package/dist/src/services/skill-manifest.d.ts +41 -0
  226. package/dist/src/services/skill-manifest.d.ts.map +1 -1
  227. package/dist/src/services/skill-manifest.js +93 -0
  228. package/dist/src/services/skill-manifest.js.map +1 -1
  229. package/dist/src/services/skill-manifest.test.js +27 -0
  230. package/dist/src/services/skill-manifest.test.js.map +1 -1
  231. package/dist/src/sync/SyncEngine.d.ts.map +1 -1
  232. package/dist/src/sync/SyncEngine.js +69 -77
  233. package/dist/src/sync/SyncEngine.js.map +1 -1
  234. package/dist/src/telemetry/agent-marker.d.ts +8 -0
  235. package/dist/src/telemetry/agent-marker.d.ts.map +1 -1
  236. package/dist/src/telemetry/agent-marker.js +7 -0
  237. package/dist/src/telemetry/agent-marker.js.map +1 -1
  238. package/dist/src/telemetry/agent-marker.test.js +7 -1
  239. package/dist/src/telemetry/agent-marker.test.js.map +1 -1
  240. package/dist/src/telemetry/index.d.ts +1 -1
  241. package/dist/src/telemetry/index.d.ts.map +1 -1
  242. package/dist/src/telemetry/index.js +1 -1
  243. package/dist/src/telemetry/index.js.map +1 -1
  244. package/dist/src/telemetry/wrap.d.ts +6 -0
  245. package/dist/src/telemetry/wrap.d.ts.map +1 -1
  246. package/dist/src/telemetry/wrap.js +65 -10
  247. package/dist/src/telemetry/wrap.js.map +1 -1
  248. package/dist/src/telemetry/wrap.test.js +81 -1
  249. package/dist/src/telemetry/wrap.test.js.map +1 -1
  250. package/dist/src/telemetry/wrap.tool-call-sink.test.d.ts +26 -0
  251. package/dist/src/telemetry/wrap.tool-call-sink.test.d.ts.map +1 -0
  252. package/dist/src/telemetry/wrap.tool-call-sink.test.js +162 -0
  253. package/dist/src/telemetry/wrap.tool-call-sink.test.js.map +1 -0
  254. package/dist/src/types/skill.d.ts +9 -1
  255. package/dist/src/types/skill.d.ts.map +1 -1
  256. package/dist/src/utils/index.d.ts +1 -1
  257. package/dist/src/utils/index.d.ts.map +1 -1
  258. package/dist/src/utils/index.js +1 -1
  259. package/dist/src/utils/index.js.map +1 -1
  260. package/dist/src/utils/version-check.d.ts +61 -0
  261. package/dist/src/utils/version-check.d.ts.map +1 -1
  262. package/dist/src/utils/version-check.js +78 -1
  263. package/dist/src/utils/version-check.js.map +1 -1
  264. package/dist/src/utils/version-check.test.js +130 -1
  265. package/dist/src/utils/version-check.test.js.map +1 -1
  266. package/dist/tests/db/migration-runner-race.test.js +19 -9
  267. package/dist/tests/db/migration-runner-race.test.js.map +1 -1
  268. package/dist/tests/install/fan-out.test.js +27 -0
  269. package/dist/tests/install/fan-out.test.js.map +1 -1
  270. package/dist/tests/skill-scanner/allowlist.test.js +7 -1
  271. package/dist/tests/skill-scanner/allowlist.test.js.map +1 -1
  272. package/dist/tests/sync/SyncEngine.abort.test.js +15 -11
  273. package/dist/tests/sync/SyncEngine.abort.test.js.map +1 -1
  274. package/dist/tests/sync/SyncEngine.status.test.js +1 -1
  275. package/dist/tests/sync/SyncEngine.status.test.js.map +1 -1
  276. package/dist/tests/sync/SyncEngine.test.d.ts +11 -2
  277. package/dist/tests/sync/SyncEngine.test.d.ts.map +1 -1
  278. package/dist/tests/sync/SyncEngine.test.js +164 -13
  279. package/dist/tests/sync/SyncEngine.test.js.map +1 -1
  280. package/dist/tests/unit/migrations/migration-v18.test.d.ts +16 -0
  281. package/dist/tests/unit/migrations/migration-v18.test.d.ts.map +1 -0
  282. package/dist/tests/unit/migrations/migration-v18.test.js +192 -0
  283. package/dist/tests/unit/migrations/migration-v18.test.js.map +1 -0
  284. package/dist/tests/unit/services/skill-installation.content.test.js +65 -1
  285. package/dist/tests/unit/services/skill-installation.content.test.js.map +1 -1
  286. package/dist/tests/unit/services/skill-installation.service.test.js +9 -8
  287. package/dist/tests/unit/services/skill-installation.service.test.js.map +1 -1
  288. package/dist/tests/unit/sync-engine.source-aware.test.js +5 -5
  289. package/dist/tests/unit/sync-engine.source-aware.test.js.map +1 -1
  290. package/package.json +3 -3
package/CHANGELOG.md CHANGED
@@ -4,9 +4,174 @@ All notable changes to `@skillsmith/core` are documented here.
4
4
 
5
5
  ## [Unreleased]
6
6
 
7
+ ## v0.12.2
8
+
9
+ - **Feature**: SMI-6343 Wave 4 -- apply_manifest_reconcile tool (#2715)
10
+ - **Other**: SMI-6362: Wire Team/Enterprise analytics tools to cloud-aggregated MCP tool-call data (#2698)
11
+ - **Feature**: SMI-6343 Wave 3 -- tamper-check classification (#2710)
12
+ - **Added**: `SkillManifestEntry` (`services/skill-installation.types.ts`) gains two optional
13
+ fields per ADR-145 (manifest provenance as a second trust axis, orthogonal to `source`):
14
+ `provenance?: 'local' | 'registry'` (who asserts this entry's identity — absent means a legacy
15
+ entry with no assertion ever recorded, never defaulting to `'registry'`) and
16
+ `verifiedAt?: string` (ISO-8601 UTC timestamp of the last successful re-verification of the
17
+ entry's on-disk content hash against the registry's current content hash for the claimed `id`).
18
+ Written by `@skillsmith/mcp-server`'s new `apply_manifest_reconcile` tool (SMI-6343 Wave 4); read
19
+ by SMI-6345 Wave 2's E1 identity-evidence gate. `AGENT_TOOL_PROFILE_NAMES`
20
+ (`services/agent-tool-profile.ts`) gains `apply_manifest_reconcile` (17 entries).
21
+ - **Added**: `emitToolCallEvent()` and a pluggable `TelemetryIdentityProvider` in
22
+ `audit/remote-audit.ts` — posts a `tool_call` telemetry event carrying the
23
+ server-verified `team_id`/actor identity (never a client-supplied credential,
24
+ per SMI-6362 D-2a/D-2b) to the `events` edge function, with
25
+ `getTelemetryEmitStats()`/`_resetTelemetryEmitStatsForTests()` for test
26
+ observability. `telemetry/wrap.ts` gained `runWithToolNameContext()` so the
27
+ tool name is available to the emitter without threading it through every
28
+ call site. `AgentMarker` (`telemetry/agent-marker.ts`) now carries an
29
+ optional `sessionId`, sourced from the marker file's `session_id` only (no
30
+ Tier-1 harness injects it via `_meta` yet), so a `tool_call` row can be
31
+ grouped by harness session (SMI-6362 §1). Wires Team/Enterprise usage
32
+ analytics to cloud-aggregated MCP tool-call data (SMI-6362 Wave 1).
33
+ - **Added**: `skill-identity-classification.ts` — a shared tamper-check classification module
34
+ consumed by both `@skillsmith/mcp-server` (`skill_outdated`) and `@skillsmith/cli`
35
+ (`skillsmith update`), so the two packages cannot drift into two independently-maintained
36
+ implementations of the same logic (SMI-6343 Wave 3). Runs three contradiction signals
37
+ against a manifest entry already known to differ from the registry — owner-mismatch
38
+ (`id` vs `source`), path-unresolved (`installPath` outside the claimed client's root), and
39
+ front-matter-contradiction (on-disk `author`/`name` vs the registry's record, fail-closed
40
+ to `unknown` per ADR-144/145 when the registry lookup can't complete) — plus a fourth
41
+ local-edit check (`hasRecordedLocalEdit()`) that distinguishes a benign local edit
42
+ (`local-drift`) from a genuine version bump (`outdated`). Exports the full five-state
43
+ `OutdatedClassificationState` (`current`/`outdated`/`local-drift`/`identity-mismatch`/
44
+ `unknown`) from `@skillsmith/core`.
45
+ - **Fix**: `skill_versions.content_hash` (`SyncEngine.upsertSkills()`) now records the
46
+ registry's real SKILL.md content hash instead of a hash of a JSON metadata proxy
47
+ (`{id, name, description, updated_at}`) — the proxy meant every reader comparing against
48
+ this column (`skill_outdated`, `skill_updates`, the CLI's `skills-directory.ts`) was
49
+ structurally unable to detect a real content change (SMI-6343 Wave 2). New migration v18
50
+ purges pre-fix rows rather than leaving the two incompatible hash spaces mixed in the same
51
+ table, which would otherwise make every skill with prior history report a universal false
52
+ "update available". Adds a shared `compareSkillContentHashes()` comparator
53
+ (`@skillsmith/core`) so the three readers cannot drift apart on this comparison again.
54
+ - **Fix**: `ManifestManager` (`@skillsmith/core/services/skill-manifest`) now refuses to lock
55
+ or write a manifest located inside the real user home while running under vitest
56
+ (SMI-6343 Wave 1). This closes a class of leak evidenced by fixture rows found in a real
57
+ user's `~/.skillsmith/manifest.json`, one of them claiming an unrelated live registry skill
58
+ id — traced to two mcp-server integration tests whose manifest path defaulted to
59
+ `os.homedir()/.skillsmith/manifest.json` before ADR-139 (SMI-6274 Wave 4) gave them an
60
+ override two days before this fix. The primary fix is a per-run `$HOME` sandbox installed
61
+ by `vitest.setup.ts` and inherited by every vitest config through `vitest.preset.ts`; the
62
+ new `assertNotRealUserHome()` guard (now exported as `assertNotRealUserHome`) is the
63
+ defense-in-depth backstop for a manifest path that reaches the real home anyway. It is
64
+ gated on `process.env.VITEST` and compares against the pre-sandbox home captured in
65
+ `SKILLSMITH_TEST_REAL_HOME`, falling back to `os.userInfo()` (which ignores `$HOME`) when
66
+ that is absent. No production code path is affected.
67
+
68
+ Adversarial review found three sibling manifest-write implementations with the identical
69
+ homedir-derived, no-override-parameter shape, each now wired to the same guard:
70
+ `packages/mcp-server/src/tools/install.helpers.manifest.ts` (`saveManifest`,
71
+ `acquireManifestLock`), `packages/cli/src/utils/manifest.ts` (`saveManifest`), and
72
+ `packages/core/src/install/fan-out.ts` (`saveManifest`, writing
73
+ `~/.skillsmith/links/manifest.json`). Also fixed: a `vitest.setup.ts` idempotency gap under
74
+ `vitest run --no-isolate` (empirically demonstrated) that could silently disable the guard's
75
+ ground truth after the first test file in a reused worker; `scripts/audit-standards.mjs`
76
+ Check 65's `manifestPath` override-evidence pattern tightened from a bare word-boundary
77
+ match (which a stray comment could satisfy) to require assignment/property context; and its
78
+ `SKILLSMITH_HOME` override credit removed since no writer honors that variable.
79
+
80
+ - **Feature**: companion subagent files (`generateSubagent`/`generateMinimalSubagent`,
81
+ `@skillsmith/core/services/SubagentGenerator`, SMI-6276 Wave 6 Step 1) now generate
82
+ client-specific frontmatter instead of Claude-shaped tool names/model tiers for every
83
+ client. New `SubagentGenerator.client-profiles.ts` defines an exhaustive per-client
84
+ generation profile (frontmatter fields, tool-vocabulary policy, model policy). AntiGravity
85
+ gets its own mapped tool vocabulary as a YAML array (its own docs warn an unmapped tool
86
+ name can hang the subagent process) and no Claude model field (a different vendor/model
87
+ family); Cursor mirrors Claude Code's shape exactly (documented compatibility surface);
88
+ Copilot/OpenCode/Windsurf/others omit `tools:`/`model:` per each client's own confirmed
89
+ reasoning. `TransformationService`'s cache key now includes the target client (a
90
+ same-skill-different-client request could otherwise be served a stale other-client's
91
+ cached result); `generateSubagentContent()`'s `description:` frontmatter field is now
92
+ JSON.stringify()-quoted as a valid YAML double-quoted scalar (previously broke on a
93
+ description containing `: ` or ` #`). `installFromContent()` now correctly forwards its
94
+ resolved client into `applyOptimization()` instead of silently defaulting to claude-code.
95
+
96
+ - **Feature**: `sklx agent install` now supports AntiGravity as a harness (`@skillsmith/core/install`,
97
+ SMI-6275 Wave 5, closing the last unshipped ask of GH#2166). `HarnessId` gains `'antigravity'`,
98
+ but — unlike every other MCP-capable harness — it is deliberately excluded from `McpHarnessId`
99
+ and has no entry in `AGENT_MCP_TARGETS`: AntiGravity's MCP config is WORKSPACE-anchored
100
+ (`.agents/mcp_config.json`, verified live against antigravity.google/docs/ide/mcp/ and
101
+ antigravity.google/docs/cli/mcp/ — same standard `mcpServers`-keyed JSON shape as
102
+ claude-code/copilot/windsurf, registered under the package-scoped key `@skillsmith/mcp-server`
103
+ to match AntiGravity's own docs snippet, the same key-alignment fix SMI-6279 made for Cursor),
104
+ not home-anchored like the shared `Record`'s other entries. New
105
+ `agent-pack-installer.antigravity-mcp.ts` (mirroring the Cursor split) owns its path resolution
106
+ + entry-value shape entirely; only the entry-value builder is genuinely new code, reusing
107
+ `mergeJsonMcpEntry()` for the actual write. `installAgentPack` now resolves AntiGravity's scope
108
+ on every run (not just `--scope workspace`) — a bare `agent install` auto-detects an
109
+ already-existing `.agents/` marker (ADR-139 point 2 rank 4) and configures it, while
110
+ `--scope workspace` remains the only path that can CREATE one (ADR-139 point 5); AntiGravity now
111
+ always gets a report row (`detected: false` with an explanatory note when its workspace scope
112
+ doesn't resolve), matching every other harness's reporting shape instead of Wave 4's
113
+ row-omission. Support tier 3 (MCP config only) — no hooks (no documented AntiGravity hook
114
+ system found) and no named-agent shim this wave, both stated decisions. `agent-manifest-path-guard.ts`
115
+ gains a second, WORKSPACE-relative allowlist (alongside the existing home-relative one) so
116
+ `uninstallAgentPack` can actually remove AntiGravity's two workspace-scoped artifacts instead of
117
+ silently rejecting them as outside every known install target — closes a latent gap in Wave 4's
118
+ own skill-pack-only implementation, caught while extending the same guard for the MCP config file.
119
+
120
+ - **Feature**: ADR-139 global-vs-workspace install scope resolution (`@skillsmith/core/install`,
121
+ SMI-6274 Wave 4). New `resolveSkillScope()`/`resolveScopedSkillsDir()` resolve whether an
122
+ install/list/update/remove targets a client's global directory (`CLIENT_NATIVE_PATHS`) or a
123
+ workspace-local one (`<workspace-root>/<client's CLIENT_WORKSPACE_SEGMENTS>`, a new sibling
124
+ table to `CLIENT_NATIVE_PATHS`), by a five-rank precedence: explicit scope > `SKILLSMITH_SCOPE`
125
+ env var > per-client `~/.skillsmith/config.json` default (new `defaultScope` field) >
126
+ auto-detection of an EXISTING workspace marker > global. The workspace-root boundary is
127
+ marker-first, then nearest-ancestor `.git` (file OR directory, so worktrees and submodules
128
+ each resolve to their own root) via a new `findWorkspaceRoot()` — deliberately not a reuse of
129
+ `findMainRepoRoot()` (`doc-retrieval-mcp`), whose opposite `.git`-must-be-a-directory predicate
130
+ exists for a different purpose. Workspace-scoped installs record in a workspace-local
131
+ `<root>/.skillsmith/manifest.json`, leaving the global manifest and `manifestKeyFor()`
132
+ completely untouched. `installAgentPack({ scope: 'workspace' })` can now bootstrap AntiGravity
133
+ as a target in a fresh repo by creating `.agents/skills` — the only path permitted to create a
134
+ workspace directory implicitly. `performUninstall()` now adopts an untracked skill (present on
135
+ disk, no manifest entry) by reconstructing a manifest entry from disk state instead of requiring
136
+ `force=true`. `ManifestManager` gained a public `path` getter. `buildAdoptedManifestEntry()` —
137
+ the reconstruction builder `performUninstall()` uses — is now exported at the package root
138
+ (`@skillsmith/core`) alongside `manifestKeyFor`/`hashContent` so `@skillsmith/cli`'s `update`
139
+ path reuses the identical adoption logic instead of a second, driftable copy (PR review
140
+ follow-up: `update` previously never adopted an untracked skill at all, only `remove` did, and
141
+ could dead-end at `'unresolvable'` with zero side effects even when a skill's source genuinely
142
+ couldn't be recovered).
143
+
144
+ - **Fix**: `agent install` no longer writes a broken Cursor MCP registration. Two independent
145
+ bugs, both from before Cursor's MCP snippet was fixed in SMI-5893: the installer still wrote
146
+ the `npx`-form command that reliably fails inside Cursor's bundled Node, without the
147
+ `SKILLSMITH_CLIENT` variable, so even the documented fix-it command (`agent install`) rewrote
148
+ the same broken config; and the installer's entry lived under a different JSON key than the
149
+ one users are told to paste from the website, so following both instructions left two
150
+ unreconciled server entries in the same file instead of one. Re-running `agent install` now
151
+ also cleans up a pre-fix install's stale entry (GH#2368, SMI-6279)
152
+
153
+ - **Breaking**: `SyncEngine` now fetches via a new `registry-sync` Edge Function instead of
154
+ abusing the public `skills-search` endpoint with 8 hardcoded broad queries — this transport
155
+ is Team+ tier only server-side (see `@skillsmith/cli`'s changelog and ADR-136), so `SyncEngine.
156
+ sync()` will fail for a Community/Individual-tier API client. Also fixes a real completeness
157
+ gap in the old mechanism: any skill whose name/tags never matched one of the 8 hardcoded terms
158
+ was silently never synced. `since` is now forwarded server-side for differential syncs instead
159
+ of filtering client-side after downloading the entire registry. New `SkillsmithApiClient`
160
+ methods `syncRegistry()`/`getStats()` back this change (SMI-6236)
161
+
162
+ ## v0.12.1
163
+
164
+ - **Fix**: logout/whoami now detect JWT device-code sessions (#2578)
165
+ - **Fix**: new `clearCredentials()` export (`config/token-credentials.ts`) clears a stored
166
+ JWT device-code session (access/refresh token, expiry) from both the config file and the
167
+ OS keyring `refresh-token` entry — previously there was no way to end a JWT session at all;
168
+ `clearApiKey()` only ever touched the separate legacy `apiKey` field. (SMI-6235)
169
+ - **Docs**: README's framing sentence updated from the "lifecycle layer" tagline to a plain
170
+ descriptive sentence ("a registry for sharing, scanning, and tracking agent skills across
171
+ teams") as part of the site-wide positioning reframe. Wording-only. (SMI-6194)
172
+
7
173
  ## v0.12.0
8
174
 
9
- - **Cadence**: Mechanical cadence alignment (no changes since v0.11.7).
10
175
  - **Feature**: new `resolveSessionTier` client (`sync/license-status-client.ts`, SMI-6098) —
11
176
  authenticates the stored device-login session against `/license-status` (proactively refreshing
12
177
  via the existing `resolveAccessToken` helper) so the MCP server can resolve a real subscription
package/README.md CHANGED
@@ -2,23 +2,22 @@
2
2
 
3
3
  Core library for Skillsmith — database operations, search, caching, security, analytics, and **multi-language codebase analysis** for agent skill management.
4
4
 
5
- Part of Skillsmith: a lifecycle layer for agent skills across teams.
5
+ Part of Skillsmith: a registry for sharing, scanning, and tracking agent skills across teams.
6
6
 
7
7
  ## Contents
8
8
 
9
- - [What's New](#whats-new-in-v0120)
9
+ - [What's New](#whats-new-in-v0122)
10
10
  - [Installation](#installation)
11
11
  - [Quick Start](#quick-start)
12
12
  - [Features](#features)
13
13
  - [Exports](#exports)
14
14
 
15
- ## What's New in v0.12.0
15
+ ## What's New in v0.12.2
16
16
 
17
- - **Security-status reporting unified**: CLI and MCP now derive security-scan status (pass/fail, risk score, findings count) from one shared `deriveSecuritySummaryFromApiSkill`/`deriveSecuritySummaryFromSkillRow`, instead of two independently-maintained copies that could disagree on the same skill.
18
- - **`skill_compare` reuses `get_skill`'s resolution**: new shared `resolveSkillApiFirst()` fixes compare only ever hitting the local SQLite cache (no longer kept in sync with the remote-first registry), which made real, searchable skills report "not found."
19
- - **New two-level owned-lock primitive** (`config/owned-lock`) replacing the single-level, age-based config lock closes a case where two concurrent reclaimers could both treat a stale lock as safe to unlink.
20
- - **Private-registry install support**: `SkillInstallationService.installFromContent()` installs an already-resolved skill (e.g. from a private registry) through the same scan/write/manifest pipeline as a GitHub-fetched install.
21
- - **Quiet mode covers one more warning path**: `SKILLSMITH_QUIET` now also suppresses the WASM-SQLite-driver fallback notice, previously printed unconditionally.
17
+ - **New `resolveSessionTier` client** (`sync/license-status-client.ts`): authenticates a stored `skillsmith login` session against `/license-status` so the MCP server can resolve a real subscription tier without a separately-configured `SKILLSMITH_API_KEY`, instead of silently falling back to `community`.
18
+ - **Scanner: bundled-file scan expanded to operational code** (Gap 8 of the ClawHavoc remediation): the indexer now reads `scripts/`, `src/`, and `bin/` alongside `SKILL.md`, closing a blind spot where a backdoor buried mid-function in working operational code was structurally invisible.
19
+ - **Scanner fix**: the markdown indented-code-block heuristic was silently downgrading real non-markdown source findings from `high` to `medium` `analyzeMarkdownContext`/`SecurityScanner.scan()` now take an explicit `isMarkdown` parameter instead of assuming every scanned file is documentation.
20
+ - **Five new scanner detectors** (SMI-6033 Waves 3–4): `gatekeeper_bypass` (macOS quarantine-attribute stripping), `archive_evasion` (password-protected archives correlated with a fetch), a paste/snippet-host reputation detector, an encoded-payload decode-and-recursively-rescan detector, and `decoy_misdirection` (a fetch domain that doesn't match a nearby vendor-authority claim) plus a stronger multi-signal co-signal escalation model so several individually sub-threshold findings can now jointly escalate a weak `code_execution` finding to critical.
22
21
 
23
22
  See [CHANGELOG.md](./CHANGELOG.md) for previous releases.
24
23