feat(cli): add interactive PowerContext config init - #1367
Open
happy-v587 wants to merge 10 commits into
Open
Conversation
happy-v587
marked this pull request as ready for review
August 26, 2026 09:13
Contributor
Author
|
@AlexStocks PTAL |
Teingi
reviewed
Aug 26, 2026
Teingi
left a comment
Member
There was a problem hiding this comment.
I found three issues in the new configuration flow.
- Redact credential container variables (e.g. OTEL_EXPORTER_OTLP_HEADERS) and generator-recorded credential names in config show output - Fix env_file parser to recognize # only at unquoted word boundaries, preserving values like TOKEN=abc#123 - Complete EN/ZH full-capability guides with doctor, Source-to-flush-to-Memory round trip, data-location and shutdown guidance, capability matrix, and FTS-only fallback explanation per issue oceanbase#1333 acceptance criteria
happy-v587
force-pushed
the
docs/issue-1333-full-capability-runtime
branch
from
August 26, 2026 14:17
b5849ea to
1b2ed2b
Compare
Teingi
reviewed
Aug 26, 2026
Teingi
left a comment
Member
There was a problem hiding this comment.
I found three remaining issues on the current head.
- Pass is_credential flag to _collect_provider_variable so custom credential names get hidden input even when not matching _is_secret_name - Fix _strip_comment to handle backslash-escaped spaces outside quotes, using a sentinel approach to survive shlex.split processing - Revise docs to use cursor-aware flush verification and vector search query for embedding confirmation instead of non-deterministic assertions - Add regression tests for hide_input, escaped spaces, and backslash handling
Teingi
reviewed
Aug 27, 2026
Teingi
left a comment
Member
There was a problem hiding this comment.
I found two remaining issues on the current head.
…l-capability-runtime # Conflicts: # src/powercontext/server/cli.py # tests/test_cli.py
AsperforMias
left a comment
Collaborator
There was a problem hiding this comment.
Two remaining issues on the current head.
- Ask whether each additional provider variable is a credential, hide its input during init, and record the name in credentials metadata so config show redacts it - Add regression tests for the hidden prompt, show redaction round trip, and unmarked non-credential variables - Add a regression test for config show on malformed managed markers - Load the OpenCode host e2e plugin from the production install location
Member
|
please resolve conflicts |
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.
Closes #1333
Rationale for this change
The existing server can run in a minimal mode, but users had to manually combine inference, vector search, scheduler, Dashboard, Scope ID, database, and Coding Agent settings. This change provides one guided command for a complete local setup without changing the default server behavior.
What changes are included in this PR?
powercontext config initwith a short interactive setup for Scope ID, API protocol, Base URL, API key, Generation model, Embedding model, and dimension.0600.envcontaining full-capability Server, Dashboard, Scope, inference, database, scheduler, and integration settings.config showandconfig validate, update the environment example, and add the bilingual full-capability Quick Start guide.powercontext server runbehavior.Are there any user-facing changes?
Yes. Users can run
powercontext config init --output .envto create a complete local configuration. The generated file is local and ignored by Git; API keys are hidden during interactive input and redacted byconfig show. This introduces the newconfig initworkflow and does not alter the default server startup contract.How was this change tested?
uv run pytest -q tests/test_config_cli.py tests/test_cli.py tests/test_server.py— 60 passed.make check— passed.make docs-test— passed.make build— passed.readyreported ready, Source ingestion returned HTTP 202, andflushreturned HTTP 200 with the Source processed.Unexpected server error; this remains an environment-specific limitation and is not caused byconfig init.tests/e2e/test_opencode_plugin_host.py.AI usage statement
Built and validated with OpenAI Codex (GPT-5). The agent inspected the repository, implemented the CLI and documentation changes, ran automated and manual tests, and recorded the OpenCode environment limitation above.