@wrongstack/plugins 0.284.1 → 0.285.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 (263) hide show
  1. package/README.md +18 -14
  2. package/dist/accessibility-auditor/index.d.ts +38 -0
  3. package/dist/accessibility-auditor/index.d.ts.map +1 -0
  4. package/dist/accessibility-auditor.d.ts +2 -40
  5. package/dist/accessibility-auditor.js +5 -5
  6. package/dist/agent-handoff/index.d.ts +35 -0
  7. package/dist/agent-handoff/index.d.ts.map +1 -0
  8. package/dist/agent-handoff.d.ts +2 -37
  9. package/dist/agent-handoff.js +3 -2
  10. package/dist/api-compatibility-gate/index.d.ts +36 -0
  11. package/dist/api-compatibility-gate/index.d.ts.map +1 -0
  12. package/dist/api-compatibility-gate.d.ts +2 -38
  13. package/dist/api-compatibility-gate.js +6 -6
  14. package/dist/auto-doc/index.d.ts +20 -0
  15. package/dist/auto-doc/index.d.ts.map +1 -0
  16. package/dist/auto-doc.d.ts +2 -22
  17. package/dist/auto-doc.js +5 -5
  18. package/dist/auto-escalate/index.d.ts +43 -0
  19. package/dist/auto-escalate/index.d.ts.map +1 -0
  20. package/dist/auto-escalate.d.ts +2 -45
  21. package/dist/auto-escalate.js +5 -2
  22. package/dist/auto-i18n-extractor/index.d.ts +34 -0
  23. package/dist/auto-i18n-extractor/index.d.ts.map +1 -0
  24. package/dist/auto-i18n-extractor.d.ts +2 -36
  25. package/dist/auto-i18n-extractor.js +5 -5
  26. package/dist/branch-guard/index.d.ts +32 -0
  27. package/dist/branch-guard/index.d.ts.map +1 -0
  28. package/dist/branch-guard.d.ts +2 -34
  29. package/dist/branch-guard.js +4 -4
  30. package/dist/catalog.d.ts +39 -0
  31. package/dist/catalog.d.ts.map +1 -0
  32. package/dist/changelog-writer/index.d.ts +71 -0
  33. package/dist/changelog-writer/index.d.ts.map +1 -0
  34. package/dist/changelog-writer.d.ts +2 -73
  35. package/dist/changelog-writer.js +9 -5
  36. package/dist/checkpoint/index.d.ts +53 -0
  37. package/dist/checkpoint/index.d.ts.map +1 -0
  38. package/dist/checkpoint.d.ts +2 -55
  39. package/dist/checkpoint.js +6 -6
  40. package/dist/code-metrics/index.d.ts +29 -0
  41. package/dist/code-metrics/index.d.ts.map +1 -0
  42. package/dist/code-metrics.d.ts +2 -31
  43. package/dist/code-metrics.js +5 -5
  44. package/dist/commit-validator/index.d.ts +31 -0
  45. package/dist/commit-validator/index.d.ts.map +1 -0
  46. package/dist/commit-validator.d.ts +2 -33
  47. package/dist/commit-validator.js +5 -3
  48. package/dist/config-validator/index.d.ts +46 -0
  49. package/dist/config-validator/index.d.ts.map +1 -0
  50. package/dist/config-validator.d.ts +2 -48
  51. package/dist/config-validator.js +8 -4
  52. package/dist/context-pins/index.d.ts +43 -0
  53. package/dist/context-pins/index.d.ts.map +1 -0
  54. package/dist/context-pins.d.ts +2 -45
  55. package/dist/context-pins.js +5 -5
  56. package/dist/cost-tracker/index.d.ts +51 -0
  57. package/dist/cost-tracker/index.d.ts.map +1 -0
  58. package/dist/cost-tracker.d.ts +2 -53
  59. package/dist/cost-tracker.js +4 -4
  60. package/dist/cron/index.d.ts +12 -0
  61. package/dist/cron/index.d.ts.map +1 -0
  62. package/dist/cron.d.ts +2 -14
  63. package/dist/cron.js +3 -2
  64. package/dist/dead-code-detector/index.d.ts +32 -0
  65. package/dist/dead-code-detector/index.d.ts.map +1 -0
  66. package/dist/dead-code-detector.d.ts +2 -34
  67. package/dist/dead-code-detector.js +5 -5
  68. package/dist/dep-guard/index.d.ts +63 -0
  69. package/dist/dep-guard/index.d.ts.map +1 -0
  70. package/dist/dep-guard.d.ts +2 -65
  71. package/dist/dep-guard.js +6 -2
  72. package/dist/dependency-vulnerability-gate/index.d.ts +33 -0
  73. package/dist/dependency-vulnerability-gate/index.d.ts.map +1 -0
  74. package/dist/dependency-vulnerability-gate.d.ts +2 -35
  75. package/dist/dependency-vulnerability-gate.js +5 -5
  76. package/dist/diff-summary/index.d.ts +34 -0
  77. package/dist/diff-summary/index.d.ts.map +1 -0
  78. package/dist/diff-summary.d.ts +2 -36
  79. package/dist/diff-summary.js +5 -5
  80. package/dist/doc-sync-guard/index.d.ts +31 -0
  81. package/dist/doc-sync-guard/index.d.ts.map +1 -0
  82. package/dist/doc-sync-guard.d.ts +2 -33
  83. package/dist/doc-sync-guard.js +4 -4
  84. package/dist/duplicate-code-detector/index.d.ts +31 -0
  85. package/dist/duplicate-code-detector/index.d.ts.map +1 -0
  86. package/dist/duplicate-code-detector.d.ts +2 -33
  87. package/dist/duplicate-code-detector.js +5 -5
  88. package/dist/error-lens/index.d.ts +65 -0
  89. package/dist/error-lens/index.d.ts.map +1 -0
  90. package/dist/error-lens.d.ts +2 -67
  91. package/dist/error-lens.js +5 -2
  92. package/dist/feature-flag-tracker/index.d.ts +36 -0
  93. package/dist/feature-flag-tracker/index.d.ts.map +1 -0
  94. package/dist/feature-flag-tracker.d.ts +2 -38
  95. package/dist/feature-flag-tracker.js +5 -5
  96. package/dist/file-watcher/index.d.ts +12 -0
  97. package/dist/file-watcher/index.d.ts.map +1 -0
  98. package/dist/file-watcher.d.ts +2 -14
  99. package/dist/file-watcher.js +7 -7
  100. package/dist/format-on-save/index.d.ts +33 -0
  101. package/dist/format-on-save/index.d.ts.map +1 -0
  102. package/dist/format-on-save.d.ts +2 -35
  103. package/dist/format-on-save.js +6 -6
  104. package/dist/git-autocommit/index.d.ts +15 -0
  105. package/dist/git-autocommit/index.d.ts.map +1 -0
  106. package/dist/git-autocommit.d.ts +2 -17
  107. package/dist/git-autocommit.js +5 -5
  108. package/dist/import-organizer/index.d.ts +50 -0
  109. package/dist/import-organizer/index.d.ts.map +1 -0
  110. package/dist/import-organizer.d.ts +2 -52
  111. package/dist/import-organizer.js +6 -6
  112. package/dist/index.d.ts +186 -64
  113. package/dist/index.d.ts.map +1 -0
  114. package/dist/index.js +946 -394
  115. package/dist/injection-shield/index.d.ts +47 -0
  116. package/dist/injection-shield/index.d.ts.map +1 -0
  117. package/dist/injection-shield.d.ts +2 -49
  118. package/dist/injection-shield.js +4 -2
  119. package/dist/interface-contract-guard/index.d.ts +35 -0
  120. package/dist/interface-contract-guard/index.d.ts.map +1 -0
  121. package/dist/interface-contract-guard.d.ts +2 -37
  122. package/dist/interface-contract-guard.js +5 -5
  123. package/dist/knowledge-graph/index.d.ts +43 -0
  124. package/dist/knowledge-graph/index.d.ts.map +1 -0
  125. package/dist/knowledge-graph.d.ts +2 -45
  126. package/dist/knowledge-graph.js +5 -5
  127. package/dist/license-audit-gate/index.d.ts +32 -0
  128. package/dist/license-audit-gate/index.d.ts.map +1 -0
  129. package/dist/license-audit-gate.d.ts +2 -34
  130. package/dist/license-audit-gate.js +5 -5
  131. package/dist/lint-gate/index.d.ts +31 -0
  132. package/dist/lint-gate/index.d.ts.map +1 -0
  133. package/dist/lint-gate.d.ts +2 -33
  134. package/dist/lint-gate.js +7 -7
  135. package/dist/llm-cache/index.d.ts +54 -0
  136. package/dist/llm-cache/index.d.ts.map +1 -0
  137. package/dist/llm-cache.d.ts +2 -56
  138. package/dist/llm-cache.js +6 -4
  139. package/dist/loop-breaker/index.d.ts +4 -0
  140. package/dist/loop-breaker/index.d.ts.map +1 -0
  141. package/dist/loop-breaker.d.ts +2 -5
  142. package/dist/loop-breaker.js +4 -4
  143. package/dist/migration-planner/index.d.ts +28 -0
  144. package/dist/migration-planner/index.d.ts.map +1 -0
  145. package/dist/migration-planner.d.ts +2 -30
  146. package/dist/migration-planner.js +5 -5
  147. package/dist/model-router/index.d.ts +67 -0
  148. package/dist/model-router/index.d.ts.map +1 -0
  149. package/dist/model-router.d.ts +2 -69
  150. package/dist/model-router.js +5 -2
  151. package/dist/notify-hub/index.d.ts +43 -0
  152. package/dist/notify-hub/index.d.ts.map +1 -0
  153. package/dist/notify-hub.d.ts +2 -45
  154. package/dist/notify-hub.js +3 -2
  155. package/dist/path-guard/index.d.ts +52 -0
  156. package/dist/path-guard/index.d.ts.map +1 -0
  157. package/dist/path-guard.d.ts +2 -54
  158. package/dist/path-guard.js +5 -2
  159. package/dist/performance-regression-gate/index.d.ts +31 -0
  160. package/dist/performance-regression-gate/index.d.ts.map +1 -0
  161. package/dist/performance-regression-gate.d.ts +2 -33
  162. package/dist/performance-regression-gate.js +5 -5
  163. package/dist/plugin-stack-observer/index.d.ts +33 -0
  164. package/dist/plugin-stack-observer/index.d.ts.map +1 -0
  165. package/dist/plugin-stack-observer.d.ts +2 -35
  166. package/dist/plugin-stack-observer.js +3 -2
  167. package/dist/pr-drafter/index.d.ts +33 -0
  168. package/dist/pr-drafter/index.d.ts.map +1 -0
  169. package/dist/pr-drafter.d.ts +2 -35
  170. package/dist/pr-drafter.js +6 -6
  171. package/dist/prompt-firewall/index.d.ts +55 -0
  172. package/dist/prompt-firewall/index.d.ts.map +1 -0
  173. package/dist/prompt-firewall.d.ts +2 -57
  174. package/dist/prompt-firewall.js +5 -2
  175. package/dist/refactor-suggester/index.d.ts +36 -0
  176. package/dist/refactor-suggester/index.d.ts.map +1 -0
  177. package/dist/refactor-suggester.d.ts +2 -38
  178. package/dist/refactor-suggester.js +5 -5
  179. package/dist/release-notes-generator/index.d.ts +25 -0
  180. package/dist/release-notes-generator/index.d.ts.map +1 -0
  181. package/dist/release-notes-generator.d.ts +2 -27
  182. package/dist/release-notes-generator.js +28 -10
  183. package/dist/runtime/index.d.ts +124 -0
  184. package/dist/runtime/index.d.ts.map +1 -0
  185. package/dist/runtime.d.ts +1 -0
  186. package/dist/runtime.js +216 -0
  187. package/dist/schema-evolution-guard/index.d.ts +40 -0
  188. package/dist/schema-evolution-guard/index.d.ts.map +1 -0
  189. package/dist/schema-evolution-guard.d.ts +2 -42
  190. package/dist/schema-evolution-guard.js +5 -5
  191. package/dist/secret-scanner/index.d.ts +32 -0
  192. package/dist/secret-scanner/index.d.ts.map +1 -0
  193. package/dist/secret-scanner.d.ts +2 -34
  194. package/dist/secret-scanner.js +3 -2
  195. package/dist/security-hotspot-scanner/index.d.ts +28 -0
  196. package/dist/security-hotspot-scanner/index.d.ts.map +1 -0
  197. package/dist/security-hotspot-scanner.d.ts +2 -30
  198. package/dist/security-hotspot-scanner.js +5 -5
  199. package/dist/semantic-search-indexer/index.d.ts +36 -0
  200. package/dist/semantic-search-indexer/index.d.ts.map +1 -0
  201. package/dist/semantic-search-indexer.d.ts +2 -38
  202. package/dist/semantic-search-indexer.js +22 -6
  203. package/dist/semver-bump/index.d.ts +24 -0
  204. package/dist/semver-bump/index.d.ts.map +1 -0
  205. package/dist/semver-bump.d.ts +2 -26
  206. package/dist/semver-bump.js +10 -8
  207. package/dist/session-recap/index.d.ts +48 -0
  208. package/dist/session-recap/index.d.ts.map +1 -0
  209. package/dist/session-recap.d.ts +2 -50
  210. package/dist/session-recap.js +6 -4
  211. package/dist/shell-check/index.d.ts +14 -0
  212. package/dist/shell-check/index.d.ts.map +1 -0
  213. package/dist/shell-check.d.ts +2 -16
  214. package/dist/shell-check.js +6 -6
  215. package/dist/smart-rename/index.d.ts +24 -0
  216. package/dist/smart-rename/index.d.ts.map +1 -0
  217. package/dist/smart-rename.d.ts +2 -26
  218. package/dist/smart-rename.js +5 -5
  219. package/dist/spec-linker/index.d.ts +49 -0
  220. package/dist/spec-linker/index.d.ts.map +1 -0
  221. package/dist/spec-linker.d.ts +2 -51
  222. package/dist/spec-linker.js +20100 -244
  223. package/dist/template-engine/index.d.ts +13 -0
  224. package/dist/template-engine/index.d.ts.map +1 -0
  225. package/dist/template-engine.d.ts +2 -15
  226. package/dist/template-engine.js +7 -7
  227. package/dist/test-coverage-gate/index.d.ts +35 -0
  228. package/dist/test-coverage-gate/index.d.ts.map +1 -0
  229. package/dist/test-coverage-gate.d.ts +2 -37
  230. package/dist/test-coverage-gate.js +5 -5
  231. package/dist/test-flake-detector/index.d.ts +25 -0
  232. package/dist/test-flake-detector/index.d.ts.map +1 -0
  233. package/dist/test-flake-detector.d.ts +2 -27
  234. package/dist/test-flake-detector.js +98 -13
  235. package/dist/test-generator/index.d.ts +30 -0
  236. package/dist/test-generator/index.d.ts.map +1 -0
  237. package/dist/test-generator.d.ts +2 -32
  238. package/dist/test-generator.js +5 -5
  239. package/dist/test-runner-gate/index.d.ts +35 -0
  240. package/dist/test-runner-gate/index.d.ts.map +1 -0
  241. package/dist/test-runner-gate.d.ts +2 -37
  242. package/dist/test-runner-gate.js +6 -6
  243. package/dist/todo-listener/index.d.ts +35 -0
  244. package/dist/todo-listener/index.d.ts.map +1 -0
  245. package/dist/todo-listener.d.ts +2 -37
  246. package/dist/todo-listener.js +3 -2
  247. package/dist/todo-tracker/index.d.ts +4 -0
  248. package/dist/todo-tracker/index.d.ts.map +1 -0
  249. package/dist/todo-tracker.d.ts +2 -5
  250. package/dist/todo-tracker.js +5 -5
  251. package/dist/token-budget/index.d.ts +38 -0
  252. package/dist/token-budget/index.d.ts.map +1 -0
  253. package/dist/token-budget.d.ts +2 -40
  254. package/dist/token-budget.js +3 -2
  255. package/dist/token-throttle/index.d.ts +52 -0
  256. package/dist/token-throttle/index.d.ts.map +1 -0
  257. package/dist/token-throttle.d.ts +2 -54
  258. package/dist/token-throttle.js +6 -2
  259. package/dist/type-gate/index.d.ts +35 -0
  260. package/dist/type-gate/index.d.ts.map +1 -0
  261. package/dist/type-gate.d.ts +2 -37
  262. package/dist/type-gate.js +236 -43
  263. package/package.json +10 -7
