@quantiya/codevibe-claude-plugin 1.0.13 → 1.0.15

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 (439) hide show
  1. package/.claude-plugin/plugin.json +1 -1
  2. package/node_modules/@quantiya/codevibe-core/README.md +179 -0
  3. package/node_modules/@quantiya/codevibe-core/bin/codevibe.js +7 -0
  4. package/node_modules/@quantiya/codevibe-core/dist/appsync/appsync-client.d.ts +132 -0
  5. package/node_modules/@quantiya/codevibe-core/dist/appsync/index.d.ts +2 -0
  6. package/node_modules/@quantiya/codevibe-core/dist/appsync/queries.d.ts +16 -0
  7. package/node_modules/@quantiya/codevibe-core/dist/auth/auth-cli.d.ts +5 -0
  8. package/node_modules/@quantiya/codevibe-core/dist/auth/auth-service.d.ts +87 -0
  9. package/node_modules/@quantiya/codevibe-core/dist/auth/fetch-helpers.d.ts +11 -0
  10. package/node_modules/@quantiya/codevibe-core/dist/auth/index.d.ts +2 -0
  11. package/node_modules/@quantiya/codevibe-core/dist/config/config.d.ts +53 -0
  12. package/node_modules/@quantiya/codevibe-core/dist/config/index.d.ts +2 -0
  13. package/node_modules/@quantiya/codevibe-core/dist/crypto/crypto-service.d.ts +118 -0
  14. package/node_modules/@quantiya/codevibe-core/dist/crypto/index.d.ts +1 -0
  15. package/node_modules/@quantiya/codevibe-core/dist/index.d.ts +14 -0
  16. package/node_modules/@quantiya/codevibe-core/dist/index.js +220 -0
  17. package/node_modules/@quantiya/codevibe-core/dist/keychain/index.d.ts +1 -0
  18. package/node_modules/@quantiya/codevibe-core/dist/keychain/keychain-backend.d.ts +3 -0
  19. package/node_modules/@quantiya/codevibe-core/dist/keychain/keychain-manager.d.ts +139 -0
  20. package/node_modules/@quantiya/codevibe-core/dist/logger/index.d.ts +1 -0
  21. package/node_modules/@quantiya/codevibe-core/dist/logger/logger.d.ts +35 -0
  22. package/node_modules/@quantiya/codevibe-core/dist/prompt-parser.d.ts +39 -0
  23. package/node_modules/@quantiya/codevibe-core/dist/session/index.d.ts +2 -0
  24. package/node_modules/@quantiya/codevibe-core/dist/session/session-resume.d.ts +55 -0
  25. package/node_modules/@quantiya/codevibe-core/dist/types/auth.d.ts +15 -0
  26. package/node_modules/@quantiya/codevibe-core/dist/types/encryption.d.ts +54 -0
  27. package/node_modules/@quantiya/codevibe-core/dist/types/events.d.ts +74 -0
  28. package/node_modules/@quantiya/codevibe-core/dist/types/index.d.ts +4 -0
  29. package/node_modules/@quantiya/codevibe-core/dist/types/session.d.ts +59 -0
  30. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/CHANGELOG.md +274 -0
  31. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/CONTRIBUTING.md +18 -0
  32. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/LICENSE.md +9 -0
  33. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/README.md +466 -0
  34. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/bin/uuid +2 -0
  35. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/commonjs-browser/index.js +79 -0
  36. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/commonjs-browser/md5.js +223 -0
  37. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/commonjs-browser/native.js +11 -0
  38. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/commonjs-browser/nil.js +8 -0
  39. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/commonjs-browser/parse.js +45 -0
  40. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/commonjs-browser/regex.js +8 -0
  41. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/commonjs-browser/rng.js +25 -0
  42. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/commonjs-browser/sha1.js +104 -0
  43. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/commonjs-browser/stringify.js +44 -0
  44. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/commonjs-browser/v1.js +107 -0
  45. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/commonjs-browser/v3.js +16 -0
  46. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/commonjs-browser/v35.js +80 -0
  47. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/commonjs-browser/v4.js +43 -0
  48. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/commonjs-browser/v5.js +16 -0
  49. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/commonjs-browser/validate.js +17 -0
  50. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/commonjs-browser/version.js +21 -0
  51. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-browser/index.js +9 -0
  52. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-browser/md5.js +215 -0
  53. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-browser/native.js +4 -0
  54. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-browser/nil.js +1 -0
  55. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-browser/parse.js +35 -0
  56. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-browser/regex.js +1 -0
  57. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-browser/rng.js +18 -0
  58. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-browser/sha1.js +96 -0
  59. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-browser/stringify.js +33 -0
  60. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-browser/v1.js +95 -0
  61. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-browser/v3.js +4 -0
  62. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-browser/v35.js +66 -0
  63. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-browser/v4.js +29 -0
  64. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-browser/v5.js +4 -0
  65. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-browser/validate.js +7 -0
  66. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-browser/version.js +11 -0
  67. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-node/index.js +9 -0
  68. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-node/md5.js +13 -0
  69. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-node/native.js +4 -0
  70. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-node/nil.js +1 -0
  71. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-node/parse.js +35 -0
  72. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-node/regex.js +1 -0
  73. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-node/rng.js +12 -0
  74. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-node/sha1.js +13 -0
  75. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-node/stringify.js +33 -0
  76. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-node/v1.js +95 -0
  77. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-node/v3.js +4 -0
  78. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-node/v35.js +66 -0
  79. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-node/v4.js +29 -0
  80. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-node/v5.js +4 -0
  81. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-node/validate.js +7 -0
  82. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-node/version.js +11 -0
  83. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/index.js +79 -0
  84. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/md5-browser.js +223 -0
  85. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/md5.js +23 -0
  86. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/native-browser.js +11 -0
  87. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/native.js +15 -0
  88. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/nil.js +8 -0
  89. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/parse.js +45 -0
  90. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/regex.js +8 -0
  91. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/rng-browser.js +25 -0
  92. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/rng.js +24 -0
  93. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/sha1-browser.js +104 -0
  94. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/sha1.js +23 -0
  95. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/stringify.js +44 -0
  96. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/uuid-bin.js +85 -0
  97. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/v1.js +107 -0
  98. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/v3.js +16 -0
  99. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/v35.js +80 -0
  100. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/v4.js +43 -0
  101. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/v5.js +16 -0
  102. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/validate.js +17 -0
  103. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/version.js +21 -0
  104. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/package.json +135 -0
  105. package/node_modules/@quantiya/codevibe-core/node_modules/uuid/wrapper.mjs +10 -0
  106. package/node_modules/@quantiya/codevibe-core/package.json +56 -0
  107. package/node_modules/base64-js/LICENSE +21 -0
  108. package/node_modules/base64-js/README.md +34 -0
  109. package/node_modules/base64-js/base64js.min.js +1 -0
  110. package/node_modules/base64-js/index.d.ts +3 -0
  111. package/node_modules/base64-js/index.js +150 -0
  112. package/node_modules/base64-js/package.json +47 -0
  113. package/node_modules/bl/.travis.yml +17 -0
  114. package/node_modules/bl/BufferList.js +396 -0
  115. package/node_modules/bl/LICENSE.md +13 -0
  116. package/node_modules/bl/README.md +247 -0
  117. package/node_modules/bl/bl.js +84 -0
  118. package/node_modules/bl/package.json +37 -0
  119. package/node_modules/bl/test/convert.js +21 -0
  120. package/node_modules/bl/test/indexOf.js +492 -0
  121. package/node_modules/bl/test/isBufferList.js +32 -0
  122. package/node_modules/bl/test/test.js +869 -0
  123. package/node_modules/buffer/AUTHORS.md +70 -0
  124. package/node_modules/buffer/LICENSE +21 -0
  125. package/node_modules/buffer/README.md +410 -0
  126. package/node_modules/buffer/index.d.ts +186 -0
  127. package/node_modules/buffer/index.js +1817 -0
  128. package/node_modules/buffer/package.json +96 -0
  129. package/node_modules/chownr/LICENSE +15 -0
  130. package/node_modules/chownr/README.md +3 -0
  131. package/node_modules/chownr/chownr.js +167 -0
  132. package/node_modules/chownr/package.json +29 -0
  133. package/node_modules/decompress-response/index.d.ts +22 -0
  134. package/node_modules/decompress-response/index.js +58 -0
  135. package/node_modules/decompress-response/license +9 -0
  136. package/node_modules/decompress-response/package.json +56 -0
  137. package/node_modules/decompress-response/readme.md +48 -0
  138. package/node_modules/deep-extend/CHANGELOG.md +46 -0
  139. package/node_modules/deep-extend/LICENSE +20 -0
  140. package/node_modules/deep-extend/README.md +91 -0
  141. package/node_modules/deep-extend/index.js +1 -0
  142. package/node_modules/deep-extend/lib/deep-extend.js +150 -0
  143. package/node_modules/deep-extend/package.json +62 -0
  144. package/node_modules/detect-libc/LICENSE +201 -0
  145. package/node_modules/detect-libc/README.md +163 -0
  146. package/node_modules/detect-libc/index.d.ts +14 -0
  147. package/node_modules/detect-libc/lib/detect-libc.js +313 -0
  148. package/node_modules/detect-libc/lib/elf.js +39 -0
  149. package/node_modules/detect-libc/lib/filesystem.js +51 -0
  150. package/node_modules/detect-libc/lib/process.js +24 -0
  151. package/node_modules/detect-libc/package.json +44 -0
  152. package/node_modules/end-of-stream/LICENSE +21 -0
  153. package/node_modules/end-of-stream/README.md +54 -0
  154. package/node_modules/end-of-stream/index.js +96 -0
  155. package/node_modules/end-of-stream/package.json +37 -0
  156. package/node_modules/expand-template/.travis.yml +6 -0
  157. package/node_modules/expand-template/LICENSE +21 -0
  158. package/node_modules/expand-template/README.md +43 -0
  159. package/node_modules/expand-template/index.js +26 -0
  160. package/node_modules/expand-template/package.json +29 -0
  161. package/node_modules/expand-template/test.js +67 -0
  162. package/node_modules/fs-constants/LICENSE +21 -0
  163. package/node_modules/fs-constants/README.md +26 -0
  164. package/node_modules/fs-constants/browser.js +1 -0
  165. package/node_modules/fs-constants/index.js +1 -0
  166. package/node_modules/fs-constants/package.json +19 -0
  167. package/node_modules/github-from-package/.travis.yml +4 -0
  168. package/node_modules/github-from-package/LICENSE +18 -0
  169. package/node_modules/github-from-package/example/package.json +8 -0
  170. package/node_modules/github-from-package/example/url.js +3 -0
  171. package/node_modules/github-from-package/index.js +17 -0
  172. package/node_modules/github-from-package/package.json +30 -0
  173. package/node_modules/github-from-package/readme.markdown +53 -0
  174. package/node_modules/github-from-package/test/a.json +8 -0
  175. package/node_modules/github-from-package/test/b.json +5 -0
  176. package/node_modules/github-from-package/test/c.json +5 -0
  177. package/node_modules/github-from-package/test/d.json +7 -0
  178. package/node_modules/github-from-package/test/e.json +5 -0
  179. package/node_modules/github-from-package/test/url.js +19 -0
  180. package/node_modules/ieee754/LICENSE +11 -0
  181. package/node_modules/ieee754/README.md +51 -0
  182. package/node_modules/ieee754/index.d.ts +10 -0
  183. package/node_modules/ieee754/index.js +85 -0
  184. package/node_modules/ieee754/package.json +52 -0
  185. package/node_modules/ini/LICENSE +15 -0
  186. package/node_modules/ini/README.md +102 -0
  187. package/node_modules/ini/ini.js +206 -0
  188. package/node_modules/ini/package.json +33 -0
  189. package/node_modules/keytar/LICENSE.md +20 -0
  190. package/node_modules/keytar/README.md +94 -0
  191. package/node_modules/keytar/binding.gyp +66 -0
  192. package/node_modules/keytar/build/Release/keytar.node +0 -0
  193. package/node_modules/keytar/keytar.d.ts +51 -0
  194. package/node_modules/keytar/lib/keytar.js +43 -0
  195. package/node_modules/keytar/package.json +66 -0
  196. package/node_modules/keytar/src/async.cc +242 -0
  197. package/node_modules/keytar/src/async.h +103 -0
  198. package/node_modules/keytar/src/credentials.h +13 -0
  199. package/node_modules/keytar/src/keytar.h +41 -0
  200. package/node_modules/keytar/src/keytar_mac.cc +296 -0
  201. package/node_modules/keytar/src/keytar_posix.cc +184 -0
  202. package/node_modules/keytar/src/keytar_win.cc +272 -0
  203. package/node_modules/keytar/src/main.cc +139 -0
  204. package/node_modules/mimic-response/index.d.ts +17 -0
  205. package/node_modules/mimic-response/index.js +77 -0
  206. package/node_modules/mimic-response/license +9 -0
  207. package/node_modules/mimic-response/package.json +42 -0
  208. package/node_modules/mimic-response/readme.md +78 -0
  209. package/node_modules/minimist/.eslintrc +29 -0
  210. package/node_modules/minimist/.github/FUNDING.yml +12 -0
  211. package/node_modules/minimist/.nycrc +14 -0
  212. package/node_modules/minimist/CHANGELOG.md +298 -0
  213. package/node_modules/minimist/LICENSE +18 -0
  214. package/node_modules/minimist/README.md +121 -0
  215. package/node_modules/minimist/example/parse.js +4 -0
  216. package/node_modules/minimist/index.js +263 -0
  217. package/node_modules/minimist/package.json +75 -0
  218. package/node_modules/minimist/test/all_bool.js +34 -0
  219. package/node_modules/minimist/test/bool.js +177 -0
  220. package/node_modules/minimist/test/dash.js +43 -0
  221. package/node_modules/minimist/test/default_bool.js +37 -0
  222. package/node_modules/minimist/test/dotted.js +24 -0
  223. package/node_modules/minimist/test/kv_short.js +32 -0
  224. package/node_modules/minimist/test/long.js +33 -0
  225. package/node_modules/minimist/test/num.js +38 -0
  226. package/node_modules/minimist/test/parse.js +209 -0
  227. package/node_modules/minimist/test/parse_modified.js +11 -0
  228. package/node_modules/minimist/test/proto.js +64 -0
  229. package/node_modules/minimist/test/short.js +69 -0
  230. package/node_modules/minimist/test/stop_early.js +17 -0
  231. package/node_modules/minimist/test/unknown.js +104 -0
  232. package/node_modules/minimist/test/whitespace.js +10 -0
  233. package/node_modules/mkdirp-classic/LICENSE +21 -0
  234. package/node_modules/mkdirp-classic/README.md +18 -0
  235. package/node_modules/mkdirp-classic/index.js +98 -0
  236. package/node_modules/mkdirp-classic/package.json +18 -0
  237. package/node_modules/napi-build-utils/.github/workflows/run-npm-tests.yml +31 -0
  238. package/node_modules/napi-build-utils/LICENSE +21 -0
  239. package/node_modules/napi-build-utils/README.md +52 -0
  240. package/node_modules/napi-build-utils/index.js +214 -0
  241. package/node_modules/napi-build-utils/index.md +0 -0
  242. package/node_modules/napi-build-utils/package.json +42 -0
  243. package/node_modules/node-abi/LICENSE +21 -0
  244. package/node_modules/node-abi/README.md +54 -0
  245. package/node_modules/node-abi/abi_registry.json +439 -0
  246. package/node_modules/node-abi/index.js +179 -0
  247. package/node_modules/node-abi/package.json +45 -0
  248. package/node_modules/node-addon-api/LICENSE.md +13 -0
  249. package/node_modules/node-addon-api/README.md +293 -0
  250. package/node_modules/node-addon-api/common.gypi +21 -0
  251. package/node_modules/node-addon-api/except.gypi +25 -0
  252. package/node_modules/node-addon-api/index.js +11 -0
  253. package/node_modules/node-addon-api/napi-inl.deprecated.h +192 -0
  254. package/node_modules/node-addon-api/napi-inl.h +6209 -0
  255. package/node_modules/node-addon-api/napi.h +2983 -0
  256. package/node_modules/node-addon-api/node_api.gyp +9 -0
  257. package/node_modules/node-addon-api/noexcept.gypi +26 -0
  258. package/node_modules/node-addon-api/nothing.c +0 -0
  259. package/node_modules/node-addon-api/package-support.json +21 -0
  260. package/node_modules/node-addon-api/package.json +399 -0
  261. package/node_modules/node-addon-api/tools/README.md +73 -0
  262. package/node_modules/node-addon-api/tools/check-napi.js +100 -0
  263. package/node_modules/node-addon-api/tools/clang-format.js +68 -0
  264. package/node_modules/node-addon-api/tools/conversion.js +309 -0
  265. package/node_modules/node-addon-api/tools/eslint-format.js +71 -0
  266. package/node_modules/prebuild-install/CHANGELOG.md +131 -0
  267. package/node_modules/prebuild-install/CONTRIBUTING.md +6 -0
  268. package/node_modules/prebuild-install/LICENSE +21 -0
  269. package/node_modules/prebuild-install/README.md +163 -0
  270. package/node_modules/prebuild-install/asset.js +44 -0
  271. package/node_modules/prebuild-install/bin.js +78 -0
  272. package/node_modules/prebuild-install/download.js +142 -0
  273. package/node_modules/prebuild-install/error.js +14 -0
  274. package/node_modules/prebuild-install/help.txt +16 -0
  275. package/node_modules/prebuild-install/index.js +1 -0
  276. package/node_modules/prebuild-install/log.js +33 -0
  277. package/node_modules/prebuild-install/package.json +67 -0
  278. package/node_modules/prebuild-install/proxy.js +35 -0
  279. package/node_modules/prebuild-install/rc.js +64 -0
  280. package/node_modules/prebuild-install/util.js +143 -0
  281. package/node_modules/pump/.github/FUNDING.yml +2 -0
  282. package/node_modules/pump/.travis.yml +5 -0
  283. package/node_modules/pump/LICENSE +21 -0
  284. package/node_modules/pump/README.md +74 -0
  285. package/node_modules/pump/SECURITY.md +5 -0
  286. package/node_modules/pump/empty.js +1 -0
  287. package/node_modules/pump/index.js +86 -0
  288. package/node_modules/pump/package.json +30 -0
  289. package/node_modules/pump/test-browser.js +66 -0
  290. package/node_modules/pump/test-node.js +53 -0
  291. package/node_modules/rc/LICENSE.APACHE2 +15 -0
  292. package/node_modules/rc/LICENSE.BSD +26 -0
  293. package/node_modules/rc/LICENSE.MIT +24 -0
  294. package/node_modules/rc/README.md +227 -0
  295. package/node_modules/rc/browser.js +7 -0
  296. package/node_modules/rc/cli.js +4 -0
  297. package/node_modules/rc/index.js +53 -0
  298. package/node_modules/rc/lib/utils.js +104 -0
  299. package/node_modules/rc/package.json +29 -0
  300. package/node_modules/rc/test/ini.js +16 -0
  301. package/node_modules/rc/test/nested-env-vars.js +50 -0
  302. package/node_modules/rc/test/test.js +59 -0
  303. package/node_modules/readable-stream/CONTRIBUTING.md +38 -0
  304. package/node_modules/readable-stream/GOVERNANCE.md +136 -0
  305. package/node_modules/readable-stream/LICENSE +47 -0
  306. package/node_modules/readable-stream/README.md +106 -0
  307. package/node_modules/readable-stream/errors-browser.js +127 -0
  308. package/node_modules/readable-stream/errors.js +116 -0
  309. package/node_modules/readable-stream/experimentalWarning.js +17 -0
  310. package/node_modules/readable-stream/lib/_stream_duplex.js +126 -0
  311. package/node_modules/readable-stream/lib/_stream_passthrough.js +37 -0
  312. package/node_modules/readable-stream/lib/_stream_readable.js +1027 -0
  313. package/node_modules/readable-stream/lib/_stream_transform.js +190 -0
  314. package/node_modules/readable-stream/lib/_stream_writable.js +641 -0
  315. package/node_modules/readable-stream/lib/internal/streams/async_iterator.js +180 -0
  316. package/node_modules/readable-stream/lib/internal/streams/buffer_list.js +183 -0
  317. package/node_modules/readable-stream/lib/internal/streams/destroy.js +96 -0
  318. package/node_modules/readable-stream/lib/internal/streams/end-of-stream.js +86 -0
  319. package/node_modules/readable-stream/lib/internal/streams/from-browser.js +3 -0
  320. package/node_modules/readable-stream/lib/internal/streams/from.js +52 -0
  321. package/node_modules/readable-stream/lib/internal/streams/pipeline.js +86 -0
  322. package/node_modules/readable-stream/lib/internal/streams/state.js +22 -0
  323. package/node_modules/readable-stream/lib/internal/streams/stream-browser.js +1 -0
  324. package/node_modules/readable-stream/lib/internal/streams/stream.js +1 -0
  325. package/node_modules/readable-stream/package.json +68 -0
  326. package/node_modules/readable-stream/readable-browser.js +9 -0
  327. package/node_modules/readable-stream/readable.js +16 -0
  328. package/node_modules/safe-buffer/LICENSE +21 -0
  329. package/node_modules/safe-buffer/README.md +584 -0
  330. package/node_modules/safe-buffer/index.d.ts +187 -0
  331. package/node_modules/safe-buffer/index.js +65 -0
  332. package/node_modules/safe-buffer/package.json +51 -0
  333. package/node_modules/semver/LICENSE +15 -0
  334. package/node_modules/semver/README.md +665 -0
  335. package/node_modules/semver/bin/semver.js +191 -0
  336. package/node_modules/semver/classes/comparator.js +143 -0
  337. package/node_modules/semver/classes/index.js +7 -0
  338. package/node_modules/semver/classes/range.js +557 -0
  339. package/node_modules/semver/classes/semver.js +333 -0
  340. package/node_modules/semver/functions/clean.js +8 -0
  341. package/node_modules/semver/functions/cmp.js +54 -0
  342. package/node_modules/semver/functions/coerce.js +62 -0
  343. package/node_modules/semver/functions/compare-build.js +9 -0
  344. package/node_modules/semver/functions/compare-loose.js +5 -0
  345. package/node_modules/semver/functions/compare.js +7 -0
  346. package/node_modules/semver/functions/diff.js +60 -0
  347. package/node_modules/semver/functions/eq.js +5 -0
  348. package/node_modules/semver/functions/gt.js +5 -0
  349. package/node_modules/semver/functions/gte.js +5 -0
  350. package/node_modules/semver/functions/inc.js +21 -0
  351. package/node_modules/semver/functions/lt.js +5 -0
  352. package/node_modules/semver/functions/lte.js +5 -0
  353. package/node_modules/semver/functions/major.js +5 -0
  354. package/node_modules/semver/functions/minor.js +5 -0
  355. package/node_modules/semver/functions/neq.js +5 -0
  356. package/node_modules/semver/functions/parse.js +18 -0
  357. package/node_modules/semver/functions/patch.js +5 -0
  358. package/node_modules/semver/functions/prerelease.js +8 -0
  359. package/node_modules/semver/functions/rcompare.js +5 -0
  360. package/node_modules/semver/functions/rsort.js +5 -0
  361. package/node_modules/semver/functions/satisfies.js +12 -0
  362. package/node_modules/semver/functions/sort.js +5 -0
  363. package/node_modules/semver/functions/valid.js +8 -0
  364. package/node_modules/semver/index.js +91 -0
  365. package/node_modules/semver/internal/constants.js +37 -0
  366. package/node_modules/semver/internal/debug.js +11 -0
  367. package/node_modules/semver/internal/identifiers.js +29 -0
  368. package/node_modules/semver/internal/lrucache.js +42 -0
  369. package/node_modules/semver/internal/parse-options.js +17 -0
  370. package/node_modules/semver/internal/re.js +223 -0
  371. package/node_modules/semver/package.json +78 -0
  372. package/node_modules/semver/preload.js +4 -0
  373. package/node_modules/semver/range.bnf +16 -0
  374. package/node_modules/semver/ranges/gtr.js +6 -0
  375. package/node_modules/semver/ranges/intersects.js +9 -0
  376. package/node_modules/semver/ranges/ltr.js +6 -0
  377. package/node_modules/semver/ranges/max-satisfying.js +27 -0
  378. package/node_modules/semver/ranges/min-satisfying.js +26 -0
  379. package/node_modules/semver/ranges/min-version.js +63 -0
  380. package/node_modules/semver/ranges/outside.js +82 -0
  381. package/node_modules/semver/ranges/simplify.js +49 -0
  382. package/node_modules/semver/ranges/subset.js +249 -0
  383. package/node_modules/semver/ranges/to-comparators.js +10 -0
  384. package/node_modules/semver/ranges/valid.js +13 -0
  385. package/node_modules/simple-concat/.travis.yml +3 -0
  386. package/node_modules/simple-concat/LICENSE +20 -0
  387. package/node_modules/simple-concat/README.md +44 -0
  388. package/node_modules/simple-concat/index.js +15 -0
  389. package/node_modules/simple-concat/package.json +47 -0
  390. package/node_modules/simple-concat/test/basic.js +41 -0
  391. package/node_modules/simple-get/.github/dependabot.yml +15 -0
  392. package/node_modules/simple-get/.github/workflows/ci.yml +23 -0
  393. package/node_modules/simple-get/LICENSE +20 -0
  394. package/node_modules/simple-get/README.md +333 -0
  395. package/node_modules/simple-get/index.js +108 -0
  396. package/node_modules/simple-get/package.json +67 -0
  397. package/node_modules/string_decoder/LICENSE +48 -0
  398. package/node_modules/string_decoder/README.md +47 -0
  399. package/node_modules/string_decoder/lib/string_decoder.js +296 -0
  400. package/node_modules/string_decoder/package.json +34 -0
  401. package/node_modules/strip-json-comments/index.js +70 -0
  402. package/node_modules/strip-json-comments/license +21 -0
  403. package/node_modules/strip-json-comments/package.json +42 -0
  404. package/node_modules/strip-json-comments/readme.md +64 -0
  405. package/node_modules/tar-fs/.travis.yml +6 -0
  406. package/node_modules/tar-fs/LICENSE +21 -0
  407. package/node_modules/tar-fs/README.md +165 -0
  408. package/node_modules/tar-fs/index.js +363 -0
  409. package/node_modules/tar-fs/package.json +41 -0
  410. package/node_modules/tar-fs/test/fixtures/a/hello.txt +1 -0
  411. package/node_modules/tar-fs/test/fixtures/b/a/test.txt +1 -0
  412. package/node_modules/tar-fs/test/fixtures/d/file1 +0 -0
  413. package/node_modules/tar-fs/test/fixtures/d/file2 +0 -0
  414. package/node_modules/tar-fs/test/fixtures/d/sub-dir/file5 +0 -0
  415. package/node_modules/tar-fs/test/fixtures/d/sub-files/file3 +0 -0
  416. package/node_modules/tar-fs/test/fixtures/d/sub-files/file4 +0 -0
  417. package/node_modules/tar-fs/test/fixtures/e/directory/.ignore +0 -0
  418. package/node_modules/tar-fs/test/fixtures/e/file +0 -0
  419. package/node_modules/tar-fs/test/fixtures/invalid.tar +0 -0
  420. package/node_modules/tar-fs/test/index.js +346 -0
  421. package/node_modules/tar-stream/LICENSE +21 -0
  422. package/node_modules/tar-stream/README.md +168 -0
  423. package/node_modules/tar-stream/extract.js +257 -0
  424. package/node_modules/tar-stream/headers.js +295 -0
  425. package/node_modules/tar-stream/index.js +2 -0
  426. package/node_modules/tar-stream/pack.js +255 -0
  427. package/node_modules/tar-stream/package.json +58 -0
  428. package/node_modules/tar-stream/sandbox.js +11 -0
  429. package/node_modules/tunnel-agent/LICENSE +55 -0
  430. package/node_modules/tunnel-agent/README.md +4 -0
  431. package/node_modules/tunnel-agent/index.js +244 -0
  432. package/node_modules/tunnel-agent/package.json +22 -0
  433. package/node_modules/util-deprecate/History.md +16 -0
  434. package/node_modules/util-deprecate/LICENSE +24 -0
  435. package/node_modules/util-deprecate/README.md +53 -0
  436. package/node_modules/util-deprecate/browser.js +67 -0
  437. package/node_modules/util-deprecate/node.js +6 -0
  438. package/node_modules/util-deprecate/package.json +27 -0
  439. package/package.json +3 -13
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codevibe-claude",
3
- "version": "1.0.13",
3
+ "version": "1.0.15",
4
4
  "description": "Sync Claude Code sessions with iOS mobile app via AWS backend. Control Claude Code from your phone with real-time bidirectional synchronization.",
