@allstak/wizard 0.1.3 → 0.1.5

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 (296) hide show
  1. package/CHANGELOG.md +53 -1
  2. package/LICENSE +191 -0
  3. package/README.md +299 -47
  4. package/dist/api/http.d.ts +2 -0
  5. package/dist/api/http.d.ts.map +1 -1
  6. package/dist/api/http.js +6 -0
  7. package/dist/api/http.js.map +1 -1
  8. package/dist/api/index.d.ts +1 -0
  9. package/dist/api/index.d.ts.map +1 -1
  10. package/dist/api/index.js +1 -0
  11. package/dist/api/index.js.map +1 -1
  12. package/dist/api/types.d.ts +3 -3
  13. package/dist/api/types.js +3 -3
  14. package/dist/certification/fixtures.d.ts +4 -0
  15. package/dist/certification/fixtures.d.ts.map +1 -0
  16. package/dist/certification/fixtures.js +109 -0
  17. package/dist/certification/fixtures.js.map +1 -0
  18. package/dist/certification/gates.d.ts +10 -0
  19. package/dist/certification/gates.d.ts.map +1 -0
  20. package/dist/certification/gates.js +20 -0
  21. package/dist/certification/gates.js.map +1 -0
  22. package/dist/certification/index.d.ts +6 -0
  23. package/dist/certification/index.d.ts.map +1 -0
  24. package/dist/certification/index.js +5 -0
  25. package/dist/certification/index.js.map +1 -0
  26. package/dist/certification/live-backend.d.ts +50 -0
  27. package/dist/certification/live-backend.d.ts.map +1 -0
  28. package/dist/certification/live-backend.js +422 -0
  29. package/dist/certification/live-backend.js.map +1 -0
  30. package/dist/certification/packages.d.ts +3 -0
  31. package/dist/certification/packages.d.ts.map +1 -0
  32. package/dist/certification/packages.js +49 -0
  33. package/dist/certification/packages.js.map +1 -0
  34. package/dist/certification/process.d.ts +8 -0
  35. package/dist/certification/process.d.ts.map +1 -0
  36. package/dist/certification/process.js +77 -0
  37. package/dist/certification/process.js.map +1 -0
  38. package/dist/certification/report.d.ts +3 -0
  39. package/dist/certification/report.d.ts.map +1 -0
  40. package/dist/certification/report.js +38 -0
  41. package/dist/certification/report.js.map +1 -0
  42. package/dist/certification/runner.d.ts +3 -0
  43. package/dist/certification/runner.d.ts.map +1 -0
  44. package/dist/certification/runner.js +299 -0
  45. package/dist/certification/runner.js.map +1 -0
  46. package/dist/certification/runtime.d.ts +11 -0
  47. package/dist/certification/runtime.d.ts.map +1 -0
  48. package/dist/certification/runtime.js +60 -0
  49. package/dist/certification/runtime.js.map +1 -0
  50. package/dist/certification/types.d.ts +73 -0
  51. package/dist/certification/types.d.ts.map +1 -0
  52. package/dist/certification/types.js +2 -0
  53. package/dist/certification/types.js.map +1 -0
  54. package/dist/cli.js +70 -3
  55. package/dist/cli.js.map +1 -1
  56. package/dist/commands/certify.d.ts +18 -0
  57. package/dist/commands/certify.d.ts.map +1 -0
  58. package/dist/commands/certify.js +27 -0
  59. package/dist/commands/certify.js.map +1 -0
  60. package/dist/commands/init.d.ts.map +1 -1
  61. package/dist/commands/init.js +13 -0
  62. package/dist/commands/init.js.map +1 -1
  63. package/dist/commands/list.d.ts +5 -1
  64. package/dist/commands/list.d.ts.map +1 -1
  65. package/dist/commands/list.js +9 -3
  66. package/dist/commands/list.js.map +1 -1
  67. package/dist/commands/security-snapshot.d.ts +24 -0
  68. package/dist/commands/security-snapshot.d.ts.map +1 -0
  69. package/dist/commands/security-snapshot.js +113 -0
  70. package/dist/commands/security-snapshot.js.map +1 -0
  71. package/dist/index.d.ts +3 -1
  72. package/dist/index.d.ts.map +1 -1
  73. package/dist/index.js +3 -1
  74. package/dist/index.js.map +1 -1
  75. package/dist/integrations/_scaffold.d.ts +2 -1
  76. package/dist/integrations/_scaffold.d.ts.map +1 -1
  77. package/dist/integrations/_scaffold.js +36 -13
  78. package/dist/integrations/_scaffold.js.map +1 -1
  79. package/dist/integrations/_simple-scaffold.d.ts +5 -2
  80. package/dist/integrations/_simple-scaffold.d.ts.map +1 -1
  81. package/dist/integrations/_simple-scaffold.js +3 -0
  82. package/dist/integrations/_simple-scaffold.js.map +1 -1
  83. package/dist/integrations/dotnet.d.ts.map +1 -1
  84. package/dist/integrations/dotnet.js +3 -0
  85. package/dist/integrations/dotnet.js.map +1 -1
  86. package/dist/integrations/expo/detect.d.ts +13 -0
  87. package/dist/integrations/expo/detect.d.ts.map +1 -0
  88. package/dist/integrations/expo/detect.js +38 -0
  89. package/dist/integrations/expo/detect.js.map +1 -0
  90. package/dist/integrations/expo/doctor.d.ts +6 -0
  91. package/dist/integrations/expo/doctor.d.ts.map +1 -0
  92. package/dist/integrations/expo/doctor.js +136 -0
  93. package/dist/integrations/expo/doctor.js.map +1 -0
  94. package/dist/integrations/expo/files.d.ts +15 -0
  95. package/dist/integrations/expo/files.d.ts.map +1 -0
  96. package/dist/integrations/expo/files.js +62 -0
  97. package/dist/integrations/expo/files.js.map +1 -0
  98. package/dist/integrations/expo/index.d.ts +24 -0
  99. package/dist/integrations/expo/index.d.ts.map +1 -0
  100. package/dist/integrations/expo/index.js +68 -0
  101. package/dist/integrations/expo/index.js.map +1 -0
  102. package/dist/integrations/expo/manifest.d.ts +3 -0
  103. package/dist/integrations/expo/manifest.d.ts.map +1 -0
  104. package/dist/integrations/expo/manifest.js +39 -0
  105. package/dist/integrations/expo/manifest.js.map +1 -0
  106. package/dist/integrations/expo/patch.d.ts +13 -0
  107. package/dist/integrations/expo/patch.d.ts.map +1 -0
  108. package/dist/integrations/expo/patch.js +215 -0
  109. package/dist/integrations/expo/patch.js.map +1 -0
  110. package/dist/integrations/expo/uninstall.d.ts +4 -0
  111. package/dist/integrations/expo/uninstall.d.ts.map +1 -0
  112. package/dist/integrations/expo/uninstall.js +77 -0
  113. package/dist/integrations/expo/uninstall.js.map +1 -0
  114. package/dist/integrations/expo.d.ts +8 -1
  115. package/dist/integrations/expo.d.ts.map +1 -1
  116. package/dist/integrations/expo.js +8 -11
  117. package/dist/integrations/expo.js.map +1 -1
  118. package/dist/integrations/fastify/detect.d.ts +3 -0
  119. package/dist/integrations/fastify/detect.d.ts.map +1 -0
  120. package/dist/integrations/fastify/detect.js +12 -0
  121. package/dist/integrations/fastify/detect.js.map +1 -0
  122. package/dist/integrations/fastify/doctor.d.ts +3 -0
  123. package/dist/integrations/fastify/doctor.d.ts.map +1 -0
  124. package/dist/integrations/fastify/doctor.js +81 -0
  125. package/dist/integrations/fastify/doctor.js.map +1 -0
  126. package/dist/integrations/fastify/files.d.ts +17 -0
  127. package/dist/integrations/fastify/files.d.ts.map +1 -0
  128. package/dist/integrations/fastify/files.js +51 -0
  129. package/dist/integrations/fastify/files.js.map +1 -0
  130. package/dist/integrations/fastify/index.d.ts +3 -0
  131. package/dist/integrations/fastify/index.d.ts.map +1 -0
  132. package/dist/integrations/fastify/index.js +47 -0
  133. package/dist/integrations/fastify/index.js.map +1 -0
  134. package/dist/integrations/fastify/manifest.d.ts +3 -0
  135. package/dist/integrations/fastify/manifest.d.ts.map +1 -0
  136. package/dist/integrations/fastify/manifest.js +34 -0
  137. package/dist/integrations/fastify/manifest.js.map +1 -0
  138. package/dist/integrations/fastify/patch.d.ts +27 -0
  139. package/dist/integrations/fastify/patch.d.ts.map +1 -0
  140. package/dist/integrations/fastify/patch.js +91 -0
  141. package/dist/integrations/fastify/patch.js.map +1 -0
  142. package/dist/integrations/fastify/uninstall.d.ts +4 -0
  143. package/dist/integrations/fastify/uninstall.d.ts.map +1 -0
  144. package/dist/integrations/fastify/uninstall.js +18 -0
  145. package/dist/integrations/fastify/uninstall.js.map +1 -0
  146. package/dist/integrations/fastify.d.ts +5 -1
  147. package/dist/integrations/fastify.d.ts.map +1 -1
  148. package/dist/integrations/fastify.js +5 -9
  149. package/dist/integrations/fastify.js.map +1 -1
  150. package/dist/integrations/flutter.d.ts.map +1 -1
  151. package/dist/integrations/flutter.js +3 -0
  152. package/dist/integrations/flutter.js.map +1 -1
  153. package/dist/integrations/go/index.d.ts +3 -0
  154. package/dist/integrations/go/index.d.ts.map +1 -0
  155. package/dist/integrations/go/index.js +199 -0
  156. package/dist/integrations/go/index.js.map +1 -0
  157. package/dist/integrations/go.d.ts.map +1 -1
  158. package/dist/integrations/go.js +5 -2
  159. package/dist/integrations/go.js.map +1 -1
  160. package/dist/integrations/java/index.d.ts +3 -0
  161. package/dist/integrations/java/index.d.ts.map +1 -0
  162. package/dist/integrations/java/index.js +472 -0
  163. package/dist/integrations/java/index.js.map +1 -0
  164. package/dist/integrations/java.d.ts.map +1 -1
  165. package/dist/integrations/java.js +5 -2
  166. package/dist/integrations/java.js.map +1 -1
  167. package/dist/integrations/js/manifest.d.ts.map +1 -1
  168. package/dist/integrations/js/manifest.js +3 -0
  169. package/dist/integrations/js/manifest.js.map +1 -1
  170. package/dist/integrations/nestjs/detect.d.ts +3 -0
  171. package/dist/integrations/nestjs/detect.d.ts.map +1 -0
  172. package/dist/integrations/nestjs/detect.js +12 -0
  173. package/dist/integrations/nestjs/detect.js.map +1 -0
  174. package/dist/integrations/nestjs/doctor.d.ts +3 -0
  175. package/dist/integrations/nestjs/doctor.d.ts.map +1 -0
  176. package/dist/integrations/nestjs/doctor.js +76 -0
  177. package/dist/integrations/nestjs/doctor.js.map +1 -0
  178. package/dist/integrations/nestjs/files.d.ts +18 -0
  179. package/dist/integrations/nestjs/files.d.ts.map +1 -0
  180. package/dist/integrations/nestjs/files.js +39 -0
  181. package/dist/integrations/nestjs/files.js.map +1 -0
  182. package/dist/integrations/nestjs/index.d.ts +3 -0
  183. package/dist/integrations/nestjs/index.d.ts.map +1 -0
  184. package/dist/integrations/nestjs/index.js +43 -0
  185. package/dist/integrations/nestjs/index.js.map +1 -0
  186. package/dist/integrations/nestjs/manifest.d.ts +3 -0
  187. package/dist/integrations/nestjs/manifest.d.ts.map +1 -0
  188. package/dist/integrations/nestjs/manifest.js +32 -0
  189. package/dist/integrations/nestjs/manifest.js.map +1 -0
  190. package/dist/integrations/nestjs/patch.d.ts +25 -0
  191. package/dist/integrations/nestjs/patch.d.ts.map +1 -0
  192. package/dist/integrations/nestjs/patch.js +66 -0
  193. package/dist/integrations/nestjs/patch.js.map +1 -0
  194. package/dist/integrations/nestjs/uninstall.d.ts +4 -0
  195. package/dist/integrations/nestjs/uninstall.d.ts.map +1 -0
  196. package/dist/integrations/nestjs/uninstall.js +18 -0
  197. package/dist/integrations/nestjs/uninstall.js.map +1 -0
  198. package/dist/integrations/nestjs.d.ts +5 -1
  199. package/dist/integrations/nestjs.d.ts.map +1 -1
  200. package/dist/integrations/nestjs.js +5 -9
  201. package/dist/integrations/nestjs.js.map +1 -1
  202. package/dist/integrations/next/index.js +2 -2
  203. package/dist/integrations/next/index.js.map +1 -1
  204. package/dist/integrations/next/manifest.d.ts.map +1 -1
  205. package/dist/integrations/next/manifest.js +4 -1
  206. package/dist/integrations/next/manifest.js.map +1 -1
  207. package/dist/integrations/next/patch.js +8 -3
  208. package/dist/integrations/next/patch.js.map +1 -1
  209. package/dist/integrations/next/uninstall.d.ts.map +1 -1
  210. package/dist/integrations/next/uninstall.js +10 -1
  211. package/dist/integrations/next/uninstall.js.map +1 -1
  212. package/dist/integrations/otel.d.ts.map +1 -1
  213. package/dist/integrations/otel.js +4 -1
  214. package/dist/integrations/otel.js.map +1 -1
  215. package/dist/integrations/php.d.ts.map +1 -1
  216. package/dist/integrations/php.js +16 -3
  217. package/dist/integrations/php.js.map +1 -1
  218. package/dist/integrations/python/index.d.ts +3 -0
  219. package/dist/integrations/python/index.d.ts.map +1 -0
  220. package/dist/integrations/python/index.js +222 -0
  221. package/dist/integrations/python/index.js.map +1 -0
  222. package/dist/integrations/python.d.ts.map +1 -1
  223. package/dist/integrations/python.js +5 -2
  224. package/dist/integrations/python.js.map +1 -1
  225. package/dist/integrations/react/doctor.d.ts.map +1 -1
  226. package/dist/integrations/react/doctor.js +41 -8
  227. package/dist/integrations/react/doctor.js.map +1 -1
  228. package/dist/integrations/react/index.d.ts.map +1 -1
  229. package/dist/integrations/react/index.js +1 -4
  230. package/dist/integrations/react/index.js.map +1 -1
  231. package/dist/integrations/react/manifest.d.ts.map +1 -1
  232. package/dist/integrations/react/manifest.js +4 -1
  233. package/dist/integrations/react/manifest.js.map +1 -1
  234. package/dist/integrations/react/patch.d.ts.map +1 -1
  235. package/dist/integrations/react/patch.js +120 -8
  236. package/dist/integrations/react/patch.js.map +1 -1
  237. package/dist/integrations/react/uninstall.d.ts.map +1 -1
  238. package/dist/integrations/react/uninstall.js +20 -1
  239. package/dist/integrations/react/uninstall.js.map +1 -1
  240. package/dist/integrations/react-native.d.ts.map +1 -1
  241. package/dist/integrations/react-native.js +3 -0
  242. package/dist/integrations/react-native.js.map +1 -1
  243. package/dist/integrations/ruby.d.ts.map +1 -1
  244. package/dist/integrations/ruby.js +3 -0
  245. package/dist/integrations/ruby.js.map +1 -1
  246. package/dist/output/human.d.ts.map +1 -1
  247. package/dist/output/human.js +38 -7
  248. package/dist/output/human.js.map +1 -1
  249. package/dist/registry/index.d.ts.map +1 -1
  250. package/dist/registry/index.js +9 -23
  251. package/dist/registry/index.js.map +1 -1
  252. package/dist/registry/manifest.d.ts +8 -0
  253. package/dist/registry/manifest.d.ts.map +1 -1
  254. package/dist/security-snapshot/builder.d.ts +3 -0
  255. package/dist/security-snapshot/builder.d.ts.map +1 -0
  256. package/dist/security-snapshot/builder.js +343 -0
  257. package/dist/security-snapshot/builder.js.map +1 -0
  258. package/dist/security-snapshot/client.d.ts +3 -0
  259. package/dist/security-snapshot/client.d.ts.map +1 -0
  260. package/dist/security-snapshot/client.js +38 -0
  261. package/dist/security-snapshot/client.js.map +1 -0
  262. package/dist/security-snapshot/index.d.ts +4 -0
  263. package/dist/security-snapshot/index.d.ts.map +1 -0
  264. package/dist/security-snapshot/index.js +3 -0
  265. package/dist/security-snapshot/index.js.map +1 -0
  266. package/dist/security-snapshot/types.d.ts +57 -0
  267. package/dist/security-snapshot/types.d.ts.map +1 -0
  268. package/dist/security-snapshot/types.js +2 -0
  269. package/dist/security-snapshot/types.js.map +1 -0
  270. package/dist/sourcemaps/next.js +3 -3
  271. package/dist/sourcemaps/next.js.map +1 -1
  272. package/dist/sourcemaps/vite.d.ts.map +1 -1
  273. package/dist/sourcemaps/vite.js +92 -9
  274. package/dist/sourcemaps/vite.js.map +1 -1
  275. package/dist/util/wizard-version.d.ts +1 -1
  276. package/dist/util/wizard-version.js +1 -1
  277. package/docs/architecture/v02-java-host-fix-spec.md +4 -8
  278. package/docs/architecture/v02-sourcemaps-e2e-spec.md +1 -1
  279. package/docs/beta/README.md +17 -0
  280. package/docs/beta/ci.md +122 -0
  281. package/docs/beta/config.md +124 -0
  282. package/docs/beta/doctor.md +79 -0
  283. package/docs/beta/expo.md +69 -0
  284. package/docs/beta/fastify.md +62 -0
  285. package/docs/beta/known-limitations.md +93 -0
  286. package/docs/beta/nestjs.md +69 -0
  287. package/docs/beta/next.md +76 -0
  288. package/docs/beta/node.md +60 -0
  289. package/docs/beta/privacy.md +99 -0
  290. package/docs/beta/quickstart.md +89 -0
  291. package/docs/beta/react.md +91 -0
  292. package/docs/beta/reliability.md +33 -0
  293. package/docs/beta/restore.md +84 -0
  294. package/docs/beta/troubleshooting.md +133 -0
  295. package/docs/errors.md +88 -0
  296. package/package.json +23 -5
