@posthog/wizard 2.77.0 → 2.79.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (175) hide show
  1. package/README.md +50 -26
  2. package/dist/{add-mcp-server-to-clients-BnRyE4pw.js → add-mcp-server-to-clients-amlJWW7W.js} +6 -5
  3. package/dist/{add-mcp-server-to-clients-BnRyE4pw.js.map → add-mcp-server-to-clients-amlJWW7W.js.map} +1 -1
  4. package/dist/agent-CNrEC-9v.js +3184 -0
  5. package/dist/agent-CNrEC-9v.js.map +1 -0
  6. package/dist/{agent-interface-Avtr_5M5.js → agent-interface-BXvmAm4c.js} +462 -385
  7. package/dist/agent-interface-BXvmAm4c.js.map +1 -0
  8. package/dist/{agent-prompt-loader-CHixNPgY.js → agent-prompt-loader-DiKUbhi_.js} +6 -6
  9. package/dist/agent-prompt-loader-DiKUbhi_.js.map +1 -0
  10. package/dist/analytics-DxwRi2Hf.js +2 -0
  11. package/dist/{analytics-C67F2vee.js → analytics-VRYdebXW.js} +10 -6
  12. package/dist/analytics-VRYdebXW.js.map +1 -0
  13. package/dist/{api-Dj1yabTj.js → api-DGuJTzjr.js} +4 -17
  14. package/dist/api-DGuJTzjr.js.map +1 -0
  15. package/dist/bin.js +415 -70
  16. package/dist/bin.js.map +1 -1
  17. package/dist/{bounded-fs-CWRYuLAn.js → bounded-fs-Cpn129A4.js} +4 -4
  18. package/dist/bounded-fs-Cpn129A4.js.map +1 -0
  19. package/dist/check-screens.tsx +1 -1
  20. package/dist/{ci-install-CvXL5h13.js → ci-install-BPA6gzEq.js} +6 -5
  21. package/dist/ci-install-BPA6gzEq.js.map +1 -0
  22. package/dist/constants-CuJfQEcC.js +260 -0
  23. package/dist/constants-CuJfQEcC.js.map +1 -0
  24. package/dist/{debug-CziFS0cA.js → debug-B9k4ideV.js} +1 -1
  25. package/dist/debug-Cj-8vfXY.js +171 -0
  26. package/dist/debug-Cj-8vfXY.js.map +1 -0
  27. package/dist/{defaults-4c4YwTmW.js → defaults-C6J7yL4O.js} +1 -1
  28. package/dist/{defaults-4c4YwTmW.js.map → defaults-C6J7yL4O.js.map} +1 -1
  29. package/dist/endpoints-DnIX0pZH.js +108 -0
  30. package/dist/endpoints-DnIX0pZH.js.map +1 -0
  31. package/dist/{env-api-key-BZ5wE3Y4.js → env-api-key-BWdKpGEr.js} +3 -3
  32. package/dist/env-api-key-BWdKpGEr.js.map +1 -0
  33. package/dist/{environment-BEvsey6i.js → environment-DZYUSCpV.js} +6 -6
  34. package/dist/environment-DZYUSCpV.js.map +1 -0
  35. package/dist/{errors-BoJvrdw8.js → errors-ddDE6MbA.js} +27 -76
  36. package/dist/errors-ddDE6MbA.js.map +1 -0
  37. package/dist/{file-BoD3REGB.js → file-dEhr-l3n.js} +3 -3
  38. package/dist/file-dEhr-l3n.js.map +1 -0
  39. package/dist/{file-watcher-BPFazvG_.js → file-watcher-CPM-Nn9L.js} +2 -2
  40. package/dist/{file-watcher-BPFazvG_.js.map → file-watcher-CPM-Nn9L.js.map} +1 -1
  41. package/dist/{gateway-session-xPFv6p5c.js → gateway-CVU1G0H3.js} +205 -20
  42. package/dist/gateway-CVU1G0H3.js.map +1 -0
  43. package/dist/generate-version.cjs +1 -1
  44. package/dist/{headless-ui-CsmQrDIl.js → headless-ui-pY2xB5ug.js} +13 -2
  45. package/dist/headless-ui-pY2xB5ug.js.map +1 -0
  46. package/dist/{interactive-Dej-sxvR.js → interactive-BOGlinZe.js} +2 -2
  47. package/dist/interactive-BOGlinZe.js.map +1 -0
  48. package/dist/{local-dev-DPZiIPCK.js → local-dev-McsurOC-.js} +2 -2
  49. package/dist/local-dev-McsurOC-.js.map +1 -0
  50. package/dist/logging-ui-CUxNYF2t.js +226 -0
  51. package/dist/logging-ui-CUxNYF2t.js.map +1 -0
  52. package/dist/mcp-JcsBBnWv.js +97 -0
  53. package/dist/mcp-JcsBBnWv.js.map +1 -0
  54. package/dist/{mcp-prompt-streaming-BU_kuur_.js → mcp-prompt-streaming-B-p_Pvb2.js} +7 -6
  55. package/dist/mcp-prompt-streaming-B-p_Pvb2.js.map +1 -0
  56. package/dist/{mint-failure-BrleGqMd.js → mint-failure-CZFZpHpW.js} +749 -130
  57. package/dist/mint-failure-CZFZpHpW.js.map +1 -0
  58. package/dist/models-DnAY67Lg.js +83 -0
  59. package/dist/models-DnAY67Lg.js.map +1 -0
  60. package/dist/{non-interactive-DcOjH2fw.js → non-interactive-DR1CWXY1.js} +3 -3
  61. package/dist/non-interactive-DR1CWXY1.js.map +1 -0
  62. package/dist/oauth-session-CQTFOk-I.js +74 -0
  63. package/dist/oauth-session-CQTFOk-I.js.map +1 -0
  64. package/dist/{orchestrator-tools-DXwr8Sp3.js → orchestrator-tools-CBdt-SXO.js} +4 -4
  65. package/dist/orchestrator-tools-CBdt-SXO.js.map +1 -0
  66. package/dist/{package-json-xt3eeyBI.js → package-json-DY70kkNp.js} +2 -2
  67. package/dist/package-json-DY70kkNp.js.map +1 -0
  68. package/dist/{pi-mY8I2XkG.js → pi-BtqcLX3y.js} +444 -81
  69. package/dist/pi-BtqcLX3y.js.map +1 -0
  70. package/dist/{playground-CDUUKLkC.js → playground-Dz-ZVjBk.js} +11 -7
  71. package/dist/playground-Dz-ZVjBk.js.map +1 -0
  72. package/dist/{posthog-Hc_-9wrr.js → posthog-6Uqw_Eux.js} +9 -4
  73. package/dist/posthog-6Uqw_Eux.js.map +1 -0
  74. package/dist/{provisioning-xfdjhFtA.js → provisioning-Zf7yPcEs.js} +6 -5
  75. package/dist/provisioning-Zf7yPcEs.js.map +1 -0
  76. package/dist/{queue-tools-C8y_xZJi.js → queue-tools-B7_aCyd-.js} +7 -86
  77. package/dist/queue-tools-B7_aCyd-.js.map +1 -0
  78. package/dist/{registry-DTmREJ-f.js → registry-B6iLGorH.js} +307 -48
  79. package/dist/registry-B6iLGorH.js.map +1 -0
  80. package/dist/run-agent-legacy-6WcYMaR9.js +3541 -0
  81. package/dist/run-agent-legacy-6WcYMaR9.js.map +1 -0
  82. package/dist/{security-Dw2oFJjP.js → security-lkBwWbrK.js} +17 -7
  83. package/dist/security-lkBwWbrK.js.map +1 -0
  84. package/dist/{setup-utils-fjJTBhaB.js → setup-utils-dCViCC6s.js} +47 -19
  85. package/dist/setup-utils-dCViCC6s.js.map +1 -0
  86. package/dist/smoke-test.sh +1 -1
  87. package/dist/{start-tui-UNe2xQ0U.js → start-tui-oCWMgsDP.js} +40 -46
  88. package/dist/start-tui-oCWMgsDP.js.map +1 -0
  89. package/dist/{steps-C2yqOk_h.js → steps-gx0Pq4I4.js} +7 -7
  90. package/dist/{steps-C2yqOk_h.js.map → steps-gx0Pq4I4.js.map} +1 -1
  91. package/dist/{store-Bic4Cr3L.js → store-xYy_6Ruv.js} +19 -29
  92. package/dist/store-xYy_6Ruv.js.map +1 -0
  93. package/dist/{subagent-Dz41vV9j.js → subagent-Bfy0sfhU.js} +8 -3
  94. package/dist/subagent-Bfy0sfhU.js.map +1 -0
  95. package/dist/{task-5-fw_Vw3.js → task-BOfw7GPc.js} +124 -36
  96. package/dist/task-BOfw7GPc.js.map +1 -0
  97. package/dist/{task-stream-dVzl6b_q.js → task-stream-kYlm9qd0.js} +47 -17
  98. package/dist/task-stream-kYlm9qd0.js.map +1 -0
  99. package/dist/{tasks-D1c2z1aw.js → tasks-Bbv_lOBG.js} +17 -13
  100. package/dist/tasks-Bbv_lOBG.js.map +1 -0
  101. package/dist/{telemetry-BRnxBRWK.js → telemetry-Bpv-Mh5B.js} +5 -5
  102. package/dist/telemetry-Bpv-Mh5B.js.map +1 -0
  103. package/dist/{terminal-9bvRa4Qt.js → terminal-D07EQ2y0.js} +41 -76
  104. package/dist/terminal-D07EQ2y0.js.map +1 -0
  105. package/dist/{tools-Dp6i9k70.js → tools-Cc41af5W.js} +11 -11
  106. package/dist/tools-Cc41af5W.js.map +1 -0
  107. package/dist/ui-CGXtC7Vn.js +15 -0
  108. package/dist/ui-CGXtC7Vn.js.map +1 -0
  109. package/dist/version-Cadof0Z_.js +6 -0
  110. package/dist/version-Cadof0Z_.js.map +1 -0
  111. package/dist/warlock-smoke-test.ts +2 -2
  112. package/dist/{wizard-abort-lE6umflt.js → wizard-abort-HDbP3YcS.js} +23 -20
  113. package/dist/wizard-abort-HDbP3YcS.js.map +1 -0
  114. package/dist/wizard-abort-Y-Ip2K4z.js +3 -0
  115. package/dist/{wizard-session-FSJCkTcP.js → wizard-session-2w4Ru-Wz.js} +12 -16
  116. package/dist/wizard-session-2w4Ru-Wz.js.map +1 -0
  117. package/dist/wizard-session-DGaUHOF3.js +2 -0
  118. package/dist/wizard-ui-DoyOZxK8.js +16 -0
  119. package/dist/wizard-ui-DoyOZxK8.js.map +1 -0
  120. package/dist/yara-hooks-B49RIk5d.js +2 -0
  121. package/dist/{yara-hooks-BTNJ6MGW.js → yara-hooks-DCfROpZt.js} +19 -68
  122. package/dist/yara-hooks-DCfROpZt.js.map +1 -0
  123. package/package.json +2 -1
  124. package/dist/agent-interface-Avtr_5M5.js.map +0 -1
  125. package/dist/agent-prompt-loader-CHixNPgY.js.map +0 -1
  126. package/dist/agent-runner-COOIUJCP.js +0 -6188
  127. package/dist/agent-runner-COOIUJCP.js.map +0 -1
  128. package/dist/analytics-C67F2vee.js.map +0 -1
  129. package/dist/analytics-CJA1uLlk.js +0 -2
  130. package/dist/api-Dj1yabTj.js.map +0 -1
  131. package/dist/bounded-fs-CWRYuLAn.js.map +0 -1
  132. package/dist/ci-install-CvXL5h13.js.map +0 -1
  133. package/dist/debug-B4kzIZPi.js +0 -754
  134. package/dist/debug-B4kzIZPi.js.map +0 -1
  135. package/dist/env-api-key-BZ5wE3Y4.js.map +0 -1
  136. package/dist/environment-BEvsey6i.js.map +0 -1
  137. package/dist/errors-BoJvrdw8.js.map +0 -1
  138. package/dist/file-BoD3REGB.js.map +0 -1
  139. package/dist/gateway-session-C118uACz.js +0 -2
  140. package/dist/gateway-session-xPFv6p5c.js.map +0 -1
  141. package/dist/headless-ui-CsmQrDIl.js.map +0 -1
  142. package/dist/interactive-Dej-sxvR.js.map +0 -1
  143. package/dist/local-dev-DPZiIPCK.js.map +0 -1
  144. package/dist/mcp-Cbuw_xss.js +0 -64
  145. package/dist/mcp-Cbuw_xss.js.map +0 -1
  146. package/dist/mcp-prompt-streaming-BU_kuur_.js.map +0 -1
  147. package/dist/mint-failure-BrleGqMd.js.map +0 -1
  148. package/dist/non-interactive-DcOjH2fw.js.map +0 -1
  149. package/dist/orchestrator-tools-DXwr8Sp3.js.map +0 -1
  150. package/dist/package-json-xt3eeyBI.js.map +0 -1
  151. package/dist/package-manager-DR23m5Jg.js +0 -290
  152. package/dist/package-manager-DR23m5Jg.js.map +0 -1
  153. package/dist/pi-mY8I2XkG.js.map +0 -1
  154. package/dist/playground-CDUUKLkC.js.map +0 -1
  155. package/dist/posthog-Hc_-9wrr.js.map +0 -1
  156. package/dist/provisioning-xfdjhFtA.js.map +0 -1
  157. package/dist/queue-tools-C8y_xZJi.js.map +0 -1
  158. package/dist/registry-DTmREJ-f.js.map +0 -1
  159. package/dist/security-Dw2oFJjP.js.map +0 -1
  160. package/dist/setup-utils-fjJTBhaB.js.map +0 -1
  161. package/dist/start-tui-UNe2xQ0U.js.map +0 -1
  162. package/dist/store-Bic4Cr3L.js.map +0 -1
  163. package/dist/subagent-Dz41vV9j.js.map +0 -1
  164. package/dist/task-5-fw_Vw3.js.map +0 -1
  165. package/dist/task-stream-dVzl6b_q.js.map +0 -1
  166. package/dist/tasks-D1c2z1aw.js.map +0 -1
  167. package/dist/telemetry-BRnxBRWK.js.map +0 -1
  168. package/dist/terminal-9bvRa4Qt.js.map +0 -1
  169. package/dist/tools-Dp6i9k70.js.map +0 -1
  170. package/dist/wizard-abort-CAcInAxg.js +0 -2
  171. package/dist/wizard-abort-lE6umflt.js.map +0 -1
  172. package/dist/wizard-session-CYvyYnti.js +0 -2
  173. package/dist/wizard-session-FSJCkTcP.js.map +0 -1
  174. package/dist/yara-hooks-BTNJ6MGW.js.map +0 -1
  175. package/dist/yara-hooks-CFY4pGcW.js +0 -2
