agents 0.28.0 → 0.29.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 (121) hide show
  1. package/dist/{agent-routing-QDcchcQP.d.ts → agent-routing-CDbpVjYq.d.ts} +18 -8
  2. package/dist/agent-routing.d.ts +1 -1
  3. package/dist/agent-tool-types.d.ts +1 -1
  4. package/dist/{agent-tools-DHL2XI7u.d.ts → agent-tools-C8DH8Yii.d.ts} +2 -2
  5. package/dist/agent-tools.d.ts +1 -1
  6. package/dist/{ai-ahruGw7e.d.ts → ai-iXw0uOGj.d.ts} +3 -3
  7. package/dist/{ai-sdk-Bdsf6mSA.js → ai-sdk-DRPh2rRa.js} +218 -132
  8. package/dist/ai-sdk-DRPh2rRa.js.map +1 -0
  9. package/dist/browser/ai.d.ts +1 -1
  10. package/dist/browser/ai.js +2 -2
  11. package/dist/browser/index.d.ts +8 -8
  12. package/dist/browser/index.js +3 -3
  13. package/dist/browser/tools/ai-sdk.d.ts +2 -2
  14. package/dist/browser/tools/ai-sdk.js +1 -1
  15. package/dist/browser/tools/pi.d.ts +1 -1
  16. package/dist/browser/tools/pi.js +3 -3
  17. package/dist/browser/tools/pi.js.map +1 -1
  18. package/dist/browser/tools/tanstack-ai.d.ts +2 -2
  19. package/dist/browser/tools/tanstack-ai.js +1 -1
  20. package/dist/{browser-CEdNlsaD.js → browser-DccPw_wW.js} +130 -79
  21. package/dist/browser-DccPw_wW.js.map +1 -0
  22. package/dist/{browser-D30VlpcA.d.ts → browser-DlXhSAdf.d.ts} +41 -37
  23. package/dist/{browser-tool-4iomavs_.js → browser-tool-B1mhifin.js} +3 -3
  24. package/dist/{browser-tool-4iomavs_.js.map → browser-tool-B1mhifin.js.map} +1 -1
  25. package/dist/{browser-tool-vtrPOV8e.d.ts → browser-tool-Cxjk5sgG.d.ts} +2 -2
  26. package/dist/chat/index.d.ts +143 -71
  27. package/dist/chat/index.js +269 -110
  28. package/dist/chat/index.js.map +1 -1
  29. package/dist/chat-sdk/index.d.ts +1 -1
  30. package/dist/chat-sdk/index.js +1 -1
  31. package/dist/cli.js +33 -33
  32. package/dist/{client-BGIQKJhX.d.ts → client-C27CtRZr.d.ts} +2 -2
  33. package/dist/client.d.ts +1 -1
  34. package/dist/{connector-DEXzVoaY.d.ts → connector-20DJ6p4k.d.ts} +2 -2
  35. package/dist/{connector-CtZylXdk.js → connector-DAXBOIIi.js} +2 -2
  36. package/dist/{connector-CtZylXdk.js.map → connector-DAXBOIIi.js.map} +1 -1
  37. package/dist/experimental/channels/web/index.js +1 -1
  38. package/dist/{handler-stateless-VvrWSAVA.js → handler-stateless-Bly_nSH3.js} +12 -3
  39. package/dist/handler-stateless-Bly_nSH3.js.map +1 -0
  40. package/dist/harness/container/index.js +1 -1
  41. package/dist/harness/container/index.js.map +1 -1
  42. package/dist/harness/opencode/index.d.ts +182 -6
  43. package/dist/harness/opencode/index.js +354 -23
  44. package/dist/harness/opencode/index.js.map +1 -1
  45. package/dist/harness/pi/index.d.ts +13 -5
  46. package/dist/harness/pi/index.js +8 -214
  47. package/dist/harness/pi/index.js.map +1 -1
  48. package/dist/{images-Ce9SCu3X.js → images-xaDv2Fqe.js} +662 -152
  49. package/dist/images-xaDv2Fqe.js.map +1 -0
  50. package/dist/index-DCxk3OSJ.d.ts +378 -0
  51. package/dist/{index-kbSUIer3.d.ts → index-iv9FTXX9.d.ts} +80 -112
  52. package/dist/index.d.ts +1 -1
  53. package/dist/index.js +1 -1
  54. package/dist/{input-schema-D2QAtHZH.js → input-schema-B0Etuo-o.js} +2 -2
  55. package/dist/{input-schema-D2QAtHZH.js.map → input-schema-B0Etuo-o.js.map} +1 -1
  56. package/dist/lifecycle/index.js +1 -1
  57. package/dist/{lifecycle-DGorpAmA.js → lifecycle-ClT4DmF2.js} +11 -3
  58. package/dist/lifecycle-ClT4DmF2.js.map +1 -0
  59. package/dist/mcp/client/index.d.ts +1 -1
  60. package/dist/mcp/index.d.ts +1 -1
  61. package/dist/mcp/index.js +17 -3
  62. package/dist/mcp/index.js.map +1 -1
  63. package/dist/mcp/server/index.js +1 -1
  64. package/dist/models/ai-sdk/index.d.ts +31 -326
  65. package/dist/models/ai-sdk/index.js +1 -1
  66. package/dist/models/opencode/index.d.ts +25 -13
  67. package/dist/models/opencode/index.js +16 -11
  68. package/dist/models/opencode/index.js.map +1 -1
  69. package/dist/models/pi-ai/index.d.ts +17 -13
  70. package/dist/models/pi-ai/index.js +89 -36
  71. package/dist/models/pi-ai/index.js.map +1 -1
  72. package/dist/react.d.ts +2 -2
  73. package/dist/routing/index.d.ts +1 -1
  74. package/dist/serializable.d.ts +1 -1
  75. package/dist/{session-store-DoPY12xM.d.ts → session-store-_IK6dV-w.d.ts} +14 -2
  76. package/dist/{session-store-Do4xkDcf.js → session-store-yvwq1f9x.js} +55 -2
  77. package/dist/session-store-yvwq1f9x.js.map +1 -0
  78. package/dist/{settings-C45hDliX.js → settings-Dk2il2Hf.js} +10 -4
  79. package/dist/settings-Dk2il2Hf.js.map +1 -0
  80. package/dist/skills/index.d.ts +22 -28
  81. package/dist/skills/index.js +183 -143
  82. package/dist/skills/index.js.map +1 -1
  83. package/dist/{src-CQxJFv4l.js → src-6lr7MtM_.js} +3 -3
  84. package/dist/src-6lr7MtM_.js.map +1 -0
  85. package/dist/sub-routing.d.ts +1 -1
  86. package/dist/{tool-cQRkwSZZ.js → tool-DkT_DJBm.js} +2 -2
  87. package/dist/tool-DkT_DJBm.js.map +1 -0
  88. package/dist/transport-CPh7YGiw.d.ts +623 -0
  89. package/dist/voice/index.d.ts +1 -1
  90. package/dist/web/fetch/tools/pi.js +2 -2
  91. package/dist/web/fetch/tools/pi.js.map +1 -1
  92. package/dist/web/search/index.js +1 -1
  93. package/dist/web/search/tools/ai-sdk.js +2 -2
  94. package/dist/web/search/tools/pi.js +3 -3
  95. package/dist/web/search/tools/pi.js.map +1 -1
  96. package/dist/web/search/tools/tanstack-ai.js +2 -2
  97. package/dist/websockets/index.js +1 -1
  98. package/dist/{websockets-C3zy8YR0.js → websockets-CqxnntmE.js} +2 -2
  99. package/dist/{websockets-C3zy8YR0.js.map → websockets-CqxnntmE.js.map} +1 -1
  100. package/dist/workflow-types.d.ts +1 -1
  101. package/dist/workflows.d.ts +1 -1
  102. package/dist/workflows.js +1 -1
  103. package/docs/browse-the-web.md +1 -1
  104. package/docs/chat-agents.md +19 -18
  105. package/docs/harnesses/pi.md +47 -18
  106. package/docs/mcp-client.md +1 -1
  107. package/docs/mcp-servers.md +1 -1
  108. package/docs/models-pi-ai.md +70 -17
  109. package/docs/models.md +219 -152
  110. package/package.json +14 -14
  111. package/dist/ai-sdk-Bdsf6mSA.js.map +0 -1
  112. package/dist/browser-CEdNlsaD.js.map +0 -1
  113. package/dist/handler-stateless-VvrWSAVA.js.map +0 -1
  114. package/dist/images-Ce9SCu3X.js.map +0 -1
  115. package/dist/lifecycle-DGorpAmA.js.map +0 -1
  116. package/dist/session-store-Do4xkDcf.js.map +0 -1
  117. package/dist/settings-C45hDliX.js.map +0 -1
  118. package/dist/settings-NgGwF7Qt.d.ts +0 -331
  119. package/dist/src-CQxJFv4l.js.map +0 -1
  120. package/dist/tool-cQRkwSZZ.js.map +0 -1
  121. package/dist/transport-k2mFrtL8.d.ts +0 -200
