@quantiya/codevibe-claude-plugin 1.0.37 → 1.0.38

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 (255) hide show
  1. package/.claude-plugin/plugin.json +1 -1
  2. package/bin/codevibe-claude +17 -3
  3. package/dist/server.js +8 -8
  4. package/hooks/stop.sh +30 -10
  5. package/node_modules/@quantiya/codevibe-core/dist/appsync/appsync-client.d.ts +1 -139
  6. package/node_modules/@quantiya/codevibe-core/dist/appsync/queries.d.ts +0 -5
  7. package/node_modules/@quantiya/codevibe-core/dist/auth/auth-telemetry.d.ts +64 -29
  8. package/node_modules/@quantiya/codevibe-core/dist/index.d.ts +0 -4
  9. package/node_modules/@quantiya/codevibe-core/dist/index.js +33 -194
  10. package/node_modules/@quantiya/codevibe-core/dist/keychain/keychain-manager.d.ts +16 -2
  11. package/node_modules/@quantiya/codevibe-core/dist/session/session-rekey.d.ts +40 -0
  12. package/node_modules/@quantiya/codevibe-core/dist/session/session-resume.d.ts +1 -0
  13. package/node_modules/@quantiya/codevibe-core/dist/types/index.d.ts +0 -2
  14. package/node_modules/@quantiya/codevibe-core/dist/types/session.d.ts +0 -16
  15. package/node_modules/@quantiya/codevibe-core/package.json +1 -1
  16. package/node_modules/body-parser/README.md +18 -18
  17. package/node_modules/body-parser/index.js +6 -15
  18. package/node_modules/body-parser/lib/read.js +17 -20
  19. package/node_modules/body-parser/lib/types/json.js +8 -16
  20. package/node_modules/body-parser/lib/types/raw.js +3 -4
  21. package/node_modules/body-parser/lib/types/text.js +3 -4
  22. package/node_modules/body-parser/lib/types/urlencoded.js +8 -8
  23. package/node_modules/body-parser/lib/utils.js +11 -9
  24. package/node_modules/body-parser/package.json +2 -2
  25. package/node_modules/content-disposition/README.md +7 -8
  26. package/node_modules/content-disposition/index.js +118 -40
  27. package/node_modules/content-disposition/package.json +8 -11
  28. package/node_modules/express/Readme.md +39 -29
  29. package/node_modules/express/lib/application.js +1 -1
  30. package/node_modules/express/lib/request.js +5 -6
  31. package/node_modules/express/lib/response.js +14 -0
  32. package/node_modules/express/lib/utils.js +3 -1
  33. package/node_modules/express/package.json +6 -5
  34. package/node_modules/finalhandler/HISTORY.md +6 -0
  35. package/node_modules/finalhandler/README.md +26 -23
  36. package/node_modules/finalhandler/package.json +13 -9
  37. package/node_modules/graphql/execution/execute.d.ts +14 -1
  38. package/node_modules/graphql/execution/execute.js +63 -13
  39. package/node_modules/graphql/execution/execute.mjs +63 -13
  40. package/node_modules/graphql/execution/subscribe.js +1 -0
  41. package/node_modules/graphql/execution/subscribe.mjs +2 -0
  42. package/node_modules/graphql/execution/values.js +4 -4
  43. package/node_modules/graphql/execution/values.mjs +4 -4
  44. package/node_modules/graphql/index.d.ts +1 -0
  45. package/node_modules/graphql/language/ast.d.ts +10 -1
  46. package/node_modules/graphql/language/ast.js +8 -1
  47. package/node_modules/graphql/language/ast.mjs +8 -1
  48. package/node_modules/graphql/language/directiveLocation.d.ts +1 -0
  49. package/node_modules/graphql/language/directiveLocation.js +1 -0
  50. package/node_modules/graphql/language/directiveLocation.mjs +1 -0
  51. package/node_modules/graphql/language/index.d.ts +1 -0
  52. package/node_modules/graphql/language/kinds.d.ts +1 -0
  53. package/node_modules/graphql/language/kinds.js +1 -0
  54. package/node_modules/graphql/language/kinds.mjs +1 -0
  55. package/node_modules/graphql/language/parser.d.ts +14 -0
  56. package/node_modules/graphql/language/parser.js +33 -0
  57. package/node_modules/graphql/language/parser.mjs +33 -0
  58. package/node_modules/graphql/language/predicates.js +3 -1
  59. package/node_modules/graphql/language/predicates.mjs +5 -1
  60. package/node_modules/graphql/language/printer.js +13 -1
  61. package/node_modules/graphql/language/printer.mjs +13 -1
  62. package/node_modules/graphql/package.json +1 -1
  63. package/node_modules/graphql/type/directives.d.ts +9 -1
  64. package/node_modules/graphql/type/directives.js +10 -1
  65. package/node_modules/graphql/type/directives.mjs +10 -1
  66. package/node_modules/graphql/type/introspection.js +24 -1
  67. package/node_modules/graphql/type/introspection.mjs +24 -1
  68. package/node_modules/graphql/utilities/buildASTSchema.js +4 -0
  69. package/node_modules/graphql/utilities/buildASTSchema.mjs +4 -0
  70. package/node_modules/graphql/utilities/buildClientSchema.js +1 -0
  71. package/node_modules/graphql/utilities/buildClientSchema.mjs +1 -0
  72. package/node_modules/graphql/utilities/coerceInputValue.js +2 -2
  73. package/node_modules/graphql/utilities/coerceInputValue.mjs +2 -2
  74. package/node_modules/graphql/utilities/extendSchema.js +58 -3
  75. package/node_modules/graphql/utilities/extendSchema.mjs +58 -3
  76. package/node_modules/graphql/utilities/getIntrospectionQuery.d.ts +16 -0
  77. package/node_modules/graphql/utilities/getIntrospectionQuery.js +31 -38
  78. package/node_modules/graphql/utilities/getIntrospectionQuery.mjs +31 -38
  79. package/node_modules/graphql/utilities/introspectionFromSchema.js +1 -0
  80. package/node_modules/graphql/utilities/introspectionFromSchema.mjs +1 -0
  81. package/node_modules/graphql/utilities/printSchema.js +1 -0
  82. package/node_modules/graphql/utilities/printSchema.mjs +1 -0
  83. package/node_modules/graphql/utilities/valueFromAST.js +12 -2
  84. package/node_modules/graphql/utilities/valueFromAST.mjs +12 -2
  85. package/node_modules/graphql/validation/rules/KnownDirectivesRule.js +4 -0
  86. package/node_modules/graphql/validation/rules/KnownDirectivesRule.mjs +4 -0
  87. package/node_modules/graphql/validation/rules/UniqueDirectivesPerLocationRule.js +12 -0
  88. package/node_modules/graphql/validation/rules/UniqueDirectivesPerLocationRule.mjs +12 -0
  89. package/node_modules/graphql/validation/rules/ValuesOfCorrectTypeRule.js +5 -11
  90. package/node_modules/graphql/validation/rules/ValuesOfCorrectTypeRule.mjs +5 -11
  91. package/node_modules/graphql/validation/validate.js +12 -0
  92. package/node_modules/graphql/validation/validate.mjs +13 -2
  93. package/node_modules/graphql/version.js +2 -2
  94. package/node_modules/graphql/version.mjs +2 -2
  95. package/node_modules/hasown/CHANGELOG.md +11 -0
  96. package/node_modules/hasown/eslint.config.mjs +6 -0
  97. package/node_modules/hasown/index.d.ts +1 -0
  98. package/node_modules/hasown/package.json +14 -14
  99. package/node_modules/iconv-lite/lib/index.d.ts +114 -26
  100. package/node_modules/iconv-lite/lib/index.js +39 -40
  101. package/node_modules/iconv-lite/package.json +13 -2
  102. package/node_modules/iconv-lite/types/encodings.d.ts +423 -0
  103. package/node_modules/node-abi/abi_registry.json +10 -3
  104. package/node_modules/{semver → node-abi/node_modules/semver}/README.md +19 -4
  105. package/node_modules/{semver → node-abi/node_modules/semver}/bin/semver.js +14 -10
  106. package/node_modules/node-abi/node_modules/semver/functions/truncate.js +48 -0
  107. package/node_modules/{semver → node-abi/node_modules/semver}/index.js +2 -0
  108. package/node_modules/{semver → node-abi/node_modules/semver}/internal/re.js +1 -1
  109. package/node_modules/{semver → node-abi/node_modules/semver}/package.json +3 -3
  110. package/node_modules/{semver → node-abi/node_modules/semver}/range.bnf +5 -4
  111. package/node_modules/node-abi/package.json +1 -1
  112. package/node_modules/path-to-regexp/Readme.md +3 -3
  113. package/node_modules/path-to-regexp/dist/index.d.ts +3 -0
  114. package/node_modules/path-to-regexp/dist/index.js +215 -193
  115. package/node_modules/path-to-regexp/dist/index.js.map +1 -1
  116. package/node_modules/path-to-regexp/package.json +2 -2
  117. package/node_modules/qs/.editorconfig +1 -1
  118. package/node_modules/qs/.github/SECURITY.md +11 -0
  119. package/node_modules/qs/.github/THREAT_MODEL.md +78 -0
  120. package/node_modules/qs/CHANGELOG.md +190 -0
  121. package/node_modules/qs/README.md +29 -4
  122. package/node_modules/qs/dist/qs.js +21 -21
  123. package/node_modules/qs/eslint.config.mjs +56 -0
  124. package/node_modules/qs/lib/parse.js +94 -49
  125. package/node_modules/qs/lib/utils.js +85 -11
  126. package/node_modules/qs/package.json +10 -9
  127. package/node_modules/qs/test/parse.js +391 -13
  128. package/node_modules/qs/test/stringify.js +16 -3
  129. package/node_modules/qs/test/utils.js +173 -3
  130. package/node_modules/send/package.json +11 -8
  131. package/node_modules/serve-static/README.md +23 -23
  132. package/node_modules/serve-static/package.json +6 -3
  133. package/node_modules/side-channel-list/CHANGELOG.md +25 -4
  134. package/node_modules/side-channel-list/index.js +1 -3
  135. package/node_modules/side-channel-list/package.json +8 -8
  136. package/node_modules/side-channel-list/test/index.js +50 -0
  137. package/node_modules/uuid/dist/v35.js +3 -0
  138. package/node_modules/uuid/dist/v6.js +3 -0
  139. package/node_modules/uuid/dist-node/v35.js +3 -0
  140. package/node_modules/uuid/dist-node/v6.js +3 -0
  141. package/node_modules/uuid/package.json +1 -1
  142. package/node_modules/ws/index.js +15 -6
  143. package/node_modules/ws/lib/constants.js +1 -0
  144. package/node_modules/ws/lib/permessage-deflate.js +6 -6
  145. package/node_modules/ws/lib/websocket-server.js +10 -6
  146. package/node_modules/ws/lib/websocket.js +19 -14
  147. package/node_modules/ws/package.json +4 -3
  148. package/node_modules/ws/wrapper.mjs +14 -1
  149. package/package.json +2 -2
  150. package/node_modules/@quantiya/codevibe-core/dist/appsync/__tests__/appsync-client.test.d.ts +0 -1
  151. package/node_modules/@quantiya/codevibe-core/dist/audit-keys/__tests__/audit-keys-parity.test.d.ts +0 -1
  152. package/node_modules/@quantiya/codevibe-core/dist/audit-keys/index.d.ts +0 -41
  153. package/node_modules/@quantiya/codevibe-core/dist/auth/__tests__/auth-telemetry.test.d.ts +0 -1
  154. package/node_modules/@quantiya/codevibe-core/dist/orchestration/__tests__/setup-bootstrap.test.d.ts +0 -1
  155. package/node_modules/@quantiya/codevibe-core/dist/orchestration/__tests__/setup-failure-recourse.test.d.ts +0 -1
  156. package/node_modules/@quantiya/codevibe-core/dist/orchestration/__tests__/setup-save.test.d.ts +0 -1
  157. package/node_modules/@quantiya/codevibe-core/dist/orchestration/__tests__/setup-seat-picker.test.d.ts +0 -1
  158. package/node_modules/@quantiya/codevibe-core/dist/orchestration/__tests__/setup-telemetry.test.d.ts +0 -1
  159. package/node_modules/@quantiya/codevibe-core/dist/orchestration/__tests__/setup-test-agents.test.d.ts +0 -1
  160. package/node_modules/@quantiya/codevibe-core/dist/orchestration/__tests__/setup-types.test.d.ts +0 -1
  161. package/node_modules/@quantiya/codevibe-core/dist/orchestration/__tests__/setup-wizard.test.d.ts +0 -1
  162. package/node_modules/@quantiya/codevibe-core/dist/orchestration/__tests__/v1-options.test.d.ts +0 -1
  163. package/node_modules/@quantiya/codevibe-core/dist/orchestration/detect-agents.d.ts +0 -56
  164. package/node_modules/@quantiya/codevibe-core/dist/orchestration/index.d.ts +0 -3
  165. package/node_modules/@quantiya/codevibe-core/dist/orchestration/orchestration-cli.d.ts +0 -12
  166. package/node_modules/@quantiya/codevibe-core/dist/orchestration/setup-bootstrap.d.ts +0 -146
  167. package/node_modules/@quantiya/codevibe-core/dist/orchestration/setup-failure-recourse.d.ts +0 -23
  168. package/node_modules/@quantiya/codevibe-core/dist/orchestration/setup-save.d.ts +0 -47
  169. package/node_modules/@quantiya/codevibe-core/dist/orchestration/setup-seat-picker.d.ts +0 -72
  170. package/node_modules/@quantiya/codevibe-core/dist/orchestration/setup-telemetry.d.ts +0 -54
  171. package/node_modules/@quantiya/codevibe-core/dist/orchestration/setup-test-agents.d.ts +0 -108
  172. package/node_modules/@quantiya/codevibe-core/dist/orchestration/setup-types.d.ts +0 -140
  173. package/node_modules/@quantiya/codevibe-core/dist/orchestration/setup-wizard.d.ts +0 -57
  174. package/node_modules/@quantiya/codevibe-core/dist/orchestration/v1-options.d.ts +0 -108
  175. package/node_modules/@quantiya/codevibe-core/dist/reviewer/__tests__/integration.test.d.ts +0 -1
  176. package/node_modules/@quantiya/codevibe-core/dist/reviewer/__tests__/mocks.test.d.ts +0 -1
  177. package/node_modules/@quantiya/codevibe-core/dist/reviewer/__tests__/output-parser.test.d.ts +0 -1
  178. package/node_modules/@quantiya/codevibe-core/dist/reviewer/__tests__/registry.test.d.ts +0 -1
  179. package/node_modules/@quantiya/codevibe-core/dist/reviewer/__tests__/subprocess.test.d.ts +0 -1
  180. package/node_modules/@quantiya/codevibe-core/dist/reviewer/index.d.ts +0 -15
  181. package/node_modules/@quantiya/codevibe-core/dist/reviewer/mocks.d.ts +0 -80
  182. package/node_modules/@quantiya/codevibe-core/dist/reviewer/output-parser.d.ts +0 -95
  183. package/node_modules/@quantiya/codevibe-core/dist/reviewer/provider.d.ts +0 -153
  184. package/node_modules/@quantiya/codevibe-core/dist/reviewer/providers/__tests__/claude-live-smoke.test.d.ts +0 -1
  185. package/node_modules/@quantiya/codevibe-core/dist/reviewer/providers/__tests__/claude.test.d.ts +0 -1
  186. package/node_modules/@quantiya/codevibe-core/dist/reviewer/providers/__tests__/codex-live-smoke.test.d.ts +0 -1
  187. package/node_modules/@quantiya/codevibe-core/dist/reviewer/providers/__tests__/codex.test.d.ts +0 -1
  188. package/node_modules/@quantiya/codevibe-core/dist/reviewer/providers/__tests__/gemini-live-smoke.test.d.ts +0 -1
  189. package/node_modules/@quantiya/codevibe-core/dist/reviewer/providers/__tests__/gemini.test.d.ts +0 -1
  190. package/node_modules/@quantiya/codevibe-core/dist/reviewer/providers/claude.d.ts +0 -59
  191. package/node_modules/@quantiya/codevibe-core/dist/reviewer/providers/codex.d.ts +0 -67
  192. package/node_modules/@quantiya/codevibe-core/dist/reviewer/providers/common.d.ts +0 -25
  193. package/node_modules/@quantiya/codevibe-core/dist/reviewer/providers/gemini.d.ts +0 -108
  194. package/node_modules/@quantiya/codevibe-core/dist/reviewer/registry.d.ts +0 -87
  195. package/node_modules/@quantiya/codevibe-core/dist/reviewer/subprocess.d.ts +0 -117
  196. package/node_modules/@quantiya/codevibe-core/dist/reviewer/types.d.ts +0 -101
  197. package/node_modules/@quantiya/codevibe-core/dist/types/orchestration.d.ts +0 -57
  198. package/node_modules/@quantiya/codevibe-core/dist/types/reviewer.d.ts +0 -67
  199. package/node_modules/content-disposition/HISTORY.md +0 -72
  200. package/node_modules/express/History.md +0 -3858
  201. package/node_modules/hasown/.eslintrc +0 -5
  202. package/node_modules/iconv-lite/Changelog.md +0 -236
  203. package/node_modules/qs/.eslintrc +0 -39
  204. package/node_modules/send/HISTORY.md +0 -580
  205. package/node_modules/serve-static/HISTORY.md +0 -516
  206. /package/node_modules/{semver → node-abi/node_modules/semver}/LICENSE +0 -0
  207. /package/node_modules/{semver → node-abi/node_modules/semver}/classes/comparator.js +0 -0
  208. /package/node_modules/{semver → node-abi/node_modules/semver}/classes/index.js +0 -0
  209. /package/node_modules/{semver → node-abi/node_modules/semver}/classes/range.js +0 -0
  210. /package/node_modules/{semver → node-abi/node_modules/semver}/classes/semver.js +0 -0
  211. /package/node_modules/{semver → node-abi/node_modules/semver}/functions/clean.js +0 -0
  212. /package/node_modules/{semver → node-abi/node_modules/semver}/functions/cmp.js +0 -0
  213. /package/node_modules/{semver → node-abi/node_modules/semver}/functions/coerce.js +0 -0
  214. /package/node_modules/{semver → node-abi/node_modules/semver}/functions/compare-build.js +0 -0
  215. /package/node_modules/{semver → node-abi/node_modules/semver}/functions/compare-loose.js +0 -0
  216. /package/node_modules/{semver → node-abi/node_modules/semver}/functions/compare.js +0 -0
  217. /package/node_modules/{semver → node-abi/node_modules/semver}/functions/diff.js +0 -0
  218. /package/node_modules/{semver → node-abi/node_modules/semver}/functions/eq.js +0 -0
  219. /package/node_modules/{semver → node-abi/node_modules/semver}/functions/gt.js +0 -0
  220. /package/node_modules/{semver → node-abi/node_modules/semver}/functions/gte.js +0 -0
  221. /package/node_modules/{semver → node-abi/node_modules/semver}/functions/inc.js +0 -0
  222. /package/node_modules/{semver → node-abi/node_modules/semver}/functions/lt.js +0 -0
  223. /package/node_modules/{semver → node-abi/node_modules/semver}/functions/lte.js +0 -0
  224. /package/node_modules/{semver → node-abi/node_modules/semver}/functions/major.js +0 -0
  225. /package/node_modules/{semver → node-abi/node_modules/semver}/functions/minor.js +0 -0
  226. /package/node_modules/{semver → node-abi/node_modules/semver}/functions/neq.js +0 -0
  227. /package/node_modules/{semver → node-abi/node_modules/semver}/functions/parse.js +0 -0
  228. /package/node_modules/{semver → node-abi/node_modules/semver}/functions/patch.js +0 -0
  229. /package/node_modules/{semver → node-abi/node_modules/semver}/functions/prerelease.js +0 -0
  230. /package/node_modules/{semver → node-abi/node_modules/semver}/functions/rcompare.js +0 -0
  231. /package/node_modules/{semver → node-abi/node_modules/semver}/functions/rsort.js +0 -0
  232. /package/node_modules/{semver → node-abi/node_modules/semver}/functions/satisfies.js +0 -0
  233. /package/node_modules/{semver → node-abi/node_modules/semver}/functions/sort.js +0 -0
  234. /package/node_modules/{semver → node-abi/node_modules/semver}/functions/valid.js +0 -0
  235. /package/node_modules/{semver → node-abi/node_modules/semver}/internal/constants.js +0 -0
  236. /package/node_modules/{semver → node-abi/node_modules/semver}/internal/debug.js +0 -0
  237. /package/node_modules/{semver → node-abi/node_modules/semver}/internal/identifiers.js +0 -0
  238. /package/node_modules/{semver → node-abi/node_modules/semver}/internal/lrucache.js +0 -0
  239. /package/node_modules/{semver → node-abi/node_modules/semver}/internal/parse-options.js +0 -0
  240. /package/node_modules/{semver → node-abi/node_modules/semver}/preload.js +0 -0
  241. /package/node_modules/{semver → node-abi/node_modules/semver}/ranges/gtr.js +0 -0
  242. /package/node_modules/{semver → node-abi/node_modules/semver}/ranges/intersects.js +0 -0
  243. /package/node_modules/{semver → node-abi/node_modules/semver}/ranges/ltr.js +0 -0
  244. /package/node_modules/{semver → node-abi/node_modules/semver}/ranges/max-satisfying.js +0 -0
  245. /package/node_modules/{semver → node-abi/node_modules/semver}/ranges/min-satisfying.js +0 -0
  246. /package/node_modules/{semver → node-abi/node_modules/semver}/ranges/min-version.js +0 -0
  247. /package/node_modules/{semver → node-abi/node_modules/semver}/ranges/outside.js +0 -0
  248. /package/node_modules/{semver → node-abi/node_modules/semver}/ranges/simplify.js +0 -0
  249. /package/node_modules/{semver → node-abi/node_modules/semver}/ranges/subset.js +0 -0
  250. /package/node_modules/{semver → node-abi/node_modules/semver}/ranges/to-comparators.js +0 -0
  251. /package/node_modules/{semver → node-abi/node_modules/semver}/ranges/valid.js +0 -0
  252. /package/node_modules/{strip-json-comments → rc/node_modules/strip-json-comments}/index.js +0 -0
  253. /package/node_modules/{strip-json-comments → rc/node_modules/strip-json-comments}/license +0 -0
  254. /package/node_modules/{strip-json-comments → rc/node_modules/strip-json-comments}/package.json +0 -0
  255. /package/node_modules/{strip-json-comments → rc/node_modules/strip-json-comments}/readme.md +0 -0
