workos 0.18.0 → 0.20.1

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 (835) hide show
  1. package/README.md +4 -783
  2. package/bin/workos.js +44 -0
  3. package/package.json +18 -107
  4. package/LICENSE +0 -47
  5. package/dist/bin.d.ts +0 -2
  6. package/dist/bin.js +0 -1711
  7. package/dist/bin.js.map +0 -1
  8. package/dist/check-coverage.ts +0 -237
  9. package/dist/cli.config.d.ts +0 -88
  10. package/dist/cli.config.js +0 -110
  11. package/dist/cli.config.js.map +0 -1
  12. package/dist/commands/api/catalog.d.ts +0 -23
  13. package/dist/commands/api/catalog.js +0 -97
  14. package/dist/commands/api/catalog.js.map +0 -1
  15. package/dist/commands/api/format.d.ts +0 -5
  16. package/dist/commands/api/format.js +0 -46
  17. package/dist/commands/api/format.js.map +0 -1
  18. package/dist/commands/api/index.d.ts +0 -15
  19. package/dist/commands/api/index.js +0 -205
  20. package/dist/commands/api/index.js.map +0 -1
  21. package/dist/commands/api/interactive.d.ts +0 -3
  22. package/dist/commands/api/interactive.js +0 -133
  23. package/dist/commands/api/interactive.js.map +0 -1
  24. package/dist/commands/api/request.d.ts +0 -14
  25. package/dist/commands/api/request.js +0 -38
  26. package/dist/commands/api/request.js.map +0 -1
  27. package/dist/commands/api-key-mgmt.d.ts +0 -16
  28. package/dist/commands/api-key-mgmt.js +0 -96
  29. package/dist/commands/api-key-mgmt.js.map +0 -1
  30. package/dist/commands/audit-log.d.ts +0 -26
  31. package/dist/commands/audit-log.js +0 -155
  32. package/dist/commands/audit-log.js.map +0 -1
  33. package/dist/commands/auth-status.d.ts +0 -1
  34. package/dist/commands/auth-status.js +0 -57
  35. package/dist/commands/auth-status.js.map +0 -1
  36. package/dist/commands/claim.d.ts +0 -11
  37. package/dist/commands/claim.js +0 -131
  38. package/dist/commands/claim.js.map +0 -1
  39. package/dist/commands/config.d.ts +0 -3
  40. package/dist/commands/config.js +0 -54
  41. package/dist/commands/config.js.map +0 -1
  42. package/dist/commands/connection.d.ts +0 -13
  43. package/dist/commands/connection.js +0 -96
  44. package/dist/commands/connection.js.map +0 -1
  45. package/dist/commands/debug-sso.d.ts +0 -1
  46. package/dist/commands/debug-sso.js +0 -78
  47. package/dist/commands/debug-sso.js.map +0 -1
  48. package/dist/commands/debug-sync.d.ts +0 -1
  49. package/dist/commands/debug-sync.js +0 -102
  50. package/dist/commands/debug-sync.js.map +0 -1
  51. package/dist/commands/debug.d.ts +0 -28
  52. package/dist/commands/debug.js +0 -406
  53. package/dist/commands/debug.js.map +0 -1
  54. package/dist/commands/dev.d.ts +0 -23
  55. package/dist/commands/dev.js +0 -145
  56. package/dist/commands/dev.js.map +0 -1
  57. package/dist/commands/directory.d.ts +0 -27
  58. package/dist/commands/directory.js +0 -176
  59. package/dist/commands/directory.js.map +0 -1
  60. package/dist/commands/doctor.d.ts +0 -12
  61. package/dist/commands/doctor.js +0 -41
  62. package/dist/commands/doctor.js.map +0 -1
  63. package/dist/commands/emulate.d.ts +0 -6
  64. package/dist/commands/emulate.js +0 -68
  65. package/dist/commands/emulate.js.map +0 -1
  66. package/dist/commands/env.d.ts +0 -9
  67. package/dist/commands/env.js +0 -227
  68. package/dist/commands/env.js.map +0 -1
  69. package/dist/commands/event.d.ts +0 -9
  70. package/dist/commands/event.js +0 -43
  71. package/dist/commands/event.js.map +0 -1
  72. package/dist/commands/feature-flag.d.ts +0 -12
  73. package/dist/commands/feature-flag.js +0 -96
  74. package/dist/commands/feature-flag.js.map +0 -1
  75. package/dist/commands/install-skill.d.ts +0 -85
  76. package/dist/commands/install-skill.js +0 -332
  77. package/dist/commands/install-skill.js.map +0 -1
  78. package/dist/commands/install.d.ts +0 -6
  79. package/dist/commands/install.js +0 -56
  80. package/dist/commands/install.js.map +0 -1
  81. package/dist/commands/invitation.d.ts +0 -19
  82. package/dist/commands/invitation.js +0 -94
  83. package/dist/commands/invitation.js.map +0 -1
  84. package/dist/commands/list-skills.d.ts +0 -4
  85. package/dist/commands/list-skills.js +0 -52
  86. package/dist/commands/list-skills.js.map +0 -1
  87. package/dist/commands/login.d.ts +0 -22
  88. package/dist/commands/login.js +0 -184
  89. package/dist/commands/login.js.map +0 -1
  90. package/dist/commands/logout.d.ts +0 -1
  91. package/dist/commands/logout.js +0 -17
  92. package/dist/commands/logout.js.map +0 -1
  93. package/dist/commands/mcp.d.ts +0 -14
  94. package/dist/commands/mcp.js +0 -108
  95. package/dist/commands/mcp.js.map +0 -1
  96. package/dist/commands/membership.d.ts +0 -20
  97. package/dist/commands/membership.js +0 -129
  98. package/dist/commands/membership.js.map +0 -1
  99. package/dist/commands/migrations.d.ts +0 -2
  100. package/dist/commands/migrations.js +0 -49
  101. package/dist/commands/migrations.js.map +0 -1
  102. package/dist/commands/onboard-user.d.ts +0 -7
  103. package/dist/commands/onboard-user.js +0 -61
  104. package/dist/commands/onboard-user.js.map +0 -1
  105. package/dist/commands/org-domain.d.ts +0 -4
  106. package/dist/commands/org-domain.js +0 -45
  107. package/dist/commands/org-domain.js.map +0 -1
  108. package/dist/commands/organization.d.ts +0 -14
  109. package/dist/commands/organization.js +0 -103
  110. package/dist/commands/organization.js.map +0 -1
  111. package/dist/commands/permission.d.ts +0 -20
  112. package/dist/commands/permission.js +0 -93
  113. package/dist/commands/permission.js.map +0 -1
  114. package/dist/commands/portal.d.ts +0 -7
  115. package/dist/commands/portal.js +0 -26
  116. package/dist/commands/portal.js.map +0 -1
  117. package/dist/commands/role.d.ts +0 -17
  118. package/dist/commands/role.js +0 -122
  119. package/dist/commands/role.js.map +0 -1
  120. package/dist/commands/seed.d.ts +0 -6
  121. package/dist/commands/seed.js +0 -297
  122. package/dist/commands/seed.js.map +0 -1
  123. package/dist/commands/session.d.ts +0 -8
  124. package/dist/commands/session.js +0 -63
  125. package/dist/commands/session.js.map +0 -1
  126. package/dist/commands/setup-org.d.ts +0 -6
  127. package/dist/commands/setup-org.js +0 -99
  128. package/dist/commands/setup-org.js.map +0 -1
  129. package/dist/commands/telemetry.d.ts +0 -3
  130. package/dist/commands/telemetry.js +0 -88
  131. package/dist/commands/telemetry.js.map +0 -1
  132. package/dist/commands/uninstall-skill.d.ts +0 -11
  133. package/dist/commands/uninstall-skill.js +0 -117
  134. package/dist/commands/uninstall-skill.js.map +0 -1
  135. package/dist/commands/user.d.ts +0 -19
  136. package/dist/commands/user.js +0 -92
  137. package/dist/commands/user.js.map +0 -1
  138. package/dist/commands/vault-run.d.ts +0 -13
  139. package/dist/commands/vault-run.js +0 -194
  140. package/dist/commands/vault-run.js.map +0 -1
  141. package/dist/commands/vault.d.ts +0 -25
  142. package/dist/commands/vault.js +0 -153
  143. package/dist/commands/vault.js.map +0 -1
  144. package/dist/commands/webhook.d.ts +0 -3
  145. package/dist/commands/webhook.js +0 -92
  146. package/dist/commands/webhook.js.map +0 -1
  147. package/dist/craft-pre-release.sh +0 -10
  148. package/dist/dashboard/components/AnimatedLogo.d.ts +0 -8
  149. package/dist/dashboard/components/AnimatedLogo.js +0 -16
  150. package/dist/dashboard/components/AnimatedLogo.js.map +0 -1
  151. package/dist/dashboard/components/CompletionView.d.ts +0 -13
  152. package/dist/dashboard/components/CompletionView.js +0 -25
  153. package/dist/dashboard/components/CompletionView.js.map +0 -1
  154. package/dist/dashboard/components/ConfirmPrompt.d.ts +0 -9
  155. package/dist/dashboard/components/ConfirmPrompt.js +0 -25
  156. package/dist/dashboard/components/ConfirmPrompt.js.map +0 -1
  157. package/dist/dashboard/components/CredentialsForm.d.ts +0 -10
  158. package/dist/dashboard/components/CredentialsForm.js +0 -47
  159. package/dist/dashboard/components/CredentialsForm.js.map +0 -1
  160. package/dist/dashboard/components/Dashboard.d.ts +0 -3
  161. package/dist/dashboard/components/Dashboard.js +0 -100
  162. package/dist/dashboard/components/Dashboard.js.map +0 -1
  163. package/dist/dashboard/components/DashboardLayout.d.ts +0 -24
  164. package/dist/dashboard/components/DashboardLayout.js +0 -25
  165. package/dist/dashboard/components/DashboardLayout.js.map +0 -1
  166. package/dist/dashboard/components/DiffPanel.d.ts +0 -9
  167. package/dist/dashboard/components/DiffPanel.js +0 -136
  168. package/dist/dashboard/components/DiffPanel.js.map +0 -1
  169. package/dist/dashboard/components/InlinePrompt.d.ts +0 -8
  170. package/dist/dashboard/components/InlinePrompt.js +0 -19
  171. package/dist/dashboard/components/InlinePrompt.js.map +0 -1
  172. package/dist/dashboard/components/OutputPanel.d.ts +0 -10
  173. package/dist/dashboard/components/OutputPanel.js +0 -100
  174. package/dist/dashboard/components/OutputPanel.js.map +0 -1
  175. package/dist/dashboard/components/Panel.d.ts +0 -12
  176. package/dist/dashboard/components/Panel.js +0 -6
  177. package/dist/dashboard/components/Panel.js.map +0 -1
  178. package/dist/dashboard/components/TextInput.d.ts +0 -13
  179. package/dist/dashboard/components/TextInput.js +0 -57
  180. package/dist/dashboard/components/TextInput.js.map +0 -1
  181. package/dist/dashboard/components/WelcomeArt.d.ts +0 -2
  182. package/dist/dashboard/components/WelcomeArt.js +0 -9
  183. package/dist/dashboard/components/WelcomeArt.js.map +0 -1
  184. package/dist/dashboard/hooks/useAnimation.d.ts +0 -7
  185. package/dist/dashboard/hooks/useAnimation.js +0 -24
  186. package/dist/dashboard/hooks/useAnimation.js.map +0 -1
  187. package/dist/dashboard/hooks/useKeyboard.d.ts +0 -8
  188. package/dist/dashboard/hooks/useKeyboard.js +0 -18
  189. package/dist/dashboard/hooks/useKeyboard.js.map +0 -1
  190. package/dist/dashboard/hooks/useTerminalSize.d.ts +0 -8
  191. package/dist/dashboard/hooks/useTerminalSize.js +0 -23
  192. package/dist/dashboard/hooks/useTerminalSize.js.map +0 -1
  193. package/dist/dashboard/index.d.ts +0 -6
  194. package/dist/dashboard/index.js +0 -36
  195. package/dist/dashboard/index.js.map +0 -1
  196. package/dist/dashboard/lib/diff-utils.d.ts +0 -21
  197. package/dist/dashboard/lib/diff-utils.js +0 -271
  198. package/dist/dashboard/lib/diff-utils.js.map +0 -1
  199. package/dist/dashboard/lib/logo-frames.d.ts +0 -20
  200. package/dist/dashboard/lib/logo-frames.js +0 -109
  201. package/dist/dashboard/lib/logo-frames.js.map +0 -1
  202. package/dist/dashboard/lib/welcome-art.d.ts +0 -1
  203. package/dist/dashboard/lib/welcome-art.js +0 -5
  204. package/dist/dashboard/lib/welcome-art.js.map +0 -1
  205. package/dist/dashboard/types.d.ts +0 -5
  206. package/dist/dashboard/types.js +0 -2
  207. package/dist/dashboard/types.js.map +0 -1
  208. package/dist/doctor/agent-prompt.d.ts +0 -10
  209. package/dist/doctor/agent-prompt.js +0 -190
  210. package/dist/doctor/agent-prompt.js.map +0 -1
  211. package/dist/doctor/checks/ai-analysis.d.ts +0 -9
  212. package/dist/doctor/checks/ai-analysis.js +0 -124
  213. package/dist/doctor/checks/ai-analysis.js.map +0 -1
  214. package/dist/doctor/checks/auth-patterns.d.ts +0 -2
  215. package/dist/doctor/checks/auth-patterns.js +0 -569
  216. package/dist/doctor/checks/auth-patterns.js.map +0 -1
  217. package/dist/doctor/checks/connectivity.d.ts +0 -2
  218. package/dist/doctor/checks/connectivity.js +0 -35
  219. package/dist/doctor/checks/connectivity.js.map +0 -1
  220. package/dist/doctor/checks/dashboard.d.ts +0 -3
  221. package/dist/doctor/checks/dashboard.js +0 -123
  222. package/dist/doctor/checks/dashboard.js.map +0 -1
  223. package/dist/doctor/checks/environment.d.ts +0 -2
  224. package/dist/doctor/checks/environment.js +0 -86
  225. package/dist/doctor/checks/environment.js.map +0 -1
  226. package/dist/doctor/checks/framework.d.ts +0 -2
  227. package/dist/doctor/checks/framework.js +0 -94
  228. package/dist/doctor/checks/framework.js.map +0 -1
  229. package/dist/doctor/checks/host-execution.d.ts +0 -2
  230. package/dist/doctor/checks/host-execution.js +0 -21
  231. package/dist/doctor/checks/host-execution.js.map +0 -1
  232. package/dist/doctor/checks/language.d.ts +0 -6
  233. package/dist/doctor/checks/language.js +0 -104
  234. package/dist/doctor/checks/language.js.map +0 -1
  235. package/dist/doctor/checks/mcp.d.ts +0 -15
  236. package/dist/doctor/checks/mcp.js +0 -34
  237. package/dist/doctor/checks/mcp.js.map +0 -1
  238. package/dist/doctor/checks/runtime.d.ts +0 -2
  239. package/dist/doctor/checks/runtime.js +0 -20
  240. package/dist/doctor/checks/runtime.js.map +0 -1
  241. package/dist/doctor/checks/sdk.d.ts +0 -2
  242. package/dist/doctor/checks/sdk.js +0 -192
  243. package/dist/doctor/checks/sdk.js.map +0 -1
  244. package/dist/doctor/checks/skills.d.ts +0 -9
  245. package/dist/doctor/checks/skills.js +0 -84
  246. package/dist/doctor/checks/skills.js.map +0 -1
  247. package/dist/doctor/clipboard.d.ts +0 -1
  248. package/dist/doctor/clipboard.js +0 -43
  249. package/dist/doctor/clipboard.js.map +0 -1
  250. package/dist/doctor/index.d.ts +0 -26
  251. package/dist/doctor/index.js +0 -182
  252. package/dist/doctor/index.js.map +0 -1
  253. package/dist/doctor/issues.d.ts +0 -63
  254. package/dist/doctor/issues.js +0 -198
  255. package/dist/doctor/issues.js.map +0 -1
  256. package/dist/doctor/json-output.d.ts +0 -2
  257. package/dist/doctor/json-output.js +0 -4
  258. package/dist/doctor/json-output.js.map +0 -1
  259. package/dist/doctor/output.d.ts +0 -7
  260. package/dist/doctor/output.js +0 -288
  261. package/dist/doctor/output.js.map +0 -1
  262. package/dist/doctor/types.d.ts +0 -203
  263. package/dist/doctor/types.js +0 -2
  264. package/dist/doctor/types.js.map +0 -1
  265. package/dist/emulate/core/id.d.ts +0 -48
  266. package/dist/emulate/core/id.js +0 -73
  267. package/dist/emulate/core/id.js.map +0 -1
  268. package/dist/emulate/core/index.d.ts +0 -8
  269. package/dist/emulate/core/index.js +0 -8
  270. package/dist/emulate/core/index.js.map +0 -1
  271. package/dist/emulate/core/jwt.d.ts +0 -28
  272. package/dist/emulate/core/jwt.js +0 -78
  273. package/dist/emulate/core/jwt.js.map +0 -1
  274. package/dist/emulate/core/middleware/auth.d.ts +0 -15
  275. package/dist/emulate/core/middleware/auth.js +0 -17
  276. package/dist/emulate/core/middleware/auth.js.map +0 -1
  277. package/dist/emulate/core/middleware/error-handler.d.ts +0 -22
  278. package/dist/emulate/core/middleware/error-handler.js +0 -72
  279. package/dist/emulate/core/middleware/error-handler.js.map +0 -1
  280. package/dist/emulate/core/pagination.d.ts +0 -27
  281. package/dist/emulate/core/pagination.js +0 -43
  282. package/dist/emulate/core/pagination.js.map +0 -1
  283. package/dist/emulate/core/plugin.d.ts +0 -15
  284. package/dist/emulate/core/plugin.js +0 -2
  285. package/dist/emulate/core/plugin.js.map +0 -1
  286. package/dist/emulate/core/server.d.ts +0 -17
  287. package/dist/emulate/core/server.js +0 -90
  288. package/dist/emulate/core/server.js.map +0 -1
  289. package/dist/emulate/core/store.d.ts +0 -44
  290. package/dist/emulate/core/store.js +0 -169
  291. package/dist/emulate/core/store.js.map +0 -1
  292. package/dist/emulate/index.d.ts +0 -25
  293. package/dist/emulate/index.js +0 -47
  294. package/dist/emulate/index.js.map +0 -1
  295. package/dist/emulate/workos/constants.d.ts +0 -56
  296. package/dist/emulate/workos/constants.js +0 -56
  297. package/dist/emulate/workos/constants.js.map +0 -1
  298. package/dist/emulate/workos/entities.d.ts +0 -360
  299. package/dist/emulate/workos/entities.js +0 -2
  300. package/dist/emulate/workos/entities.js.map +0 -1
  301. package/dist/emulate/workos/event-bus.d.ts +0 -17
  302. package/dist/emulate/workos/event-bus.js +0 -70
  303. package/dist/emulate/workos/event-bus.js.map +0 -1
  304. package/dist/emulate/workos/helpers.d.ts +0 -72
  305. package/dist/emulate/workos/helpers.js +0 -211
  306. package/dist/emulate/workos/helpers.js.map +0 -1
  307. package/dist/emulate/workos/index.d.ts +0 -93
  308. package/dist/emulate/workos/index.js +0 -326
  309. package/dist/emulate/workos/index.js.map +0 -1
  310. package/dist/emulate/workos/role-helpers.d.ts +0 -21
  311. package/dist/emulate/workos/role-helpers.js +0 -130
  312. package/dist/emulate/workos/role-helpers.js.map +0 -1
  313. package/dist/emulate/workos/routes/api-keys.d.ts +0 -2
  314. package/dist/emulate/workos/routes/api-keys.js +0 -32
  315. package/dist/emulate/workos/routes/api-keys.js.map +0 -1
  316. package/dist/emulate/workos/routes/audit-logs.d.ts +0 -2
  317. package/dist/emulate/workos/routes/audit-logs.js +0 -104
  318. package/dist/emulate/workos/routes/audit-logs.js.map +0 -1
  319. package/dist/emulate/workos/routes/auth-challenges.d.ts +0 -2
  320. package/dist/emulate/workos/routes/auth-challenges.js +0 -51
  321. package/dist/emulate/workos/routes/auth-challenges.js.map +0 -1
  322. package/dist/emulate/workos/routes/auth-factors.d.ts +0 -2
  323. package/dist/emulate/workos/routes/auth-factors.js +0 -51
  324. package/dist/emulate/workos/routes/auth-factors.js.map +0 -1
  325. package/dist/emulate/workos/routes/auth.d.ts +0 -2
  326. package/dist/emulate/workos/routes/auth.js +0 -350
  327. package/dist/emulate/workos/routes/auth.js.map +0 -1
  328. package/dist/emulate/workos/routes/authorization-checks.d.ts +0 -10
  329. package/dist/emulate/workos/routes/authorization-checks.js +0 -123
  330. package/dist/emulate/workos/routes/authorization-checks.js.map +0 -1
  331. package/dist/emulate/workos/routes/authorization-org-roles.d.ts +0 -2
  332. package/dist/emulate/workos/routes/authorization-org-roles.js +0 -64
  333. package/dist/emulate/workos/routes/authorization-org-roles.js.map +0 -1
  334. package/dist/emulate/workos/routes/authorization-permissions.d.ts +0 -2
  335. package/dist/emulate/workos/routes/authorization-permissions.js +0 -67
  336. package/dist/emulate/workos/routes/authorization-permissions.js.map +0 -1
  337. package/dist/emulate/workos/routes/authorization-resources.d.ts +0 -2
  338. package/dist/emulate/workos/routes/authorization-resources.js +0 -117
  339. package/dist/emulate/workos/routes/authorization-resources.js.map +0 -1
  340. package/dist/emulate/workos/routes/authorization-roles.d.ts +0 -2
  341. package/dist/emulate/workos/routes/authorization-roles.js +0 -13
  342. package/dist/emulate/workos/routes/authorization-roles.js.map +0 -1
  343. package/dist/emulate/workos/routes/config.d.ts +0 -2
  344. package/dist/emulate/workos/routes/config.js +0 -57
  345. package/dist/emulate/workos/routes/config.js.map +0 -1
  346. package/dist/emulate/workos/routes/connect.d.ts +0 -2
  347. package/dist/emulate/workos/routes/connect.js +0 -65
  348. package/dist/emulate/workos/routes/connect.js.map +0 -1
  349. package/dist/emulate/workos/routes/connections.d.ts +0 -2
  350. package/dist/emulate/workos/routes/connections.js +0 -73
  351. package/dist/emulate/workos/routes/connections.js.map +0 -1
  352. package/dist/emulate/workos/routes/data-integrations.d.ts +0 -2
  353. package/dist/emulate/workos/routes/data-integrations.js +0 -55
  354. package/dist/emulate/workos/routes/data-integrations.js.map +0 -1
  355. package/dist/emulate/workos/routes/directories.d.ts +0 -2
  356. package/dist/emulate/workos/routes/directories.js +0 -90
  357. package/dist/emulate/workos/routes/directories.js.map +0 -1
  358. package/dist/emulate/workos/routes/email-verification.d.ts +0 -2
  359. package/dist/emulate/workos/routes/email-verification.js +0 -49
  360. package/dist/emulate/workos/routes/email-verification.js.map +0 -1
  361. package/dist/emulate/workos/routes/events.d.ts +0 -2
  362. package/dist/emulate/workos/routes/events.js +0 -18
  363. package/dist/emulate/workos/routes/events.js.map +0 -1
  364. package/dist/emulate/workos/routes/feature-flags.d.ts +0 -2
  365. package/dist/emulate/workos/routes/feature-flags.js +0 -103
  366. package/dist/emulate/workos/routes/feature-flags.js.map +0 -1
  367. package/dist/emulate/workos/routes/invitations.d.ts +0 -2
  368. package/dist/emulate/workos/routes/invitations.js +0 -122
  369. package/dist/emulate/workos/routes/invitations.js.map +0 -1
  370. package/dist/emulate/workos/routes/legacy-mfa.d.ts +0 -2
  371. package/dist/emulate/workos/routes/legacy-mfa.js +0 -75
  372. package/dist/emulate/workos/routes/legacy-mfa.js.map +0 -1
  373. package/dist/emulate/workos/routes/magic-auth.d.ts +0 -2
  374. package/dist/emulate/workos/routes/magic-auth.js +0 -32
  375. package/dist/emulate/workos/routes/magic-auth.js.map +0 -1
  376. package/dist/emulate/workos/routes/memberships.d.ts +0 -2
  377. package/dist/emulate/workos/routes/memberships.js +0 -114
  378. package/dist/emulate/workos/routes/memberships.js.map +0 -1
  379. package/dist/emulate/workos/routes/organization-domains.d.ts +0 -2
  380. package/dist/emulate/workos/routes/organization-domains.js +0 -58
  381. package/dist/emulate/workos/routes/organization-domains.js.map +0 -1
  382. package/dist/emulate/workos/routes/organizations.d.ts +0 -2
  383. package/dist/emulate/workos/routes/organizations.js +0 -131
  384. package/dist/emulate/workos/routes/organizations.js.map +0 -1
  385. package/dist/emulate/workos/routes/password-reset.d.ts +0 -2
  386. package/dist/emulate/workos/routes/password-reset.js +0 -61
  387. package/dist/emulate/workos/routes/password-reset.js.map +0 -1
  388. package/dist/emulate/workos/routes/pipes.d.ts +0 -2
  389. package/dist/emulate/workos/routes/pipes.js +0 -82
  390. package/dist/emulate/workos/routes/pipes.js.map +0 -1
  391. package/dist/emulate/workos/routes/portal.d.ts +0 -2
  392. package/dist/emulate/workos/routes/portal.js +0 -18
  393. package/dist/emulate/workos/routes/portal.js.map +0 -1
  394. package/dist/emulate/workos/routes/radar.d.ts +0 -2
  395. package/dist/emulate/workos/routes/radar.js +0 -41
  396. package/dist/emulate/workos/routes/radar.js.map +0 -1
  397. package/dist/emulate/workos/routes/sessions.d.ts +0 -2
  398. package/dist/emulate/workos/routes/sessions.js +0 -51
  399. package/dist/emulate/workos/routes/sessions.js.map +0 -1
  400. package/dist/emulate/workos/routes/sso.d.ts +0 -2
  401. package/dist/emulate/workos/routes/sso.js +0 -161
  402. package/dist/emulate/workos/routes/sso.js.map +0 -1
  403. package/dist/emulate/workos/routes/user-features.d.ts +0 -2
  404. package/dist/emulate/workos/routes/user-features.js +0 -50
  405. package/dist/emulate/workos/routes/user-features.js.map +0 -1
  406. package/dist/emulate/workos/routes/users.d.ts +0 -2
  407. package/dist/emulate/workos/routes/users.js +0 -129
  408. package/dist/emulate/workos/routes/users.js.map +0 -1
  409. package/dist/emulate/workos/routes/webhook-endpoints.d.ts +0 -2
  410. package/dist/emulate/workos/routes/webhook-endpoints.js +0 -67
  411. package/dist/emulate/workos/routes/webhook-endpoints.js.map +0 -1
  412. package/dist/emulate/workos/routes/widgets.d.ts +0 -2
  413. package/dist/emulate/workos/routes/widgets.js +0 -27
  414. package/dist/emulate/workos/routes/widgets.js.map +0 -1
  415. package/dist/emulate/workos/store.d.ts +0 -48
  416. package/dist/emulate/workos/store.js +0 -102
  417. package/dist/emulate/workos/store.js.map +0 -1
  418. package/dist/emulate/workos/webhook-signer.d.ts +0 -1
  419. package/dist/emulate/workos/webhook-signer.js +0 -8
  420. package/dist/emulate/workos/webhook-signer.js.map +0 -1
  421. package/dist/gen-routes-lib.spec.ts +0 -659
  422. package/dist/gen-routes-lib.ts +0 -647
  423. package/dist/gen-routes.ts +0 -96
  424. package/dist/integrations/dotnet/index.d.ts +0 -8
  425. package/dist/integrations/dotnet/index.js +0 -170
  426. package/dist/integrations/dotnet/index.js.map +0 -1
  427. package/dist/integrations/elixir/index.d.ts +0 -8
  428. package/dist/integrations/elixir/index.js +0 -146
  429. package/dist/integrations/elixir/index.js.map +0 -1
  430. package/dist/integrations/go/index.d.ts +0 -11
  431. package/dist/integrations/go/index.js +0 -212
  432. package/dist/integrations/go/index.js.map +0 -1
  433. package/dist/integrations/kotlin/index.d.ts +0 -4
  434. package/dist/integrations/kotlin/index.js +0 -78
  435. package/dist/integrations/kotlin/index.js.map +0 -1
  436. package/dist/integrations/nextjs/index.d.ts +0 -4
  437. package/dist/integrations/nextjs/index.js +0 -90
  438. package/dist/integrations/nextjs/index.js.map +0 -1
  439. package/dist/integrations/nextjs/utils.d.ts +0 -8
  440. package/dist/integrations/nextjs/utils.js +0 -53
  441. package/dist/integrations/nextjs/utils.js.map +0 -1
  442. package/dist/integrations/node/index.d.ts +0 -4
  443. package/dist/integrations/node/index.js +0 -52
  444. package/dist/integrations/node/index.js.map +0 -1
  445. package/dist/integrations/php/index.d.ts +0 -4
  446. package/dist/integrations/php/index.js +0 -51
  447. package/dist/integrations/php/index.js.map +0 -1
  448. package/dist/integrations/php-laravel/index.d.ts +0 -4
  449. package/dist/integrations/php-laravel/index.js +0 -51
  450. package/dist/integrations/php-laravel/index.js.map +0 -1
  451. package/dist/integrations/python/index.d.ts +0 -9
  452. package/dist/integrations/python/index.js +0 -249
  453. package/dist/integrations/python/index.js.map +0 -1
  454. package/dist/integrations/react/index.d.ts +0 -4
  455. package/dist/integrations/react/index.js +0 -49
  456. package/dist/integrations/react/index.js.map +0 -1
  457. package/dist/integrations/react-router/index.d.ts +0 -4
  458. package/dist/integrations/react-router/index.js +0 -94
  459. package/dist/integrations/react-router/index.js.map +0 -1
  460. package/dist/integrations/react-router/utils.d.ts +0 -10
  461. package/dist/integrations/react-router/utils.js +0 -146
  462. package/dist/integrations/react-router/utils.js.map +0 -1
  463. package/dist/integrations/ruby/index.d.ts +0 -8
  464. package/dist/integrations/ruby/index.js +0 -137
  465. package/dist/integrations/ruby/index.js.map +0 -1
  466. package/dist/integrations/sveltekit/index.d.ts +0 -4
  467. package/dist/integrations/sveltekit/index.js +0 -50
  468. package/dist/integrations/sveltekit/index.js.map +0 -1
  469. package/dist/integrations/tanstack-start/index.d.ts +0 -4
  470. package/dist/integrations/tanstack-start/index.js +0 -51
  471. package/dist/integrations/tanstack-start/index.js.map +0 -1
  472. package/dist/integrations/vanilla-js/index.d.ts +0 -4
  473. package/dist/integrations/vanilla-js/index.js +0 -49
  474. package/dist/integrations/vanilla-js/index.js.map +0 -1
  475. package/dist/lib/__test-helpers__/mock-unclaimed-env-api-error.d.ts +0 -7
  476. package/dist/lib/__test-helpers__/mock-unclaimed-env-api-error.js +0 -12
  477. package/dist/lib/__test-helpers__/mock-unclaimed-env-api-error.js.map +0 -1
  478. package/dist/lib/adapters/cli-adapter.d.ts +0 -84
  479. package/dist/lib/adapters/cli-adapter.js +0 -525
  480. package/dist/lib/adapters/cli-adapter.js.map +0 -1
  481. package/dist/lib/adapters/dashboard-adapter.d.ts +0 -34
  482. package/dist/lib/adapters/dashboard-adapter.js +0 -121
  483. package/dist/lib/adapters/dashboard-adapter.js.map +0 -1
  484. package/dist/lib/adapters/headless-adapter.d.ts +0 -73
  485. package/dist/lib/adapters/headless-adapter.js +0 -310
  486. package/dist/lib/adapters/headless-adapter.js.map +0 -1
  487. package/dist/lib/adapters/index.d.ts +0 -4
  488. package/dist/lib/adapters/index.js +0 -4
  489. package/dist/lib/adapters/index.js.map +0 -1
  490. package/dist/lib/adapters/types.d.ts +0 -41
  491. package/dist/lib/adapters/types.js +0 -2
  492. package/dist/lib/adapters/types.js.map +0 -1
  493. package/dist/lib/agent-interface.d.ts +0 -84
  494. package/dist/lib/agent-interface.js +0 -826
  495. package/dist/lib/agent-interface.js.map +0 -1
  496. package/dist/lib/agent-runner.d.ts +0 -9
  497. package/dist/lib/agent-runner.js +0 -261
  498. package/dist/lib/agent-runner.js.map +0 -1
  499. package/dist/lib/ai-content.d.ts +0 -14
  500. package/dist/lib/ai-content.js +0 -131
  501. package/dist/lib/ai-content.js.map +0 -1
  502. package/dist/lib/api-error-handler.d.ts +0 -18
  503. package/dist/lib/api-error-handler.js +0 -76
  504. package/dist/lib/api-error-handler.js.map +0 -1
  505. package/dist/lib/api-key.d.ts +0 -14
  506. package/dist/lib/api-key.js +0 -36
  507. package/dist/lib/api-key.js.map +0 -1
  508. package/dist/lib/api.d.ts +0 -25
  509. package/dist/lib/api.js +0 -120
  510. package/dist/lib/api.js.map +0 -1
  511. package/dist/lib/background-refresh.d.ts +0 -29
  512. package/dist/lib/background-refresh.js +0 -95
  513. package/dist/lib/background-refresh.js.map +0 -1
  514. package/dist/lib/command-aliases.d.ts +0 -8
  515. package/dist/lib/command-aliases.js +0 -12
  516. package/dist/lib/command-aliases.js.map +0 -1
  517. package/dist/lib/config-store.d.ts +0 -50
  518. package/dist/lib/config-store.js +0 -269
  519. package/dist/lib/config-store.js.map +0 -1
  520. package/dist/lib/config.d.ts +0 -34
  521. package/dist/lib/config.js +0 -37
  522. package/dist/lib/config.js.map +0 -1
  523. package/dist/lib/constants.d.ts +0 -43
  524. package/dist/lib/constants.js +0 -42
  525. package/dist/lib/constants.js.map +0 -1
  526. package/dist/lib/credential-discovery.d.ts +0 -42
  527. package/dist/lib/credential-discovery.js +0 -100
  528. package/dist/lib/credential-discovery.js.map +0 -1
  529. package/dist/lib/credential-proxy.d.ts +0 -45
  530. package/dist/lib/credential-proxy.js +0 -364
  531. package/dist/lib/credential-proxy.js.map +0 -1
  532. package/dist/lib/credential-store.d.ts +0 -32
  533. package/dist/lib/credential-store.js +0 -236
  534. package/dist/lib/credential-store.js.map +0 -1
  535. package/dist/lib/credentials.d.ts +0 -13
  536. package/dist/lib/credentials.js +0 -34
  537. package/dist/lib/credentials.js.map +0 -1
  538. package/dist/lib/dev-command.d.ts +0 -26
  539. package/dist/lib/dev-command.js +0 -129
  540. package/dist/lib/dev-command.js.map +0 -1
  541. package/dist/lib/device-auth.d.ts +0 -48
  542. package/dist/lib/device-auth.js +0 -176
  543. package/dist/lib/device-auth.js.map +0 -1
  544. package/dist/lib/device-id.d.ts +0 -25
  545. package/dist/lib/device-id.js +0 -102
  546. package/dist/lib/device-id.js.map +0 -1
  547. package/dist/lib/ensure-auth.d.ts +0 -12
  548. package/dist/lib/ensure-auth.js +0 -111
  549. package/dist/lib/ensure-auth.js.map +0 -1
  550. package/dist/lib/env-writer.d.ts +0 -25
  551. package/dist/lib/env-writer.js +0 -90
  552. package/dist/lib/env-writer.js.map +0 -1
  553. package/dist/lib/events.d.ts +0 -215
  554. package/dist/lib/events.js +0 -19
  555. package/dist/lib/events.js.map +0 -1
  556. package/dist/lib/framework-config.d.ts +0 -127
  557. package/dist/lib/framework-config.js +0 -11
  558. package/dist/lib/framework-config.js.map +0 -1
  559. package/dist/lib/helper-functions.d.ts +0 -1
  560. package/dist/lib/helper-functions.js +0 -2
  561. package/dist/lib/helper-functions.js.map +0 -1
  562. package/dist/lib/host-probe.d.ts +0 -28
  563. package/dist/lib/host-probe.js +0 -154
  564. package/dist/lib/host-probe.js.map +0 -1
  565. package/dist/lib/installer-core.d.ts +0 -556
  566. package/dist/lib/installer-core.js +0 -1115
  567. package/dist/lib/installer-core.js.map +0 -1
  568. package/dist/lib/installer-core.types.d.ts +0 -160
  569. package/dist/lib/installer-core.types.js +0 -2
  570. package/dist/lib/installer-core.types.js.map +0 -1
  571. package/dist/lib/mcp-clients.d.ts +0 -39
  572. package/dist/lib/mcp-clients.js +0 -284
  573. package/dist/lib/mcp-clients.js.map +0 -1
  574. package/dist/lib/mcp-notice.d.ts +0 -72
  575. package/dist/lib/mcp-notice.js +0 -275
  576. package/dist/lib/mcp-notice.js.map +0 -1
  577. package/dist/lib/port-detection.d.ts +0 -7
  578. package/dist/lib/port-detection.js +0 -238
  579. package/dist/lib/port-detection.js.map +0 -1
  580. package/dist/lib/post-install.d.ts +0 -8
  581. package/dist/lib/post-install.js +0 -51
  582. package/dist/lib/post-install.js.map +0 -1
  583. package/dist/lib/preferences.d.ts +0 -115
  584. package/dist/lib/preferences.js +0 -201
  585. package/dist/lib/preferences.js.map +0 -1
  586. package/dist/lib/progress-tracker.d.ts +0 -22
  587. package/dist/lib/progress-tracker.js +0 -47
  588. package/dist/lib/progress-tracker.js.map +0 -1
  589. package/dist/lib/registry.d.ts +0 -42
  590. package/dist/lib/registry.js +0 -96
  591. package/dist/lib/registry.js.map +0 -1
  592. package/dist/lib/resolve-install-credentials.d.ts +0 -11
  593. package/dist/lib/resolve-install-credentials.js +0 -53
  594. package/dist/lib/resolve-install-credentials.js.map +0 -1
  595. package/dist/lib/run-with-core.d.ts +0 -7
  596. package/dist/lib/run-with-core.js +0 -522
  597. package/dist/lib/run-with-core.js.map +0 -1
  598. package/dist/lib/safe-tools.d.ts +0 -2
  599. package/dist/lib/safe-tools.js +0 -212
  600. package/dist/lib/safe-tools.js.map +0 -1
  601. package/dist/lib/scaffold/index.d.ts +0 -1
  602. package/dist/lib/scaffold/index.js +0 -2
  603. package/dist/lib/scaffold/index.js.map +0 -1
  604. package/dist/lib/scaffold/scaffold.d.ts +0 -66
  605. package/dist/lib/scaffold/scaffold.js +0 -156
  606. package/dist/lib/scaffold/scaffold.js.map +0 -1
  607. package/dist/lib/settings.d.ts +0 -60
  608. package/dist/lib/settings.js +0 -31
  609. package/dist/lib/settings.js.map +0 -1
  610. package/dist/lib/staging-api.d.ts +0 -22
  611. package/dist/lib/staging-api.js +0 -74
  612. package/dist/lib/staging-api.js.map +0 -1
  613. package/dist/lib/startup-notice-gate.d.ts +0 -21
  614. package/dist/lib/startup-notice-gate.js +0 -29
  615. package/dist/lib/startup-notice-gate.js.map +0 -1
  616. package/dist/lib/telemetry-notice.d.ts +0 -25
  617. package/dist/lib/telemetry-notice.js +0 -59
  618. package/dist/lib/telemetry-notice.js.map +0 -1
  619. package/dist/lib/token-refresh-client.d.ts +0 -23
  620. package/dist/lib/token-refresh-client.js +0 -89
  621. package/dist/lib/token-refresh-client.js.map +0 -1
  622. package/dist/lib/token-refresh.d.ts +0 -12
  623. package/dist/lib/token-refresh.js +0 -27
  624. package/dist/lib/token-refresh.js.map +0 -1
  625. package/dist/lib/unclaimed-env-api.d.ts +0 -42
  626. package/dist/lib/unclaimed-env-api.js +0 -139
  627. package/dist/lib/unclaimed-env-api.js.map +0 -1
  628. package/dist/lib/unclaimed-env-provision.d.ts +0 -24
  629. package/dist/lib/unclaimed-env-provision.js +0 -77
  630. package/dist/lib/unclaimed-env-provision.js.map +0 -1
  631. package/dist/lib/unclaimed-warning.d.ts +0 -15
  632. package/dist/lib/unclaimed-warning.js +0 -77
  633. package/dist/lib/unclaimed-warning.js.map +0 -1
  634. package/dist/lib/validation/build-validator.d.ts +0 -21
  635. package/dist/lib/validation/build-validator.js +0 -153
  636. package/dist/lib/validation/build-validator.js.map +0 -1
  637. package/dist/lib/validation/index.d.ts +0 -4
  638. package/dist/lib/validation/index.js +0 -4
  639. package/dist/lib/validation/index.js.map +0 -1
  640. package/dist/lib/validation/quick-checks.d.ts +0 -19
  641. package/dist/lib/validation/quick-checks.js +0 -192
  642. package/dist/lib/validation/quick-checks.js.map +0 -1
  643. package/dist/lib/validation/security-checks.d.ts +0 -35
  644. package/dist/lib/validation/security-checks.js +0 -105
  645. package/dist/lib/validation/security-checks.js.map +0 -1
  646. package/dist/lib/validation/types.d.ts +0 -56
  647. package/dist/lib/validation/types.js +0 -2
  648. package/dist/lib/validation/types.js.map +0 -1
  649. package/dist/lib/validation/validator.d.ts +0 -13
  650. package/dist/lib/validation/validator.js +0 -684
  651. package/dist/lib/validation/validator.js.map +0 -1
  652. package/dist/lib/version-check.d.ts +0 -6
  653. package/dist/lib/version-check.js +0 -46
  654. package/dist/lib/version-check.js.map +0 -1
  655. package/dist/lib/workos-api.d.ts +0 -30
  656. package/dist/lib/workos-api.js +0 -69
  657. package/dist/lib/workos-api.js.map +0 -1
  658. package/dist/lib/workos-client.d.ts +0 -58
  659. package/dist/lib/workos-client.js +0 -140
  660. package/dist/lib/workos-client.js.map +0 -1
  661. package/dist/lib/workos-management.d.ts +0 -32
  662. package/dist/lib/workos-management.js +0 -142
  663. package/dist/lib/workos-management.js.map +0 -1
  664. package/dist/nextjs/nextjs-installer-agent.d.ts +0 -5
  665. package/dist/nextjs/nextjs-installer-agent.js +0 -6
  666. package/dist/nextjs/nextjs-installer-agent.js.map +0 -1
  667. package/dist/nextjs/utils.d.ts +0 -4
  668. package/dist/nextjs/utils.js +0 -5
  669. package/dist/nextjs/utils.js.map +0 -1
  670. package/dist/react/react-installer-agent.d.ts +0 -4
  671. package/dist/react/react-installer-agent.js +0 -5
  672. package/dist/react/react-installer-agent.js.map +0 -1
  673. package/dist/react-router/react-router-installer-agent.d.ts +0 -4
  674. package/dist/react-router/react-router-installer-agent.js +0 -5
  675. package/dist/react-router/react-router-installer-agent.js.map +0 -1
  676. package/dist/react-router/utils.d.ts +0 -4
  677. package/dist/react-router/utils.js +0 -5
  678. package/dist/react-router/utils.js.map +0 -1
  679. package/dist/run.d.ts +0 -32
  680. package/dist/run.js +0 -54
  681. package/dist/run.js.map +0 -1
  682. package/dist/smoke-test.ts +0 -881
  683. package/dist/steps/add-or-update-environment-variables.d.ts +0 -10
  684. package/dist/steps/add-or-update-environment-variables.js +0 -155
  685. package/dist/steps/add-or-update-environment-variables.js.map +0 -1
  686. package/dist/steps/index.d.ts +0 -3
  687. package/dist/steps/index.js +0 -4
  688. package/dist/steps/index.js.map +0 -1
  689. package/dist/steps/run-prettier.d.ts +0 -5
  690. package/dist/steps/run-prettier.js +0 -50
  691. package/dist/steps/run-prettier.js.map +0 -1
  692. package/dist/steps/upload-environment-variables/EnvironmentProvider.d.ts +0 -8
  693. package/dist/steps/upload-environment-variables/EnvironmentProvider.js +0 -7
  694. package/dist/steps/upload-environment-variables/EnvironmentProvider.js.map +0 -1
  695. package/dist/steps/upload-environment-variables/index.d.ts +0 -6
  696. package/dist/steps/upload-environment-variables/index.js +0 -57
  697. package/dist/steps/upload-environment-variables/index.js.map +0 -1
  698. package/dist/steps/upload-environment-variables/providers/vercel.d.ts +0 -14
  699. package/dist/steps/upload-environment-variables/providers/vercel.js +0 -107
  700. package/dist/steps/upload-environment-variables/providers/vercel.js.map +0 -1
  701. package/dist/tanstack-start/tanstack-start-installer-agent.d.ts +0 -4
  702. package/dist/tanstack-start/tanstack-start-installer-agent.js +0 -5
  703. package/dist/tanstack-start/tanstack-start-installer-agent.js.map +0 -1
  704. package/dist/telemetry.d.ts +0 -2
  705. package/dist/telemetry.js +0 -29
  706. package/dist/telemetry.js.map +0 -1
  707. package/dist/test/force-insecure-storage.d.ts +0 -1
  708. package/dist/test/force-insecure-storage.js +0 -9
  709. package/dist/test/force-insecure-storage.js.map +0 -1
  710. package/dist/test/setup.d.ts +0 -1
  711. package/dist/test/setup.js +0 -38
  712. package/dist/test/setup.js.map +0 -1
  713. package/dist/utils/analytics.d.ts +0 -66
  714. package/dist/utils/analytics.js +0 -330
  715. package/dist/utils/analytics.js.map +0 -1
  716. package/dist/utils/bash.d.ts +0 -2
  717. package/dist/utils/bash.js +0 -17
  718. package/dist/utils/bash.js.map +0 -1
  719. package/dist/utils/box.d.ts +0 -33
  720. package/dist/utils/box.js +0 -102
  721. package/dist/utils/box.js.map +0 -1
  722. package/dist/utils/clack-utils.d.ts +0 -97
  723. package/dist/utils/clack-utils.js +0 -422
  724. package/dist/utils/clack-utils.js.map +0 -1
  725. package/dist/utils/clack.d.ts +0 -5
  726. package/dist/utils/clack.js +0 -34
  727. package/dist/utils/clack.js.map +0 -1
  728. package/dist/utils/cli-exit.d.ts +0 -15
  729. package/dist/utils/cli-exit.js +0 -11
  730. package/dist/utils/cli-exit.js.map +0 -1
  731. package/dist/utils/cli-symbols.d.ts +0 -32
  732. package/dist/utils/cli-symbols.js +0 -46
  733. package/dist/utils/cli-symbols.js.map +0 -1
  734. package/dist/utils/command-invocation.d.ts +0 -10
  735. package/dist/utils/command-invocation.js +0 -26
  736. package/dist/utils/command-invocation.js.map +0 -1
  737. package/dist/utils/command-telemetry.d.ts +0 -17
  738. package/dist/utils/command-telemetry.js +0 -67
  739. package/dist/utils/command-telemetry.js.map +0 -1
  740. package/dist/utils/crash-reporter.d.ts +0 -13
  741. package/dist/utils/crash-reporter.js +0 -91
  742. package/dist/utils/crash-reporter.js.map +0 -1
  743. package/dist/utils/debug.d.ts +0 -9
  744. package/dist/utils/debug.js +0 -105
  745. package/dist/utils/debug.js.map +0 -1
  746. package/dist/utils/env-parser.d.ts +0 -5
  747. package/dist/utils/env-parser.js +0 -18
  748. package/dist/utils/env-parser.js.map +0 -1
  749. package/dist/utils/environment.d.ts +0 -10
  750. package/dist/utils/environment.js +0 -69
  751. package/dist/utils/environment.js.map +0 -1
  752. package/dist/utils/errors.d.ts +0 -3
  753. package/dist/utils/errors.js +0 -7
  754. package/dist/utils/errors.js.map +0 -1
  755. package/dist/utils/exec-file.d.ts +0 -15
  756. package/dist/utils/exec-file.js +0 -39
  757. package/dist/utils/exec-file.js.map +0 -1
  758. package/dist/utils/exit-codes.d.ts +0 -31
  759. package/dist/utils/exit-codes.js +0 -69
  760. package/dist/utils/exit-codes.js.map +0 -1
  761. package/dist/utils/git-utils.d.ts +0 -23
  762. package/dist/utils/git-utils.js +0 -86
  763. package/dist/utils/git-utils.js.map +0 -1
  764. package/dist/utils/help-json.d.ts +0 -58
  765. package/dist/utils/help-json.js +0 -1466
  766. package/dist/utils/help-json.js.map +0 -1
  767. package/dist/utils/interaction-mode.d.ts +0 -25
  768. package/dist/utils/interaction-mode.js +0 -99
  769. package/dist/utils/interaction-mode.js.map +0 -1
  770. package/dist/utils/lock-art.d.ts +0 -4
  771. package/dist/utils/lock-art.js +0 -73
  772. package/dist/utils/lock-art.js.map +0 -1
  773. package/dist/utils/logging.d.ts +0 -9
  774. package/dist/utils/logging.js +0 -36
  775. package/dist/utils/logging.js.map +0 -1
  776. package/dist/utils/ndjson.d.ts +0 -16
  777. package/dist/utils/ndjson.js +0 -18
  778. package/dist/utils/ndjson.js.map +0 -1
  779. package/dist/utils/output.d.ts +0 -60
  780. package/dist/utils/output.js +0 -124
  781. package/dist/utils/output.js.map +0 -1
  782. package/dist/utils/package-json.d.ts +0 -26
  783. package/dist/utils/package-json.js +0 -32
  784. package/dist/utils/package-json.js.map +0 -1
  785. package/dist/utils/package-manager.d.ts +0 -21
  786. package/dist/utils/package-manager.js +0 -166
  787. package/dist/utils/package-manager.js.map +0 -1
  788. package/dist/utils/paths.d.ts +0 -5
  789. package/dist/utils/paths.js +0 -18
  790. package/dist/utils/paths.js.map +0 -1
  791. package/dist/utils/platform.d.ts +0 -8
  792. package/dist/utils/platform.js +0 -7
  793. package/dist/utils/platform.js.map +0 -1
  794. package/dist/utils/recovery-hints.d.ts +0 -37
  795. package/dist/utils/recovery-hints.js +0 -80
  796. package/dist/utils/recovery-hints.js.map +0 -1
  797. package/dist/utils/redact.d.ts +0 -5
  798. package/dist/utils/redact.js +0 -29
  799. package/dist/utils/redact.js.map +0 -1
  800. package/dist/utils/register-subcommand.d.ts +0 -10
  801. package/dist/utils/register-subcommand.js +0 -33
  802. package/dist/utils/register-subcommand.js.map +0 -1
  803. package/dist/utils/semver.d.ts +0 -10
  804. package/dist/utils/semver.js +0 -43
  805. package/dist/utils/semver.js.map +0 -1
  806. package/dist/utils/string.d.ts +0 -1
  807. package/dist/utils/string.js +0 -6
  808. package/dist/utils/string.js.map +0 -1
  809. package/dist/utils/summary-box.d.ts +0 -18
  810. package/dist/utils/summary-box.js +0 -148
  811. package/dist/utils/summary-box.js.map +0 -1
  812. package/dist/utils/table.d.ts +0 -5
  813. package/dist/utils/table.js +0 -18
  814. package/dist/utils/table.js.map +0 -1
  815. package/dist/utils/telemetry-client.d.ts +0 -43
  816. package/dist/utils/telemetry-client.js +0 -171
  817. package/dist/utils/telemetry-client.js.map +0 -1
  818. package/dist/utils/telemetry-store-forward.d.ts +0 -11
  819. package/dist/utils/telemetry-store-forward.js +0 -94
  820. package/dist/utils/telemetry-store-forward.js.map +0 -1
  821. package/dist/utils/telemetry-types.d.ts +0 -100
  822. package/dist/utils/telemetry-types.js +0 -6
  823. package/dist/utils/telemetry-types.js.map +0 -1
  824. package/dist/utils/types.d.ts +0 -113
  825. package/dist/utils/types.js +0 -2
  826. package/dist/utils/types.js.map +0 -1
  827. package/dist/utils/urls.d.ts +0 -13
  828. package/dist/utils/urls.js +0 -14
  829. package/dist/utils/urls.js.map +0 -1
  830. package/dist/utils/vendor/is-unicorn-supported.d.ts +0 -1
  831. package/dist/utils/vendor/is-unicorn-supported.js +0 -21
  832. package/dist/utils/vendor/is-unicorn-supported.js.map +0 -1
  833. package/dist/vanilla-js/vanilla-js-installer-agent.d.ts +0 -4
  834. package/dist/vanilla-js/vanilla-js-installer-agent.js +0 -5
  835. package/dist/vanilla-js/vanilla-js-installer-agent.js.map +0 -1
