@bash0816/claude-code 2.1.142 → 2.1.144

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
@@ -57,6 +57,8 @@ npm install -g @bash0816/claude-code@2.1.139
57
57
  npm install -g @bash0816/claude-code@2.1.140
58
58
  npm install -g @bash0816/claude-code@2.1.141
59
59
  npm install -g @bash0816/claude-code@2.1.142
60
+ npm install -g @bash0816/claude-code@2.1.143
61
+ npm install -g @bash0816/claude-code@2.1.144
60
62
  ```
61
63
 
62
64
  ## Update / 更新
@@ -81,8 +83,8 @@ Normal launch also checks the same manifest with a short timeout and prints a no
81
83
 
82
84
  - Only audited versions in `config/claude-native-audited-versions.json` can run.
83
85
  - `config/claude-native-audited-versions.json` にある監査済み version だけを実行できます。
84
- - `2.1.118`, `2.1.119`, `2.1.121`, `2.1.122`, `2.1.123`, `2.1.126`, `2.1.128`, `2.1.136`, `2.1.137`, `2.1.138`, `2.1.139`, `2.1.140`, `2.1.141`, `2.1.142` are included in the package metadata.
85
- - `2.1.118`、`2.1.119`、`2.1.121`、`2.1.122`、`2.1.123`、`2.1.126`、`2.1.128`、`2.1.136`、`2.1.137`、`2.1.138`、`2.1.139`、`2.1.140`、`2.1.141`、`2.1.142` を package metadata に含めています。
86
+ - `2.1.118`, `2.1.119`, `2.1.121`, `2.1.122`, `2.1.123`, `2.1.126`, `2.1.128`, `2.1.136`, `2.1.137`, `2.1.138`, `2.1.139`, `2.1.140`, `2.1.141`, `2.1.142`, `2.1.143`, `2.1.144` are included in the package metadata.
87
+ - `2.1.118`、`2.1.119`、`2.1.121`、`2.1.122`、`2.1.123`、`2.1.126`、`2.1.128`、`2.1.136`、`2.1.137`、`2.1.138`、`2.1.139`、`2.1.140`、`2.1.141`、`2.1.142`、`2.1.143`、`2.1.144` を package metadata に含めています。
86
88
  - The metadata file is the source of truth for the currently audited set.
87
89
  - 現在の監査済み version 集合の source of truth は metadata file です。
88
90
  - Native artifacts are cached under `${HOME}/.claude-termux-native-package`.
@@ -97,6 +97,20 @@
97
97
  "entry_js_offset": 216179028,
98
98
  "entry_end_offset": 230687382,
99
99
  "status": "termux_verified"
100
+ },
101
+ "2.1.143": {
102
+ "wrapper_spec": "@anthropic-ai/claude-code@2.1.143",
103
+ "native_spec": "@anthropic-ai/claude-code-linux-arm64@2.1.143",
104
+ "entry_js_offset": 216602500,
105
+ "entry_end_offset": 231151175,
106
+ "status": "termux_verified"
107
+ },
108
+ "2.1.144": {
109
+ "wrapper_spec": "@anthropic-ai/claude-code@2.1.144",
110
+ "native_spec": "@anthropic-ai/claude-code-linux-arm64@2.1.144",
111
+ "entry_js_offset": 216877940,
112
+ "entry_end_offset": 231466269,
113
+ "status": "termux_verified"
100
114
  }
101
115
  }
102
116
  }
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "manifest_version": 1,
3
3
  "package_name": "@bash0816/claude-code",
4
- "latest_audited_version": "2.1.142",
5
- "latest_candidate_version": "2.1.142",
6
- "previous_stable_version": "2.1.141",
4
+ "latest_audited_version": "2.1.144",
5
+ "latest_candidate_version": "2.1.144",
6
+ "previous_stable_version": "2.1.143",
7
7
  "manifest_url": "https://raw.githubusercontent.com/bash0816/ClaudeCode-Termux/main/config/claude-termux-release-manifest.json"
8
8
  }
@@ -11,6 +11,9 @@ const config = require(path.join(packageDir, 'config', 'claude-native-audited-ve
11
11
  const pkg = require(path.join(packageDir, 'package.json'));
12
12
  const version = process.argv[2] || pkg.version;
13
13
  const item = config.versions[version];
14
+ const curlRetries = process.env.CLAUDE_TERMUX_FETCH_RETRIES || '4';
15
+ const curlConnectTimeout = process.env.CLAUDE_TERMUX_FETCH_CONNECT_TIMEOUT || '20';
16
+ const curlMaxTime = process.env.CLAUDE_TERMUX_FETCH_MAX_TIME || '300';
14
17
 
15
18
  if (!item) {
16
19
  console.error(`Unsupported audited Claude Code version: ${version}`);
@@ -31,15 +34,11 @@ fs.mkdirSync(versionDir, { recursive: true });
31
34
  const packDir = fs.mkdtempSync(path.join(os.tmpdir(), `claude-code-${version}-`));
32
35
 
33
36
  try {
34
- run('npm', ['pack', item.native_spec, '--pack-destination', packDir]);
35
- const tgz = fs.readdirSync(packDir).find(name => name.endsWith('.tgz'));
36
- if (!tgz) {
37
- throw new Error('npm pack did not produce a tgz');
38
- }
37
+ const tgzPath = fetchNativeTarball(item.native_spec, packDir);
39
38
 
40
39
  const extractDir = path.join(packDir, 'native');
41
40
  fs.mkdirSync(extractDir, { recursive: true });
42
- run('tar', ['-xzf', path.join(packDir, tgz), '-C', extractDir]);
41
+ run('tar', ['-xzf', tgzPath, '-C', extractDir]);
43
42
 
44
43
  fs.rmSync(nativeDest, { recursive: true, force: true });
45
44
  fs.mkdirSync(path.dirname(nativeDest), { recursive: true });
@@ -56,6 +55,50 @@ function run(command, args) {
56
55
  }
57
56
  }
58
57
 
58
+ function runCapture(command, args) {
59
+ const result = cp.spawnSync(command, args, {
60
+ stdio: ['ignore', 'pipe', 'inherit'],
61
+ encoding: 'utf8',
62
+ });
63
+ if (result.status !== 0) {
64
+ throw new Error(`${command} ${args.join(' ')} failed`);
65
+ }
66
+ return result.stdout.trim();
67
+ }
68
+
69
+ function fetchNativeTarball(spec, packDir) {
70
+ const directTarball = path.join(packDir, 'native-package.tgz');
71
+
72
+ try {
73
+ const tarballUrl = runCapture('npm', ['view', spec, 'dist.tarball', '--json']).replace(/^"|"$/g, '');
74
+ if (!tarballUrl) {
75
+ throw new Error(`npm view did not return dist.tarball for ${spec}`);
76
+ }
77
+ run('curl', [
78
+ '--fail',
79
+ '--location',
80
+ '--retry', String(curlRetries),
81
+ '--connect-timeout', String(curlConnectTimeout),
82
+ '--max-time', String(curlMaxTime),
83
+ '--output', directTarball,
84
+ tarballUrl,
85
+ ]);
86
+ if (fs.existsSync(directTarball)) {
87
+ return directTarball;
88
+ }
89
+ } catch (error) {
90
+ console.error(`Direct tarball fetch failed for ${spec}; falling back to npm pack.`);
91
+ console.error(error && error.message ? error.message : String(error));
92
+ }
93
+
94
+ run('npm', ['pack', spec, '--pack-destination', packDir]);
95
+ const tgz = fs.readdirSync(packDir).find(name => name.endsWith('.tgz'));
96
+ if (!tgz) {
97
+ throw new Error('npm pack did not produce a tgz');
98
+ }
99
+ return path.join(packDir, tgz);
100
+ }
101
+
59
102
  function validateOffsets(file, audited) {
60
103
  const buf = fs.readFileSync(file);
61
104
  const start = Number(audited.entry_js_offset);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bash0816/claude-code",
3
- "version": "2.1.142",
3
+ "version": "2.1.144",
4
4
  "description": "Termux-native Claude Code wrapper with audited native replay",
5
5
  "license": "MIT",
6
6
  "bin": {