package/README.md CHANGED
@@ -149,20 +149,27 @@ npx @posthog/wizard@latest skill <skill-name> # run one by name
149
149
 
150
150
  Reviews are auto-requested via [`.github/CODEOWNERS`](.github/CODEOWNERS) — the
151
151
  file is the source of truth; this table just mirrors it for readability.
152
- `team-wizard-docs` is the default reviewer; the team-owned programs below
152
+ `team-wizard-docs` is the default reviewer; the team-owned paths below
153
153
  route review to their owning team instead.
154
154
 
155
155
  | Path | Owning team |
156
156
  |---|---|
157
157
  | `*` (everything else, including all other programs) | `@PostHog/team-wizard-docs` |
158
- | `src/lib/agent/` | `@PostHog/team-wizard-docs` |
159
- | `src/lib/programs/posthog-integration/` | `@PostHog/team-wizard-docs` |
160
- | `src/lib/programs/error-tracking-upload-source-maps/` | `@PostHog/team-error-tracking` |
161
- | `src/lib/programs/mcp-analytics/` | `@PostHog/team-mcp-analytics` |
162
- | `src/lib/programs/revenue-analytics/` | `@PostHog/team-web-analytics` |
163
- | `src/lib/programs/self-driving/` | `@PostHog/team-self-driving` |
164
- | `src/lib/programs/warehouse-source/` | `@PostHog/team-warehouse-sources` |
165
- | `src/lib/programs/web-analytics-doctor/` | `@PostHog/team-web-analytics` |
158
+ | `src/agent/` | `@PostHog/team-wizard-docs` |
159
+ | `src/programs/ai-observability/` | `@PostHog/team-ai-observability` |
160
+ | `src/programs/posthog-integration/` | `@PostHog/team-wizard-docs` |
161
+ | `src/programs/error-tracking-upload-source-maps/` | `@PostHog/team-error-tracking` |
162
+ | `src/programs/mcp-analytics/` | `@PostHog/team-mcp-analytics` |
163
+ | `src/programs/metrics/` | `@PostHog/apm` |
164
+ | `src/programs/replay-vision/` | `@PostHog/team-replay` |
165
+ | `src/programs/revenue-analytics/` | `@PostHog/team-web-analytics` |
166
+ | `src/programs/self-driving/` | `@PostHog/team-self-driving` |
167
+ | `src/programs/warehouse-source/` | `@PostHog/team-warehouse-sources` |
168
+ | `src/programs/web-analytics-doctor/` | `@PostHog/team-web-analytics` |
169
+ | `src/ui/tui/decks/error-tracking-upload-source-maps/` | `@PostHog/team-error-tracking` |
170
+ | `src/ui/tui/decks/revenue-analytics/` | `@PostHog/team-web-analytics` |
171
+ | `src/ui/tui/decks/self-driving/` | `@PostHog/team-self-driving` |
172
+ | `src/ui/tui/decks/warehouse-source/` | `@PostHog/team-warehouse-sources` |
166
173
 
