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
@@ -26,32 +26,36 @@ vi.mock('experimental-a2/ai/server', async (importActual) => {
26
26
  agent: (options: Parameters<typeof actual.agent>[0]) =>
27
27
  actual.agent({
28
28
  ...options,
29
- generate: ({
30
- event,
31
- messages,
32
- }: {
33
- event: { payload: { reason: string } }
34
- messages: { role: string; id: string }[]
35
- }) => {
36
- prompts.push(
37
- messages.map((message) => `${message.role}:${message.id}`).join(),
38
- )
39
- return step(
40
- event.payload.reason === 'message'
41
- ? [
42
- { type: 'start' },
43
- ...['Hello', 'there'].map(
44
- (message, call): UIMessageChunk => ({
45
- type: 'tool-input-available',
46
- toolCallId: `call-${call}`,
47
- toolName: 'post',
48
- input: { message },
49
- }),
50
- ),
51
- { type: 'finish', finishReason: 'tool-calls' },
52
- ]
53
- : [{ type: 'start' }, { type: 'finish', finishReason: 'stop' }],
54
- )
29
+ harness: {
30
+ ...(options.harness?.type === 'ai-sdk' ? options.harness : {}),
31
+ type: 'ai-sdk',
32
+ generate: ({
33
+ event,
34
+ messages,
35
+ }: {
36
+ event: { payload: { reason: string } }
37
+ messages: { role: string; id: string }[]
38
+ }) => {
39
+ prompts.push(
40
+ messages.map((message) => `${message.role}:${message.id}`).join(),
41
+ )
42
+ return step(
43
+ event.payload.reason === 'message'
44
+ ? [
45
+ { type: 'start' },
46
+ ...['Hello', 'there'].map(
47
+ (message, call): UIMessageChunk => ({
48
+ type: 'tool-input-available',
49
+ toolCallId: `call-${call}`,
50
+ toolName: 'post',
51
+ input: { message },
52
+ }),
53
+ ),
54
+ { type: 'finish', finishReason: 'tool-calls' },
55
+ ]
56
+ : [{ type: 'start' }, { type: 'finish', finishReason: 'stop' }],
57
+ )
58
+ },
55
59
  },
56
60
  } as never),
57
61
  }
@@ -61,57 +61,57 @@ Sound like a sharp, relaxed person in the chat, not a customer-support bot. Matc
61
61
  Only contribute when you have something useful, relevant, or friendly to add. It is fine to stay silent or stop whenever you have nothing else to say.
62
62
  To speak, call post once for each visible chat bubble. Never communicate through ordinary assistant text because it is private and is not shown in the room.
63
63
  Use as many post calls as the moment naturally calls for. Several short messages are welcome when they create better rhythm, separate distinct thoughts, or fulfill a request for a sequence. A single message is fine too. Do not spam. After post results, continue only when another message genuinely improves the conversation.`,
64
- generation: {
65
- maxOutputTokens: 500,
66
- temperature: 0.4,
64
+ harness: {
65
+ type: 'ai-sdk',
66
+ generation: {
67
+ maxOutputTokens: 500,
68
+ temperature: 0.4,
69
+ },
70
+ messageMetadata: (context) => {
71
+ const previous = context.messages.find(
72
+ (message) => message.id === context.event.payload.responseMessageId,
73
+ )?.metadata
74
+ const trigger = context.messages.find(
75
+ (message) => message.id === context.event.payload.messageId,
76
+ )?.metadata
77
+ const steps = previous?.kind === 'agent' ? previous.steps : []
78
+ const mode: ChatAgentMode | undefined =
79
+ previous?.kind === 'agent'
80
+ ? previous.mode
81
+ : trigger?.kind === 'participant' && trigger.mode !== 'passive'
82
+ ? trigger.mode
83
+ : undefined
84
+ if (mode === undefined) return undefined
85
+ const metadata = {
86
+ kind: 'agent' as const,
87
+ author: 'agent' as const,
88
+ mode,
89
+ steps,
90
+ }
91
+ if (context.part.type === 'start') return metadata
92
+ if (context.part.type !== 'finish') return undefined
93
+ return {
94
+ ...metadata,
95
+ steps: [
96
+ ...steps,
97
+ {
98
+ generationId: context.generationId,
99
+ model: context.model,
100
+ finishReason: context.part.finishReason,
101
+ ...(context.part.rawFinishReason === undefined
102
+ ? {}
103
+ : { rawFinishReason: context.part.rawFinishReason }),
104
+ usage: context.part.totalUsage,
105
+ completedAt: new Date().toISOString(),
106
+ },
107
+ ],
108
+ }
109
+ },
67
110
  },
68
111
  progress: {
69
112
  maxChunks: 4,
70
113
  maxDelayMs: 30,
71
114
  },
72
- messageMetadata: (context) => {
73
- const previous = context.messages.find(
74
- (message) => message.id === context.event.payload.responseMessageId,
75
- )?.metadata
76
- const trigger = context.messages.find(
77
- (message) => message.id === context.event.payload.messageId,
78
- )?.metadata
79
- const steps = previous?.kind === 'agent' ? previous.steps : []
80
- const mode: ChatAgentMode | undefined =
81
- previous?.kind === 'agent'
82
- ? previous.mode
83
- : trigger?.kind === 'participant' && trigger.mode !== 'passive'
84
- ? trigger.mode
85
- : undefined
86
- if (mode === undefined) return undefined
87
- const metadata = {
88
- kind: 'agent' as const,
89
- author: 'agent' as const,
90
- mode,
91
- steps,
92
- }
93
- if (context.part.type === 'start') return metadata
94
- if (context.part.type !== 'finish') return undefined
95
- return {
96
- ...metadata,
97
- steps: [
98
- ...steps,
99
- {
100
- generationId: context.generationId,
101
- model:
102
- typeof context.model === 'string'
103
- ? context.model
104
- : context.model.modelId,
105
- finishReason: context.part.finishReason,
106
- ...(context.part.rawFinishReason === undefined
107
- ? {}
108
- : { rawFinishReason: context.part.rawFinishReason }),
109
- usage: context.part.totalUsage,
110
- completedAt: new Date().toISOString(),
111
- },
112
- ],
113
- }
114
- },
115
115
  })
116
116
 
117
117
  /** The room. Each message goes on to the agent's session, marked for whether it should answer. */
@@ -1,10 +1,22 @@
1
- // No workarounds needed: experimental-a2/server is a separate server-only entry
2
- // point, so client bundles never reach a store backend; the sqlite dev
3
- // default carries its own turbopackIgnore annotation in a2's dist, so
4
- // output tracing stays scoped without externalizing anything; and
1
+ // experimental-a2/server is a separate server-only entry point, so client
2
+ // bundles never reach a store backend; the sqlite dev default carries its own
3
+ // turbopackIgnore annotation in a2's dist, so output tracing stays scoped; and
5
4
  // Next 16 transpiles this file with the TS7 (tsgo) compiler.
6
5
  import type { NextConfig } from 'next'
7
6
 
8
- const nextConfig: NextConfig = {}
7
+ const nextConfig: NextConfig = {
8
+ // libfx loads a native binary for the platform, falling back to its
9
+ // WebAssembly, by paths the bundler cannot follow; Node loads both from
10
+ // node_modules at runtime.
11
+ serverExternalPackages: ['libfx'],
12
+ turbopack: {
13
+ // WebAssembly Pi's code reaches that the bundler cannot trace.
14
+ resolveAlias: {
15
+ '@silvia-odwyer/photon-node': './app/a0/no-photon.cjs',
16
+ 'quickjs-wasi': './app/a0/no-quickjs.cjs',
17
+ 'quickjs-wasi/quickjs.wasm': './app/a0/no-quickjs.cjs',
18
+ },
19
+ },
20
+ }
9
21
 
10
22
  export default nextConfig
@@ -19,6 +19,8 @@
19
19
  "@ai-sdk/otel": "1.0.58",
20
20
  "@codemirror/state": "^6.7.1",
21
21
  "@codemirror/view": "^6.43.8",
22
+ "@earendil-works/pi-ai": "1.0.3",
23
+ "@earendil-works/pi-coding-agent": "1.0.2",
22
24
  "@opentelemetry/api": "^1.9.0",
23
25
  "@vercel/functions": "^3.9.3",
24
26
  "@vercel/otel": "^2.1.0",
@@ -26,9 +28,10 @@
26
28
  "@vercel/sandbox": "^3.0.0",
27
29
  "ai": "^7.0.58",
28
30
  "codemirror": "^6.0.2",
29
- "experimental-a2": "0.17.0",
31
+ "experimental-a2": "0.18.1",
30
32
  "geist": "^1.7.2",
31
33
  "ioredis": "^5.9.0",
34
+ "libfx": "0.0.12",
32
35
  "lucide-react": "^1.34.0",
33
36
  "next": "^16.3.0",
34
37
  "pg": "^8.16.0",
@@ -45,6 +45,24 @@
45
45
  }
46
46
  ]
47
47
  },
48
+ "app/a0/fx/scheduler/route.ts": {
49
+ "experimentalTriggers": [
50
+ {
51
+ "type": "queue/v2beta",
52
+ "topic": "a2-a0-fx",
53
+ "retryAfterSeconds": 30
54
+ }
55
+ ]
56
+ },
57
+ "app/a0/pi/scheduler/route.ts": {
58
+ "experimentalTriggers": [
59
+ {
60
+ "type": "queue/v2beta",
61
+ "topic": "a2-a0-pi",
62
+ "retryAfterSeconds": 30
63
+ }
64
+ ]
65
+ },
48
66
  "app/a0/sandboxes/scheduler/route.ts": {
49
67
  "experimentalTriggers": [
50
68
  {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "experimental-a2",
3
- "version": "0.17.0",
4
- "description": "Durable sync and reactions for things with a lifecycle: one event log, derived state, and live client per session.",
3
+ "version": "0.18.1",
4
+ "description": "Syncs your immutable event log, from server to browser: one contract, handlers, derived state, and a live client per session.",
5
5
  "license": "MIT",
6
6
  "type": "module",
7
7
  "sideEffects": false,
@@ -39,6 +39,14 @@
39
39
  "browser": "./dist/ai-server.browser.js",
40
40
  "default": "./dist/ai-server.js"
41
41
  },
42
+ "./ai/fx": {
43
+ "browser": "./dist/ai-fx.browser.js",
44
+ "default": "./dist/ai-fx.js"
45
+ },
46
+ "./ai/pi": {
47
+ "browser": "./dist/ai-pi.browser.js",
48
+ "default": "./dist/ai-pi.js"
49
+ },
42
50
  "./ai/client": "./dist/ai-client.js",
43
51
  "./ai/react": "./dist/ai-react.js",
44
52
  "./actor": {
@@ -61,9 +69,12 @@
61
69
  "peerDependencies": {
62
70
  "@opentelemetry/api": "^1.9.0",
63
71
  "@upstash/qstash": "^2.11.0",
72
+ "@earendil-works/pi-ai": "^1.0.2",
73
+ "@earendil-works/pi-coding-agent": "^1.0.2",
64
74
  "@vercel/queue": "*",
65
75
  "ai": "^7.0.0",
66
76
  "ioredis": "^5.4.0",
77
+ "libfx": "^0.0.12",
67
78
  "pg": "^8.11.0",
68
79
  "react": "^19.0.0"
69
80
  },
@@ -80,9 +91,18 @@
80
91
  "ai": {
81
92
  "optional": true
82
93
  },
94
+ "@earendil-works/pi-ai": {
95
+ "optional": true
96
+ },
97
+ "@earendil-works/pi-coding-agent": {
98
+ "optional": true
99
+ },
83
100
  "ioredis": {
84
101
  "optional": true
85
102
  },
103
+ "libfx": {
104
+ "optional": true
105
+ },
86
106
  "pg": {
87
107
  "optional": true
88
108
  },
@@ -115,7 +135,11 @@
115
135
  "tsdown": "^0.22.14",
116
136
  "typescript": "^7.0.2",
117
137
  "vitest": "^4.1.10",
118
- "zod": "^4.4.3"
138
+ "zod": "^4.4.3",
139
+ "libfx": "0.0.12",
140
+ "@earendil-works/pi-ai": "1.0.3",
141
+ "@earendil-works/pi-coding-agent": "1.0.2",
142
+ "@vercel/sandbox": "^3.0.0"
119
143
  },
120
144
  "scripts": {
121
145
  "build": "tsdown",