trellis 3.1.35 → 3.2.2

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 (287) hide show
  1. package/CHANGELOG.md +23 -5
  2. package/README.md +63 -156
  3. package/bin/trellis.mjs +2 -75
  4. package/dist/{better-sqlite-backend-ahx5p0br.js → better-sqlite-backend-2P4F6AOJ.js} +91 -29
  5. package/dist/boot-middleware-MHLHFCUC.js +9 -0
  6. package/dist/browser/index.d.ts +18 -0
  7. package/dist/browser/index.d.ts.map +1 -0
  8. package/dist/browser/index.js +95 -0
  9. package/dist/{index-53f3b8p8.js → chunk-2W3MHTMG.js} +552 -213
  10. package/dist/chunk-44FFQKQX.js +142 -0
  11. package/dist/chunk-4HYPLFJD.js +150 -0
  12. package/dist/chunk-4XIVMVHC.js +361 -0
  13. package/dist/{index-yp88he8n.js → chunk-6CTA6MCE.js} +88 -64
  14. package/dist/chunk-6GEZ6DN5.js +394 -0
  15. package/dist/chunk-7ZFRVCUE.js +211 -0
  16. package/dist/chunk-CAG4FULI.js +121 -0
  17. package/dist/chunk-FF36CQHZ.js +61 -0
  18. package/dist/{index-h32txmxe.js → chunk-FKQO5A3H.js} +6 -13
  19. package/dist/{index-nq520y6k.js → chunk-FWRS4CSC.js} +46 -32
  20. package/dist/chunk-GFZCJ4EH.js +108 -0
  21. package/dist/chunk-GLM4HGN4.js +55 -0
  22. package/dist/{index-4cdr7x2x.js → chunk-GU374KWZ.js} +182 -111
  23. package/dist/chunk-H6JB3PZ3.js +45 -0
  24. package/dist/chunk-IZX2PLIB.js +1240 -0
  25. package/dist/chunk-J2TXUFCZ.js +289 -0
  26. package/dist/chunk-J3WYZO3Q.js +211 -0
  27. package/dist/{index-xzym9w0m.js → chunk-JA7AIHRK.js} +12 -7
  28. package/dist/chunk-JHHEXEDM.js +162 -0
  29. package/dist/chunk-JUEMDWLU.js +233 -0
  30. package/dist/chunk-KFQGP6VL.js +33 -0
  31. package/dist/chunk-KIJITUZB.js +419 -0
  32. package/dist/{index-4wxa8xz4.js → chunk-KQ4A2D2P.js} +162 -23
  33. package/dist/chunk-KSU2GW22.js +958 -0
  34. package/dist/{index-rv1p47gp.js → chunk-L5N5PR2S.js} +3015 -2480
  35. package/dist/{index-h9e2efx4.js → chunk-LNUIGRDZ.js} +71 -55
  36. package/dist/{index-skhn0agf.js → chunk-MLC5BUYO.js} +19 -20
  37. package/dist/chunk-MPXUVGT3.js +104 -0
  38. package/dist/chunk-N6MYZT4O.js +68 -0
  39. package/dist/chunk-O2AV5WMN.js +48 -0
  40. package/dist/chunk-PZ4XYZ4J.js +143 -0
  41. package/dist/chunk-QB5ISE47.js +419 -0
  42. package/dist/chunk-RSWUFTO2.js +857 -0
  43. package/dist/chunk-S3XLFZ27.js +1095 -0
  44. package/dist/{index-w5wccer3.js → chunk-S6GBJ2ZB.js} +28 -12
  45. package/dist/{index-7pjz3tsy.js → chunk-SGMDTWJJ.js} +57 -15
  46. package/dist/chunk-SPSPV5BC.js +390 -0
  47. package/dist/chunk-TCKXSOBP.js +123 -0
  48. package/dist/chunk-UBGUDMUV.js +59 -0
  49. package/dist/{index-wt8rz4gn.js → chunk-UQISRW6T.js} +97 -26
  50. package/dist/chunk-USEINYUL.js +12 -0
  51. package/dist/{index-bmyt7k8n.js → chunk-UZRUP7QW.js} +12 -4
  52. package/dist/{index-xhcp6xrn.js → chunk-VBYUTRXX.js} +695 -514
  53. package/dist/{index-vkpkfwhq.js → chunk-VDAKEOML.js} +234 -194
  54. package/dist/chunk-WXSWA3MV.js +0 -0
  55. package/dist/{index-n9f2qyh5.js → chunk-X5FLTRUB.js} +55 -33
  56. package/dist/{index-h7zxhhhh.js → chunk-XMQ7G77X.js} +46 -38
  57. package/dist/{index-w7ng765c.js → chunk-YCM7ZYEZ.js} +102 -49
  58. package/dist/cli/deploy-cli.d.ts +18 -0
  59. package/dist/cli/deploy-cli.d.ts.map +1 -0
  60. package/dist/cli/errors.d.ts +6 -0
  61. package/dist/cli/errors.d.ts.map +1 -0
  62. package/dist/cli/examples.d.ts +23 -0
  63. package/dist/cli/examples.d.ts.map +1 -0
  64. package/dist/cli/index.d.ts +1 -1
  65. package/dist/cli/index.d.ts.map +1 -1
  66. package/dist/cli/index.js +2426 -6225
  67. package/dist/client/index.browser.d.ts +29 -0
  68. package/dist/client/index.browser.d.ts.map +1 -0
  69. package/dist/client/index.browser.js +64 -0
  70. package/dist/client/index.d.ts +6 -1
  71. package/dist/client/index.d.ts.map +1 -1
  72. package/dist/client/index.js +41 -21
  73. package/dist/client/live.d.ts +67 -0
  74. package/dist/client/live.d.ts.map +1 -0
  75. package/dist/client/reactive.d.ts +31 -0
  76. package/dist/client/reactive.d.ts.map +1 -0
  77. package/dist/client/sdk.browser.d.ts +104 -0
  78. package/dist/client/sdk.browser.d.ts.map +1 -0
  79. package/dist/client/sdk.browser.js +9 -0
  80. package/dist/client/sdk.d.ts +26 -2
  81. package/dist/client/sdk.d.ts.map +1 -1
  82. package/dist/client/sdk.js +9 -0
  83. package/dist/client/vcs-client.d.ts +129 -0
  84. package/dist/client/vcs-client.d.ts.map +1 -0
  85. package/dist/cms/index.js +171 -163
  86. package/dist/{config-8hczw0rs.js → config-PFTP67TR.js} +8 -9
  87. package/dist/core/computation/index.d.ts +5 -0
  88. package/dist/core/computation/index.d.ts.map +1 -0
  89. package/dist/core/computation/rollup.d.ts +18 -0
  90. package/dist/core/computation/rollup.d.ts.map +1 -0
  91. package/dist/core/index.d.ts +5 -0
  92. package/dist/core/index.d.ts.map +1 -1
  93. package/dist/core/index.js +171 -104
  94. package/dist/core/kernel/boot-middleware.d.ts +10 -0
  95. package/dist/core/kernel/boot-middleware.d.ts.map +1 -0
  96. package/dist/core/kernel/logic-middleware.d.ts +7 -1
  97. package/dist/core/kernel/logic-middleware.d.ts.map +1 -1
  98. package/dist/core/kernel/trellis-kernel.d.ts.map +1 -1
  99. package/dist/core/ontology/types.d.ts +5 -0
  100. package/dist/core/ontology/types.d.ts.map +1 -1
  101. package/dist/core/persist/better-sqlite-backend.d.ts +9 -2
  102. package/dist/core/persist/better-sqlite-backend.d.ts.map +1 -1
  103. package/dist/core/persist/factory.d.ts +6 -7
  104. package/dist/core/persist/factory.d.ts.map +1 -1
  105. package/dist/core/persist/factory.js +2 -3
  106. package/dist/core/persist/sqljs-backend.js +2 -3
  107. package/dist/db/index.d.ts +4 -1
  108. package/dist/db/index.d.ts.map +1 -1
  109. package/dist/db/index.js +67 -54
  110. package/dist/db/inspector.js +11 -19
  111. package/dist/db/trellis.css +1 -1
  112. package/dist/decisions/index.js +9 -10
  113. package/dist/deploy-LQ7GUGJ5.js +9 -0
  114. package/dist/deploy-YNVG5E4E.js +9 -0
  115. package/dist/deploy-cli-24BCHAXY.js +67 -0
  116. package/dist/deploy-cli-C35HTITO.js +67 -0
  117. package/dist/embeddings/auto-embed.d.ts +2 -2
  118. package/dist/embeddings/auto-embed.d.ts.map +1 -1
  119. package/dist/embeddings/index.js +20 -22
  120. package/dist/embeddings/search.d.ts +2 -1
  121. package/dist/embeddings/search.d.ts.map +1 -1
  122. package/dist/embeddings/store.d.ts +25 -4
  123. package/dist/embeddings/store.d.ts.map +1 -1
  124. package/dist/engine.d.ts +59 -19
  125. package/dist/engine.d.ts.map +1 -1
  126. package/dist/import-UZEKXU3B.js +10 -0
  127. package/dist/index.js +102 -93
  128. package/dist/launch-explorer-HZ4ZJA4X.js +95 -0
  129. package/dist/links/index.js +24 -26
  130. package/dist/mcp/server.d.ts.map +1 -1
  131. package/dist/plugins/agent-memory/index.js +316 -0
  132. package/dist/plugins/idea-garden/index.js +165 -0
  133. package/dist/plugins/plan-approval/index.js +579 -0
  134. package/dist/plugins/proactive-watcher/index.js +194 -0
  135. package/dist/{index-2r4jxwnb.js → query-XYLTJYSA.js} +14 -15
  136. package/dist/react/index.js +39 -70
  137. package/dist/react/realtime.js +11 -0
  138. package/dist/react/schema-hooks.js +87 -0
  139. package/dist/realtime/broadcast-channel-transport.d.ts +43 -0
  140. package/dist/realtime/broadcast-channel-transport.d.ts.map +1 -0
  141. package/dist/realtime/durable-object-relay-transport.d.ts +96 -0
  142. package/dist/realtime/durable-object-relay-transport.d.ts.map +1 -0
  143. package/dist/realtime/index.d.ts +44 -0
  144. package/dist/realtime/index.d.ts.map +1 -0
  145. package/dist/realtime/index.js +40 -0
  146. package/dist/realtime/memory-hub.d.ts +32 -0
  147. package/dist/realtime/memory-hub.d.ts.map +1 -0
  148. package/dist/realtime/persistent-channel.d.ts +105 -0
  149. package/dist/realtime/persistent-channel.d.ts.map +1 -0
  150. package/dist/realtime/presence.d.ts +73 -0
  151. package/dist/realtime/presence.d.ts.map +1 -0
  152. package/dist/realtime/relay-persistence.d.ts +37 -0
  153. package/dist/realtime/relay-persistence.d.ts.map +1 -0
  154. package/dist/realtime/relay-persistence.js +107 -0
  155. package/dist/realtime/relay-server.d.ts +103 -0
  156. package/dist/realtime/relay-server.d.ts.map +1 -0
  157. package/dist/realtime/room.d.ts +98 -0
  158. package/dist/realtime/room.d.ts.map +1 -0
  159. package/dist/realtime/text.d.ts +73 -0
  160. package/dist/realtime/text.d.ts.map +1 -0
  161. package/dist/realtime/types.d.ts +89 -0
  162. package/dist/realtime/types.d.ts.map +1 -0
  163. package/dist/realtime/websocket-relay-transport.d.ts +28 -0
  164. package/dist/realtime/websocket-relay-transport.d.ts.map +1 -0
  165. package/dist/realtime.bundle.js +1100 -0
  166. package/dist/{remote-manager-xvbg4230.js → remote-manager-ODE3T2KR.js} +25 -15
  167. package/dist/scaffold/seed.d.ts.map +1 -1
  168. package/dist/scaffold/write.d.ts +1 -1
  169. package/dist/scaffold/write.d.ts.map +1 -1
  170. package/dist/schema/define.d.ts +137 -0
  171. package/dist/schema/define.d.ts.map +1 -0
  172. package/dist/schema/entity-projection.d.ts +34 -0
  173. package/dist/schema/entity-projection.d.ts.map +1 -0
  174. package/dist/schema/eql.d.ts +46 -0
  175. package/dist/schema/eql.d.ts.map +1 -0
  176. package/dist/schema/index.d.ts +21 -0
  177. package/dist/schema/index.d.ts.map +1 -0
  178. package/dist/schema/index.js +46 -0
  179. package/dist/schema/kernel-resolve.d.ts +21 -0
  180. package/dist/schema/kernel-resolve.d.ts.map +1 -0
  181. package/dist/schema/mutations.d.ts +20 -0
  182. package/dist/schema/mutations.d.ts.map +1 -0
  183. package/dist/schema/resolve.d.ts +21 -0
  184. package/dist/schema/resolve.d.ts.map +1 -0
  185. package/dist/server/deploy-meta.d.ts +25 -0
  186. package/dist/server/deploy-meta.d.ts.map +1 -0
  187. package/dist/server/deploy.d.ts +7 -2
  188. package/dist/server/deploy.d.ts.map +1 -1
  189. package/dist/server/index.d.ts +7 -2
  190. package/dist/server/index.d.ts.map +1 -1
  191. package/dist/server/index.js +100 -58
  192. package/dist/server/node-adapter.js +5 -104
  193. package/dist/server/realtime.d.ts +14 -3
  194. package/dist/server/realtime.d.ts.map +1 -1
  195. package/dist/server/server.d.ts +8 -16
  196. package/dist/server/server.d.ts.map +1 -1
  197. package/dist/server/sprites.d.ts +18 -1
  198. package/dist/server/sprites.d.ts.map +1 -1
  199. package/dist/server/tenancy.d.ts +4 -0
  200. package/dist/server/tenancy.d.ts.map +1 -1
  201. package/dist/server/usage-meter.d.ts +53 -0
  202. package/dist/server/usage-meter.d.ts.map +1 -0
  203. package/dist/server-MB3OPSPI.js +18 -0
  204. package/dist/server-ZVWGLLRF.js +18 -0
  205. package/dist/sprites-KQGTGM6W.js +27 -0
  206. package/dist/{sprites-vc4qbrp1.js → sprites-RU3E4XQN.js} +6 -7
  207. package/dist/svelte/index.d.ts +17 -0
  208. package/dist/svelte/index.d.ts.map +1 -0
  209. package/dist/svelte/index.js +51 -0
  210. package/dist/svelte/schema-hooks.d.ts +45 -0
  211. package/dist/svelte/schema-hooks.d.ts.map +1 -0
  212. package/dist/svelte/schema-hooks.js +71 -0
  213. package/dist/svelte/stores.d.ts +78 -0
  214. package/dist/svelte/stores.d.ts.map +1 -0
  215. package/dist/sync/http-transport.d.ts +3 -3
  216. package/dist/sync/http-transport.d.ts.map +1 -1
  217. package/dist/sync/index.d.ts +15 -1
  218. package/dist/sync/index.d.ts.map +1 -1
  219. package/dist/sync/index.js +617 -0
  220. package/dist/sync/memory-room.d.ts +37 -0
  221. package/dist/sync/memory-room.d.ts.map +1 -0
  222. package/dist/sync/memory-transport.d.ts +3 -3
  223. package/dist/sync/memory-transport.d.ts.map +1 -1
  224. package/dist/sync/partykit-room.d.ts +40 -0
  225. package/dist/sync/partykit-room.d.ts.map +1 -0
  226. package/dist/sync/partykit-transport.d.ts +84 -0
  227. package/dist/sync/partykit-transport.d.ts.map +1 -0
  228. package/dist/sync/room-core.d.ts +53 -0
  229. package/dist/sync/room-core.d.ts.map +1 -0
  230. package/dist/sync/sync-engine.d.ts +40 -2
  231. package/dist/sync/sync-engine.d.ts.map +1 -1
  232. package/dist/sync/sync-room-server.d.ts +39 -0
  233. package/dist/sync/sync-room-server.d.ts.map +1 -0
  234. package/dist/sync/types.d.ts +70 -3
  235. package/dist/sync/types.d.ts.map +1 -1
  236. package/dist/sync/vcs-sync-peer.d.ts +63 -0
  237. package/dist/sync/vcs-sync-peer.d.ts.map +1 -0
  238. package/dist/sync/ws-transport.d.ts +2 -2
  239. package/dist/sync/ws-transport.d.ts.map +1 -1
  240. package/dist/tenancy-NBLLGCNJ.js +14 -0
  241. package/dist/tenancy-POMWQP6M.js +16 -0
  242. package/dist/ui/client.html +355 -67
  243. package/dist/ui/launch-explorer.d.ts +22 -0
  244. package/dist/ui/launch-explorer.d.ts.map +1 -0
  245. package/dist/ui/server.d.ts +1 -1
  246. package/dist/ui/server.d.ts.map +1 -1
  247. package/dist/vcs/blob-store.d.ts.map +1 -1
  248. package/dist/vcs/idb-op-log.d.ts +67 -0
  249. package/dist/vcs/idb-op-log.d.ts.map +1 -0
  250. package/dist/vcs/index.d.ts +1 -0
  251. package/dist/vcs/index.d.ts.map +1 -1
  252. package/dist/vcs/index.js +81 -72
  253. package/dist/vcs/issue.d.ts +22 -5
  254. package/dist/vcs/issue.d.ts.map +1 -1
  255. package/dist/vcs/lane-materialize.d.ts +5 -0
  256. package/dist/vcs/lane-materialize.d.ts.map +1 -1
  257. package/dist/vcs/op-log.d.ts +28 -2
  258. package/dist/vcs/op-log.d.ts.map +1 -1
  259. package/dist/vcs/ops.d.ts +10 -0
  260. package/dist/vcs/ops.d.ts.map +1 -1
  261. package/dist/vcs/types.d.ts +2 -0
  262. package/dist/vcs/types.d.ts.map +1 -1
  263. package/dist/{vm-config-6xhsj6b3.js → vm-config-JI4OXKDQ.js} +9 -10
  264. package/dist/vue/hooks.d.ts +64 -0
  265. package/dist/vue/hooks.d.ts.map +1 -0
  266. package/dist/vue/index.d.ts +19 -0
  267. package/dist/vue/index.d.ts.map +1 -0
  268. package/dist/vue/index.js +59 -0
  269. package/dist/vue/schema-hooks.d.ts +41 -0
  270. package/dist/vue/schema-hooks.d.ts.map +1 -0
  271. package/dist/vue/schema-hooks.js +64 -0
  272. package/package.json +130 -17
  273. package/dist/deploy-999q207z.js +0 -10
  274. package/dist/engine-y0724kjq.js +0 -8
  275. package/dist/import-s2b8e0ft.js +0 -11
  276. package/dist/index-a76rekgs.js +0 -67
  277. package/dist/index-c9h37r6h.js +0 -1
  278. package/dist/index-hr9qvv77.js +0 -860
  279. package/dist/index-k5b0xskw.js +0 -1
  280. package/dist/index-nzb3am4f.js +0 -80
  281. package/dist/index-wncptktd.js +0 -292
  282. package/dist/index-y6a4kj0p.js +0 -43
  283. package/dist/index-yhwjgfvj.js +0 -342
  284. package/dist/sdk-bepky0xs.js +0 -16
  285. package/dist/server-szdjx0nt.js +0 -13
  286. package/dist/sqlite-backend-0vsmc6qj.js +0 -8
  287. package/dist/tenancy-pjm32b4v.js +0 -14