167
174
  Ownership is by directory. Programs not listed above
168
175
  (`agent-skill`, `audit`, `events-audit`, `mcp`, `migration`, `posthog-doctor`,
@@ -267,21 +274,32 @@ When creating your personal API key, grant it the wizard's base scope set:
267
274
  ```
268
275
  user:read project:read organization:read llm_gateway:read query:read
269
276
  dashboard:write insight:write notebook:write event_definition:write
270
- health_issue:read wizard_session:read wizard_session:write
277
+ health_issue:read wizard_session:read wizard_session:write wizard_run:write
271
278
  ```
272
279
 
273
- The source of truth is `WIZARD_OAUTH_SCOPES` in `src/lib/constants.ts`, which
280
+ The source of truth is `WIZARD_OAUTH_SCOPES` in `src/shared/constants.ts`, which
274
281
  documents why each scope is needed — if this block drifts, trust the code.
275
282
  Some programs request more on top (`PROGRAM_SCOPE_ADDITIONS` in
276
- `src/lib/oauth/program-scopes.ts`); the default integration flow adds
283
+ `src/programs/oauth/program-scopes.ts`); the default integration flow adds
277
284
  `integration:read` and `external_data_source:read` /
278
285
  `external_data_source:write`.
279
286
 
287
+ The `wizard-run-sync` flag selects remote synchronization: `wizard-session`
288
+ (the default) uses WizardSession; `wizard-run` uses WizardRun. In the latter
289
+ mode, local executions synchronize tasks and terminal status. Cloud executions
290
+ require an explicit `POSTHOG_WIZARD_RUN_ID` assignment and leave terminal status
291
+ to their worker. See [WizardRun synchronization](docs/local-dev.md#wizardrun-synchronization)
292
+ for limits, shutdown behavior, migration compatibility, and deployment checks.
293
+
280
294
  ### OAuth app scope ceiling
281
295
 
296
+ Both the interactive and cloud Wizard OAuth apps must allow `wizard_run:write`
297
+ in every deployed region. Existing tokens need renewed authorization; refresh
298
+ does not add the grant. Run synchronization needs no read scope.
299
+
282
300
  The wizard's OAuth app on the PostHog side caps the scopes its tokens may
283
301
  carry (`OAuthApplication.scopes`). Any scope requested in this repo (see
284
- `src/lib/oauth/program-scopes.ts`) must be grantable under that ceiling, or
302
+ `src/programs/oauth/program-scopes.ts`) must be grantable under that ceiling, or
285
303
  `/authorize` drops it and the call that needs it 403s.
