@altimateai/altimate-code 0.2.5 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +41 -0
- package/package.json +13 -12
- package/postinstall.mjs +32 -8
- package/bin/opencode +0 -180
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,47 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [0.3.1] - 2026-03-15
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
|
|
12
|
+
- Database migration crash when upgrading from v0.2.x — backfill NULL migration names for Drizzle beta.16 compatibility (#161)
|
|
13
|
+
- Install banner not visible during `npm install` — moved output from stdout to stderr (#161)
|
|
14
|
+
- Verbose changelog dump removed from CLI startup (#161)
|
|
15
|
+
- `altimate upgrade` detection broken — `method()` and `latest()` referenced upstream `opencode-ai` package names instead of `@altimateai/altimate-code` (#161)
|
|
16
|
+
- Brew formula detection and upgrade referencing `opencode` instead of `altimate-code` (#161)
|
|
17
|
+
- Homebrew tap updated to v0.3.0 (was stuck at 0.1.4 due to expired `HOMEBREW_TAP_TOKEN`) (#161)
|
|
18
|
+
- `.opencode/memory/` references in docs updated to `.altimate-code/memory/` (#161)
|
|
19
|
+
- Stale `@opencode-ai/plugin` reference in CONTRIBUTING.md (#161)
|
|
20
|
+
|
|
21
|
+
### Changed
|
|
22
|
+
|
|
23
|
+
- CI now uses path-based change detection to skip unaffected jobs (saves ~100s on non-TS changes) (#161)
|
|
24
|
+
- Release workflow gated on test job passing (#157)
|
|
25
|
+
- Upstream merge restricted to published GitHub releases only (#150)
|
|
26
|
+
|
|
27
|
+
## [0.3.0] - 2026-03-15
|
|
28
|
+
|
|
29
|
+
### Added
|
|
30
|
+
|
|
31
|
+
- AI-powered prompt enhancement (#144)
|
|
32
|
+
- Altimate Memory — persistent cross-session memory with TTL, namespaces, citations, and audit logging (#136)
|
|
33
|
+
- Upstream merge with OpenCode v1.2.26 (#142)
|
|
34
|
+
|
|
35
|
+
### Fixed
|
|
36
|
+
|
|
37
|
+
- Sentry review findings from PR #144 (#147)
|
|
38
|
+
- OAuth token refresh retry and error handling for idle timeout (#133)
|
|
39
|
+
- Welcome banner on first CLI run after install/upgrade (#132)
|
|
40
|
+
- `@altimateai/altimate-code` npm package name restored after upstream rebase
|
|
41
|
+
- Replace `mock.module()` with `spyOn()` to fix 149 test failures (#153)
|
|
42
|
+
|
|
43
|
+
### Changed
|
|
44
|
+
|
|
45
|
+
- Rebrand user-facing references to Altimate Code (#134)
|
|
46
|
+
- Bump `@modelcontextprotocol/sdk` dependency (#139)
|
|
47
|
+
- Engine version bumped to 0.3.0
|
|
48
|
+
|
|
8
49
|
## [0.2.5] - 2026-03-13
|
|
9
50
|
|
|
10
51
|
### Added
|
package/package.json
CHANGED
|
@@ -7,19 +7,20 @@
|
|
|
7
7
|
"scripts": {
|
|
8
8
|
"postinstall": "bun ./postinstall.mjs || node ./postinstall.mjs"
|
|
9
9
|
},
|
|
10
|
-
"version": "v0.
|
|
10
|
+
"version": "v0.3.1",
|
|
11
11
|
"license": "MIT",
|
|
12
12
|
"optionalDependencies": {
|
|
13
|
-
"@altimateai/altimate-code-linux-x64": "v0.
|
|
14
|
-
"@altimateai/altimate-code-
|
|
15
|
-
"@altimateai/altimate-code-
|
|
16
|
-
"@altimateai/altimate-code-
|
|
17
|
-
"@altimateai/altimate-code-
|
|
18
|
-
"@altimateai/altimate-code-
|
|
19
|
-
"@altimateai/altimate-code-
|
|
20
|
-
"@altimateai/altimate-code-linux-x64-baseline": "v0.
|
|
21
|
-
"@altimateai/altimate-code-linux-
|
|
22
|
-
"@altimateai/altimate-code-
|
|
23
|
-
"@altimateai/altimate-code-
|
|
13
|
+
"@altimateai/altimate-code-linux-x64": "v0.3.1",
|
|
14
|
+
"@altimateai/altimate-code-windows-arm64": "v0.3.1",
|
|
15
|
+
"@altimateai/altimate-code-linux-arm64-musl": "v0.3.1",
|
|
16
|
+
"@altimateai/altimate-code-darwin-x64": "v0.3.1",
|
|
17
|
+
"@altimateai/altimate-code-windows-x64": "v0.3.1",
|
|
18
|
+
"@altimateai/altimate-code-linux-x64-musl": "v0.3.1",
|
|
19
|
+
"@altimateai/altimate-code-darwin-x64-baseline": "v0.3.1",
|
|
20
|
+
"@altimateai/altimate-code-linux-x64-baseline-musl": "v0.3.1",
|
|
21
|
+
"@altimateai/altimate-code-linux-x64-baseline": "v0.3.1",
|
|
22
|
+
"@altimateai/altimate-code-linux-arm64": "v0.3.1",
|
|
23
|
+
"@altimateai/altimate-code-darwin-arm64": "v0.3.1",
|
|
24
|
+
"@altimateai/altimate-code-windows-x64-baseline": "v0.3.1"
|
|
24
25
|
}
|
|
25
26
|
}
|
package/postinstall.mjs
CHANGED
|
@@ -86,7 +86,8 @@ function prepareBinDirectory(binaryName) {
|
|
|
86
86
|
}
|
|
87
87
|
|
|
88
88
|
function printWelcome(version) {
|
|
89
|
-
const
|
|
89
|
+
const cleanVersion = version.replace(/^v/, "")
|
|
90
|
+
const v = `altimate-code v${cleanVersion} installed`
|
|
90
91
|
const lines = [
|
|
91
92
|
"",
|
|
92
93
|
" Get started:",
|
|
@@ -105,11 +106,28 @@ function printWelcome(version) {
|
|
|
105
106
|
const empty = ` │ ${" ".repeat(contentWidth)} │`
|
|
106
107
|
const row = (s) => ` │ ${pad(s)} │`
|
|
107
108
|
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
109
|
+
// Use stderr — npm v7+ silences postinstall stdout
|
|
110
|
+
const out = (s) => process.stderr.write(s + "\n")
|
|
111
|
+
out(top)
|
|
112
|
+
out(empty)
|
|
113
|
+
out(row(` ${v}`))
|
|
114
|
+
for (const line of lines) out(row(line))
|
|
115
|
+
out(bot)
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* Write a marker file so the CLI can show a welcome/upgrade banner on first run.
|
|
120
|
+
* npm v7+ silences postinstall stdout, so the CLI reads this marker at startup instead.
|
|
121
|
+
*/
|
|
122
|
+
function writeUpgradeMarker(version) {
|
|
123
|
+
try {
|
|
124
|
+
const xdgData = process.env.XDG_DATA_HOME || path.join(os.homedir(), ".local", "share")
|
|
125
|
+
const dataDir = path.join(xdgData, "altimate-code")
|
|
126
|
+
fs.mkdirSync(dataDir, { recursive: true })
|
|
127
|
+
fs.writeFileSync(path.join(dataDir, ".installed-version"), version.replace(/^v/, ""))
|
|
128
|
+
} catch {
|
|
129
|
+
// Non-fatal — the CLI just won't show a welcome banner
|
|
130
|
+
}
|
|
113
131
|
}
|
|
114
132
|
|
|
115
133
|
async function main() {
|
|
@@ -126,7 +144,10 @@ async function main() {
|
|
|
126
144
|
// On Windows, the .exe is already included in the package and bin field points to it
|
|
127
145
|
// No postinstall setup needed
|
|
128
146
|
console.log("Windows detected: binary setup not needed (using packaged .exe)")
|
|
129
|
-
if (version)
|
|
147
|
+
if (version) {
|
|
148
|
+
writeUpgradeMarker(version)
|
|
149
|
+
printWelcome(version)
|
|
150
|
+
}
|
|
130
151
|
return
|
|
131
152
|
}
|
|
132
153
|
|
|
@@ -141,7 +162,10 @@ async function main() {
|
|
|
141
162
|
fs.copyFileSync(binaryPath, target)
|
|
142
163
|
}
|
|
143
164
|
fs.chmodSync(target, 0o755)
|
|
144
|
-
if (version)
|
|
165
|
+
if (version) {
|
|
166
|
+
writeUpgradeMarker(version)
|
|
167
|
+
printWelcome(version)
|
|
168
|
+
}
|
|
145
169
|
} catch (error) {
|
|
146
170
|
console.error("Failed to setup altimate-code binary:", error.message)
|
|
147
171
|
process.exit(1)
|
package/bin/opencode
DELETED
|
@@ -1,180 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
const childProcess = require("child_process")
|
|
4
|
-
const fs = require("fs")
|
|
5
|
-
const path = require("path")
|
|
6
|
-
const os = require("os")
|
|
7
|
-
|
|
8
|
-
function run(target) {
|
|
9
|
-
const result = childProcess.spawnSync(target, process.argv.slice(2), {
|
|
10
|
-
stdio: "inherit",
|
|
11
|
-
})
|
|
12
|
-
if (result.error) {
|
|
13
|
-
console.error(result.error.message)
|
|
14
|
-
process.exit(1)
|
|
15
|
-
}
|
|
16
|
-
const code = typeof result.status === "number" ? result.status : 0
|
|
17
|
-
process.exit(code)
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
const envPath = process.env.ALTIMATE_CODE_BIN_PATH
|
|
21
|
-
if (envPath) {
|
|
22
|
-
run(envPath)
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
const scriptPath = fs.realpathSync(__filename)
|
|
26
|
-
const scriptDir = path.dirname(scriptPath)
|
|
27
|
-
|
|
28
|
-
//
|
|
29
|
-
const cached = path.join(scriptDir, ".altimate-code")
|
|
30
|
-
if (fs.existsSync(cached)) {
|
|
31
|
-
run(cached)
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
const platformMap = {
|
|
35
|
-
darwin: "darwin",
|
|
36
|
-
linux: "linux",
|
|
37
|
-
win32: "windows",
|
|
38
|
-
}
|
|
39
|
-
const archMap = {
|
|
40
|
-
x64: "x64",
|
|
41
|
-
arm64: "arm64",
|
|
42
|
-
arm: "arm",
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
let platform = platformMap[os.platform()]
|
|
46
|
-
if (!platform) {
|
|
47
|
-
platform = os.platform()
|
|
48
|
-
}
|
|
49
|
-
let arch = archMap[os.arch()]
|
|
50
|
-
if (!arch) {
|
|
51
|
-
arch = os.arch()
|
|
52
|
-
}
|
|
53
|
-
const scope = "@altimateai"
|
|
54
|
-
const base = "altimate-code-" + platform + "-" + arch
|
|
55
|
-
const binary = platform === "windows" ? "altimate-code.exe" : "altimate-code"
|
|
56
|
-
|
|
57
|
-
function supportsAvx2() {
|
|
58
|
-
if (arch !== "x64") return false
|
|
59
|
-
|
|
60
|
-
if (platform === "linux") {
|
|
61
|
-
try {
|
|
62
|
-
return /(^|\s)avx2(\s|$)/i.test(fs.readFileSync("/proc/cpuinfo", "utf8"))
|
|
63
|
-
} catch {
|
|
64
|
-
return false
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
if (platform === "darwin") {
|
|
69
|
-
try {
|
|
70
|
-
const result = childProcess.spawnSync("sysctl", ["-n", "hw.optional.avx2_0"], {
|
|
71
|
-
encoding: "utf8",
|
|
72
|
-
timeout: 1500,
|
|
73
|
-
})
|
|
74
|
-
if (result.status !== 0) return false
|
|
75
|
-
return (result.stdout || "").trim() === "1"
|
|
76
|
-
} catch {
|
|
77
|
-
return false
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
if (platform === "windows") {
|
|
82
|
-
const cmd =
|
|
83
|
-
'(Add-Type -MemberDefinition "[DllImport(""kernel32.dll"")] public static extern bool IsProcessorFeaturePresent(int ProcessorFeature);" -Name Kernel32 -Namespace Win32 -PassThru)::IsProcessorFeaturePresent(40)'
|
|
84
|
-
|
|
85
|
-
for (const exe of ["powershell.exe", "pwsh.exe", "pwsh", "powershell"]) {
|
|
86
|
-
try {
|
|
87
|
-
const result = childProcess.spawnSync(exe, ["-NoProfile", "-NonInteractive", "-Command", cmd], {
|
|
88
|
-
encoding: "utf8",
|
|
89
|
-
timeout: 3000,
|
|
90
|
-
windowsHide: true,
|
|
91
|
-
})
|
|
92
|
-
if (result.status !== 0) continue
|
|
93
|
-
const out = (result.stdout || "").trim().toLowerCase()
|
|
94
|
-
if (out === "true" || out === "1") return true
|
|
95
|
-
if (out === "false" || out === "0") return false
|
|
96
|
-
} catch {
|
|
97
|
-
continue
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
return false
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
return false
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
const names = (() => {
|
|
108
|
-
const avx2 = supportsAvx2()
|
|
109
|
-
const baseline = arch === "x64" && !avx2
|
|
110
|
-
|
|
111
|
-
if (platform === "linux") {
|
|
112
|
-
const musl = (() => {
|
|
113
|
-
try {
|
|
114
|
-
if (fs.existsSync("/etc/alpine-release")) return true
|
|
115
|
-
} catch {
|
|
116
|
-
// ignore
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
try {
|
|
120
|
-
const result = childProcess.spawnSync("ldd", ["--version"], { encoding: "utf8" })
|
|
121
|
-
const text = ((result.stdout || "") + (result.stderr || "")).toLowerCase()
|
|
122
|
-
if (text.includes("musl")) return true
|
|
123
|
-
} catch {
|
|
124
|
-
// ignore
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
return false
|
|
128
|
-
})()
|
|
129
|
-
|
|
130
|
-
if (musl) {
|
|
131
|
-
if (arch === "x64") {
|
|
132
|
-
if (baseline) return [`${base}-baseline-musl`, `${base}-musl`, `${base}-baseline`, base]
|
|
133
|
-
return [`${base}-musl`, `${base}-baseline-musl`, base, `${base}-baseline`]
|
|
134
|
-
}
|
|
135
|
-
return [`${base}-musl`, base]
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
if (arch === "x64") {
|
|
139
|
-
if (baseline) return [`${base}-baseline`, base, `${base}-baseline-musl`, `${base}-musl`]
|
|
140
|
-
return [base, `${base}-baseline`, `${base}-musl`, `${base}-baseline-musl`]
|
|
141
|
-
}
|
|
142
|
-
return [base, `${base}-musl`]
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
if (arch === "x64") {
|
|
146
|
-
if (baseline) return [`${base}-baseline`, base]
|
|
147
|
-
return [base, `${base}-baseline`]
|
|
148
|
-
}
|
|
149
|
-
return [base]
|
|
150
|
-
})()
|
|
151
|
-
|
|
152
|
-
function findBinary(startDir) {
|
|
153
|
-
let current = startDir
|
|
154
|
-
for (;;) {
|
|
155
|
-
const modules = path.join(current, "node_modules")
|
|
156
|
-
if (fs.existsSync(modules)) {
|
|
157
|
-
for (const name of names) {
|
|
158
|
-
const candidate = path.join(modules, scope, name, "bin", binary)
|
|
159
|
-
if (fs.existsSync(candidate)) return candidate
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
const parent = path.dirname(current)
|
|
163
|
-
if (parent === current) {
|
|
164
|
-
return
|
|
165
|
-
}
|
|
166
|
-
current = parent
|
|
167
|
-
}
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
const resolved = findBinary(scriptDir)
|
|
171
|
-
if (!resolved) {
|
|
172
|
-
console.error(
|
|
173
|
-
"It seems that your package manager failed to install the right version of the altimate-code CLI for your platform. You can try manually installing " +
|
|
174
|
-
names.map((n) => `\"${scope}/${n}\"`).join(" or ") +
|
|
175
|
-
" package",
|
|
176
|
-
)
|
|
177
|
-
process.exit(1)
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
run(resolved)
|