@bash0816/claude-code 2.1.272 → 2.1.276

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
@@ -37,7 +37,7 @@ npm が `claude` bin link を管理する状態になれば、通常の `npm ins
37
37
  Latest audited version / 最新監査済み版:
38
38
 
39
39
  ```sh
40
- npm install -g @bash0816/claude-code@2.1.270
40
+ npm install -g @bash0816/claude-code@2.1.272
41
41
  ```
42
42
 
43
43
  ## Update / 更新
@@ -1984,7 +1984,7 @@
1984
1984
  "entry_format": "esm-chunked",
1985
1985
  "tarball_integrity": "sha512-tpUGL+bDziPYaBplXrR018NdSE191nNvQGDHv9QluLB7u4h3t4iRSVnZ8e2KVJerAkER7JeS76sdRGoMPRSIfA==",
1986
1986
  "tarball_sha256": "642b6f19cbf5f3c9c1470faa868ba5dfb7ab3a08963bf7798574d1a123608c3f",
1987
- "status": "offset_discovered",
1987
+ "status": "termux_verified",
1988
1988
  "num_modules": 1913,
1989
1989
  "byte_count": 138745069,
1990
1990
  "cycle_hoists": [
@@ -2084,6 +2084,47 @@
2084
2084
  "hljsBundle.generated.min.js",
2085
2085
  "mermaid.min.js"
2086
2086
  ]
2087
+ },
2088
+ "2.1.276": {
2089
+ "wrapper_spec": "@anthropic-ai/claude-code@2.1.276",
2090
+ "native_spec": "@anthropic-ai/claude-code-linux-arm64@2.1.276",
2091
+ "entry_format": "esm-chunked",
2092
+ "tarball_integrity": "sha512-/wzWD8U5mGmSoeiB99gGfvVuj/7/p7nh/zZACTuuPEwvo/CfMMvW/ZxBB6LG8w0nz6B//UOIx3ryKdGCENAPOA==",
2093
+ "tarball_sha256": "d5e9f98cd9d382c907fa2dfe9420d0a53c8a781372bf7ad16de9933fe0349132",
2094
+ "status": "offset_discovered",
2095
+ "num_modules": 2093,
2096
+ "byte_count": 143688478,
2097
+ "cycle_hoists": [
2098
+ {
2099
+ "file": "chunk-4smm7vse.js",
2100
+ "targetModule": "chunk-x8xhn4zk.js",
2101
+ "expectedOccurrences": 1,
2102
+ "assertProperties": []
2103
+ },
2104
+ {
2105
+ "file": "chunk-xyct5nvs.js",
2106
+ "targetModule": "chunk-77w3wy6j.js",
2107
+ "expectedOccurrences": 1,
2108
+ "assertProperties": [
2109
+ "default"
2110
+ ]
2111
+ },
2112
+ {
2113
+ "file": "chunk-xyct5nvs.js",
2114
+ "targetModule": "chunk-692ppfcw.js",
2115
+ "expectedOccurrences": 3,
2116
+ "assertProperties": [
2117
+ "getWorkflowCommands",
2118
+ "invalidateWorkflowCache",
2119
+ "warmWorkflows"
2120
+ ]
2121
+ }
2122
+ ],
2123
+ "cycle_hoists_skipped_assets": [
2124
+ "chart.umd.min.js",
2125
+ "hljsBundle.generated.min.js",
2126
+ "mermaid.min.js"
2127
+ ]
2087
2128
  }
2088
2129
  }
2089
2130
  }
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "manifest_version": 1,
3
3
  "package_name": "@bash0816/claude-code",
4
- "latest_audited_version": "2.1.270",
5
- "latest_candidate_version": "2.1.272",
6
- "previous_stable_version": "2.1.269",
4
+ "latest_audited_version": "2.1.272",
5
+ "latest_candidate_version": "2.1.276",
6
+ "previous_stable_version": "2.1.270",
7
7
  "stable_pinned_version": "2.1.220-2",
8
8
  "manifest_url": "https://raw.githubusercontent.com/bash0816/ClaudeCode-Termux/main/config/claude-termux-release-manifest.json"
9
9
  }
@@ -305,6 +305,12 @@ function stableHash(value, seed) {
305
305
  return hash >>> 0;
306
306
  }
307
307
 
308
+ stableHash.xxHash64 = function bunHashXxHash64(value, seed) {
309
+ const lo = stableHash(value, seed);
310
+ const hi = stableHash(value, lo ^ 0x85ebca6b);
311
+ return (BigInt(hi) << 32n) | BigInt(lo);
312
+ };
313
+
308
314
  function replaceRequired(source, pattern, replacement, label, expectedCount) {
309
315
  const text = String(source);
310
316
  const matches = text.match(pattern);
@@ -1349,6 +1355,12 @@ function stableHash(value, seed) {
1349
1355
  return hash >>> 0;
1350
1356
  }
1351
1357
 
1358
+ stableHash.xxHash64 = function bunHashXxHash64(value, seed) {
1359
+ const lo = stableHash(value, seed);
1360
+ const hi = stableHash(value, lo ^ 0x85ebca6b);
1361
+ return (BigInt(hi) << 32n) | BigInt(lo);
1362
+ };
1363
+
1352
1364
  function replaceRequired(source, pattern, replacement, label, expectedCount) {
1353
1365
  const text = String(source);
1354
1366
  const matches = text.match(pattern);
@@ -2163,3 +2163,81 @@ test('CellSegmenter: fresh instance pool initialization (NB-2)', () => {
2163
2163
  assert.ok(count2 > 0, 'should successfully segment after reset');
2164
2164
  assert.equal(d2.graphemes.length, count2, 'grapheme count should match segment result');
2165
2165
  });
2166
+
2167
+ test('stableHash.xxHash64 implementation (G2 v3 implementation)', () => {
2168
+ const api = loadHelperApi();
2169
+ const { stableHash } = api;
2170
+
2171
+ // Test 1: Base64 representation of xxHash64 result is valid (1-13 chars in base36)
2172
+ const result1 = stableHash.xxHash64('x').toString(36);
2173
+ assert.match(result1, /^[0-9a-z]{1,13}$/, `xxHash64('x').toString(36) should match [0-9a-z]{1,13}, got: ${result1}`);
2174
+
2175
+ // Test 2: seedless mode with fixed literal values - hi !== lo
2176
+ const fixedLiterals = ['a', 'hello', 'thinking:1562789', 'thinking:1779192', '', 'x'.repeat(100)];
2177
+ for (const val of fixedLiterals) {
2178
+ const h = stableHash.xxHash64(val);
2179
+ const hi = h >> 32n;
2180
+ const lo = h & 0xffffffffn;
2181
+ assert.ok(hi !== lo, `xxHash64('${val.slice(0, 20)}${val.length > 20 ? '...' : ''}') should have hi !== lo (got hi=${hi}, lo=${lo})`);
2182
+ }
2183
+
2184
+ // Test 3: seed specified mode - hi !== lo
2185
+ const seededPairs = [
2186
+ ['x', 42],
2187
+ ['hello', 1234],
2188
+ ['test', 9999],
2189
+ ];
2190
+ for (const [val, seed] of seededPairs) {
2191
+ const h = stableHash.xxHash64(val, seed);
2192
+ const hi = h >> 32n;
2193
+ const lo = h & 0xffffffffn;
2194
+ assert.ok(hi !== lo, `xxHash64('${val}', ${seed}) should have hi !== lo (got hi=${hi}, lo=${lo})`);
2195
+ }
2196
+
2197
+ // Test 4: Deterministic (repeated calls return same result)
2198
+ const val = 'determinism-test';
2199
+ const r1 = stableHash.xxHash64(val);
2200
+ const r2 = stableHash.xxHash64(val);
2201
+ const r3 = stableHash.xxHash64(val);
2202
+ assert.equal(r1, r2, `xxHash64 should be deterministic (1st vs 2nd call)`);
2203
+ assert.equal(r2, r3, `xxHash64 should be deterministic (2nd vs 3rd call)`);
2204
+
2205
+ // Test 5: Return type is bigint
2206
+ const result5 = stableHash.xxHash64('x');
2207
+ assert.equal(typeof result5, 'bigint', `xxHash64 should return bigint, got: ${typeof result5}`);
2208
+
2209
+ // Test 6: Verify .xxHash64 is accessible in ESM shim context
2210
+ // Use the same logic as the "実行モード網羅" section of the design doc
2211
+ function extractEsmShimSource(block) {
2212
+ const sm = '\n globalThis.Bun = {';
2213
+ const em = '\n globalThis.__claudeBun = globalThis.Bun;';
2214
+ const s = block.indexOf(sm);
2215
+ const e = block.indexOf(em, s);
2216
+ return block.slice(s + 1, e + em.length);
2217
+ }
2218
+
2219
+ // Verify for both _helper and _bootstrap heredocs
2220
+ for (const markerKey of ['cat <<\'NODE\' > "$_helper"', 'cat <<\'NODE\' > "$_bootstrap"']) {
2221
+ const helperBlock = extractBlock(markerKey, '\n export ENABLE_CLAUDEAI_MCP_SERVERS=');
2222
+ const stableHashSource = extractFunction(
2223
+ helperBlock,
2224
+ 'function stableHash(value, seed) {',
2225
+ '\n\nfunction replaceRequired(source, pattern, replacement, label, expectedCount) {',
2226
+ );
2227
+ const context = vm.createContext({
2228
+ stringWidth: () => 0, wrapAnsi: v => v, stripANSI: v => v,
2229
+ sliceAnsi: s => s, sleepSync: () => {}, CellSegmenter: class {},
2230
+ process: { versions: {} }, Buffer, require,
2231
+ });
2232
+ context.module = { exports: {} };
2233
+ vm.runInContext(
2234
+ `${stableHashSource}\n${extractEsmShimSource(helperBlock)}\nmodule.exports = { Bun: globalThis.Bun, stableHash };`,
2235
+ context,
2236
+ );
2237
+ const { Bun, stableHash: contextStableHash } = context.module.exports;
2238
+ assert.equal(Bun.hash, contextStableHash, `Bun.hash should be identical to stableHash in ${markerKey}`);
2239
+ assert.equal(typeof Bun.hash.xxHash64, 'function', `Bun.hash.xxHash64 should be a function in ${markerKey}`);
2240
+ const testResult = Bun.hash.xxHash64('x').toString(36);
2241
+ assert.match(testResult, /^[0-9a-z]{1,13}$/, `Bun.hash.xxHash64('x').toString(36) should match pattern in ${markerKey}, got: ${testResult}`);
2242
+ }
2243
+ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bash0816/claude-code",
3
- "version": "2.1.272",
3
+ "version": "2.1.276",
4
4
  "description": "Unofficial Termux-native Claude Code wrapper with audited native replay",
5
5
  "license": "GPL-3.0-only",
6
6
  "bin": {