experimental-a2 0.17.0 → 0.18.1

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 (221) hide show
  1. package/CHANGELOG.md +32 -0
  2. package/README.md +1 -1
  3. package/dist/{actor-DBbe5xeE.d.ts → actor-C7b-1arn.d.ts} +5 -5
  4. package/dist/{actor-DBbe5xeE.d.ts.map → actor-C7b-1arn.d.ts.map} +1 -1
  5. package/dist/actor-client.d.ts +1 -1
  6. package/dist/actor-react.d.ts +3 -3
  7. package/dist/actor-react.js +1 -1
  8. package/dist/actor.d.ts +1 -1
  9. package/dist/actor.js +2 -2
  10. package/dist/{ai-vpGtcaCB.d.ts → ai-BMLlI2Ff.d.ts} +3 -3
  11. package/dist/{ai-vpGtcaCB.d.ts.map → ai-BMLlI2Ff.d.ts.map} +1 -1
  12. package/dist/{ai-UrWfKeuv.js → ai-D6mGlO8j.js} +2 -2
  13. package/dist/{ai-UrWfKeuv.js.map → ai-D6mGlO8j.js.map} +1 -1
  14. package/dist/ai-client.d.ts +2 -2
  15. package/dist/ai-client.js +2 -2
  16. package/dist/ai-fx.browser.d.ts +1 -0
  17. package/dist/ai-fx.browser.js +6 -0
  18. package/dist/ai-fx.browser.js.map +1 -0
  19. package/dist/ai-fx.d.ts +10 -0
  20. package/dist/ai-fx.d.ts.map +1 -0
  21. package/dist/ai-fx.js +692 -0
  22. package/dist/ai-fx.js.map +1 -0
  23. package/dist/ai-harness-B2suP2Qh.d.ts +26 -0
  24. package/dist/ai-harness-B2suP2Qh.d.ts.map +1 -0
  25. package/dist/ai-harness-BuLh_EYi.js +273 -0
  26. package/dist/ai-harness-BuLh_EYi.js.map +1 -0
  27. package/dist/ai-pi.browser.d.ts +1 -0
  28. package/dist/ai-pi.browser.js +6 -0
  29. package/dist/ai-pi.browser.js.map +1 -0
  30. package/dist/ai-pi.d.ts +17 -0
  31. package/dist/ai-pi.d.ts.map +1 -0
  32. package/dist/ai-pi.js +950 -0
  33. package/dist/ai-pi.js.map +1 -0
  34. package/dist/ai-react.d.ts +5 -5
  35. package/dist/ai-react.js +2 -2
  36. package/dist/ai-server.d.ts +47 -25
  37. package/dist/ai-server.d.ts.map +1 -1
  38. package/dist/ai-server.js +113 -40
  39. package/dist/ai-server.js.map +1 -1
  40. package/dist/ai-tool-input-DmSqMUQi.js +40 -0
  41. package/dist/ai-tool-input-DmSqMUQi.js.map +1 -0
  42. package/dist/ai.d.ts +1 -1
  43. package/dist/ai.js +1 -1
  44. package/dist/bounded-cache-CPHWF-8h.js +41 -0
  45. package/dist/bounded-cache-CPHWF-8h.js.map +1 -0
  46. package/dist/{client-COaiaDub.js → client-BhHLoNKF.js} +3 -3
  47. package/dist/{client-COaiaDub.js.map → client-BhHLoNKF.js.map} +1 -1
  48. package/dist/{client-qRnRUzBS.d.ts → client-h_DKFAjj.d.ts} +3 -3
  49. package/dist/{client-qRnRUzBS.d.ts.map → client-h_DKFAjj.d.ts.map} +1 -1
  50. package/dist/client.d.ts +3 -3
  51. package/dist/client.js +1 -1
  52. package/dist/index.d.ts +5 -5
  53. package/dist/{initial-snapshot-BrLso5x_.d.ts → initial-snapshot-Bx-c0pDP.d.ts} +2 -2
  54. package/dist/{initial-snapshot-BrLso5x_.d.ts.map → initial-snapshot-Bx-c0pDP.d.ts.map} +1 -1
  55. package/dist/{internal-CbVvEwad.js → internal-CscSY7K_.js} +11 -3
  56. package/dist/internal-CscSY7K_.js.map +1 -0
  57. package/dist/otel.d.ts +1 -1
  58. package/dist/{react-BbJ-g6Uu.d.ts → react-BBXgHWFc.d.ts} +4 -4
  59. package/dist/{react-BbJ-g6Uu.d.ts.map → react-BBXgHWFc.d.ts.map} +1 -1
  60. package/dist/react.d.ts +1 -1
  61. package/dist/react.js +1 -1
  62. package/dist/reducer-BAXc8JyF.js.map +1 -1
  63. package/dist/{reducer-BYu6DT7h.d.ts → reducer-CqA59Q6U.d.ts} +2 -2
  64. package/dist/{reducer-BYu6DT7h.d.ts.map → reducer-CqA59Q6U.d.ts.map} +1 -1
  65. package/dist/scheduler-qstash.d.ts +2 -2
  66. package/dist/scheduler-qstash.js +3 -3
  67. package/dist/scheduler-qstash.js.map +1 -1
  68. package/dist/scheduler-vercel.d.ts +7 -7
  69. package/dist/scheduler-vercel.d.ts.map +1 -1
  70. package/dist/scheduler-vercel.js +9 -10
  71. package/dist/scheduler-vercel.js.map +1 -1
  72. package/dist/{server-Rj64fNvX.js → server-D-Y4pqwu.js} +126 -67
  73. package/dist/server-D-Y4pqwu.js.map +1 -0
  74. package/dist/{server-CGM8WzRG.d.ts → server-DYAATFuT.d.ts} +42 -7
  75. package/dist/server-DYAATFuT.d.ts.map +1 -0
  76. package/dist/server.d.ts +4 -4
  77. package/dist/server.js +1 -1
  78. package/dist/{session-clear-Dshpuhff.d.ts → session-clear-C-QwTXV1.d.ts} +2 -2
  79. package/dist/session-clear-C-QwTXV1.d.ts.map +1 -0
  80. package/dist/{store-Gpkq7WBo.d.ts → store-CyLUy86v.d.ts} +53 -5
  81. package/dist/store-CyLUy86v.d.ts.map +1 -0
  82. package/dist/store-N8PXxDAS.js.map +1 -1
  83. package/dist/store-memory.d.ts +1 -1
  84. package/dist/store-memory.js +56 -11
  85. package/dist/store-memory.js.map +1 -1
  86. package/dist/{store-polling-4_y8lETm.js → store-polling-7WJV0YWP.js} +2 -2
  87. package/dist/{store-polling-4_y8lETm.js.map → store-polling-7WJV0YWP.js.map} +1 -1
  88. package/dist/store-postgres.d.ts +1 -1
  89. package/dist/store-postgres.d.ts.map +1 -1
  90. package/dist/store-postgres.js +106 -25
  91. package/dist/store-postgres.js.map +1 -1
  92. package/dist/{store-presence-polling-Q1C-k2dd.js → store-presence-polling-B1ixeqIS.js} +3 -3
  93. package/dist/{store-presence-polling-Q1C-k2dd.js.map → store-presence-polling-B1ixeqIS.js.map} +1 -1
  94. package/dist/store-redis-http.d.ts +1 -1
  95. package/dist/store-redis-http.js +3 -3
  96. package/dist/{store-redis-notify-tqWNnMRu.js → store-redis-notify-CM0AfLY0.js} +271 -101
  97. package/dist/store-redis-notify-CM0AfLY0.js.map +1 -0
  98. package/dist/store-redis.d.ts +1 -1
  99. package/dist/store-redis.js +1 -1
  100. package/dist/store-sqlite.d.ts +1 -1
  101. package/dist/store-sqlite.js +66 -21
  102. package/dist/store-sqlite.js.map +1 -1
  103. package/dist/{telemetry-cZH-cibj.d.ts → telemetry-Cyfqo6Qt.d.ts} +2 -2
  104. package/dist/telemetry-Cyfqo6Qt.d.ts.map +1 -0
  105. package/dist/{wire-DjfHOvdW.js → wire-BKxH1vbP.js} +2 -2
  106. package/dist/{wire-DjfHOvdW.js.map → wire-BKxH1vbP.js.map} +1 -1
  107. package/docs/01-quickstart.mdx +49 -83
  108. package/docs/{guides/07-examples.mdx → 02-examples.mdx} +10 -20
  109. package/docs/actors/01-introduction.mdx +48 -86
  110. package/docs/actors/02-concurrency.mdx +43 -70
  111. package/docs/actors/03-timers.mdx +28 -42
  112. package/docs/actors/04-routes.mdx +110 -150
  113. package/docs/actors/meta.ts +1 -1
  114. package/docs/agents/01-introduction.mdx +257 -0
  115. package/docs/agents/02-tools.mdx +247 -0
  116. package/docs/agents/03-conversations.mdx +538 -0
  117. package/docs/agents/04-harnesses.mdx +136 -0
  118. package/docs/agents/meta.ts +1 -0
  119. package/docs/client/01-react.mdx +294 -0
  120. package/docs/client/02-transports.mdx +86 -0
  121. package/docs/client/03-presence.mdx +224 -0
  122. package/docs/client/meta.ts +1 -0
  123. package/docs/contract/01-events.mdx +57 -0
  124. package/docs/contract/02-state.mdx +142 -0
  125. package/docs/contract/03-sessions.mdx +175 -0
  126. package/docs/index.mdx +109 -145
  127. package/docs/reference/01-core.mdx +139 -0
  128. package/docs/reference/02-server.mdx +860 -0
  129. package/docs/reference/03-client.mdx +301 -0
  130. package/docs/reference/04-ai.mdx +731 -0
  131. package/docs/reference/05-adapters.mdx +351 -0
  132. package/docs/reference/06-errors.mdx +138 -0
  133. package/docs/reference/meta.ts +1 -1
  134. package/docs/server/01-handlers.mdx +200 -0
  135. package/docs/server/02-timers.mdx +130 -0
  136. package/docs/server/03-cancellation.mdx +142 -0
  137. package/docs/server/04-routes.mdx +243 -0
  138. package/docs/server/05-production.mdx +323 -0
  139. package/docs/server/06-guarantees.mdx +132 -0
  140. package/examples/playground/DEPLOY.md +3 -5
  141. package/examples/playground/app/a0/[appId]/page.tsx +12 -13
  142. package/examples/playground/app/a0/app-list.tsx +9 -2
  143. package/examples/playground/app/a0/app-view.tsx +9 -1
  144. package/examples/playground/app/a0/apps/[appId]/route.ts +10 -5
  145. package/examples/playground/app/a0/apps.test.ts +12 -0
  146. package/examples/playground/app/a0/apps.ts +22 -7
  147. package/examples/playground/app/a0/chat.tsx +47 -1
  148. package/examples/playground/app/a0/devtools.tsx +2 -8
  149. package/examples/playground/app/a0/fx/events/route.ts +9 -0
  150. package/examples/playground/app/a0/fx/scheduler/route.ts +7 -0
  151. package/examples/playground/app/a0/fx/short/events/route.ts +11 -0
  152. package/examples/playground/app/a0/model.test.ts +18 -1
  153. package/examples/playground/app/a0/model.ts +47 -10
  154. package/examples/playground/app/a0/no-photon.cjs +4 -0
  155. package/examples/playground/app/a0/no-quickjs.cjs +3 -0
  156. package/examples/playground/app/a0/pi/events/route.ts +9 -0
  157. package/examples/playground/app/a0/pi/scheduler/route.ts +7 -0
  158. package/examples/playground/app/a0/pi/short/events/route.ts +11 -0
  159. package/examples/playground/app/a0/sandbox-log.ts +10 -4
  160. package/examples/playground/app/a0/sandbox-session.ts +152 -0
  161. package/examples/playground/app/a0/scheduler/route.ts +2 -2
  162. package/examples/playground/app/a0/server.ts +98 -54
  163. package/examples/playground/app/a0/session.ts +17 -5
  164. package/examples/playground/app/a0/shell.tsx +11 -3
  165. package/examples/playground/app/agent/ingress.test.ts +6 -3
  166. package/examples/playground/app/agent/server.ts +9 -6
  167. package/examples/playground/app/agent/telemetry.test.ts +71 -50
  168. package/examples/playground/app/canvas/[canvasId]/canvas-client.tsx +1 -1
  169. package/examples/playground/app/chat/server.test.ts +30 -26
  170. package/examples/playground/app/chat/server.ts +46 -46
  171. package/examples/playground/next.config.ts +17 -5
  172. package/examples/playground/package.json +4 -1
  173. package/examples/playground/vercel.json +18 -0
  174. package/package.json +27 -3
  175. package/src/ai-agent.ts +271 -90
  176. package/src/ai-fx.browser.ts +5 -0
  177. package/src/ai-fx.ts +912 -0
  178. package/src/ai-harness.ts +518 -0
  179. package/src/ai-model-metadata.ts +11 -6
  180. package/src/ai-pi.browser.ts +5 -0
  181. package/src/ai-pi.ts +1322 -0
  182. package/src/ai-sdk-step.ts +2 -2
  183. package/src/ai-server.ts +3 -1
  184. package/src/ai-tool-input.ts +45 -0
  185. package/src/internal.ts +13 -0
  186. package/src/libfx.d.ts +34 -0
  187. package/src/reducer.ts +1 -1
  188. package/src/scheduler-qstash.ts +5 -5
  189. package/src/scheduler-vercel.ts +14 -15
  190. package/src/server.ts +233 -29
  191. package/src/store-memory.ts +92 -16
  192. package/src/store-postgres.ts +156 -25
  193. package/src/store-redis-core.ts +322 -110
  194. package/src/store-redis-notify.ts +2 -0
  195. package/src/store-sqlite.ts +121 -28
  196. package/src/store.ts +55 -3
  197. package/src/telemetry.ts +1 -0
  198. package/dist/internal-CbVvEwad.js.map +0 -1
  199. package/dist/server-CGM8WzRG.d.ts.map +0 -1
  200. package/dist/server-Rj64fNvX.js.map +0 -1
  201. package/dist/session-clear-Dshpuhff.d.ts.map +0 -1
  202. package/dist/store-Gpkq7WBo.d.ts.map +0 -1
  203. package/dist/store-redis-notify-tqWNnMRu.js.map +0 -1
  204. package/dist/telemetry-cZH-cibj.d.ts.map +0 -1
  205. package/docs/concepts/01-contracts.mdx +0 -237
  206. package/docs/concepts/02-handlers.mdx +0 -284
  207. package/docs/concepts/03-durability.mdx +0 -314
  208. package/docs/concepts/04-state.mdx +0 -209
  209. package/docs/guides/01-timers.mdx +0 -193
  210. package/docs/guides/02-cancellation.mdx +0 -161
  211. package/docs/guides/03-react.mdx +0 -324
  212. package/docs/guides/04-local-first.mdx +0 -47
  213. package/docs/guides/05-production.mdx +0 -534
  214. package/docs/guides/06-ai-agents.mdx +0 -1408
  215. package/docs/guides/08-application-data.mdx +0 -113
  216. package/docs/guides/09-presence.mdx +0 -262
  217. package/docs/guides/10-transports.mdx +0 -221
  218. package/docs/reference/01-api.mdx +0 -2358
  219. package/docs/reference/02-errors.mdx +0 -150
  220. /package/docs/{concepts → contract}/meta.ts +0 -0
  221. /package/docs/{guides → server}/meta.ts +0 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,37 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.18.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 27f2d19: A handler that throws is held back before its retry: one second after the first failure, doubling up to 30 seconds. The store holds the failed event, so nothing retries it early, and the scheduler's next wake after the hold runs it. Before, a failed event was retried on every wake, every six to eight seconds whatever its failure count, and Vercel Queues also redelivered the failing message on a second 30-second chain. Custom `A2Store` implementations take a new `retryAfterMs` option on `failAttempt`: short of dead-lettering, keep the event unclaimable for that long by setting its claim expiry with no holder.
