@ai-sdk/anthropic 3.0.22 → 3.0.23

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 (45) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/dist/index.js +1 -1
  3. package/dist/index.mjs +1 -1
  4. package/package.json +9 -5
  5. package/src/__fixtures__/anthropic-code-execution-20250825.1.chunks.txt +0 -248
  6. package/src/__fixtures__/anthropic-code-execution-20250825.1.json +0 -70
  7. package/src/__fixtures__/anthropic-code-execution-20250825.2.chunks.txt +0 -984
  8. package/src/__fixtures__/anthropic-code-execution-20250825.2.json +0 -111
  9. package/src/__fixtures__/anthropic-code-execution-20250825.pptx-skill.chunks.txt +0 -691
  10. package/src/__fixtures__/anthropic-code-execution-20250825.pptx-skill.json +0 -1801
  11. package/src/__fixtures__/anthropic-json-other-tool.1.chunks.txt +0 -13
  12. package/src/__fixtures__/anthropic-json-other-tool.1.json +0 -26
  13. package/src/__fixtures__/anthropic-json-output-format.1.chunks.txt +0 -120
  14. package/src/__fixtures__/anthropic-json-output-format.1.json +0 -25
  15. package/src/__fixtures__/anthropic-json-tool.1.chunks.txt +0 -9
  16. package/src/__fixtures__/anthropic-json-tool.1.json +0 -37
  17. package/src/__fixtures__/anthropic-json-tool.2.chunks.txt +0 -14
  18. package/src/__fixtures__/anthropic-mcp.1.chunks.txt +0 -17
  19. package/src/__fixtures__/anthropic-mcp.1.json +0 -39
  20. package/src/__fixtures__/anthropic-memory-20250818.1.json +0 -28
  21. package/src/__fixtures__/anthropic-message-delta-input-tokens.chunks.txt +0 -8
  22. package/src/__fixtures__/anthropic-programmatic-tool-calling.1.chunks.txt +0 -278
  23. package/src/__fixtures__/anthropic-programmatic-tool-calling.1.json +0 -106
  24. package/src/__fixtures__/anthropic-tool-no-args.chunks.txt +0 -13
  25. package/src/__fixtures__/anthropic-tool-no-args.json +0 -31
  26. package/src/__fixtures__/anthropic-tool-search-bm25.1.chunks.txt +0 -47
  27. package/src/__fixtures__/anthropic-tool-search-bm25.1.json +0 -67
  28. package/src/__fixtures__/anthropic-tool-search-deferred-bm25.2.json +0 -65
  29. package/src/__fixtures__/anthropic-tool-search-deferred-bm25.chunks.txt +0 -115
  30. package/src/__fixtures__/anthropic-tool-search-deferred-regex.2.json +0 -69
  31. package/src/__fixtures__/anthropic-tool-search-deferred-regex.chunks.txt +0 -119
  32. package/src/__fixtures__/anthropic-tool-search-regex.1.chunks.txt +0 -51
  33. package/src/__fixtures__/anthropic-tool-search-regex.1.json +0 -65
  34. package/src/__fixtures__/anthropic-web-fetch-tool.1.chunks.txt +0 -64
  35. package/src/__fixtures__/anthropic-web-fetch-tool.1.json +0 -54
  36. package/src/__fixtures__/anthropic-web-fetch-tool.2.json +0 -56
  37. package/src/__fixtures__/anthropic-web-fetch-tool.error.json +0 -46
  38. package/src/__fixtures__/anthropic-web-search-tool.1.chunks.txt +0 -120
  39. package/src/__fixtures__/anthropic-web-search-tool.1.json +0 -181
  40. package/src/__snapshots__/anthropic-messages-language-model.test.ts.snap +0 -16719
  41. package/src/anthropic-error.test.ts +0 -42
  42. package/src/anthropic-messages-language-model.test.ts +0 -7368
  43. package/src/anthropic-prepare-tools.test.ts +0 -1219
  44. package/src/anthropic-provider.test.ts +0 -198
  45. package/src/convert-to-anthropic-messages-prompt.test.ts +0 -2902
