@bash0816/claude-code 2.1.204 → 2.1.206-1

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.203
40
+ npm install -g @bash0816/claude-code@2.1.206
41
41
  ```
42
42
 
43
43
  ## Update / 更新
@@ -445,6 +445,33 @@
445
445
  "entry_end_offset": 248215712,
446
446
  "tarball_integrity": "sha512-modtmDBn++ENMTwu+OKuq/iJmSXIIeijw3sn+Cd7zoKzZuGGGVAiOshpojrJO7RgSUXPmM2HIr5n1pKoF4mYMQ==",
447
447
  "tarball_sha256": "23c52e5e2e04a072d274436276d32a5c7f9672f8772a216d7d03c35961c047f9",
448
+ "status": "termux_verified"
449
+ },
450
+ "2.1.205": {
451
+ "wrapper_spec": "@anthropic-ai/claude-code@2.1.205",
452
+ "native_spec": "@anthropic-ai/claude-code-linux-arm64@2.1.205",
453
+ "entry_js_offset": 229516132,
454
+ "entry_end_offset": 248686185,
455
+ "tarball_integrity": "sha512-6xZPQQjQjWIAp3AsCfUBAPMTfD/GdVaNfBOQ/BVfEZN4H6h/dQN1lmctMcfEXXBstul4VoOYzuzALFKlPRzukg==",
456
+ "tarball_sha256": "b9bee2e92869637ccf2d154ae09baaba561b7354b32f15ab8549a9b731b53847",
457
+ "status": "termux_verified"
458
+ },
459
+ "2.1.206": {
460
+ "wrapper_spec": "@anthropic-ai/claude-code@2.1.206",
461
+ "native_spec": "@anthropic-ai/claude-code-linux-arm64@2.1.206",
462
+ "entry_js_offset": 230668564,
463
+ "entry_end_offset": 250038062,
464
+ "tarball_integrity": "sha512-z+Zf0BHOH3dSZKHSLhzHt15+JMk1l0WX357F12FiA7Dr5uf/LFOPzvvd6YME/Vr1qVdRpvt0ZbKJMw50oQ/WeA==",
465
+ "tarball_sha256": "968a952e1af789cee0e8e7b4bd3915e3d5971295287e04f3c7f19e72fab34099",
466
+ "status": "termux_verified"
467
+ },
468
+ "2.1.206-1": {
469
+ "wrapper_spec": "@anthropic-ai/claude-code@2.1.206",
470
+ "native_spec": "@anthropic-ai/claude-code-linux-arm64@2.1.206",
471
+ "entry_js_offset": 230668564,
472
+ "entry_end_offset": 250038062,
473
+ "tarball_integrity": "sha512-z+Zf0BHOH3dSZKHSLhzHt15+JMk1l0WX357F12FiA7Dr5uf/LFOPzvvd6YME/Vr1qVdRpvt0ZbKJMw50oQ/WeA==",
474
+ "tarball_sha256": "968a952e1af789cee0e8e7b4bd3915e3d5971295287e04f3c7f19e72fab34099",
448
475
  "status": "offset_discovered"
449
476
  }
450
477
  }
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "manifest_version": 1,
3
3
  "package_name": "@bash0816/claude-code",
4
- "latest_audited_version": "2.1.203",
5
- "latest_candidate_version": "2.1.204",
6
- "previous_stable_version": "2.1.202",
4
+ "latest_audited_version": "2.1.206",
5
+ "latest_candidate_version": "2.1.206-1",
6
+ "previous_stable_version": "2.1.205",
7
7
  "stable_pinned_version": "2.1.193",
8
8
  "manifest_url": "https://raw.githubusercontent.com/bash0816/ClaudeCode-Termux/main/config/claude-termux-release-manifest.json"
9
9
  }
@@ -583,6 +583,7 @@ function rewriteNativeChunkSource(source) {
583
583
  const _bunPropertyAccessExpected = (() => {
584
584
  const _ver = String(process.env.CURRENT_CLAUDE_VERSION || '');
585
585
  const _m = _ver.match(/^(\d+)\.(\d+)\.(\d+)/);
586
+ if (_m && (Number(_m[1]) > 2 || Number(_m[2]) > 1 || Number(_m[3]) >= 205)) return 38;
586
587
  if (_m && (Number(_m[1]) > 2 || Number(_m[2]) > 1 || Number(_m[3]) >= 202)) return 41;
587
588
  if (_m && (Number(_m[1]) > 2 || Number(_m[2]) > 1 || Number(_m[3]) >= 200)) return 40;
588
589
  return 37;
@@ -742,7 +743,6 @@ main().catch(error => {
742
743
  process.exit(1);
743
744
  });
744
745
  NODE
745
- export CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC="${CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC:-1}"
746
746
  export ENABLE_CLAUDEAI_MCP_SERVERS="${ENABLE_CLAUDEAI_MCP_SERVERS:-0}"
747
747
  export CLAUDE_CODE_SIMPLE="${CLAUDE_CODE_SIMPLE:-0}"
748
748
  export DISABLE_INSTALLATION_CHECKS="${DISABLE_INSTALLATION_CHECKS:-true}"
@@ -1273,6 +1273,7 @@ function rewriteNativeChunkSource(source) {
1273
1273
  const _bunPropertyAccessExpected = (() => {
1274
1274
  const _ver = String(process.env.CURRENT_CLAUDE_VERSION || '');
1275
1275
  const _m = _ver.match(/^(\d+)\.(\d+)\.(\d+)/);
1276
+ if (_m && (Number(_m[1]) > 2 || Number(_m[2]) > 1 || Number(_m[3]) >= 205)) return 38;
1276
1277
  if (_m && (Number(_m[1]) > 2 || Number(_m[2]) > 1 || Number(_m[3]) >= 202)) return 41;
1277
1278
  if (_m && (Number(_m[1]) > 2 || Number(_m[2]) > 1 || Number(_m[3]) >= 200)) return 40;
1278
1279
  return 37;
@@ -1438,7 +1439,6 @@ main()
1438
1439
  process.exit(1);
1439
1440
  });
1440
1441
  NODE
1441
- export CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC="${CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC:-1}"
1442
1442
  export ENABLE_CLAUDEAI_MCP_SERVERS="${ENABLE_CLAUDEAI_MCP_SERVERS:-0}"
1443
1443
  export DISABLE_INSTALLATION_CHECKS="${DISABLE_INSTALLATION_CHECKS:-true}"
1444
1444
  "$NODE" "$_bootstrap" "$@"
@@ -31,7 +31,7 @@ function extractFunction(block, startName, endName) {
31
31
  }
32
32
 
33
33
  function loadHelperApi() {
34
- const helperBlock = extractBlock('cat <<\'NODE\' > "$_helper"', '\n export CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC=');
34
+ const helperBlock = extractBlock('cat <<\'NODE\' > "$_helper"', '\n export ENABLE_CLAUDEAI_MCP_SERVERS=');
35
35
  const replaceSource = extractFunction(
36
36
  helperBlock,
37
37
  'function replaceRequired(source, pattern, replacement, label, expectedCount) {',
@@ -91,8 +91,8 @@ function sha256(filePath) {
91
91
  }
92
92
 
93
93
  test('helper and bootstrap rewrite helpers stay identical', () => {
94
- const helperBlock = extractBlock('cat <<\'NODE\' > "$_helper"', '\n export CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC=');
95
- const bootstrapBlock = extractBlock('cat <<\'NODE\' > "$_bootstrap"', '\n export CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC=');
94
+ const helperBlock = extractBlock('cat <<\'NODE\' > "$_helper"', '\n export ENABLE_CLAUDEAI_MCP_SERVERS=');
95
+ const bootstrapBlock = extractBlock('cat <<\'NODE\' > "$_bootstrap"', '\n export ENABLE_CLAUDEAI_MCP_SERVERS=');
96
96
 
97
97
  const helperReplace = extractFunction(
98
98
  helperBlock,
@@ -180,7 +180,7 @@ test('helper and bootstrap rewrite helpers stay identical', () => {
180
180
  });
181
181
 
182
182
  test('print path does not defer cleanup to exit', () => {
183
- const helperBlock = extractBlock('cat <<\'NODE\' > "$_helper"', '\n export CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC=');
183
+ const helperBlock = extractBlock('cat <<\'NODE\' > "$_helper"', '\n export ENABLE_CLAUDEAI_MCP_SERVERS=');
184
184
 
185
185
  assert.equal(helperBlock.includes('CLAUDE_TERMUX_PRINT_WAIT_MS'), true);
186
186
  assert.equal(helperBlock.includes('setTimeout(resolve, printWaitMs)'), true);
@@ -189,7 +189,7 @@ test('print path does not defer cleanup to exit', () => {
189
189
  });
190
190
 
191
191
  test('bootstrap path defers cleanup to exit', () => {
192
- const bootstrapBlock = extractBlock('cat <<\'NODE\' > "$_bootstrap"', '\n export CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC=');
192
+ const bootstrapBlock = extractBlock('cat <<\'NODE\' > "$_bootstrap"', '\n export ENABLE_CLAUDEAI_MCP_SERVERS=');
193
193
 
194
194
  assert.equal(bootstrapBlock.includes('CLAUDE_TERMUX_PRINT_WAIT_MS'), false);
195
195
  assert.equal(bootstrapBlock.includes('setTimeout(resolve, printWaitMs)'), false);
@@ -198,8 +198,8 @@ test('bootstrap path defers cleanup to exit', () => {
198
198
  });
199
199
 
200
200
  test('entry extraction uses a process-unique filename', () => {
201
- const helperBlock = extractBlock('cat <<\'NODE\' > "$_helper"', '\n export CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC=');
202
- const bootstrapBlock = extractBlock('cat <<\'NODE\' > "$_bootstrap"', '\n export CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC=');
201
+ const helperBlock = extractBlock('cat <<\'NODE\' > "$_helper"', '\n export ENABLE_CLAUDEAI_MCP_SERVERS=');
202
+ const bootstrapBlock = extractBlock('cat <<\'NODE\' > "$_bootstrap"', '\n export ENABLE_CLAUDEAI_MCP_SERVERS=');
203
203
 
204
204
  assert.equal(helperBlock.includes('process.pid'), true);
205
205
  assert.equal(helperBlock.includes('Math.random'), true);
@@ -365,6 +365,44 @@ test('rewriteNativeChunkSource rewrites the synthetic bundle slice (version 2.1.
365
365
  }
366
366
  });
367
367
 
368
+ test('rewriteNativeChunkSource rewrites the synthetic bundle slice (version 2.1.205)', () => {
369
+ process.env.CURRENT_CLAUDE_VERSION = '2.1.205';
370
+ try {
371
+ const { rewriteNativeChunkSource } = loadHelperApi();
372
+ const typeofBun = Array.from({ length: 7 }, () => 'typeof Bun').join('; ');
373
+ const bunProps = Array.from({ length: 38 }, (_, index) => `Bun.p${index}`).join('; ');
374
+ const source = `function(exports, require, module, __filename, __dirname) { ${typeofBun}; typeof globalThis.Bun; globalThis.Bun; ${bunProps}; npmInstallDeprecated:!0; npmInstallDeprecated:!0 }`;
375
+ const patched = rewriteNativeChunkSource(source);
376
+
377
+ assert.match(patched, /var __claudeBun = globalThis\.__claudeBunShim;/);
378
+ assert.match(patched, /typeof __claudeBun/);
379
+ assert.match(patched, /typeof globalThis\.__claudeBun/);
380
+ assert.match(patched, /globalThis\.__claudeBun/);
381
+ assert.match(patched, /__claudeBun\./);
382
+ assert.match(patched, /npmInstallDeprecated:!1/);
383
+ assert.doesNotMatch(patched, /npmInstallDeprecated:!0/);
384
+ } finally {
385
+ delete process.env.CURRENT_CLAUDE_VERSION;
386
+ }
387
+ });
388
+
389
+ test('rewriteNativeChunkSource rejects stale Bun property access count for version 2.1.205', () => {
390
+ process.env.CURRENT_CLAUDE_VERSION = '2.1.205';
391
+ try {
392
+ const { rewriteNativeChunkSource } = loadHelperApi();
393
+ const typeofBun = Array.from({ length: 7 }, () => 'typeof Bun').join('; ');
394
+ const bunProps = Array.from({ length: 41 }, (_, index) => `Bun.p${index}`).join('; ');
395
+ const source = `function(exports, require, module, __filename, __dirname) { ${typeofBun}; typeof globalThis.Bun; globalThis.Bun; ${bunProps}; npmInstallDeprecated:!0; npmInstallDeprecated:!0 }`;
396
+
397
+ assert.throws(
398
+ () => rewriteNativeChunkSource(source),
399
+ /unexpected Bun property access count 41/,
400
+ );
401
+ } finally {
402
+ delete process.env.CURRENT_CLAUDE_VERSION;
403
+ }
404
+ });
405
+
368
406
  test('rewriteNativeChunkSource rejects unexpected replacement counts', () => {
369
407
  const { rewriteNativeChunkSource } = loadHelperApi();
370
408
  const source = buildSyntheticBundleSource().replace('Bun.p30;', '');
@@ -390,3 +428,7 @@ test('tarball contents match the workspace runner and test file', { skip: !fs.ex
390
428
  assert.equal(tarRunner.length, worktreeRunner.length);
391
429
  assert.equal(tarTest.length, worktreeTest.length);
392
430
  });
431
+
432
+ test('CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC is never forced (regression guard)', () => {
433
+ assert.equal(script.includes('CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC'), false);
434
+ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bash0816/claude-code",
3
- "version": "2.1.204",
3
+ "version": "2.1.206-1",
4
4
  "description": "Unofficial Termux-native Claude Code wrapper with audited native replay",
5
5
  "license": "GPL-3.0-only",
6
6
  "bin": {