@@ -0,0 +1,64 @@
1
+ import {
2
+ liveEntities,
3
+ liveEntity
4
+ } from "../chunk-J3WYZO3Q.js";
5
+ import {
6
+ entityMutations
7
+ } from "../chunk-USEINYUL.js";
8
+ import "../chunk-JUEMDWLU.js";
9
+ import "../chunk-UBGUDMUV.js";
10
+ import "../chunk-KFQGP6VL.js";
11
+
12
+ // src/vue/schema-hooks.ts
13
+ import { computed, onScopeDispose, shallowRef } from "vue";
14
+ function parseReadOptions(opts) {
15
+ if (!opts) return {};
16
+ if ("resolve" in opts || "where" in opts) return opts;
17
+ return { where: opts };
18
+ }
19
+ function useLive(client, schema, opts) {
20
+ const res = liveEntities(client, schema, opts);
21
+ const state = shallowRef(res.signal.peek());
22
+ const off = res.signal.subscribe((v) => {
23
+ state.value = v;
24
+ });
25
+ const stop = res.start();
26
+ onScopeDispose(() => {
27
+ off();
28
+ stop();
29
+ });
30
+ return state;
31
+ }
32
+ function useEntities(client, schema, opts) {
33
+ const state = useLive(client, schema, parseReadOptions(opts));
34
+ return computed(() => ({
35
+ data: state.value.data,
36
+ loading: state.value.loading,
37
+ error: state.value.error
38
+ }));
39
+ }
40
+ function useEntity(client, schema, id, opts) {
41
+ const res = liveEntity(client, schema, id, opts);
42
+ const state = shallowRef(res.signal.peek());
43
+ const off = res.signal.subscribe((v) => {
44
+ state.value = v;
45
+ });
46
+ const stop = res.start();
47
+ onScopeDispose(() => {
48
+ off();
49
+ stop();
50
+ });
51
+ return computed(() => ({
52
+ data: state.value.data,
53
+ loading: state.value.loading,
54
+ error: state.value.error
55
+ }));
56
+ }
57
+ function useMutation(client, schema) {
58
+ return entityMutations(client, schema);
59
+ }
60
+ export {
61
+ useEntities,
62
+ useEntity,
63
+ useMutation
64
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "trellis",
3
- "version": "3.1.35",
3
+ "version": "3.2.2",
4
4
  "description": "Agentic State Engine — event-sourced causal graph with branching, decision traces, and realtime sync for AI-native applications",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -24,11 +24,10 @@
24
24
  "decision-traces",
25
25
  "collaboration",
26
26
  "sync",
27
- "causal",
28
- "bun"
27
+ "causal"
29
28
  ],
