experimental-a2 0.17.0 → 0.18.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.
- package/CHANGELOG.md +21 -0
- package/README.md +1 -1
- package/dist/{actor-DBbe5xeE.d.ts → actor-Bjce9_5U.d.ts} +5 -5
- package/dist/{actor-DBbe5xeE.d.ts.map → actor-Bjce9_5U.d.ts.map} +1 -1
- package/dist/actor-client.d.ts +1 -1
- package/dist/actor-react.d.ts +3 -3
- package/dist/actor-react.js +1 -1
- package/dist/actor.d.ts +1 -1
- package/dist/actor.js +2 -2
- package/dist/{ai-UrWfKeuv.js → ai-BpOGm-zB.js} +2 -2
- package/dist/{ai-UrWfKeuv.js.map → ai-BpOGm-zB.js.map} +1 -1
- package/dist/{ai-vpGtcaCB.d.ts → ai-DrUaMyRt.d.ts} +3 -3
- package/dist/{ai-vpGtcaCB.d.ts.map → ai-DrUaMyRt.d.ts.map} +1 -1
- package/dist/ai-client.d.ts +2 -2
- package/dist/ai-client.js +2 -2
- package/dist/ai-fx.browser.d.ts +1 -0
- package/dist/ai-fx.browser.js +6 -0
- package/dist/ai-fx.browser.js.map +1 -0
- package/dist/ai-fx.d.ts +10 -0
- package/dist/ai-fx.d.ts.map +1 -0
- package/dist/ai-fx.js +634 -0
- package/dist/ai-fx.js.map +1 -0
- package/dist/ai-harness-BuLh_EYi.js +273 -0
- package/dist/ai-harness-BuLh_EYi.js.map +1 -0
- package/dist/ai-harness-DvsPeJeB.d.ts +26 -0
- package/dist/ai-harness-DvsPeJeB.d.ts.map +1 -0
- package/dist/ai-pi.browser.d.ts +1 -0
- package/dist/ai-pi.browser.js +6 -0
- package/dist/ai-pi.browser.js.map +1 -0
- package/dist/ai-pi.d.ts +17 -0
- package/dist/ai-pi.d.ts.map +1 -0
- package/dist/ai-pi.js +904 -0
- package/dist/ai-pi.js.map +1 -0
- package/dist/ai-react.d.ts +5 -5
- package/dist/ai-react.js +2 -2
- package/dist/ai-server.d.ts +47 -25
- package/dist/ai-server.d.ts.map +1 -1
- package/dist/ai-server.js +106 -37
- package/dist/ai-server.js.map +1 -1
- package/dist/ai.d.ts +1 -1
- package/dist/ai.js +1 -1
- package/dist/bounded-cache-CPHWF-8h.js +41 -0
- package/dist/bounded-cache-CPHWF-8h.js.map +1 -0
- package/dist/{client-COaiaDub.js → client-BReKqwZC.js} +3 -3
- package/dist/{client-COaiaDub.js.map → client-BReKqwZC.js.map} +1 -1
- package/dist/{client-qRnRUzBS.d.ts → client-h_DKFAjj.d.ts} +3 -3
- package/dist/{client-qRnRUzBS.d.ts.map → client-h_DKFAjj.d.ts.map} +1 -1
- package/dist/client.d.ts +3 -3
- package/dist/client.js +1 -1
- package/dist/index.d.ts +5 -5
- package/dist/{initial-snapshot-BrLso5x_.d.ts → initial-snapshot-Bx-c0pDP.d.ts} +2 -2
- package/dist/{initial-snapshot-BrLso5x_.d.ts.map → initial-snapshot-Bx-c0pDP.d.ts.map} +1 -1
- package/dist/{internal-CbVvEwad.js → internal-B2T3U4Rq.js} +8 -2
- package/dist/internal-B2T3U4Rq.js.map +1 -0
- package/dist/otel.d.ts +1 -1
- package/dist/{react-BbJ-g6Uu.d.ts → react-BBXgHWFc.d.ts} +4 -4
- package/dist/{react-BbJ-g6Uu.d.ts.map → react-BBXgHWFc.d.ts.map} +1 -1
- package/dist/react.d.ts +1 -1
- package/dist/react.js +1 -1
- package/dist/reducer-BAXc8JyF.js.map +1 -1
- package/dist/{reducer-BYu6DT7h.d.ts → reducer-CqA59Q6U.d.ts} +2 -2
- package/dist/{reducer-BYu6DT7h.d.ts.map → reducer-CqA59Q6U.d.ts.map} +1 -1
- package/dist/scheduler-qstash.d.ts +2 -2
- package/dist/scheduler-qstash.js +2 -2
- package/dist/scheduler-vercel.d.ts +2 -2
- package/dist/scheduler-vercel.js +2 -2
- package/dist/{server-Rj64fNvX.js → server-Dw_k_7kO.js} +93 -60
- package/dist/server-Dw_k_7kO.js.map +1 -0
- package/dist/{server-CGM8WzRG.d.ts → server-En7cbi3v.d.ts} +36 -7
- package/dist/server-En7cbi3v.d.ts.map +1 -0
- package/dist/server.d.ts +4 -4
- package/dist/server.js +1 -1
- package/dist/{session-clear-Dshpuhff.d.ts → session-clear-Bo-XTFEy.d.ts} +2 -2
- package/dist/session-clear-Bo-XTFEy.d.ts.map +1 -0
- package/dist/{store-Gpkq7WBo.d.ts → store-Djdv0bnZ.d.ts} +31 -2
- package/dist/store-Djdv0bnZ.d.ts.map +1 -0
- package/dist/store-N8PXxDAS.js.map +1 -1
- package/dist/store-memory.d.ts +1 -1
- package/dist/store-memory.js +32 -6
- package/dist/store-memory.js.map +1 -1
- package/dist/{store-polling-4_y8lETm.js → store-polling-B5FcwJfo.js} +2 -2
- package/dist/{store-polling-4_y8lETm.js.map → store-polling-B5FcwJfo.js.map} +1 -1
- package/dist/store-postgres.d.ts +1 -1
- package/dist/store-postgres.js +54 -3
- package/dist/store-postgres.js.map +1 -1
- package/dist/{store-presence-polling-Q1C-k2dd.js → store-presence-polling-BAwS8RWn.js} +3 -3
- package/dist/{store-presence-polling-Q1C-k2dd.js.map → store-presence-polling-BAwS8RWn.js.map} +1 -1
- package/dist/store-redis-http.d.ts +1 -1
- package/dist/store-redis-http.js +3 -3
- package/dist/{store-redis-notify-tqWNnMRu.js → store-redis-notify-BRITti_o.js} +187 -68
- package/dist/store-redis-notify-BRITti_o.js.map +1 -0
- package/dist/store-redis.d.ts +1 -1
- package/dist/store-redis.js +1 -1
- package/dist/store-sqlite.d.ts +1 -1
- package/dist/store-sqlite.js +32 -2
- package/dist/store-sqlite.js.map +1 -1
- package/dist/{telemetry-cZH-cibj.d.ts → telemetry-Cyfqo6Qt.d.ts} +2 -2
- package/dist/telemetry-Cyfqo6Qt.d.ts.map +1 -0
- package/dist/{wire-DjfHOvdW.js → wire-rSUglYo8.js} +2 -2
- package/dist/{wire-DjfHOvdW.js.map → wire-rSUglYo8.js.map} +1 -1
- package/docs/01-quickstart.mdx +49 -83
- package/docs/{guides/07-examples.mdx → 02-examples.mdx} +10 -20
- package/docs/actors/01-introduction.mdx +48 -86
- package/docs/actors/02-concurrency.mdx +43 -70
- package/docs/actors/03-timers.mdx +28 -42
- package/docs/actors/04-routes.mdx +110 -150
- package/docs/actors/meta.ts +1 -1
- package/docs/agents/01-introduction.mdx +257 -0
- package/docs/agents/02-tools.mdx +247 -0
- package/docs/agents/03-conversations.mdx +538 -0
- package/docs/agents/04-harnesses.mdx +136 -0
- package/docs/agents/meta.ts +1 -0
- package/docs/client/01-react.mdx +294 -0
- package/docs/client/02-transports.mdx +86 -0
- package/docs/client/03-presence.mdx +224 -0
- package/docs/client/meta.ts +1 -0
- package/docs/contract/01-events.mdx +57 -0
- package/docs/contract/02-state.mdx +142 -0
- package/docs/contract/03-sessions.mdx +175 -0
- package/docs/index.mdx +108 -144
- package/docs/reference/01-core.mdx +139 -0
- package/docs/reference/02-server.mdx +855 -0
- package/docs/reference/03-client.mdx +301 -0
- package/docs/reference/04-ai.mdx +722 -0
- package/docs/reference/05-adapters.mdx +351 -0
- package/docs/reference/06-errors.mdx +138 -0
- package/docs/reference/meta.ts +1 -1
- package/docs/server/01-handlers.mdx +200 -0
- package/docs/server/02-timers.mdx +130 -0
- package/docs/server/03-cancellation.mdx +141 -0
- package/docs/server/04-routes.mdx +243 -0
- package/docs/server/05-production.mdx +322 -0
- package/docs/server/06-guarantees.mdx +123 -0
- package/examples/playground/DEPLOY.md +1 -1
- package/examples/playground/app/a0/[appId]/page.tsx +11 -6
- package/examples/playground/app/a0/app-list.tsx +9 -2
- package/examples/playground/app/a0/app-view.tsx +9 -1
- package/examples/playground/app/a0/apps/[appId]/route.ts +10 -5
- package/examples/playground/app/a0/apps.test.ts +12 -0
- package/examples/playground/app/a0/apps.ts +22 -7
- package/examples/playground/app/a0/chat.tsx +47 -1
- package/examples/playground/app/a0/fx/events/route.ts +9 -0
- package/examples/playground/app/a0/fx/scheduler/route.ts +7 -0
- package/examples/playground/app/a0/fx/short/events/route.ts +11 -0
- package/examples/playground/app/a0/model.test.ts +18 -1
- package/examples/playground/app/a0/model.ts +47 -10
- package/examples/playground/app/a0/no-photon.cjs +4 -0
- package/examples/playground/app/a0/no-quickjs.cjs +3 -0
- package/examples/playground/app/a0/pi/events/route.ts +9 -0
- package/examples/playground/app/a0/pi/scheduler/route.ts +7 -0
- package/examples/playground/app/a0/pi/short/events/route.ts +11 -0
- package/examples/playground/app/a0/sandbox-log.ts +10 -4
- package/examples/playground/app/a0/sandbox-session.ts +152 -0
- package/examples/playground/app/a0/scheduler/route.ts +2 -2
- package/examples/playground/app/a0/server.ts +100 -45
- package/examples/playground/app/a0/session.ts +17 -5
- package/examples/playground/app/a0/shell.tsx +11 -3
- package/examples/playground/app/agent/ingress.test.ts +6 -3
- package/examples/playground/app/agent/server.ts +9 -6
- package/examples/playground/app/agent/telemetry.test.ts +71 -50
- package/examples/playground/app/canvas/[canvasId]/canvas-client.tsx +1 -1
- package/examples/playground/app/chat/server.test.ts +30 -26
- package/examples/playground/app/chat/server.ts +46 -46
- package/examples/playground/next.config.ts +17 -5
- package/examples/playground/package.json +4 -1
- package/examples/playground/vercel.json +18 -0
- package/package.json +27 -3
- package/src/ai-agent.ts +261 -87
- package/src/ai-fx.browser.ts +5 -0
- package/src/ai-fx.ts +833 -0
- package/src/ai-harness.ts +518 -0
- package/src/ai-model-metadata.ts +11 -6
- package/src/ai-pi.browser.ts +5 -0
- package/src/ai-pi.ts +1263 -0
- package/src/ai-sdk-step.ts +2 -2
- package/src/ai-server.ts +3 -1
- package/src/internal.ts +7 -0
- package/src/libfx.d.ts +34 -0
- package/src/reducer.ts +1 -1
- package/src/server.ts +177 -19
- package/src/store-memory.ts +42 -7
- package/src/store-postgres.ts +80 -0
- package/src/store-redis-core.ts +210 -79
- package/src/store-redis-notify.ts +2 -0
- package/src/store-sqlite.ts +60 -0
- package/src/store.ts +33 -0
- package/src/telemetry.ts +1 -0
- package/dist/internal-CbVvEwad.js.map +0 -1
- package/dist/server-CGM8WzRG.d.ts.map +0 -1
- package/dist/server-Rj64fNvX.js.map +0 -1
- package/dist/session-clear-Dshpuhff.d.ts.map +0 -1
- package/dist/store-Gpkq7WBo.d.ts.map +0 -1
- package/dist/store-redis-notify-tqWNnMRu.js.map +0 -1
- package/dist/telemetry-cZH-cibj.d.ts.map +0 -1
- package/docs/concepts/01-contracts.mdx +0 -237
- package/docs/concepts/02-handlers.mdx +0 -284
- package/docs/concepts/03-durability.mdx +0 -314
- package/docs/concepts/04-state.mdx +0 -209
- package/docs/guides/01-timers.mdx +0 -193
- package/docs/guides/02-cancellation.mdx +0 -161
- package/docs/guides/03-react.mdx +0 -324
- package/docs/guides/04-local-first.mdx +0 -47
- package/docs/guides/05-production.mdx +0 -534
- package/docs/guides/06-ai-agents.mdx +0 -1408
- package/docs/guides/08-application-data.mdx +0 -113
- package/docs/guides/09-presence.mdx +0 -262
- package/docs/guides/10-transports.mdx +0 -221
- package/docs/reference/01-api.mdx +0 -2358
- package/docs/reference/02-errors.mdx +0 -150
- /package/docs/{concepts → contract}/meta.ts +0 -0
- /package/docs/{guides → server}/meta.ts +0 -0
|
@@ -1,10 +1,22 @@
|
|
|
1
|
-
//
|
|
2
|
-
//
|
|
3
|
-
//
|
|
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.
|
|
31
|
+
"experimental-a2": "0.18.0",
|
|
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.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.18.0",
|
|
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",
|