Fix the availability of some @anthropic-ai/claude-agent-sdk types (#322)
* Fix the availability of some `@anthropic-ai/claude-agent-sdk` types * update it in the action too * fix types
This commit is contained in:
committed by
pullfrog[bot]
parent
df13253d48
commit
510f2c96f9
+7
-2
@@ -239,10 +239,13 @@ const messageHandlers: SDKMessageHandlers = {
|
||||
user: (data, bashToolIds, thinkingTimer) => {
|
||||
if (data.message?.content) {
|
||||
for (const content of data.message.content) {
|
||||
if (typeof content === "string") {
|
||||
continue;
|
||||
}
|
||||
if (content.type === "tool_result") {
|
||||
thinkingTimer.markToolResult();
|
||||
|
||||
const toolUseId = (content as any).tool_use_id;
|
||||
const toolUseId = content.tool_use_id;
|
||||
const isBashTool = toolUseId && bashToolIds.has(toolUseId);
|
||||
|
||||
const outputContent =
|
||||
@@ -250,7 +253,9 @@ const messageHandlers: SDKMessageHandlers = {
|
||||
? content.content
|
||||
: Array.isArray(content.content)
|
||||
? content.content
|
||||
.map((c: any) => (typeof c === "string" ? c : c.text || JSON.stringify(c)))
|
||||
.map((c) =>
|
||||
typeof c === "string" ? c : "text" in c ? c.text : JSON.stringify(c)
|
||||
)
|
||||
.join("\n")
|
||||
: String(content.content);
|
||||
|
||||
|
||||
@@ -144591,6 +144591,15 @@ var package_default = {
|
||||
require: "./dist/index.cjs"
|
||||
}
|
||||
},
|
||||
pnpm: {
|
||||
packageExtensions: {
|
||||
"@anthropic-ai/claude-agent-sdk": {
|
||||
dependencies: {
|
||||
"@anthropic-ai/sdk": "*"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
packageManager: "pnpm@10.27.0+sha512.72d699da16b1179c14ba9e64dc71c9a40988cbdc65c264cb0e489db7de917f20dcf4d64d8723625f2969ba52d4b7e2a1170682d9ac2a5dcaeaab732b7e16f04a"
|
||||
};
|
||||
|
||||
@@ -145002,11 +145011,16 @@ var messageHandlers = {
|
||||
user: (data, bashToolIds, thinkingTimer) => {
|
||||
if (data.message?.content) {
|
||||
for (const content of data.message.content) {
|
||||
if (typeof content === "string") {
|
||||
continue;
|
||||
}
|
||||
if (content.type === "tool_result") {
|
||||
thinkingTimer.markToolResult();
|
||||
const toolUseId = content.tool_use_id;
|
||||
const isBashTool = toolUseId && bashToolIds.has(toolUseId);
|
||||
const outputContent = typeof content.content === "string" ? content.content : Array.isArray(content.content) ? content.content.map((c) => typeof c === "string" ? c : c.text || JSON.stringify(c)).join("\n") : String(content.content);
|
||||
const outputContent = typeof content.content === "string" ? content.content : Array.isArray(content.content) ? content.content.map(
|
||||
(c) => typeof c === "string" ? c : "text" in c ? c.text : JSON.stringify(c)
|
||||
).join("\n") : String(content.content);
|
||||
if (isBashTool) {
|
||||
log.startGroup(`bash output`);
|
||||
if (content.is_error) {
|
||||
|
||||
@@ -81,5 +81,14 @@
|
||||
"require": "./dist/index.cjs"
|
||||
}
|
||||
},
|
||||
"pnpm": {
|
||||
"packageExtensions": {
|
||||
"@anthropic-ai/claude-agent-sdk": {
|
||||
"dependencies": {
|
||||
"@anthropic-ai/sdk": "*"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"packageManager": "pnpm@10.27.0+sha512.72d699da16b1179c14ba9e64dc71c9a40988cbdc65c264cb0e489db7de917f20dcf4d64d8723625f2969ba52d4b7e2a1170682d9ac2a5dcaeaab732b7e16f04a"
|
||||
}
|
||||
|
||||
Generated
+38
@@ -4,6 +4,8 @@ settings:
|
||||
autoInstallPeers: true
|
||||
excludeLinksFromLockfile: false
|
||||
|
||||
packageExtensionsChecksum: sha256-Ae6BTffLg0DiuEWVZSk6skwAhBSw9mfAk50E5Iq3i80=
|
||||
|
||||
importers:
|
||||
|
||||
.:
|
||||
@@ -120,6 +122,15 @@ packages:
|
||||
peerDependencies:
|
||||
zod: ^4.0.0
|
||||
|
||||
'@anthropic-ai/sdk@0.74.0':
|
||||
resolution: {integrity: sha512-srbJV7JKsc5cQ6eVuFzjZO7UR3xEPJqPamHFIe29bs38Ij2IripoAhC0S5NslNbaFUYqBKypmmpzMTpqfHEUDw==}
|
||||
hasBin: true
|
||||
peerDependencies:
|
||||
zod: ^3.25.0 || ^4.0.0
|
||||
peerDependenciesMeta:
|
||||
zod:
|
||||
optional: true
|
||||
|
||||
'@ark/fs@0.56.0':
|
||||
resolution: {integrity: sha512-zY/wDDhcvmt6/upQwZM766PAnvIzdEMcgydUGd9pqY9FMGNo9I9uE4RYAfms9AeUUtbZJu2h2Ua0tvFsO5XF4Q==}
|
||||
|
||||
@@ -129,6 +140,10 @@ packages:
|
||||
'@ark/util@0.56.0':
|
||||
resolution: {integrity: sha512-BghfRC8b9pNs3vBoDJhcta0/c1J1rsoS1+HgVUreMFPdhz/CRAKReAu57YEllNaSy98rWAdY1gE+gFup7OXpgA==}
|
||||
|
||||
'@babel/runtime@7.28.6':
|
||||
resolution: {integrity: sha512-05WQkdpL9COIMz4LjTxGpPNCdlpyimKppYNoJ5Di5EUObifl8t4tuLuUBBZEpoLYOmfvIWrsp9fCl0HoPRVTdA==}
|
||||
engines: {node: '>=6.9.0'}
|
||||
|
||||
'@borewit/text-codec@0.1.1':
|
||||
resolution: {integrity: sha512-5L/uBxmjaCIX5h8Z+uu+kA9BQLkc/Wl06UGR5ajNRxu+/XjonB5i8JpgFMrPj3LXTCPA0pv8yxUvbUi+QthGGA==}
|
||||
|
||||
@@ -1182,6 +1197,10 @@ packages:
|
||||
jose@6.1.3:
|
||||
resolution: {integrity: sha512-0TpaTfihd4QMNwrz/ob2Bp7X04yuxJkjRGi4aKmOqwhov54i6u79oCv7T+C7lo70MKH6BesI3vscD1yb/yzKXQ==}
|
||||
|
||||
json-schema-to-ts@3.1.1:
|
||||
resolution: {integrity: sha512-+DWg8jCJG2TEnpy7kOm/7/AxaYoaRbjVB4LFZLySZlWn8exGs3A4OLJR966cVvU26N7X9TWxl+Jsw7dzAqKT6g==}
|
||||
engines: {node: '>=16'}
|
||||
|
||||
json-schema-traverse@1.0.0:
|
||||
resolution: {integrity: sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==}
|
||||
|
||||
@@ -1454,6 +1473,9 @@ packages:
|
||||
resolution: {integrity: sha512-kh9LVIWH5CnL63Ipf0jhlBIy0UsrMj/NJDfpsy1SqOXlLKEVyXXYrnFxFT1yOOYVGBSApeVnjPw/sBz5BfEjAQ==}
|
||||
engines: {node: '>=14.16'}
|
||||
|
||||
ts-algebra@2.0.0:
|
||||
resolution: {integrity: sha512-FPAhNPFMrkwz76P7cdjdmiShwMynZYN6SgOujD1urY4oNm80Ou9oMdmbR45LotcKOXoy7wSmHkRFE6Mxbrhefw==}
|
||||
|
||||
tunnel@0.0.6:
|
||||
resolution: {integrity: sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==}
|
||||
engines: {node: '>=0.6.11 <=0.7.0 || >=0.7.3'}
|
||||
@@ -1666,6 +1688,7 @@ snapshots:
|
||||
|
||||
'@anthropic-ai/claude-agent-sdk@0.2.39(zod@4.3.5)':
|
||||
dependencies:
|
||||
'@anthropic-ai/sdk': 0.74.0(zod@4.3.5)
|
||||
zod: 4.3.5
|
||||
optionalDependencies:
|
||||
'@img/sharp-darwin-arm64': 0.33.5
|
||||
@@ -1677,6 +1700,12 @@ snapshots:
|
||||
'@img/sharp-linuxmusl-x64': 0.33.5
|
||||
'@img/sharp-win32-x64': 0.33.5
|
||||
|
||||
'@anthropic-ai/sdk@0.74.0(zod@4.3.5)':
|
||||
dependencies:
|
||||
json-schema-to-ts: 3.1.1
|
||||
optionalDependencies:
|
||||
zod: 4.3.5
|
||||
|
||||
'@ark/fs@0.56.0': {}
|
||||
|
||||
'@ark/schema@0.56.0':
|
||||
@@ -1685,6 +1714,8 @@ snapshots:
|
||||
|
||||
'@ark/util@0.56.0': {}
|
||||
|
||||
'@babel/runtime@7.28.6': {}
|
||||
|
||||
'@borewit/text-codec@0.1.1': {}
|
||||
|
||||
'@esbuild/aix-ppc64@0.25.12':
|
||||
@@ -2589,6 +2620,11 @@ snapshots:
|
||||
|
||||
jose@6.1.3: {}
|
||||
|
||||
json-schema-to-ts@3.1.1:
|
||||
dependencies:
|
||||
'@babel/runtime': 7.28.6
|
||||
ts-algebra: 2.0.0
|
||||
|
||||
json-schema-traverse@1.0.0: {}
|
||||
|
||||
json-schema-typed@8.0.2: {}
|
||||
@@ -2871,6 +2907,8 @@ snapshots:
|
||||
'@tokenizer/token': 0.3.0
|
||||
ieee754: 1.2.1
|
||||
|
||||
ts-algebra@2.0.0: {}
|
||||
|
||||
tunnel@0.0.6: {}
|
||||
|
||||
turndown@7.2.2:
|
||||
|
||||
@@ -41339,6 +41339,15 @@ var package_default = {
|
||||
require: "./dist/index.cjs"
|
||||
}
|
||||
},
|
||||
pnpm: {
|
||||
packageExtensions: {
|
||||
"@anthropic-ai/claude-agent-sdk": {
|
||||
dependencies: {
|
||||
"@anthropic-ai/sdk": "*"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
packageManager: "pnpm@10.27.0+sha512.72d699da16b1179c14ba9e64dc71c9a40988cbdc65c264cb0e489db7de917f20dcf4d64d8723625f2969ba52d4b7e2a1170682d9ac2a5dcaeaab732b7e16f04a"
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user