@altimateai/altimate-code 0.2.3 → 0.2.5
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 +32 -0
- package/LICENSE +1 -1
- package/bin/opencode +180 -0
- package/package.json +12 -12
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,38 @@ 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.2.5] - 2026-03-13
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
|
|
12
|
+
- `/feedback` command and `feedback_submit` tool for in-app user feedback (#89)
|
|
13
|
+
- Datamate manager — dynamic MCP server management (#99)
|
|
14
|
+
- Non-interactive mode for `mcp add` command with input validation
|
|
15
|
+
- `mcp remove` command
|
|
16
|
+
- Upstream merge with OpenCode v1.2.20
|
|
17
|
+
|
|
18
|
+
### Fixed
|
|
19
|
+
|
|
20
|
+
- TUI crash after upstream merge (#98)
|
|
21
|
+
- `GitlabAuthPlugin` type incompatibility in plugin loader (#92)
|
|
22
|
+
- All test failures from fork restructure (#91)
|
|
23
|
+
- CI/CD workflow paths updated from `altimate-code` to `opencode`
|
|
24
|
+
- Fallback to global config when not in a git repo
|
|
25
|
+
- PR standards workflow `TEAM_MEMBERS` ref corrected from `dev` to `main` (#101)
|
|
26
|
+
|
|
27
|
+
### Changed
|
|
28
|
+
|
|
29
|
+
- Removed self-hosted runners from public repo CI (#110)
|
|
30
|
+
- Migrated CI/release to ARC runners (#93, #94)
|
|
31
|
+
- Reverted Windows tests to `windows-latest` (#95)
|
|
32
|
+
- Engine version bumped to 0.2.5
|
|
33
|
+
|
|
34
|
+
## [0.2.4] - 2026-03-04
|
|
35
|
+
|
|
36
|
+
### Added
|
|
37
|
+
|
|
38
|
+
- E2E tests for npm install pipeline: postinstall script, bin wrapper, and publish output (#50)
|
|
39
|
+
|
|
8
40
|
## [0.2.3] - 2026-03-04
|
|
9
41
|
|
|
10
42
|
### Added
|
package/LICENSE
CHANGED
package/bin/opencode
ADDED
|
@@ -0,0 +1,180 @@
|
|
|
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)
|
package/package.json
CHANGED
|
@@ -7,19 +7,19 @@
|
|
|
7
7
|
"scripts": {
|
|
8
8
|
"postinstall": "bun ./postinstall.mjs || node ./postinstall.mjs"
|
|
9
9
|
},
|
|
10
|
-
"version": "v0.2.
|
|
10
|
+
"version": "v0.2.5",
|
|
11
11
|
"license": "MIT",
|
|
12
12
|
"optionalDependencies": {
|
|
13
|
-
"@altimateai/altimate-code-linux-x64": "v0.2.
|
|
14
|
-
"@altimateai/altimate-code-linux-arm64-musl": "v0.2.
|
|
15
|
-
"@altimateai/altimate-code-darwin-x64": "v0.2.
|
|
16
|
-
"@altimateai/altimate-code-windows-x64": "v0.2.
|
|
17
|
-
"@altimateai/altimate-code-linux-x64-musl": "v0.2.
|
|
18
|
-
"@altimateai/altimate-code-darwin-x64-baseline": "v0.2.
|
|
19
|
-
"@altimateai/altimate-code-linux-x64-baseline-musl": "v0.2.
|
|
20
|
-
"@altimateai/altimate-code-linux-x64-baseline": "v0.2.
|
|
21
|
-
"@altimateai/altimate-code-linux-arm64": "v0.2.
|
|
22
|
-
"@altimateai/altimate-code-darwin-arm64": "v0.2.
|
|
23
|
-
"@altimateai/altimate-code-windows-x64-baseline": "v0.2.
|
|
13
|
+
"@altimateai/altimate-code-linux-x64": "v0.2.5",
|
|
14
|
+
"@altimateai/altimate-code-linux-arm64-musl": "v0.2.5",
|
|
15
|
+
"@altimateai/altimate-code-darwin-x64": "v0.2.5",
|
|
16
|
+
"@altimateai/altimate-code-windows-x64": "v0.2.5",
|
|
17
|
+
"@altimateai/altimate-code-linux-x64-musl": "v0.2.5",
|
|
18
|
+
"@altimateai/altimate-code-darwin-x64-baseline": "v0.2.5",
|
|
19
|
+
"@altimateai/altimate-code-linux-x64-baseline-musl": "v0.2.5",
|
|
20
|
+
"@altimateai/altimate-code-linux-x64-baseline": "v0.2.5",
|
|
21
|
+
"@altimateai/altimate-code-linux-arm64": "v0.2.5",
|
|
22
|
+
"@altimateai/altimate-code-darwin-arm64": "v0.2.5",
|
|
23
|
+
"@altimateai/altimate-code-windows-x64-baseline": "v0.2.5"
|
|
24
24
|
}
|
|
25
25
|
}
|