fix: show devai:install prompt text and stream live progress#138
Merged
Conversation
The docs-driver confirmation prompt blocked on fgets() without ever
writing the question, so `marko devai:install` appeared to hang. The
prompter now writes the question plus a [Y/n] hint before reading.
Also stream live progress: the orchestrator announces each slow step
(agent config, discovery:cache, indexer:rebuild, docs index build) via
an optional progress callback, and the command prints a notice before
the composer require. Per-agent summary lines now read "configured"
rather than "installed".
Note: progress messages use string concatenation rather than "$var…"
interpolation — the ellipsis glyph's UTF-8 bytes (0x80-0xFF) are valid
PHP identifier characters, so "$agentName…" parses as one undefined
variable. Braces ({$var}) would fix it but the project's php-cs-fixer
strips them, so concatenation is the only formatter-safe form.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
Problem
marko devai:installappeared to hang after detecting agents. Two issues:StdinPrompter::confirm()blocked onfgets()without ever writing the question to the terminal, so the docs-driver confirmation looked like a hang (it was silently waiting for keyboard input).discovery:cache,indexer:rebuild, docs index build) ran silently until the final summary, again looking hung.Changes
StdinPrompter— writes the question + a[Y/n]/[y/N]hint (reflecting the default) to an injectable output stream before reading stdin.InstallationOrchestrator::install()— accepts an optional?callable $onProgressand announces each slow step before it runs. Per-agent summary lines now readconfiguredinstead ofinstalled.InstallCommand— printsInstalling … via composer …before the composer step and wires a live progress callback to the orchestrator.Note on string formatting
Progress messages use string concatenation rather than
"$var…"interpolation. The ellipsis glyph's UTF-8 bytes (0x80-0xFF) are valid PHP identifier characters, so"$agentName…"parses as one undefined variable.{$var}braces fix it, but the project's php-cs-fixerremove_unnecessary_curly_bracesrule strips them — concatenation is the only formatter-safe form.Tests
ConfirmationPrompterTest— asserts the question + hint are written, and that the hint reflects the default.InstallationOrchestratorTest— live-progress streaming, optional callback,configuredwording.UpdateCommandTest— stub orchestrator signature updated to match.All devai tests pass (252 passed, 596 assertions); phpcs + php-cs-fixer clean on touched files.
🤖 Generated with Claude Code