Imported from voxgig-sdk/vercel-sdk (
php/AGENTS.md). Install upstream withnpx skills add voxgig-sdk/vercel-sdk --skill php. Copyright stays with the author.
Vercel PHP — Agent Guide
The PHP client for the Vercel API. This directory is generated — do not edit it by hand; change the model/template/component in .sdk/ and regenerate. See the project guide for the full workflow and the aontu model language.
Paths below (
.sdk/…) are relative to the project root — one level up from thisphp/directory.
Regenerate this target
cd ../.sdk
npm run build # only if you changed a component
npm run generate # refreshes this php/ directory
Then build and test the generated output:
# in this target directory (php/):
composer install
make build
make test
What generates this target
| Source | Path | Edit when… |
|---|---|---|
| Target definition | .sdk/model/target/php.aon |
deps, module, extension, phases change |
| Templates | .sdk/tm/php/ |
the file is the same for every API (runtime, transport, base classes) — copied verbatim with placeholder substitution |
| Components | .sdk/src/cmp/php/ |
the file's shape depends on the API (entities, constructor, README, tests) — TypeScript that walks the model |
Decision rule: same for every API → template; depends on the API →
component. After editing a component run npm run build before
npm run generate; template-only edits just need npm run generate.
Features in this target
Each feature is a flat file in the feature/ package. Its hooks and
default activation come from .sdk/model/feature/<name>.aon; customise
the runtime under .sdk/tm/php/feature/ and regenerate.
| Feature | Runtime file | Active hooks |
|---|---|---|
| debug — Request/response capture ring buffer for debugging | feature/DebugFeature.php |
PreDone, PreRequest, PreResponse, PreUnexpected |
| idempotency — Idempotency keys for safe retries of mutating operations | feature/IdempotencyFeature.php |
PreRequest |
| metrics — Statistics capture: per-operation counters and latency | feature/MetricsFeature.php |
PreDone, PrePoint, PreUnexpected |
| paging — Pagination signals for list operations | feature/PagingFeature.php |
PreRequest, PreResult |
| ratelimit — Client-side rate limiting via a token bucket | feature/RatelimitFeature.php |
— |
| retry — Automatic retry of transient failures with exponential backoff | feature/RetryFeature.php |
— |
| test — In-memory mock transport for testing without a live server | feature/TestFeature.php |
GetData, GetMatch, PostConstruct, PostConstructEntity, PrePoint, PreRequest, PreResponse, PreResult, PreSpec, SetData, SetMatch |
| timeout — Per-request timeout with transport abort | feature/TimeoutFeature.php |
— |
Generated by @voxgig/sdkgen. See the project guide.