@wrongstack/plugins 0.284.0 → 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,46 @@
1
+ /**
2
+ * config-validator plugin — instant syntax feedback after config-file
3
+ * writes.
4
+ *
5
+ * A broken `package.json` or malformed YAML often goes unnoticed
6
+ * until a later build fails with an unrelated-looking error. This
7
+ * plugin validates config files immediately: a `PostToolUse` hook on
8
+ * `write|edit` re-reads the target file from disk (what actually
9
+ * landed, not what the tool intended) and reports problems via
10
+ * `additionalContext` in the same turn:
11
+ *
12
+ * - `.json` / `.jsonc` → strict parse (JSONC comments stripped
13
+ * first); parse errors include the line/column
14
+ * - `package.json` → parse + shape checks (name/version
15
+ * present, `dependencies` is an object)
16
+ * - `.yaml` / `.yml` → structural lint: tab indentation
17
+ * (illegal in YAML), duplicate keys at the same indent within a
18
+ * block, unclosed quotes
19
+ * - `.toml` → duplicate table headers, duplicate
20
+ * keys within a table
21
+ *
22
+ * Valid files produce no output — zero noise on the happy path.
23
+ *
24
+ * Config (`config.extensions['config-validator']`):
25
+ *
26
+ * ```jsonc
27
+ * {
28
+ * "enabled": true,
29
+ * "extensions": [".json", ".jsonc", ".yaml", ".yml", ".toml"],
30
+ * "maxFileBytes": 1048576
31
+ * }
32
+ * ```
33
+ *
34
+ * Toggle off with `{ "name": "config-validator", "enabled": false }`
35
+ * in `config.plugins`, or `"enabled": false` in the options above.
36
+ *
37
+ * @public
38
+ */
39
+ import type { Plugin } from '@wrongstack/core';
40
+ export declare function validateJson(text: string, isJsonc: boolean, fileName: string): string[];
41
+ export declare function validateYaml(text: string): string[];
42
+ export declare function validateToml(text: string): string[];
43
+ export declare function validateFile(path: string, text: string): string[];
44
+ declare const plugin: Plugin;
45
+ export default plugin;
46
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/config-validator/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AAGH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AA0H/C,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,EAAE,CA2CvF;AAED,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,CAuDnD;AAED,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,CAuCnD;AAED,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,CAOjE;AAMD,QAAA,MAAM,MAAM,EAAE,MAqJb,CAAC;eAEa,MAAM"}
@@ -1,48 +1,2 @@
1
- import { Plugin } from '@wrongstack/core';
2
-
3
- /**
4
- * config-validator plugin — instant syntax feedback after config-file
5
- * writes.
6
- *
7
- * A broken `package.json` or malformed YAML often goes unnoticed
8
- * until a later build fails with an unrelated-looking error. This
9
- * plugin validates config files immediately: a `PostToolUse` hook on
10
- * `write|edit` re-reads the target file from disk (what actually
11
- * landed, not what the tool intended) and reports problems via
12
- * `additionalContext` in the same turn:
13
- *
14
- * - `.json` / `.jsonc` → strict parse (JSONC comments stripped
15
- * first); parse errors include the line/column
16
- * - `package.json` → parse + shape checks (name/version
17
- * present, `dependencies` is an object)
18
- * - `.yaml` / `.yml` → structural lint: tab indentation
19
- * (illegal in YAML), duplicate keys at the same indent within a
20
- * block, unclosed quotes
21
- * - `.toml` → duplicate table headers, duplicate
22
- * keys within a table
23
- *
24
- * Valid files produce no output — zero noise on the happy path.
25
- *
26
- * Config (`config.extensions['config-validator']`):
27
- *
28
- * ```jsonc
29
- * {
30
- * "enabled": true,
31
- * "extensions": [".json", ".jsonc", ".yaml", ".yml", ".toml"],
32
- * "maxFileBytes": 1048576
33
- * }
34
- * ```
35
- *
36
- * Toggle off with `{ "name": "config-validator", "enabled": false }`
37
- * in `config.plugins`, or `"enabled": false` in the options above.
38
- *
39
- * @public
40
- */
41
-
42
- declare function validateJson(text: string, isJsonc: boolean, fileName: string): string[];
43
- declare function validateYaml(text: string): string[];
44
- declare function validateToml(text: string): string[];
45
- declare function validateFile(path: string, text: string): string[];
46
- declare const plugin: Plugin;
47
-
48
- export { plugin as default, validateFile, validateJson, validateToml, validateYaml };
1
+ export * from './config-validator/index.js';
2
+ export { default } from './config-validator/index.js';
@@ -1,6 +1,5 @@
1
- import { statSync, readFileSync } from 'fs';
2
-
3
1
  // src/config-validator/index.ts
