@anthropic-ai/claude-code 2.1.143 → 2.1.145

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/cli-wrapper.cjs CHANGED
@@ -29,6 +29,16 @@ const PLATFORMS = {
29
29
  pkg: PACKAGE_PREFIX + '-linux-arm64-musl',
30
30
  bin: BINARY_NAME,
31
31
  },
32
+ 'linux-arm64-android': {
33
+ pkg: PACKAGE_PREFIX + '-linux-arm64-android',
34
+ bin: BINARY_NAME,
35
+ },
36
+ 'linux-x64-android': {
37
+ pkg: PACKAGE_PREFIX + '-linux-x64-android',
38
+ bin: BINARY_NAME,
39
+ },
40
+ 'freebsd-x64': { pkg: PACKAGE_PREFIX + '-freebsd-x64', bin: BINARY_NAME },
41
+ 'freebsd-arm64': { pkg: PACKAGE_PREFIX + '-freebsd-arm64', bin: BINARY_NAME },
32
42
  'win32-x64': {
33
43
  pkg: PACKAGE_PREFIX + '-win32-x64',
34
44
  bin: BINARY_NAME + '.exe',
@@ -53,6 +63,9 @@ function detectMusl() {
53
63
  function getPlatformKey() {
54
64
  const platform = process.platform
55
65
  let cpu = arch()
66
+ if (platform === 'android') {
67
+ return 'linux-' + cpu + '-android'
68
+ }
56
69
  if (platform === 'linux') {
57
70
  return 'linux-' + cpu + (detectMusl() ? '-musl' : '')
58
71
  }
@@ -78,6 +91,18 @@ function getBinaryPath() {
78
91
  )
79
92
  process.exit(1)
80
93
  }
94
+ const optionalDeps = require('./package.json').optionalDependencies || {}
95
+ if (!optionalDeps[info.pkg]) {
96
+ console.error(
97
+ `[${WRAPPER_NAME}] Native binaries for ${platformKey} are not available on this release channel.`,
98
+ )
99
+ console.error(
100
+ ` Available: ${Object.keys(optionalDeps)
101
+ .map(p => p.replace(PACKAGE_PREFIX + '-', ''))
102
+ .join(', ')}`,
103
+ )
104
+ process.exit(1)
105
+ }
81
106
  try {
82
107
  const pkgDir = path.dirname(require.resolve(info.pkg + '/package.json'))
83
108
  return path.join(pkgDir, info.bin)
package/install.cjs CHANGED
@@ -42,6 +42,16 @@ const PLATFORMS = {
42
42
  pkg: PACKAGE_PREFIX + '-linux-arm64-musl',
43
43
  bin: BINARY_NAME,
44
44
  },
45
+ 'linux-arm64-android': {
46
+ pkg: PACKAGE_PREFIX + '-linux-arm64-android',
47
+ bin: BINARY_NAME,
48
+ },
49
+ 'linux-x64-android': {
50
+ pkg: PACKAGE_PREFIX + '-linux-x64-android',
51
+ bin: BINARY_NAME,
52
+ },
53
+ 'freebsd-x64': { pkg: PACKAGE_PREFIX + '-freebsd-x64', bin: BINARY_NAME },
54
+ 'freebsd-arm64': { pkg: PACKAGE_PREFIX + '-freebsd-arm64', bin: BINARY_NAME },
45
55
  'win32-x64': {
46
56
  pkg: PACKAGE_PREFIX + '-win32-x64',
47
57
  bin: BINARY_NAME + '.exe',
@@ -69,6 +79,9 @@ function detectMusl() {
69
79
  function getPlatformKey() {
70
80
  const platform = process.platform
71
81
  let cpu = arch()
82
+ if (platform === 'android') {
83
+ return 'linux-' + cpu + '-android'
84
+ }
72
85
  if (platform === 'linux') {
73
86
  return 'linux-' + cpu + (detectMusl() ? '-musl' : '')
74
87
  }
@@ -139,6 +152,19 @@ function main() {
139
152
  return
140
153
  }
141
154
 
155
+ const optionalDeps = require('./package.json').optionalDependencies || {}
156
+ if (!optionalDeps[info.pkg]) {
157
+ console.error(
158
+ `[${WRAPPER_NAME} postinstall] Native binaries for ${platformKey} are not available on this release channel.`,
159
+ )
160
+ console.error(
161
+ ` Available: ${Object.keys(optionalDeps)
162
+ .map(p => p.replace(PACKAGE_PREFIX + '-', ''))
163
+ .join(', ')}`,
164
+ )
165
+ return
166
+ }
167
+
142
168
  let src
143
169
  try {
144
170
  const pkgDir = path.dirname(require.resolve(info.pkg + '/package.json'))
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@anthropic-ai/claude-code",
3
- "version": "2.1.143",
3
+ "version": "2.1.145",
4
4
  "bin": {
5
5
  "claude": "bin/claude.exe"
6
6
  },
@@ -21,14 +21,14 @@
21
21
  },
22
22
  "dependencies": {},
23
23
  "optionalDependencies": {
24
- "@anthropic-ai/claude-code-darwin-arm64": "2.1.143",
25
- "@anthropic-ai/claude-code-darwin-x64": "2.1.143",
26
- "@anthropic-ai/claude-code-linux-x64": "2.1.143",
27
- "@anthropic-ai/claude-code-linux-arm64": "2.1.143",
28
- "@anthropic-ai/claude-code-linux-x64-musl": "2.1.143",
29
- "@anthropic-ai/claude-code-linux-arm64-musl": "2.1.143",
30
- "@anthropic-ai/claude-code-win32-x64": "2.1.143",
31
- "@anthropic-ai/claude-code-win32-arm64": "2.1.143"
24
+ "@anthropic-ai/claude-code-darwin-arm64": "2.1.145",
25
+ "@anthropic-ai/claude-code-darwin-x64": "2.1.145",
26
+ "@anthropic-ai/claude-code-linux-x64": "2.1.145",
27
+ "@anthropic-ai/claude-code-linux-arm64": "2.1.145",
28
+ "@anthropic-ai/claude-code-linux-x64-musl": "2.1.145",
29
+ "@anthropic-ai/claude-code-linux-arm64-musl": "2.1.145",
30
+ "@anthropic-ai/claude-code-win32-x64": "2.1.145",
31
+ "@anthropic-ai/claude-code-win32-arm64": "2.1.145"
32
32
  },
33
33
  "files": [
34
34
  "bin/claude.exe",
package/sdk-tools.d.ts CHANGED
@@ -143,6 +143,10 @@ export type FileReadOutput =
143
143
  * Total number of lines in the file
144
144
  */
145
145
  totalLines: number;
146
+ /**
147
+ * True when a whole-file read was auto-paginated because it exceeded the token cap (the content is a partial first page). A programmatic signal for internal consumers; survives output reconstruction (unlike the render-time banner).
148
+ */
149
+ truncatedByTokenCap?: boolean;
146
150
  };
147
151
  }
148
152
  | {