286
304
 
287
305
  **A granted token can be narrower than the request even with a correct
@@ -291,7 +309,7 @@ are clamped silently (`clamp_scopes_to_ceiling`) — neither path errors;
291
309
  `/oauth/token` just returns a smaller `scope`. So never assume the token
292
310
  carries what was requested: the token response's `scope` field is the truth.
293
311
  The wizard diffs granted vs requested at login (`missingOAuthScopes` in
294
- `src/utils/oauth.ts`), warns the user which permissions are missing, and emits
312
+ `src/shared/utils/oauth.ts`), warns the user which permissions are missing, and emits
295
313
  `wizard: oauth grant narrowed` so narrowed runs are countable in analytics.
296
314
  The diff also rides on the session (`credentials.missingScopes`), so when a
297
315
  run does fail on a scope-gated step, the error names the missing permission
@@ -310,7 +328,7 @@ every scope in `WIZARD_OAUTH_SCOPES`:
310
328
 
311
329
  ```
312
330
  python manage.py seed_oauth_app_scopes --client-id <id> --dry-run \
313
- --scopes "@default,llm_gateway:read,wizard_session:read,wizard_session:write,user:read,project:read,organization:read,query:read,dashboard:write,insight:write,notebook:write,event_definition:write,health_issue:read"
331
+ --scopes "@default,llm_gateway:read,wizard_session:read,wizard_session:write,wizard_run:write,user:read,project:read,organization:read,query:read,dashboard:write,insight:write,notebook:write,event_definition:write,health_issue:read"
314
332
  ```