2
+ import { readFileSync, statSync } from "node:fs";
4
3
  var state = {
5
4
  invocations: 0,
6
5
  filesChecked: 0,
@@ -343,5 +342,10 @@ var plugin = {
343
342
  }
344
343
  };
345
344
  var config_validator_default = plugin;
346
-
347
- export { config_validator_default as default, validateFile, validateJson, validateToml, validateYaml };
345
+ export {
346
+ config_validator_default as default,
347
+ validateFile,
348
+ validateJson,
349
+ validateToml,
350
+ validateYaml
351
+ };
@@ -0,0 +1,43 @@
1
+ /**
2
+ * context-pins plugin — pin durable facts into the system prompt.
3
+ *
4
+ * Long sessions lose important constraints to compaction ("the API
5
+ * base URL is X", "never touch the legacy folder", "the user prefers
6
+ * Turkish"). This plugin gives the agent (and the user) three tools:
7
+ *
8
+ * - `pin_add` — pin a short fact (optionally with a label)
9
+ * - `pin_remove` — remove a pin by id or label
10
+ * - `pin_list` — list all pins
11
+ *
12
+ * Every pinned fact is injected into the system prompt on every
13
+ * request via a `SystemPromptContributor`, so pins survive context
14
+ * compaction by construction. Pins persist across sessions in a JSON
15
+ * file (default: `<projectDir>/context-pins.json`, seeded by the CLI
16
+ * host the same way `todo-tracker` gets its path).
17
+ *
18
+ * Config (`config.extensions['context-pins']`):
19
+ *
20
+ * ```jsonc
21
+ * {
22
+ * "enabled": true,
23
+ * "filePath": "", // where pins persist; empty = in-memory only
24
+ * "maxPins": 20, // hard cap so the prompt block stays small
25
+ * "maxPinChars": 500 // per-pin length cap
26
+ * }
27
+ * ```
28
+ *
29
+ * Toggle off with `{ "name": "context-pins", "enabled": false }` in
30
+ * `config.plugins`, or `"enabled": false` in the options above.
31
+ *
32
+ * @public
33
+ */
34
+ import type { Plugin } from '@wrongstack/core';
35
+ export interface Pin {
36
+ id: string;
37
+ label: string | null;
38
+ text: string;
39
+ createdAt: string;
40
+ }
41
+ declare const plugin: Plugin;
42
+ export default plugin;
43
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/context-pins/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AAIH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAM/C,MAAM,WAAW,GAAG;IAClB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;CACnB;AA8GD,QAAA,MAAM,MAAM,EAAE,MA8Mb,CAAC;eAEa,MAAM"}
@@ -1,45 +1,2 @@
1
- import { Plugin } from '@wrongstack/core';
2
-
3
- /**
4
- * context-pins plugin — pin durable facts into the system prompt.
5
- *
6
- * Long sessions lose important constraints to compaction ("the API
7
- * base URL is X", "never touch the legacy folder", "the user prefers
8
- * Turkish"). This plugin gives the agent (and the user) three tools:
9
- *
10
- * - `pin_add` — pin a short fact (optionally with a label)
11
- * - `pin_remove` — remove a pin by id or label
12
- * - `pin_list` — list all pins
13
- *
14
- * Every pinned fact is injected into the system prompt on every
15
- * request via a `SystemPromptContributor`, so pins survive context
16
- * compaction by construction. Pins persist across sessions in a JSON
17
- * file (default: `<projectDir>/context-pins.json`, seeded by the CLI
18
- * host the same way `todo-tracker` gets its path).
19
- *
20
- * Config (`config.extensions['context-pins']`):
21
- *
22
- * ```jsonc
23
- * {
24
- * "enabled": true,
25
- * "filePath": "", // where pins persist; empty = in-memory only
26
- * "maxPins": 20, // hard cap so the prompt block stays small
27
- * "maxPinChars": 500 // per-pin length cap
28
- * }
29
- * ```
30
- *
31
- * Toggle off with `{ "name": "context-pins", "enabled": false }` in
32
- * `config.plugins`, or `"enabled": false` in the options above.
33
- *
34
- * @public
35
- */
36
-
37
- interface Pin {
38
- id: string;
39
- label: string | null;
40
- text: string;
41
- createdAt: string;
42
- }
43
- declare const plugin: Plugin;
44
-
45
- export { type Pin, plugin as default };
1
+ export * from './context-pins/index.js';
2
+ export { default } from './context-pins/index.js';
@@ -1,7 +1,6 @@
1
- import * as fs from 'fs';
2
- import { dirname, resolve, isAbsolute, relative } from 'path';
3
-
4
1
  // src/context-pins/index.ts
