feat(cli,api): difyctl version probes server and reports compat verdict#36356
Open
lin-snow wants to merge 1 commit into
Open
feat(cli,api): difyctl version probes server and reports compat verdict#36356lin-snow wants to merge 1 commit into
lin-snow wants to merge 1 commit into
Conversation
Adds GET /openapi/v1/_version (no auth, mirrors _health) and reshapes difyctl version into a kubectl-style three-block report (client / server / compat) with -o text|json|yaml, --client to skip the probe, --short for scripting, and --check-compat to exit 64 when status != compatible. resolveBuildInfo now also falls back to package.json#difyctl.compat so pnpm dev/build/test all carry a real compat range without needing the release pipeline env vars. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Contributor
Pyrefly Type Coverage
|
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.
Summary
GET /openapi/v1/_versionmeta endpoint (no auth, mirrors_health) exposes serverversion+editionso the CLI can probe compatibility without a session.difyctl versionbecomes a kubectl-style three-block report (client / server / compat). New flags:-o text|json|yaml,--clientto skip the probe,--shortfor scripting,--check-compatexits 64 when status ≠compatible.resolveBuildInfonow also falls back topackage.json#difyctl.compat, sopnpm dev/pnpm build/pnpm testall carry a real compat range without depending on release-pipeline env vars.Probe degrades gracefully: server unreachable →
(unreachable), compat verdictunknown. Default exit code stays0unless--check-compatis passed.Checklist
make lint && make type-check(backend) andcd web && pnpm exec vp staged(frontend) to appease the lint gods