capix-code 1.5.3 → 1.5.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/package.json +1 -1
- package/scripts/build.sh +33 -0
- package/scripts/postinstall.cjs +1 -1
package/package.json
CHANGED
package/scripts/build.sh
CHANGED
|
@@ -117,6 +117,39 @@ MCPWRAPPER
|
|
|
117
117
|
(cd "$DIR/launcher" && cargo build --locked --release)
|
|
118
118
|
cp "$DIR/launcher/target/release/capix-code$EXE_SUFFIX" "$ARTIFACT/bin/capix-code$EXE_SUFFIX"
|
|
119
119
|
chmod 0755 "$ARTIFACT/bin/capix-code$EXE_SUFFIX"
|
|
120
|
+
|
|
121
|
+
# ── Post-compile branding pass ─────────────────────────────────────────
|
|
122
|
+
# The upstream engine binary has "opencode"/"OpenCode" strings baked in.
|
|
123
|
+
# The rebrand.sh patches source before compilation, but some survive in
|
|
124
|
+
# minified Bun chunks. This pass replaces them in the compiled binary.
|
|
125
|
+
ENGINE_BIN="$ARTIFACT/engine/capix-engine$EXE_SUFFIX"
|
|
126
|
+
if [ -f "$ENGINE_BIN" ]; then
|
|
127
|
+
echo "▸ Applying branding pass to engine binary..."
|
|
128
|
+
# Use perl for binary-safe in-place replacement
|
|
129
|
+
perl -pi -e '
|
|
130
|
+
s/\bOpenCode\b/Capix Code/g;
|
|
131
|
+
s/opencode\.ai\/auth/capix.network\/oauth\/authorize/g;
|
|
132
|
+
s/opencode\.ai\/docs/capix.network\/docs/g;
|
|
133
|
+
s/opencode\.ai/capix.network/g;
|
|
134
|
+
s/opencode mcp add/capix-code mcp add/g;
|
|
135
|
+
s/opencode serve/capix-code serve/g;
|
|
136
|
+
s/opencode run/capix-code run/g;
|
|
137
|
+
s/opencode --continue/capix-code --continue/g;
|
|
138
|
+
s/opencode --mini/capix-code --mini/g;
|
|
139
|
+
s/opencode version/capix-code version/g;
|
|
140
|
+
s/opencode models/capix-code models/g;
|
|
141
|
+
s/opencode status/capix-code status/g;
|
|
142
|
+
s/opencode debug/capix-code debug/g;
|
|
143
|
+
s/opencode auth login/capix-code login/g;
|
|
144
|
+
s/"opencode"/"capix-code"/g;
|
|
145
|
+
s/\.opencode\//.capix-code\//g;
|
|
146
|
+
s/user-agent=opencode\//user-agent=capix-code\//g;
|
|
147
|
+
s/ai\.opencode\.managed/ai.capix-code.managed/g;
|
|
148
|
+
s/opencode\.json/capix-code.json/g;
|
|
149
|
+
s/\bopencode\b/capix-code/g;
|
|
150
|
+
' "$ENGINE_BIN"
|
|
151
|
+
echo " ✓ branding pass applied to engine binary"
|
|
152
|
+
fi
|
|
120
153
|
"$DIR/scripts/assert-artifact.sh" "$ARTIFACT"
|
|
121
154
|
"$DIR/scripts/assert-customer-brand.sh" "$ARTIFACT"
|
|
122
155
|
echo "✓ Customer artifact staged: $ARTIFACT"
|
package/scripts/postinstall.cjs
CHANGED
|
@@ -9,7 +9,7 @@ if (process.env.CI || process.env.GITHUB_ACTIONS) {
|
|
|
9
9
|
process.exit(0);
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
-
const VERSION = '1.5.
|
|
12
|
+
const VERSION = '1.5.4';
|
|
13
13
|
const PLATFORM_MAP = { darwin: 'darwin', linux: 'linux', win32: 'win32' };
|
|
14
14
|
const ARCH_MAP = { arm64: 'arm64', x64: 'x64' };
|
|
15
15
|
const platform = PLATFORM_MAP[process.platform] || 'linux';
|