@@ -1320,6 +1320,17 @@ declare abstract class McpAgent<
1320
1320
  abstract init(): Promise<void>;
1321
1321
  setInitializeRequest(initializeRequest: JSONRPCMessage$1): Promise<void>;
1322
1322
  getInitializeRequest(): Promise<JSONRPCMessage$1 | undefined>;
1323
+ /**
1324
+ * End a streamable HTTP session (`DELETE`). Teardown is deferred to the
1325
+ * agent's alarm (#1625), so the stored initialize request is cleared too:
1326
+ * every route treats a session without one as unknown, which makes requests
1327
+ * carrying the terminated session ID get 404 as the spec requires. Teardown
1328
+ * is scheduled first, so a failure part-way leaves a session the client can
1329
+ * `DELETE` again rather than one that is never cleaned up.
1330
+ *
1331
+ * @internal
1332
+ */
1333
+ _cf_terminateSession(): Promise<void>;
1323
1334
  /**
1324
1335
  * Storage key prefix for the `streamId -> requestIds` mapping used
1325
1336
  * to support POST stream resumption across WebSocket reconnects.
@@ -4481,13 +4492,12 @@ interface AgentStaticOptions {
4481
4492
  * reset (the isolate exceeded its 128 MB limit) before the alarm-boundary
4482
4493
  * circuit breaker stops the platform's auto-retry loop and seals the looping
4483
4494
  * recovery work (#1825). Default: 3. Set to `0` to seal on the first such
4484
- * reset. This is the universal backstop for the case where the in-DO recovery
4485
- * budgets (`chatRecovery.maxOomRetries` / `maxRecoveryWork`) can't engage
4486
- * because the OOM bypasses them — e.g. it is thrown before the budget code
4487
- * runs, or its own writes also OOM. The boundary handler runs at the outermost
4488
- * alarm frame, after the heavy turn has unwound and GC has reclaimed its
4489
- * footprint, so its small seal/purge writes can land where mid-turn writes
4490
- * could not.
4495
+ * reset. The strike counter is written after the reset, so it only advances
4496
+ * when that isolate's storage still accepts writes, for example when the
4497
+ * reset error came from another isolate such as D1. A Durable Object's own
4498
+ * memory-limit reset rejects every later storage call in that invocation, so
4499
+ * chat recovery does not rely on this counter: it counts each interrupted
4500
+ * attempt in the next isolate (`chatRecovery.maxInterruptedAttempts`, #2613).
4491
4501
  */