@@ -1,67 +0,0 @@
1
- {
2
- "model": "claude-sonnet-4-5-20250929",
3
- "id": "msg_01UT62y3tNACWwnL9oJ9rzUG",
4
- "type": "message",
5
- "role": "assistant",
6
- "content": [
7
- {
8
- "type": "text",
9
- "text": "I'll search for a weather-related tool to help you get the current weather in San Francisco."
10
- },
11
- {
12
- "type": "server_tool_use",
13
- "id": "srvtoolu_011Jcb838xqvZyWwDt7bWqAz",
14
- "name": "tool_search_tool_bm25",
15
- "input": {
16
- "query": "weather current conditions San Francisco"
17
- },
18
- "caller": {
19
- "type": "direct"
20
- }
21
- },
22
- {
23
- "type": "tool_search_tool_result",
24
- "tool_use_id": "srvtoolu_011Jcb838xqvZyWwDt7bWqAz",
25
- "content": {
26
- "type": "tool_search_tool_search_result",
27
- "tool_references": [
28
- {
29
- "type": "tool_reference",
30
- "tool_name": "get_weather"
31
- }
32
- ]
33
- }
34
- },
35
- {
36
- "type": "text",
37
- "text": "Great! I found a weather tool. Let me get the current weather in San Francisco for you."
38
- },
39
- {
40
- "type": "tool_use",
41
- "id": "toolu_01PFQG18bVLaXcEaCxTZtX4G",
42
- "name": "get_weather",
43
- "input": {
44
- "location": "San Francisco, CA"
45
- },
46
- "caller": {
47
- "type": "direct"
48
- }
49
- }
50
- ],
51
- "stop_reason": "tool_use",
52
- "stop_sequence": null,
53
- "usage": {
54
- "input_tokens": 1631,
55
- "cache_creation_input_tokens": 0,
56
- "cache_read_input_tokens": 0,
57
- "cache_creation": {
58
- "ephemeral_5m_input_tokens": 0,
59
- "ephemeral_1h_input_tokens": 0
60
- },
61
- "output_tokens": 161,
62
- "service_tier": "standard",
63
- "server_tool_use": {
64
- "web_search_requests": 0
65
- }
66
- }
67
- }
@@ -1,65 +0,0 @@
1
- {
2
- "model": "claude-sonnet-4-5-20250929",
3
- "id": "msg_01SyorFoaYHS6homn4ntwKWk",
4
- "type": "message",
5
- "role": "assistant",
6
- "content": [
7
- {
8
- "type": "tool_search_tool_result",
9
- "tool_use_id": "srvtoolu_01Daym2FbLXTL2hg6bVwCcoj",
10
- "content": {
11
- "type": "tool_search_tool_search_result",
12
- "tool_references": [
13
- {
14
- "type": "tool_reference",
15
- "tool_name": "executeEditorOperation"
16
- }
17
- ]
18
- }
19
- },
20
- {
21
- "type": "text",
22
- "text": "Perfect! I can see the current structure has one bulleted list item with the text \"hi\". Now I need to add a new bullet point with \"bye\" after it. Let me use the `executeEditorOperation` tool to insert a new bulleted list item."
23
- },
24
- {
25
- "type": "tool_use",
26
- "id": "toolu_019oFKxH7xzoKZtBX1mBGHeJ",
27
- "name": "executeEditorOperation",
28
- "input": {
29
- "noteId": "d10aa585-982b-4bd9-984e-420f9b3717f7",
30
- "operations": [
31
- {
32
- "op": "insert_node",
33
- "at": {
34
- "type": "path",
35
- "path": [
36
- 1
37
- ]
38
- },
39
- "type": "bulletedListItem",
40
- "text": "bye"
41
- }
42
- ]
43
- },
44
- "caller": {
45
- "type": "direct"
46
- }
47
- }
48
- ],
49
- "stop_reason": "tool_use",
50
- "stop_sequence": null,
51
- "usage": {
52
- "input_tokens": 1398,
53
- "cache_creation_input_tokens": 0,
54
- "cache_read_input_tokens": 0,
55
- "cache_creation": {
56
- "ephemeral_5m_input_tokens": 0,
57
- "ephemeral_1h_input_tokens": 0
58
- },
59
- "output_tokens": 213,
60
- "service_tier": "standard",
61
- "server_tool_use": {
62
- "web_search_requests": 0
63
- }
64
- }
65
- }
@@ -1,115 +0,0 @@
1
- {"type":"message_start","message":{"model":"claude-sonnet-4-5-20250929","id":"msg_01WUP4eZFC22KbkesuJGqVAw","type":"message","role":"assistant","content":[],"stop_reason":null,"stop_sequence":null,"usage":{"input_tokens":879,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"cache_creation":{"ephemeral_5m_input_tokens":0,"ephemeral_1h_input_tokens":0},"output_tokens":5,"service_tier":"standard"}}}
2
- {"type":"content_block_start","index":0,"content_block":{"type":"text","text":""}}
3
- {"type":"ping"}
4
- {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"I'll help you with"}}
5
- {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" this"}}
6
- {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" task"}}
7
- {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":". Let me start by reading the note"}}
8
- {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" tree to see"}}
9
- {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" the current structure, and then search"}}
10
- {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" for the right tools to add a"}}
11
- {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" bullet"}}
12
- {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" point"}}
13
- {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"."}}
14
- {"type":"content_block_stop","index":0}
15
- {"type":"content_block_start","index":1,"content_block":{"type":"tool_use","id":"toolu_01U8pzAHj2vNdPCA2Kf8JjeN","name":"readNoteTree","input":{},"caller":{"type":"direct"}}}
16
- {"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":""}}
17
- {"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":"{\"noteId\": \"d10aa585-982b"}}
18
- {"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":"-4bd9-984e-"}}
19
- {"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":"420f9b3717f7"}}
20
- {"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":"\"}"}}
21
- {"type":"content_block_stop","index":1}
22
- {"type":"content_block_start","index":2,"content_block":{"type":"server_tool_use","id":"srvtoolu_01FjZe9o4YXXJjGxLmfj44Rf","name":"tool_search_tool_bm25","input":{},"caller":{"type":"direct"}}}
23
- {"type":"content_block_delta","index":2,"delta":{"type":"input_json_delta","partial_json":""}}
24
- {"type":"content_block_delta","index":2,"delta":{"type":"input_json_delta","partial_json":"{\"query\": \"ad"}}
25
- {"type":"content_block_delta","index":2,"delta":{"type":"input_json_delta","partial_json":"d bullet"}}
26
- {"type":"content_block_delta","index":2,"delta":{"type":"input_json_delta","partial_json":" point insert"}}
27
- {"type":"content_block_delta","index":2,"delta":{"type":"input_json_delta","partial_json":" text"}}
28
- {"type":"content_block_delta","index":2,"delta":{"type":"input_json_delta","partial_json":" editor"}}
29
- {"type":"content_block_delta","index":2,"delta":{"type":"input_json_delta","partial_json":"\", \"limit\": 5"}}
30
- {"type":"content_block_delta","index":2,"delta":{"type":"input_json_delta","partial_json":"}"}}
31
- {"type":"content_block_stop","index":2}
32
- {"type":"message_delta","delta":{"stop_reason":"tool_use","stop_sequence":null},"usage":{"input_tokens":879,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"output_tokens":177}}
33
- {"type":"message_stop"}
34
- {"type":"message_start","message":{"model":"claude-sonnet-4-5-20250929","id":"msg_014CbStN8SFzjGbDkZzTtD7i","type":"message","role":"assistant","content":[],"stop_reason":null,"stop_sequence":null,"usage":{"input_tokens":1398,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"cache_creation":{"ephemeral_5m_input_tokens":0,"ephemeral_1h_input_tokens":0},"output_tokens":1,"service_tier":"standard"}}}
35
- {"type":"content_block_start","index":0,"content_block":{"type":"tool_search_tool_result","tool_use_id":"srvtoolu_01FjZe9o4YXXJjGxLmfj44Rf","content":{"type":"tool_search_tool_search_result","tool_references":[{"type":"tool_reference","tool_name":"executeEditorOperation"}]}}}
36
- {"type":"content_block_stop","index":0}
37
- {"type":"content_block_start","index":1,"content_block":{"type":"text","text":""}}
38
- {"type":"content_block_delta","index":1,"delta":{"type":"text_delta","text":"Perfect"}}
39
- {"type":"content_block_delta","index":1,"delta":{"type":"text_delta","text":"! I can"}}
40
- {"type":"content_block_delta","index":1,"delta":{"type":"text_delta","text":" see the current"}}
41
- {"type":"content_block_delta","index":1,"delta":{"type":"text_delta","text":" note structure has"}}
42
- {"type":"content_block_delta","index":1,"delta":{"type":"text_delta","text":" one"}}
43
- {"type":"content_block_delta","index":1,"delta":{"type":"text_delta","text":" bull"}}
44
- {"type":"content_block_delta","index":1,"delta":{"type":"text_delta","text":"eted list item with"}}
45
- {"type":"content_block_delta","index":1,"delta":{"type":"text_delta","text":" the"}}
46
- {"type":"content_block_delta","index":1,"delta":{"type":"text_delta","text":" text \"hi\". Now I nee"}}
47
- {"type":"content_block_delta","index":1,"delta":{"type":"text_delta","text":"d to ad"}}
48
- {"type":"content_block_delta","index":1,"delta":{"type":"text_delta","text":"d a"}}
49
- {"type":"content_block_delta","index":1,"delta":{"type":"text_delta","text":" new bullet with"}}
50
- {"type":"content_block_delta","index":1,"delta":{"type":"text_delta","text":" \"bye\" after it"}}
51
- {"type":"content_block_delta","index":1,"delta":{"type":"text_delta","text":". Let me use"}}
52
- {"type":"content_block_delta","index":1,"delta":{"type":"text_delta","text":" the `"}}
53
- {"type":"content_block_delta","index":1,"delta":{"type":"text_delta","text":"executeEditorOperation` tool"}}
54
- {"type":"content_block_delta","index":1,"delta":{"type":"text_delta","text":" to"}}
55
- {"type":"content_block_delta","index":1,"delta":{"type":"text_delta","text":" insert"}}
56
- {"type":"content_block_delta","index":1,"delta":{"type":"text_delta","text":" a"}}
57
- {"type":"content_block_delta","index":1,"delta":{"type":"text_delta","text":" new bull"}}
58
- {"type":"content_block_delta","index":1,"delta":{"type":"text_delta","text":"eted list item."}}
59
- {"type":"content_block_stop","index":1}
60
- {"type":"content_block_start","index":2,"content_block":{"type":"tool_use","id":"toolu_01QoRrvXNv6w4vZSyo9cnxP2","name":"executeEditorOperation","input":{},"caller":{"type":"direct"}}}
61
- {"type":"content_block_delta","index":2,"delta":{"type":"input_json_delta","partial_json":""}}
62
- {"type":"content_block_delta","index":2,"delta":{"type":"input_json_delta","partial_json":"{\"noteId\": \"d10aa"}}
63
- {"type":"content_block_delta","index":2,"delta":{"type":"input_json_delta","partial_json":"585-982b-4bd9"}}
64
- {"type":"content_block_delta","index":2,"delta":{"type":"input_json_delta","partial_json":"-984e-420f9b"}}
65
- {"type":"content_block_delta","index":2,"delta":{"type":"input_json_delta","partial_json":"3717f7"}}
66
- {"type":"content_block_delta","index":2,"delta":{"type":"input_json_delta","partial_json":"\", \"operations\": [\n {\n \"op"}}
67
- {"type":"content_block_delta","index":2,"delta":{"type":"input_json_delta","partial_json":"\": \"insert_"}}
68
- {"type":"content_block_delta","index":2,"delta":{"type":"input_json_delta","partial_json":"node"}}
69
- {"type":"content_block_delta","index":2,"delta":{"type":"input_json_delta","partial_json":"\",\n \"type"}}
70
- {"type":"content_block_delta","index":2,"delta":{"type":"input_json_delta","partial_json":"\": \"bulletedListItem\","}}
71
- {"type":"content_block_delta","index":2,"delta":{"type":"input_json_delta","partial_json":"\n \"text\": \"bye\","}}
72
- {"type":"content_block_delta","index":2,"delta":{"type":"input_json_delta","partial_json":"\n \"at"}}
73
- {"type":"content_block_delta","index":2,"delta":{"type":"input_json_delta","partial_json":"\": {\n \"type\": \""}}
74
- {"type":"content_block_delta","index":2,"delta":{"type":"input_json_delta","partial_json":"path"}}
75
- {"type":"content_block_delta","index":2,"delta":{"type":"input_json_delta","partial_json":"\",\n \"path\": [1"}}
76
- {"type":"content_block_delta","index":2,"delta":{"type":"input_json_delta","partial_json":"]\n }\n }"}}
77
- {"type":"content_block_delta","index":2,"delta":{"type":"input_json_delta","partial_json":"\n]"}}
78
- {"type":"content_block_delta","index":2,"delta":{"type":"input_json_delta","partial_json":"}"}}
79
- {"type":"content_block_stop","index":2}
80
- {"type":"message_delta","delta":{"stop_reason":"tool_use","stop_sequence":null},"usage":{"input_tokens":1398,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"output_tokens":213,"server_tool_use":{"web_search_requests":0}}}
81
- {"type":"message_stop"}
82
- {"type":"message_start","message":{"model":"claude-sonnet-4-5-20250929","id":"msg_01XnBpTaw23kf2UnGUdkKfey","type":"message","role":"assistant","content":[],"stop_reason":null,"stop_sequence":null,"usage":{"input_tokens":1639,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"cache_creation":{"ephemeral_5m_input_tokens":0,"ephemeral_1h_input_tokens":0},"output_tokens":6,"service_tier":"standard"}}}
83
- {"type":"content_block_start","index":0,"content_block":{"type":"text","text":""}}
84
- {"type":"ping"}
85
- {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"Great! I've successfully complete"}}
86
- {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"d the task. Here"}}
87
- {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"'s what I did:\n\n1."}}
88
- {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" **Read the note tree**:"}}
89
- {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" The"}}
90
- {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" note"}}
91
- {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" ha"}}
92
- {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"d one"}}
93
- {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" bulleted list item containing"}}
94
- {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" \"hi\""}}
95
- {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"\n2. **Adde"}}
96
- {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"d a"}}
97
- {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" new bullet**: I"}}
98
- {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" inserted a"}}
99
- {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" new bulleted list item with the"}}
100
- {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" text \"bye\" at"}}
101
- {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" position"}}
102
- {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" ["}}
103
- {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"1],"}}
104
- {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" which places"}}
105
- {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" it right"}}
106
- {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" after the \"hi\" bullet"}}
107
- {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"\n\nThe note now"}}
108
- {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" contains"}}
109
- {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":":\n- hi"}}
110
- {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"\n- bye\n\nThe operation"}}
111
- {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" was successful"}}
112
- {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"!"}}
113
- {"type":"content_block_stop","index":0}
114
- {"type":"message_delta","delta":{"stop_reason":"end_turn","stop_sequence":null},"usage":{"input_tokens":1639,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"output_tokens":95}}
115
- {"type":"message_stop"}
@@ -1,69 +0,0 @@
1
- {
2
- "model": "claude-sonnet-4-5-20250929",
3
- "id": "msg_01AyVh7iTyYup5o85hpFmYC1",
4
- "type": "message",
5
- "role": "assistant",
6
- "content": [
7
- {
8
- "type": "tool_search_tool_result",
9
- "tool_use_id": "srvtoolu_01WD1PoedV47LMZdJrsVNZtM",
10
- "content": {
11
- "type": "tool_search_tool_search_result",
12
- "tool_references": [
13
- {
14
- "type": "tool_reference",
15
- "tool_name": "readNoteTree"
16
- },
17
- {
18
- "type": "tool_reference",
19
- "tool_name": "executeEditorOperation"
20
- }
21
- ]
22
- }
23
- },
24
- {
25
- "type": "text",
26
- "text": "Good! I can see the current note structure has one bulleted list item with the text \"hi\". Now I need to add a new bullet point with \"bye\" after it. Let me use the `executeEditorOperation` tool to insert a new bulleted list item."
27
- },
28
- {
29
- "type": "tool_use",
30
- "id": "toolu_01Vif37vPguXdx5yxixnpvpM",
31
- "name": "executeEditorOperation",
32
- "input": {
33
- "noteId": "d10aa585-982b-4bd9-984e-420f9b3717f7",
34
- "operations": [
35
- {
36
- "op": "insert_node",
37
- "at": {
38
- "type": "path",
39
- "path": [
40
- 1
41
- ]
42
- },
43
- "type": "bulletedListItem",
44
- "text": "bye"
45
- }
46
- ]
47
- },
48
- "caller": {
49
- "type": "direct"
50
- }
51
- }
52
- ],
53
- "stop_reason": "tool_use",
54
- "stop_sequence": null,
55
- "usage": {
56
- "input_tokens": 1520,
57
- "cache_creation_input_tokens": 0,
58
- "cache_read_input_tokens": 0,
59
- "cache_creation": {
60
- "ephemeral_5m_input_tokens": 0,
61
- "ephemeral_1h_input_tokens": 0
62
- },
63
- "output_tokens": 203,
64
- "service_tier": "standard",
65
- "server_tool_use": {
66
- "web_search_requests": 0
67
- }
68
- }
69
- }
@@ -1,119 +0,0 @@
1
- {"type":"message_start","message":{"model":"claude-sonnet-4-5-20250929","id":"msg_01MCmfPn2yQ8Nfqz1cGmHe6K","type":"message","role":"assistant","content":[],"stop_reason":null,"stop_sequence":null,"usage":{"input_tokens":904,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"cache_creation":{"ephemeral_5m_input_tokens":0,"ephemeral_1h_input_tokens":0},"output_tokens":5,"service_tier":"standard"}}}
2
- {"type":"content_block_start","index":0,"content_block":{"type":"text","text":""}}
3
- {"type":"ping"}
4
- {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"I'll help you with"}}
5
- {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" this task. Let me start"}}
6
- {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" by reading the note tree to see"}}
7
- {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" the current structure,"}}
8
- {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" an"}}
9
- {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"d then search"}}
10
- {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" for the appropriate"}}
11
- {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" tools to add a"}}
12
- {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" bullet"}}
13
- {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"."}}
14
- {"type":"content_block_stop","index":0}
15
- {"type":"content_block_start","index":1,"content_block":{"type":"tool_use","id":"toolu_01WPkY6CkyJnFsaCqY7SZ9FX","name":"readNoteTree","input":{},"caller":{"type":"direct"}}}
16
- {"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":""}}
17
- {"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":"{\"noteId\": \"d10aa585-982b"}}
18
- {"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":"-4bd9-984e-"}}
19
- {"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":"420f9b3717f7"}}
20
- {"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":"\"}"}}
21
- {"type":"content_block_stop","index":1}
22
- {"type":"content_block_start","index":2,"content_block":{"type":"server_tool_use","id":"srvtoolu_01H4HgrFsi9xizPtvnx1Tm7D","name":"tool_search_tool_regex","input":{},"caller":{"type":"direct"}}}
23
- {"type":"content_block_delta","index":2,"delta":{"type":"input_json_delta","partial_json":""}}
24
- {"type":"content_block_delta","index":2,"delta":{"type":"input_json_delta","partial_json":"{\"pattern\": \"ad"}}
25
- {"type":"content_block_delta","index":2,"delta":{"type":"input_json_delta","partial_json":"d|"}}
26
- {"type":"content_block_delta","index":2,"delta":{"type":"input_json_delta","partial_json":"insert"}}
27
- {"type":"content_block_delta","index":2,"delta":{"type":"input_json_delta","partial_json":"|bullet"}}
28
- {"type":"content_block_delta","index":2,"delta":{"type":"input_json_delta","partial_json":"|create"}}
29
- {"type":"content_block_delta","index":2,"delta":{"type":"input_json_delta","partial_json":"\", \"limit\": 10"}}
30
- {"type":"content_block_delta","index":2,"delta":{"type":"input_json_delta","partial_json":"}"}}
31
- {"type":"content_block_stop","index":2}
32
- {"type":"message_delta","delta":{"stop_reason":"tool_use","stop_sequence":null},"usage":{"input_tokens":904,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"output_tokens":175}}
33
- {"type":"message_stop"}
34
- {"type":"message_start","message":{"model":"claude-sonnet-4-5-20250929","id":"msg_017tMyttPYQeSLKYEe8V9BN5","type":"message","role":"assistant","content":[],"stop_reason":null,"stop_sequence":null,"usage":{"input_tokens":1519,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"cache_creation":{"ephemeral_5m_input_tokens":0,"ephemeral_1h_input_tokens":0},"output_tokens":1,"service_tier":"standard"}}}
35
- {"type":"content_block_start","index":0,"content_block":{"type":"tool_search_tool_result","tool_use_id":"srvtoolu_01H4HgrFsi9xizPtvnx1Tm7D","content":{"type":"tool_search_tool_search_result","tool_references":[{"type":"tool_reference","tool_name":"readNoteTree"},{"type":"tool_reference","tool_name":"executeEditorOperation"}]}}}
36
- {"type":"content_block_stop","index":0}
37
- {"type":"content_block_start","index":1,"content_block":{"type":"text","text":""}}
38
- {"type":"content_block_delta","index":1,"delta":{"type":"text_delta","text":"Perfect"}}
39
- {"type":"content_block_delta","index":1,"delta":{"type":"text_delta","text":"! I can"}}
40
- {"type":"content_block_delta","index":1,"delta":{"type":"text_delta","text":" see the current"}}
41
- {"type":"content_block_delta","index":1,"delta":{"type":"text_delta","text":" note structure"}}
42
- {"type":"content_block_delta","index":1,"delta":{"type":"text_delta","text":" has"}}
43
- {"type":"content_block_delta","index":1,"delta":{"type":"text_delta","text":" one"}}
44
- {"type":"content_block_delta","index":1,"delta":{"type":"text_delta","text":" bull"}}
45
- {"type":"content_block_delta","index":1,"delta":{"type":"text_delta","text":"eted list"}}
46
- {"type":"content_block_delta","index":1,"delta":{"type":"text_delta","text":" item with"}}
47
- {"type":"content_block_delta","index":1,"delta":{"type":"text_delta","text":" the"}}
48
- {"type":"content_block_delta","index":1,"delta":{"type":"text_delta","text":" text \"hi\". Now I nee"}}
49
- {"type":"content_block_delta","index":1,"delta":{"type":"text_delta","text":"d to add \"bye\" as a new"}}
50
- {"type":"content_block_delta","index":1,"delta":{"type":"text_delta","text":" bullet after it"}}
51
- {"type":"content_block_delta","index":1,"delta":{"type":"text_delta","text":"."}}
52
- {"type":"content_block_delta","index":1,"delta":{"type":"text_delta","text":" Let"}}
53
- {"type":"content_block_delta","index":1,"delta":{"type":"text_delta","text":" me use"}}
54
- {"type":"content_block_delta","index":1,"delta":{"type":"text_delta","text":" the `"}}
55
- {"type":"content_block_delta","index":1,"delta":{"type":"text_delta","text":"executeEditorOperation` tool"}}
56
- {"type":"content_block_delta","index":1,"delta":{"type":"text_delta","text":" to insert"}}
57
- {"type":"content_block_delta","index":1,"delta":{"type":"text_delta","text":" a"}}
58
- {"type":"content_block_delta","index":1,"delta":{"type":"text_delta","text":" new bull"}}
59
- {"type":"content_block_delta","index":1,"delta":{"type":"text_delta","text":"eted list item."}}
60
- {"type":"content_block_stop","index":1}
61
- {"type":"content_block_start","index":2,"content_block":{"type":"tool_use","id":"toolu_01UFHf8D27JBYu9FmrcjJk1p","name":"executeEditorOperation","input":{},"caller":{"type":"direct"}}}
62
- {"type":"content_block_delta","index":2,"delta":{"type":"input_json_delta","partial_json":""}}
63
- {"type":"content_block_delta","index":2,"delta":{"type":"input_json_delta","partial_json":"{\"noteId\": \"d10aa585-982b"}}
64
- {"type":"content_block_delta","index":2,"delta":{"type":"input_json_delta","partial_json":"-4bd9-984e-"}}
65
- {"type":"content_block_delta","index":2,"delta":{"type":"input_json_delta","partial_json":"420f9b3717f7"}}
66
- {"type":"content_block_delta","index":2,"delta":{"type":"input_json_delta","partial_json":"\", \"operations\": ["}}
67
- {"type":"content_block_delta","index":2,"delta":{"type":"input_json_delta","partial_json":"\n "}}
68
- {"type":"content_block_delta","index":2,"delta":{"type":"input_json_delta","partial_json":"{\n \"op\": \"insert"}}
69
- {"type":"content_block_delta","index":2,"delta":{"type":"input_json_delta","partial_json":"\",\n \"type"}}
70
- {"type":"content_block_delta","index":2,"delta":{"type":"input_json_delta","partial_json":"\": \"bulletedListItem\","}}
71
- {"type":"content_block_delta","index":2,"delta":{"type":"input_json_delta","partial_json":"\n \"text"}}
72
- {"type":"content_block_delta","index":2,"delta":{"type":"input_json_delta","partial_json":"\": \"bye\","}}
73
- {"type":"content_block_delta","index":2,"delta":{"type":"input_json_delta","partial_json":"\n \"at"}}
74
- {"type":"content_block_delta","index":2,"delta":{"type":"input_json_delta","partial_json":"\": {"}}
75
- {"type":"content_block_delta","index":2,"delta":{"type":"input_json_delta","partial_json":"\n \"type"}}
76
- {"type":"content_block_delta","index":2,"delta":{"type":"input_json_delta","partial_json":"\": \"after"}}
77
- {"type":"content_block_delta","index":2,"delta":{"type":"input_json_delta","partial_json":"\",\n \"path\": [0"}}
78
- {"type":"content_block_delta","index":2,"delta":{"type":"input_json_delta","partial_json":"]\n }\n }"}}
79
- {"type":"content_block_delta","index":2,"delta":{"type":"input_json_delta","partial_json":"\n]"}}
80
- {"type":"content_block_delta","index":2,"delta":{"type":"input_json_delta","partial_json":"}"}}
81
- {"type":"content_block_stop","index":2}
82
- {"type":"message_delta","delta":{"stop_reason":"tool_use","stop_sequence":null},"usage":{"input_tokens":1519,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"output_tokens":211,"server_tool_use":{"web_search_requests":0}}}
83
- {"type":"message_stop"}
84
- {"type":"message_start","message":{"model":"claude-sonnet-4-5-20250929","id":"msg_01B2PApN3MtQ8zF4Xvnw6pvY","type":"message","role":"assistant","content":[],"stop_reason":null,"stop_sequence":null,"usage":{"input_tokens":1758,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"cache_creation":{"ephemeral_5m_input_tokens":0,"ephemeral_1h_input_tokens":0},"output_tokens":3,"service_tier":"standard"}}}
85
- {"type":"content_block_start","index":0,"content_block":{"type":"text","text":""}}
86
- {"type":"ping"}
87
- {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"Great! I"}}
88
- {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"'ve successfully complete"}}
89
- {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"d the task. Here"}}
90
- {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"'s what I did:\n\n1."}}
91
- {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" **Rea"}}
92
- {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"d the note tree**:"}}
93
- {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" The"}}
94
- {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" note containe"}}
95
- {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"d one"}}
96
- {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" bulleted list item with the"}}
97
- {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" text \"hi\""}}
98
- {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" at"}}
99
- {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" path"}}
100
- {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" [0]"}}
101
- {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"\n2. **Added \"bye\""}}
102
- {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" as a new bullet**: I"}}
103
- {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" use"}}
104
- {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"d the `executeEditorOperation` tool"}}
105
- {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" to insert a new bulleted list item"}}
106
- {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" with"}}
107
- {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" the text \"bye\" after"}}
108
- {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" the \"hi\" bullet"}}
109
- {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" ("}}
110
- {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"at path [0])\n\nThe operation"}}
111
- {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" was successful"}}
112
- {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":","}}
113
- {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" and the note now contains"}}
114
- {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" two bulleted list items:"}}
115
- {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"\n- hi"}}
116
- {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"\n- bye"}}
117
- {"type":"content_block_stop","index":0}
118
- {"type":"message_delta","delta":{"stop_reason":"end_turn","stop_sequence":null},"usage":{"input_tokens":1758,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"output_tokens":118}}
119
- {"type":"message_stop"}
@@ -1,51 +0,0 @@
1
- {"type":"message_start","message":{"model":"claude-sonnet-4-5-20250929","id":"msg_01A4vjL51mNRof8JMvA9CFph","type":"message","role":"assistant","content":[],"stop_reason":null,"stop_sequence":null,"usage":{"input_tokens":722,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"cache_creation":{"ephemeral_5m_input_tokens":0,"ephemeral_1h_input_tokens":0},"output_tokens":1,"service_tier":"standard"}}}
2
- {"type":"content_block_start","index":0,"content_block":{"type":"server_tool_use","id":"srvtoolu_01TFsKhwiJYqVMitK2XGtH87","name":"tool_search_tool_regex","input":{},"caller":{"type":"direct"}}}
3
- {"type":"content_block_delta","index":0,"delta":{"type":"input_json_delta","partial_json":""}}
4
- {"type":"content_block_delta","index":0,"delta":{"type":"input_json_delta","partial_json":"{\"pattern\": \"weather|"}}
5
- {"type":"content_block_delta","index":0,"delta":{"type":"input_json_delta","partial_json":"SF"}}
6
- {"type":"content_block_delta","index":0,"delta":{"type":"input_json_delta","partial_json":"|"}}
7
- {"type":"content_block_delta","index":0,"delta":{"type":"input_json_delta","partial_json":"San Francisco|"}}
8
- {"type":"content_block_delta","index":0,"delta":{"type":"input_json_delta","partial_json":"forecast"}}
9
- {"type":"content_block_delta","index":0,"delta":{"type":"input_json_delta","partial_json":"|temperature"}}
10
- {"type":"content_block_delta","index":0,"delta":{"type":"input_json_delta","partial_json":"|climate"}}
11
- {"type":"content_block_delta","index":0,"delta":{"type":"input_json_delta","partial_json":"\", \"limit\": 10"}}
12
- {"type":"content_block_delta","index":0,"delta":{"type":"input_json_delta","partial_json":"}"}}
13
- {"type":"content_block_stop","index":0}
14
- {"type":"content_block_start","index":1,"content_block":{"type":"tool_search_tool_result","tool_use_id":"srvtoolu_01TFsKhwiJYqVMitK2XGtH87","content":{"type":"tool_search_tool_search_result","tool_references":[{"type":"tool_reference","tool_name":"get_temp_data"}]}}}
15
- {"type":"content_block_stop","index":1}
16
- {"type":"content_block_start","index":2,"content_block":{"type":"text","text":""}}
17
- {"type":"content_block_delta","index":2,"delta":{"type":"text_delta","text":"Great"}}
18
- {"type":"content_block_delta","index":2,"delta":{"type":"text_delta","text":"! I"}}
19
- {"type":"content_block_delta","index":2,"delta":{"type":"text_delta","text":" found a"}}
20
- {"type":"content_block_delta","index":2,"delta":{"type":"text_delta","text":" weather tool"}}
21
- {"type":"content_block_delta","index":2,"delta":{"type":"text_delta","text":"."}}
22
- {"type":"content_block_delta","index":2,"delta":{"type":"text_delta","text":" Let"}}
23
- {"type":"content_block_delta","index":2,"delta":{"type":"text_delta","text":" me get the current weather"}}
24
- {"type":"content_block_delta","index":2,"delta":{"type":"text_delta","text":" data for San Francisco."}}
25
- {"type":"content_block_stop","index":2}
26
- {"type":"content_block_start","index":3,"content_block":{"type":"tool_use","id":"toolu_01UmPwkecewaEpMupy2ywk8b","name":"get_temp_data","input":{},"caller":{"type":"direct"}}}
27
- {"type":"content_block_delta","index":3,"delta":{"type":"input_json_delta","partial_json":""}}
28
- {"type":"content_block_delta","index":3,"delta":{"type":"input_json_delta","partial_json":"{\"location\": \"San Francisco, CA"}}
29
- {"type":"content_block_delta","index":3,"delta":{"type":"input_json_delta","partial_json":"\"}"}}
30
- {"type":"content_block_stop","index":3}
31
- {"type":"message_delta","delta":{"stop_reason":"tool_use","stop_sequence":null},"usage":{"input_tokens":1681,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"output_tokens":163,"server_tool_use":{"web_search_requests":0}}}
32
- {"type":"message_stop"}
33
- {"type":"message_start","message":{"model":"claude-sonnet-4-5-20250929","id":"msg_01L42mFXxzijtGwwfiLdKoUn","type":"message","role":"assistant","content":[],"stop_reason":null,"stop_sequence":null,"usage":{"input_tokens":1071,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"cache_creation":{"ephemeral_5m_input_tokens":0,"ephemeral_1h_input_tokens":0},"output_tokens":1,"service_tier":"standard"}}}
34
- {"type":"content_block_start","index":0,"content_block":{"type":"text","text":""}}
35
- {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"Here"}}
36
- {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"'s the current"}}
37
- {"type":"ping"}
38
- {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" weather data for San Francisco:\n\n-"}}
39
- {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" **"}}
40
- {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"Location:** San Francisco, CA"}}
41
- {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"\n- **Temperature:** 64°F"}}
42
- {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"\n- **Condition:** Partly clou"}}
43
- {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"dy\n- **Humidity:** "}}
44
- {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"65%\n\nThe weather in"}}
45
- {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" SF"}}
46
- {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" is pleasant"}}
47
- {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" with partly cloudy skies and moderate"}}
48
- {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" humidity!"}}
49
- {"type":"content_block_stop","index":0}
50
- {"type":"message_delta","delta":{"stop_reason":"end_turn","stop_sequence":null},"usage":{"input_tokens":1071,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"output_tokens":67}}
51
- {"type":"message_stop"}
@@ -1,65 +0,0 @@
1
- {
2
- "model": "claude-sonnet-4-5-20250929",
3
- "id": "msg_014rjTcNMwWRYQkjnCre2pi4",
4
- "type": "message",
5
- "role": "assistant",
6
- "content": [
7
- {
8
- "type": "server_tool_use",
9
- "id": "srvtoolu_01SACvPAnp6ucMJsstB5qb3f",
10
- "name": "tool_search_tool_regex",
11
- "input": {
12
- "pattern": "weather|SF|San Francisco|forecast|temperature|climate",
13
- "limit": 10
14
- },
15
- "caller": {
16
- "type": "direct"
17
- }
18
- },
19
- {
20
- "type": "tool_search_tool_result",
21
- "tool_use_id": "srvtoolu_01SACvPAnp6ucMJsstB5qb3f",
22
- "content": {
23
- "type": "tool_search_tool_search_result",
24
- "tool_references": [
25
- {
26
- "type": "tool_reference",
27
- "tool_name": "get_temp_data"
28
- }
29
- ]
30
- }
31
- },
32
- {
33
- "type": "text",
34
- "text": "I found a tool to get temperature data! Let me use it to get the weather information for San Francisco."
35
- },
36
- {
37
- "type": "tool_use",
38
- "id": "toolu_01X4r989CAhzqnFqDJn1gVvp",
39
- "name": "get_temp_data",
40
- "input": {
41
- "location": "San Francisco, CA",
42
- "unit": "fahrenheit"
43
- },
44
- "caller": {
45
- "type": "direct"
46
- }
47
- }
48
- ],
49
- "stop_reason": "tool_use",
50
- "stop_sequence": null,
51
- "usage": {
52
- "input_tokens": 1676,
53
- "cache_creation_input_tokens": 0,
54
- "cache_read_input_tokens": 0,
55
- "cache_creation": {
56
- "ephemeral_5m_input_tokens": 0,
57
- "ephemeral_1h_input_tokens": 0
58
- },
59
- "output_tokens": 184,
60
- "service_tier": "standard",
61
- "server_tool_use": {
62
- "web_search_requests": 0
63
- }
64
- }
65
- }