@@ -0,0 +1,33 @@
1
+ /**
2
+ * dependency-vulnerability-gate plugin — PostToolUse hook that audits
3
+ * dependencies after install commands.
4
+ *
5
+ * Runs `npm audit --json` (or `pnpm audit --json` when pnpm-lock.yaml is
6
+ * present) after the `install` tool or bash/exec commands containing
7
+ * `npm install`/`pnpm add`/`yarn add`. Parses the audit report and blocks
8
+ * or warns when any vulnerability severity meets or exceeds the configured
9
+ * threshold.
10
+ *
11
+ * Tool registered:
12
+ * - dependency_audit_status : Show config + per-session counters.
13
+ *
14
+ * Hooks registered:
15
+ * - PostToolUse with matcher `install|bash|exec`.
16
+ *
17
+ * Config (`config.extensions['dependency-vulnerability-gate']`):
18
+ *
19
+ * ```jsonc
20
+ * {
21
+ * "enabled": true,
22
+ * "severityThreshold": "high", // "low" | "moderate" | "high" | "critical"
23
+ * "block": true, // true = block, false = warn
24
+ * "timeoutMs": 120000
25
+ * }
26
+ * ```
27
+ *
28
+ * @public
29
+ */
30
+ import type { Plugin } from '@wrongstack/core';
31
+ declare const plugin: Plugin;
32
+ export default plugin;
33
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/dependency-vulnerability-gate/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAIH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAuO/C,QAAA,MAAM,MAAM,EAAE,MAwMb,CAAC;eAEa,MAAM"}
@@ -1,35 +1,2 @@
1
- import { Plugin } from '@wrongstack/core';
2
-
3
- /**
4
- * dependency-vulnerability-gate plugin — PostToolUse hook that audits
5
- * dependencies after install commands.
6
- *
7
- * Runs `npm audit --json` (or `pnpm audit --json` when pnpm-lock.yaml is
8
- * present) after the `install` tool or bash/exec commands containing
9
- * `npm install`/`pnpm add`/`yarn add`. Parses the audit report and blocks
10
- * or warns when any vulnerability severity meets or exceeds the configured
11
- * threshold.
12
- *
13
- * Tool registered:
14
- * - dependency_audit_status : Show config + per-session counters.
15
- *
16
- * Hooks registered:
17
- * - PostToolUse with matcher `install|bash|exec`.
18
- *
19
- * Config (`config.extensions['dependency-vulnerability-gate']`):
20
- *
21
- * ```jsonc
22
- * {
23
- * "enabled": true,
24
- * "severityThreshold": "high", // "low" | "moderate" | "high" | "critical"
25
- * "block": true, // true = block, false = warn
26
- * "timeoutMs": 120000
27
- * }
28
- * ```
29
- *
30
- * @public
31
- */
32
-
33
- declare const plugin: Plugin;
34
-
35
- export { plugin as default };
1
+ export * from './dependency-vulnerability-gate/index.js';
2
+ export { default } from './dependency-vulnerability-gate/index.js';
@@ -1,7 +1,6 @@
1
- import { execFileSync } from 'child_process';
2
- import { existsSync } from 'fs';
3
-
4
1
  // src/dependency-vulnerability-gate/index.ts
