Conversation
… startup Commands and runners imported program configs, audit types, authenticate, detection helpers and the task stream by path. They now import from @programs and @programs/types; the task stream loads through loadTaskStream(). The runners read TUI flows only when a run needs them (post-auth gates, the health-check probe, the composed walk), and the family picker loads Ink only when it opens. The bin.js startup closure drops from 310 to 288 sources: the TUI primitives and picker no longer load with every command. Allowlist 37 -> 5. Generated-By: PostHog Desktop Task-Id: d14e92bb-6ee1-49b5-8502-39cb80079589
Detection hooks and headless pre-runs called wizardAbort, which exits the process: only the CLI may do that. ProgramCiHost and ProgramReadyContext gain abort(failure), and the posthog-integration, error-tracking and replay-vision hooks call it. The headless runner supplies wizardAbort; the TUI store carries the abort path the CLI hands startTUI (TuiHost), which also installs the TUI's UI as current before the first frame, and the TUI's login host aborts through it. env.ts now imports nothing: the headless flag's name moves into it and @cli/headless-mode reads it from there. Allowlist 5 -> 4. Generated-By: PostHog Desktop Task-Id: d14e92bb-6ee1-49b5-8502-39cb80079589
The getUI() singleton, the WizardUI contract and wizardAbort move from src/ui and shared utils into src/cli (ui.ts, wizard-ui.ts, wizard-abort.ts): only CLI code looks up the current UI or exits the process. Everything else receives a host. The progress and interaction halves of that contract, ProgressUi and InteractionUi, move to programs with createUiReducer and uiInteraction (src/programs/host-ui.ts, exported from @programs). InkUI and LoggingUI implement those halves; the CLI's setUI checks the full WizardUI where it installs one. HeadlessUI tees into a structural HeadlessRunStateSink instead of the TUI store type. WizardError and the cleanup registry are imported from their owners. src/ui and the @ui alias are gone. Allowlist 4 -> 0. Generated-By: PostHog Desktop Task-Id: d14e92bb-6ee1-49b5-8502-39cb80079589
🧙 Wizard CIRun the Wizard CI and test your changes against wizard-workbench example apps by replying with a GitHub comment using one of the following commands: Test all apps:
Test all apps in a directory:
Test an individual app:
Show more apps
Test against a Context Mill branch:
Add Results will be posted here when complete. |
Generated-By: PostHog Desktop Task-Id: d14e92bb-6ee1-49b5-8502-39cb80079589 # Conflicts: # src/agent/runner/README.md
Merge the restacked C2a (d5145f3) into C2b. Test imports follow C2b's moves: `getUI` comes from `@cli/ui`, and the ErrorCodes imports join them. The runner README takes the B-layer line that says programs resolve the binding. Generated-By: PostHog Desktop Task-Id: d14e92bb-6ee1-49b5-8502-39cb80079589
Merge the joined C2a (9270071) into C2b. B's register-then-commit skill cleanup now imports from C2b's modules: `@utils/cleanup-registry`, `@cli/wizard-abort`, `@cli/ui`, and `@programs` for `detectErrorCode` and `watchAuditLedger`. The headless renderer keeps C2b's exported `HeadlessRunStateSink`. The scanner allowlist stays empty. Generated-By: PostHog Desktop Task-Id: d14e92bb-6ee1-49b5-8502-39cb80079589
Carry the host-only B2 into C2b. The session adapter takes C2a's runProgram call, with the run and program settings from its caller, and keeps C2b's imports: getUI from @cli/ui, wizardAbort from @cli/wizard-abort, createUiReducer and uiInteraction from @programs, and the TUI flow loaded when a run needs it. host-ui.ts gains C2a's signal-driven dismissal and the activity case. The headless sink gains setEventPlan. The no-agent and access-token refresh tests go with their modules; C2b implemented neither the MCP port nor a headless doctor. The allowlist stays empty. Generated-By: PostHog Desktop Task-Id: d14e92bb-6ee1-49b5-8502-39cb80079589
C2a now carries the CLI-owned runner pieces (legacy adapter, task stream, login, headless UI, abort presenter). This branch keeps C2a's tree. Generated-By: PostHog Desktop Task-Id: d14e92bb-6ee1-49b5-8502-39cb80079589
Base automatically changed from
posthog/functional-c2a-tui
to
posthog/functional-c1-move
September 27, 2026 15:19
gewenyu99
force-pushed
the
posthog/functional-c2b-headless
branch
from
September 27, 2026 15:24
fd1b0b8 to
25fc53d
Compare
gewenyu99
changed the base branch from
posthog/functional-c1-move
to
posthog/functional-c2a-tui
September 27, 2026 15:26
gewenyu99
added this pull request to stack #1372
September 27, 2026 15:28
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Change
Empty. Its scope (the CLI owns headless runs and abort) landed in the C2a PR, so this PR can close.
Created with PostHog Desktop