feat(provider): import API contracts and wait for publication - #14
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Providers can import an OpenAPI document, configure the returned draft revision, submit it for review, and wait for the publication result entirely through the CLI.
Add
provider spec-rules,import,submit,wait,update --revision, andreview --revision. Existing metadata/rate-limit updates, version management, publish, rollback, metrics, and skill commands retain their interfaces. Import returns service/revision IDs and preserves structured validation failures even when the server responds with HTTP 201. Polling succeeds only forPUBLISHEDand bounds requests and retry delays by its deadline; writes are never automatically retried.Provider output redacts credentials while retaining JSON Schema definitions such as token/password properties. The refreshed implementation also prevents raw HTTP error bodies and malformed private-header JSON fragments from leaking credential values, rejects blank resource identifiers, and enforces the backend's 2,000-character changelog limit. Add explicit endpoint merge/replacement controls, stdin support, an OpenAPI example, workflow documentation, and regression coverage.
Backend contract status:
main./api/api-services/agent/spec-rulesreturned HTTP 200 and confirmed the example's OpenAPI 3.0.3,Public-Utils, andPER_CALLvalues.Validation on the refreshed branch:
bun install --frozen-lockfilepassed.bun run typecheckpassed.bun run buildpassed.bun run testpassed: 354 tests across 25 files.npm pack --dry-run --ignore-scriptspassed and includes the Provider example and bundled skills.git diff --checkpassed.These are local build/package checks, mocked HTTP tests, and a read-only production contract check. No live Provider import or other production write was performed, and this PR does not publish npm. Package versions and release notes remain controlled by Release Please.
Kanby-Task: KANBY-45