Skip to content

CLI: add dynamic --version resolution#24

Merged
osolmaz merged 1 commit intoopenclaw:mainfrom
osolmaz:fix/opencode-acp-mode
Feb 26, 2026
Merged

CLI: add dynamic --version resolution#24
osolmaz merged 1 commit intoopenclaw:mainfrom
osolmaz:fix/opencode-acp-mode

Conversation

@dutifulbob
Copy link
Contributor

Summary

  • add a canonical runtime version resolver in src/version.ts
  • wire CLI --version to that resolver (src/cli.ts)
  • stop hardcoding ACP clientInfo.version; use the same resolver (src/client.ts)
  • add tests for CLI/version resolution (test/cli.test.ts, test/version.test.ts)

Why

acpx --version should work without hardcoded values and should reflect the CI/build-assigned package version. This also keeps ACP clientInfo.version consistent with the CLI version.

Validation

  • npm run build:test && node --test dist-test/test/version.test.js dist-test/test/cli.test.js
  • npm run lint
  • npm run format:check
  • npm run typecheck
  • manual: npm run dev -- --version
  • manual: node dist/cli.js --version

@dutifulbob dutifulbob force-pushed the fix/opencode-acp-mode branch from 2a38467 to 76120f9 Compare February 26, 2026 08:38
@osolmaz osolmaz merged commit 8c5c3e3 into openclaw:main Feb 26, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants