Pewarta Proxy

📋 Server Request & Proxy Logs

Loading active proxy settings...
Developed by Khairul Adha (adhexa.id)
Mengambil log server...

⚙️ Pengaturan Proxy Target

Skip to content

refactor(cli): unify output contracts for agent-facing commands - #293

Open
XXPermanentXX wants to merge 29 commits into
mainfrom
output-contract-review
Open

XXPermanentXX wants to merge 29 commits into
mainfrom
output-contract-review

Conversation

@XXPermanentXX

@XXPermanentXX XXPermanentXX commented Oct 30, 2026 •

Copy link
Copy Markdown
Collaborator

--output json could still return plain text or shortened results with --quiet, while errors and process diagnostics followed inconsistent formats. This change gives agent-facing commands a shared output contract.

Changes

  • Add invocation-owned ctx.output.result/progress/info/warning/debug APIs; runtime renders terminal errors.
  • Keep complete business results on stdout. JSON results are one JSON document; warnings, verbose diagnostics, and terminal errors are JSONL on stderr.
  • Make quiet hide only progress/info, preserve results and warnings/errors, and keep verbose independent. Add DASHSCOPE_QUIET=1.
  • Migrate command families in bl and kscli, including polling, SDK/HTTP diagnostics, and updater subprocess output. Preserve documented native streaming/binary protocols and TTY download progress.
  • Retain update notices as UPDATE_AVAILABLE warnings in JSON/quiet modes. Preserve SDK refresh warnings and full ASR task responses when transcription results are empty.
  • Update output maintenance guidance, command/skill references, and consumers; add output-boundary and interaction regressions.

Validation

  • Version-author fixture isolation: 137 Managed Agent tests passed with runner identity, plus the version-list output matrix under another host identity; the fixture no longer depends on the host username.
  • Output-migration regression at 7309d2a6: 3,681 tests passed across 63 files, covering output matrices, runtime, and Managed Agent interactions.
  • vp check: 0 errors, 2 existing warnings; normal pre-commit checks passed.
  • Full offline run after the final fixes: 8,222 passed / 313 skipped. One suite failed during the existing macOS compiled-binary signing setup; isolated reproduction and unchanged baseline files confirmed the same limitation.
  • Earlier live E2E after integrating current main, before the final two fixes: 848 passed / 105 skipped / 1 existing quota-lookup assertion failure, also reproduced on the pre-migration baseline. The dedicated AIGC auto/MCP suite passed 26/26.

Missing or inaccessible fixtures and Workspace permission gates remain skipped. The final two fixes were verified offline; live E2E was not repeated for them. Compiled-binary signing remains a validation gap.

- support DASHSCOPE_QUIET environment variable
- expose result, progress, info, warning and debug via ctx.output
- centralize output format, channel and quiet/verbose policies
- share error classification and preserve diagnostic context
- add output contract tests and maintenance guidance
- Unify error, warning, debug, and polling progress output
- Capture update subprocess output and prevent duplicate process listeners
- Preserve existing download progress behavior
- Emit UPDATE_AVAILABLE warnings in JSON and quiet modes, including cached updates
- Add output contract and process lifecycle regression tests
- Route video command results through the unified output API
- Preserve complete results in quiet mode and hide process messages in JSON mode
- Use the shared output API for concurrent request notices
- Preserve existing download progress and failure behavior
- Add video output contract regression tests
- Route image generation and editing results through the unified output API
- Preserve complete results and task metadata in quiet mode
- Localize model notices and hide process information in JSON mode
- Preserve text-mode download progress behavior
- Add image output contract regression tests
- Route vocabulary command results through the unified output API
- Preserve complete JSON responses in quiet mode and existing text layouts
- Localize empty-list and undeployed vocabulary notes
- Add CLI output regression tests and isolate inherited proxy settings
- Route synthesis results and process messages through the unified output API
- Preserve complete results in quiet mode and existing text audio streams
- Require file output for JSON streaming and return structured voice lists
- Add binary, JSON, progress and CLI regression coverage
- Route speech recognition, memory, quota and security results through the output API
- Preserve complete JSON results in quiet mode and existing text layouts
- Keep request parameters, file formats, exit codes and deletion confirmation
- Add output matrix, CLI boundary and interaction regression coverage
- Route all monitor and log results through the invocation output API
- Keep activation progress out of JSON and quiet output
- Preserve tables, details, pagination, request order and no-wait behavior
- Fix colored hint spacing and add output and activation regression coverage
- Route usage and Token Plan results through the invocation output API
- Keep quota cards, seat tables and one-time key results intact under quiet
- Return a structured free-tier disable report and retain failure warnings
- Add isolated output-contract and quota-view regression coverage
- Route knowledge base, category, file and collection results through the output API
- Preserve complete results under quiet and move time-range notes to stderr
- Update JSON field parsing in dependent integration tests and command manuals
- Add isolated output-contract coverage for queries, mutations and import waits
- Integrate the new command families and current main behavior
- Preserve unified output for migrated command paths
- Reconcile preparation, workspace identity and asynchronous workflows
- Update regression fixtures for the transport and output contracts
- Synchronize 2.7.0 package versions, skill metadata and release documentation
Route this command family through the invocation output contract while preserving business results and request behavior.

Validation: isolated combined regression suite; normal repository pre-commit checks.
Route this command family through the invocation output contract while preserving business results and request behavior.

Validation: isolated combined regression suite; normal repository pre-commit checks.
Route this command family through the invocation output contract while preserving business results and request behavior.

Validation: isolated combined regression suite; normal repository pre-commit checks.
Route this command family through the invocation output contract while preserving business results and request behavior.

Validation: isolated combined regression suite; normal repository pre-commit checks.
Route this command family through the invocation output contract while preserving business results and request behavior.

Validation: isolated combined regression suite; normal repository pre-commit checks.
Route this command family through the invocation output contract while preserving business results and request behavior.

Validation: isolated combined regression suite; normal repository pre-commit checks.
Route this command family through the invocation output contract while preserving business results and request behavior.

Validation: isolated combined regression suite; normal repository pre-commit checks.
Route this command family through the invocation output contract while preserving business results and request behavior.

Validation: isolated combined regression suite; normal repository pre-commit checks.
Route this command family through the invocation output contract while preserving business results and request behavior.

Validation: isolated combined regression suite; normal repository pre-commit checks.
…ract

Route this command family through the invocation output contract while preserving business results and request behavior.

Validation: isolated combined regression suite; normal repository pre-commit checks.
Preserve main's dynamic Token Plan quota windows and hasQuotaData while retaining invocation-scoped output.

Cover multi-window, missing, zero and reset-only quota data across text/JSON, quiet and verbose modes.

Validation: 8037 isolated tests passed, 290 gated skips; seven package builds.
- Omit the redundant normalization cause from text errors
- Preserve explicit causes, error codes, JSON details and verbose stacks
- Remove the obsolete auth debug wiring TODO
- Cover bilingual rendering and the actual CLI error boundary
- Reuse invocation sources for welcome and quick-start selection
- Preserve parsed flags, Profile selection and credential precedence
- Cover single config reads and bilingual help behavior
Preserve the official MCP SDK and AIGC auto routing from main.
Route auto results, progress and SDK diagnostics through invocation output.
Keep complete JSON results under quiet and preserve native download progress.
Update SDK fixtures and cover result, error and session cleanup behavior.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant