opencode-v2
Compare or align Palot's OpenCode 2 CLI, client, protocol/schema, and service version. Use for /oc2-check, read-only beta checks, published channel selection or upgrades, declared version changes, upstream feature availability, or CLI/client/service mismatches. Use opencode-coverage for product integration depth.
ItsWendell · 已有静态检查记录
安装与使用
运行命令前先阅读来源与依赖说明。复制命令不会自动安装或执行。
npx skills add ItsWendell/palot --skill opencode-v2技能说明
name: opencode-v2 description: Compare or align Palot's OpenCode 2 CLI, client, protocol/schema, and service version. Use for /oc2-check, read-only beta checks, published channel selection or upgrades, declared version changes, upstream feature availability, or CLI/client/service mismatches. Use opencode-coverage for product integration depth.
OpenCode v2 alignment
Treat the CLI, generated client, protocol, schema, and Palot service contract as one versioned unit. A check ends with a recommendation, not an upgrade. Enter Update only when the user authorizes changes.
For read-only release or feature-availability questions, follow Read-only comparison and skip Update and Verify alignment. Load palot-desktop-dev only when changing the runtime or needing build, launch, or service-lifecycle guidance. Replacing the shared service can interrupt active turns.
Select a release
Use Stable unless the user requests Beta. Verify that npm's latest tag resolves
to a V2 release for all four units before selecting it: the tag name alone does
not establish the API generation. Keep dependency pins exact even though Palot
accepts compatible stable 2.x services.
Package tags and runtime update feeds are distinct. Palot's user-facing channel
selector follows the official opencode.ai/update/api/{latest|beta}/cli/opencode
feed. Beta can lag Stable or offer a stable-numbered version while npm's beta
tag still points to a 0.0.0-beta-* build. Report actual versions; never silently
substitute one channel mechanism for another.
Read the channel tags for every published unit:
npm view @opencode/cli dist-tags --json
npm view @opencode/client dist-tags --json
npm view @opencode/protocol dist-tags --json
npm view @opencode/schema dist-tags --json
An upgrade candidate is aligned only when the selected CLI, client, protocol, and schema tags resolve to the same exact version. Report tag skew rather than selecting one package's version as the candidate.
Read-only comparison
Use this workflow for /oc2-check and release research. Leave dependencies, lockfiles, the global CLI, and the running service unchanged. Use registry/GitHub reads and isolated package downloads only; do not install packages, execute downloaded code, start Palot, or call service lifecycle/API commands that might start or replace the service. Store any downloaded evidence in a temporary directory or the primary checkout's private-artifact directories.
1. Establish both endpoints
- Read the exact client and protocol pins in
apps/desktop/package.json, their resolved entries and transitive schema inbun.lock, andSUPPORTED_OPENCODE_VERSIONinapps/desktop/src/main/opencode-version.ts. Record each value and flag disagreement or non-exact pins. An installed/global CLI version is not Palot's declared baseline. - Resolve the four channel tags using Select a release. Capture the lookup timestamp, exact versions, per-version npm publication timestamps (
npm view <package> time --json), dependency metadata, and tarball URLs (npm view <package>@<version> version dependencies dist --json). Use explicit versions for all subsequent reads so moving tags cannot change the comparison mid-run. - If pins or tags disagree, report the mismatch and keep independently verified findings, but withhold an aligned-upgrade recommendation. If both endpoints are identical, report that there is no published delta; research a requested feature separately if needed.
2. Map published builds to source
For each endpoint, match its build suffix to the exact run_number in anomalyco/opencode's publish.yml workflow, on branch beta by default:
gh api --paginate \
'repos/anomalyco/opencode/actions/workflows/publish.yml/runs?branch=beta&per_page=100' \
--jq '.workflow_runs[] | {run_number,head_branch,head_sha,status,conclusion,created_at,updated_at,html_url}'
Match run_number for numbered preview builds, not the Actions run database ID,
nearest date, newest successful run, or a bounded recent-run list. Stable versions
have no build suffix: establish the exact version from publish-run inputs and
release/version scripts instead of guessing a run number. Record the exact head
SHA, branch, run URL, and dates. A failed workflow can publish some packages: npm
establishes availability, while the run establishes provenance. If the mapping is
ambiguous, report it rather than substituting a branch tip. If the API caps
history, narrow by publication-date windows and paginate those windows.
Channel names are not source branch names. The npm dev tag is a V2 channel historically published from v2, not necessarily repository dev; verify the current workflow mapping for a requested alternative. Code on another branch is not evidence that the selected package contains it.
3. Compare the complete published range
With the verified endpoint SHAs as BASE_SHA and HEAD_SHA:
gh api --paginate \
"repos/anomalyco/opencode/compare/$BASE_SHA...$HEAD_SHA?per_page=100" \
--jq '.commits[] | {sha,html_url,commit}'
Read comparison status, ahead/behind counts, and total_commits; deduplicate collected SHAs and confirm the count matches. Handle identical, behind, or diverged endpoints explicitly instead of calling every result an upgrade range. Compare responses without pagination can truncate commits, and their changed-file list is capped independently. Inspect relevant commits/PRs and file diffs directly when that list is insufficient. Account for every commit in the range, grouping low-impact changes rather than summarizing only the first page or commit subjects. Report incomplete retrieval as a limitation.
4. Assess Palot impact against published contracts
Use exact npm tarballs for the baseline and candidate client, protocol, and schema to check relevant exports, generated types, request/response shapes, and event payloads. Download the registry's dist.tarball into isola