codewhale 0.9.3 → 0.9.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/README.md CHANGED
@@ -10,9 +10,9 @@ rollback.
10
10
 
11
11
  This npm package is a small launcher: it downloads the matching native
12
12
  Codewhale binaries for your platform, verifies them against the release
13
- SHA-256 manifest, and installs the `codewhale`, `codew`, and `codewhale-tui`
14
- commands. The application state and credentials still live in Codewhale's
15
- normal config files, not inside `node_modules`.
13
+ SHA-256 manifest, and installs `codewhale` plus the `codew` convenience name.
14
+ Both names run the same compiled runtime. The application state and credentials
15
+ still live in Codewhale's normal config files, not inside `node_modules`.
16
16
 
17
17
  > Previously published as `deepseek-tui`. See
18
18
  > [docs/REBRAND.md](https://github.com/Hmbown/CodeWhale/blob/main/docs/REBRAND.md)
@@ -52,10 +52,9 @@ Every provider is the same one-line shape — `--provider openrouter`,
52
52
  Claude key; the full registry lives in
53
53
  [docs/PROVIDERS.md](https://github.com/Hmbown/CodeWhale/blob/main/docs/PROVIDERS.md).
54
54
 
55
- The `codewhale` facade and `codewhale-tui` binary share
56
- `~/.codewhale/config.toml` for auth and default model settings. Legacy
57
- `~/.deepseek/config.toml` installs are still read as a compatibility fallback.
58
- Common TUI commands are available directly through the facade, including
55
+ The single runtime reads `~/.codewhale/config.toml` for auth and default model
56
+ settings. Legacy `~/.deepseek/config.toml` installs are still read as a
57
+ compatibility fallback. Common commands are available directly, including
59
58
  `codewhale doctor`, `codewhale models`, `codewhale sessions`, and
60
59
  `codewhale resume --last`.
61
60
 
@@ -71,10 +70,10 @@ Prebuilt binaries for the GitHub release are downloaded automatically:
71
70
  selected GitHub Release)
72
71
 
73
72
  The source-candidate wrapper recognizes Android arm64 and resolves the
74
- Termux-native `codewhale`, `codew`, and `codewhale-tui` assets. That path works
75
- only for package versions whose matching GitHub Release publishes all three
76
- assets, and remains preview support pending real-device QA. See the support
77
- table in [docs/INSTALL.md](https://github.com/Hmbown/CodeWhale/blob/main/docs/INSTALL.md).
73
+ Termux-native `codewhale` and `codew` assets. That path works only for package
74
+ versions whose matching GitHub Release publishes both assets, and remains
75
+ preview support pending real-device QA. See the support table in
76
+ [docs/INSTALL.md](https://github.com/Hmbown/CodeWhale/blob/main/docs/INSTALL.md).
78
77
 
79
78
  HarmonyOS PC (`openharmony`) is treated as `linux`, so it gets the Linux
80
79
  binaries matching your CPU architecture (x64 or arm64). Linux riscv64 prebuilts
@@ -1,8 +1,9 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- const { runCodeWhaleTui } = require("../scripts/run");
3
+ const { runCodeWhale } = require("../scripts/run");
4
4
 
5
- runCodeWhaleTui().catch((error) => {
6
- console.error("Failed to start codewhale-tui:", error.message);
5
+ process.stderr.write("codewhale-tui: deprecated alias to `codewhale` (single binary since v0.9.5). Use `codewhale` instead.\n");
6
+ runCodeWhale().catch((error) => {
7
+ console.error("Failed to start codewhale:", error.message);
7
8
  process.exit(1);
8
9
  });
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "codewhale",
3
- "version": "0.9.3",
4
- "codewhaleBinaryVersion": "0.9.3",
3
+ "version": "0.9.5",
4
+ "codewhaleBinaryVersion": "0.9.5",
5
5
  "description": "Terminal coding agent for supported hosted and local models. One runtime on your machine. Rust, MIT.",
6
6
  "author": "Hmbown",
7
7
  "license": "MIT",
@@ -35,8 +35,7 @@
35
35
  "type": "commonjs",
36
36
  "bin": {
37
37
  "codewhale": "bin/codewhale.js",
38
- "codew": "bin/codew.js",
39
- "codewhale-tui": "bin/codewhale-tui.js"
38
+ "codew": "bin/codew.js"
40
39
  },
41
40
  "scripts": {
42
41
  "release:check": "node scripts/verify-release-assets.js",
@@ -5,6 +5,20 @@ const CHECKSUM_MANIFEST = "codewhale-artifacts-sha256.txt";
5
5
  const BUNDLE_CHECKSUM_MANIFEST = "codewhale-bundles-sha256.txt";
6
6
  const WINDOWS_INSTALLER_ASSET = "CodeWhaleSetup.exe";
7
7
 
8
+ // v0.9.5 bridge: already-shipped v0.9.4 clients require these names before
9
+ // they will advertise or install a newer release. They contain byte-identical
10
+ // copies of the consolidated `codewhale` runtime; current installers do not
11
+ // expose them as a third command.
12
+ const LEGACY_TUI_BRIDGE_ASSET_NAMES = [
13
+ "codewhale-tui-linux-x64",
14
+ "codewhale-tui-linux-arm64",
15
+ "codewhale-tui-android-arm64",
16
+ "codewhale-tui-macos-x64",
17
+ "codewhale-tui-macos-arm64",
18
+ "codewhale-tui-windows-x64.exe",
19
+ "codewhale-tui-windows-arm64.exe",
20
+ ];
21
+
8
22
  const CNB_BINARY_ASSET_NAMES = [
9
23
  "codewhale-linux-x64",
10
24
  "codew-linux-x64",
@@ -29,19 +43,19 @@ const BUNDLE_ASSET_NAMES = [
29
43
 
30
44
  const ASSET_MATRIX = {
31
45
  linux: {
32
- x64: ["codewhale-linux-x64", "codewhale-tui-linux-x64", "codew-linux-x64"],
33
- arm64: ["codewhale-linux-arm64", "codewhale-tui-linux-arm64", "codew-linux-arm64"],
46
+ x64: ["codewhale-linux-x64", "codew-linux-x64"],
47
+ arm64: ["codewhale-linux-arm64", "codew-linux-arm64"],
34
48
  },
35
49
  android: {
36
- arm64: ["codewhale-android-arm64", "codewhale-tui-android-arm64", "codew-android-arm64"],
50
+ arm64: ["codewhale-android-arm64", "codew-android-arm64"],
37
51
  },
38
52
  darwin: {
39
- x64: ["codewhale-macos-x64", "codewhale-tui-macos-x64", "codew-macos-x64"],
40
- arm64: ["codewhale-macos-arm64", "codewhale-tui-macos-arm64", "codew-macos-arm64"],
53
+ x64: ["codewhale-macos-x64", "codew-macos-x64"],
54
+ arm64: ["codewhale-macos-arm64", "codew-macos-arm64"],
41
55
  },
42
56
  win32: {
43
- x64: ["codewhale-windows-x64.exe", "codewhale-tui-windows-x64.exe", "codew-windows-x64.exe", "codewhale.bat"],
44
- arm64: ["codewhale-windows-arm64.exe", "codewhale-tui-windows-arm64.exe", "codew-windows-arm64.exe"],
57
+ x64: ["codewhale-windows-x64.exe", "codew-windows-x64.exe", "codewhale.bat"],
58
+ arm64: ["codewhale-windows-arm64.exe", "codew-windows-arm64.exe"],
45
59
  },
46
60
  };
47
61
 
@@ -77,29 +91,26 @@ function detectBinaryNames() {
77
91
  platform,
78
92
  arch,
79
93
  codewhale: pair[0],
80
- tui: pair[1],
81
- codew: pair[2],
94
+ codew: pair[1],
82
95
  };
83
96
  }
84
97
 
85
98
  function unsupportedBuildHint() {
86
99
  return [
87
100
  "No prebuilt binary is available for this platform/architecture combo.",
88
- "You can still run codewhale by building from source with Cargo:",
101
+ "You can still run codewhale by building from source with Cargo (single binary):",
89
102
  "",
90
103
  " # Requires Rust 1.88+ (https://rustup.rs)",
91
104
  " cargo install codewhale-cli --locked # provides `codewhale` and `codew`",
92
- " cargo install codewhale-tui --locked # provides `codewhale-tui`",
93
105
  "",
94
106
  "Or build from a checkout:",
95
107
  "",
96
108
  " git clone https://github.com/Hmbown/CodeWhale.git",
97
109
  " cd CodeWhale",
98
- " cargo install --path crates/cli --locked",
99
- " cargo install --path crates/tui --locked",
110
+ " cargo install --path crates/cli --locked # single binary",
100
111
  "",
101
112
  "See https://github.com/Hmbown/CodeWhale/blob/main/docs/INSTALL.md",
102
- "for cross-compilation, mirror, and Linux ARM64 specifics.",
113
+ "for cross-compilation, mirror, Linux ARM64, FreeBSD, and winget specifics.",
103
114
  ].join("\n");
104
115
  }
105
116
 
@@ -187,6 +198,7 @@ function allAssetNames() {
187
198
  function allReleaseAssetNames() {
188
199
  return [
189
200
  ...allAssetNames(),
201
+ ...LEGACY_TUI_BRIDGE_ASSET_NAMES,
190
202
  ...BUNDLE_ASSET_NAMES,
191
203
  WINDOWS_INSTALLER_ASSET,
192
204
  BUNDLE_CHECKSUM_MANIFEST,
@@ -211,6 +223,7 @@ module.exports = {
211
223
  checksumManifestUrl,
212
224
  detectBinaryNames,
213
225
  executableName,
226
+ LEGACY_TUI_BRIDGE_ASSET_NAMES,
214
227
  releaseAssetUrl,
215
228
  releaseBaseUrl,
216
229
  releaseBinaryDirectory,
@@ -142,7 +142,7 @@ function maxAttempts(context = "runtime", env = process.env) {
142
142
  }
143
143
 
144
144
  function binaryPaths() {
145
- const { codewhale, codew, tui } = detectBinaryNames();
145
+ const { codewhale, codew } = detectBinaryNames();
146
146
  const releaseDir = releaseBinaryDirectory();
147
147
  return {
148
148
  codewhale: {
@@ -153,12 +153,8 @@ function binaryPaths() {
153
153
  asset: codew,
154
154
  target: path.join(releaseDir, process.platform === "win32" ? "codew.exe" : "codew"),
155
155
  },
156
- tui: {
157
- asset: tui,
158
- target: path.join(releaseDir, process.platform === "win32" ? "codewhale-tui.exe" : "codewhale-tui"),
159
- },
160
156
  };
161
- }
157
+ } // single binary — no tui asset (v0.9.5+)
162
158
 
163
159
  // ────────────────────────────────────────────────────────────────────────────
164
160
  // Logging / progress
@@ -207,7 +203,7 @@ function installFailureHint(error) {
207
203
  "codewhale install hint:",
208
204
  ` DEEPSEEK_TUI_RELEASE_BASE_URL is set to ${releaseBase}`,
209
205
  " Verify that this directory contains codewhale-artifacts-sha256.txt",
210
- " plus the codewhale/codew/codewhale-tui binary assets for your platform.",
206
+ " plus the codewhale/codew binary assets for your platform (single binary).",
211
207
  ].join("\n");
212
208
  }
213
209
 
@@ -1138,8 +1134,7 @@ async function run(options = {}) {
1138
1134
  await Promise.all([
1139
1135
  ensureBinary(paths.codewhale.target, paths.codewhale.asset, version, repo, getChecksums, { context }),
1140
1136
  ensureBinary(paths.codew.target, paths.codew.asset, version, repo, getChecksums, { context }),
1141
- ensureBinary(paths.tui.target, paths.tui.asset, version, repo, getChecksums, { context }),
1142
- ]);
1137
+ ]); // single binary
1143
1138
  }
1144
1139
 
1145
1140
  async function getBinaryPath(name) {
@@ -1152,7 +1147,8 @@ async function getBinaryPath(name) {
1152
1147
  return paths.codew.target;
1153
1148
  }
1154
1149
  if (name === "codewhale-tui") {
1155
- return paths.tui.target;
1150
+ // v0.9.5 single-binary: codewhale-tui is now an alias to codewhale for backwards compat
1151
+ return paths.codewhale.target;
1156
1152
  }
1157
1153
  throw new Error(`Unknown binary: ${name}`);
1158
1154
  }
@@ -69,15 +69,17 @@ function buildFromSourceHint() {
69
69
  "You can still run codewhale by building from source with Cargo:",
70
70
  "",
71
71
  " # Requires Rust 1.88+ (https://rustup.rs)",
72
- " cargo install codewhale-cli --locked # provides `codewhale` and `codew`",
73
- " cargo install codewhale-tui --locked # provides `codewhale-tui`",
72
+ " cargo install codewhale-cli --locked # provides `codewhale`",
73
+ " bin=$(dirname \"$(command -v codewhale)\")",
74
+ " ln -sf \"$bin/codewhale\" \"$bin/codew\" # optional short alias",
74
75
  "",
75
76
  "Or build from a checkout:",
76
77
  "",
77
78
  " git clone https://github.com/Hmbown/CodeWhale.git",
78
79
  " cd CodeWhale",
79
80
  " cargo install --path crates/cli --locked",
80
- " cargo install --path crates/tui --locked",
81
+ " bin=$(dirname \"$(command -v codewhale)\")",
82
+ " ln -sf \"$bin/codewhale\" \"$bin/codew\"",
81
83
  "",
82
84
  "See https://github.com/Hmbown/CodeWhale/blob/main/docs/INSTALL.md",
83
85
  ].join("\n");
package/scripts/run.js CHANGED
@@ -51,7 +51,11 @@ async function runCodeWhale() {
51
51
  }
52
52
 
53
53
  async function runCodeWhaleTui() {
54
- await run("codewhale-tui");
54
+ // v0.9.5 single-binary: tui is now an alias to codewhale (kept for backwards compat, will warn)
55
+ if (!process.env.CODEWHALE_SUPPRESS_TUI_DEPRECATION) {
56
+ process.stderr.write("codewhale-tui: deprecated alias to `codewhale` (single binary since v0.9.5). Use `codewhale` instead.\n");
57
+ }
58
+ await run("codewhale");
55
59
  }
56
60
 
57
61
  module.exports = {
@@ -25,8 +25,8 @@ test("openharmony x64 resolves to linux x64 binaries", () => {
25
25
  const { detectBinaryNames } = require(ARTIFACTS_PATH);
26
26
  const result = detectBinaryNames();
27
27
  assert.equal(result.codewhale, "codewhale-linux-x64");
28
- assert.equal(result.tui, "codewhale-tui-linux-x64");
29
28
  assert.equal(result.codew, "codew-linux-x64");
29
+ assert.equal(result.tui, undefined);
30
30
  });
31
31
  });
32
32
 
@@ -35,7 +35,6 @@ test("openharmony arm64 resolves to linux arm64 binaries", () => {
35
35
  const { detectBinaryNames } = require(ARTIFACTS_PATH);
36
36
  const result = detectBinaryNames();
37
37
  assert.equal(result.codewhale, "codewhale-linux-arm64");
38
- assert.equal(result.tui, "codewhale-tui-linux-arm64");
39
38
  assert.equal(result.codew, "codew-linux-arm64");
40
39
  });
41
40
  });
@@ -45,7 +44,6 @@ test("android arm64 resolves to Termux-native Android assets", () => {
45
44
  const { detectBinaryNames } = require(ARTIFACTS_PATH);
46
45
  const result = detectBinaryNames();
47
46
  assert.equal(result.codewhale, "codewhale-android-arm64");
48
- assert.equal(result.tui, "codewhale-tui-android-arm64");
49
47
  assert.equal(result.codew, "codew-android-arm64");
50
48
  });
51
49
  });
@@ -85,7 +83,6 @@ test("Windows arm64 resolves the complete native binary family", () => {
85
83
  platform: "win32",
86
84
  arch: "arm64",
87
85
  codewhale: "codewhale-windows-arm64.exe",
88
- tui: "codewhale-tui-windows-arm64.exe",
89
86
  codew: "codew-windows-arm64.exe",
90
87
  });
91
88
  });
@@ -114,25 +111,30 @@ test("release asset inventory includes binaries, archives, installer, and manife
114
111
  BUNDLE_CHECKSUM_MANIFEST,
115
112
  CHECKSUM_MANIFEST,
116
113
  checksummedReleaseAssetNames,
114
+ LEGACY_TUI_BRIDGE_ASSET_NAMES,
117
115
  WINDOWS_INSTALLER_ASSET,
118
116
  } = require(ARTIFACTS_PATH);
119
117
  const assetNames = allAssetNames();
120
118
  const releaseAssetNames = allReleaseAssetNames();
121
119
  assert.ok(assetNames.includes("codewhale-windows-x64.exe"));
122
- assert.ok(assetNames.includes("codewhale-tui-windows-x64.exe"));
123
120
  assert.ok(assetNames.includes("codew-windows-x64.exe"));
124
121
  assert.ok(assetNames.includes("codewhale.bat"));
125
122
  assert.ok(assetNames.includes("codewhale-windows-arm64.exe"));
126
- assert.ok(assetNames.includes("codewhale-tui-windows-arm64.exe"));
127
123
  assert.ok(assetNames.includes("codew-windows-arm64.exe"));
128
124
  assert.ok(assetNames.includes("codewhale-android-arm64"));
129
- assert.ok(assetNames.includes("codewhale-tui-android-arm64"));
130
125
  assert.ok(assetNames.includes("codew-android-arm64"));
126
+ assert.ok(!assetNames.includes("codewhale-tui-windows-x64.exe"));
127
+ assert.ok(!assetNames.includes("codewhale-tui-windows-arm64.exe"));
128
+ assert.ok(!assetNames.includes("codewhale-tui-android-arm64"));
131
129
  assert.ok(!assetNames.includes("codewhale-linux-riscv64"));
132
130
  assert.ok(releaseAssetNames.includes("codew-windows-x64.exe"));
133
131
  assert.ok(releaseAssetNames.includes("codewhale.bat"));
134
132
  assert.ok(releaseAssetNames.includes("codew-windows-arm64.exe"));
135
133
  assert.ok(releaseAssetNames.includes("codew-android-arm64"));
134
+ for (const bridgeAsset of LEGACY_TUI_BRIDGE_ASSET_NAMES) {
135
+ assert.ok(releaseAssetNames.includes(bridgeAsset));
136
+ assert.ok(!assetNames.includes(bridgeAsset));
137
+ }
136
138
  for (const bundle of BUNDLE_ASSET_NAMES) {
137
139
  assert.ok(releaseAssetNames.includes(bundle));
138
140
  }
@@ -125,6 +125,8 @@ test("glibc preflight message is Codewhale-branded and actionable", () => {
125
125
  assert.match(message, /Prebuilt Codewhale Linux binaries require GLIBC_2\.39/);
126
126
  assert.match(message, /this system has glibc 2\.35/);
127
127
  assert.match(message, /cargo install codewhale-cli --locked/);
128
+ assert.match(message, /ln -sf .*codewhale.*codew/);
129
+ assert.doesNotMatch(message, /cargo install codewhale-tui/);
128
130
  assert.match(message, /Linux x64 release asset is a static \(musl\) build/);
129
131
  assert.match(message, /Linux arm64 asset is a GNU libc build/);
130
132
  assert.match(message, /CODEWHALE_SKIP_GLIBC_CHECK=1/);
@@ -12,6 +12,8 @@ const {
12
12
  BUNDLE_CHECKSUM_MANIFEST,
13
13
  CHECKSUM_MANIFEST,
14
14
  checksummedReleaseAssetNames,
15
+ detectBinaryNames,
16
+ LEGACY_TUI_BRIDGE_ASSET_NAMES,
15
17
  } = require("../scripts/artifacts");
16
18
  const {
17
19
  assertChecksumManifestIncludes,
@@ -154,12 +156,10 @@ test("full local release fixture satisfies the public asset inventory", () => {
154
156
 
155
157
  try {
156
158
  fs.mkdirSync(buildDir, { recursive: true });
157
- for (const binary of ["codewhale", "codew", "codewhale-tui"]) {
158
- fs.writeFileSync(
159
- path.join(buildDir, `${binary}${executableSuffix}`),
160
- `fixture:${binary}\n`,
161
- );
162
- }
159
+ fs.writeFileSync(
160
+ path.join(buildDir, `codewhale${executableSuffix}`),
161
+ "fixture:codewhale\n",
162
+ );
163
163
 
164
164
  execFileSync(
165
165
  process.execPath,
@@ -182,6 +182,21 @@ test("full local release fixture satisfies the public asset inventory", () => {
182
182
  );
183
183
  }
184
184
 
185
+ const { codewhale, codew } = detectBinaryNames();
186
+ assert.deepEqual(
187
+ fs.readFileSync(path.join(outputDir, codew)),
188
+ fs.readFileSync(path.join(outputDir, codewhale)),
189
+ "codew must contain the exact same runtime bytes as codewhale",
190
+ );
191
+ for (const legacyAsset of LEGACY_TUI_BRIDGE_ASSET_NAMES) {
192
+ const primaryAsset = legacyAsset.replace("codewhale-tui-", "codewhale-");
193
+ assert.deepEqual(
194
+ fs.readFileSync(path.join(outputDir, legacyAsset)),
195
+ fs.readFileSync(path.join(outputDir, primaryAsset)),
196
+ `${legacyAsset} must be a byte-identical compatibility copy`,
197
+ );
198
+ }
199
+
185
200
  const canonicalChecksums = parseChecksumManifest(
186
201
  fs.readFileSync(path.join(outputDir, CHECKSUM_MANIFEST), "utf8"),
187
202
  );