@altimateai/altimate-code 0.2.5 → 0.3.0
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 +22 -0
- package/package.json +13 -12
- package/postinstall.mjs +25 -3
- package/bin/opencode +0 -180
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,28 @@ 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.0] - 2026-03-15
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
|
|
12
|
+
- AI-powered prompt enhancement (#144)
|
|
13
|
+
- Altimate Memory — persistent cross-session memory with TTL, namespaces, citations, and audit logging (#136)
|
|
14
|
+
- Upstream merge with OpenCode v1.2.26 (#142)
|
|
15
|
+
|
|
16
|
+
### Fixed
|
|
17
|
+
|
|
18
|
+
- Sentry review findings from PR #144 (#147)
|
|
19
|
+
- OAuth token refresh retry and error handling for idle timeout (#133)
|
|
20
|
+
- Welcome banner on first CLI run after install/upgrade (#132)
|
|
21
|
+
- `@altimateai/altimate-code` npm package name restored after upstream rebase
|
|
22
|
+
- Replace `mock.module()` with `spyOn()` to fix 149 test failures (#153)
|
|
23
|
+
|
|
24
|
+
### Changed
|
|
25
|
+
|
|
26
|
+
- Rebrand user-facing references to Altimate Code (#134)
|
|
27
|
+
- Bump `@modelcontextprotocol/sdk` dependency (#139)
|
|
28
|
+
- Engine version bumped to 0.3.0
|
|
29
|
+
|
|
8
30
|
## [0.2.5] - 2026-03-13
|
|
9
31
|
|
|
10
32
|
### 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.0",
|
|
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.0",
|
|
14
|
+
"@altimateai/altimate-code-windows-arm64": "v0.3.0",
|
|
15
|
+
"@altimateai/altimate-code-linux-arm64-musl": "v0.3.0",
|
|
16
|
+
"@altimateai/altimate-code-darwin-x64": "v0.3.0",
|
|
17
|
+
"@altimateai/altimate-code-windows-x64": "v0.3.0",
|
|
18
|
+
"@altimateai/altimate-code-linux-x64-musl": "v0.3.0",
|
|
19
|
+
"@altimateai/altimate-code-darwin-x64-baseline": "v0.3.0",
|
|
20
|
+
"@altimateai/altimate-code-linux-x64-baseline-musl": "v0.3.0",
|
|
21
|
+
"@altimateai/altimate-code-linux-x64-baseline": "v0.3.0",
|
|
22
|
+
"@altimateai/altimate-code-linux-arm64": "v0.3.0",
|
|
23
|
+
"@altimateai/altimate-code-darwin-arm64": "v0.3.0",
|
|
24
|
+
"@altimateai/altimate-code-windows-x64-baseline": "v0.3.0"
|
|
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:",
|
|
@@ -112,6 +113,21 @@ function printWelcome(version) {
|
|
|
112
113
|
console.log(bot)
|
|
113
114
|
}
|
|
114
115
|
|
|
116
|
+
/**
|
|
117
|
+
* Write a marker file so the CLI can show a welcome/upgrade banner on first run.
|
|
118
|
+
* npm v7+ silences postinstall stdout, so the CLI reads this marker at startup instead.
|
|
119
|
+
*/
|
|
120
|
+
function writeUpgradeMarker(version) {
|
|
121
|
+
try {
|
|
122
|
+
const xdgData = process.env.XDG_DATA_HOME || path.join(os.homedir(), ".local", "share")
|
|
123
|
+
const dataDir = path.join(xdgData, "altimate-code")
|
|
124
|
+
fs.mkdirSync(dataDir, { recursive: true })
|
|
125
|
+
fs.writeFileSync(path.join(dataDir, ".installed-version"), version.replace(/^v/, ""))
|
|
126
|
+
} catch {
|
|
127
|
+
// Non-fatal — the CLI just won't show a welcome banner
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
|
|
115
131
|
async function main() {
|
|
116
132
|
let version
|
|
117
133
|
try {
|
|
@@ -126,7 +142,10 @@ async function main() {
|
|
|
126
142
|
// On Windows, the .exe is already included in the package and bin field points to it
|
|
127
143
|
// No postinstall setup needed
|
|
128
144
|
console.log("Windows detected: binary setup not needed (using packaged .exe)")
|
|
129
|
-
if (version)
|
|
145
|
+
if (version) {
|
|
146
|
+
writeUpgradeMarker(version)
|
|
147
|
+
printWelcome(version)
|
|
148
|
+
}
|
|
130
149
|
return
|
|
131
150
|
}
|
|
132
151
|
|
|
@@ -141,7 +160,10 @@ async function main() {
|
|
|
141
160
|
fs.copyFileSync(binaryPath, target)
|
|
142
161
|
}
|
|
143
162
|
fs.chmodSync(target, 0o755)
|
|
144
|
-
if (version)
|
|
163
|
+
if (version) {
|
|
164
|
+
writeUpgradeMarker(version)
|
|
165
|
+
printWelcome(version)
|
|
166
|
+
}
|
|
145
167
|
} catch (error) {
|
|
146
168
|
console.error("Failed to setup altimate-code binary:", error.message)
|
|
147
169
|
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)
|