Repository navigation
feat(agents): read and create agents; device-code status takes the code in the body - #1179
Conversation
…de in the body
GET /agents/{agentId} and POST /agents answer 403 when the Agents API is not
enabled for the platform, and POST /agents answers 404 for an unknown
customer. The device-code status check moves from
GET /agents/device-codes/{code}/status to POST /agents/device-codes/status
with the code in the body, so the secret never appears in a URL or access
log (breaking for that path). The status response gains a status enum, the
device code is documented as an opaque 128-bit value, and regenerating
invalidates the one unredeemed code. Policy amounts are documented as
denominated in the policy's immutable spending-limits currency.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TeBuC5ym3AR1ZJ6eocSFGT
|
Preview deployment for your docs. Learn more about Mintlify Previews.
|
|
The latest updates on your projects. Learn more about Vercel for GitHub. 3 Skipped Deployments
|
|
[Critical impact] Changes the public API contract for device code status endpoint. The PR appears safe to merge with the dependent currency fix in PR #1180; the stale polling reference is a non-blocking documentation issue. Findings
Fix with agent prompt### Issue 1
openapi/openapi.yaml:351-352
The route moved, but `.claude/skills/grid-api/references/endpoints.md:270` still lists `GET /agents/device-codes/{code}/status`. The API skill recommends this reference for API questions, so users now get the wrong method and path for polling. Update that row to `POST /agents/device-codes/status` and explain the required JSON `code` body. PRs #1180–#1186 also leave this reference unchanged.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.SummaryThis PR updates agent read and create errors and moves device-code polling to
|
| /agents/device-codes/status: | ||
| $ref: paths/agents/agents_device-codes_status.yaml |
There was a problem hiding this comment.
Polling guide uses removed route
The route moved, but .claude/skills/grid-api/references/endpoints.md:270 still lists GET /agents/device-codes/{code}/status. The API skill recommends this reference for API questions, so users now get the wrong method and path for polling. Update that row to POST /agents/device-codes/status and explain the required JSON code body. PRs #1180–#1186 also leave this reference unchanged.
Knowledge Base Used: Grid API contract
Prompt To Fix With AI
This is a comment left during a code review.
Path: openapi/openapi.yaml
Line: 351-352
Comment:
**Polling guide uses removed route**
The route moved, but `.claude/skills/grid-api/references/endpoints.md:270` still lists `GET /agents/device-codes/{code}/status`. The API skill recommends this reference for API questions, so users now get the wrong method and path for polling. Update that row to `POST /agents/device-codes/status` and explain the required JSON `code` body. PRs #1180–#1186 also leave this reference unchanged.
**Knowledge Base Used:** [Grid API contract](https://app.greptile.com/lightspark/-/custom-context/knowledge-base/lightsparkdev/grid-api/-/docs/api-contract.md)
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.There was a problem hiding this comment.
Fixed: the reference now lists POST /agents/device-codes/status with the code in the body; redeem is updated the same way in #1180.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TeBuC5ym3AR1ZJ6eocSFGT
| $ref: paths/agents/agents_device-codes_{code}_status.yaml | ||
| /agents/device-codes/status: | ||
| $ref: paths/agents/agents_device-codes_status.yaml | ||
| /agents/device-codes/{code}/redeem: |
There was a problem hiding this comment.
redeem still has the code in the path here
| example: jqzJR3AgI9OAwb_enypARw | ||
| status: | ||
| $ref: ./AgentDeviceCodeStatus.yaml | ||
| redeemed: |
There was a problem hiding this comment.
with status in here, redeemed is just status == REDEEMED, and code just echoes back what we sent. since we're already breaking this route anyway, worth dropping one or both? not blocking
|
🦣 Congratulations @k15z - your substantive review earned a Straight-tusked elephant! (rare)
View your Frost-dex: https://zeus.dev.dev.sparkinfra.net/#/dinodex/k15z?section=ice-age |
Agent read and create, and device-code status without the code in the URL.
GET /agents/{agentId}andPOST /agentsdocument a 403 when the Agents API is not enabled for the platform;POST /agentsdocuments a 404 for an unknown customer.GET /agents/device-codes/{code}/statustoPOST /agents/device-codes/statuswith the code in the body, so the secret stays out of URLs and access logs. The response gains astatusenum.Needs the breaking-change label and API-reviewer approval.