-
Notifications
You must be signed in to change notification settings - Fork 0
Fix/generate from staging spec #30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
- Update generate.sh to use NOTTE_API_URL env var, defaulting to https://us-staging.notte.cc to get latest API features including viewer_url - Exclude global scrape endpoints (/scrape, /scrape_from_html) from generation - Exclude vault credit card endpoints (/vaults/{vault_id}/card) from generation - Remove global scrape CLI commands (scrape, scrape-html) - Remove vault credit card CLI commands (card, card-set, card-delete) - Hide sessions debug command from help (still functional) - Update documentation to remove references to excluded features Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Remove `notte usage logs` subcommand - Move `notte usage` documentation to Utilities section in README Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
5 files reviewed, 1 comment
Additional Comments (1)
Prompt To Fix With AIThis is a comment left during a code review.
Path: scripts/generate.sh
Line: 115:122
Comment:
`sed -i ''` is macOS-specific syntax and will fail on Linux. Use a cross-platform approach.
```suggestion
# Rename NewClient to newGeneratedClient to avoid collision with wrapper
# Only rename the base NewClient, not NewClientWithResponses
sed -i.bak 's/^func NewClient(/func newGeneratedClient(/g' "$OUTPUT_DIR/client.gen.go"
# Also update the call to NewClient within NewClientWithResponses
sed -i.bak 's/NewClient(server, opts\.\.\.)/newGeneratedClient(server, opts...)/g' "$OUTPUT_DIR/client.gen.go"
# Replace time.Time with FlexibleTime in struct fields for flexible timestamp parsing
# This handles API responses that don't include timezone info
sed -i.bak 's/\( [A-Za-z]*\) time\.Time /\1 FlexibleTime /g' "$OUTPUT_DIR/client.gen.go"
sed -i.bak 's/\( [A-Za-z]*\) \*time\.Time /\1 *FlexibleTime /g' "$OUTPUT_DIR/client.gen.go"
# Remove backup files
rm -f "$OUTPUT_DIR/client.gen.go.bak"
```
How can I resolve this? If you propose a fix, please make it concise. |
Use sed -i.bak instead of sed -i '' for Linux compatibility, then clean up backup files afterward. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add CI step that regenerates the API client from us-staging.notte.cc and fails if there are any differences, ensuring committed code stays in sync with the latest OpenAPI spec. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
@greptile |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
7 files reviewed, no comments
Greptile Overview
Greptile Summary
This PR transitions the CLI to generate its API client from the staging OpenAPI spec instead of production, and removes several deprecated commands based on excluded endpoints.
Key Changes
scripts/generate.shto fetch OpenAPI spec from staging environment (us-staging.notte.cc) by default, with production URL still available viaNOTTE_API_URLenv var.bakextension) instead of macOS-only (-i '') syntax, with cleanup of backup filesscrape,scrape-html), usage logs command, and vault credit card commands (card operations) based on excluded endpointsclient.gen.gofrom staging spec, removing corresponding endpoint methods and adding new fields (PersistedDomainsinProfileResponse,ViewerUrlinSessionResponse, enhancedScrapeActionoptions)Migration Path
The PR effectively deprecates global scraping in favor of session-based scraping (
notte sessions start→notte page scrape→notte sessions stop), which provides better control and observability.Confidence Score: 5/5
Important Files Changed