@convex-dev/agent 0.2.8-alpha.6 → 0.2.9

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 (40) hide show
  1. package/dist/UIMessages.d.ts.map +1 -1
  2. package/dist/UIMessages.js +4 -4
  3. package/dist/UIMessages.js.map +1 -1
  4. package/dist/client/definePlaygroundAPI.js +3 -3
  5. package/dist/client/definePlaygroundAPI.js.map +1 -1
  6. package/dist/client/index.d.ts +4 -2
  7. package/dist/client/index.d.ts.map +1 -1
  8. package/dist/client/index.js +13 -12
  9. package/dist/client/index.js.map +1 -1
  10. package/dist/client/search.d.ts.map +1 -1
  11. package/dist/client/search.js +15 -13
  12. package/dist/client/search.js.map +1 -1
  13. package/dist/client/start.d.ts +1 -1
  14. package/dist/client/start.d.ts.map +1 -1
  15. package/dist/client/start.js +1 -1
  16. package/dist/client/start.js.map +1 -1
  17. package/dist/client/streaming.d.ts +1 -0
  18. package/dist/client/streaming.d.ts.map +1 -1
  19. package/dist/client/streaming.js +13 -3
  20. package/dist/client/streaming.js.map +1 -1
  21. package/dist/client/types.d.ts +4 -0
  22. package/dist/client/types.d.ts.map +1 -1
  23. package/dist/mapping.d.ts +5 -5
  24. package/dist/mapping.d.ts.map +1 -1
  25. package/dist/mapping.js +22 -22
  26. package/dist/mapping.js.map +1 -1
  27. package/package.json +2 -2
  28. package/src/UIMessages.ts +4 -8
  29. package/src/client/definePlaygroundAPI.ts +3 -3
  30. package/src/client/index.ts +14 -11
  31. package/src/client/search.ts +15 -13
  32. package/src/client/start.ts +1 -1
  33. package/src/client/streaming.ts +18 -7
  34. package/src/client/types.ts +4 -0
  35. package/src/deltas.test.ts +262 -0
  36. package/src/mapping.test.ts +8 -8
  37. package/src/mapping.ts +28 -28
  38. package/src/node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709/results.json +1 -1
  39. package/src/client/mock.json +0 -68
  40. package/src/client/stream.json +0 -48
