How ishaanman7898/api_autopilot works
API Autopilot lets providers publish signed migration rules and consumers apply them to JavaScript/TypeScript repositories. The main workflow validates and verifies a rule, reads configured source files, applies deterministic rewrites, gates the result, and records evidence for later replay. Providers can also draft rules from OpenAPI spec differences; unresolved call sites are fenced for agent handling. The graph includes README-documented key discovery and draft-PR behavior, but does not infer unsampled implementation details for those integrations.
Main entry points: cli.js CLI commands · engine.js Deterministic migration · evidence.js Evidence bundle · diff.js Spec diff and drafts
Components 17
Rule authoring
- Spec diff and drafts
src/diff.js - Signed rule file
Consumer migration
- CLI commands
src/cli.js - Consumer settings
src/config.js - Consumer code
- Deterministic migration
src/engine.js - Fallback agent
Trust and safety
- Rule validation and signatures
src/rule.js - Untrusted text handling
src/sanitize.js - Published signing keys
Verification
- Migration gate
src/gate.js - Consumer test command
- Evidence bundle
src/evidence.js - Draft pull request
action.yml
Other components
- API provider
- OpenAPI specs
- API consumer
Connections 21
- API provider → OpenAPI specs: supplies
README.md - OpenAPI specs → CLI commands: drafts from
README.md - CLI commands → Spec diff and drafts: diffs specs
src/cli.js - Spec diff and drafts → Signed rule file: drafts rules
README.md - API provider → Rule validation and signatures: signs rules
README.md - Rule validation and signatures → Signed rule file: signs and validates
src/rule.js - API consumer → CLI commands: runs commands
README.md - CLI commands → Consumer settings: loads settings
src/cli.js - CLI commands → Signed rule file: loads and checks
src/cli.js - CLI commands → Published signing keys: fetches keys
src/cli.js - CLI commands → Consumer code: reads and writes
src/cli.js - CLI commands → Deterministic migration: applies rules
src/cli.js - Deterministic migration → Untrusted text handling: fences fallback context
src/engine.js - Deterministic migration → Fallback agent: flags unresolved calls
README.md - CLI commands → Migration gate: gates changes
src/cli.js - Migration gate → Untrusted text handling: scans added lines
src/gate.js - CLI commands → Consumer test command: runs test command
src/cli.js - CLI commands → Evidence bundle: builds evidence
src/cli.js - Evidence bundle → Deterministic migration: replays migration
src/evidence.js - CLI commands → Evidence bundle: verifies replay
src/cli.js - CLI commands → Draft pull request: opens draft PR
README.md