Let an agent report a bug without leaving the shell - #13
Merged
Conversation
The gateway now accepts bug reports and feedback (anyapi#650), so give the CLI the two commands that reach them. Two commands rather than one with a flag: the route stamps the kind, so neither takes a kind argument and a caller cannot mislabel its own message. --request-id deliberately does not default to the newest saved run. Silently attaching a possibly unrelated call would degrade the exact field the feature exists to improve, so the commands print a one-line nudge instead. anyapi-run gains the section that tells an agent what to do when a result looks wrong, which is the whole point: an agent that hits bad data had nowhere to say so. --version reported 0.5.0 while the package was 0.7.0. That is the first thing anyone triaging one of these reports would check, so it is fixed here rather than left to misreport itself in the reports this release enables. Co-Authored-By: Claude Opus 5 (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.
The gateway shipped bug-report and feedback intake in anyapi#650, live in production as of this PR. This adds the two CLI commands that reach it.
Commands
anyapi report-bug <summary>- a wrong or empty result, a misleading error, a price that looks off.anyapi feedback <summary>- a missing API, a missing field, confusing docs.Both take
--details,--sku,--request-id,--contact. Both are free and never charged.Two commands rather than one with a
--kindflag: the route stamps the kind server-side, so neither command takes a kind argument and a caller cannot mislabel its own message.Ecosystem classification
Class: CLI plus customer-facing copy, per
ECOSYSTEM.md. These are not discovery commands, so the handwritten discovery reader, its contract, and the live reader canary are untouched.src/discovery.tsand every catalog/search/describe path unchangedanyapi-rungains a "When a result looks wrong" section;anyapi-discoverandanyapi-onboardingdocument no command this PR changesDeviations worth flagging
--request-iddoes not default to the newest saved run. Silently attaching a possibly unrelated call degrades the exact field the feature exists to improve. The commands print a one-line nudge when no id was given.--versionreported0.5.0whilepackage.jsonwas0.7.0. Pre-existing drift, fixed here rather than left alone: the CLI version is the first thing anyone triaging one of these reports checks, so shipping a bug-report feature on top of a self-misreporting binary would poison the reports it collects. Bumped to0.8.0with the release.requireApiKeyis now exported fromsrc/commands.tssosrc/feedback.tsresolves a key through exactly that path, including its offer to mint a trial key rather than dead-ending.Proof
npm run build && npm testgreen, 96 tests across 11 files, 8 of them new for these commands: route-per-kind, nokindin the body, option pass-through and omission, auth header, blank-summary rejection before any request, the conditional tip, and the gateway limit message surfacing rather than a bare status.Verified against production with the built
dist/, after anyapi#650 deployed:anyapi --versionprints0.8.0anyapi report-bug " "rejects client-side, exit 1, no request sentanyapi feedback "..."returnedFeedback filed. Reference: 11861ad2-2b66-4eae-b36d-b8d7f819d0f9That last one wrote a real row, labeled "Deploy verification for anyapi#650 - safe to delete this row".