5
5
  "author": {
6
6
  "name": "CodeVibe Team"
@@ -0,0 +1,179 @@
1
+ # @quantiya/codevibe-core
2
+
3
+ Core library for CodeVibe plugins — shared keychain, crypto, AppSync, authentication, session lifecycle, and network-resilience functionality. Used by [`@quantiya/codevibe-claude-plugin`](https://www.npmjs.com/package/@quantiya/codevibe-claude-plugin), [`@quantiya/codevibe-gemini-plugin`](https://www.npmjs.com/package/@quantiya/codevibe-gemini-plugin), and [`@quantiya/codevibe-codex-plugin`](https://www.npmjs.com/package/@quantiya/codevibe-codex-plugin).
4
+
5
+ **Current version:** `1.0.3`
6
+
7
+ ## Installation
8
+
9
+ ```bash
10
+ npm install @quantiya/codevibe-core
11
+ ```
12
+
13
+ ## Features
14
+
15
+ - **Keychain Management** — Secure storage for device keys and OAuth tokens using native keychain (macOS Keychain, Linux libsecret, Windows Credential Manager)
16
+ - **Cryptographic Services** — E2E encryption using ECDH P-256 and AES-256-GCM, with dedicated helpers for event content, metadata, and binary attachments
17
+ - **AppSync Client** — GraphQL API and WebSocket subscriptions for AWS AppSync, with automatic token refresh
18
+ - **Two-phase WebSocket reconnection** — exponential backoff (1s→60s) for 10 attempts, then persistent 5-minute retry indefinitely. Survives laptop sleep, network drops, DNS blips, and extended outages without ever giving up.
19
+ - **Session heartbeat system** — `startHeartbeat(sessionId)` sends `updateSession({ lastHeartbeatAt })` every 2 minutes so mobile clients can show desktop connectivity status (green/red dot with 5-minute staleness threshold)
20
+ - **Centralized session lifecycle** — `resumeOrCreateSession()` is the single source of truth for session fingerprint matching, reuse, and per-device ECDH session key distribution. Used identically by all three plugins.
21
+ - **WSL-aware networking** — auto-detects WSL via `/proc/sys/kernel/osrelease` and applies IPv4-first DNS ordering to work around broken WSL IPv6 stacks. Zero behavioral change on macOS, native Linux, and Windows.
22
+ - **Diagnostic fetch wrapper** — `fetchWithDiagnostics()` unpacks undici's generic "fetch failed" errors into detailed platform-specific messages (DNS failures, TLS clock skew, corporate MITM proxies, etc.) so failures are debuggable without trawling logs.
23
+ - **Cross-platform browser launcher** — `AuthService` opens the user's default browser during OAuth login via `wslview` → `cmd.exe` → `powershell.exe` → `xdg-open` fallback chain on Linux/WSL, native `open` on macOS, `cmd /c start` on Windows. Always prints the sign-in URL to stdout as a copy-paste fallback if automatic launching fails.
24
+ - **Authentication CLI** — Browser-based OAuth login/logout commands (Sign in with Apple / Sign in with Google via Cognito)
25
+ - **Prompt Parser** — Extracts numbered options from tmux pane snapshots so plugins can forward the exact options a CLI offers to mobile clients without hardcoding
26
+ - **Shared TypeScript types** — Events, sessions, attachments, encryption structures used across all plugins
27
+
28
+ ## CLI Usage
29
+
30
+ ```bash
31
+ # Sign in via browser (opens Cognito Hosted UI)
32
+ codevibe login
33
+
34
+ # Sign out
35
+ codevibe logout
36
+
37
+ # Check authentication status
38
+ codevibe status
39
+
40
+ # Reset device identity (destructive - old sessions become inaccessible)
41
+ codevibe reset-device
42
+
43
+ # Use specific environment
44
+ codevibe --env development login
45
+ ```
46
+
47
+ ## API Usage
48
+
49
+ ### Keychain Manager
50
+
51
+ ```typescript
52
+ import { keychainManager, DeviceIdentity } from '@quantiya/codevibe-core';
53
+
54
+ // Get or create device identity (stored in native keychain)
55
+ const identity = await keychainManager.getOrCreateDeviceIdentity();
56
+ console.log(identity.deviceId, identity.publicKey);
57
+
58
+ // Get OAuth tokens
59
+ const tokens = await keychainManager.getTokens('production');
60
+ if (tokens) {
61
+ console.log(tokens.email, tokens.userId);
62
+ }
63
+ ```
64
+
65
+ ### Crypto Service
66
+
67
+ ```typescript
68
+ import { cryptoService } from '@quantiya/codevibe-core';
69
+
70
+ // Generate key pair
71
+ const keyPair = cryptoService.generateKeyPair();
72
+
73
+ // Generate session key
74
+ const sessionKey = cryptoService.generateSessionKey();
75
+
76
+ // Encrypt content
77
+ const encrypted = cryptoService.encryptContent('Hello World', sessionKey);
78
+
79
+ // Decrypt content
80
+ const decrypted = cryptoService.decryptContent(encrypted, sessionKey);
81
+ ```
82
+
83
+ ### AppSync Client
84
+
85
+ ```typescript
86
+ import { AppSyncClient, loadConfig } from '@quantiya/codevibe-core';
87
+
88
+ // Load environment configuration
89
+ loadConfig('production');
90
+
91
+ // Create client
92
+ const client = new AppSyncClient('production');
93
+
94
+ // Authenticate with stored tokens
95
+ const authenticated = await client.authenticateWithStoredTokens();
96
+ if (!authenticated) {
97
+ console.log('Run "codevibe login" first');
98
+ process.exit(1);
99
+ }
100
+
101
+ // Create session
102
+ const session = await client.createSession({
103
+ userId: client.getCurrentUserId(),
104
+ agentType: 'CLAUDE',
105
+ projectPath: '/path/to/project',
106
+ });
107
+
108
+ // Subscribe to events
109
+ const unsubscribe = client.subscribeToEvents(session.sessionId, (event) => {
110
+ console.log('Event received:', event);
111
+ });
112
+
113
+ // Clean up
114
+ unsubscribe();
115
+ ```
116
+
117
+ ### Auth Service
118
+
119
+ ```typescript
120
+ import { authService, loadConfig } from '@quantiya/codevibe-core';
121
+
122
+ // Set environment
123
+ loadConfig('production');
124
+ authService.setEnvironment('production');
125
+
126
+ // Login (opens browser)
127
+ const tokens = await authService.login();
128
+
129
+ // Check status
130
+ const status = await authService.getStatus();
131
+ console.log(status.authenticated, status.tokens?.email);
132
+
133
+ // Logout
134
+ await authService.logout();
135
+ ```
136
+
137
+ ## Keychain Storage
138
+
139
+ All sensitive data is stored in the native system keychain:
140
+
141
+ - **Service Name:** `ai.quantiya.app.codevibe`
142
+ - **Device Identity:** Stored as `device-identity` account
143
+ - **Tokens:** Stored as `tokens-{environment}` accounts (e.g., `tokens-production`)
144
+
145
+ This ensures:
146
+ - Data persists across terminal sessions
147
+ - Data is encrypted at rest by the OS
148
+ - Data survives plugin reinstalls/updates
149
+ - Device identity is shared across all CodeVibe plugins
150
+
151
+ ## Security
152
+
153
+ - Device keys are ECDH P-256 key pairs
154
+ - Session keys are 256-bit AES keys
155
+ - Content is encrypted with AES-256-GCM
156
+ - Session keys are encrypted per-device using ECDH
157
+ - OAuth tokens are stored securely in native keychain
158
+
159
+ ## Development
160
+
161
+ ```bash
162
+ # Install dependencies
163
+ npm install
164
+
165
+ # Build
166
+ npm run build
167
+
168
+ # Watch mode
169
+ npm run watch
170
+
171
+ # Local development with plugin
172
+ npm link
173
+ cd ../codevibe-claude-plugin
174
+ npm link @quantiya/codevibe-core
175
+ ```
176
+
177
+ ## License
178
+
179
+ MIT
@@ -0,0 +1,7 @@
1
+ #!/usr/bin/env node
2
+ //
3
+ // codevibe CLI entry point
4
+ // @quantiya/codevibe-core
5
+ //
6
+
7
+ require('../dist/index').runAuthCli(process.argv);
@@ -0,0 +1,132 @@
1
+ import { CreateEventInput, CreateSessionInput, UpdateSessionInput, UpdateEventStatusInput, Event, Session, EventSource, DeviceKey } from '../types';
2
+ /**
3
+ * Download URL response
4
+ */
5
+ export interface DownloadUrlResponse {
6
+ downloadUrl: string;
7
+ expiresAt: string;
8
+ }
9
+ /**
10
+ * AppSync GraphQL client with WebSocket subscriptions
11
+ */
12
+ export declare class AppSyncClient {
13
+ private authenticated;
14
+ private currentUserId;
15
+ private currentEmail;
16
+ private tokens;
17
+ private activeSubscriptions;
18
+ private environment;
19
+ constructor();
20
+ /**
21
+ * Get the current authenticated user ID
22
+ */
23
+ getCurrentUserId(): string;
24
+ /**
25
+ * Get the current authenticated user email
26
+ */
27
+ getCurrentUserEmail(): string | null;
28
+ /**
29
+ * Authenticate using stored OAuth tokens from keychain
30
+ */
31
+ authenticateWithStoredTokens(): Promise<boolean>;
32
+ /**
33
+ * Refresh expired tokens
34
+ */
35
+ private refreshTokens;
36
+ /**
37
+ * Check if authenticated
38
+ */
39
+ isAuthenticated(): boolean;
40
+ /**
41
+ * Sign out
42
+ */
43
+ signOut(): void;
44
+ /**
45
+ * Make a GraphQL request
46
+ */
47
+ private graphqlRequest;
48
+ /**
49
+ * Create a session
50
+ */
51
+ createSession(input: CreateSessionInput): Promise<Session>;
52
+ /**
53
+ * Update a session
54
+ */
55
+ updateSession(input: UpdateSessionInput): Promise<Session>;
56
+ /**
57
+ * Get a session
58
+ */
59
+ getSession(sessionId: string): Promise<Session | null>;
60
+ /**
61
+ * Create an event
62
+ */
63
+ createEvent(input: CreateEventInput): Promise<Event>;
64
+ /**
65
+ * Update event status
66
+ */
67
+ updateEventStatus(input: UpdateEventStatusInput): Promise<Event>;
68
+ /**
69
+ * List events for a session
70
+ */
71
+ listEvents(sessionId: string, source?: EventSource, limit?: number): Promise<Event[]>;
72
+ /**
73
+ * List user device keys
74
+ */
75
+ listUserDeviceKeys(): Promise<DeviceKey[]>;
76
+ /**
77
+ * Register device key
78
+ */
79
+ registerDeviceKey(deviceId: string, publicKey: string, platform: string, deviceName: string): Promise<void>;
80
+ /**
81
+ * Get attachment download URL
82
+ */
83
+ getAttachmentDownloadUrl(s3Key: string): Promise<DownloadUrlResponse>;
84
+ /**
85
+ * Subscribe to events for a session
86
+ */
87
+ subscribeToEvents(sessionId: string, onEvent: (event: Event) => void, onError?: (error: Error) => void): () => void;
88
+ /**
89
+ * Build WebSocket URL
90
+ */
91
+ private buildRealtimeUrl;
92
+ /**
93
+ * Create WebSocket subscription
94
+ */
95
+ private createSubscription;
96
+ /**
97
+ * Send subscription start message
98
+ */
99
+ private sendSubscriptionStart;
100
+ /**
101
+ * Reset keep-alive timer
102
+ */
103
+ private resetKeepAliveTimer;
104
+ /**
105
+ * Handle subscription error with two-phase reconnection:
106
+ * Phase 1 (urgent): Exponential backoff for first N attempts
107
+ * Phase 2 (persistent): Fixed interval retry indefinitely
108
+ */
109
+ private handleSubscriptionError;
110
+ /**
111
+ * Cleanup subscription state
112
+ */
113
+ private cleanupSubscriptionState;
114
+ private heartbeatTimers;
115
+ /**
116
+ * Start periodic heartbeat for a session.
117
+ * Updates lastHeartbeatAt on the session every intervalMs (default 2 minutes).
118
+ */
119
+ startHeartbeat(sessionId: string, intervalMs?: number): void;
120
+ /**
121
+ * Stop heartbeat for a session.
122
+ */
123
+ stopHeartbeat(sessionId: string): void;
124
+ /**
125
+ * Send a single heartbeat update.
126
+ */
127
+ private sendHeartbeat;
128
+ /**
129
+ * Cleanup all subscriptions and heartbeats
130
+ */
131
+ cleanupSubscriptions(): void;
132
+ }
@@ -0,0 +1,2 @@
1
+ export { AppSyncClient, DownloadUrlResponse } from './appsync-client';
2
+ export { queries, mutations, subscriptions } from './queries';
@@ -0,0 +1,16 @@
1
+ export declare const queries: {
2
+ getSession: string;
3
+ listEvents: string;
4
+ listUserDeviceKeys: string;
5
+ };
6
+ export declare const mutations: {
7
+ createSession: string;
8
+ updateSession: string;
9
+ createEvent: string;
10
+ updateEventStatus: string;
11
+ registerDeviceKey: string;
12
+ getAttachmentDownloadUrl: string;
13
+ };
14
+ export declare const subscriptions: {
15
+ onEventCreated: string;
16
+ };
@@ -0,0 +1,5 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * Main CLI entry point
4
+ */
5
+ export declare function runAuthCli(argv: string[]): Promise<void>;
@@ -0,0 +1,87 @@
1
+ import { TokenData } from '../types';
2
+ /**
3
+ * Authentication service for OAuth flows
4
+ */
5
+ export declare class AuthService {
6
+ private static instance;
7
+ private constructor();
8
+ static getInstance(): AuthService;
9
+ /**
10
+ * Open URL in the user's default browser. Cross-platform: macOS, Linux,
11
+ * WSL, Windows. Always prints the URL to stdout first as a fallback —
12
+ * if no browser-opening command is available, the user can copy-paste.
13
+ *
14
+ * On WSL, prefers opening the Windows host browser via WSL interop
15
+ * (wslview → cmd.exe → powershell.exe) before falling back to xdg-open.
16
+ */
17
+ private openBrowser;
18
+ /**
19
+ * Returns the list of browser-opening commands to try in order, based on
20
+ * the current platform. On WSL, returns WSL interop commands first so the
21
+ * Windows browser opens (which is what users actually want on WSL).
22
+ */
23
+ private getBrowserCommands;
24
+ /**
25
+ * Detect whether we're running inside WSL (1 or 2). Returns false on
26
+ * any non-Linux platform or if /proc/sys/kernel/osrelease is not readable.
27
+ */
28
+ private isRunningInWSL;
29
+ /**
30
+ * Try each browser-opening command in order. Advances to the next fallback on:
31
+ * - Spawn failure (ENOENT / the command not being installed)
32
+ * - Synchronous throw from spawn()
33
+ * - Runtime failure where the command spawns but exits with a non-zero
34
+ * code (e.g. wslview when WSL interop is disabled, xdg-open when no
35
+ * default browser is registered, cmd.exe failing to launch start)
36
+ * - Process terminated by signal
37
+ *
38
+ * Stays on the current command when:
39
+ * - Process exits with code 0 (success)
40
+ * - Process is still running after 3 seconds (assumed success — opener
41
+ * is doing real work like launching a slow app, not hung)
42
+ *
43
+ * If all attempts exhaust, logs at debug level — the user still has the
44
+ * sign-in URL printed to stdout as a copy-paste fallback.
45
+ */
46
+ private tryBrowserCommand;
47
+ /**
48
+ * Generate state for CSRF protection
49
+ */
50
+ private generateState;
51
+ /**
52
+ * Build authorization URL
53
+ */
54
+ private buildAuthUrl;
55
+ /**
56
+ * Exchange authorization code for tokens
57
+ */
58
+ private exchangeCodeForTokens;
59
+ /**
60
+ * Decode JWT payload
61
+ */
62
+ private decodeJwt;
63
+ /**
64
+ * Refresh tokens
65
+ */
66
+ refreshTokens(refreshToken: string): Promise<{
67
+ accessToken: string;
68
+ idToken: string;
69
+ expiresIn: number;
70
+ }>;
71
+ /**
72
+ * Login via OAuth browser flow
73
+ */
74
+ login(): Promise<TokenData | null>;
75
+ /**
76
+ * Logout
77
+ */
78
+ logout(): Promise<boolean>;
79
+ /**
80
+ * Get current auth status
81
+ */
82
+ getStatus(): Promise<{
83
+ authenticated: boolean;
84
+ tokens?: TokenData;
85
+ }>;
86
+ }
87
+ export declare const authService: AuthService;
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Wraps fetch() and rewrites "fetch failed" errors to include the underlying
3
+ * cause and a user-actionable diagnostic tip when possible. Non-network errors
4
+ * and HTTP error responses (non-2xx) are not affected — the caller still
5
+ * handles response.ok checks themselves.
6
+ *
7
+ * @param url The URL to fetch
8
+ * @param init Standard fetch init options
9
+ * @param context Optional short label (e.g. "token exchange") for the error message
10
+ */
11
+ export declare function fetchWithDiagnostics(url: string, init?: any, context?: string): Promise<Response>;
@@ -0,0 +1,2 @@
1
+ export { AuthService, authService } from './auth-service';
2
+ export { runAuthCli } from './auth-cli';
@@ -0,0 +1,53 @@
1
+ /**
2
+ * Environment type
3
+ */
4
+ export type Environment = 'development' | 'production';
5
+ /**
6
+ * Configuration interface
7
+ */
8
+ export interface Config {
9
+ environment: Environment;
10
+ aws: {
11
+ region: string;
12
+ appsyncUrl: string;
13
+ cognitoUserPoolId: string;
14
+ cognitoClientId: string;
15
+ cognitoDomain: string;
16
+ };
17
+ keychain: {
18
+ serviceName: string;
19
+ };
20
+ server: {
21
+ port: number;
22
+ host: string;
23
+ dynamicPort: boolean;
24
+ };
25
+ claude: {
26
+ command: string;
27
+ defaultTimeout: number;
28
+ };
29
+ codex: {
30
+ command: string;
31
+ defaultTimeout: number;
32
+ sessionsDir: string;
33
+ approvalTimeoutMs: number;
34
+ };
35
+ gemini: {
36
+ command: string;
37
+ defaultTimeout: number;
38
+ transcriptDir: string;
39
+ };
40
+ }
41
+ /**
42
+ * Get environment from process.env.ENVIRONMENT, defaults to 'production'
43
+ */
44
+ export declare function getEnvironment(): Environment;
45
+ /**
46
+ * Load configuration for specific environment
47
+ * If no environment specified, uses process.env.ENVIRONMENT or defaults to 'production'
48
+ */
49
+ export declare function loadConfig(environment?: Environment): Config;
50
+ /**
51
+ * Get current configuration (auto-initializes if not already loaded)
52
+ */
53
+ export declare function getConfig(): Config;
@@ -0,0 +1,2 @@
1
+ export { loadConfig, getConfig, getEnvironment } from './config';
2
+ export type { Config, Environment } from './config';
@@ -0,0 +1,118 @@
1
+ import { EncryptedSessionKey, KeyPair } from '../types';
2
+ /**
3
+ * Error class for cryptographic operations
4
+ */
5
+ export declare class CryptoError extends Error {
6
+ constructor(message: string);
7
+ }
8
+ /**
9
+ * Current encryption version for future algorithm upgrades
10
+ */
11
+ export declare const ENCRYPTION_VERSION = 1;
12
+ /**
13
+ * Service for end-to-end encryption operations
14
+ */
15
+ export declare class CryptoService {
16
+ private static instance;
17
+ private constructor();
18
+ static getInstance(): CryptoService;
19
+ /**
20
+ * Generate a new ECDH P-256 key pair
21
+ * @returns Object with privateKey (base64), publicKey (base64 raw)
22
+ */
23
+ generateKeyPair(): KeyPair;
24
+ /**
25
+ * Generate a random 256-bit session key
26
+ * @returns Base64-encoded session key
27
+ */
28
+ generateSessionKey(): string;
29
+ /**
30
+ * Derive a shared secret using ECDH and HKDF
31
+ * @param privateKeyBase64 Our private key (base64)
32
+ * @param publicKeyBase64 Other party's public key (base64)
33
+ * @returns 256-bit derived key as Buffer
34
+ */
35
+ deriveSharedKey(privateKeyBase64: string, publicKeyBase64: string): Buffer;
36
+ /**
37
+ * Encrypt a session key for a target device using ECDH
38
+ * @param sessionKeyBase64 The session key to encrypt (base64)
39
+ * @param targetPublicKeyBase64 Target device's public key (base64)
40
+ * @returns EncryptedSessionKey containing encrypted key and ephemeral public key
41
+ */
42
+ encryptSessionKey(sessionKeyBase64: string, targetPublicKeyBase64: string): Omit<EncryptedSessionKey, 'deviceId'>;
43
+ /**
44
+ * Decrypt a session key using our private key
45
+ * @param encryptedSessionKey The encrypted session key data
46
+ * @param privateKeyBase64 Our device's private key (base64)
47
+ * @returns Decrypted session key (base64)
48
+ */
49
+ decryptSessionKey(encryptedSessionKey: EncryptedSessionKey, privateKeyBase64: string): string;
50
+ /**
51
+ * Encrypt content using AES-256-GCM
52
+ * @param content String content to encrypt
53
+ * @param sessionKeyBase64 Session key (base64)
54
+ * @returns Base64-encoded ciphertext (nonce + ciphertext + tag)
55
+ */
56
+ encryptContent(content: string, sessionKeyBase64: string): string;
57
+ /**
58
+ * Decrypt content using AES-256-GCM
59
+ * @param encryptedContent Base64-encoded ciphertext
60
+ * @param sessionKeyBase64 Session key (base64)
61
+ * @returns Decrypted string content
62
+ */
63
+ decryptContent(encryptedContent: string, sessionKeyBase64: string): string;
64
+ /**
65
+ * Encrypt JSON-serializable metadata
66
+ * @param metadata Object to encrypt
67
+ * @param sessionKeyBase64 Session key (base64)
68
+ * @returns Base64-encoded encrypted JSON
69
+ */
70
+ encryptMetadata(metadata: Record<string, any>, sessionKeyBase64: string): string;
71
+ /**
72
+ * Decrypt encrypted metadata
73
+ * @param encryptedMetadata Base64-encoded encrypted JSON
74
+ * @param sessionKeyBase64 Session key (base64)
75
+ * @returns Decrypted object
76
+ */
77
+ decryptMetadata(encryptedMetadata: string, sessionKeyBase64: string): Record<string, any>;
78
+ /**
79
+ * Encrypt binary data using AES-256-GCM
80
+ * @param data Binary data to encrypt (Buffer)
81
+ * @param sessionKeyBase64 Session key (base64)
82
+ * @returns Encrypted data (Buffer containing nonce + ciphertext + tag)
83
+ */
84
+ encryptData(data: Buffer, sessionKeyBase64: string): Buffer;
85
+ /**
86
+ * Decrypt binary data using AES-256-GCM
87
+ * @param encryptedData Encrypted data (Buffer containing nonce + ciphertext + tag)
88
+ * @param sessionKeyBase64 Session key (base64)
89
+ * @returns Decrypted binary data (Buffer)
90
+ */
91
+ decryptData(encryptedData: Buffer, sessionKeyBase64: string): Buffer;
92
+ /**
93
+ * Encrypt data using AES-256-GCM
94
+ * @param data Data to encrypt
95
+ * @param key Symmetric key (32 bytes)
96
+ * @returns Combined nonce + ciphertext + tag
97
+ */
98
+ private encrypt;
99
+ /**
100
+ * Decrypt data using AES-256-GCM
101
+ * @param data Combined nonce + ciphertext + tag
102
+ * @param key Symmetric key (32 bytes)
103
+ * @returns Decrypted data
104
+ */
105
+ private decrypt;
106
+ /**
107
+ * Serialize a private key for storage
108
+ */
109
+ serializePrivateKey(privateKeyBase64: string): string;
110
+ /**
111
+ * Deserialize a private key from storage
112
+ */
113
+ deserializePrivateKey(base64: string): string;
114
+ }
115
+ /**
116
+ * Export singleton instance
117
+ */
118
+ export declare const cryptoService: CryptoService;
@@ -0,0 +1 @@
1
+ export { CryptoService, cryptoService, CryptoError, ENCRYPTION_VERSION } from './crypto-service';
@@ -0,0 +1,14 @@
1
+ export { KeychainManager, keychainManager, KeychainError } from './keychain';
2
+ export { CryptoService, cryptoService, CryptoError, ENCRYPTION_VERSION } from './crypto';
3
+ export { AppSyncClient, DownloadUrlResponse } from './appsync';
4
+ export { queries, mutations, subscriptions } from './appsync';
5
+ export { AuthService, authService } from './auth';
6
+ export { runAuthCli } from './auth';
7
+ export { loadConfig, getConfig, getEnvironment } from './config';
8
+ export type { Config, Environment } from './config';
9
+ export { Logger, logger, createLogger } from './logger';
10
+ export { parseInteractivePrompt, normalizeSnapshot, } from './prompt-parser';
11
+ export type { ParsedInteractivePrompt, PromptKind, InteractivePromptOption, } from './prompt-parser';
12
+ export { resumeOrCreateSession, prepareSessionEncryption } from './session';
13
+ export type { ResumeOrCreateSessionInput, ResumeOrCreateSessionResult } from './session';
14
+ export * from './types';