@@ -1,117 +0,0 @@
1
- /**
2
- * Successful subprocess run. Exit status may still be failure (non-zero
3
- * code); the caller decides whether to treat that as a reviewer spawn error
4
- * or as a parse failure with whatever stdout it produced.
5
- */
6
- export interface SubprocessOutcome {
7
- /** Captured stdout decoded as UTF-8. Reviewers that emit non-UTF-8 are
8
- * misbehaving by contract; lossy decode keeps the parser running rather
9
- * than returning an IO error for what is really a "reviewer is broken"
10
- * scenario. */
11
- stdout: string;
12
- /** Captured stderr (same lossy-decode policy). Surfaced to callers so
13
- * audit records can include it. */
14
- stderr: string;
15
- /** Wall-clock milliseconds from `spawn()` to exit. Populated even on
16
- * non-zero exit because per-reviewer latency is a cost / reliability
17
- * telemetry input. */
18
- elapsed_ms: number;
19
- /** Whether the process exited with status 0. Separate from the stdout
20
- * contents — a reviewer that printed its verdict and then crashed on
21
- * shutdown is still "failed" from an audit perspective even if the
22
- * verdict parses cleanly. */
23
- exit_success: boolean;
24
- }
25
- /**
26
- * Subprocess-layer errors. Discriminated union; callers (per-agent
27
- * providers) map these into `ReviewerError` with their own `AgentKind`.
28
- */
29
- export type SubprocessError = {
30
- /** The child process could not be spawned at all (binary not on
31
- * PATH, permission denied, fork/exec failed). */
32
- kind: 'spawn_failed';
33
- reason: string;
34
- } | {
35
- /** The child exceeded its `timeout_ms` budget. The child has been
36
- * (or will be) killed via SIGKILL by the time this error is
37
- * returned. */
38
- kind: 'timeout';
39
- /** The timeout budget in ms, for telemetry. */
40
- elapsed_ms: number;
41
- } | {
42
- /** A non-timeout IO failure occurred while running the subprocess
43
- * (stdin write failed, stdout read failed, etc.). */
44
- kind: 'io';
45
- reason: string;
46
- } | {
47
- /** Caller signalled abort via the `signal` option before the child
48
- * exited. The child has been killed via SIGKILL. Distinct from
49
- * `timeout` so the audit log can attribute "reviewer cancelled by
50
- * engine" separately from "reviewer ran past budget." */
51
- kind: 'cancelled';
52
- };
53
- /** Class wrapper so callers can `throw`/`catch` typed errors. */
54
- export declare class SubprocessErrorClass extends Error {
55
- readonly detail: SubprocessError;
56
- constructor(detail: SubprocessError);
57
- }
58
- /**
59
- * Inputs to `runReviewer`. Callers (per-agent providers) build this struct
60
- * with their agent-specific binary + args + env, then hand off lifecycle
61
- * management to this module.
62
- */
63
- export interface RunReviewerOptions {
64
- /** Path or command name to spawn. */
65
- command: string;
66
- /** Arguments to pass to the command. */
67
- args: readonly string[];
68
- /**
69
- * Environment variables to set. **MUST include
70
- * `QUORUM_REVIEWER_SUBPROCESS: '1'`** — this is the plugin-isolation env
71
- * guard that prevents reviewer hook fires from evicting the user's
72
- * primary plugin session. Each provider is responsible for setting it;
73
- * this module does NOT inject it automatically because providers may
74
- * also need to forward `process.env` selectively.
75
- */
76
- env: NodeJS.ProcessEnv;
77
- /** Working directory; falls back to `process.cwd()`. */
78
- cwd?: string;
79
- /**
80
- * Prompt to write to the child's stdin. Always followed by stdin EOF.
81
- * Most reviewer CLIs finish reading the prompt then begin emitting
82
- * output — a reviewer that blocks on a stuck stdin pipe is the §3.1
83
- * test scenario.
84
- */
85
- prompt: string;
86
- /**
87
- * Wall-clock timeout (ms) bounding the whole spawn-to-exit window,
88
- * INCLUDING the stdin write. This is the load-bearing detail per §3.1:
89
- * an earlier (Rust v1) implementation wrapped only the wait-for-exit,
90
- * which let a child that refused to drain stdin block the parent in
91
- * pipe-full back-pressure indefinitely. Wrapping write+wait under one
92
- * timeout is the fix.
93
- */
94
- timeout_ms: number;
95
- /**
96
- * Optional `AbortSignal` for engine-driven cancellation (e.g., user
97
- * abort, sibling reviewer hard-rejecting). Aborting after a clean exit
98
- * is a no-op; aborting mid-flight teardown is a `cancelled` error.
99
- */
100
- signal?: AbortSignal;
101
- }
102
- /**
103
- * Run a preconfigured command as a reviewer subprocess.
104
- *
105
- * Contract:
106
- * - Stdin, stdout, stderr are piped (caller cannot override; output capture
107
- * is the whole purpose of the call).
108
- * - `prompt` is written to the child's stdin then stdin is closed (EOF).
109
- * - The whole spawn → write-stdin → wait-for-exit lifecycle races against
110
- * `timeout_ms` AND any `signal` abort. On timeout / abort the streams
111
- * are explicitly destroyed and the child is SIGKILL'd before throwing.
112
- *
113
- * Throws `SubprocessErrorClass` on failure; the `.detail.kind` discriminator
114
- * tells the caller which path tripped (`spawn_failed` / `timeout` / `io` /
115
- * `cancelled`).
116
- */
117
- export declare function runReviewer(opts: RunReviewerOptions): Promise<SubprocessOutcome>;
@@ -1,101 +0,0 @@
1
- /**
2
- * Three agent kinds the reviewer subprocess layer can spawn.
3
- *
4
- * Lowercase wire format matches `codevibe_policy::AgentKind`'s
5
- * `#[serde(rename_all = "lowercase")]` attribute. **Append-only after launch**
6
- * — adding a fourth agent (e.g. a hypothetical fourth CLI) is fine; renaming
7
- * `claude` → `Claude` would break every audit chain entry that has serialised
8
- * it.
9
- */
10
- export type AgentKind = 'claude' | 'gemini' | 'codex';
11
- /**
12
- * Review lens a reviewer seat evaluates through.
13
- *
14
- * snake_case wire format matches `codevibe_policy::ReviewerRole`'s
15
- * `#[serde(rename_all = "snake_case")]` attribute, locked in Phase 2f.0.a.1.
16
- * **Append-only post-launch** — these strings are cryptographically bound
17
- * into the audit hash chain once used. Renaming or removing a value would
18
- * break chain verification on every prior entry. Adding new values is fine
19
- * (Custom roles slipped to 2.0.1 per the locked design).
20
- *
21
- * Code-artifact lenses: architecture, correctness, security.
22
- * Docs-artifact lenses: accuracy, clarity, completeness.
23
- * Mixed-artifact composite lenses: architecture_and_accuracy,
24
- * correctness_and_clarity, security_and_completeness.
25
- *
26
- * The AppSync-facing `ReviewerRole` enum in `src/types/reviewer.ts` uses
27
- * UPPERCASE GraphQL convention; this snake_case version is for the Rust
28
- * engine wire. Translation between the two layers is the AppSync resolver's
29
- * job, not the reviewer module's.
30
- */
31
- export type ReviewerRole = 'architecture' | 'correctness' | 'security' | 'accuracy' | 'clarity' | 'completeness' | 'architecture_and_accuracy' | 'correctness_and_clarity' | 'security_and_completeness';
32
- /**
33
- * Reviewer verdict kinds. Four values, each maps to a different path through
34
- * the consensus engine.
35
- *
36
- * UPPERCASE wire format matches `codevibe_reviewer::VerdictKind`'s
37
- * `#[serde(rename_all = "UPPERCASE")]` attribute. Append-only post-launch.
38
- *
39
- * - `APPROVE` — plan/artifact is sound, proceed.
40
- * - `REJECT` — plan/artifact has fundamental problems; do not proceed.
41
- * - `REVISE` — plan/artifact is close but needs specific changes. Requires
42
- * populated `suggested_changes` per the parser's locked invariant.
43
- * - `ESCALATE` — reviewer cannot decide confidently; surface to user.
44
- */
45
- export type VerdictKind = 'APPROVE' | 'REJECT' | 'REVISE' | 'ESCALATE';
46
- /**
47
- * Newtype-equivalent for `ReviewerVerdict.verdict_id`. Mirrors Rust's
48
- * `VerdictId(pub Uuid)` with `#[serde(transparent)]` — wire form is just the
49
- * UUID string, no envelope.
50
- */
51
- export type VerdictId = string;
52
- /**
53
- * One reviewer's verdict at one gate. Records reasoning plus perf/cost
54
- * metadata for telemetry (review latency, token cost per task, etc.).
55
- *
56
- * `gate_id` is a plain UUID string (matches Rust's `Uuid` field — the engine
57
- * wraps this in its own `GateId` newtype, but the reviewer crate stays
58
- * agnostic to avoid an engine→reviewer→engine cycle).
59
- *
60
- * # Identity
61
- *
62
- * Per Phase 2f.0.a's seat/role pivot, verdicts are keyed on `seat_id` +
63
- * `role`, NOT on `reviewer_agent`. Consensus dedup + audit attribution
64
- * happen via `seat_id`; `reviewer_agent` stays for cost-attribution metadata
65
- * only and is NOT a uniqueness key (two seats may share an agent in the
66
- * single-vendor case).
67
- *
68
- * Field ordering + names match the Rust struct verbatim — the audit chain's
69
- * SHA-256 hashes serialised JSON, so any change to field order or naming
70
- * would invalidate every prior chain entry. Append-only after launch.
71
- */
72
- export interface ReviewerVerdict {
73
- /** Primary key. UUID v4 string. */
74
- verdict_id: VerdictId;
75
- /** Foreign key to `ReviewGate`. Plain UUID string per the reviewer crate's
76
- * agnostic-to-engine design. */
77
- gate_id: string;
78
- /** Seat that produced the verdict. Primary identity key for dedup +
79
- * audit attribution. Providers MUST copy this from `ReviewerSpec.seat_id`. */
80
- seat_id: number;
81
- /** Lens the seat reviewed through. Copied from `ReviewerSpec.role` verbatim. */
82
- role: ReviewerRole;
83
- /** Agent that produced the verdict. Descriptive metadata (cost attribution,
84
- * per-agent reliability); NOT an identity key. */
85
- reviewer_agent: AgentKind;
86
- /** The verdict itself. */
87
- verdict: VerdictKind;
88
- /** Reviewer's free-form reasoning. */
89
- reasoning: string;
90
- /** Ordered list of specific changes. **Required** when `verdict === 'REVISE'`;
91
- * empty for other verdicts (enforced by the output parser). */
92
- suggested_changes: string[];
93
- /** Model identifier used (for cost attribution). */
94
- model_used: string | null;
95
- /** Tokens consumed by this reviewer. */
96
- tokens_used: number | null;
97
- /** End-to-end latency for this reviewer's verdict (ms). */
98
- latency_ms: number | null;
99
- /** ISO 8601 UTC timestamp string when the reviewer returned the verdict. */
100
- submitted_at: string;
101
- }
@@ -1,57 +0,0 @@
1
- /**
2
- * Wire-shape `UserDecisionKind` enum — matches AppSync schema directly
3
- * (`codevibe-backend/graphql/schema.graphql:716-722`). Append-only post-launch.
4
- *
5
- * V1 ships only the 3 no-notes kinds (`ACCEPT`, `REJECT_RESTART`,
6
- * `ABORT_TASK`); the two `_WITH_NOTES` variants are defined here for
7
- * completeness against the schema but are NOT in V1's hardcoded option
8
- * table — they require a `notes: EncryptedPayloadInput` value alongside
9
- * the kind, which the V1 "type a number" UX has no surface for.
10
- */
11
- export declare enum UserDecisionKind {
12
- ACCEPT = "ACCEPT",
13
- ACCEPT_WITH_NOTES = "ACCEPT_WITH_NOTES",
14
- REJECT_WITH_NOTES = "REJECT_WITH_NOTES",
15
- REJECT_RESTART = "REJECT_RESTART",
16
- ABORT_TASK = "ABORT_TASK"
17
- }
18
- /**
19
- * Input shape for `applyUserDecision` mutation. Matches AppSync schema
20
- * (`codevibe-backend/graphql/schema.graphql:775-790`).
21
- *
22
- * REQUIRED fields: `gateId`, `taskId`, `sessionId`, `currentRound`, `decision`.
23
- * OPTIONAL field: `notes` (only used for `_WITH_NOTES` decision kinds, which
24
- * are V2-only in V1).
25
- */
26
- export interface ApplyUserDecisionInput {
27
- gateId: string;
28
- taskId: string;
29
- sessionId: string;
30
- currentRound: number;
31
- decision: UserDecisionKind;
32
- notes?: never;
33
- }
34
- /**
35
- * `UserDecisionAppliedEvent` envelope — returned by `applyUserDecision`
36
- * mutation AND streamed via `onApplyUserDecision` subscription per
37
- * Phase 3.b mobile V1 bridge §1.1. Top-level `sessionId` is the
38
- * subscription filter key (mirrors `GateResolvedEvent` precedent at
39
- * `schema.graphql:815-821`).
40
- *
41
- * `payload` is `AWSJSON` on the wire — AppSync delivers it as a
42
- * JSON-encoded string that callers must `JSON.parse` before treating
43
- * as the typed `PostDecisionAction` shape from
44
- * `codevibe-revision/src/user_decision.rs:109`. V1 desktop-plugin
45
- * callers do NOT consume `payload` (the engine-determined next-gate
46
- * action is handled server-side by the orchestration loop, NOT
47
- * client-side in V1); the field is preserved on the envelope for
48
- * forward-compat.
49
- */
50
- export interface UserDecisionAppliedEvent {
51
- sessionId: string;
52
- taskId: string;
53
- gateId: string;
54
- decision: UserDecisionKind;
55
- /** AWSJSON-encoded `PostDecisionAction` shape; opaque to V1 plugin callers. */
56
- payload: string;
57
- }
@@ -1,67 +0,0 @@
1
- /**
2
- * Review lens a reviewer seat evaluates through. Mirrors
3
- * codevibe-policy::ReviewerRole in the Rust engine.
4
- *
5
- * **Append-only post-launch** per the 2026-04-23 memory lock — these
6
- * string values are cryptographically bound into the audit hash chain
7
- * once used. Renaming or removing a value would break chain verification
8
- * on every prior entry. Add new values freely; never rename or remove.
9
- *
10
- * UPPERCASE here (matches AppSync GraphQL enum convention). The Lambda
11
- * translates to snake_case before writing to the audit chain / Rust
12
- * engine wire.
13
- */
14
- export declare enum ReviewerRole {
15
- ARCHITECTURE = "ARCHITECTURE",
16
- CORRECTNESS = "CORRECTNESS",
17
- SECURITY = "SECURITY",
18
- ACCURACY = "ACCURACY",
19
- CLARITY = "CLARITY",
20
- COMPLETENESS = "COMPLETENESS",
21
- ARCHITECTURE_AND_ACCURACY = "ARCHITECTURE_AND_ACCURACY",
22
- CORRECTNESS_AND_CLARITY = "CORRECTNESS_AND_CLARITY",
23
- SECURITY_AND_COMPLETENESS = "SECURITY_AND_COMPLETENESS"
24
- }
25
- /**
26
- * One seat in a user's reviewer panel. `seat_id` is the panel position
27
- * (0-indexed: Pro has seats 0–1, Max has 0–2). `role` is the review lens
28
- * — unique within a policy. `agent` (CLAUDE | GEMINI | CODEX) may repeat
29
- * across seats — single-vendor users get multiple same-kind seats with
30
- * distinct roles.
31
- */
32
- export interface ReviewerAgentSpec {
33
- seatId: number;
34
- role: ReviewerRole;
35
- agent: 'CLAUDE' | 'GEMINI' | 'CODEX';
36
- modelHint?: string | null;
37
- }
38
- export interface ReviewerAgentSpecInput {
39
- seatId: number;
40
- role: ReviewerRole;
41
- agent: 'CLAUDE' | 'GEMINI' | 'CODEX';
42
- modelHint?: string | null;
43
- }
44
- /**
45
- * Input for updateReviewerPolicy. Fields are independent:
46
- * - orchestrationEnabledDefault: set to true/false to persist the user's
47
- * opt-in preference for new sessions. Null = leave unchanged.
48
- * - reviewerSeats: non-empty array sets a custom panel. Empty array
49
- * resets to tier defaults. Null = leave unchanged.
50
- */
51
- export interface UpdateReviewerPolicyInput {
52
- orchestrationEnabledDefault?: boolean | null;
53
- reviewerSeats?: ReviewerAgentSpecInput[] | null;
54
- }
55
- /**
56
- * User record returned by updateAvailableAgents and updateReviewerPolicy.
57
- * Subset of the full AppSync User type — only the fields the two mutations
58
- * return. Use this in the AppSyncClient response typing, not as a general
59
- * "User" replacement.
60
- */
61
- export interface UserReviewerPolicySnapshot {
62
- userId: string;
63
- availableAgents?: Array<'CLAUDE' | 'GEMINI' | 'CODEX'> | null;
64
- orchestrationEnabledDefault?: boolean | null;
65
- reviewerSeats?: ReviewerAgentSpec[] | null;
66
- updatedAt: string;
67
- }
@@ -1,72 +0,0 @@
1
- 1.0.1 / 2025-11-18
2
- =================
3
-
4
- * Updated `engines` field to Node@18 or higher (fixed reference, see 1.0.0)
5
- * Remove dependency `safe-buffer`
6
-
7
- 1.0.0 / 2024-08-31
8
- ==================
9
-
10
- * drop node <18
11
- * allow utf8 as alias for utf-8
12
-
13
- 0.5.4 / 2021-12-10
14
- ==================
15
-
16
- * deps: safe-buffer@5.2.1
17
-
18
- 0.5.3 / 2018-12-17
19
- ==================
20
-
21
- * Use `safe-buffer` for improved Buffer API
22
-
23
- 0.5.2 / 2016-12-08
24
- ==================
25
-
26
- * Fix `parse` to accept any linear whitespace character
27
-
28
- 0.5.1 / 2016-01-17
29
- ==================
30
-
31
- * perf: enable strict mode
32
-
33
- 0.5.0 / 2014-10-11
34
- ==================
35
-
36
- * Add `parse` function
37
-
38
- 0.4.0 / 2014-09-21
39
- ==================
40
-
41
- * Expand non-Unicode `filename` to the full ISO-8859-1 charset
42
-
43
- 0.3.0 / 2014-09-20
44
- ==================
45
-
46
- * Add `fallback` option
47
- * Add `type` option
48
-
49
- 0.2.0 / 2014-09-19
50
- ==================
51
-
52
- * Reduce ambiguity of file names with hex escape in buggy browsers
53
-
54
- 0.1.2 / 2014-09-19
55
- ==================
56
-
57
- * Fix periodic invalid Unicode filename header
58
-
59
- 0.1.1 / 2014-09-19
60
- ==================
61
-
62
- * Fix invalid characters appearing in `filename*` parameter
63
-
64
- 0.1.0 / 2014-09-18
65
- ==================
66
-
67
- * Make the `filename` argument optional
68
-
69
- 0.0.0 / 2014-09-18
70
- ==================
71
-
72
- * Initial release