@@ -1,38 +0,0 @@
1
- import { vi } from 'vitest';
2
- /**
3
- * Global test setup — runs before every spec file.
4
- *
5
- * Replaces @napi-rs/keyring with an in-memory implementation so the test
6
- * suite can NEVER touch the real OS keychain. clearCredentials() and
7
- * saveCredentials() operate on the live `workos-cli` keychain entry even when
8
- * file-fallback storage is forced, so an un-mocked spec would wipe a
9
- * developer's real CLI login (this happened — that's why this exists).
10
- *
11
- * Specs that need richer keyring behaviour (e.g. simulating an unavailable
12
- * keychain) still declare their own vi.mock('@napi-rs/keyring', ...); a
13
- * per-file mock overrides this global default. The __IS_TEST_MOCK__ sentinel
14
- * is asserted by src/test/keyring-isolation.spec.ts so removing this setup
15
- * fails CI instead of silently re-arming the footgun.
16
- */
17
- vi.mock('@napi-rs/keyring', () => {
18
- const store = new Map();
19
- return {
20
- __IS_TEST_MOCK__: true,
21
- Entry: class MockEntry {
22
- key;
23
- constructor(service, account) {
24
- this.key = `${service}:${account}`;
25
- }
26
- getPassword() {
27
- return store.get(this.key) ?? null;
28
- }
29
- setPassword(password) {
30
- store.set(this.key, password);
31
- }
32
- deletePassword() {
33
- store.delete(this.key);
34
- }
35
- },
36
- };
37
- });
38
- //# sourceMappingURL=setup.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"setup.js","sourceRoot":"","sources":["../../src/test/setup.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAC;AAE5B;;;;;;;;;;;;;;GAcG;AACH,EAAE,CAAC,IAAI,CAAC,kBAAkB,EAAE,GAAG,EAAE;IAC/B,MAAM,KAAK,GAAG,IAAI,GAAG,EAAkB,CAAC;IACxC,OAAO;QACL,gBAAgB,EAAE,IAAI;QACtB,KAAK,EAAE,MAAM,SAAS;YACZ,GAAG,CAAS;YAEpB,YAAY,OAAe,EAAE,OAAe;gBAC1C,IAAI,CAAC,GAAG,GAAG,GAAG,OAAO,IAAI,OAAO,EAAE,CAAC;YACrC,CAAC;YAED,WAAW;gBACT,OAAO,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,IAAI,CAAC;YACrC,CAAC;YAED,WAAW,CAAC,QAAgB;gBAC1B,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC;YAChC,CAAC;YAED,cAAc;gBACZ,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;YACzB,CAAC;SACF;KACF,CAAC;AACJ,CAAC,CAAC,CAAC","sourcesContent":["import { vi } from 'vitest';\n\n/**\n * Global test setup — runs before every spec file.\n *\n * Replaces @napi-rs/keyring with an in-memory implementation so the test\n * suite can NEVER touch the real OS keychain. clearCredentials() and\n * saveCredentials() operate on the live `workos-cli` keychain entry even when\n * file-fallback storage is forced, so an un-mocked spec would wipe a\n * developer's real CLI login (this happened — that's why this exists).\n *\n * Specs that need richer keyring behaviour (e.g. simulating an unavailable\n * keychain) still declare their own vi.mock('@napi-rs/keyring', ...); a\n * per-file mock overrides this global default. The __IS_TEST_MOCK__ sentinel\n * is asserted by src/test/keyring-isolation.spec.ts so removing this setup\n * fails CI instead of silently re-arming the footgun.\n */\nvi.mock('@napi-rs/keyring', () => {\n const store = new Map<string, string>();\n return {\n __IS_TEST_MOCK__: true,\n Entry: class MockEntry {\n private key: string;\n\n constructor(service: string, account: string) {\n this.key = `${service}:${account}`;\n }\n\n getPassword(): string | null {\n return store.get(this.key) ?? null;\n }\n\n setPassword(password: string): void {\n store.set(this.key, password);\n }\n\n deletePassword(): void {\n store.delete(this.key);\n }\n },\n };\n});\n"]}
@@ -1,66 +0,0 @@
1
- import type { AuthMode, TerminationReason } from './telemetry-types.js';
2
- export declare class Analytics {
3
- private tags;
4
- private sessionId;
5
- private sessionStartTime;
6
- private distinctId?;
7
- private mode?;
8
- private authMode;
9
- private totalInputTokens;
10
- private totalOutputTokens;
11
- private agentIterations;
12
- constructor();
13
- setDistinctId(distinctId: string): void;
14
- setAccessToken(token: string): void;
15
- setApiKeyAuth(apiKey: string): void;
16
- setClaimTokenAuth(clientId: string, claimToken: string): void;
17
- /**
18
- * Set the auth mode explicitly for special cases. Normal CLI flows should use
19
- * `configureAuthFromAvailableSources()` so transport and auth.mode stay aligned.
20
- */
21
- setAuthMode(mode: AuthMode): void;
22
- setGatewayUrl(url: string): void;
23
- private isEnabled;
24
- /**
25
- * Configure telemetry transport and auth.mode from all available CLI auth
26
- * sources. Priority: stored JWT, unclaimed-environment claim token, active
27
- * environment API key, then WORKOS_API_KEY.
28
- */
29
- configureAuthFromAvailableSources(): AuthMode;
30
- /**
31
- * Initialize telemetry for non-installer commands.
32
- * Sets telemetry URL from default config and loads auth credentials.
33
- */
34
- initForNonInstaller(): void;
35
- setTag(key: string, value: string | boolean | number | null | undefined): void;
36
- capture(eventName: string, properties?: Record<string, unknown>): void;
37
- captureException(error: Error, properties?: Record<string, unknown>): void;
38
- getFeatureFlag(_flagKey: string): Promise<string | boolean | undefined>;
39
- /** All capture methods that record error details MUST go through this. */
40
- private extractErrorFields;
41
- private detectCiProvider;
42
- private getEnvFingerprint;
43
- sessionStart(mode: 'cli' | 'tui' | 'headless', version: string): void;
44
- stepCompleted(name: string, durationMs: number, success: boolean, error?: Error): void;
45
- toolCalled(toolName: string, durationMs: number, success: boolean): void;
46
- llmRequest(model: string, inputTokens: number, outputTokens: number): void;
47
- incrementAgentIterations(): void;
48
- emitCommandEvent(name: string, durationMs: number, success: boolean, options?: {
49
- error?: Error;
50
- flags?: string[];
51
- reason?: TerminationReason;
52
- errorCode?: string;
53
- apiContext?: {
54
- status?: number;
55
- code?: string;
56
- resource?: string;
57
- };
58
- extraAttributes?: Record<string, string | number | boolean>;
59
- }): void;
60
- captureUnhandledCrash(error: Error, options?: {
61
- command?: string;
62
- version?: string;
63
- }): void;
64
- shutdown(status: 'success' | 'error' | 'cancelled'): Promise<void>;
65
- }
66
- export declare const analytics: Analytics;
@@ -1,330 +0,0 @@
1
- import os from 'node:os';
2
- import { basename } from 'node:path';
3
- import { v4 as uuidv4 } from 'uuid';
4
- import { debug } from './debug.js';
5
- import { telemetryClient } from './telemetry-client.js';
6
- import { isTelemetryEnabled } from '../lib/preferences.js';
7
- import { getVersion } from '../lib/settings.js';
8
- import { getTelemetryUrl } from './urls.js';
9
- import { getCredentials, isTokenExpired } from '../lib/credentials.js';
10
- import { getActiveEnvironment, isUnclaimedEnvironment } from '../lib/config-store.js';
11
- import { getDeviceId } from '../lib/device-id.js';
12
- import { sanitizeMessage, sanitizeStack } from './crash-reporter.js';
13
- export class Analytics {
14
- tags = {};
15
- sessionId;
16
- sessionStartTime;
17
- distinctId;
18
- mode;
19
- authMode = 'none';
20
- // Agent metrics tracking
21
- totalInputTokens = 0;
22
- totalOutputTokens = 0;
23
- agentIterations = 0;
24
- constructor() {
25
- this.sessionId = uuidv4();
26
- this.sessionStartTime = new Date();
27
- this.tags = { $app_name: 'authkit-installer' };
28
- }
29
- setDistinctId(distinctId) {
30
- this.distinctId = distinctId;
31
- }
32
- setAccessToken(token) {
33
- telemetryClient.setAccessToken(token);
34
- }
35
- setApiKeyAuth(apiKey) {
36
- telemetryClient.setApiKeyAuth(apiKey);
37
- }
38
- setClaimTokenAuth(clientId, claimToken) {
39
- telemetryClient.setClaimTokenAuth(clientId, claimToken);
40
- }
41
- /**
42
- * Set the auth mode explicitly for special cases. Normal CLI flows should use
43
- * `configureAuthFromAvailableSources()` so transport and auth.mode stay aligned.
44
- */
45
- setAuthMode(mode) {
46
- this.authMode = mode;
47
- }
48
- setGatewayUrl(url) {
49
- telemetryClient.setGatewayUrl(url);
50
- }
51
- isEnabled() {
52
- return isTelemetryEnabled();
53
- }
54
- /**
55
- * Configure telemetry transport and auth.mode from all available CLI auth
56
- * sources. Priority: stored JWT, unclaimed-environment claim token, active
57
- * environment API key, then WORKOS_API_KEY.
58
- */
59
- configureAuthFromAvailableSources() {
60
- if (!this.isEnabled())
61
- return this.authMode;
62
- this.authMode = 'none';
63
- const creds = getCredentials();
64
- // Only treat the JWT as usable auth when it is still valid. An expired
65
- // access token would 401 against the telemetry guard and the event would
66
- // be dropped, so fall through to claim-token / api-key auth instead.
67
- if (creds?.accessToken && !isTokenExpired(creds)) {
68
- telemetryClient.setAccessToken(creds.accessToken);
69
- this.authMode = 'jwt';
70
- }
71
- // Preserve identity even when the token is expired.
72
- if (creds?.userId) {
73
- this.distinctId = creds.userId;
74
- }
75
- // Check for unclaimed environment — fall back to claim-token auth
76
- // so unclaimed users' telemetry still reaches the backend.
77
- try {
78
- const env = getActiveEnvironment();
79
- if (env && isUnclaimedEnvironment(env)) {
80
- telemetryClient.setClaimTokenAuth(env.clientId, env.claimToken);
81
- // Tag distinctId so unclaimed sessions are identifiable in analytics
82
- this.distinctId = this.distinctId ?? `unclaimed:${env.clientId}`;
83
- if (this.authMode === 'none')
84
- this.authMode = 'claim_token';
85
- }
86
- else if (env?.apiKey && this.authMode === 'none') {
87
- telemetryClient.setApiKeyAuth(env.apiKey);
88
- if (env.clientId)
89
- this.distinctId = this.distinctId ?? `env:${env.clientId}`;
90
- this.authMode = 'api_key';
91
- }
92
- }
93
- catch {
94
- // Config-store failure is non-fatal for telemetry
95
- }
96
- // WORKOS_API_KEY covers API-key-only users. Lowest priority — JWT and
97
- // claim-token auth have richer identity context when available.
98
- if (this.authMode === 'none' && process.env.WORKOS_API_KEY) {
99
- telemetryClient.setApiKeyAuth(process.env.WORKOS_API_KEY);
100
- this.authMode = 'api_key';
101
- }
102
- return this.authMode;
103
- }
104
- /**
105
- * Initialize telemetry for non-installer commands.
106
- * Sets telemetry URL from default config and loads auth credentials.
107
- */
108
- initForNonInstaller() {
109
- if (!this.isEnabled())
110
- return;
111
- telemetryClient.setGatewayUrl(getTelemetryUrl());
112
- this.configureAuthFromAvailableSources();
113
- }
114
- setTag(key, value) {
115
- this.tags[key] = value;
116
- }
117
- capture(eventName, properties) {
118
- if (!this.isEnabled())
119
- return;
120
- debug(`[Analytics] capture: ${eventName}`, properties);
121
- // Accumulate primitive values as tags for the session.end event
122
- if (properties) {
123
- for (const [key, value] of Object.entries(properties)) {
124
- if (['string', 'number', 'boolean'].includes(typeof value)) {
125
- this.tags[key] = value;
126
- }
127
- }
128
- }
129
- }
130
- captureException(error, properties = {}) {
131
- if (!this.isEnabled())
132
- return;
133
- // Sanitize BEFORE logging — raw error.message can carry Bearer tokens /
134
- // sk_ keys / JWTs on auth-failure paths, which would surface in stdout
135
- // under WORKOS_DEBUG=1.
136
- const { type, message } = this.extractErrorFields(error);
137
- debug('[Analytics] captureException:', message, properties);
138
- this.tags['error.type'] = type;
139
- this.tags['error.message'] = message;
140
- }
141
- async getFeatureFlag(_flagKey) {
142
- // Feature flags not implemented yet
143
- return undefined;
144
- }
145
- /** All capture methods that record error details MUST go through this. */
146
- extractErrorFields(error) {
147
- return {
148
- type: error.name,
149
- message: sanitizeMessage(error.message),
150
- };
151
- }
152
- detectCiProvider() {
153
- if (process.env.GITHUB_ACTIONS)
154
- return 'github-actions';
155
- if (process.env.BUILDKITE)
156
- return 'buildkite';
157
- if (process.env.CIRCLECI)
158
- return 'circleci';
159
- if (process.env.GITLAB_CI)
160
- return 'gitlab-ci';
161
- if (process.env.JENKINS_URL)
162
- return 'jenkins';
163
- return undefined;
164
- }
165
- getEnvFingerprint() {
166
- let osVersion;
167
- try {
168
- osVersion = os.release();
169
- }
170
- catch {
171
- osVersion = 'unknown';
172
- }
173
- const ciProvider = this.detectCiProvider();
174
- return {
175
- 'device.id': getDeviceId(),
176
- 'auth.mode': this.authMode,
177
- 'env.os': process.platform,
178
- 'env.os_version': osVersion,
179
- 'env.node_version': process.version,
180
- 'env.shell': basename(process.env.SHELL ?? process.env.COMSPEC ?? 'unknown'),
181
- 'env.ci': Boolean(process.env.CI || process.env.GITHUB_ACTIONS || process.env.BUILDKITE),
182
- ...(ciProvider ? { 'env.ci_provider': ciProvider } : {}),
183
- };
184
- }
185
- sessionStart(mode, version) {
186
- if (!this.isEnabled())
187
- return;
188
- this.mode = mode;
189
- const event = {
190
- type: 'session.start',
191
- sessionId: this.sessionId,
192
- timestamp: this.sessionStartTime.toISOString(),
193
- attributes: {
194
- 'installer.version': version,
195
- 'installer.mode': mode,
196
- 'workos.user_id': this.distinctId,
197
- ...this.getEnvFingerprint(),
198
- },
199
- };
200
- telemetryClient.queueEvent(event);
201
- }
202
- stepCompleted(name, durationMs, success, error) {
203
- if (!this.isEnabled())
204
- return;
205
- const event = {
206
- type: 'step',
207
- sessionId: this.sessionId,
208
- timestamp: new Date().toISOString(),
209
- name,
210
- startTimestamp: new Date(Date.now() - durationMs).toISOString(),
211
- durationMs,
212
- success,
213
- error: error ? this.extractErrorFields(error) : undefined,
214
- };
215
- telemetryClient.queueEvent(event);
216
- }
217
- toolCalled(toolName, durationMs, success) {
218
- if (!this.isEnabled())
219
- return;
220
- const event = {
221
- type: 'agent.tool',
222
- sessionId: this.sessionId,
223
- timestamp: new Date().toISOString(),
224
- toolName,
225
- startTimestamp: new Date(Date.now() - durationMs).toISOString(),
226
- durationMs,
227
- success,
228
- };
229
- telemetryClient.queueEvent(event);
230
- }
231
- llmRequest(model, inputTokens, outputTokens) {
232
- if (!this.isEnabled())
233
- return;
234
- this.totalInputTokens += inputTokens;
235
- this.totalOutputTokens += outputTokens;
236
- const event = {
237
- type: 'agent.llm',
238
- sessionId: this.sessionId,
239
- timestamp: new Date().toISOString(),
240
- model,
241
- inputTokens,
242
- outputTokens,
243
- };
244
- telemetryClient.queueEvent(event);
245
- }
246
- incrementAgentIterations() {
247
- this.agentIterations++;
248
- }
249
- emitCommandEvent(name, durationMs, success, options) {
250
- if (!this.isEnabled())
251
- return;
252
- const errorFields = options?.error ? this.extractErrorFields(options.error) : undefined;
253
- const event = {
254
- type: 'command',
255
- sessionId: this.sessionId,
256
- timestamp: new Date().toISOString(),
257
- attributes: {
258
- // Extras first: standard fields below win on key collision, so callers
259
- // can never override command.name, error fields, or the fingerprint.
260
- ...options?.extraAttributes,
261
- 'command.name': name,
262
- 'command.duration_ms': durationMs,
263
- 'command.success': success,
264
- 'cli.version': getVersion(),
265
- ...(this.distinctId ? { 'workos.user_id': this.distinctId } : {}),
266
- ...(errorFields
267
- ? {
268
- 'command.error_type': errorFields.type,
269
- 'command.error_message': errorFields.message,
270
- }
271
- : {}),
272
- ...(options?.flags?.length ? { 'command.flags': options.flags.join(',') } : {}),
273
- ...(options?.reason ? { 'termination.reason': options.reason } : {}),
274
- ...(options?.errorCode ? { 'error.code': options.errorCode } : {}),
275
- ...(options?.apiContext?.status !== undefined ? { 'api.status': options.apiContext.status } : {}),
276
- ...(options?.apiContext?.code ? { 'api.code': options.apiContext.code } : {}),
277
- ...(options?.apiContext?.resource ? { 'api.resource': options.apiContext.resource } : {}),
278
- ...this.getEnvFingerprint(),
279
- },
280
- };
281
- telemetryClient.queueEvent(event);
282
- }
283
- captureUnhandledCrash(error, options) {
284
- if (!this.isEnabled())
285
- return;
286
- const { type, message } = this.extractErrorFields(error);
287
- const event = {
288
- type: 'crash',
289
- sessionId: this.sessionId,
290
- timestamp: new Date().toISOString(),
291
- attributes: {
292
- 'crash.error_type': type,
293
- 'crash.error_message': message,
294
- 'crash.stack': sanitizeStack(error.stack),
295
- ...(options?.command ? { 'crash.command': options.command } : {}),
296
- 'cli.version': options?.version ?? getVersion(),
297
- ...(this.distinctId ? { 'workos.user_id': this.distinctId } : {}),
298
- ...this.getEnvFingerprint(),
299
- },
300
- };
301
- telemetryClient.queueEvent(event);
302
- }
303
- async shutdown(status) {
304
- if (!this.isEnabled())
305
- return;
306
- const duration = Date.now() - this.sessionStartTime.getTime();
307
- // Filter out null/undefined tags
308
- const extraAttributes = Object.fromEntries(Object.entries(this.tags).filter(([, v]) => v != null));
309
- const envFingerprint = this.getEnvFingerprint();
310
- const event = {
311
- type: 'session.end',
312
- sessionId: this.sessionId,
313
- timestamp: new Date().toISOString(),
314
- attributes: {
315
- 'installer.outcome': status,
316
- 'installer.duration_ms': duration,
317
- 'installer.agent.iterations': this.agentIterations,
318
- 'installer.agent.tokens.input': this.totalInputTokens,
319
- 'installer.agent.tokens.output': this.totalOutputTokens,
320
- ...envFingerprint,
321
- ...(this.mode ? { 'installer.mode': this.mode } : {}),
322
- ...extraAttributes,
323
- },
324
- };
325
- telemetryClient.queueEvent(event);
326
- await telemetryClient.flush();
327
- }
328
- }
329
- export const analytics = new Analytics();
330
- //# sourceMappingURL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QAE9B,MAAM,QAAQ,GAAG,IAAI,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC,gBAAgB,CAAC,OAAO,EAAE,CAAC;QAE9D,iCAAiC;QACjC,MAAM,eAAe,GAAG,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,IAAI,IAAI,CAAC,CAGhG,CAAC;QAEF,MAAM,cAAc,GAAG,IAAI,CAAC,iBAAiB,EAAE,CAAC;QAEhD,MAAM,KAAK,GAAoB;YAC7B,IAAI,EAAE,aAAa;YACnB,SAAS,EAAE,IAAI,CAAC,SAAS;YACzB,SAAS,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;YACnC,UAAU,EAAE;gBACV,mBAAmB,EAAE,MAAM;gBAC3B,uBAAuB,EAAE,QAAQ;gBACjC,4BAA4B,EAAE,IAAI,CAAC,eAAe;gBAClD,8BAA8B,EAAE,IAAI,CAAC,gBAAgB;gBACrD,+BAA+B,EAAE,IAAI,CAAC,iBAAiB;gBACvD,GAAG,cAAc;gBACjB,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,gBAAgB,EAAE,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;gBACrD,GAAG,eAAe;aACnB;SACF,CAAC;QAEF,eAAe,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;QAClC,MAAM,eAAe,CAAC,KAAK,EAAE,CAAC;IAChC,CAAC;CACF;AAED,MAAM,CAAC,MAAM,SAAS,GAAG,IAAI,SAAS,EAAE,CAAC","sourcesContent":["import os from 'node:os';\nimport { basename } from 'node:path';\nimport { v4 as uuidv4 } from 'uuid';\nimport { debug } from './debug.js';\nimport { telemetryClient } from './telemetry-client.js';\nimport type {\n AuthMode,\n SessionStartEvent,\n SessionEndEvent,\n StepEvent,\n AgentToolEvent,\n AgentLLMEvent,\n CommandEvent,\n CrashEvent,\n TerminationReason,\n EnvFingerprint,\n} from './telemetry-types.js';\nimport { isTelemetryEnabled } from '../lib/preferences.js';\nimport { getVersion } from '../lib/settings.js';\nimport { getTelemetryUrl } from './urls.js';\nimport { getCredentials, isTokenExpired } from '../lib/credentials.js';\nimport { getActiveEnvironment, isUnclaimedEnvironment } from '../lib/config-store.js';\nimport { getDeviceId } from '../lib/device-id.js';\nimport { sanitizeMessage, sanitizeStack } from './crash-reporter.js';\n\nexport class Analytics {\n private tags: Record<string, string | boolean | number | null | undefined> = {};\n private sessionId: string;\n private sessionStartTime: Date;\n private distinctId?: string;\n private mode?: 'cli' | 'tui' | 'headless';\n private authMode: AuthMode = 'none';\n\n // Agent metrics tracking\n private totalInputTokens = 0;\n private totalOutputTokens = 0;\n private agentIterations = 0;\n\n constructor() {\n this.sessionId = uuidv4();\n this.sessionStartTime = new Date();\n this.tags = { $app_name: 'authkit-installer' };\n }\n\n setDistinctId(distinctId: string) {\n this.distinctId = distinctId;\n }\n\n setAccessToken(token: string) {\n telemetryClient.setAccessToken(token);\n }\n\n setApiKeyAuth(apiKey: string) {\n telemetryClient.setApiKeyAuth(apiKey);\n }\n\n setClaimTokenAuth(clientId: string, claimToken: string) {\n telemetryClient.setClaimTokenAuth(clientId, claimToken);\n }\n\n /**\n * Set the auth mode explicitly for special cases. Normal CLI flows should use\n * `configureAuthFromAvailableSources()` so transport and auth.mode stay aligned.\n */\n setAuthMode(mode: AuthMode) {\n this.authMode = mode;\n }\n\n setGatewayUrl(url: string) {\n telemetryClient.setGatewayUrl(url);\n }\n\n private isEnabled(): boolean {\n return isTelemetryEnabled();\n }\n\n /**\n * Configure telemetry transport and auth.mode from all available CLI auth\n * sources. Priority: stored JWT, unclaimed-environment claim token, active\n * environment API key, then WORKOS_API_KEY.\n */\n configureAuthFromAvailableSources(): AuthMode {\n if (!this.isEnabled()) return this.authMode;\n\n this.authMode = 'none';\n const creds = getCredentials();\n // Only treat the JWT as usable auth when it is still valid. An expired\n // access token would 401 against the telemetry guard and the event would\n // be dropped, so fall through to claim-token / api-key auth instead.\n if (creds?.accessToken && !isTokenExpired(creds)) {\n telemetryClient.setAccessToken(creds.accessToken);\n this.authMode = 'jwt';\n }\n // Preserve identity even when the token is expired.\n if (creds?.userId) {\n this.distinctId = creds.userId;\n }\n\n // Check for unclaimed environment — fall back to claim-token auth\n // so unclaimed users' telemetry still reaches the backend.\n try {\n const env = getActiveEnvironment();\n if (env && isUnclaimedEnvironment(env)) {\n telemetryClient.setClaimTokenAuth(env.clientId, env.claimToken);\n // Tag distinctId so unclaimed sessions are identifiable in analytics\n this.distinctId = this.distinctId ?? `unclaimed:${env.clientId}`;\n if (this.authMode === 'none') this.authMode = 'claim_token';\n } else if (env?.apiKey && this.authMode === 'none') {\n telemetryClient.setApiKeyAuth(env.apiKey);\n if (env.clientId) this.distinctId = this.distinctId ?? `env:${env.clientId}`;\n this.authMode = 'api_key';\n }\n } catch {\n // Config-store failure is non-fatal for telemetry\n }\n\n // WORKOS_API_KEY covers API-key-only users. Lowest priority — JWT and\n // claim-token auth have richer identity context when available.\n if (this.authMode === 'none' && process.env.WORKOS_API_KEY) {\n telemetryClient.setApiKeyAuth(process.env.WORKOS_API_KEY);\n this.authMode = 'api_key';\n }\n\n return this.authMode;\n }\n\n /**\n * Initialize telemetry for non-installer commands.\n * Sets telemetry URL from default config and loads auth credentials.\n */\n initForNonInstaller(): void {\n if (!this.isEnabled()) return;\n\n telemetryClient.setGatewayUrl(getTelemetryUrl());\n this.configureAuthFromAvailableSources();\n }\n\n setTag(key: string, value: string | boolean | number | null | undefined) {\n this.tags[key] = value;\n }\n\n capture(eventName: string, properties?: Record<string, unknown>) {\n if (!this.isEnabled()) return;\n\n debug(`[Analytics] capture: ${eventName}`, properties);\n\n // Accumulate primitive values as tags for the session.end event\n if (properties) {\n for (const [key, value] of Object.entries(properties)) {\n if (['string', 'number', 'boolean'].includes(typeof value)) {\n this.tags[key] = value as string | number | boolean;\n }\n }\n }\n }\n\n captureException(error: Error, properties: Record<string, unknown> = {}) {\n if (!this.isEnabled()) return;\n\n // Sanitize BEFORE logging — raw error.message can carry Bearer tokens /\n // sk_ keys / JWTs on auth-failure paths, which would surface in stdout\n // under WORKOS_DEBUG=1.\n const { type, message } = this.extractErrorFields(error);\n debug('[Analytics] captureException:', message, properties);\n this.tags['error.type'] = type;\n this.tags['error.message'] = message;\n }\n\n async getFeatureFlag(_flagKey: string): Promise<string | boolean | undefined> {\n // Feature flags not implemented yet\n return undefined;\n }\n\n /** All capture methods that record error details MUST go through this. */\n private extractErrorFields(error: Error): { type: string; message: string } {\n return {\n type: error.name,\n message: sanitizeMessage(error.message),\n };\n }\n\n private detectCiProvider(): string | undefined {\n if (process.env.GITHUB_ACTIONS) return 'github-actions';\n if (process.env.BUILDKITE) return 'buildkite';\n if (process.env.CIRCLECI) return 'circleci';\n if (process.env.GITLAB_CI) return 'gitlab-ci';\n if (process.env.JENKINS_URL) return 'jenkins';\n return undefined;\n }\n\n private getEnvFingerprint(): EnvFingerprint {\n let osVersion: string;\n try {\n osVersion = os.release();\n } catch {\n osVersion = 'unknown';\n }\n\n const ciProvider = this.detectCiProvider();\n\n return {\n 'device.id': getDeviceId(),\n 'auth.mode': this.authMode,\n 'env.os': process.platform,\n 'env.os_version': osVersion,\n 'env.node_version': process.version,\n 'env.shell': basename(process.env.SHELL ?? process.env.COMSPEC ?? 'unknown'),\n 'env.ci': Boolean(process.env.CI || process.env.GITHUB_ACTIONS || process.env.BUILDKITE),\n ...(ciProvider ? { 'env.ci_provider': ciProvider } : {}),\n };\n }\n\n sessionStart(mode: 'cli' | 'tui' | 'headless', version: string) {\n if (!this.isEnabled()) return;\n\n this.mode = mode;\n\n const event: SessionStartEvent = {\n type: 'session.start',\n sessionId: this.sessionId,\n timestamp: this.sessionStartTime.toISOString(),\n attributes: {\n 'installer.version': version,\n 'installer.mode': mode,\n 'workos.user_id': this.distinctId,\n ...this.getEnvFingerprint(),\n },\n };\n\n telemetryClient.queueEvent(event);\n }\n\n stepCompleted(name: string, durationMs: number, success: boolean, error?: Error) {\n if (!this.isEnabled()) return;\n\n const event: StepEvent = {\n type: 'step',\n sessionId: this.sessionId,\n timestamp: new Date().toISOString(),\n name,\n startTimestamp: new Date(Date.now() - durationMs).toISOString(),\n durationMs,\n success,\n error: error ? this.extractErrorFields(error) : undefined,\n };\n\n telemetryClient.queueEvent(event);\n }\n\n toolCalled(toolName: string, durationMs: number, success: boolean) {\n if (!this.isEnabled()) return;\n\n const event: AgentToolEvent = {\n type: 'agent.tool',\n sessionId: this.sessionId,\n timestamp: new Date().toISOString(),\n toolName,\n startTimestamp: new Date(Date.now() - durationMs).toISOString(),\n durationMs,\n success,\n };\n\n telemetryClient.queueEvent(event);\n }\n\n llmRequest(model: string, inputTokens: number, outputTokens: number) {\n if (!this.isEnabled()) return;\n\n this.totalInputTokens += inputTokens;\n this.totalOutputTokens += outputTokens;\n\n const event: AgentLLMEvent = {\n type: 'agent.llm',\n sessionId: this.sessionId,\n timestamp: new Date().toISOString(),\n model,\n inputTokens,\n outputTokens,\n };\n\n telemetryClient.queueEvent(event);\n }\n\n incrementAgentIterations() {\n this.agentIterations++;\n }\n\n emitCommandEvent(\n name: string,\n durationMs: number,\n success: boolean,\n options?: {\n error?: Error;\n flags?: string[];\n reason?: TerminationReason;\n errorCode?: string;\n apiContext?: { status?: number; code?: string; resource?: string };\n extraAttributes?: Record<string, string | number | boolean>;\n },\n ) {\n if (!this.isEnabled()) return;\n\n const errorFields = options?.error ? this.extractErrorFields(options.error) : undefined;\n\n const event: CommandEvent = {\n type: 'command',\n sessionId: this.sessionId,\n timestamp: new Date().toISOString(),\n attributes: {\n // Extras first: standard fields below win on key collision, so callers\n // can never override command.name, error fields, or the fingerprint.\n ...options?.extraAttributes,\n 'command.name': name,\n 'command.duration_ms': durationMs,\n 'command.success': success,\n 'cli.version': getVersion(),\n ...(this.distinctId ? { 'workos.user_id': this.distinctId } : {}),\n ...(errorFields\n ? {\n 'command.error_type': errorFields.type,\n 'command.error_message': errorFields.message,\n }\n : {}),\n ...(options?.flags?.length ? { 'command.flags': options.flags.join(',') } : {}),\n ...(options?.reason ? { 'termination.reason': options.reason } : {}),\n ...(options?.errorCode ? { 'error.code': options.errorCode } : {}),\n ...(options?.apiContext?.status !== undefined ? { 'api.status': options.apiContext.status } : {}),\n ...(options?.apiContext?.code ? { 'api.code': options.apiContext.code } : {}),\n ...(options?.apiContext?.resource ? { 'api.resource': options.apiContext.resource } : {}),\n ...this.getEnvFingerprint(),\n },\n };\n\n telemetryClient.queueEvent(event);\n }\n\n captureUnhandledCrash(error: Error, options?: { command?: string; version?: string }) {\n if (!this.isEnabled()) return;\n\n const { type, message } = this.extractErrorFields(error);\n\n const event: CrashEvent = {\n type: 'crash',\n sessionId: this.sessionId,\n timestamp: new Date().toISOString(),\n attributes: {\n 'crash.error_type': type,\n 'crash.error_message': message,\n 'crash.stack': sanitizeStack(error.stack),\n ...(options?.command ? { 'crash.command': options.command } : {}),\n 'cli.version': options?.version ?? getVersion(),\n ...(this.distinctId ? { 'workos.user_id': this.distinctId } : {}),\n ...this.getEnvFingerprint(),\n },\n };\n\n telemetryClient.queueEvent(event);\n }\n\n async shutdown(status: 'success' | 'error' | 'cancelled') {\n if (!this.isEnabled()) return;\n\n const duration = Date.now() - this.sessionStartTime.getTime();\n\n // Filter out null/undefined tags\n const extraAttributes = Object.fromEntries(Object.entries(this.tags).filter(([, v]) => v != null)) as Record<\n string,\n string | number | boolean\n >;\n\n const envFingerprint = this.getEnvFingerprint();\n\n const event: SessionEndEvent = {\n type: 'session.end',\n sessionId: this.sessionId,\n timestamp: new Date().toISOString(),\n attributes: {\n 'installer.outcome': status,\n 'installer.duration_ms': duration,\n 'installer.agent.iterations': this.agentIterations,\n 'installer.agent.tokens.input': this.totalInputTokens,\n 'installer.agent.tokens.output': this.totalOutputTokens,\n ...envFingerprint,\n ...(this.mode ? { 'installer.mode': this.mode } : {}),\n ...extraAttributes,\n },\n };\n\n telemetryClient.queueEvent(event);\n await telemetryClient.flush();\n }\n}\n\nexport const analytics = new Analytics();\n"]}
@@ -1,2 +0,0 @@
1
- export declare function executeSync(command: string): string;
2
- export declare function execute(command: string): Promise<string>;
@@ -1,17 +0,0 @@
1
- import * as child_process from 'child_process';
2
- export function executeSync(command) {
3
- const output = child_process.execSync(command);
4
- return output.toString();
5
- }
6
- export function execute(command) {
7
- return new Promise((resolve, reject) => {
8
- child_process.exec(command, (error, stdout, _) => {
9
- if (error) {
10
- reject(error);
11
- return;
12
- }
13
- resolve(stdout);
14
- });
15
- });
16
- }
17
- //# sourceMappingURL=bash.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"bash.js","sourceRoot":"","sources":["../../src/utils/bash.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,aAAa,MAAM,eAAe,CAAC;AAE/C,MAAM,UAAU,WAAW,CAAC,OAAe;IACzC,MAAM,MAAM,GAAG,aAAa,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;IAC/C,OAAO,MAAM,CAAC,QAAQ,EAAE,CAAC;AAC3B,CAAC;AAED,MAAM,UAAU,OAAO,CAAC,OAAe;IACrC,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QACrC,aAAa,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,CAAC,EAAE,EAAE;YAC/C,IAAI,KAAK,EAAE,CAAC;gBACV,MAAM,CAAC,KAAK,CAAC,CAAC;gBACd,OAAO;YACT,CAAC;YAED,OAAO,CAAC,MAAM,CAAC,CAAC;QAClB,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC","sourcesContent":["import * as child_process from 'child_process';\n\nexport function executeSync(command: string): string {\n const output = child_process.execSync(command);\n return output.toString();\n}\n\nexport function execute(command: string): Promise<string> {\n return new Promise((resolve, reject) => {\n child_process.exec(command, (error, stdout, _) => {\n if (error) {\n reject(error);\n return;\n }\n\n resolve(stdout);\n });\n });\n}\n"]}
@@ -1,33 +0,0 @@
1
- import type chalk from 'chalk';
2
- /**
3
- * Word-wrap a string to a maximum visible width, preserving ANSI color.
4
- *
5
- * chalk emits self-closing color spans (e.g. `\x1b[36m…\x1b[39m`), so each
6
- * colored fragment is atomic: we tokenize the input into whole colored spans
7
- * and plain words, then greedily pack tokens into lines measured by their
8
- * VISIBLE width. Because every token carries its own open+close codes, color
9
- * never bleeds across a line break onto the border or padding.
10
- *
11
- * A single token wider than `maxWidth` (rare — only a very narrow terminal vs.
12
- * a long unbroken word) overflows its own line rather than being split mid-span.
13
- * Such an overflow can push the rendered box border past the terminal width;
14
- * acceptable at standard widths. Note that a colored command produced by
15
- * `formatWorkOSCommand` can be long (e.g. `npx workos@latest telemetry opt-out`)
16
- * and stays a single unbreakable token by design.
17
- *
18
- * Limitation: a colored span is grouped atomically only when it is a single SGR
19
- * layer (one open code + one close code, as `chalk.cyan('…')` emits). Stacked
20
- * styles such as bold+color (`\x1b[1m\x1b[36m…\x1b[39m\x1b[22m`) or two adjacent
21
- * spans with no separating space are not guaranteed to stay on one line and may
22
- * leave a reset code mid-line. All current callers use single-color spans only.
23
- */
24
- export declare function wrapAnsiAware(input: string, maxWidth: number): string[];
25
- /**
26
- * Render a bordered box to stderr, wrapping to the terminal width.
27
- *
28
- * When the content fits on one line it renders exactly as a single-line box
29
- * (the historical behavior). When it would overflow the terminal, the content
30
- * is word-wrapped (ANSI-aware) and the box grows to multiple lines so the
31
- * border never breaks on a narrow terminal.
32
- */
33
- export declare function renderStderrBox(inner: string, color: typeof chalk.yellow | typeof chalk.green): void;
package/dist/utils/box.js DELETED
@@ -1,102 +0,0 @@
1
- import { stripAnsii } from './string.js';
2
- /** Visible (printable) width of a string, ignoring ANSI escape sequences. */
3
- function visibleWidth(str) {
4
- return stripAnsii(str).length;
5
- }
6
- /** Terminal width for stderr output, falling back to stdout then 80 columns. */
7
- function terminalWidth() {
8
- return process.stderr.columns || process.stdout.columns || 80;
9
- }
10
- /**
11
- * Word-wrap a string to a maximum visible width, preserving ANSI color.
12
- *
13
- * chalk emits self-closing color spans (e.g. `\x1b[36m…\x1b[39m`), so each
14
- * colored fragment is atomic: we tokenize the input into whole colored spans
15
- * and plain words, then greedily pack tokens into lines measured by their
16
- * VISIBLE width. Because every token carries its own open+close codes, color
17
- * never bleeds across a line break onto the border or padding.
18
- *
19
- * A single token wider than `maxWidth` (rare — only a very narrow terminal vs.
20
- * a long unbroken word) overflows its own line rather than being split mid-span.
21
- * Such an overflow can push the rendered box border past the terminal width;
22
- * acceptable at standard widths. Note that a colored command produced by
23
- * `formatWorkOSCommand` can be long (e.g. `npx workos@latest telemetry opt-out`)
24
- * and stays a single unbreakable token by design.
25
- *
26
- * Limitation: a colored span is grouped atomically only when it is a single SGR
27
- * layer (one open code + one close code, as `chalk.cyan('…')` emits). Stacked
28
- * styles such as bold+color (`\x1b[1m\x1b[36m…\x1b[39m\x1b[22m`) or two adjacent
29
- * spans with no separating space are not guaranteed to stay on one line and may
30
- * leave a reset code mid-line. All current callers use single-color spans only.
31
- */
32
- export function wrapAnsiAware(input, maxWidth) {
33
- // A token is either: a full SGR-wrapped span (open code, content that may
34
- // contain spaces, close code), a run of non-space/non-escape characters
35
- // (a plain word), or a lone escape. Whitespace between tokens is dropped and
36
- // re-inserted as single separating spaces.
37
- const tokenRe = /\x1b\[[0-9;]*m[^\x1b]*?\x1b\[[0-9;]*m|[^\s\x1b]+|\x1b\[[0-9;]*m/g;
38
- const tokens = input.match(tokenRe) ?? [];
39
- const lines = [];
40
- let line = '';
41
- let lineWidth = 0;
42
- for (const token of tokens) {
43
- const tokenWidth = visibleWidth(token);
44
- if (lineWidth === 0) {
45
- line = token;
46
- lineWidth = tokenWidth;
47
- }
48
- else if (lineWidth + 1 + tokenWidth <= maxWidth) {
49
- line += ` ${token}`;
50
- lineWidth += 1 + tokenWidth;
51
- }
52
- else {
53
- lines.push(line);
54
- line = token;
55
- lineWidth = tokenWidth;
56
- }
57
- }
58
- if (line)
59
- lines.push(line);
60
- return lines.length > 0 ? lines : [''];
61
- }
62
- /**
63
- * Render a bordered box to stderr, wrapping to the terminal width.
64
- *
65
- * When the content fits on one line it renders exactly as a single-line box
66
- * (the historical behavior). When it would overflow the terminal, the content
67
- * is word-wrapped (ANSI-aware) and the box grows to multiple lines so the
68
- * border never breaks on a narrow terminal.
69
- */
70
- export function renderStderrBox(inner, color) {
71
- const cols = terminalWidth();
72
- const plainLen = visibleWidth(inner);
73
- // Fast path: content (including its own padding spaces) fits within the
74
- // terminal. Render the single-line box byte-for-byte as before.
75
- if (plainLen <= cols - 4) {
76
- const border = '─'.repeat(plainLen);
77
- console.error('');
78
- console.error(color(` ┌${border}┐`));
79
- console.error(color(' │') + inner + color('│'));
80
- console.error(color(` └${border}┘`));
81
- console.error('');
82
- return;
83
- }
84
- // Wrap path: trim the caller's outer padding, wrap to the available width,
85
- // then re-pad each line to a uniform inner width with one space of padding
86
- // on each side. Layout per line: " │ " + text + " │" = text + 6 columns.
87
- const content = inner.replace(/^[ \t]+/, '').replace(/[ \t]+$/, '');
88
- const maxTextWidth = Math.max(1, cols - 6);
89
- const wrapped = wrapAnsiAware(content, maxTextWidth);
90
- // Snug the box to the longest wrapped line rather than the full terminal.
91
- const textWidth = Math.max(...wrapped.map(visibleWidth));
92
- const border = '─'.repeat(textWidth + 2);
93
- console.error('');
94
- console.error(color(` ┌${border}┐`));
95
- for (const ln of wrapped) {
96
- const pad = ' '.repeat(Math.max(0, textWidth - visibleWidth(ln)));
97
- console.error(`${color(' │')} ${ln}${pad} ${color('│')}`);
98
- }
99
- console.error(color(` └${border}┘`));
100
- console.error('');
101
- }
102
- //# sourceMappingURL=box.js.map