8
+ - 38e557b: An attempt that ends before it finishes, because its process timed out, crashed, or lost its claim, now counts toward the event's ten-attempt failure budget, the same as a handler that throws. The store counts it when the next claim takes the lapsed one over, and dead-letters the event in that same write once the count reaches ten, without running an eleventh attempt. A handler that never fits in its invocation dead-letters instead of retrying forever. A timeout costs every event it interrupts one attempt, so a session whose fan-out keeps outrunning its function can dead-letter work that was only waiting: bound the fan-out, or put work that contends for one resource in a lane. `lastError` keeps the last error a handler threw, or is null when every attempt lapsed. Custom `A2Store` implementations count the takeover of an expired claim whose holder is still recorded, and take a new `maxFailures` option on `claimAvailable` that dead-letters at the limit.
9
+ - 89c600a: Under `fx()`, a step no longer fails with "This operation was aborted" when the Gateway closes its response a moment after FX has read it. And a model stream that breaks while a step's progress is being written now fails that step, instead of leaving an unhandled rejection that ended the process.
10
+ - 7c5912f: Under `fx()`, a tool call's input goes through the tool's schema, as under `{ type: 'ai-sdk' }`. `execute` receives the schema's output, so defaults apply, and input the schema rejects goes back to the model as an error without running the tool. Before, `execute` received the model's raw JSON: an omitted field with a default arrived as `undefined`, and invalid input ran the tool. Responses recorded before this change replay unchanged.
11
+ - d28e1bf: Once a function's deadline passes, A2 claims nothing more in that invocation, so a timeout costs each in-flight event one attempt. Before, a drain past its deadline kept claiming the event it had just lost, with a 1ms window each time, until the platform ended the process: a single timeout could cost an event a dozen or more attempts, each one restarting its handler and writing to the store.
12
+ - 96c4968: Under `pi()`, a call to one of the agent's own tools goes through Pi's checks and then the tool's schema, as under `{ type: 'ai-sdk' }`. `execute` receives the schema's output of the arguments Pi accepts, so defaults apply and Pi's coercion carries through. Input either check rejects, and a call to a tool that does not exist, goes back to the model as an error without running the tool; so does input Pi rejects for its own tools, which no longer starts a tool execution. Before, `execute` received the model's raw arguments: an omitted field with a default arrived as `undefined`, a number sent as a string stayed a string, and a call Pi had rejected still ran while the model saw Pi's error. Pi's transcript keeps the model's own arguments, and responses recorded before this change replay unchanged.
13
+
14
+ ## 0.18.0
15
+
16
+ ### Minor Changes
17
+
18
+ - ba50c3e: `agent()` takes its loop as `harness`. The AI SDK's loop, one `streamText()` step per durable generation, is the default, `harness: { type: 'ai-sdk' }`, and its options move into it: `generation`, `generate`, `compaction`, and `messageMetadata` are no longer top-level `agent()` options, and passing one there throws a `TypeError`.
19
+
20
+ `model` is an AI Gateway model ID, or `ModelSettings` with one, under every harness: `agent()` no longer takes AI SDK provider model objects, and `HarnessModelSettings` is gone.
21
+
22
+ Run FX or Pi as the loop instead with `harness: fx()` from `experimental-a2/ai/fx` or `harness: pi({ sandbox })` from `experimental-a2/ai/pi`. Each model call the harness makes is one durable step, and each tool call an A2 tool call, so a crash resumes at the interrupted step without repeating finished model calls or tools.
23
+
24
+ A0 can run the AI SDK's, FX's, or Pi's loop: pick the harness in the composer before an app's first message.
25
+
26
+ - f3762ef: Add `toolRecovery` to `agent()`, which per tool answers a call that a crash, a timeout, Stop, or Pause now may have cut short with an error result instead of running it again.
27
+ - 2b409f0: Add `session.deadLetters()` and `session.redrive(index, { action })` to server sessions. List a session's dead-lettered events with their last error, then retry one with a fresh failure budget or skip it so its lane continues, in one atomic store operation that wakes the session like an append. Custom stores opt in with the optional `A2Store.deadLetters` and `A2Store.redrive` methods; every built-in store implements them. Redrives emit an `a2.redrive` span.
28
+
29
+ ### Patch Changes
30
+
31
+ - 0df2721: Docs: the introduction now walks through a shared contract, the server, and the client, then links to handlers, state, history, and AI.
32
+ - 3fc2253: Docs: the bundled `docs/` folder is reorganized into `contract/`, `server/`, `client/`, `agents/`, `actors/`, and `reference/`, and every page is shorter. The API reference is now one page per entry point group. Old paths such as `docs/guides/05-production.mdx` now live at their new homes, for example `docs/server/05-production.mdx`.
33
+ - 90ffa58: The package description and README now say what A2 does: it syncs your immutable event log, from server to browser.
34
+
3
35
  ## 0.17.0