30
29
  "engines": {
31
- "bun": ">=1.0.0"
30
+ "node": ">=20.0.0"
32
31
  },
33
32
  "bin": {
34
33
  "trellis": "./bin/trellis.mjs"
@@ -36,7 +35,7 @@
36
35
  "exports": {
37
36
  ".": {
38
37
  "types": "./dist/index.d.ts",
39
- "bun": "./dist/index.js",
38
+ "browser": "./dist/browser/index.js",
40
39
  "import": "./dist/index.js"
41
40
  },
42
41
  "./core": {
@@ -49,6 +48,19 @@
49
48
  "bun": "./dist/vcs/index.js",
50
49
  "import": "./dist/vcs/index.js"
51
50
  },
51
+ "./sync": {
52
+ "types": "./dist/sync/index.d.ts",
53
+ "bun": "./dist/sync/index.js",
54
+ "import": "./dist/sync/index.js"
55
+ },
56
+ "./realtime": {
57
+ "types": "./dist/realtime/index.d.ts",
58
+ "svelte": "./dist/realtime/index.js",
59
+ "browser": "./dist/realtime/index.js",
60
+ "bun": "./dist/realtime/index.js",
61
+ "import": "./dist/realtime/index.js",
62
+ "default": "./dist/realtime/index.js"
63
+ },
52
64
  "./ai": {
53
65
  "types": "./dist/embeddings/index.d.ts",
54
66
  "bun": "./dist/embeddings/index.js",
@@ -76,12 +88,82 @@
76
88
  },
77
89
  "./client": {
78
90
  "types": "./dist/client/index.d.ts",
91
+ "svelte": "./dist/client/index.browser.js",
92
+ "browser": "./dist/client/index.browser.js",
79
93
  "bun": "./dist/client/index.js",
80
- "import": "./dist/client/index.js"
94
+ "import": "./dist/client/index.js",
95
+ "default": "./dist/client/index.js"
96
+ },
97
+ "./client/sdk": {
98
+ "types": "./dist/client/sdk.d.ts",
99
+ "svelte": "./dist/client/sdk.browser.js",
100
+ "browser": "./dist/client/sdk.browser.js",
101
+ "import": "./dist/client/sdk.js",
102
+ "default": "./dist/client/sdk.js"
103
+ },
104
+ "./browser": {
105
+ "types": "./dist/browser/index.d.ts",
106
+ "svelte": "./dist/browser/index.js",
107
+ "browser": "./dist/browser/index.js",
108
+ "import": "./dist/browser/index.js",
109
+ "default": "./dist/browser/index.js"
110
+ },
111
+ "./schema": {
112
+ "types": "./dist/schema/index.d.ts",
113
+ "svelte": "./dist/schema/index.js",
114
+ "browser": "./dist/schema/index.js",
115
+ "bun": "./dist/schema/index.js",
116
+ "import": "./dist/schema/index.js",
117
+ "default": "./dist/schema/index.js"
81
118
  },
82
119
  "./react": {
83
120
  "types": "./dist/react/index.d.ts",
84
- "import": "./dist/react/index.js"
121
+ "svelte": "./dist/react/index.js",
122
+ "browser": "./dist/react/index.js",
123
+ "import": "./dist/react/index.js",
124
+ "default": "./dist/react/index.js"
125
+ },
126
+ "./react/realtime": {
127
+ "types": "./dist/react/realtime.d.ts",
128
+ "svelte": "./dist/react/realtime.js",
129
+ "browser": "./dist/react/realtime.js",
130
+ "import": "./dist/react/realtime.js",
131
+ "default": "./dist/react/realtime.js"
132
+ },
133
+ "./react/typed": {
134
+ "types": "./dist/react/schema-hooks.d.ts",
135
+ "svelte": "./dist/react/schema-hooks.js",
136
+ "browser": "./dist/react/schema-hooks.js",
137
+ "import": "./dist/react/schema-hooks.js",
138
+ "default": "./dist/react/schema-hooks.js"
139
+ },
140
+ "./vue": {
141
+ "types": "./dist/vue/index.d.ts",
142
+ "svelte": "./dist/vue/index.js",
143
+ "browser": "./dist/vue/index.js",
144
+ "import": "./dist/vue/index.js",
145
+ "default": "./dist/vue/index.js"
146
+ },
147
+ "./vue/typed": {
148
+ "types": "./dist/vue/schema-hooks.d.ts",
149
+ "svelte": "./dist/vue/schema-hooks.js",
150
+ "browser": "./dist/vue/schema-hooks.js",
151
+ "import": "./dist/vue/schema-hooks.js",
152
+ "default": "./dist/vue/schema-hooks.js"
153
+ },
154
+ "./svelte": {
155
+ "types": "./dist/svelte/index.d.ts",
156
+ "svelte": "./dist/svelte/index.js",
157
+ "browser": "./dist/svelte/index.js",
158
+ "import": "./dist/svelte/index.js",
159
+ "default": "./dist/svelte/index.js"
160
+ },
161
+ "./svelte/typed": {
162
+ "types": "./dist/svelte/schema-hooks.d.ts",
163
+ "svelte": "./dist/svelte/schema-hooks.js",
164
+ "browser": "./dist/svelte/schema-hooks.js",
165
+ "import": "./dist/svelte/schema-hooks.js",
166
+ "default": "./dist/svelte/schema-hooks.js"
85
167
  },
86
168
  "./db": {
87
169
  "types": "./dist/db/index.d.ts",
@@ -99,6 +181,22 @@
99
181
  "./persist/factory": {
100
182
  "types": "./dist/persist/factory.d.ts",
101
183
  "import": "./dist/persist/factory.js"
184
+ },
185
+ "./plugins/plan-approval": {
186
+ "types": "./dist/plugins/plan-approval/index.d.ts",
187
+ "import": "./dist/plugins/plan-approval/index.js"
188
+ },
189
+ "./plugins/proactive-watcher": {
190
+ "types": "./dist/plugins/proactive-watcher/index.d.ts",
191
+ "import": "./dist/plugins/proactive-watcher/index.js"
192
+ },
193
+ "./plugins/idea-garden": {
194
+ "types": "./dist/plugins/idea-garden/index.d.ts",
195
+ "import": "./dist/plugins/idea-garden/index.js"
196
+ },
197
+ "./plugins/agent-memory": {
198
+ "types": "./dist/plugins/agent-memory/index.d.ts",
199
+ "import": "./dist/plugins/agent-memory/index.js"
102
200
  }
103
201
  },
104
202
  "files": [
@@ -111,14 +209,17 @@
111
209
  "README.md"
112
210
  ],
113
211
  "scripts": {
114
- "dev": "bun run src/index.ts",
115
- "cli": "bun run src/cli/index.ts",
116
- "mcp": "bun run src/mcp/index.ts",
117
- "mcp:docs": "bun run src/mcp/docs.ts",
118
- "build": "bun build src/index.ts src/core/index.ts src/vcs/index.ts src/embeddings/index.ts src/links/index.ts src/decisions/index.ts src/server/index.ts src/client/index.ts src/react/index.ts src/db/index.ts src/cli/index.ts src/cms/index.ts src/core/persist/sqljs-backend.ts src/core/persist/factory.ts src/server/node-adapter.ts --outdir dist --target bun --splitting --format esm --root src --external @xenova/transformers --external @huggingface/transformers --external react --external sql.js --external ws && mkdir -p dist/ui && cp src/ui/client.html dist/ui/client.html && tsc -p tsconfig.build.json --emitDeclarationOnly --noEmit false --noEmitOnError false && bun run build:inspector",
212
+ "dev": "tsx src/index.ts",
213
+ "cli": "tsx src/cli/index.ts",
214
+ "mcp": "tsx src/mcp/index.ts",
215
+ "mcp:docs": "tsx src/mcp/docs.ts",
216
+ "build": "esbuild src/index.ts src/browser/index.ts src/core/index.ts src/vcs/index.ts src/sync/index.ts src/realtime/index.ts src/embeddings/index.ts src/links/index.ts src/decisions/index.ts src/server/index.ts src/client/index.ts src/client/index.browser.ts src/client/sdk.ts src/client/sdk.browser.ts src/schema/index.ts src/react/index.ts src/react/realtime.ts src/react/schema-hooks.ts src/vue/index.ts src/vue/schema-hooks.ts src/svelte/index.ts src/svelte/schema-hooks.ts src/db/index.ts src/cli/index.ts src/cms/index.ts src/core/persist/sqljs-backend.ts src/core/persist/factory.ts src/server/node-adapter.ts src/plugins/plan-approval/index.ts src/plugins/proactive-watcher/index.ts src/plugins/idea-garden/index.ts src/plugins/agent-memory/index.ts --bundle --outdir=dist --outbase=src --format=esm --splitting --platform=node --external:@xenova/transformers --external:@huggingface/transformers --external:react --external:vue --external:sql.js --external:ws --external:better-sqlite3 --external:bun:sqlite --external:commander --external:chalk --external:@inquirer/prompts --external:zod && npm run build:realtime-bundle && mkdir -p dist/ui && cp src/ui/client.html dist/ui/client.html && tsc -p tsconfig.build.json --emitDeclarationOnly --noEmit false --noEmitOnError false && npm run build:inspector",
217
+ "build:realtime-bundle": "esbuild src/realtime/index.ts --bundle --format=esm --platform=browser --outfile=dist/realtime.bundle.js && esbuild src/realtime/relay-persistence.ts --bundle --format=esm --platform=node --outfile=dist/realtime/relay-persistence.js",
218
+ "build:state-demo-bundle": "esbuild demo/state-demo/entry.ts --bundle --format=esm --platform=browser --outfile=dist/state-demo.bundle.js",
119
219
  "build:inspector": "vite build --config vite.inspector.config.ts",
120
- "test": "bun test test/core test/cms test/vcs test/git test/p2 test/p3 test/p4 test/p5 test/p6 test/p7 test/engine.test.ts test/cli",
121
- "test:all": "bun test",
220
+ "test": "vitest run test/core test/cms test/vcs test/git test/p2 test/p3 test/p4 test/p5 test/p6 test/p7 test/client test/realtime test/schema test/cloud test/engine.test.ts test/cli",
221
+ "test:all": "vitest run",
222
+ "test:wc": "node test/webcontainer/server.mjs",
122
223
  "prepublishOnly": "npm run test && npm run build"
123
224
  },
124
225
  "dependencies": {
@@ -127,7 +228,7 @@
127
228
  "chalk": "^5.4.1",
128
229
  "commander": "^13.1.0",
129
230
  "opencode-ai": "^1.3.5",
130
- "turtlecode": "^0.3.23",
231
+ "turtlecode": "^0.3.59",
131
232
  "zod": "3"
132
233
  },
133
234
  "optionalDependencies": {
@@ -138,7 +239,9 @@
138
239
  },
139
240
  "peerDependencies": {
140
241
  "better-sqlite3": "^11.0.0",
141
- "react": ">=18"
242
+ "react": ">=18",
243
+ "vue": ">=3.3",
244
+ "zod": "^3.23.0"
142
245
  },
143
246
  "peerDependenciesMeta": {
144
247
  "better-sqlite3": {
@@ -146,17 +249,27 @@
146
249
  },
147
250
  "react": {
148
251
  "optional": true
252
+ },
253
+ "vue": {
254
+ "optional": true
255
+ },
256
+ "zod": {
257
+ "optional": true
149
258
  }
150
259
  },
151
260
  "devDependencies": {
152
- "@types/bun": "latest",
261
+ "@types/node": "^20.0.0",
153
262
  "@types/react": "^19.1.2",
154
263
  "@types/sql.js": "^1.4.11",
155
264
  "@types/ws": "^8.18.1",
156
265
  "@vitejs/plugin-vue": "^5.2.3",
266
+ "esbuild": "^0.24.0",
267
+ "fake-indexeddb": "^6.2.5",
157
268
  "react": "^19.1.0",
269
+ "tsx": "^4.19.0",
158
270
  "typescript": "^5",
159
271
  "vite": "^6.3.1",
272
+ "vitest": "^2.0.0",
160
273
  "vue": "^3.5.13"
161
274
  }
162
275
  }
@@ -1,10 +0,0 @@
1
- // @bun
2
- import {
3
- deploy
4
- } from "./index-wt8rz4gn.js";
5
- import"./index-y6a4kj0p.js";
6
- import"./index-xzym9w0m.js";
7
- import"./index-a76rekgs.js";
8
- export {
9
- deploy
10
- };
@@ -1,8 +0,0 @@
1
- // @bun
2
- import {
3
- QueryEngine
4
- } from "./index-yp88he8n.js";
5
- import"./index-a76rekgs.js";
6
- export {
7
- QueryEngine
8
- };
@@ -1,11 +0,0 @@
1
- // @bun
2
- import {
3
- importFile,
4
- importRecords
5
- } from "./index-skhn0agf.js";
6
- import"./index-yhwjgfvj.js";
7
- import"./index-a76rekgs.js";
8
- export {
9
- importRecords,
10
- importFile
11
- };
@@ -1,67 +0,0 @@
1
- // @bun
2
- var __create = Object.create;
3
- var __getProtoOf = Object.getPrototypeOf;
4
- var __defProp = Object.defineProperty;
5
- var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
7
- var __hasOwnProp = Object.prototype.hasOwnProperty;
8
- function __accessProp(key) {
9
- return this[key];
10
- }
11
- var __toESMCache_node;
12
- var __toESMCache_esm;
13
- var __toESM = (mod, isNodeMode, target) => {
14
- var canCache = mod != null && typeof mod === "object";
15
- if (canCache) {
16
- var cache = isNodeMode ? __toESMCache_node ??= new WeakMap : __toESMCache_esm ??= new WeakMap;
17
- var cached = cache.get(mod);
18
- if (cached)
19
- return cached;
20
- }
21
- target = mod != null ? __create(__getProtoOf(mod)) : {};
22
- const to = isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
23
- for (let key of __getOwnPropNames(mod))
24
- if (!__hasOwnProp.call(to, key))
25
- __defProp(to, key, {
26
- get: __accessProp.bind(mod, key),
27
- enumerable: true
28
- });
29
- if (canCache)
30
- cache.set(mod, to);
31
- return to;
32
- };
33
- var __toCommonJS = (from) => {
34
- var entry = (__moduleCache ??= new WeakMap).get(from), desc;
35
- if (entry)
36
- return entry;
37
- entry = __defProp({}, "__esModule", { value: true });
38
- if (from && typeof from === "object" || typeof from === "function") {
39
- for (var key of __getOwnPropNames(from))
40
- if (!__hasOwnProp.call(entry, key))
41
- __defProp(entry, key, {
42
- get: __accessProp.bind(from, key),
43
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
44
- });
45
- }
46
- __moduleCache.set(from, entry);
47
- return entry;
48
- };
49
- var __moduleCache;
50
- var __commonJS = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
51
- var __returnValue = (v) => v;
52
- function __exportSetter(name, newValue) {
53
- this[name] = __returnValue.bind(null, newValue);
54
- }
55
- var __export = (target, all) => {
56
- for (var name in all)
57
- __defProp(target, name, {
58
- get: all[name],
59
- enumerable: true,
60
- configurable: true,
61
- set: __exportSetter.bind(all, name)
62
- });
63
- };
64
- var __esm = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
65
- var __require = import.meta.require;
66
-
67
- export { __toESM, __toCommonJS, __commonJS, __export, __esm, __require };
@@ -1 +0,0 @@
1
- // @bun