2
+ import { execFileSync } from "node:child_process";
3
+ import { existsSync } from "node:fs";
5
4
  var API_VERSION = "^0.1.10";
6
5
  var state = {
7
6
  invocations: 0,
@@ -304,5 +303,6 @@ Review the audit output or adjust the dependency choice.`;
304
303
  }
305
304
  };
306
305
  var dependency_vulnerability_gate_default = plugin;
307
-
308
- export { dependency_vulnerability_gate_default as default };
306
+ export {
307
+ dependency_vulnerability_gate_default as default
308
+ };
@@ -0,0 +1,34 @@
1
+ /**
2
+ * diff-summary plugin — PostToolUse hook that injects a compact diff
3
+ * into the LLM's context after every `write` or `edit`.
4
+ *
5
+ * Tools registered:
6
+ * - diff_summary_status : Show config + per-session counters.
7
+ *
8
+ * Hooks registered:
9
+ * - PostToolUse with matcher `write|edit`. After the tool completes,
10
+ * runs `git diff -- <path>` to capture what changed and injects a
11
+ * capped unified diff (or stat summary) as `additionalContext`.
12
+ *
13
+ * Config (`config.extensions['diff-summary']`):
14
+ *
15
+ * ```jsonc
16
+ * {
17
+ * "maxLines": 50, // cap diff context at N lines
18
+ * "showStat": true, // include "+N -M" summary line
19
+ * "mode": "diff" // "diff" (unified diff) | "stat" (counts only) | "off"
20
+ * }
21
+ * ```
22
+ *
23
+ * Why: The `write` tool's result doesn't include a diff. The `edit`
24
+ * tool shows the replacement but not the full file context. This
25
+ * plugin gives the LLM consistent, compact visibility into what its
26
+ * change actually did to the file — confirming the edit applied
27
+ * correctly and showing surrounding context.
28
+ *
29
+ * @public
30
+ */
31
+ import type { Plugin } from '@wrongstack/core';
32
+ declare const plugin: Plugin;
33
+ export default plugin;
34
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/diff-summary/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAIH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAgQ/C,QAAA,MAAM,MAAM,EAAE,MA4Pb,CAAC;eAEa,MAAM"}
@@ -1,36 +1,2 @@
1
- import { Plugin } from '@wrongstack/core';
2
-
3
- /**
4
- * diff-summary plugin — PostToolUse hook that injects a compact diff
5
- * into the LLM's context after every `write` or `edit`.
6
- *
7
- * Tools registered:
8
- * - diff_summary_status : Show config + per-session counters.
9
- *
10
- * Hooks registered:
11
- * - PostToolUse with matcher `write|edit`. After the tool completes,
12
- * runs `git diff -- <path>` to capture what changed and injects a
13
- * capped unified diff (or stat summary) as `additionalContext`.
14
- *
15
- * Config (`config.extensions['diff-summary']`):
16
- *
17
- * ```jsonc
18
- * {
19
- * "maxLines": 50, // cap diff context at N lines
20
- * "showStat": true, // include "+N -M" summary line
21
- * "mode": "diff" // "diff" (unified diff) | "stat" (counts only) | "off"
22
- * }
23
- * ```
24
- *
25
- * Why: The `write` tool's result doesn't include a diff. The `edit`
26
- * tool shows the replacement but not the full file context. This
27
- * plugin gives the LLM consistent, compact visibility into what its
28
- * change actually did to the file — confirming the edit applied
29
- * correctly and showing surrounding context.
30
- *
31
- * @public
32
- */
33
-
34
- declare const plugin: Plugin;
35
-
36
- export { plugin as default };
1
+ export * from './diff-summary/index.js';
2
+ export { default } from './diff-summary/index.js';
@@ -1,7 +1,6 @@
1
- import { execFileSync } from 'child_process';
2
- import { isAbsolute, resolve, relative } from 'path';
3
-
4
1
  // src/diff-summary/index.ts
2
+ import { execFileSync } from "node:child_process";
3
+ import { isAbsolute, relative, resolve } from "node:path";
5
4
  var API_VERSION = "^0.1.10";
6
5
  function withinProject(p) {
7
6
  if (typeof p !== "string" || p.length === 0 || p.length > 4096) return false;
@@ -318,5 +317,6 @@ var plugin = {
318
317
  }
319
318
  };
320
319
  var diff_summary_default = plugin;
321
-
322
- export { diff_summary_default as default };
320
+ export {
321
+ diff_summary_default as default
322
+ };
@@ -0,0 +1,31 @@
1
+ /**
2
+ * doc-sync-guard plugin — warns when documentation is edited without
3
+ * referencing recently changed public source files.
4
+ *
5
+ * Tracks public source files changed by `write` or `edit`. When a README or
6
+ * docs file is written, checks whether the recently changed source files are
7
+ * mentioned and injects an `additionalContext` warning if any are missing.
8
+ *
9
+ * Tools registered:
10
+ * - doc_sync_status : Show tracked changed files and counters.
11
+ *
12
+ * Hooks registered:
13
+ * - PostToolUse with matcher `write|edit`.
14
+ *
15
+ * Config (`config.extensions['doc-sync-guard']`):
16
+ *
17
+ * ```jsonc
18
+ * {
19
+ * "enabled": true,
20
+ * "sourceExtensions": [".ts", ".tsx", ".js", ".jsx", ".mts", ".cts"],
21
+ * "docNames": ["README.md", "README", "CONTRIBUTING.md", "CHANGELOG.md"],
22
+ * "maxTrackedFiles": 20
23
+ * }
24
+ * ```
25
+ *
26
+ * @public
27
+ */
28
+ import type { Plugin } from '@wrongstack/core';
29
+ declare const plugin: Plugin;
30
+ export default plugin;
31
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/doc-sync-guard/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAGH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAkJ/C,QAAA,MAAM,MAAM,EAAE,MAuJb,CAAC;eAEa,MAAM"}
@@ -1,33 +1,2 @@
1
- import { Plugin } from '@wrongstack/core';
2
-
3
- /**
4
- * doc-sync-guard plugin — warns when documentation is edited without
5
- * referencing recently changed public source files.
6
- *
7
- * Tracks public source files changed by `write` or `edit`. When a README or
8
- * docs file is written, checks whether the recently changed source files are
9
- * mentioned and injects an `additionalContext` warning if any are missing.
10
- *
11
- * Tools registered:
12
- * - doc_sync_status : Show tracked changed files and counters.
13
- *
14
- * Hooks registered:
15
- * - PostToolUse with matcher `write|edit`.
16
- *
17
- * Config (`config.extensions['doc-sync-guard']`):
18
- *
19
- * ```jsonc
20
- * {
21
- * "enabled": true,
22
- * "sourceExtensions": [".ts", ".tsx", ".js", ".jsx", ".mts", ".cts"],
23
- * "docNames": ["README.md", "README", "CONTRIBUTING.md", "CHANGELOG.md"],
24
- * "maxTrackedFiles": 20
25
- * }
26
- * ```
27
- *
28
- * @public
29
- */
30
-
31
- declare const plugin: Plugin;
32
-
33
- export { plugin as default };
1
+ export * from './doc-sync-guard/index.js';
2
+ export { default } from './doc-sync-guard/index.js';
@@ -1,6 +1,5 @@
1
- import { isAbsolute, resolve, relative, basename, extname } from 'path';
2
-
3
1
  // src/doc-sync-guard/index.ts
2
+ import { isAbsolute, relative, resolve, basename, extname } from "node:path";
4
3
  var API_VERSION = "^0.1.10";
5
4
  var state = {
6
5
  changedFiles: [],
@@ -219,5 +218,6 @@ Consider mentioning these changes in the documentation.`;
219
218
  }