package/CHANGELOG.md CHANGED
@@ -4,7 +4,59 @@ All notable changes to `@allstak/wizard` will be documented here. The format
4
4
  follows [Keep a Changelog](https://keepachangelog.com/) and this project
5
5
  adheres to [Semantic Versioning](https://semver.org/).
6
6
 
7
- ## [Unreleased] — 0.1.3
7
+ ## [Unreleased] — 0.1.4-beta.0
8
+
9
+ ### Added
10
+ - **Expo (managed workflow) → beta.** New `expo` integration patches
11
+ `app.json:expo.plugins[]` (idempotent), AST-injects `AllStakProvider`
12
+ import in `App.tsx`, and appends a managed-block hint. Refuses on
13
+ prebuilt projects (`ios/` or `android/` present) with a clear error.
14
+ See `docs/beta/expo.md`.
15
+ - **NestJS → beta.** New `nestjs` integration AST-injects
16
+ `AllStakNestExceptionFilter` / `AllStakNestInterceptor` imports and
17
+ appends a managed-block hint demonstrating `useGlobalFilters` /
18
+ `useGlobalInterceptors` registration. Wizard does NOT auto-mutate
19
+ `bootstrap()`. Compat: `@nestjs/core >= 9`. See `docs/beta/nestjs.md`.
20
+ - **Fastify → beta.** New `fastify` integration; ESM entries get an
21
+ AST-injected `allstakFastify` import, CJS entries get a hint-only
22
+ patch. Both branches append a managed-block hint demonstrating
23
+ `app.register(allstakFastify, ...)`. Compat: `fastify >= 4`. See
24
+ `docs/beta/fastify.md`.
25
+ - Next 15 fixture (`fixtures/next-app-router-15`) added to the
26
+ integration test matrix; `next` integration now exercised against
27
+ Next 13/14/15 in unit tests + CI.
28
+ - Three new fixtures (`fixtures/expo-managed`, `fixtures/nestjs-app`,
29
+ `fixtures/fastify-server`) drive ~30 new integration tests covering
30
+ detect (incl. version refusal), patch shape, idempotency (byte-equal
31
+ re-run), uninstall reversal, and `doctor` warn→pass transitions.
32
+ - CI matrix expanded to 8 fixtures × 3 Node versions (18/20/22) =
33
+ **24 install/uninstall/repair/restore/idempotency cycles per push**.
34
+
35
+ ### Changed
36
+ - Test count: **157 / 157** passing (was 123/123).
37
+ - Next.js uninstall ordering fixed: `removeManagedSourceBlock` now runs
38
+ BEFORE `patchJsModule(removeImport)`, so wizard-created
39
+ `instrumentation.ts` files (whose entire content lives inside the
40
+ managed markers) are correctly deleted on uninstall instead of being
41
+ orphaned.
42
+ - Next.js `ensureInstrumentationFile` now wraps wizard-generated
43
+ `register()` content inside managed-block markers when creating the
44
+ file from scratch — required for clean uninstall round-trip.
45
+ - `next` stability **explicitly held at `beta`** until source-map upload
46
+ + symbolication roundtrip is validated end-to-end (tracked by an
47
+ assertion in the unit tests so we cannot accidentally promote it).
48
+ - README rewritten to reflect the v0.1.3 beta surface (real auth, full
49
+ command list, telemetry contract, error catalog, current v0.2
50
+ roadmap), and the integration matrix updated to show Expo / NestJS /
51
+ Fastify at `beta`.
52
+ - Package metadata polished for npm: tighter description, `sdk-install`
53
+ keyword consolidated to `sdk`, exports map gains `./config` and
54
+ `./errors` subpaths, `files` whitelist gains `docs/errors.md` and
55
+ `docs/beta/`.
56
+ - Scrubbed two absolute local paths from shipped content
57
+ (`docs/architecture/v02-java-host-fix-spec.md`, `src/api/types.ts`).
58
+
59
+ ## [0.1.3] — 2026-05-07
8
60
 
9
61
  ### Added
10
62
  - Privacy-safe telemetry (`src/telemetry/*`) — disabled by default until an
package/LICENSE ADDED
@@ -0,0 +1,191 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to the Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by the Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding any notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ Copyright 2024-2026 AllStak
180
+
181
+ Licensed under the Apache License, Version 2.0 (the "License");
182
+ you may not use this file except in compliance with the License.
183
+ You may obtain a copy of the License at
184
+
185
+ http://www.apache.org/licenses/LICENSE-2.0
186
+
187
+ Unless required by applicable law or agreed to in writing, software
188
+ distributed under the License is distributed on an "AS IS" BASIS,
189
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
190
+ See the License for the specific language governing permissions and
191
+ limitations under the License.
package/README.md CHANGED
@@ -1,79 +1,331 @@
1
1
  # @allstak/wizard
2
2
 
3
- > v0.1 — Unified installation and configuration wizard for AllStak SDKs.
3
+ > **v0.1.4** — Unified installation and configuration wizard for AllStak SDKs.
4
4
 
5
- A Sentry-Wizard-style CLI that installs and configures AllStak SDKs in your project with one command. Designed to be **honest by default**: only integrations validated end-to-end against real fixture projects ship with the `VALIDATED` tag; everything else is `SCAFFOLD` and refuses to apply patches without `--experimental`.
5
+ A Sentry-Wizard-style CLI that installs and configures AllStak SDKs in
6
+ your project with one command where automation is complete, and shows
7
+ Manual/light setup guidance where the runtime is Stable but automation is not
8
+ finished. Designed to be **honest by default**: runtime stability and wizard
9
+ automation maturity are separate claims.
6
10
 
7
- ## Status
11
+ ## Public SDK Status
8
12
 
9
- | Integration | Tag | Notes |
10
- |---------------|-------------|-------|
11
- | `react` | VALIDATED | Vite + plain React, AST-tested |
12
- | `next` | VALIDATED | Next 13+ app & pages router |
13
- | `js` | VALIDATED | Vanilla Node entry-point patching |
14
- | `expo` | SCAFFOLD | Config-plugin path scaffolded; native build verification deferred to v0.2 |
15
- | `react-native` | UNSUPPORTED | Bare RN intentionally refused Podfile/Gradle patching not validated |
16
- | `nestjs` / `fastify` / `otel` / `python` / `go` / `java` / `php` / `ruby` / `dotnet` / `flutter` | SCAFFOLD | Env-var writing only; framework wiring deferred to v0.2 |
13
+ | Integration | Runtime status | Wizard status | Notes |
14
+ |-------------|----------------|-------------------|-------|
15
+ | `js` (JavaScript / TypeScript) | Stable | Stable | Validated end-to-end; wizard can install and wire init. |
16
+ | `react` (Vite or CRA) | Stable | Stable | Validated end-to-end; wizard can install and wire common app entry patterns. |
17
+ | `react-native` (Expo + bare RN) | Stable | Manual/light | Runtime is Stable; wizard provides setup guidance. |
18
+ | `next` (13+, app + pages router) | Beta | Beta | Runtime is Beta (certification score 32); wizard provides App Router and pages-router onboarding. Edge Runtime and Server Actions are not certified. |
19
+ | `java` (Java / Spring Boot) | Beta | Manual/light | Runtime is Beta (certification score 34); wizard provides setup guidance. |
20
+ | `python` | Beta | Manual/light | Runtime is Beta (certification score 34); wizard provides setup guidance. |
21
+ | `go` | Beta | Manual/light | Runtime is Beta (certification score 33); wizard provides setup guidance. |
17
22
 
18
- Run `allstak-wizard list` to see this matrix at runtime.
23
+ `allstak-wizard list` prints public runtime SDKs and makes wizard maturity
24
+ explicit. Manual/light entries are setup guidance, not full automation.
19
25
 
20
- ## Install
26
+ ## Install + run
21
27
 
22
- In v0.1 the package is not published. To run from source:
28
+ ```bash
29
+ # Show help (also fetches and runs the package via npx).
30
+ npx @allstak/wizard --help
31
+
32
+ # Authenticate against AllStak (email OTP, optional 2FA).
33
+ npx @allstak/wizard login
34
+
35
+ # Configure your project (auto-detects React / Next / Node).
36
+ npx @allstak/wizard -i react
37
+
38
+ # Verify with a real test event roundtrip.
39
+ npx @allstak/wizard doctor --live-probe \
40
+ --api-key ask_live_... \
41
+ --project-id <project-uuid>
42
+ ```
43
+
44
+ Five-minute walkthrough: [`docs/beta/quickstart.md`](./docs/beta/quickstart.md).
45
+
46
+ ## Authentication
47
+
48
+ Real AllStak auth flow — no fake endpoints. Backed by the verified
49
+ `/api/v1/auth/*` endpoints on `api.allstak.sa`.
23
50
 
24
51
  ```bash
25
- cd /path/to/sdks/allstak-wizard
26
- npm install
27
- npx tsx src/cli.ts --help
52
+ allstak-wizard login # email OTP → JWT pair stored in OS keychain
53
+ allstak-wizard whoami [--verify] # show current user; --verify round-trips /auth/me
54
+ allstak-wizard logout # revoke session + clear local credentials
55
+ ```
56
+
57
+ Supports:
58
+
59
+ - **Email OTP** primary flow (`/api/v1/auth/request-otp` → `/api/v1/auth/verify-otp`).
60
+ - **TOTP** second factor when enabled on the account.
61
+ - **JWT refresh** with proactive 60s pre-expiry refresh + token rotation.
62
+ - **CI mode** via `--api-key` / `ALLSTAK_API_KEY` (skip login entirely).
63
+ - **Cross-platform credential storage**: macOS Keychain, Linux Secret
64
+ Service (`secret-tool`), AES-256-GCM encrypted-file fallback.
65
+
66
+ `--api-key` is for project-scoped data-plane operations (sending events).
67
+ The user JWT is for control-plane operations (orgs, projects, doctor). The
68
+ two are NOT interchangeable — that mirrors the backend's design.
69
+
70
+ ## Commands
71
+
72
+ ```
73
+ init [-i <integration>] [--api-key|--org|--project|--release|...] [--dry-run] [-y]
74
+ doctor [-i <integration>] [--live-probe --api-key --project-id <uuid>]
75
+ repair -i <integration> [--dry-run]
76
+ uninstall -i <integration> [-y] [--dry-run]
77
+ list
78
+
79
+ login [--email <e> --code <c>] [--totp <c>]
80
+ logout [--local-only]
81
+ whoami [--verify]
82
+
83
+ orgs list
84
+ projects list [--org <id>]
85
+ projects create [--name --slug --platform --with-api-key]
86
+
87
+ restore list
88
+ restore show <id|latest>
89
+ restore apply <id|latest> [--files=a,b,c] [--dry-run] [-y]
90
+ restore diff <id|latest>
91
+
92
+ config validate
93
+ config migrate [--dry-run]
94
+ ```
95
+
96
+ Global flags:
97
+
98
+ ```
99
+ --debug verbose debug logging
100
+ --json machine-readable output to stdout (status text → stderr)
101
+ --no-telemetry disable anonymous usage telemetry for this run
102
+ --telemetry-debug print the telemetry payload to stderr without sending
103
+ ```
104
+
105
+ ## Telemetry & privacy
106
+
107
+ **Default provider is `noopTelemetry`** — the wizard does not phone home in
108
+ beta. An HTTP provider exists (`httpTelemetry({ endpoint })`) for operators
109
+ to wire in once a backend telemetry endpoint is decided on.
110
+
111
+ Three independent ways to opt out, any one suffices:
112
+
113
+ ```bash
114
+ npx @allstak/wizard --no-telemetry ...
115
+ ALLSTAK_WIZARD_TELEMETRY=0 npx @allstak/wizard ...
116
+ # Or: leave the default noop provider in place (no operator config).
28
117
  ```
29
118
 
30
- ## Usage
119
+ Inspect what _would_ be sent:
31
120
 
32
121
  ```bash
33
- # Auto-detect framework, interactive
34
- allstak-wizard
122
+ npx @allstak/wizard --telemetry-debug -i react --dry-run
123
+ ```
124
+
125
+ The wizard's payload type is the entire on-the-wire contract. We do **NOT**
126
+ collect:
127
+
128
+ - API keys, DSNs, refresh tokens, OAuth secrets
129
+ - Org names, project names, project ids, org ids
130
+ - File paths (absolute or relative)
131
+ - Env-var values
132
+ - Source code, error message text, stack frames
133
+ - Email addresses, IP addresses, hostnames
134
+
135
+ We do collect: wizard version, command, integration id, stability level,
136
+ OS family + major, Node major, package manager, outcome, stage, canonical
137
+ error code (no message text), `rollbackTriggered` (boolean), `durationMs`.
35
138
 
36
- # Explicit, non-interactive
37
- allstak-wizard -i react --api-key $ALLSTAK_API_KEY -y
139
+ Full contract: [`docs/beta/privacy.md`](./docs/beta/privacy.md).
38
140
 
39
- # Self-hosted
40
- allstak-wizard -i next --host https://api.acme.allstak.com --api-key $KEY -y
141
+ ## Config (`allstak.config.{ts,mjs,js,cjs,json}`)
41
142
 
42
- # Dry run (prints diff, writes nothing)
43
- allstak-wizard -i react --dry-run -y
143
+ Optional project-level config so you don't repeat `--org`, `--project`,
144
+ `--host`, etc. on every wizard invocation.
44
145
 
45
- # Other commands
46
- allstak-wizard list
47
- allstak-wizard doctor [-i react]
48
- allstak-wizard repair -i react
49
- allstak-wizard uninstall -i react -y
146
+ ```ts
147
+ import { defineConfig } from '@allstak/wizard/config';
148
+
149
+ export default defineConfig({
150
+ schemaVersion: 1,
151
+ organization: 'my-org',
152
+ project: 'my-project',
153
+ environment: 'production',
154
+ release: process.env.GIT_SHA,
155
+ sourceMaps: {
156
+ enabled: true,
157
+ ignore: ['node_modules'],
158
+ },
159
+ selfHosted: {
160
+ apiHost: 'https://api.allstak.example',
161
+ ingestHost: 'https://api.allstak.example',
162
+ dashboardHost: 'https://app.allstak.example',
163
+ },
164
+ });
50
165
  ```
51
166
 
52
- ## Authentication (v0.1)
167
+ **Precedence:** `CLI flag > env var > config file > built-in default`.
53
168
 
54
- Browser/device-flow login is **not** implemented in v0.1. Provide a key via `--api-key` or `ALLSTAK_API_KEY`. `allstak-wizard login` exits with a clear hint.
169
+ Validate:
55
170
 
56
- ## Architecture
171
+ ```bash
172
+ allstak-wizard config validate
173
+ ```
57
174
 
58
- - **Registry** every integration is an `Integration` object with `detect`, `plan`, `install`, `patch`, `validate`, `uninstall`, `repair`, `doctor` methods. New integrations register themselves; the CLI is integration-agnostic.
59
- - **Transaction** — every file mutation goes through a `Transaction` that snapshots before writing, validates syntax after writing, and rolls back the entire batch on any failure.
60
- - **Markers** — every injected region is wrapped with `>>> allstak-wizard:v1` markers. Re-runs replace the existing block (idempotent). `uninstall` removes the block cleanly.
61
- - **AST patching** — JS/TS files use `magicast` (recast under the hood) to add imports without disturbing user code; non-AST changes (provider wrap hints, Vite plugin hints) live in marker blocks.
62
- - **Dry-run** — every command supports `--dry-run`; the transaction layer captures the diff but skips disk writes.
175
+ Migrate to a new schema version:
63
176
 
64
- ## Self-hosted support
177
+ ```bash
178
+ allstak-wizard config migrate --dry-run # preview
179
+ allstak-wizard config migrate # rewrites .json in place
180
+ ```
65
181
 
66
- The wizard never assumes `api.allstak.sa`; pass `--host`, `--ingest-host`, and `--dashboard-host` to point at any AllStak deployment. Note: the Java SDK currently hardcodes its host — that's a known SDK-side bug, not a wizard bug. See the v0.1 implementation report for details.
182
+ Full reference: [`docs/beta/config.md`](./docs/beta/config.md).
67
183
 
68
- ## Testing
184
+ ## Doctor (deterministic diagnostics)
185
+
186
+ ```bash
187
+ allstak-wizard doctor # offline check
188
+ allstak-wizard doctor --live-probe \ # send + verify a real event
189
+ --api-key ask_live_... --project-id <uuid>
190
+ ```
191
+
192
+ Runs seven named stages in fixed order — `auth → reachability → config →
193
+ integration → event-ingest → release-linkage → source-maps`. Each stage
194
+ reports `pass`/`warn`/`fail`/`skip` with an actionable fix. Live probe POSTs
195
+ to `/ingest/v1/errors`, polls `/api/v1/errors`, and prints the dashboard URL
196
+ of the captured event.
197
+
198
+ Full reference: [`docs/beta/doctor.md`](./docs/beta/doctor.md).
199
+
200
+ SDK reliability and outage behavior are documented in
201
+ [`docs/beta/reliability.md`](./docs/beta/reliability.md). Wizard-generated
202
+ runtime integrations must be fail-open: AllStak ingest outages should drop or
203
+ delay telemetry, not break the host application.
204
+
205
+ ## Restore (persistent snapshots)
206
+
207
+ Every wizard mutation is captured under
208
+ `.allstak-wizard/backups/<id>/manifest.json` plus per-file pre-images.
69
209
 
70
210
  ```bash
71
- npm run test # 46 tests across markers, transaction, patchers, detect, integrations
72
- npm run type-check
211
+ allstak-wizard restore list
212
+ allstak-wizard restore show latest
213
+ allstak-wizard restore diff latest
214
+ allstak-wizard restore apply latest [--files=src/main.tsx]
73
215
  ```
74
216
 
75
- Tests use temp-dir fixtures (no network, no SDK install required) and validate idempotency, rollback, dry-run, and uninstall round-trips for all VALIDATED integrations.
217
+ Full reference: [`docs/beta/restore.md`](./docs/beta/restore.md).
218
+
219
+ ## Error codes
220
+
221
+ 22 canonical error codes — stable across releases (added; never renamed).
222
+ Both human and `--json` output expose `{code, stage, subcode?, message,
223
+ hint}`. Catalog: [`docs/errors.md`](./docs/errors.md).
224
+
225
+ ```bash
226
+ $ allstak-wizard --json -i react -y --skip-deps
227
+ {
228
+ "outcome": "failure",
229
+ "errorCode": "E_AUTH_REQUIRED",
230
+ "data": { "error": {
231
+ "code": "E_AUTH_REQUIRED",
232
+ "stage": "auth",
233
+ "subcode": "E_MISSING_KEY",
234
+ "message": "...",
235
+ "hint": "Pass --api-key or run `allstak login`."
236
+ } }
237
+ }
238
+ ```
239
+
240
+ Exit codes: `0` success, `2` `WizardError`, `130` user cancellation.
241
+
242
+ ## Self-hosted
243
+
244
+ Pass `--host`, `--ingest-host`, `--dashboard-host` directly, or set
245
+ `selfHosted.*` in `allstak.config.*`. The wizard never assumes
246
+ `api.allstak.sa`.
247
+
248
+ **Caveat:** `allstak-java-sdk` currently hardcodes its host. Until that
249
+ SDK ships a configurable `host` field, the wizard's `--host` flag is a
250
+ no-op for `-i java`. Spec for the SDK fix:
251
+ [`docs/architecture/v02-java-host-fix-spec.md`](./docs/architecture/v02-java-host-fix-spec.md).
252
+
253
+ ## Architecture
254
+
255
+ - **Registry** — every integration is an `Integration` object with
256
+ `detect`, `plan`, `install`, `patch`, `validate`, `uninstall`, `repair`,
257
+ `doctor` methods. New integrations register themselves; the CLI is
258
+ integration-agnostic.
259
+ - **Transaction** — every file mutation snapshots before write, syntax-
260
+ validates after write, and rolls back the entire batch on any failure.
261
+ - **Persistent snapshots** — alongside in-memory rollback, every run
262
+ writes a backup under `.allstak-wizard/backups/<id>/` for cross-run
263
+ recovery via `restore`.
264
+ - **Markers** — every injected region wrapped with `>>> allstak-wizard:v1`
265
+ markers. Re-runs replace in place (idempotent). `uninstall` removes the
266
+ block cleanly.
267
+ - **AST patching** — `magicast` (recast under the hood) for JS/TS imports;
268
+ managed-block hints for non-AST patches (Vite plugins, Next config).
269
+ - **Dry-run** — every command supports `--dry-run`; transaction layer
270
+ captures the diff and skips disk writes.
271
+ - **Source-map providers** — pluggable abstraction (`vite`, `webpack`,
272
+ `next`, `metro`); integrations select a provider by id.
273
+ - **Lifecycle hooks** — `beforeInstall`/`afterInstall`/`beforePatch`/
274
+ `afterPatch`/`beforeRollback`/`afterRollback`/`beforeUninstall`/
275
+ `afterUninstall` for telemetry + plugin extensions.
276
+
277
+ Full design docs: [`docs/architecture/`](./docs/architecture/).
278
+
279
+ ## Development from source
280
+
281
+ ```bash
282
+ cd /path/to/sdks/allstak-wizard
283
+ npm install
284
+ npm run type-check # tsc --noEmit (clean)
285
+ npm test # 157 tests, ~5s
286
+ npm run build # emits dist/ with .d.ts + source maps
287
+ npx tsx src/cli.ts --help # run from source
288
+
289
+ # Smoke against a fixture (no network, no SDK install):
290
+ cd fixtures/react-vite
291
+ ALLSTAK_API_KEY=ask_test \
292
+ npx --prefix ../.. tsx ../../src/cli.ts -i react --dry-run -y --skip-deps
293
+ ```
294
+
295
+ ## Testing
296
+
297
+ | Status | Count |
298
+ |--------|-------|
299
+ | Type-check | clean |
300
+ | Unit + integration tests | **157 / 157** passing |
301
+ | Build | clean (.js + .d.ts + source maps) |
302
+
303
+ Tests run on temp-dir fixtures (no network, no real SDK install) and
304
+ validate idempotency, rollback, dry-run, restore round-trip, error catalog
305
+ coverage, telemetry payload contract, and config migration plumbing.
306
+
307
+ ## Roadmap
308
+
309
+ Beta is shipping intentionally narrow. v0.2 priorities:
310
+
311
+ 1. **Bare React Native** — Podfile + Gradle patchers + iOS/Android
312
+ validation matrix. Spec:
313
+ [`docs/architecture/v02-bare-react-native-spec.md`](./docs/architecture/v02-bare-react-native-spec.md).
314
+ 2. **Source-maps end-to-end** — upload + symbolication round-trip against
315
+ `/api/v1/sourcemaps/upload`. Spec:
316
+ [`docs/architecture/v02-sourcemaps-e2e-spec.md`](./docs/architecture/v02-sourcemaps-e2e-spec.md).
317
+ 3. **Astro support** — currently falls through to `js` (env vars only).
318
+ 4. **Java SDK host fix** — coordinate with `allstak-java-sdk` to make
319
+ host configurable.
320
+ 5. **Backend SDK framework wiring** — NestJS `main.ts`, Spring Boot
321
+ `application.yml`, Django/FastAPI/Flask/Rails/.NET/Go/PHP entry-point
322
+ patching with per-framework fixture validation.
323
+ 6. **Telemetry HTTP endpoint** — backend contract pending.
324
+
325
+ ## License
326
+
327
+ Apache-2.0 — see [`LICENSE`](./LICENSE).
76
328
 
77
- ## v0.2 roadmap
329
+ ## Issues
78
330
 
79
- See `docs/reports/allstak-unified-sdk-wizard-v0.1-implementation.md` (in the platform monorepo) for the full plan.
331
+ [github.com/allstak-io/sdks/issues](https://github.com/allstak-io/sdks/issues)
@@ -33,6 +33,8 @@ export interface RequestInit {
33
33
  signal?: AbortSignal;
34
34
  /** Override Content-Type — used by source-map upload (still JSON in body but custom MIME). */
35
35
  contentType?: string;
36
+ /** Extra non-auth headers. Callers must not pass secrets except purpose-scoped control-plane headers. */
37
+ headers?: Record<string, string | undefined>;
36
38
  }
37
39
  export interface ApiResponse<T> {
38
40
  status: number;
@@ -1 +1 @@
1
- {"version":3,"file":"http.d.ts","sourceRoot":"","sources":["../../src/api/http.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;GAYG;AAEH,MAAM,MAAM,QAAQ,GAChB;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,GAChB;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GACjC;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,CAAC;AAEpC,MAAM,WAAW,WAAW;IAC1B,MAAM,EAAE,KAAK,GAAG,MAAM,GAAG,KAAK,GAAG,QAAQ,CAAC;IAC1C,IAAI,EAAE,MAAM,CAAC;IACb,uBAAuB;IACvB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC,CAAC;IAC9D,IAAI,EAAE,QAAQ,CAAC;IACf,qCAAqC;IACrC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,sDAAsD;IACtD,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,8FAA8F;IAC9F,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,WAAW,CAAC,CAAC;IAC5B,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,CAAC,CAAC;IACR,oBAAoB;IACpB,EAAE,EAAE,OAAO,CAAC;CACb;AAID,wBAAsB,UAAU,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,WAAW,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAsE5F"}
1
+ {"version":3,"file":"http.d.ts","sourceRoot":"","sources":["../../src/api/http.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;GAYG;AAEH,MAAM,MAAM,QAAQ,GAChB;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,GAChB;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GACjC;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,CAAC;AAEpC,MAAM,WAAW,WAAW;IAC1B,MAAM,EAAE,KAAK,GAAG,MAAM,GAAG,KAAK,GAAG,QAAQ,CAAC;IAC1C,IAAI,EAAE,MAAM,CAAC;IACb,uBAAuB;IACvB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC,CAAC;IAC9D,IAAI,EAAE,QAAQ,CAAC;IACf,qCAAqC;IACrC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,sDAAsD;IACtD,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,8FAA8F;IAC9F,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,yGAAyG;IACzG,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC;CAC9C;AAED,MAAM,WAAW,WAAW,CAAC,CAAC;IAC5B,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,CAAC,CAAC;IACR,oBAAoB;IACpB,EAAE,EAAE,OAAO,CAAC;CACb;AAID,wBAAsB,UAAU,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,WAAW,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CA2E5F"}
package/dist/api/http.js CHANGED
@@ -13,6 +13,12 @@ export async function apiRequest(host, init) {
13
13
  else if (init.auth.kind === 'apiKey') {
14
14
  headers['X-AllStak-Key'] = init.auth.key;
15
15
  }
16
+ if (init.headers) {
17
+ for (const [key, value] of Object.entries(init.headers)) {
18
+ if (value !== undefined && value !== '')
19
+ headers[key] = value;
20
+ }
21
+ }
16
22
  const controller = new AbortController();
17
23
  const externalSignal = init.signal;
18
24
  const timeout = setTimeout(() => controller.abort(new Error('timeout')), init.timeoutMs ?? DEFAULT_TIMEOUT);