4
36
 
5
37
  ### Minor Changes
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # experimental-a2
2
2
 
3
- Durable sync and reactions for things with a lifecycle. Each session has an
3
+ A2 syncs your immutable event log, from server to browser. Each session has an
4
4
  event log, derived state, handlers, timers, and a live client.
5
5
 
6
6
  ## Read the package
@@ -1,7 +1,7 @@
1
- import { s as Contract, t as Reducer, u as EventDefs, v as StandardSchemaV1 } from "./reducer-BYu6DT7h.js";
2
- import { t as A2Store } from "./store-Gpkq7WBo.js";
3
- import { f as ScheduleTiming, m as Session, n as A2Server, t as A2Scheduler } from "./server-CGM8WzRG.js";
4
- import { i as A2Telemetry } from "./telemetry-cZH-cibj.js";
1
+ import { s as Contract, t as Reducer, u as EventDefs, v as StandardSchemaV1 } from "./reducer-CqA59Q6U.js";
2
+ import { t as A2Store } from "./store-CyLUy86v.js";
3
+ import { h as Session, n as A2Server, p as ScheduleTiming, t as A2Scheduler } from "./server-DYAATFuT.js";
4
+ import { i as A2Telemetry } from "./telemetry-Cyfqo6Qt.js";
5
5
  //#region src/actor-shared.d.ts