220
219
  };
221
220
  var doc_sync_guard_default = plugin;
222
-
223
- export { doc_sync_guard_default as default };
221
+ export {
222
+ doc_sync_guard_default as default
223
+ };
@@ -0,0 +1,31 @@
1
+ /**
2
+ * duplicate-code-detector plugin — finds duplicated code blocks across source
3
+ * files using normalized-line fingerprinting.
4
+ *
5
+ * Tools registered:
6
+ * - detect_duplicate_code : Scan a path for duplicated blocks.
7
+ * - duplicate_code_status : Report config + counters.
8
+ *
9
+ * Hooks registered:
10
+ * - PostToolUse with matcher `write|edit` to source files, warning when the
11
+ * changed file introduces blocks that duplicate existing code elsewhere.
12
+ *
13
+ * Config (`config.extensions['duplicate-code-detector']`):
14
+ *
15
+ * ```jsonc
16
+ * {
17
+ * "enabled": true,
18
+ * "minLines": 5,
19
+ * "threshold": 0.8,
20
+ * "extensions": [".ts", ".tsx", ".js", ".jsx"],
21
+ * "excludeDirs": ["node_modules", "dist", ".git", "coverage"],
22
+ * "maxFindings": 20
23
+ * }
24
+ * ```
25
+ *
26
+ * @public
27
+ */
28
+ import type { Plugin } from '@wrongstack/core';
29
+ declare const plugin: Plugin;
30
+ export default plugin;
31
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/duplicate-code-detector/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAIH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAsP/C,QAAA,MAAM,MAAM,EAAE,MA8Qb,CAAC;eAEa,MAAM"}
@@ -1,33 +1,2 @@
1
- import { Plugin } from '@wrongstack/core';
2
-
3
- /**
4
- * duplicate-code-detector plugin — finds duplicated code blocks across source
5
- * files using normalized-line fingerprinting.
6
- *
7
- * Tools registered:
8
- * - detect_duplicate_code : Scan a path for duplicated blocks.
9
- * - duplicate_code_status : Report config + counters.
10
- *
11
- * Hooks registered:
12
- * - PostToolUse with matcher `write|edit` to source files, warning when the
13
- * changed file introduces blocks that duplicate existing code elsewhere.
14
- *
15
- * Config (`config.extensions['duplicate-code-detector']`):
16
- *
17
- * ```jsonc
18
- * {
19
- * "enabled": true,
20
- * "minLines": 5,
21
- * "threshold": 0.8,
22
- * "extensions": [".ts", ".tsx", ".js", ".jsx"],
23
- * "excludeDirs": ["node_modules", "dist", ".git", "coverage"],
24
- * "maxFindings": 20
25
- * }
26
- * ```
27
- *
28
- * @public
29
- */
30
-
31
- declare const plugin: Plugin;
32
-
33
- export { plugin as default };
1
+ export * from './duplicate-code-detector/index.js';
2
+ export { default } from './duplicate-code-detector/index.js';
@@ -1,7 +1,6 @@
1
- import { readFileSync, existsSync, statSync, readdirSync } from 'fs';
2
- import { resolve, isAbsolute, relative, extname } from 'path';
3
-
4
1
  // src/duplicate-code-detector/index.ts