2
+ import * as fs from "node:fs";
3
+ import { dirname, isAbsolute, relative, resolve } from "node:path";
5
4
  var state = {
6
5
  pins: [],
7
6
  nextId: 1,
@@ -245,5 +244,6 @@ var plugin = {
245
244
  }
246
245
  };
247
246
  var context_pins_default = plugin;
248
-
249
- export { context_pins_default as default };
247
+ export {
248
+ context_pins_default as default
249
+ };
@@ -0,0 +1,51 @@
1
+ /**
2
+ * cost-tracker plugin — Tracks LLM token usage and cost per session.
3
+ *
4
+ * Config surface (`config.extensions['cost-tracker']`):
5
+ *
6
+ * ```jsonc
7
+ * {
8
+ * "budgetLimit": 10, // USD; 0 = no limit
9
+ * "warningThreshold": 80, // percent of budget before warning
10
+ * "pricingOverrides": { // user-supplied per-model rates (USD/1M tokens)
11
+ * "gpt-4o": { "input": 5.0, "output": 15.0 },
12
+ * "custom-model": { "input": 3.0, "output": 15.0 }
13
+ * }
14
+ * }
15
+ * ```
16
+ *
17
+ * Pricing lookup chain (first match wins, all keys lowercased):
18
+ *
19
+ * | Priority | Source | Populated by |
20
+ * |----------|-------------------------------------|--------------------------------------|
21
+ * | 1 | `pricingOverrides[model]` | User config (highest priority) |
22
+ * | 2 | `bundledFromRegistry[model]` | `api.modelsRegistry` (models.dev) |
23
+ * | 3 | `PRICING[model]` | Bundled baseline (updated per release)|
24
+ * | 4 | `DEFAULT_PRICING` | Last-resort fallback for unknown models |
25
+ *
26
+ * Tools registered:
27
+ * - cost_summary: Show token usage breakdown by model
28
+ * - cost_reset: Reset tracking counters
29
+ * - cost_export: Export cost report as JSON or CSV
30
+ *
31
+ * @public
32
+ */
33
+ import type { Plugin } from '@wrongstack/core';
34
+ /**
35
+ * Per-model pricing in USD per 1 million tokens.
36
+ *
37
+ * Used by `pricingOverrides` (user config), `bundledFromRegistry`
38
+ * (models.dev), and the bundled `PRICING` table. All three share
39
+ * the same shape so the lookup chain can fall through uniformly.
40
+ *
41
+ * @public
42
+ */
43
+ export interface ModelPricing {
44
+ /** Cost per 1M input (prompt) tokens in USD. */
45
+ input: number;
46
+ /** Cost per 1M output (completion) tokens in USD. */
47
+ output: number;
48
+ }
49
+ declare const plugin: Plugin;
50
+ export default plugin;
51
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/cost-tracker/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAK/C;;;;;;;;GAQG;AACH,MAAM,WAAW,YAAY;IAC3B,gDAAgD;IAChD,KAAK,EAAE,MAAM,CAAC;IACd,qDAAqD;IACrD,MAAM,EAAE,MAAM,CAAC;CAChB;AA8KD,QAAA,MAAM,MAAM,EAAE,MA8Zb,CAAC;eAEa,MAAM"}
@@ -1,53 +1,2 @@
1
- import { Plugin } from '@wrongstack/core';
2
-
3
- /**
4
- * cost-tracker plugin — Tracks LLM token usage and cost per session.
5
- *
6
- * Config surface (`config.extensions['cost-tracker']`):
7
- *
8
- * ```jsonc
9
- * {
10
- * "budgetLimit": 10, // USD; 0 = no limit
11
- * "warningThreshold": 80, // percent of budget before warning
12
- * "pricingOverrides": { // user-supplied per-model rates (USD/1M tokens)
13
- * "gpt-4o": { "input": 5.0, "output": 15.0 },
14
- * "custom-model": { "input": 3.0, "output": 15.0 }
15
- * }
16
- * }
17
- * ```
18
- *
19
- * Pricing lookup chain (first match wins, all keys lowercased):
20
- *
21
- * | Priority | Source | Populated by |
22
- * |----------|-------------------------------------|--------------------------------------|
23
- * | 1 | `pricingOverrides[model]` | User config (highest priority) |
24
- * | 2 | `bundledFromRegistry[model]` | `api.modelsRegistry` (models.dev) |
25
- * | 3 | `PRICING[model]` | Bundled baseline (updated per release)|
26
- * | 4 | `DEFAULT_PRICING` | Last-resort fallback for unknown models |
27
- *
28
- * Tools registered:
29
- * - cost_summary: Show token usage breakdown by model
30
- * - cost_reset: Reset tracking counters
31
- * - cost_export: Export cost report as JSON or CSV
32
- *
33
- * @public
34
- */
35
-
36
- /**
37
- * Per-model pricing in USD per 1 million tokens.
38
- *
39
- * Used by `pricingOverrides` (user config), `bundledFromRegistry`
40
- * (models.dev), and the bundled `PRICING` table. All three share
41
- * the same shape so the lookup chain can fall through uniformly.
42
- *
43
- * @public
44
- */
45
- interface ModelPricing {
46
- /** Cost per 1M input (prompt) tokens in USD. */
47
- input: number;
48
- /** Cost per 1M output (completion) tokens in USD. */
49
- output: number;
50
- }
51
- declare const plugin: Plugin;
52
-
53
- export { type ModelPricing, plugin as default };
1
+ export * from './cost-tracker/index.js';
2
+ export { default } from './cost-tracker/index.js';
@@ -1,6 +1,5 @@
1
- import { expectDefined } from '@wrongstack/core';
2
-
3
1
  // src/cost-tracker/index.ts