6
6
  /**
7
7
  * A handler answered by throwing `NonRetriableError`: the event
@@ -317,4 +317,4 @@ type ActorDefinition<D extends ActorProtocol> = {
317
317
  declare function actor<D extends ActorProtocol>(options: ActorOptions<D>): ActorDefinition<D>;
318
318
  //#endregion
319
319
  export { ActorProtocol as _, ActorHandle as a, ActorScheduleSend as b, ActorOptions as c, concurrent as d, ActorConcurrentContext as f, ActorPresenceValues as g, ActorPresenceOf as h, ActorFetchOptions as i, ActorSendOptions as l, ActorPresenceMap as m, ActorCallResult as n, ActorHandler as o, ActorContext as p, ActorDefinition as r, ActorOperation as s, ActorCallOptions as t, actor as u, ActorRefusedError as v, ActorSend as x, ActorScheduleOptions as y };
320
- //# sourceMappingURL=actor-DBbe5xeE.d.ts.map
320
+ //# sourceMappingURL=actor-C7b-1arn.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"actor-DBbe5xeE.d.ts","names":[],"sources":["../src/actor-shared.ts","../src/actor.ts"],"mappings":";;;;;;;;;;;cAiCa,0BAA0B;;WAE5B;;WAEA;EACT,YAAY,eAAe,mBAAmB;;;;;;;;;KAepC;EACV;EACA;;;;;;;EAOA;;;KAIU,gBAAgB,UAAU,iBAAiB;EACrD,gBAAgB;IAEd;;KAIQ,oBAAoB,QAC7B,WAAW,cAAc,EAAE;;;;;;KAQlB,iBAAiB;GAExB,yBAAA,WAAW;IAAgB,OAAO,EAAE;IAAI;IAAc,IAAI;;;;;;;;;;;;KAanD,UAAU,iBACV,WAAW,eAAe,EAAE,MACjC,QAAQ,EAAE,eACV,OAAO,EAAE;;;;;;;;;KAWJ,uBAAuB;EAAmB;;;;;;;;;;;;KAY1C,kBAAkB,iBAClB,WAAW,eAAe,EAAE,MACjC,OAAO,EAAE,gBAAgB,SAAS,yBAAyB,iBAC3D,OAAO,EAAE,IAAI,SAAS,yBAAyB;;KAI1C,aAAa,UAAU;;EAEjC,OAAO;;EAEP;;EAEA;;EAEA,QAAQ;;EAER,MAAM,UAAU;;EAEhB,UAAU,kBAAkB;;;;;;;;KASlB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AkB,WAAW,cAAc,WAAW,GAAG;;WAEzD,aAAa,QAAQ,gBAAgB;;;;;;;;;;;WAWrC,QACP,SAAS,SACT,UAAU,kBAAkB,OACzB,QAAQ;;WAEJ,SAAS,QAAQ;;KAGhB,gBAAgB,UAAU;WAC3B;;;;;;WAMA,WAAW;;WAEX,UAAU,SAAS;;WAEnB,QAAQ,SAAS;;WAEjB,SAAS,QAAQ,qBAAqB,aAAa;EAC5D,MAAM,aAAa,YAAY;;;;;;;iBAsDjB,MAAM,UAAU,eAC9B,SAAS,aAAa,KACrB,gBAAgB"}
@@ -1,4 +1,4 @@
1
- import { n as ActorCallResult, v as ActorRefusedError } from "./actor-DBbe5xeE.js";
1
+ import { n as ActorCallResult, v as ActorRefusedError } from "./actor-C7b-1arn.js";
2
2
  //#region src/actor-client.d.ts
3
3
  declare class ActorRequestError extends Error {
4
4
  readonly status: number | undefined;
@@ -1,7 +1,7 @@
1
- import { c as ContractEvent, u as EventDefs } from "./reducer-BYu6DT7h.js";
2
- import { g as ActorPresenceValues, m as ActorPresenceMap } from "./actor-DBbe5xeE.js";
1
+ import { c as ContractEvent, u as EventDefs } from "./reducer-CqA59Q6U.js";
2
+ import { g as ActorPresenceValues, m as ActorPresenceMap } from "./actor-C7b-1arn.js";
3
3
  import { ActorClientCall, ActorStateOf, AnyActorDefinition } from "./actor-client.js";
4
- import { a as Connection } from "./client-qRnRUzBS.js";
4
+ import { a as Connection } from "./client-h_DKFAjj.js";
5
5
  //#region src/actor-react.d.ts
6
6
  /** The server-to-client handoff: `await def.actor(id).state()`. */