2
+ import { existsSync, readFileSync, readdirSync, statSync } from "node:fs";
3
+ import { extname, isAbsolute, relative, resolve } from "node:path";
5
4
  var API_VERSION = "^0.1.10";
6
5
  var state = {
7
6
  scanCount: 0,
@@ -380,5 +379,6 @@ var plugin = {
380
379
  }
381
380
  };
382
381
  var duplicate_code_detector_default = plugin;
383
-
384
- export { duplicate_code_detector_default as default };
382
+ export {
383
+ duplicate_code_detector_default as default
384
+ };
@@ -0,0 +1,65 @@
1
+ /**
2
+ * error-lens plugin — turns noisy failure output into a compact,
3
+ * actionable digest.
4
+ *
5
+ * When a shell command fails, the model gets a wall of stderr: full
6
+ * stack traces, npm noise, repeated frames. A `PostToolUse` hook on
7
+ * `bash|exec` parses the failure and injects a short digest via
8
+ * `additionalContext`:
9
+ *
10
+ * - the error type + message line (TypeError, ENOENT, AssertionError…)
11
+ * - up to `maxFrames` source locations (`file:line`), *project frames
12
+ * first* (node_modules/internal frames are de-prioritized)
13
+ * - a repeat marker when the same failure was already seen, so the
14
+ * model notices "this is the SAME error as before"
15
+ *
16
+ * Recognized trace formats: Node/V8 (`at fn (file:line:col)`), Python
17
+ * (`File "x.py", line 12`), tsc/vitest (`file.ts:12:5`), Rust
18
+ * (`--> src/main.rs:4:5`), Go (`file.go:12 +0x…`).
19
+ *
20
+ * A ring of recent failures is queryable via `error_lens_history` —
21
+ * useful for "what have we broken so far this session?".
22
+ *
23
+ * Config (`config.extensions['error-lens']`):
24
+ *
25
+ * ```jsonc
26
+ * {
27
+ * "enabled": true,
28
+ * "maxFrames": 5, // source locations per digest
29
+ * "historySize": 20, // failures kept for error_lens_history
30
+ * "minOutputChars": 200, // don't digest tiny outputs (already readable)
31
+ * "aiHints": false, // ask the LLM (api.llm) for a one-line fix hint
32
+ * "llm": { "provider": "", "model": "" } // optional override for the hint model
33
+ * }
34
+ * ```
35
+ *
36
+ * With `aiHints: true` and a host that wires `api.llm`, each NEW failure
37
+ * digest is enriched with a one-line fix hint from the configured LLM
38
+ * (per-plugin `llm.provider`/`llm.model` override the session default).
39
+ * Hint failures are swallowed — the digest always lands.
40
+ *
41
+ * Toggle off with `{ "name": "error-lens", "enabled": false }` in
42
+ * `config.plugins`, or `"enabled": false` in the options above.
43
+ *
44
+ * @public
45
+ */
46
+ import type { Plugin } from '@wrongstack/core';
47
+ export interface FailureRecord {
48
+ when: string;
49
+ tool: string;
50
+ command: string | null;
51
+ errorLine: string | null;
52
+ frames: string[];
53
+ repeats: number;
54
+ }
55
+ /** Extract the first recognizable error line from tool output. */
56
+ export declare function extractErrorLine(output: string): string | null;
57
+ /**
58
+ * Extract source locations (`file:line`) from tool output.
59
+ * Project frames (not node_modules / internal) are ordered first,
60
+ * duplicates removed, capped at `maxFrames`.
61
+ */
62
+ export declare function extractFrames(output: string, maxFrames: number): string[];
63
+ declare const plugin: Plugin;
64
+ export default plugin;
65
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/error-lens/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AACH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAM/C,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;CACjB;AA6FD,kEAAkE;AAClE,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAM9D;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,EAAE,CAuBzE;AAUD,QAAA,MAAM,MAAM,EAAE,MAoOb,CAAC;eAEa,MAAM"}
@@ -1,67 +1,2 @@
1
- import { Plugin } from '@wrongstack/core';
2
-
3
- /**
4
- * error-lens plugin — turns noisy failure output into a compact,
5
- * actionable digest.
6
- *
7
- * When a shell command fails, the model gets a wall of stderr: full
8
- * stack traces, npm noise, repeated frames. A `PostToolUse` hook on
9
- * `bash|exec` parses the failure and injects a short digest via
10
- * `additionalContext`:
11
- *
12
- * - the error type + message line (TypeError, ENOENT, AssertionError…)
13
- * - up to `maxFrames` source locations (`file:line`), *project frames
14
- * first* (node_modules/internal frames are de-prioritized)
15
- * - a repeat marker when the same failure was already seen, so the
16
- * model notices "this is the SAME error as before"
17
- *
18
- * Recognized trace formats: Node/V8 (`at fn (file:line:col)`), Python
19
- * (`File "x.py", line 12`), tsc/vitest (`file.ts:12:5`), Rust
20
- * (`--> src/main.rs:4:5`), Go (`file.go:12 +0x…`).
21
- *
22
- * A ring of recent failures is queryable via `error_lens_history` —
23
- * useful for "what have we broken so far this session?".
24
- *
25
- * Config (`config.extensions['error-lens']`):
26
- *
27
- * ```jsonc
28
- * {
29
- * "enabled": true,
30
- * "maxFrames": 5, // source locations per digest
31
- * "historySize": 20, // failures kept for error_lens_history
32
- * "minOutputChars": 200, // don't digest tiny outputs (already readable)
33
- * "aiHints": false, // ask the LLM (api.llm) for a one-line fix hint
34
- * "llm": { "provider": "", "model": "" } // optional override for the hint model
35
- * }
36
- * ```
37
- *
38
- * With `aiHints: true` and a host that wires `api.llm`, each NEW failure
39
- * digest is enriched with a one-line fix hint from the configured LLM
40
- * (per-plugin `llm.provider`/`llm.model` override the session default).
41
- * Hint failures are swallowed — the digest always lands.
42
- *
43
- * Toggle off with `{ "name": "error-lens", "enabled": false }` in
44
- * `config.plugins`, or `"enabled": false` in the options above.
45
- *
46
- * @public
47
- */
48
-
49
- interface FailureRecord {
50
- when: string;
51
- tool: string;
52
- command: string | null;
53
- errorLine: string | null;
54
- frames: string[];
55
- repeats: number;
56
- }
57
- /** Extract the first recognizable error line from tool output. */
58
- declare function extractErrorLine(output: string): string | null;
59
- /**
60
- * Extract source locations (`file:line`) from tool output.
61
- * Project frames (not node_modules / internal) are ordered first,
62
- * duplicates removed, capped at `maxFrames`.
63
- */
64
- declare function extractFrames(output: string, maxFrames: number): string[];
65
- declare const plugin: Plugin;
66
-
67
- export { type FailureRecord, plugin as default, extractErrorLine, extractFrames };
1
+ export * from './error-lens/index.js';
2
+ export { default } from './error-lens/index.js';
@@ -276,5 +276,8 @@ ${errorLine ?? "(no error line)"}
276
276
  }