2
+ import { expectDefined } from "@wrongstack/core";
4
3
  var API_VERSION = "^0.1.10";
5
4
  var PRICING = {
6
5
  "gpt-4o": { input: 5, output: 15 },
@@ -359,5 +358,6 @@ by model: ${top || "(none)"}`
359
358
  }
360
359
  };
361
360
  var cost_tracker_default = plugin;
362
-
363
- export { cost_tracker_default as default };
361
+ export {
362
+ cost_tracker_default as default
363
+ };
@@ -0,0 +1,12 @@
1
+ /**
2
+ * cron plugin — Schedules recurring tasks via beforeIteration extension hooks.
3
+ *
4
+ * Tools registered:
5
+ * - cron_schedule: Schedule a recurring action
6
+ * - cron_list: List all scheduled jobs
7
+ * - cron_cancel: Cancel a scheduled job
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/cron/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAoE/C,QAAA,MAAM,MAAM,EAAE,MA2Pb,CAAC;eAEa,MAAM"}
package/dist/cron.d.ts CHANGED
@@ -1,14 +1,2 @@
1
- import { Plugin } from '@wrongstack/core';
2
-
3
- /**
4
- * cron plugin — Schedules recurring tasks via beforeIteration extension hooks.
5
- *
6
- * Tools registered:
7
- * - cron_schedule: Schedule a recurring action
8
- * - cron_list: List all scheduled jobs
9
- * - cron_cancel: Cancel a scheduled job
10
- */
11
-
12
- declare const plugin: Plugin;
13
-
14
- export { plugin as default };
1
+ export * from './cron/index.js';
2
+ export { default } from './cron/index.js';
package/dist/cron.js CHANGED
@@ -235,5 +235,6 @@ var plugin = {
235
235
  }
236
236
  };
237
237
  var cron_default = plugin;
238
-
239
- export { cron_default as default };
238
+ export {
239
+ cron_default as default
240
+ };
@@ -0,0 +1,32 @@
1
+ /**
2
+ * dead-code-detector plugin — lightweight regex-based scan for exported
3
+ * identifiers that appear unused anywhere in the project.
4
+ *
5
+ * The plugin registers one tool:
6
+ * - `dead_code_scan` — scan a path for suspicious exported symbols.
7
+ *
8
+ * And one hook:
9
+ * - `PostToolUse` matcher `write|edit` — auto-scan changed source files and
10
+ * inject a short warning when newly exported symbols look unused.
11
+ *
12
+ * No external AST parser is used; all detection is regex-based and
13
+ * deterministic. Expect false positives on re-exports, public API surface,
14
+ * and test-only exports.
15
+ *
16
+ * Config (`config.extensions['dead-code-detector']`):
17
+ *
18
+ * ```jsonc
19
+ * {
20
+ * "enabled": true,
21
+ * "extensions": [".ts", ".tsx", ".js", ".jsx"],
22
+ * "defaultDepth": 3,
23
+ * "excludeDirs": ["node_modules", "dist", ".git", "coverage"]
24
+ * }
25
+ * ```
26
+ *
27
+ * @public
28
+ */
29
+ import type { Plugin } from '@wrongstack/core';
30
+ declare const plugin: Plugin;
31
+ export default plugin;
32
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/dead-code-detector/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAIH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AA2Q/C,QAAA,MAAM,MAAM,EAAE,MAkOb,CAAC;eAEa,MAAM"}
@@ -1,34 +1,2 @@
1
- import { Plugin } from '@wrongstack/core';
2
-
3
- /**
4
- * dead-code-detector plugin — lightweight regex-based scan for exported
5
- * identifiers that appear unused anywhere in the project.
6
- *
7
- * The plugin registers one tool:
8
- * - `dead_code_scan` — scan a path for suspicious exported symbols.
9
- *
10
- * And one hook:
11
- * - `PostToolUse` matcher `write|edit` — auto-scan changed source files and
12
- * inject a short warning when newly exported symbols look unused.
13
- *
14
- * No external AST parser is used; all detection is regex-based and
15
- * deterministic. Expect false positives on re-exports, public API surface,
16
- * and test-only exports.
17
- *
18
- * Config (`config.extensions['dead-code-detector']`):
19
- *
20
- * ```jsonc
21
- * {
22
- * "enabled": true,
23
- * "extensions": [".ts", ".tsx", ".js", ".jsx"],
24
- * "defaultDepth": 3,
25
- * "excludeDirs": ["node_modules", "dist", ".git", "coverage"]
26
- * }
27
- * ```
28
- *
29
- * @public
30
- */
31
-
32
- declare const plugin: Plugin;
33
-
34
- export { plugin as default };
1
+ export * from './dead-code-detector/index.js';
2
+ export { default } from './dead-code-detector/index.js';
@@ -1,7 +1,6 @@
1
- import { statSync, readFileSync, readdirSync } from 'fs';
2
- import { resolve, isAbsolute, relative, join, extname } from 'path';
3
-
4
1
  // src/dead-code-detector/index.ts
2
+ import { readdirSync, readFileSync, statSync } from "node:fs";
3
+ import { extname, isAbsolute, join, relative, resolve } from "node:path";
5
4
  var API_VERSION = "^0.1.10";
6
5
  var state = {
7
6
  scanCount: 0,
@@ -350,5 +349,6 @@ Consider removing the export if it is not part of the public API.`;
350
349
  }