7
7
  type ActorSnapshot<S> = {
@@ -2,7 +2,7 @@
2
2
  import { n as isSessionCleared } from "./session-clear-DGI4jTQ5.js";
3
3
  import { r as foldsClearMarkers } from "./reducer-BAXc8JyF.js";
4
4
  import { n as internalContract } from "./contract-BYKASlCV.js";
5
- import { t as createClient } from "./client-COaiaDub.js";
5
+ import { t as createClient } from "./client-BhHLoNKF.js";
6
6
  import { useSession } from "./react.js";
7
7
  import { l as openPresenceDefs } from "./actor-shared-t7w8xIKP.js";
8
8
  import { createActorClient } from "./actor-client.js";
package/dist/actor.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- import { _ as ActorProtocol, a as ActorHandle, b as ActorScheduleSend, c as ActorOptions, d as concurrent, f as ActorConcurrentContext, g as ActorPresenceValues, h as ActorPresenceOf, i as ActorFetchOptions, l as ActorSendOptions, m as ActorPresenceMap, n as ActorCallResult, o as ActorHandler, p as ActorContext, r as ActorDefinition, s as ActorOperation, t as ActorCallOptions, u as actor, v as ActorRefusedError, x as ActorSend, y as ActorScheduleOptions } from "./actor-DBbe5xeE.js";
1
+ import { _ as ActorProtocol, a as ActorHandle, b as ActorScheduleSend, c as ActorOptions, d as concurrent, f as ActorConcurrentContext, g as ActorPresenceValues, h as ActorPresenceOf, i as ActorFetchOptions, l as ActorSendOptions, m as ActorPresenceMap, n as ActorCallResult, o as ActorHandler, p as ActorContext, r as ActorDefinition, s as ActorOperation, t as ActorCallOptions, u as actor, v as ActorRefusedError, x as ActorSend, y as ActorScheduleOptions } from "./actor-C7b-1arn.js";
2
2
  export { ActorCallOptions, ActorCallResult, type ActorConcurrentContext, type ActorContext, ActorDefinition, ActorFetchOptions, ActorHandle, ActorHandler, ActorOperation, ActorOptions, type ActorPresenceMap, type ActorPresenceOf, type ActorPresenceValues, type ActorProtocol, ActorRefusedError, type ActorScheduleOptions, type ActorScheduleSend, type ActorSend, ActorSendOptions, actor, concurrent };
package/dist/actor.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { a as NonRetriableError, i as A2Error, n as isSessionCleared, r as sessionClearedError } from "./session-clear-DGI4jTQ5.js";
2
2
  import { n as internalContract } from "./contract-BYKASlCV.js";
3
- import { _ as serverInternals } from "./internal-CbVvEwad.js";
4
- import { c as parsePresenceSibling, o as setServerFetchHooks, s as sseResponse, t as createServer } from "./server-Rj64fNvX.js";
3
+ import { v as serverInternals } from "./internal-CscSY7K_.js";
4
+ import { c as parsePresenceSibling, o as setServerFetchHooks, s as sseResponse, t as createServer } from "./server-D-Y4pqwu.js";
5
5
  import { a as actorFailedSchema, c as isJsonTree, i as ActorRefusedError, l as openPresenceDefs, n as ACTOR_LANE, o as actorReducer, r as ACTOR_STATE_EVENT, s as actorStateSchema, t as ACTOR_FAILED_EVENT } from "./actor-shared-t7w8xIKP.js";
6
6
  //#region src/actor.ts
7
7
  /**
@@ -1,5 +1,5 @@
1
- import { c as ContractEvent, s as Contract, t as Reducer, u as EventDefs, v as StandardSchemaV1 } from "./reducer-BYu6DT7h.js";
2
- import { s as HandlerContext } from "./server-CGM8WzRG.js";
1
+ import { c as ContractEvent, s as Contract, t as Reducer, u as EventDefs, v as StandardSchemaV1 } from "./reducer-CqA59Q6U.js";
2
+ import { c as HandlerContext } from "./server-DYAATFuT.js";
3
3
  import { FinishReason, JSONValue as JSONValue$1, LanguageModelCallOptions, LanguageModelUsage, UIMessage, UIMessage as UIMessage$1, UIMessageChunk, UIMessageChunk as UIMessageChunk$1 } from "ai";
4
4
  //#region src/ai-message-base.d.ts
5
5
  type FieldUndo = {
@@ -650,4 +650,4 @@ declare const AI_STATE_REDUCER = "a2.ai.state.v26";
650
650
  declare function agentContract<M extends UIMessage$1 = UIMessage$1, E extends EventDefs = Record<never, never>, X extends object = Record<never, never>>(options: AgentContractOptions<M, E, X>): AgentContract<M, AIEventDefs<M> & E, X>;
651
651
  //#endregion
652
652
  export { agentContract as $, InputRespondedPayload as A, PendingApproval as B, GenerationFailedPayload as C, GenerationStartedPayload as D, GenerationRequestedPayload as E, MessageInterruptedPayload as F, SessionClosedPayload as G, ReasoningLevel as H, ModelLimits as I, ToolCalledPayload as J, SessionCreatedPayload as K, ModelMetadataRequestedPayload as L, LanguageModelUsage as M, MessageCompletedPayload as N, GenerationUsage as O, MessageCreatedPayload as P, UIMessageChunk$1 as Q, ModelMetadataResolvedPayload as R, GenerationCompletedPayload as S, GenerationReason as T, RetryGenerationOptions as U, PendingInput as V, RetryRequestedPayload as W, TranscriptMessage as X, ToolResultPayload as Y, UIMessage$1 as Z, CompactionPart as _, AI_STATE_REDUCER as a, reasoningLevels as at, CompactionState as b, AgentContract as c, PendingQueueCommand as ct, AgentStatus as d, ControlReceipt as dt, createEvents as et, AgentToolContext as f, InboxItem as ft, CompactionCompletedPayload as g, ApprovalRespondedPayload as h, AIState as i, inputs as it, JSONValue$1 as j, InputRequestedPayload as k, AgentContractOptions as l, ActiveTurn as lt, ApprovalRequestedPayload as m, AIInputs as n, events as nt, ActiveGeneration as o, reduceAIState as ot, AgentToolEventDefs as p, ToolActivity as q, AIMessageOf as r, handlerContext as rt, ActiveGenerationProjection as s, isCompactionPart as st, AIEventDefs as t, deriveUIMessages as tt, AgentReducer as u, ControlCommand as ut, CompactionPartData as v, GenerationProgressPayload as w, FinishReason as x, CompactionRequestedPayload as y, ModelMetadataState as z };
653
- //# sourceMappingURL=ai-vpGtcaCB.d.ts.map
653
+ //# sourceMappingURL=ai-BMLlI2Ff.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ai-vpGtcaCB.d.ts","names":[],"sources":["../src/ai-message-base.ts","../src/ai-control.ts","../src/ai-client-state.ts","../src/ai-projector.ts","../src/ai-progress-batches.ts","../src/ai-message-projection.ts","../src/ai.ts"],"mappings":";;;;KAGK;EAAc;;EAAsB;;EAAmB;;KACvD,aAAa,eAAe;KAC5B;EAAa,OAAO;;EAAiC,QAAQ;;KAEtD;EACV;EACA,SAAS;EACT,QAAQ,eAAe;;;;KCIb,UAAU,UAAU,YAAY;EAC1C;EACA,SAAS;EACT;EACA;;KAGU,eAAe,UAAU,YAAY;EAC3C;EAAgB,SAAS;EAAG;;EAC5B;EAAgB,SAAS;;EACzB;EAAgB;EAAiB;;EACjC;EAAkB;;EAElB;EACA;EACA;EACA;;EAEA;EAAgB;EAAgB;;EAChC;EAAiB;EAAgB,SAAS;EAAG;;EAC7C;EAAiB;;EACjB;;EACA;EAAuB,QAAQ;;EAC/B;EAAoB,UAAU;;EAC9B;EA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,SAAS,4BACR,aAAa;EAChB,WACE,QAAQ,oBACP,aAAa;;;cAsBL,QAAQ;;;;;;;;;iBAgEL,eAAe,UAAU,qBAAqB,aAC5D,WAAW,SAAS,KACnB,iBAAiB;;cAoBP;;;;;;;iBAQG,cACd,UAAU,cAAY,aACtB,UAAU,YAAY,sBACtB,mBAAmB,sBAEnB,SAAS,qBAAqB,GAAG,GAAG,KACnC,cAAc,GAAG,YAAY,KAAK,GAAG"}
1
+ {"version":3,"file":"ai-BMLlI2Ff.d.ts","names":[],"sources":["../src/ai-message-base.ts","../src/ai-control.ts","../src/ai-client-state.ts","../src/ai-projector.ts","../src/ai-progress-batches.ts","../src/ai-message-projection.ts","../src/ai.ts"],"mappings":";;;;KAGK;EAAc;;EAAsB;;EAAmB;;KACvD,aAAa,eAAe;KAC5B;EAAa,OAAO;;EAAiC,QAAQ;;KAEtD;EACV;EACA,SAAS;EACT,QAAQ,eAAe;;;;KCIb,UAAU,UAAU,YAAY;EAC1C;EACA,SAAS;EACT;EACA;;KAGU,eAAe,UAAU,YAAY;EAC3C;EAAgB,SAAS;EAAG;;EAC5B;EAAgB,SAAS;;EACzB;EAAgB;EAAiB;;EACjC;EAAkB;;EAElB;EACA;EACA;EACA;;EAEA;EAAgB;EAAgB;;EAChC;EAAiB;EAAgB,SAAS;EAAG;;EAC7C;EAAiB;;EACjB;;EACA;EAAuB,QAAQ;;EAC/B;EAAoB,UAAU;;EAC9B;EAAiB,UAAU;;EAC3B;EAAyB,SAAS;;EAClC;EAAiB,SAAS;;EAC1B;EAAqB,SAAS;;KAExB;EACV;EACA;EACA;EACA;;KAUU,WAAW,UAAU,YAAY;EAC3C;EACA,OAAO,UAAU;EACjB;;KA+BU;EAAa;EAAc;EAAY;;KACvC;EACV;EACA;EACA;EACA;EACA;EACA;EACA,QAAQ;;KAGE;EACV;EACA;EACA,MAAM;EACN,YAAY;;KAYF;EACV;EACA;EACA;EACA;IAAW;IAAe;IAAqB;;EAC/C;IAAS;IAAc;;;KAGb;EACV,SAAS;EACT;IACE;IACA;IACA,OAAO;IACP;IACA;IACA;IACA,eAAe;IACf;IACA;;;;;KCjIQ,aAAa,UAAU,aAAa,QAC9C,eAAe;EAEb;;KAYQ,oBAAoB,UAAU;EACxC;EACA,SAAS,aAAa;;;;KCfnB;EACH;EACA;EACA;EACA;EACA;EACA;EACA;;KAwJU;EACV,MAAM;EACN,WAAW;EACX,OAAO,eAAe;;;;KChJZ;EAAkB;EAAe,QAAQ;;KAChD,aAAa;EAAoB,MAAM;EAAY,OAAO;;KAEnD;EACV;EACA,MAAM;EACN,QAAQ,MAAM;;;;cCmgBH,mBAAoB;EAC/B;MACE,QAAQ;;;KCtcA;KAGA;KAEA,iBAAiB,YAAY;cAE5B,0BAA0B;KAU3B;EACV;EACA;EACA;EACA;EACA,QAAQ;;;KAIE;EACV;EACA;EACA,MAAM;;;;;;KASI,kBAAkB,UAAU,eAAa,KAAK;EACxD,OAAO,MAAM,qBAAqB;;KAGxB;EAA0B,WAAW;;KACrC;EAAyB;;KACzB,sBAAsB,UAAU;EAC1C,SAAS;;EAET;;KAEU;EAA4B;;KACnC;EACH;EACA;;EAEA;;KAEU,4BAA4B;EAEhC;EAAsB;;EACtB;EAAmB;;KAEf;EACV;IAAY;IAAgB;;EAC5B;EACA,QAAQ;EACR;EACA;;KAEU;EACV;EACA;EACA;;KAEU,wBAAwB;KACxB;EACV;EACA;EACA;EACA;EACA;;EAEA;EACA;;KAEU;;EAEV;EACA,QAAQ;;KAEE;EACV;EACA;EACA;EACA;EACA,eAAe;EACf,QAAQ;EACR;;KAEU;EACV;EACA;EACA;EACA;EACA;;EAEA;EACA;;KAEU;EACV;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;KAEU;EACV;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;KAEU;EACV;EACA;EACA;EACA;EACA;EACA;EACA;;KAEU;EACV;EACA;EACA;EAC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./reduce
2
2
  import { t as contract } from "./contract-BYKASlCV.js";
3
3
  import { t as idempotentId } from "./idempotent-id-BRJVeylj.js";
4
4
  import { i as withReducerRuntime } from "./reducer-runtime-DQwz_J59.js";
5
- import { u as ambientToolScopeStorage } from "./internal-CbVvEwad.js";
5
+ import { u as ambientToolScopeStorage } from "./internal-CscSY7K_.js";
6
6
  //#region src/equal-json.ts
7
7
  const sameValue = (left, right) => {
8
8
  if (Object.is(left, right)) return true;
@@ -2853,4 +2853,4 @@ function agentContract(options) {
2853
2853
  //#endregion
2854
2854
  export { interruptUIMessage as A, reduceToolActivity as C, flattenProgressBatches as D, upsertResponse as E, assertMessageBase as M, restoreMessageBase as N, progressBatches as O, projectedMessage as S, upsertMessage as T, applyControlChanges as _, events as a, findMessage as b, reasoningLevels as c, appSlice as d, isAgentContract as f, initialControlState as g, aiEventId as h, deriveUIMessages as i, pauseUIMessage as j, progressOwnedBy as k, reduceAIState as l, AI_EVENT_ID_PREFIX as m, agentContract as n, handlerContext as o, withAIStorage as p, createEvents as r, inputs as s, AI_STATE_REDUCER as t, appReducerOf as u, controlCommit as v, retainMessageBase as w, isCompactionPart as x, advanceProjection as y };
2855
2855
 
2856
- //# sourceMappingURL=ai-UrWfKeuv.js.map
2856
+ //# sourceMappingURL=ai-D6mGlO8j.js.map