fix(cli/session): add --format flag and JSON envelope output to session tell #10880

Open
HAL9000 wants to merge 5 commits from bugfix/m3-session-tell-format into master

5 Commits

Author SHA1 Message Date
CleverAgents Bot cbbfcd9222 ci: stop master workflow on PR updates
CI / lint (pull_request) Has been cancelled
CI / typecheck (pull_request) Has been cancelled
CI / security (pull_request) Has been cancelled
CI / quality (pull_request) Has been cancelled
CI / unit_tests (pull_request) Has been cancelled
CI / integration_tests (pull_request) Has been cancelled
CI / e2e_tests (pull_request) Has been cancelled
CI / coverage (pull_request) Has been cancelled
CI / build (pull_request) Has been cancelled
CI / docker (pull_request) Has been cancelled
CI / helm (pull_request) Has been cancelled
CI / push-validation (pull_request) Has been cancelled
CI / status-check (pull_request) Has been cancelled
Remove the stale pull_request trigger from master.yml so PR branch commits do not launch the master workflow.

Maintenance patch for PR #10880.
2026-06-10 20:22:28 -04:00
HAL9000 e9ae3b330f fix(cli/session): restore --format long option name in tell command
CI / helm (pull_request) Successful in 34s
CI / push-validation (pull_request) Successful in 35s
CI / lint (pull_request) Successful in 41s
CI / quality (pull_request) Successful in 53s
CI / build (pull_request) Successful in 1m0s
CI / typecheck (pull_request) Successful in 1m9s
CI / security (pull_request) Successful in 2m14s
CI / benchmark-publish (pull_request) Has been skipped
CI / unit_tests (pull_request) Failing after 4m22s
CI / docker (pull_request) Has been skipped
CI / e2e_tests (pull_request) Successful in 5m46s
CI / integration_tests (pull_request) Failing after 6m58s
CI / coverage (pull_request) Successful in 12m18s
CI / status-check (pull_request) Failing after 3s
The previous commit renamed `fmt` to `format` and removed the explicit
`"--format"` name from `typer.Option`, assuming Typer would derive the
long form from the Python parameter name. Typer only does this when NO
explicit option names are given; with `typer.Option("-f", ...)` it
registers ONLY `-f`.

Restore `typer.Option("--format", "-f", ...)` so `--format` is
accepted as a CLI argument and appears in `--help` output, fixing the 5
failing scenarios in tdd_session_tell_format_flag.feature.

Refs: #10466
2026-06-07 01:35:37 -04:00
HAL9000 84cfd6cb12 fix(cli/session): fix tell --format help display and undefined test step
CI / benchmark-publish (pull_request) Has been skipped
CI / lint (pull_request) Successful in 45s
CI / helm (pull_request) Successful in 29s
CI / build (pull_request) Successful in 47s
CI / quality (pull_request) Successful in 1m2s
CI / push-validation (pull_request) Successful in 22s
CI / typecheck (pull_request) Successful in 1m6s
CI / security (pull_request) Successful in 1m13s
CI / e2e_tests (pull_request) Successful in 4m48s
CI / integration_tests (pull_request) Failing after 6m41s
CI / unit_tests (pull_request) Failing after 8m4s
CI / docker (pull_request) Has been skipped
CI / coverage (pull_request) Successful in 12m21s
CI / status-check (pull_request) Failing after 3s
Rename the tell command's fmt parameter to format so Typer derives
--format from the Python parameter name, ensuring --format appears in
--help output across all Typer versions (fixes failing scenario at
tdd_session_tell_format_flag.feature:28).

Add single-quoted step definition for the 'does not contain' pattern to
match the feature step that wraps double-quoted text in single quotes
(resolves undefined step error at tdd_session_tell_format_flag.feature:34).

Add CHANGELOG.md entry documenting the --format flag addition to session
tell.

Refs: #10466
2026-06-06 23:51:47 -04:00
HAL9000 43e9c4fd9a fix(cli/session): add command parameter to format_output for JSON envelope spec compliance
CI / push-validation (pull_request) Successful in 38s
CI / helm (pull_request) Successful in 42s
CI / build (pull_request) Successful in 59s
CI / lint (pull_request) Successful in 1m9s
CI / quality (pull_request) Successful in 1m11s
CI / typecheck (pull_request) Successful in 1m23s
CI / security (pull_request) Successful in 1m29s
CI / benchmark-publish (pull_request) Has been skipped
CI / e2e_tests (pull_request) Successful in 4m56s
CI / integration_tests (pull_request) Successful in 5m5s
CI / unit_tests (pull_request) Failing after 6m5s
CI / docker (pull_request) Has been skipped
CI / coverage (pull_request) Successful in 11m2s
CI / status-check (pull_request) Failing after 3s
The tell function's JSON envelope output was calling format_output(data, fmt)
without a command argument, resulting in an empty 'command' field in the output.
This violates spec compliance because all machine-readable CLI outputs must
include the originating command name in the envelope.

Fix: pass command='agents session tell' to ensure spec-compliant JSON/YAML envelopes.
2026-05-11 02:02:45 +00:00
HAL9000 e7c7719a64 fix(cli/session): add --format flag and JSON envelope output to session tell
CI / benchmark-publish (pull_request) Has been skipped
CI / push-validation (pull_request) Successful in 29s
CI / helm (pull_request) Successful in 34s
CI / build (pull_request) Successful in 59s
CI / lint (pull_request) Successful in 1m21s
CI / quality (pull_request) Successful in 1m27s
CI / typecheck (pull_request) Successful in 1m31s
CI / security (pull_request) Successful in 1m57s
CI / integration_tests (pull_request) Successful in 3m52s
CI / e2e_tests (pull_request) Successful in 4m14s
CI / unit_tests (pull_request) Failing after 4m55s
CI / docker (pull_request) Has been skipped
CI / coverage (pull_request) Successful in 13m44s
CI / status-check (pull_request) Failing after 3s
Add --format/-f option to the session tell command so that machine-readable
output is available alongside the existing Rich console output. When a
non-rich format (e.g. json, yaml, plain) is requested the command wraps the
response in the spec-required envelope containing session metadata, the
assistant response, and usage statistics.

Also adds BDD feature file and step definitions (tagged @tdd_issue_10466)
that verify the new --format flag behaviour and confirm no regression in the
default Rich console output path.

ISSUES CLOSED: #10466
2026-04-28 05:56:48 +00:00