351
350
  };
352
351
  var dead_code_detector_default = plugin;
353
-
354
- export { dead_code_detector_default as default };
352
+ export {
353
+ dead_code_detector_default as default
354
+ };
@@ -0,0 +1,63 @@
1
+ /**
2
+ * dep-guard plugin — supervises dependency-install commands.
3
+ *
4
+ * Supply-chain safety at the point of no return: a `PreToolUse` hook
5
+ * on `bash|exec` parses package-manager install commands
6
+ * (`npm i`, `pnpm add`, `yarn add`, `bun add`, `pip install`,
7
+ * `cargo add`) and extracts the package names being added:
8
+ *
9
+ * - packages on the `deny` list → blocked (or warned in
10
+ * warn mode) with the configured reason
11
+ * - typosquat lookalikes of `popular` → warned ("did you mean
12
+ * react? you typed raect") via Levenshtein distance 1
13
+ * - unpinned installs (no version) → optional warning when
14
+ * `warnOnUnpinned` is set
15
+ * - every install → a compact context note so
16
+ * the model consciously confirms new dependencies
17
+ *
18
+ * Non-install commands pass through untouched.
19
+ *
20
+ * Config (`config.extensions['dep-guard']`):
21
+ *
22
+ * ```jsonc
23
+ * {
24
+ * "enabled": true,
25
+ * "mode": "block", // "block" | "warn" (deny-list handling)
26
+ * "deny": [], // exact names or prefix globs ("left-pad", "@evil/*")
27
+ * "allow": [], // exemptions from deny
28
+ * "warnOnUnpinned": false, // warn when no version is specified
29
+ * "typosquatCheck": true // warn on 1-edit lookalikes of popular packages
30
+ * }
31
+ * ```
32
+ *
33
+ * Toggle off with `{ "name": "dep-guard", "enabled": false }` in
34
+ * `config.plugins`, or `"enabled": false` in the options above.
35
+ *
36
+ * @public
37
+ */
38
+ import type { Plugin } from '@wrongstack/core';
39
+ export interface ParsedInstall {
40
+ manager: string;
41
+ packages: Array<{
42
+ name: string;
43
+ version: string | null;
44
+ }>;
45
+ }
46
+ /**
47
+ * Parse a shell command for dependency installs. Returns one entry
48
+ * per install segment found (compound commands can contain several).
49
+ * Bare `npm install` (restore from lockfile, no packages) yields an
50
+ * empty package list and is NOT treated as adding dependencies.
51
+ */
52
+ export declare function parseInstallCommands(command: string): ParsedInstall[];
53
+ /**
54
+ * Optimal-string-alignment distance (Levenshtein + adjacent
55
+ * transposition). Transpositions count as ONE edit because they are
56
+ * the classic typosquat vector: `lodahs` → `lodash`, `raect` → `react`.
57
+ * Package names are short, so the full matrix is cheap.
58
+ */
59
+ export declare function editDistance(a: string, b: string): number;
60
+ export declare function typosquatOf(name: string): string | null;
61
+ declare const plugin: Plugin;
62
+ export default plugin;
63
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/dep-guard/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AACH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAmF/C,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAA;KAAE,CAAC,CAAC;CAC3D;AAKD;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,MAAM,GAAG,aAAa,EAAE,CAmCrE;AA0CD;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAyBzD;AAED,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAOvD;AAMD,QAAA,MAAM,MAAM,EAAE,MAwPb,CAAC;eAEa,MAAM"}
@@ -1,65 +1,2 @@
1
- import { Plugin } from '@wrongstack/core';
2
-
3
- /**
4
- * dep-guard plugin — supervises dependency-install commands.
5
- *
6
- * Supply-chain safety at the point of no return: a `PreToolUse` hook
7
- * on `bash|exec` parses package-manager install commands
8
- * (`npm i`, `pnpm add`, `yarn add`, `bun add`, `pip install`,
9
- * `cargo add`) and extracts the package names being added:
10
- *
11
- * - packages on the `deny` list → blocked (or warned in
12
- * warn mode) with the configured reason
13
- * - typosquat lookalikes of `popular` → warned ("did you mean
14
- * react? you typed raect") via Levenshtein distance 1
15
- * - unpinned installs (no version) → optional warning when
16
- * `warnOnUnpinned` is set
17
- * - every install → a compact context note so
18
- * the model consciously confirms new dependencies
19
- *
20
- * Non-install commands pass through untouched.
21
- *
22
- * Config (`config.extensions['dep-guard']`):
23
- *
24
- * ```jsonc
25
- * {
26
- * "enabled": true,
27
- * "mode": "block", // "block" | "warn" (deny-list handling)
28
- * "deny": [], // exact names or prefix globs ("left-pad", "@evil/*")
29
- * "allow": [], // exemptions from deny
30
- * "warnOnUnpinned": false, // warn when no version is specified
31
- * "typosquatCheck": true // warn on 1-edit lookalikes of popular packages
32
- * }
33
- * ```
34
- *
35
- * Toggle off with `{ "name": "dep-guard", "enabled": false }` in
36
- * `config.plugins`, or `"enabled": false` in the options above.
37
- *
38
- * @public
39
- */
40
-
41
- interface ParsedInstall {
42
- manager: string;
43
- packages: Array<{
44
- name: string;
45
- version: string | null;
46
- }>;
47
- }
48
- /**
49
- * Parse a shell command for dependency installs. Returns one entry
50
- * per install segment found (compound commands can contain several).
51
- * Bare `npm install` (restore from lockfile, no packages) yields an
52
- * empty package list and is NOT treated as adding dependencies.
53
- */
54
- declare function parseInstallCommands(command: string): ParsedInstall[];
55
- /**
56
- * Optimal-string-alignment distance (Levenshtein + adjacent
57
- * transposition). Transpositions count as ONE edit because they are
58
- * the classic typosquat vector: `lodahs` → `lodash`, `raect` → `react`.
59
- * Package names are short, so the full matrix is cheap.
60
- */
61
- declare function editDistance(a: string, b: string): number;
62
- declare function typosquatOf(name: string): string | null;
63
- declare const plugin: Plugin;
64
-
65
- export { type ParsedInstall, plugin as default, editDistance, parseInstallCommands, typosquatOf };
1
+ export * from './dep-guard/index.js';
2
+ export { default } from './dep-guard/index.js';
package/dist/dep-guard.js CHANGED
@@ -358,5 +358,9 @@ ${notes.map((n) => ` - ${n}`).join("\n")}`
358
358
  }
359
359
  };
360
360
  var dep_guard_default = plugin;
361
-
362
- export { dep_guard_default as default, editDistance, parseInstallCommands, typosquatOf };
361
+ export {
362
+ dep_guard_default as default,
363
+ editDistance,
364
+ parseInstallCommands,
365
+ typosquatOf
366
+ };