277
277
  };
278
278
  var error_lens_default = plugin;
279
-
280
- export { error_lens_default as default, extractErrorLine, extractFrames };
279
+ export {
280
+ error_lens_default as default,
281
+ extractErrorLine,
282
+ extractFrames
283
+ };
@@ -0,0 +1,36 @@
1
+ /**
2
+ * feature-flag-tracker plugin — scans source files for feature-flag-like
3
+ * expressions and reports where they are used.
4
+ *
5
+ * Tools registered:
6
+ * - scan_feature_flags : Scan a path for feature flag usages.
7
+ * - feature_flag_status : Report config + counters.
8
+ *
9
+ * Hooks registered:
10
+ * - PostToolUse with matcher `write|edit` to source files, noting any feature
11
+ * flags used in the changed file.
12
+ *
13
+ * Config (`config.extensions['feature-flag-tracker']`):
14
+ *
15
+ * ```jsonc
16
+ * {
17
+ * "enabled": true,
18
+ * "extensions": [".ts", ".tsx", ".js", ".jsx"],
19
+ * "patterns": ["extra-regex"],
20
+ * "maxFindings": 50
21
+ * }
22
+ * ```
23
+ *
24
+ * @public
25
+ */
26
+ import type { Plugin } from '@wrongstack/core';
27
+ export interface FeatureFlagUsage {
28
+ flag: string;
29
+ file: string;
30
+ line: number;
31
+ context: string;
32
+ pattern: string;
33
+ }
34
+ declare const plugin: Plugin;
35
+ export default plugin;
36
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/feature-flag-tracker/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAIH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAQ/C,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;CACjB;AA8LD,QAAA,MAAM,MAAM,EAAE,MA+Mb,CAAC;eAEa,MAAM"}
@@ -1,38 +1,2 @@
1
- import { Plugin } from '@wrongstack/core';
2
-
3
- /**
4
- * feature-flag-tracker plugin — scans source files for feature-flag-like
5
- * expressions and reports where they are used.
6
- *
7
- * Tools registered:
8
- * - scan_feature_flags : Scan a path for feature flag usages.
9
- * - feature_flag_status : Report config + counters.
10
- *
11
- * Hooks registered:
12
- * - PostToolUse with matcher `write|edit` to source files, noting any feature
13
- * flags used in the changed file.
14
- *
15
- * Config (`config.extensions['feature-flag-tracker']`):
16
- *
17
- * ```jsonc
18
- * {
19
- * "enabled": true,
20
- * "extensions": [".ts", ".tsx", ".js", ".jsx"],
21
- * "patterns": ["extra-regex"],
22
- * "maxFindings": 50
23
- * }
24
- * ```
25
- *
26
- * @public
27
- */
28
-
29
- interface FeatureFlagUsage {
30
- flag: string;
31
- file: string;
32
- line: number;
33
- context: string;
34
- pattern: string;
35
- }
36
- declare const plugin: Plugin;
37
-
38
- export { type FeatureFlagUsage, plugin as default };
1
+ export * from './feature-flag-tracker/index.js';
2
+ export { default } from './feature-flag-tracker/index.js';
@@ -1,7 +1,6 @@
1
- import { readFileSync, existsSync, statSync, readdirSync } from 'fs';
2
- import { resolve, isAbsolute, relative, extname } from 'path';
3
-
4
1
  // src/feature-flag-tracker/index.ts
