codewhale 0.9.0 → 0.9.2

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
@@ -1,9 +1,9 @@
1
1
  # codewhale
2
2
 
3
- > The terminal coding agent for any model — open models first.
3
+ > The terminal coding agent for supported hosted and local models — open models first.
4
4
 
5
5
  Codewhale is a Rust TUI and CLI for many model providers — DeepSeek,
6
- OpenRouter, Hugging Face, and local vLLM/SGLang/Ollama are first-class routes,
6
+ OpenRouter, Hugging Face, and local vLLM/SGLang/Ollama are supported routes,
7
7
  and it speaks natively to Anthropic Claude and OpenAI when that's what you have
8
8
  — with approval-gated tools, OS sandboxing, side-git snapshots, and `/restore`
9
9
  rollback.
@@ -65,9 +65,16 @@ Prebuilt binaries for the GitHub release are downloaded automatically:
65
65
 
66
66
  - Linux x64
67
67
  - Linux arm64
68
- - Android arm64 (Termux)
69
68
  - macOS x64 / arm64
70
- - Windows x64
69
+ - Windows x64 / arm64
70
+ - Android arm64 / Termux (preview; requires matching Android assets in the
71
+ selected GitHub Release)
72
+
73
+ 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).
71
78
 
72
79
  HarmonyOS PC (`openharmony`) is treated as `linux`, so it gets the Linux
73
80
  binaries matching your CPU architecture (x64 or arm64). Linux riscv64 prebuilts
package/bin/codew.js CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  const { run } = require("../scripts/run");
4
4
 