@@ -1,68 +0,0 @@
1
- [
2
- { "type": "start" },
3
- { "type": "start-step" },
4
- { "type": "reasoning-start", "id": "0-reasoning" },
5
- {
6
- "type": "reasoning-delta",
7
- "id": "0-reasoning",
8
- "delta": "I'm",
9
- "providerMetadata": {
10
- "mockProvider": { "mock": { "reasoningDetails": null } }
11
- }
12
- },
13
- {
14
- "type": "reasoning-delta",
15
- "id": "0-reasoning",
16
- "delta": " thinking",
17
- "providerMetadata": {
18
- "mockProvider": { "mock": { "reasoningDetails": null } }
19
- }
20
- },
21
- { "type": "reasoning-end", "id": "0-reasoning" },
22
- {
23
- "type": "tool-input-available",
24
- "toolCallId": "1",
25
- "toolName": "say",
26
- "input": { "question": "What is the best flavor of ice cream?" }
27
- },
28
- {
29
- "type": "tool-output-available",
30
- "toolCallId": "1",
31
- "output": "I'm sorry I can't help you. Stop asking me questions."
32
- },
33
- {
34
- "type": "tool-output-available",
35
- "toolCallId": "1",
36
- "output": "I'm sorry I can't help you. Stop asking me questions."
37
- },
38
- { "type": "reasoning-start", "id": "3-reasoning" },
39
- {
40
- "type": "reasoning-delta",
41
- "id": "3-reasoning",
42
- "delta": "I'm",
43
- "providerMetadata": {
44
- "mockProvider": { "mock": { "reasoningDetails": null } }
45
- }
46
- },
47
- {
48
- "type": "reasoning-delta",
49
- "id": "3-reasoning",
50
- "delta": " thinking",
51
- "providerMetadata": {
52
- "mockProvider": { "mock": { "reasoningDetails": null } }
53
- }
54
- },
55
- { "type": "reasoning-end", "id": "3-reasoning" },
56
- { "type": "text-start", "id": "4-text" },
57
- { "type": "text-delta", "id": "4-text", "delta": "The" },
58
- { "type": "text-delta", "id": "4-text", "delta": " best" },
59
- { "type": "text-delta", "id": "4-text", "delta": " flavor" },
60
- { "type": "text-delta", "id": "4-text", "delta": " of" },
61
- { "type": "text-delta", "id": "4-text", "delta": " ice" },
62
- { "type": "text-delta", "id": "4-text", "delta": " cream" },
63
- { "type": "text-delta", "id": "4-text", "delta": " is" },
64
- { "type": "text-delta", "id": "4-text", "delta": " vanilla." },
65
- { "type": "text-end", "id": "4-text" },
66
- { "type": "finish-step" },
67
- { "type": "finish" }
68
- ]
@@ -1,48 +0,0 @@
1
- [
2
- { "type": "start" },
3
- { "type": "start-step" },
4
- { "type": "reasoning-start", "id": "reasoning-0" },
5
- { "type": "reasoning-delta", "id": "reasoning-0", "delta": "Okay" },
6
- {
7
- "type": "reasoning-delta",
8
- "id": "reasoning-0",
9
- "delta": ", the user is asking, \"What is the best flavor of ice cream?\" I need to figure out how to respond. Let me check the tools provided. The only tool available is the \"say\" function, which allows me to ask a friend for their favorite ice cream flavor. The function requires a \"question\" parameter.\n\nSo, since I don't have any other functions, I can't look up information or calculate the answer. The best approach is to use the \"say\" function to ask a friend. I should formulate the question to match the friend's parameters. The user is asking for the \"best\" flavor, which is subjective. Therefore, asking a friend's favorite makes sense.\n\nI need to structure the function call correctly. The function name is \"say\" and the argument is the question. The question should be, \"What is your favorite flavor of ice cream?\" That's the parameter required. Let me make sure the JSON is properly formatted with the arguments as a JSON object. Yep, that should work. I'll output the tool_call with the function name and the question argument.\n"
10
- },
11
- { "type": "tool-input-start", "toolCallId": "0ychh9k6f", "toolName": "say" },
12
- {
13
- "type": "tool-input-delta",
14
- "toolCallId": "0ychh9k6f",
15
- "inputTextDelta": "{\"question\":\"What is your favorite flavor of ice cream?\"}"
16
- },
17
- {
18
- "type": "tool-input-available",
19
- "toolCallId": "0ychh9k6f",
20
- "toolName": "say",
21
- "input": { "question": "What is your favorite flavor of ice cream?" }
22
- },
23
- {
24
- "type": "tool-output-available",
25
- "toolCallId": "0ychh9k6f",
26
- "output": "I'm sorry I can't help you. Stop asking me questions."
27
- },
28
- { "type": "reasoning-end", "id": "reasoning-0" },
29
- { "type": "finish-step" },
30
- { "type": "start-step" },
31
- { "type": "reasoning-start", "id": "reasoning-0" },
32
- { "type": "reasoning-delta", "id": "reasoning-0", "delta": "Okay" },
33
- {
34
- "type": "reasoning-delta",
35
- "id": "reasoning-0",
36
- "delta": ", the user initially asked for the best ice cream flavor. I tried using the 'say' function to ask a friend, but the friend didn't help. Now I need to respond. Since I can't get an answer from the friend, I should tell the user that I can't determine the best flavor because it's subjective. Maybe suggest they try different ones. Keep the response friendly and helpful.\n"
37
- },
38
- { "type": "text-start", "id": "txt-0" },
39
- {
40
- "type": "text-delta",
41
- "id": "txt-0",
42
- "delta": "The \"best\" ice cream flavor is subjective—it depends on personal taste! Some people love classic vanilla, while others might prefer adventurous options like matcha or salted caramel. Why not try a few and see which one you like most? 🍦"
43
- },
44
- { "type": "reasoning-end", "id": "reasoning-0" },
45
- { "type": "text-end", "id": "txt-0" },
46
- { "type": "finish-step" },
47
- { "type": "finish" }
48
- ]