315
333
 
316
334
  then re-run without `--dry-run`. Keep `@default` in the list — dropping it
@@ -396,7 +414,7 @@ and set up the general flow of the application.
396
414
  ## Analytics
397
415
 
398
416
  Did you know you can capture PostHog events even for smaller, supporting
399
- products like a command line tool? `src/utils/analytics.ts` is a great example
417
+ products like a command line tool? `src/shared/utils/analytics.ts` is a great example
400
418
  of how to do it.
401
419
 
402
420
  This file wraps `posthog-node` with some convenience functions to set up an
@@ -405,19 +423,19 @@ wizard alongside all of our other PostHog product data, and this is very
405
423
  powerful. For example: we could show in-product surveys to people who have used
406
424
  the wizard to improve the experience.
407
425
 
408
- When the user authenticates, the wizard also streams live run state — current
426
+ With `wizard-run-sync=wizard-session`, the wizard streams live run state — current
409
427
  phase, task list, planned events — to `POST /api/projects/{id}/wizard/sessions/`
410
428
  so the PostHog web app can render real-time progress. Updates are debounced
411
429
  (250ms) with phase changes flushed immediately; failures fall back silently to
412
430
  the wizard's debug log without disturbing the TUI. Pass `--no-telemetry` (or
413
- set `POSTHOG_WIZARD_NO_TELEMETRY=1`) to disable.
431
+ set `POSTHOG_WIZARD_NO_TELEMETRY=1`) to disable either remote transport.
414
432
 
