@core-ai/anthropic 0.13.1 → 0.14.0

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.
Files changed (2) hide show
  1. package/dist/index.js +13 -0
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -681,6 +681,12 @@ async function* transformStream(stream) {
681
681
  };
682
682
  continue;
683
683
  }
684
+ if (event.content_block.type === "text") {
685
+ yield {
686
+ type: "text-start"
687
+ };
688
+ continue;
689
+ }
684
690
  if (event.content_block.type === "tool_use") {
685
691
  const block = event.content_block;
686
692
  const initialArguments = block.input && typeof block.input === "object" ? Object.keys(block.input).length > 0 ? JSON.stringify(block.input) : "" : "";
@@ -738,6 +744,13 @@ async function* transformStream(stream) {
738
744
  continue;
739
745
  }
740
746
  if (event.type === "content_block_stop") {
747
+ if (contentBlockTypeByIndex.get(event.index) === "text") {
748
+ contentBlockTypeByIndex.delete(event.index);
749
+ yield {
750
+ type: "text-end"
751
+ };
752
+ continue;
753
+ }
741
754
  if (contentBlockTypeByIndex.get(event.index) === "thinking") {
742
755
  const signature = reasoningSignatureByIndex.get(event.index);
743
756
  reasoningSignatureByIndex.delete(event.index);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@core-ai/anthropic",
3
- "version": "0.13.1",
3
+ "version": "0.14.0",
4
4
  "description": "Anthropic provider package for @core-ai/core-ai",
5
5
  "license": "MIT",
6
6
  "author": "Omnifact (https://omnifact.ai)",
@@ -45,7 +45,7 @@
45
45
  },
46
46
  "dependencies": {
47
47
  "@anthropic-ai/sdk": "^0.110.0",
48
- "@core-ai/core-ai": "^0.13.1"
48
+ "@core-ai/core-ai": "^0.14.0"
49
49
  },
50
50
  "peerDependencies": {
51
51
  "zod": "^4.0.0"