2
+ import { existsSync, readFileSync, readdirSync, statSync } from "node:fs";
3
+ import { extname, isAbsolute, relative, resolve } from "node:path";
5
4
  var API_VERSION = "^0.1.10";
6
5
  var state = {
7
6
  scanCount: 0,
@@ -312,5 +311,6 @@ Make sure flag behavior is intentional and consider updating flag inventory/docs
312
311
  }
313
312
  };
314
313
  var feature_flag_tracker_default = plugin;
315
-
316
- export { feature_flag_tracker_default as default };
314
+ export {
315
+ feature_flag_tracker_default as default
316
+ };
@@ -0,0 +1,12 @@
1
+ /**
2
+ * file-watcher plugin — Watches project files and triggers actions on changes.
3
+ *
4
+ * Tools registered:
5
+ * - watch_start: Start watching paths for file changes
6
+ * - watch_stop: Stop a watch by ID
7
+ * - watch_list: List all active watches
8
+ */
9
+ import type { Plugin } from '@wrongstack/core';
10
+ declare const plugin: Plugin;
11
+ export default plugin;
12
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/file-watcher/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AA2D/C,QAAA,MAAM,MAAM,EAAE,MAsWb,CAAC;eAEa,MAAM"}
@@ -1,14 +1,2 @@
1
- import { Plugin } from '@wrongstack/core';
2
-
3
- /**
4
- * file-watcher plugin — Watches project files and triggers actions on changes.
5
- *
6
- * Tools registered:
7
- * - watch_start: Start watching paths for file changes
8
- * - watch_stop: Stop a watch by ID
9
- * - watch_list: List all active watches
10
- */
11
-
12
- declare const plugin: Plugin;
13
-
14
- export { plugin as default };
1
+ export * from './file-watcher/index.js';
2
+ export { default } from './file-watcher/index.js';