415
433
  ## Leave rules behind
416
434
 
417
435
  Supporting agent sessions after we leave is important. There are plenty of ways
418
436
  to break or misconfigure PostHog, so guarding against this is key.
419
437
 
420
- `src/utils/rules/add-editor-rules.ts` demonstrates how to dynamically construct
438
+ `src/shared/utils/rules/add-editor-rules.ts` demonstrates how to dynamically construct
421
439
  rules files and store them in the project's `.cursor/rules` directory.
422
440
 
423
441
  ## Prompts and LLM interactions
@@ -433,7 +451,7 @@ _If_ they are well prompted.
433
451
  chaotic process. Every wizard session gets the same prompt, tailored to the
434
452
  specific files in the project.
435
453
 
436
- These prompts are channeled using `src/utils/query.ts` to an LLM interface we
454
+ These prompts are channeled using `src/shared/utils/query.ts` to an LLM interface we
437
455
  host. This gives us more control: we can be certain of the model version and
438
456
  provider which interpret the prompts and modify the files. This way, we can find
439
457
  the right tools for the job and again, apply them consistently.
@@ -450,14 +468,14 @@ orchestrates that journey, but the raw value should _never_ enter the LLM
450
468
  conversation, where it would be sent to the model provider, written to
451
469
  transcripts, and captured in logs.
452
470
 
453
- `src/lib/secret-vault.ts` is a small, reusable pattern for exactly this. It's a
471
+ `src/shared/secret-vault.ts` is a small, reusable pattern for exactly this. It's a
454
472
  session-scoped, in-memory vault: a tool that handles a secret calls `put()` to
455
473
  store the raw value and hands the agent an opaque `secret:<uuid>` reference
456
474
  instead. The agent passes that ref between tools as if it were the value; the
457
475
  host resolves it back to the real secret only at the last moment, inside the
458
476
  process, when it writes the file.
459
477
 
460
- Two tools in `src/lib/wizard-tools.ts` form the ends of that pipe:
478
+ Two tools in `src/agent/tools/tools.ts` form the ends of that pipe:
461
479
 
462
480
  - `wizard_ask` with `sensitive: true` vaults the user's typed answer and returns
463
481
  `{ secretRef: "secret:..." }` to the agent rather than the string.
@@ -504,10 +522,16 @@ Path aliases defined in `tsconfig.build.json`, resolved by tsdown:
504
522
  |---|---|
505
523
  | `@env` | `src/env.ts` |
