Commit d83841a
feat: wire --agent flag in command handlers and add Retrieve command
Task 5: Wire --agent in main.rs match arms for Analyze, Security,
Dependencies, Vulnerabilities, and Optimize commands. Each agent path
forces JSON output, passes through compression pipeline via
handle_agent_output helper, and stores full data for retrieval.
Task 6: Refactor handle_vulnerabilities to return Result<String>
so the agent path can capture JSON output for compression.
Add Retrieve command handling with --list, latest resolution,
filtered retrieval, and error reporting as structured JSON.
Update suppress_update_banner to also suppress for --agent mode
and Retrieve commands. Add Retrieve to telemetry command mapping.
Update lib.rs patterns to ignore new agent field on all commands
and add Retrieve arm (unreachable, handled in main.rs).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1 parent 04a698e commit d83841a
2 files changed
Lines changed: 201 additions & 42 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| 39 | + | |
39 | 40 | | |
40 | 41 | | |
41 | 42 | | |
| |||
54 | 55 | | |
55 | 56 | | |
56 | 57 | | |
57 | | - | |
| 58 | + | |
58 | 59 | | |
59 | 60 | | |
60 | 61 | | |
| |||
67 | 68 | | |
68 | 69 | | |
69 | 70 | | |
| 71 | + | |
70 | 72 | | |
71 | 73 | | |
72 | 74 | | |
| |||
82 | 84 | | |
83 | 85 | | |
84 | 86 | | |
85 | | - | |
| 87 | + | |
| 88 | + | |
86 | 89 | | |
87 | 90 | | |
88 | 91 | | |
| |||
95 | 98 | | |
96 | 99 | | |
97 | 100 | | |
| 101 | + | |
98 | 102 | | |
99 | 103 | | |
100 | 104 | | |
| |||
133 | 137 | | |
134 | 138 | | |
135 | 139 | | |
| 140 | + | |
136 | 141 | | |
137 | 142 | | |
138 | 143 | | |
| |||
708 | 713 | | |
709 | 714 | | |
710 | 715 | | |
| 716 | + | |
| 717 | + | |
| 718 | + | |
| 719 | + | |
711 | 720 | | |
712 | 721 | | |
713 | 722 | | |
| |||
0 commit comments