@posthog/wizard 2.76.1 → 2.78.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.
- package/README.md +30 -15
- package/dist/README.md +16 -15
- package/dist/{add-mcp-server-to-clients-4yHaRvOo.js → add-mcp-server-to-clients-JMv8LP-O.js} +429 -114
- package/dist/add-mcp-server-to-clients-JMv8LP-O.js.map +1 -0
- package/dist/agent-bCZ3i3fh.js +3085 -0
- package/dist/agent-bCZ3i3fh.js.map +1 -0
- package/dist/{agent-interface-DPaPdIjS.js → agent-interface-BAOIHuXS.js} +452 -377
- package/dist/agent-interface-BAOIHuXS.js.map +1 -0
- package/dist/{agent-prompt-loader-BlhabNM2.js → agent-prompt-loader-7Pd4CfZO.js} +24 -8
- package/dist/agent-prompt-loader-7Pd4CfZO.js.map +1 -0
- package/dist/analytics-BcV-WCM4.js +2 -0
- package/dist/{analytics-DSVyjIVF.js → analytics-CHCZ_qUR.js} +10 -6
- package/dist/analytics-CHCZ_qUR.js.map +1 -0
- package/dist/{api-Ci0dZWLR.js → api-Diy_2fp8.js} +4 -17
- package/dist/api-Diy_2fp8.js.map +1 -0
- package/dist/bin.js +410 -68
- package/dist/bin.js.map +1 -1
- package/dist/{bounded-fs-FbZJ_vJ_.js → bounded-fs-Bx9zTe6m.js} +4 -4
- package/dist/bounded-fs-Bx9zTe6m.js.map +1 -0
- package/dist/check-screens.tsx +1 -1
- package/dist/{ci-install-CEVCqahf.js → ci-install-CDdQYsPe.js} +6 -5
- package/dist/ci-install-CDdQYsPe.js.map +1 -0
- package/dist/constants-jFI2SaE1.js +260 -0
- package/dist/constants-jFI2SaE1.js.map +1 -0
- package/dist/debug-Ch4BDOtD.js +171 -0
- package/dist/debug-Ch4BDOtD.js.map +1 -0
- package/dist/{debug-C6KWXbQi.js → debug-M2gV2iDq.js} +1 -1
- package/dist/{defaults-DulzMJpN.js → defaults-C6J7yL4O.js} +26 -3
- package/dist/defaults-C6J7yL4O.js.map +1 -0
- package/dist/endpoints-DCVbM06L.js +108 -0
- package/dist/endpoints-DCVbM06L.js.map +1 -0
- package/dist/{env-api-key-DwmkB3fm.js → env-api-key-Qx8NnYHm.js} +3 -3
- package/dist/env-api-key-Qx8NnYHm.js.map +1 -0
- package/dist/{environment-1wA7uwAS.js → environment-B07Bmxae.js} +6 -6
- package/dist/environment-B07Bmxae.js.map +1 -0
- package/dist/{errors--OqLxmWR.js → errors-CQ9kttJD.js} +30 -35
- package/dist/errors-CQ9kttJD.js.map +1 -0
- package/dist/{file-C3HGL1IM.js → file-BcLTjU16.js} +2 -2
- package/dist/{file-C3HGL1IM.js.map → file-BcLTjU16.js.map} +1 -1
- package/dist/{file-watcher-D8s0b-VT.js → file-watcher-DWc_bTs6.js} +2 -2
- package/dist/{file-watcher-D8s0b-VT.js.map → file-watcher-DWc_bTs6.js.map} +1 -1
- package/dist/{gateway-session-OqzCMpZ9.js → gateway-CjoShdLa.js} +175 -20
- package/dist/gateway-CjoShdLa.js.map +1 -0
- package/dist/generate-version.cjs +1 -1
- package/dist/{headless-ui-DRGWDg9Z.js → headless-ui-BFFmYC4v.js} +13 -2
- package/dist/headless-ui-BFFmYC4v.js.map +1 -0
- package/dist/{interactive-B6OlvhSf.js → interactive-D6zV7brJ.js} +2 -2
- package/dist/{interactive-B6OlvhSf.js.map → interactive-D6zV7brJ.js.map} +1 -1
- package/dist/{local-dev-DPZiIPCK.js → local-dev-McsurOC-.js} +2 -2
- package/dist/local-dev-McsurOC-.js.map +1 -0
- package/dist/logging-ui-_TwoMNbG.js +226 -0
- package/dist/logging-ui-_TwoMNbG.js.map +1 -0
- package/dist/mcp-DAgaoGk5.js +97 -0
- package/dist/mcp-DAgaoGk5.js.map +1 -0
- package/dist/{mcp-prompt-streaming-E1d8DJcX.js → mcp-prompt-streaming-I2U_X7BC.js} +7 -6
- package/dist/mcp-prompt-streaming-I2U_X7BC.js.map +1 -0
- package/dist/{mint-failure-C82j0RMC.js → mint-failure-D4nd2XmZ.js} +134 -48
- package/dist/mint-failure-D4nd2XmZ.js.map +1 -0
- package/dist/models-DDdBJKwT.js +83 -0
- package/dist/models-DDdBJKwT.js.map +1 -0
- package/dist/{non-interactive-DGT2H_n4.js → non-interactive-Dzow7YKY.js} +3 -3
- package/dist/non-interactive-Dzow7YKY.js.map +1 -0
- package/dist/oauth-session-DJ8h6GFa.js +74 -0
- package/dist/oauth-session-DJ8h6GFa.js.map +1 -0
- package/dist/{orchestrator-tools-BBBNV1z5.js → orchestrator-tools-szcdscwn.js} +5 -5
- package/dist/orchestrator-tools-szcdscwn.js.map +1 -0
- package/dist/{package-json-xt3eeyBI.js → package-json-DY70kkNp.js} +2 -2
- package/dist/package-json-DY70kkNp.js.map +1 -0
- package/dist/{pi-fG5fT50Y.js → pi-D3h5Ok0i.js} +329 -65
- package/dist/pi-D3h5Ok0i.js.map +1 -0
- package/dist/{playground-UFSHP-Yn.js → playground-5AB4WgNF.js} +18 -10
- package/dist/playground-5AB4WgNF.js.map +1 -0
- package/dist/{posthog-O9kKcnda.js → posthog-DNn574nW.js} +8 -3
- package/dist/posthog-DNn574nW.js.map +1 -0
- package/dist/{provisioning-B-tzjG4r.js → provisioning-B8uSqRZk.js} +6 -5
- package/dist/provisioning-B8uSqRZk.js.map +1 -0
- package/dist/{queue-tools-7Oso-fpt.js → queue-tools-9OOVx5TE.js} +11 -86
- package/dist/queue-tools-9OOVx5TE.js.map +1 -0
- package/dist/{registry-D1L5e-WQ.js → registry-8YG-kuXk.js} +265 -6
- package/dist/registry-8YG-kuXk.js.map +1 -0
- package/dist/run-agent-legacy-d7rWlzQR.js +3739 -0
- package/dist/run-agent-legacy-d7rWlzQR.js.map +1 -0
- package/dist/{security-n3-xdINN.js → security-Cg_4a7vB.js} +6 -6
- package/dist/security-Cg_4a7vB.js.map +1 -0
- package/dist/{setup-utils-Bj0gejEf.js → setup-utils-CmTCTPkX.js} +46 -18
- package/dist/setup-utils-CmTCTPkX.js.map +1 -0
- package/dist/smoke-test.sh +1 -1
- package/dist/{start-tui-BowrTPXm.js → start-tui-CB2PZs1x.js} +42 -48
- package/dist/start-tui-CB2PZs1x.js.map +1 -0
- package/dist/{steps-CpNTGu9N.js → steps-BZcXRJNY.js} +7 -7
- package/dist/{steps-CpNTGu9N.js.map → steps-BZcXRJNY.js.map} +1 -1
- package/dist/{store-CVkJKlny.js → store-UN7c-ASf.js} +18 -55
- package/dist/store-UN7c-ASf.js.map +1 -0
- package/dist/{subagent-SxmvfDfp.js → subagent-BofIDK-O.js} +8 -3
- package/dist/subagent-BofIDK-O.js.map +1 -0
- package/dist/{task-nF7Ry8ff.js → task-r9t1UhQP.js} +124 -36
- package/dist/task-r9t1UhQP.js.map +1 -0
- package/dist/{task-stream-C9BLiAhz.js → task-stream-CMUilu54.js} +45 -15
- package/dist/task-stream-CMUilu54.js.map +1 -0
- package/dist/{tasks-BEEVIBcT.js → tasks-Bbv_lOBG.js} +17 -13
- package/dist/tasks-Bbv_lOBG.js.map +1 -0
- package/dist/{telemetry-PD7bhcda.js → telemetry-D6ruCtnv.js} +5 -5
- package/dist/telemetry-D6ruCtnv.js.map +1 -0
- package/dist/{terminal-NhNl-BIA.js → terminal-DrGyci_a.js} +63 -94
- package/dist/terminal-DrGyci_a.js.map +1 -0
- package/dist/{tools-BBdpgcIf.js → tools-Dyfh9aCD.js} +11 -11
- package/dist/tools-Dyfh9aCD.js.map +1 -0
- package/dist/ui-BBVuTM1v.js +15 -0
- package/dist/ui-BBVuTM1v.js.map +1 -0
- package/dist/version-aXxpgRKx.js +6 -0
- package/dist/version-aXxpgRKx.js.map +1 -0
- package/dist/warlock-smoke-test.ts +2 -2
- package/dist/{wizard-abort-hqHF-9xD.js → wizard-abort-BBkiUxfS.js} +23 -20
- package/dist/wizard-abort-BBkiUxfS.js.map +1 -0
- package/dist/wizard-abort-BU4aLyvh.js +3 -0
- package/dist/{wizard-session-FSJCkTcP.js → wizard-session-2w4Ru-Wz.js} +12 -16
- package/dist/wizard-session-2w4Ru-Wz.js.map +1 -0
- package/dist/wizard-session-DGaUHOF3.js +2 -0
- package/dist/wizard-ui-DoyOZxK8.js +16 -0
- package/dist/wizard-ui-DoyOZxK8.js.map +1 -0
- package/dist/{yara-hooks-BaPKsm-B.js → yara-hooks-DCeMDd1o.js} +19 -68
- package/dist/yara-hooks-DCeMDd1o.js.map +1 -0
- package/dist/yara-hooks-DSGuCU9A.js +2 -0
- package/package.json +8 -1
- package/dist/add-mcp-server-to-clients-4yHaRvOo.js.map +0 -1
- package/dist/agent-interface-DPaPdIjS.js.map +0 -1
- package/dist/agent-prompt-loader-BlhabNM2.js.map +0 -1
- package/dist/agent-runner-JFwQQj2k.js +0 -6100
- package/dist/agent-runner-JFwQQj2k.js.map +0 -1
- package/dist/analytics-CcHoyhE_.js +0 -2
- package/dist/analytics-DSVyjIVF.js.map +0 -1
- package/dist/api-Ci0dZWLR.js.map +0 -1
- package/dist/bounded-fs-FbZJ_vJ_.js.map +0 -1
- package/dist/ci-install-CEVCqahf.js.map +0 -1
- package/dist/debug-DWYDVp0B.js +0 -750
- package/dist/debug-DWYDVp0B.js.map +0 -1
- package/dist/defaults-DulzMJpN.js.map +0 -1
- package/dist/env-api-key-DwmkB3fm.js.map +0 -1
- package/dist/environment-1wA7uwAS.js.map +0 -1
- package/dist/errors--OqLxmWR.js.map +0 -1
- package/dist/gateway-session-OqzCMpZ9.js.map +0 -1
- package/dist/gateway-session-s1xr8b48.js +0 -2
- package/dist/headless-ui-DRGWDg9Z.js.map +0 -1
- package/dist/local-dev-DPZiIPCK.js.map +0 -1
- package/dist/mcp-BprhJJ2c.js +0 -64
- package/dist/mcp-BprhJJ2c.js.map +0 -1
- package/dist/mcp-prompt-streaming-E1d8DJcX.js.map +0 -1
- package/dist/mint-failure-C82j0RMC.js.map +0 -1
- package/dist/non-interactive-DGT2H_n4.js.map +0 -1
- package/dist/orchestrator-tools-BBBNV1z5.js.map +0 -1
- package/dist/package-json-xt3eeyBI.js.map +0 -1
- package/dist/package-manager-DU3aVif4.js +0 -290
- package/dist/package-manager-DU3aVif4.js.map +0 -1
- package/dist/pi-fG5fT50Y.js.map +0 -1
- package/dist/playground-UFSHP-Yn.js.map +0 -1
- package/dist/posthog-O9kKcnda.js.map +0 -1
- package/dist/provisioning-B-tzjG4r.js.map +0 -1
- package/dist/queue-tools-7Oso-fpt.js.map +0 -1
- package/dist/registry-D1L5e-WQ.js.map +0 -1
- package/dist/security-n3-xdINN.js.map +0 -1
- package/dist/setup-utils-Bj0gejEf.js.map +0 -1
- package/dist/start-tui-BowrTPXm.js.map +0 -1
- package/dist/store-CVkJKlny.js.map +0 -1
- package/dist/subagent-SxmvfDfp.js.map +0 -1
- package/dist/task-nF7Ry8ff.js.map +0 -1
- package/dist/task-stream-C9BLiAhz.js.map +0 -1
- package/dist/tasks-BEEVIBcT.js.map +0 -1
- package/dist/telemetry-PD7bhcda.js.map +0 -1
- package/dist/terminal-NhNl-BIA.js.map +0 -1
- package/dist/tools-BBdpgcIf.js.map +0 -1
- package/dist/wizard-abort-D3YA1hXX.js +0 -2
- package/dist/wizard-abort-hqHF-9xD.js.map +0 -1
- package/dist/wizard-session-CYvyYnti.js +0 -2
- package/dist/wizard-session-FSJCkTcP.js.map +0 -1
- package/dist/yara-hooks-BaPKsm-B.js.map +0 -1
- package/dist/yara-hooks-CwfQuEl3.js +0 -2
package/README.md
CHANGED
|
@@ -155,7 +155,7 @@ route review to their owning team instead.
|
|
|
155
155
|
| Path | Owning team |
|
|
156
156
|
|---|---|
|
|
157
157
|
| `*` (everything else, including all other programs) | `@PostHog/team-wizard-docs` |
|
|
158
|
-
| `src/
|
|
158
|
+
| `src/agent/` | `@PostHog/team-wizard-docs` |
|
|
159
159
|
| `src/lib/programs/posthog-integration/` | `@PostHog/team-wizard-docs` |
|
|
160
160
|
| `src/lib/programs/error-tracking-upload-source-maps/` | `@PostHog/team-error-tracking` |
|
|
161
161
|
| `src/lib/programs/mcp-analytics/` | `@PostHog/team-mcp-analytics` |
|
|
@@ -267,18 +267,29 @@ When creating your personal API key, grant it the wizard's base scope set:
|
|
|
267
267
|
```
|
|
268
268
|
user:read project:read organization:read llm_gateway:read query:read
|
|
269
269
|
dashboard:write insight:write notebook:write event_definition:write
|
|
270
|
-
health_issue:read wizard_session:read wizard_session:write
|
|
270
|
+
health_issue:read wizard_session:read wizard_session:write wizard_run:write
|
|
271
271
|
```
|
|
272
272
|
|
|
273
|
-
The source of truth is `WIZARD_OAUTH_SCOPES` in `src/
|
|
273
|
+
The source of truth is `WIZARD_OAUTH_SCOPES` in `src/shared/constants.ts`, which
|
|
274
274
|
documents why each scope is needed — if this block drifts, trust the code.
|
|
275
275
|
Some programs request more on top (`PROGRAM_SCOPE_ADDITIONS` in
|
|
276
276
|
`src/lib/oauth/program-scopes.ts`); the default integration flow adds
|
|
277
277
|
`integration:read` and `external_data_source:read` /
|
|
278
278
|
`external_data_source:write`.
|
|
279
279
|
|
|
280
|
+
The `wizard-run-sync` flag selects remote synchronization: `wizard-session`
|
|
281
|
+
(the default) uses WizardSession; `wizard-run` uses WizardRun. In the latter
|
|
282
|
+
mode, local executions synchronize tasks and terminal status. Cloud executions
|
|
283
|
+
require an explicit `POSTHOG_WIZARD_RUN_ID` assignment and leave terminal status
|
|
284
|
+
to their worker. See [WizardRun synchronization](docs/local-dev.md#wizardrun-synchronization)
|
|
285
|
+
for limits, shutdown behavior, migration compatibility, and deployment checks.
|
|
286
|
+
|
|
280
287
|
### OAuth app scope ceiling
|
|
281
288
|
|
|
289
|
+
Both the interactive and cloud Wizard OAuth apps must allow `wizard_run:write`
|
|
290
|
+
in every deployed region. Existing tokens need renewed authorization; refresh
|
|
291
|
+
does not add the grant. Run synchronization needs no read scope.
|
|
292
|
+
|
|
282
293
|
The wizard's OAuth app on the PostHog side caps the scopes its tokens may
|
|
283
294
|
carry (`OAuthApplication.scopes`). Any scope requested in this repo (see
|
|
284
295
|
`src/lib/oauth/program-scopes.ts`) must be grantable under that ceiling, or
|
|
@@ -291,7 +302,7 @@ are clamped silently (`clamp_scopes_to_ceiling`) — neither path errors;
|
|
|
291
302
|
`/oauth/token` just returns a smaller `scope`. So never assume the token
|
|
292
303
|
carries what was requested: the token response's `scope` field is the truth.
|
|
293
304
|
The wizard diffs granted vs requested at login (`missingOAuthScopes` in
|
|
294
|
-
`src/utils/oauth.ts`), warns the user which permissions are missing, and emits
|
|
305
|
+
`src/shared/utils/oauth.ts`), warns the user which permissions are missing, and emits
|
|
295
306
|
`wizard: oauth grant narrowed` so narrowed runs are countable in analytics.
|
|
296
307
|
The diff also rides on the session (`credentials.missingScopes`), so when a
|
|
297
308
|
run does fail on a scope-gated step, the error names the missing permission
|
|
@@ -310,7 +321,7 @@ every scope in `WIZARD_OAUTH_SCOPES`:
|
|
|
310
321
|
|
|
311
322
|
```
|
|
312
323
|
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"
|
|
324
|
+
--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
325
|
```
|
|
315
326
|
|
|
316
327
|
then re-run without `--dry-run`. Keep `@default` in the list — dropping it
|
|
@@ -396,7 +407,7 @@ and set up the general flow of the application.
|
|
|
396
407
|
## Analytics
|
|
397
408
|
|
|
398
409
|
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
|
|
410
|
+
products like a command line tool? `src/shared/utils/analytics.ts` is a great example
|
|
400
411
|
of how to do it.
|
|
401
412
|
|
|
402
413
|
This file wraps `posthog-node` with some convenience functions to set up an
|
|
@@ -405,19 +416,19 @@ wizard alongside all of our other PostHog product data, and this is very
|
|
|
405
416
|
powerful. For example: we could show in-product surveys to people who have used
|
|
406
417
|
the wizard to improve the experience.
|
|
407
418
|
|
|
408
|
-
|
|
419
|
+
With `wizard-run-sync=wizard-session`, the wizard streams live run state — current
|
|
409
420
|
phase, task list, planned events — to `POST /api/projects/{id}/wizard/sessions/`
|
|
410
421
|
so the PostHog web app can render real-time progress. Updates are debounced
|
|
411
422
|
(250ms) with phase changes flushed immediately; failures fall back silently to
|
|
412
423
|
the wizard's debug log without disturbing the TUI. Pass `--no-telemetry` (or
|
|
413
|
-
set `POSTHOG_WIZARD_NO_TELEMETRY=1`) to disable.
|
|
424
|
+
set `POSTHOG_WIZARD_NO_TELEMETRY=1`) to disable either remote transport.
|
|
414
425
|
|
|
415
426
|
## Leave rules behind
|
|
416
427
|
|
|
417
428
|
Supporting agent sessions after we leave is important. There are plenty of ways
|
|
418
429
|
to break or misconfigure PostHog, so guarding against this is key.
|
|
419
430
|
|
|
420
|
-
`src/utils/rules/add-editor-rules.ts` demonstrates how to dynamically construct
|
|
431
|
+
`src/shared/utils/rules/add-editor-rules.ts` demonstrates how to dynamically construct
|
|
421
432
|
rules files and store them in the project's `.cursor/rules` directory.
|
|
422
433
|
|
|
423
434
|
## Prompts and LLM interactions
|
|
@@ -433,7 +444,7 @@ _If_ they are well prompted.
|
|
|
433
444
|
chaotic process. Every wizard session gets the same prompt, tailored to the
|
|
434
445
|
specific files in the project.
|
|
435
446
|
|
|
436
|
-
These prompts are channeled using `src/utils/query.ts` to an LLM interface we
|
|
447
|
+
These prompts are channeled using `src/shared/utils/query.ts` to an LLM interface we
|
|
437
448
|
host. This gives us more control: we can be certain of the model version and
|
|
438
449
|
provider which interpret the prompts and modify the files. This way, we can find
|
|
439
450
|
the right tools for the job and again, apply them consistently.
|
|
@@ -450,14 +461,14 @@ orchestrates that journey, but the raw value should _never_ enter the LLM
|
|
|
450
461
|
conversation, where it would be sent to the model provider, written to
|
|
451
462
|
transcripts, and captured in logs.
|
|
452
463
|
|
|
453
|
-
`src/
|
|
464
|
+
`src/shared/secret-vault.ts` is a small, reusable pattern for exactly this. It's a
|
|
454
465
|
session-scoped, in-memory vault: a tool that handles a secret calls `put()` to
|
|
455
466
|
store the raw value and hands the agent an opaque `secret:<uuid>` reference
|
|
456
467
|
instead. The agent passes that ref between tools as if it were the value; the
|
|
457
468
|
host resolves it back to the real secret only at the last moment, inside the
|
|
458
469
|
process, when it writes the file.
|
|
459
470
|
|
|
460
|
-
Two tools in `src/
|
|
471
|
+
Two tools in `src/agent/tools/tools.ts` form the ends of that pipe:
|
|
461
472
|
|
|
462
473
|
- `wizard_ask` with `sensitive: true` vaults the user's typed answer and returns
|
|
463
474
|
`{ secretRef: "secret:..." }` to the agent rather than the string.
|
|
@@ -504,7 +515,11 @@ Path aliases defined in `tsconfig.build.json`, resolved by tsdown:
|
|
|
504
515
|
|---|---|
|
|
505
516
|
| `@env` | `src/env.ts` |
|
|
506
517
|
| `@lib/*` | `src/lib/*` |
|
|
507
|
-
| `@
|
|
518
|
+
| `@agent` | `src/agent/index.ts`, the agent's runtime entry; the only agent import outside `src/agent` besides types |
|
|
519
|
+
| `@agent/types` | `src/agent/types.ts`, type-only |
|
|
520
|
+
| `@agent/*` | `src/agent/*`, inside `src/agent` and its tests only |
|
|
521
|
+
| `@shared/*` | `src/shared/*` |
|
|
522
|
+
| `@utils/*` | `src/shared/utils/*` |
|
|
508
523
|
| `@ui/*` | `src/ui/*` |
|
|
509
524
|
| `@steps/*` | `src/steps/*` |
|
|
510
525
|
| `@frameworks/*` | `src/frameworks/*` |
|
|
@@ -605,7 +620,7 @@ To make your version of a tool usable with a one-line `npx` command:
|
|
|
605
620
|
|
|
606
621
|
# Health checks
|
|
607
622
|
|
|
608
|
-
`src/
|
|
623
|
+
`src/shared/health-checks/` checks skills download origins before the wizard runs.
|
|
609
624
|
The entry point is `evaluateWizardReadiness()`, which only blocks on skill downloads:
|
|
610
625
|
|
|
611
626
|
| Decision | Meaning |
|
|
@@ -645,7 +660,7 @@ gateway URL and reports an unavailable gateway through the existing error path.
|
|
|
645
660
|
|
|
646
661
|
`skillsOrigin` is one entry covering two origins: skills are published to
|
|
647
662
|
GitHub Releases and an AWS mirror under the same filenames, and downloads fail
|
|
648
|
-
over between them (`src/
|
|
663
|
+
over between them (`src/shared/fetch-retry.ts`). Both are probed in parallel, so
|
|
649
664
|
the key only reports **Down** when neither origin answers — a GitHub Releases
|
|
650
665
|
outage on its own doesn't block a run, including a 403 or 404, which is as
|
|
651
666
|
often about the origin (expired asset redirect, blocked region, a publish that
|
package/dist/README.md
CHANGED
|
@@ -12,17 +12,18 @@ real ink render) and is driven purely by store state manipulation; a PTY parent
|
|
|
12
12
|
([`e2e-harness/tui-capture.ts`](../e2e-harness/tui-capture.ts), node-pty +
|
|
13
13
|
`@xterm/headless`) captures the real rendered screen.
|
|
14
14
|
|
|
15
|
-
| Script
|
|
16
|
-
|
|
|
17
|
-
| **`tui-host.no-jest.ts`**
|
|
18
|
-
| **`tui-snapshots.no-jest.ts`**
|
|
19
|
-
| **`wizard-ci-mcp.no-jest.ts`**
|
|
20
|
-
| **`
|
|
15
|
+
| Script | What it does | Needs |
|
|
16
|
+
| ---------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------ |
|
|
17
|
+
| **`tui-host.no-jest.ts`** | Real TUI host: `MODE=fixed` follows a profile; `MODE=serve` accepts socket commands. | `APP_DIR`, `PROJECT_ID`, key for a full run, `SNAP_CTRL`; run under a PTY, with `CONTROL_SOCK` in serve mode |
|
|
18
|
+
| **`tui-snapshots.no-jest.ts`** | Runs the fixed host and saves colored `SNAP_OUT/NN-<screen>.ans` frames, including within-screen progress. | `SNAP_OUT`, `APP_DIR`, `PROJECT_ID`, `POSTHOG_KEY_FILE` or `POSTHOG_PERSONAL_API_KEY` |
|
|
19
|
+
| **`wizard-ci-mcp.no-jest.ts`** | Stdio MCP server: `open_app`, `read_state`, `perform_action`, `render_screen`, `run_agent`. Screen output is plain text. | Spawns the host; `open_app` requires `appDir` and `projectId`, with optional `keyFile`, `apiKey`, `region` |
|
|
20
|
+
| **`chunk-manifest.no-jest.ts`** | Prints a structural manifest of `dist/`: per chunk, the source files it contains and the chunks it imports, hash suffixes stripped. `--summary` prints chunk names plus the sorted source set. A reading tool, nothing diffs its output. | A built `dist/` |
|
|
21
|
+
| **`wizard-ci-explore.no-jest.ts`** | `pnpm wizard-ci-explore`: opens an app, confirms setup, reads state, prints one frame, and exits. It does not run the agent. | `APP_DIR`, `PROJECT_ID`; optional `POSTHOG_KEY_FILE` |
|
|
21
22
|
|
|
22
23
|
> You usually don't call these directly — `pnpm wizard-ci-snapshots` (in
|
|
23
24
|
> [wizard-workbench](https://github.com/PostHog/wizard-workbench)) orchestrates
|
|
24
|
-
> the snapshot route; the MCP server is registered in this repo's `.mcp.json`
|
|
25
|
-
> used via the `exploring-the-wizard` skill.
|
|
25
|
+
> the snapshot route; the MCP server is registered in this repo's `.mcp.json`
|
|
26
|
+
> and used via the `exploring-the-wizard` skill.
|
|
26
27
|
|
|
27
28
|
`PROGRAM`, `SNAP_HARNESS`, `SNAP_SEQUENCE`, `SNAP_MODEL`, and `E2E_ASK` are host
|
|
28
29
|
environment inputs, inherited from the launcher; they are not MCP tool
|
|
@@ -34,11 +35,11 @@ before choosing credentials or an EU project.
|
|
|
34
35
|
## Credentials for full agent runs
|
|
35
36
|
|
|
36
37
|
Full TUI host and snapshot runs require both the personal API key (or
|
|
37
|
-
`POSTHOG_KEY_FILE`) and `WIZARD_CI_GATEWAY_TOKEN_FILE`, plus `PROJECT_ID`.
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
38
|
+
`POSTHOG_KEY_FILE`) and `WIZARD_CI_GATEWAY_TOKEN_FILE`, plus `PROJECT_ID`. For
|
|
39
|
+
MCP runs, pass the personal key through `open_app` and set the gateway token
|
|
40
|
+
file path in the server environment before launch. Restart the server after
|
|
41
|
+
changing it; the gateway path is not an MCP tool argument. Detection-only
|
|
42
|
+
exploration does not need either secret. See
|
|
42
43
|
[local credential setup](../docs/local-dev.md#credentials-for-local-ci-and-headless-runs).
|
|
43
44
|
|
|
44
45
|
## Background
|
|
@@ -46,5 +47,5 @@ Detection-only exploration does not need either secret. See
|
|
|
46
47
|
The control plane lives in [`e2e-harness/`](../e2e-harness/) — out of `src/`, so
|
|
47
48
|
none of it ships in prod. `WizardCiDriver` (read/act over the store), the
|
|
48
49
|
screen→action registry, the e2e profiles, and `tui-capture` (real-TUI PTY
|
|
49
|
-
capture). See [`ARCHITECTURE.md`](../e2e-harness/ARCHITECTURE.md) for how the
|
|
50
|
-
routes drive these (env strip, scoped project id, gotchas).
|
|
50
|
+
capture). See [`ARCHITECTURE.md`](../e2e-harness/ARCHITECTURE.md) for how the
|
|
51
|
+
two routes drive these (env strip, scoped project id, gotchas).
|