506
524
  | `@lib/*` | `src/lib/*` |
507
- | `@utils/*` | `src/utils/*` |
525
+ | `@agent` | `src/agent/index.ts`, the agent's runtime entry; the only agent import outside `src/agent` besides types |
526
+ | `@agent/types` | `src/agent/types.ts`, type-only |
527
+ | `@agent/*` | `src/agent/*`, inside `src/agent` and its tests only |
528
+ | `@programs` | `src/programs/index.ts`, the programs runtime entry |
529
+ | `@programs/types` | `src/programs/types.ts`, type-only |
530
+ | `@programs/*` | `src/programs/*`, retained for internal imports and tracked migration edges |
531
+ | `@shared/*` | `src/shared/*` |
532
+ | `@utils/*` | `src/shared/utils/*` |
508
533
  | `@ui/*` | `src/ui/*` |
509
534
  | `@steps/*` | `src/steps/*` |
510
- | `@frameworks/*` | `src/frameworks/*` |
511
535
 
512
536
  ## Running locally
513
537
 
@@ -605,7 +629,7 @@ To make your version of a tool usable with a one-line `npx` command:
605
629
 
606
630
  # Health checks
607
631
 
608
- `src/lib/health-checks/` checks skills download origins before the wizard runs.
632
+ `src/shared/health-checks/` checks skills download origins before the wizard runs.
609
633
  The entry point is `evaluateWizardReadiness()`, which only blocks on skill downloads:
610
634
 
611
635
  | Decision | Meaning |
@@ -645,7 +669,7 @@ gateway URL and reports an unavailable gateway through the existing error path.
645
669
 
646
670
  `skillsOrigin` is one entry covering two origins: skills are published to
647
671
  GitHub Releases and an AWS mirror under the same filenames, and downloads fail
648
- over between them (`src/lib/fetch-retry.ts`). Both are probed in parallel, so
672
+ over between them (`src/shared/fetch-retry.ts`). Both are probed in parallel, so
649
673
  the key only reports **Down** when neither origin answers — a GitHub Releases
650
674
  outage on its own doesn't block a run, including a 403 or 404, which is as
651
675
  often about the origin (expired asset redirect, blocked region, a publish that
@@ -1,8 +1,9 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-B_-DWIq7.js";
2
- import { Ct as runtimeEnv, p as getUI, r as debug } from "./debug-B4kzIZPi.js";
3
- import { n as analytics } from "./analytics-C67F2vee.js";
4
- import { n as openTrackedLink, t as withProgress } from "./telemetry-BRnxBRWK.js";
5
- import { a as getNativeHTTPServerConfig, d as scrubHomePaths, i as getDefaultServerConfig, l as namesWithStatus, p as toClientResult, r as buildMCPUrl, s as expectedFailureHint, t as ALL_FEATURE_VALUES, u as redactSecrets } from "./defaults-4c4YwTmW.js";
2
+ import { r as debug, v as runtimeEnv } from "./debug-Cj-8vfXY.js";
3
+ import { n as analytics } from "./analytics-VRYdebXW.js";
4
+ import { n as openTrackedLink, t as withProgress } from "./telemetry-Bpv-Mh5B.js";
5
+ import { t as getUI } from "./ui-CGXtC7Vn.js";
6
+ import { a as getNativeHTTPServerConfig, d as scrubHomePaths, i as getDefaultServerConfig, l as namesWithStatus, p as toClientResult, r as buildMCPUrl, s as expectedFailureHint, t as ALL_FEATURE_VALUES, u as redactSecrets } from "./defaults-C6J7yL4O.js";
6
7
  import * as fs$2 from "fs";
7
8
  import * as path$3 from "path";
8
9
  import * as os from "node:os";
@@ -1214,4 +1215,4 @@ const removeMCPServer = async (clients, local) => {
1214
1215
  //#endregion
1215
1216
  export { getSupportedClients as a, removeMCPServer as c, getInstalledClients as i, removeMCPServerFromClientsStep as l, addMCPServerToClientsStep as n, getSupportedPluginClients as o, add_mcp_server_to_clients_exports as r, installPlugins as s, addMCPServer as t, isPluginCapable as u };
1216
1217
 
1217
- //# sourceMappingURL=add-mcp-server-to-clients-BnRyE4pw.js.map
1218
+ //# sourceMappingURL=add-mcp-server-to-clients-amlJWW7W.js.map