5
- run("codewhale").catch((error) => {
6
- console.error("Failed to start codewhale:", error.message);
5
+ run("codew").catch((error) => {
6
+ console.error("Failed to start codew:", error.message);
7
7
  process.exit(1);
8
8
  });
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "codewhale",
3
- "version": "0.9.0",
4
- "codewhaleBinaryVersion": "0.9.0",
5
- "description": "Install and run Codewhale, the agentic terminal for open-source and open-weight coding models, from GitHub release artifacts.",
3
+ "version": "0.9.2",
4
+ "codewhaleBinaryVersion": "0.9.2",
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",
8
8
  "funding": [
@@ -23,6 +23,8 @@ const BUNDLE_ASSET_NAMES = [
23
23
  "codewhale-macos-arm64.tar.gz",
24
24
  "codewhale-windows-x64.zip",
25
25
  "codewhale-windows-x64-portable.zip",
26
+ "codewhale-windows-arm64.zip",
27
+ "codewhale-windows-arm64-portable.zip",
26
28
  ];
27
29
 
28
30
  const ASSET_MATRIX = {
@@ -39,6 +41,7 @@ const ASSET_MATRIX = {
39
41
  },
40
42
  win32: {
41
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"],
42
45
  },
43
46
  };
44
47
 
@@ -142,13 +142,17 @@ function maxAttempts(context = "runtime", env = process.env) {
142
142
  }
143
143
 
144
144
  function binaryPaths() {
145
- const { codewhale, tui } = detectBinaryNames();
145
+ const { codewhale, codew, tui } = detectBinaryNames();
146
146
  const releaseDir = releaseBinaryDirectory();
147
147
  return {
148
148
  codewhale: {
149
149
  asset: codewhale,
150
150
  target: path.join(releaseDir, process.platform === "win32" ? "codewhale.exe" : "codewhale"),
151
151
  },
152
+ codew: {
153
+ asset: codew,
154
+ target: path.join(releaseDir, process.platform === "win32" ? "codew.exe" : "codew"),
155
+ },
152
156
  tui: {
153
157
  asset: tui,
154
158
  target: path.join(releaseDir, process.platform === "win32" ? "codewhale-tui.exe" : "codewhale-tui"),
@@ -203,7 +207,7 @@ function installFailureHint(error) {
203
207
  "codewhale install hint:",
204
208
  ` DEEPSEEK_TUI_RELEASE_BASE_URL is set to ${releaseBase}`,
205
209
  " Verify that this directory contains codewhale-artifacts-sha256.txt",
206
- " plus the codewhale/codewhale-tui binary assets for your platform.",
210
+ " plus the codewhale/codew/codewhale-tui binary assets for your platform.",
207
211
  ].join("\n");
208
212
  }
209
213
 
@@ -1133,6 +1137,7 @@ async function run(options = {}) {
1133
1137
 
1134
1138
  await Promise.all([
1135
1139
  ensureBinary(paths.codewhale.target, paths.codewhale.asset, version, repo, getChecksums, { context }),
1140
+ ensureBinary(paths.codew.target, paths.codew.asset, version, repo, getChecksums, { context }),
1136
1141
  ensureBinary(paths.tui.target, paths.tui.asset, version, repo, getChecksums, { context }),
1137
1142
  ]);
1138
1143
  }
@@ -1143,6 +1148,9 @@ async function getBinaryPath(name) {
1143
1148
  if (name === "codewhale") {
1144
1149
  return paths.codewhale.target;
1145
1150
  }
1151
+ if (name === "codew") {
1152
+ return paths.codew.target;
1153
+ }
1146
1154
  if (name === "codewhale-tui") {
1147
1155
  return paths.tui.target;
1148
1156
  }
@@ -1159,8 +1167,10 @@ module.exports = {
1159
1167
  adoptExistingBinaryIfValid,
1160
1168
  shouldIgnoreInstallFailure,
1161
1169
  shouldSkipOptionalPostinstall,
1170
+ httpRequest,
1162
1171
  defaultTimeoutMs,
1163
1172
  defaultStallMs,
1173
+ binaryPaths,
1164
1174
  ensureBinary,
1165
1175
  maxAttempts,
1166
1176
  withRetry,
@@ -1182,4 +1192,4 @@ if (require.main === module) {
1182
1192
  }
1183
1193
  process.exit(1);
1184
1194
  });
1185
- }
1195
+ }
@@ -68,6 +68,7 @@ test("known platforms are unaffected by alias map", () => {
68
68
  ["linux", "x64", "codewhale-linux-x64"],
69
69
  ["darwin", "arm64", "codewhale-macos-arm64"],
70
70
  ["win32", "x64", "codewhale-windows-x64.exe"],
71
+ ["win32", "arm64", "codewhale-windows-arm64.exe"],
71
72
  ]) {
72
73
  withMockedOs(platform, arch, () => {
73
74
  const { detectBinaryNames } = require(ARTIFACTS_PATH);
@@ -77,6 +78,19 @@ test("known platforms are unaffected by alias map", () => {
77
78
  }
78
79
  });
79
80
 
81
+ test("Windows arm64 resolves the complete native binary family", () => {
82
+ withMockedOs("win32", "arm64", () => {
83
+ const { detectBinaryNames } = require(ARTIFACTS_PATH);
84
+ assert.deepEqual(detectBinaryNames(), {
85
+ platform: "win32",
86
+ arch: "arm64",
87
+ codewhale: "codewhale-windows-arm64.exe",
88
+ tui: "codewhale-tui-windows-arm64.exe",
89
+ codew: "codew-windows-arm64.exe",
90
+ });
91
+ });
92
+ });
93
+
80
94
  test("linux riscv64 reports the temporary upstream binding blocker", () => {
81
95
  withMockedOs("linux", "riscv64", () => {
82
96
  const { detectBinaryNames } = require(ARTIFACTS_PATH);
@@ -108,12 +122,16 @@ test("release asset inventory includes binaries, archives, installer, and manife
108
122
  assert.ok(assetNames.includes("codewhale-tui-windows-x64.exe"));
109
123
  assert.ok(assetNames.includes("codew-windows-x64.exe"));
110
124
  assert.ok(assetNames.includes("codewhale.bat"));
125
+ assert.ok(assetNames.includes("codewhale-windows-arm64.exe"));
126
+ assert.ok(assetNames.includes("codewhale-tui-windows-arm64.exe"));
127
+ assert.ok(assetNames.includes("codew-windows-arm64.exe"));
111
128
  assert.ok(assetNames.includes("codewhale-android-arm64"));
112
129
  assert.ok(assetNames.includes("codewhale-tui-android-arm64"));
113
130
  assert.ok(assetNames.includes("codew-android-arm64"));
114
131
  assert.ok(!assetNames.includes("codewhale-linux-riscv64"));
115
132
  assert.ok(releaseAssetNames.includes("codew-windows-x64.exe"));
116
133
  assert.ok(releaseAssetNames.includes("codewhale.bat"));
134
+ assert.ok(releaseAssetNames.includes("codew-windows-arm64.exe"));
117
135
  assert.ok(releaseAssetNames.includes("codew-android-arm64"));
118
136
  for (const bundle of BUNDLE_ASSET_NAMES) {
119
137
  assert.ok(releaseAssetNames.includes(bundle));
@@ -64,6 +64,13 @@ test("install script remains parseable before the Node support guard runs", () =
64
64
  assert.equal(installScript.includes("?."), false);
65
65
  });
66
66
 
67
+ test("native shortcut has its own platform asset and installed path", () => {
68
+ const paths = _internal.binaryPaths();
69
+ assert.match(paths.codew.asset, /^codew-/);
70
+ assert.equal(path.basename(paths.codew.target), process.platform === "win32" ? "codew.exe" : "codew");
71
+ assert.notEqual(paths.codew.target, paths.codewhale.target);
72
+ });
73
+
67
74
  test("install failure hint explains release base override for blocked GitHub downloads", () => {
68
75
  const previous = process.env.DEEPSEEK_TUI_RELEASE_BASE_URL;
69
76
  delete process.env.DEEPSEEK_TUI_RELEASE_BASE_URL;
@@ -263,3 +270,15 @@ test("resolvePackageVersion honors codewhaleBinaryVersion precedence (#3769)", (
263
270
  "8.8.8",
264
271
  );
265
272
  });
273
+
274
+ test("httpRequest handles invalid URL parsing errors", async () => {
275
+ const { httpRequest } = _internal;
276
+ const invalidUrl = "not-a-valid-url";
277
+ try {
278
+ await httpRequest(invalidUrl);
279
+ assert.fail("httpRequest should throw for an invalid URL");
280
+ } catch (err) {
281
+ assert.equal(err.name, "NonRetryableError");
282
+ assert.match(err.message, /Invalid URL: not-a-valid-url/);
283
+ }
284
+ });
package/test/run.test.js CHANGED
@@ -33,6 +33,29 @@ test("version flags prefer the installed binary over package metadata", async ()
33
33
  assert.deepEqual(exits, [0]);
34
34
  });
35
35
 
36
+ test("codew wrapper dispatches the native shortcut binary", async () => {
37
+ const resolvedNames = [];
38
+ const spawned = [];
39
+
40
+ await run("codew", {
41
+ args: ["--version"],
42
+ getBinaryPath: async (name) => {
43
+ resolvedNames.push(name);
44
+ return "/tmp/codew-test-binary";
45
+ },
46
+ spawnSync: (binary, args) => {
47
+ spawned.push({ binary, args });
48
+ return { status: 0 };
49
+ },
50
+ exit: () => {},
51
+ });
52
+
53
+ assert.deepEqual(resolvedNames, ["codew"]);
54
+ assert.deepEqual(spawned, [
55
+ { binary: "/tmp/codew-test-binary", args: ["--version"] },
56
+ ]);
57
+ });
58
+
36
59
  test("version flags fall back to package metadata when the binary is unavailable", async () => {
37
60
  const originalLog = console.log;
38
61
  const lines = [];