{"record":{"id":"7f97b5f64b4fc309","repo":"larksuite/cli","slug":"s-s-available","errorCode":null,"errorMessage":"%s → %s available","messagePattern":"(.+?) → (.+?) available","errorType":"console","errorClass":null,"httpStatus":null,"severity":"info","filePath":"cmd/doctor/doctor.go","lineNumber":254,"sourceCode":"\tresp, err := client.Do(req)\n\tif err != nil {\n\t\treturn err\n\t}\n\tresp.Body.Close()\n\treturn nil\n}\n\n// checkCLIUpdate actively queries the npm registry for the latest version.\n// Unlike the root-level async check, this does a synchronous fetch with timeout\n// and works regardless of build version (dev builds included).\nfunc checkCLIUpdate() []checkResult {\n\tlatest, err := fetchLatestForDoctor()\n\tif err != nil {\n\t\treturn []checkResult{warn(\"cli_update\", \"check failed: \"+err.Error(), \"\")}\n\t}\n\tcurrent := build.Version\n\tif update.IsNewer(latest, current) {\n\t\treturn []checkResult{warn(\"cli_update\",\n\t\t\tfmt.Sprintf(\"%s → %s available\", current, latest),\n\t\t\t\"run: lark-cli update\")}\n\t}\n\treturn []checkResult{pass(\"cli_update\", latest+\" (up to date)\")}\n}\n\nvar fetchLatestForDoctor = update.FetchLatest\n\nfunc finishDoctor(f *cmdutil.Factory, checks []checkResult) error {\n\tallOK := true\n\tfor _, c := range checks {\n\t\tif c.Status == \"fail\" {\n\t\t\tallOK = false\n\t\t\tbreak\n\t\t}\n\t}\n\n\tresult := map[string]interface{}{","sourceCodeStart":236,"sourceCodeEnd":272,"githubUrl":"https://github.com/larksuite/cli/blob/7fd6ef3c07182257ce776cdc5a614e122d5bd4b3/cmd/doctor/doctor.go#L236-L272","documentation":"This warning is emitted by `lark-cli doctor` when the CLI update check succeeds and update.IsNewer determines that the latest version published on the npm registry is newer than the running build's version (build.Version). It means your installed CLI is out of date; the check result carries the hint \"run: lark-cli update\". It is informational in nature — the CLI works, but a newer release exists.","triggerScenarios":"Running `lark-cli doctor` when fetchLatestForDoctor returns a version string for which update.IsNewer(latest, build.Version) is true — i.e., the npm registry has a release newer than the currently installed binary.","commonSituations":"An install made weeks/months ago while newer releases shipped; a dev build (version \"dev\" or an old pinned version) compared against a released registry version; a frozen/pinned CLI version in CI that has since been superseded upstream.","solutions":["Run `lark-cli update` to upgrade the CLI to the latest published version.","Alternatively reinstall via your package manager (e.g. `npm install -g lark-cli@latest`) if you manage the binary outside the built-in updater.","Re-run `lark-cli doctor` afterwards and confirm the check reports \"(up to date)\".","If you must stay on the current version (e.g. pinned CI), acknowledge or filter this warning; it does not affect the doctor exit code unless other checks fail."],"exampleFix":"// before\n$ lark-cli doctor\n  cli_update: warn - 1.0.0 → 1.2.3 available (run: lark-cli update)\n// after\n$ lark-cli update\n$ lark-cli doctor\n  cli_update: pass - 1.2.3 (up to date)","handlingStrategy":"validation","validationCode":"# Compare installed vs latest before/after running doctor\nlark-cli --version\nnpm view lark-cli version","typeGuard":null,"tryCatchPattern":"// Skip or auto-resolve the outdated warning when updates are managed externally\nfor _, r := range results {\n    if r.Check == \"cli_update\" && r.Status == \"warn\" && strings.Contains(r.Message, \"available\") {\n        continue // outdated CLI: handle via scheduled `lark-cli update`, not doctor gating\n    }\n}","preventionTips":["Run `lark-cli update` on a regular schedule or before important workflows.","Pin the CLI version in CI and upgrade deliberately, acknowledging this warning.","Re-run `lark-cli doctor` after updating to confirm the pass state."],"tags":["update","version","doctor","upgrade-available"],"backgroundTag":"cli-outdated-version","analyzedSha":"7fd6ef3c07182257ce776cdc5a614e122d5bd4b3","analyzedAt":"2026-09-04T21:17:44.649Z","contentChangedAt":"2026-09-04T21:17:44.649Z","schemaVersion":2},"datasetVersion":"2026-09-12T02:17:10.037Z"}