Commit 8616a7e
fix: define ALTIMATE_CLI build-time constants for correct version reporting (#41)
* fix: define ALTIMATE_CLI_VERSION, CHANNEL, and ENGINE_VERSION at build time
The build script defined OPENCODE_VERSION and OPENCODE_CHANNEL but never
defined their ALTIMATE_CLI_* counterparts. Since the runtime code checks
`typeof ALTIMATE_CLI_VERSION === "string"`, the check always failed and
fell back to "local" — causing --version and telemetry to report
"cli_version":"local" instead of the actual version.
Add the three missing build-time defines:
- ALTIMATE_CLI_VERSION: from Script.version (same as OPENCODE_VERSION)
- ALTIMATE_CLI_CHANNEL: from Script.channel (same as OPENCODE_CHANNEL)
- ALTIMATE_ENGINE_VERSION: read from altimate-engine/pyproject.toml
This fixes version reporting in:
- `altimate --version` output
- Telemetry cli_version property
- Telemetry ai.application.ver tag
- Engine manifest.json cli_version field
- Upgrade telemetry from_version field
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix: remove unused OPENCODE_* build defines
Remove OPENCODE_VERSION, OPENCODE_CHANNEL, OPENCODE_WORKER_PATH, and
OPENCODE_LIBC — none are referenced anywhere in the source code. These
were upstream OpenCode leftovers superseded by ALTIMATE_CLI_* constants.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>1 parent 1cd945e commit 8616a7e
1 file changed
+13
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
18 | 28 | | |
19 | 29 | | |
20 | 30 | | |
| |||
186 | 196 | | |
187 | 197 | | |
188 | 198 | | |
189 | | - | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
190 | 202 | | |
191 | 203 | | |
192 | | - | |
193 | | - | |
194 | | - | |
195 | 204 | | |
196 | 205 | | |
197 | 206 | | |
| |||
0 commit comments