docs: sync agent-api-openapi.yaml from warp-server - #499
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Regenerates developers/agent-api-openapi.yaml from warp-server's canonical public spec with the sync-openapi-spec skill. Co-Authored-By: Warp Agent <agent@warp.dev>
|
I'm starting a first review of this pull request. You can view the conversation on Warp. I completed the review and no human review was requested for this pull request. Comment Powered by Oz |
There was a problem hiding this comment.
Overview
This PR regenerates developers/agent-api-openapi.yaml from the canonical warp-server OpenAPI spec. The attached review diff does not include a patch for the only changed file, so I could not inspect the generated API changes, validate the memory-related public surface called out in the PR description, or perform a meaningful security/spec-alignment review against changed lines.
Concerns
⚠️ The annotated diff only saysPatch unavailable from GitHub for this file.Please rerun this review with an attached patch or split/provide the generated OpenAPI diff so reviewers can verify the endpoint/schema changes before merge.
Verdict
Found: 0 critical, 1 important, 0 suggestions
Request changes
Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).
Powered by Oz
d559fb7 to
0efa846
Compare
There was a problem hiding this comment.
Review summary
The OpenAPI document parses and the docs build passes, but this branch is not the latest filtered output from warp-server/public_api/openapi.yaml. An API-owner decision is also required for the Agent Memory configuration exposed through the public agent identity contract.
Verdict
Request changes
| Replacement list of attached team memory stores. Omit to leave unchanged, | ||
| pass an empty array to clear, or pass a non-empty array to replace. | ||
| x-go-type-skip-optional-pointer: false | ||
| AgentAutoMemoryResponse: |
There was a problem hiding this comment.
❓ [QUESTION] The sync policy says Agent Memory remains a research preview, yet this schema is reachable from the public agent-identity create/update/request-response contract and will render in the public Scalar reference. Is that public exposure intentional? If not, the API owner needs to mark the relevant contract internal or otherwise remove it from the public source before this sync is regenerated.
There was a problem hiding this comment.
Confirmed with the API owner: the current public exposure through the POST /agent/identities request/response contract is intentional as-is, so no schema needs to be marked x-internal for this sync. Leaving this thread open for your explicit sign-off.
… extensions Regenerates developers/agent-api-openapi.yaml from warp-server's current public_api/openapi.yaml (previous revision had drifted at /agent/runs and six schemas). Mirrors warp-server's public-openapi-filter.yaml stripFlags policy in the sync script: x-internal, x-enum-varnames, x-go-type, x-go-type-import, x-go-type-skip-optional-pointer, x-oapi-codegen-extra-tags, x-stainless-deprecation-message, and x-stainless-naming are now stripped recursively from the entire regenerated tree, not just from top-level operations. Adds a self-test regression case and documents the rule in references/sync-policy.md. Co-Authored-By: Warp <agent@warp.dev>
Fixes a leak in the sync transform: stripping the x-internal key without deleting the object it marks left internal fields published-but-unmarked. Adds _prune_internal, which mirrors openapi-format's flagValues semantics by deleting the entire marked object wherever it appears in the tree (a schema property, a parameter, an operation, a tag, a whole schema), before the existing STRIP_FLAGS pass cleans up any remaining extension keys. This removes the factory_uid/automation_id query parameters from GET /agent/runs and GET /agent/identities, and the factory_uid/agent_type properties from CreateAgentRequest, UpdateAgentRequest, and AgentResponse, all of which are marked x-internal upstream. Adds regression coverage for an internal parameter and an internal schema property (previously only internal operations/tags were covered). Co-Authored-By: Warp <agent@warp.dev>
There was a problem hiding this comment.
Overview
Cycle-2 re-review confirms that the published OpenAPI spec now matches the canonical server public subset. Internal parameters and schema properties marked x-internal are pruned before extension stripping, generated references resolve, CI and the docs build pass, and the rendered Scalar reference matches the expected public surface.
Verdict
Approved — the prior requested changes are addressed at deba7f2.
What changed
Regenerates
developers/agent-api-openapi.yaml(the spec behind the Scalar API reference) from warp-server's canonicalpublic_api/openapi.yaml, and fixes thesync-openapi-specskill's transform to match warp-server's own publish-time filter.Rework changes (cycle 1)
ef449bc9c680018b855baafc2c5ce8dabe98136d). The previous revision had drifted at/agent/runsand theAgentResponse,AmbientAgentConfig,CreateAgentRequest,Error,RunSourceType, andUpdateAgentRequestschemas.stripFlagspolicy in the sync script.scripts/sync_openapi.pypreviously only stripped thex-internalmarker, and only from top-level operations. It now recursively stripsx-internal,x-enum-varnames,x-go-type,x-go-type-import,x-go-type-skip-optional-pointer,x-oapi-codegen-extra-tags,x-stainless-deprecation-message, andx-stainless-namingfrom every object in the regenerated spec.POST /agent/identitiesrequest/response contract are intentionally public as-is; no schema needs to be markedx-internalfor this sync.Rework changes (cycle 2)
stripFlagspass left behind. Removing only thex-internalmarker key (not the object it marks) left several internal-only fields published but unmarked: thefactory_uid/automation_idquery parameters onGET /agent/runsandGET /agent/identities, and thefactory_uid/agent_typeproperties onCreateAgentRequest,UpdateAgentRequest, andAgentResponse._prune_internaltosync_openapi.py, which mirrors openapi-format'sflagValuessemantics from warp-server'spublic-openapi-filter.yaml: it deletes the entire object markedx-internal: truewherever it appears in the tree (a schema property, a parameter, an operation, a tag, a whole schema) as the very first step of the transform, before any other rule runs. All of the fields listed above are now absent from the regenerated file.Public operations added (relative to the previously merged copy)
GET /agent/artifacts/{artifactUid}/downloadGET /agent/run-by-external-referencePOST /agent/runs/{runId}/scoresAlso in the diff:
/harness-support/transcriptdrops out (warp-server now marks it internal),/agent/artifacts/{artifactUid},/agent/identities, and/agent/runspick up operation changes, and the reachable schema set is refreshed (including the deprecation ofbase_harnessin favor ofharnesson agent identities, and a newORCHESTRATIONrun source).Validation
python3 .agents/skills/sync-openapi-spec/scripts/sync_openapi.py --mode self-test→self-test: OK(covers both the stripFlags regression case and the internal-parameter/internal-property pruning case; verified each fails without its corresponding fix)--mode diff --source ../warp-server/public_api/openapi.yaml --target developers/agent-api-openapi.yaml→In sync. No changes needed.--mode apply→All $refs resolve in the regenerated spec.; a full-file scan confirms zero remainingx-*extension keys, andfactory_uid/automation_id/agent_typeno longer appear anywhere in the filenpm run buildpasses/api) via computer use against a local dev server:GET /agent/run-by-external-referenceand both/agent/runsoperations render correctly with their parameters and example bodies; nomemory_stores,harness-support, orfactorytag/operation appears anywhere in the sidebar or search; theCreateAgentRequestandAgentResponsemodel pages were inspected property-by-property and no longer includefactory_uid,automation_id, oragent_type; no literalx-*extension text is visible anywhere on the page.Visual proof
Computer-use screenshots (3)
Reviewers
scripts/suggest_reviewers.pyfound no owner entries forwarp-server:public_api/openapi.yaml,router/handlers/public_api/agent_artifacts.go,run_score_reports.go, oragent_webhooks.go, and the requester's GitHub handle could not be resolved automatically, so this still needs manual assignment to the Oz API owners.Found by
The
missing_docsdrift-watch audit (three public API endpoints missing from the spec).Originating thread: https://warpdev.slack.com/archives/C09BVK0PL3Y/p1786727807612589
Conversation: https://staging.warp.dev/conversation/1bda9ae7-44b1-43c5-bb7a-d22ccf8b6c16
Run: https://oz.staging.warp.dev/runs/019ff6ea-bc3c-7336-b1f5-9f1f5b89cd84
This PR was generated with Oz.