4492
4502
  maxAlarmMemoryLimitStrikes?: number;
4493
4503
  }
@@ -7035,4 +7045,4 @@ export {
7035
7045
  AgentToolEventState as z,
7036
7046
  MCPClientOAuthResult as zt
7037
7047
  };
7038
- //# sourceMappingURL=agent-routing-QDcchcQP.d.ts.map
7048
+ //# sourceMappingURL=agent-routing-CDbpVjYq.d.ts.map
@@ -4,7 +4,7 @@ import {
4
4
  n as AgentOptions,
5
5
  r as RoutingRetryOptions,
6
6
  t as AgentGetOptions
7
- } from "./agent-routing-QDcchcQP.js";
7
+ } from "./agent-routing-CDbpVjYq.js";
8
8
  export {
9
9
  AgentGetOptions,
10
10
  AgentOptions,
@@ -27,7 +27,7 @@ import {
27
27
  rt as RunAgentToolResult,
28
28
  tt as DetachedRunAgentToolResult,
29
29
  z as AgentToolEventState
30
- } from "./agent-routing-QDcchcQP.js";
30
+ } from "./agent-routing-CDbpVjYq.js";
31
31
  export {
32
32
  AGENT_TOOL_MILESTONE_PART,
33
33
  AGENT_TOOL_PROGRESS_PART,
@@ -4,7 +4,7 @@ import {
4
4
  W as AgentToolProgress,
5
5
  Z as AgentToolStoredChunk,
6
6
  z as AgentToolEventState
7
- } from "./agent-routing-QDcchcQP.js";
7
+ } from "./agent-routing-CDbpVjYq.js";
8
8
 
9
9
  //#region src/chat/agent-tools.d.ts
10
10
  type AgentToolProgressEmitResult = "emitted" | "coalesced" | "inactive";
@@ -144,4 +144,4 @@ export {
144
144
  interceptAgentToolBroadcast as s,
145
145
  AgentToolBroadcastHooks as t
146
146
  };
147
- //# sourceMappingURL=agent-tools-DHL2XI7u.d.ts.map
147
+ //# sourceMappingURL=agent-tools-C8DH8Yii.d.ts.map
@@ -20,7 +20,7 @@ import {
20
20
  rt as RunAgentToolResult,
21
21
  tt as DetachedRunAgentToolResult,
22
22
  z as AgentToolEventState
23
- } from "./agent-routing-QDcchcQP.js";
23
+ } from "./agent-routing-CDbpVjYq.js";
24
24
  import { FlexibleSchema, InferSchema, Tool } from "ai";
25
25
 
26
26
  //#region src/agent-tools.d.ts
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  d as BrowserBinding,
3
3
  n as BrowserSessionStore
4
- } from "./session-store-DoPY12xM.js";
4
+ } from "./session-store-_IK6dV-w.js";
5
5
  import {
6
6
  l as QuickActionBinding,
7
7
  r as BrowserConnectorSessionOptions,
8
8
  t as BrowserConnector,
9
9
  u as QuickActionCommonOptions
10
- } from "./connector-DEXzVoaY.js";
10
+ } from "./connector-20DJ6p4k.js";
11
11
  import { ToolSet } from "ai";
12
12
  import { CodemodeRuntimeHandle } from "@cloudflare/codemode";
13
13
 
@@ -236,4 +236,4 @@ export {
236
236
  createQuickActionTools as s,
237
237
  BrowserRuntime as t
238
238
  };
239
- //# sourceMappingURL=ai-ahruGw7e.d.ts.map
239
+ //# sourceMappingURL=ai-iXw0uOGj.d.ts.map