rivetkit 2.0.2 → 2.0.4

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 (246) hide show
  1. package/README.md +3 -5
  2. package/dist/schemas/actor-persist/v1.ts +225 -0
  3. package/dist/schemas/client-protocol/v1.ts +435 -0
  4. package/dist/schemas/file-system-driver/v1.ts +102 -0
  5. package/dist/tsup/actor/errors.cjs +77 -0
  6. package/dist/tsup/actor/errors.cjs.map +1 -0
  7. package/dist/tsup/actor/errors.d.cts +156 -0
  8. package/dist/tsup/actor/errors.d.ts +156 -0
  9. package/dist/tsup/actor/errors.js +77 -0
  10. package/dist/tsup/actor/errors.js.map +1 -0
  11. package/dist/tsup/chunk-3F2YSRJL.js +117 -0
  12. package/dist/tsup/chunk-3F2YSRJL.js.map +1 -0
  13. package/dist/tsup/chunk-4CXBCT26.cjs +250 -0
  14. package/dist/tsup/chunk-4CXBCT26.cjs.map +1 -0
  15. package/dist/tsup/chunk-4R73YDN3.cjs +20 -0
  16. package/dist/tsup/chunk-4R73YDN3.cjs.map +1 -0
  17. package/dist/tsup/chunk-6LJT3QRL.cjs +539 -0
  18. package/dist/tsup/chunk-6LJT3QRL.cjs.map +1 -0
  19. package/dist/tsup/chunk-GICQ3YCU.cjs +1792 -0
  20. package/dist/tsup/chunk-GICQ3YCU.cjs.map +1 -0
  21. package/dist/tsup/chunk-H26RP6GD.js +251 -0
  22. package/dist/tsup/chunk-H26RP6GD.js.map +1 -0
  23. package/dist/tsup/chunk-HI3HWJRC.js +20 -0
  24. package/dist/tsup/chunk-HI3HWJRC.js.map +1 -0
  25. package/dist/tsup/chunk-HLLF4B4Q.js +1792 -0
  26. package/dist/tsup/chunk-HLLF4B4Q.js.map +1 -0
  27. package/dist/tsup/chunk-IH6CKNDW.cjs +117 -0
  28. package/dist/tsup/chunk-IH6CKNDW.cjs.map +1 -0
  29. package/dist/tsup/chunk-LV2S3OU3.js +250 -0
  30. package/dist/tsup/chunk-LV2S3OU3.js.map +1 -0
  31. package/dist/tsup/chunk-LWNKVZG5.cjs +251 -0
  32. package/dist/tsup/chunk-LWNKVZG5.cjs.map +1 -0
  33. package/dist/tsup/chunk-NFU2BBT5.js +374 -0
  34. package/dist/tsup/chunk-NFU2BBT5.js.map +1 -0
  35. package/dist/tsup/chunk-PQY7KKTL.js +539 -0
  36. package/dist/tsup/chunk-PQY7KKTL.js.map +1 -0
  37. package/dist/tsup/chunk-QK72M5JB.js +45 -0
  38. package/dist/tsup/chunk-QK72M5JB.js.map +1 -0
  39. package/dist/tsup/chunk-QNNXFOQV.cjs +45 -0
  40. package/dist/tsup/chunk-QNNXFOQV.cjs.map +1 -0
  41. package/dist/tsup/chunk-SBHHJ6QS.cjs +374 -0
  42. package/dist/tsup/chunk-SBHHJ6QS.cjs.map +1 -0
  43. package/dist/tsup/chunk-TQ62L3X7.js +325 -0
  44. package/dist/tsup/chunk-TQ62L3X7.js.map +1 -0
  45. package/dist/tsup/chunk-VO7ZRVVD.cjs +6293 -0
  46. package/dist/tsup/chunk-VO7ZRVVD.cjs.map +1 -0
  47. package/dist/tsup/chunk-WHBPJNGW.cjs +325 -0
  48. package/dist/tsup/chunk-WHBPJNGW.cjs.map +1 -0
  49. package/dist/tsup/chunk-XJQHKJ4P.js +6293 -0
  50. package/dist/tsup/chunk-XJQHKJ4P.js.map +1 -0
  51. package/dist/tsup/client/mod.cjs +32 -0
  52. package/dist/tsup/client/mod.cjs.map +1 -0
  53. package/dist/tsup/client/mod.d.cts +20 -0
  54. package/dist/tsup/client/mod.d.ts +20 -0
  55. package/dist/tsup/client/mod.js +32 -0
  56. package/dist/tsup/client/mod.js.map +1 -0
  57. package/dist/tsup/common/log.cjs +21 -0
  58. package/dist/tsup/common/log.cjs.map +1 -0
  59. package/dist/tsup/common/log.d.cts +26 -0
  60. package/dist/tsup/common/log.d.ts +26 -0
  61. package/dist/tsup/common/log.js +21 -0
  62. package/dist/tsup/common/log.js.map +1 -0
  63. package/dist/tsup/common/websocket.cjs +10 -0
  64. package/dist/tsup/common/websocket.cjs.map +1 -0
  65. package/dist/tsup/common/websocket.d.cts +3 -0
  66. package/dist/tsup/common/websocket.d.ts +3 -0
  67. package/dist/tsup/common/websocket.js +10 -0
  68. package/dist/tsup/common/websocket.js.map +1 -0
  69. package/dist/tsup/common-CXCe7s6i.d.cts +218 -0
  70. package/dist/tsup/common-CXCe7s6i.d.ts +218 -0
  71. package/dist/tsup/connection-BI-6UIBJ.d.ts +2087 -0
  72. package/dist/tsup/connection-Dyd4NLGW.d.cts +2087 -0
  73. package/dist/tsup/driver-helpers/mod.cjs +30 -0
  74. package/dist/tsup/driver-helpers/mod.cjs.map +1 -0
  75. package/dist/tsup/driver-helpers/mod.d.cts +17 -0
  76. package/dist/tsup/driver-helpers/mod.d.ts +17 -0
  77. package/dist/tsup/driver-helpers/mod.js +30 -0
  78. package/dist/tsup/driver-helpers/mod.js.map +1 -0
  79. package/dist/tsup/driver-test-suite/mod.cjs +3411 -0
  80. package/dist/tsup/driver-test-suite/mod.cjs.map +1 -0
  81. package/dist/tsup/driver-test-suite/mod.d.cts +63 -0
  82. package/dist/tsup/driver-test-suite/mod.d.ts +63 -0
  83. package/dist/tsup/driver-test-suite/mod.js +3411 -0
  84. package/dist/tsup/driver-test-suite/mod.js.map +1 -0
  85. package/dist/tsup/inspector/mod.cjs +51 -0
  86. package/dist/tsup/inspector/mod.cjs.map +1 -0
  87. package/dist/tsup/inspector/mod.d.cts +408 -0
  88. package/dist/tsup/inspector/mod.d.ts +408 -0
  89. package/dist/tsup/inspector/mod.js +51 -0
  90. package/dist/tsup/inspector/mod.js.map +1 -0
  91. package/dist/tsup/mod.cjs +67 -0
  92. package/dist/tsup/mod.cjs.map +1 -0
  93. package/dist/tsup/mod.d.cts +105 -0
  94. package/dist/tsup/mod.d.ts +105 -0
  95. package/dist/tsup/mod.js +67 -0
  96. package/dist/tsup/mod.js.map +1 -0
  97. package/dist/tsup/router-endpoints-BTe_Rsdn.d.cts +65 -0
  98. package/dist/tsup/router-endpoints-CBSrKHmo.d.ts +65 -0
  99. package/dist/tsup/test/mod.cjs +17 -0
  100. package/dist/tsup/test/mod.cjs.map +1 -0
  101. package/dist/tsup/test/mod.d.cts +26 -0
  102. package/dist/tsup/test/mod.d.ts +26 -0
  103. package/dist/tsup/test/mod.js +17 -0
  104. package/dist/tsup/test/mod.js.map +1 -0
  105. package/dist/tsup/utils-fwx3o3K9.d.cts +18 -0
  106. package/dist/tsup/utils-fwx3o3K9.d.ts +18 -0
  107. package/dist/tsup/utils.cjs +26 -0
  108. package/dist/tsup/utils.cjs.map +1 -0
  109. package/dist/tsup/utils.d.cts +36 -0
  110. package/dist/tsup/utils.d.ts +36 -0
  111. package/dist/tsup/utils.js +26 -0
  112. package/dist/tsup/utils.js.map +1 -0
  113. package/package.json +208 -5
  114. package/src/actor/action.ts +178 -0
  115. package/src/actor/config.ts +497 -0
  116. package/src/actor/connection.ts +257 -0
  117. package/src/actor/context.ts +168 -0
  118. package/src/actor/database.ts +23 -0
  119. package/src/actor/definition.ts +82 -0
  120. package/src/actor/driver.ts +84 -0
  121. package/src/actor/errors.ts +422 -0
  122. package/src/actor/generic-conn-driver.ts +246 -0
  123. package/src/actor/instance.ts +1844 -0
  124. package/src/actor/keys.test.ts +266 -0
  125. package/src/actor/keys.ts +89 -0
  126. package/src/actor/log.ts +6 -0
  127. package/src/actor/mod.ts +108 -0
  128. package/src/actor/persisted.ts +42 -0
  129. package/src/actor/protocol/old.ts +297 -0
  130. package/src/actor/protocol/serde.ts +131 -0
  131. package/src/actor/router-endpoints.ts +688 -0
  132. package/src/actor/router.ts +265 -0
  133. package/src/actor/schedule.ts +17 -0
  134. package/src/actor/unstable-react.ts +110 -0
  135. package/src/actor/utils.ts +102 -0
  136. package/src/client/actor-common.ts +30 -0
  137. package/src/client/actor-conn.ts +865 -0
  138. package/src/client/actor-handle.ts +268 -0
  139. package/src/client/actor-query.ts +65 -0
  140. package/src/client/client.ts +554 -0
  141. package/src/client/config.ts +44 -0
  142. package/src/client/errors.ts +42 -0
  143. package/src/client/log.ts +5 -0
  144. package/src/client/mod.ts +60 -0
  145. package/src/client/raw-utils.ts +149 -0
  146. package/src/client/test.ts +44 -0
  147. package/src/client/utils.ts +152 -0
  148. package/src/common/eventsource-interface.ts +47 -0
  149. package/src/common/eventsource.ts +80 -0
  150. package/src/common/fake-event-source.ts +267 -0
  151. package/src/common/inline-websocket-adapter2.ts +454 -0
  152. package/src/common/log-levels.ts +27 -0
  153. package/src/common/log.ts +214 -0
  154. package/src/common/logfmt.ts +219 -0
  155. package/src/common/network.ts +2 -0
  156. package/src/common/router.ts +80 -0
  157. package/src/common/utils.ts +336 -0
  158. package/src/common/versioned-data.ts +95 -0
  159. package/src/common/websocket-interface.ts +49 -0
  160. package/src/common/websocket.ts +42 -0
  161. package/src/driver-helpers/mod.ts +22 -0
  162. package/src/driver-helpers/utils.ts +17 -0
  163. package/src/driver-test-suite/log.ts +5 -0
  164. package/src/driver-test-suite/mod.ts +239 -0
  165. package/src/driver-test-suite/tests/action-features.ts +136 -0
  166. package/src/driver-test-suite/tests/actor-conn-state.ts +249 -0
  167. package/src/driver-test-suite/tests/actor-conn.ts +349 -0
  168. package/src/driver-test-suite/tests/actor-driver.ts +25 -0
  169. package/src/driver-test-suite/tests/actor-error-handling.ts +158 -0
  170. package/src/driver-test-suite/tests/actor-handle.ts +292 -0
  171. package/src/driver-test-suite/tests/actor-inline-client.ts +152 -0
  172. package/src/driver-test-suite/tests/actor-inspector.ts +570 -0
  173. package/src/driver-test-suite/tests/actor-metadata.ts +116 -0
  174. package/src/driver-test-suite/tests/actor-onstatechange.ts +95 -0
  175. package/src/driver-test-suite/tests/actor-schedule.ts +108 -0
  176. package/src/driver-test-suite/tests/actor-sleep.ts +413 -0
  177. package/src/driver-test-suite/tests/actor-state.ts +54 -0
  178. package/src/driver-test-suite/tests/actor-vars.ts +93 -0
  179. package/src/driver-test-suite/tests/manager-driver.ts +367 -0
  180. package/src/driver-test-suite/tests/raw-http-direct-registry.ts +227 -0
  181. package/src/driver-test-suite/tests/raw-http-request-properties.ts +414 -0
  182. package/src/driver-test-suite/tests/raw-http.ts +347 -0
  183. package/src/driver-test-suite/tests/raw-websocket-direct-registry.ts +393 -0
  184. package/src/driver-test-suite/tests/raw-websocket.ts +484 -0
  185. package/src/driver-test-suite/tests/request-access.ts +230 -0
  186. package/src/driver-test-suite/utils.ts +71 -0
  187. package/src/drivers/default.ts +34 -0
  188. package/src/drivers/engine/actor-driver.ts +369 -0
  189. package/src/drivers/engine/config.ts +31 -0
  190. package/src/drivers/engine/kv.ts +3 -0
  191. package/src/drivers/engine/log.ts +5 -0
  192. package/src/drivers/engine/mod.ts +35 -0
  193. package/src/drivers/file-system/actor.ts +91 -0
  194. package/src/drivers/file-system/global-state.ts +686 -0
  195. package/src/drivers/file-system/log.ts +5 -0
  196. package/src/drivers/file-system/manager.ts +329 -0
  197. package/src/drivers/file-system/mod.ts +48 -0
  198. package/src/drivers/file-system/utils.ts +109 -0
  199. package/src/globals.d.ts +6 -0
  200. package/src/inspector/actor.ts +298 -0
  201. package/src/inspector/config.ts +88 -0
  202. package/src/inspector/log.ts +5 -0
  203. package/src/inspector/manager.ts +86 -0
  204. package/src/inspector/mod.ts +2 -0
  205. package/src/inspector/protocol/actor.ts +10 -0
  206. package/src/inspector/protocol/common.ts +196 -0
  207. package/src/inspector/protocol/manager.ts +10 -0
  208. package/src/inspector/protocol/mod.ts +2 -0
  209. package/src/inspector/utils.ts +76 -0
  210. package/src/manager/driver.ts +88 -0
  211. package/src/manager/hono-websocket-adapter.ts +342 -0
  212. package/src/manager/log.ts +5 -0
  213. package/src/manager/mod.ts +2 -0
  214. package/src/manager/protocol/mod.ts +24 -0
  215. package/src/manager/protocol/query.ts +89 -0
  216. package/src/manager/router.ts +412 -0
  217. package/src/manager-api/routes/actors-create.ts +16 -0
  218. package/src/manager-api/routes/actors-delete.ts +4 -0
  219. package/src/manager-api/routes/actors-get-by-id.ts +7 -0
  220. package/src/manager-api/routes/actors-get-or-create-by-id.ts +29 -0
  221. package/src/manager-api/routes/actors-get.ts +7 -0
  222. package/src/manager-api/routes/common.ts +18 -0
  223. package/src/mod.ts +18 -0
  224. package/src/registry/config.ts +32 -0
  225. package/src/registry/log.ts +5 -0
  226. package/src/registry/mod.ts +157 -0
  227. package/src/registry/run-config.ts +52 -0
  228. package/src/registry/serve.ts +52 -0
  229. package/src/remote-manager-driver/actor-http-client.ts +72 -0
  230. package/src/remote-manager-driver/actor-websocket-client.ts +63 -0
  231. package/src/remote-manager-driver/api-endpoints.ts +79 -0
  232. package/src/remote-manager-driver/api-utils.ts +43 -0
  233. package/src/remote-manager-driver/log.ts +5 -0
  234. package/src/remote-manager-driver/mod.ts +274 -0
  235. package/src/remote-manager-driver/ws-proxy.ts +180 -0
  236. package/src/schemas/actor-persist/mod.ts +1 -0
  237. package/src/schemas/actor-persist/versioned.ts +25 -0
  238. package/src/schemas/client-protocol/mod.ts +1 -0
  239. package/src/schemas/client-protocol/versioned.ts +63 -0
  240. package/src/schemas/file-system-driver/mod.ts +1 -0
  241. package/src/schemas/file-system-driver/versioned.ts +28 -0
  242. package/src/serde.ts +90 -0
  243. package/src/test/config.ts +16 -0
  244. package/src/test/log.ts +5 -0
  245. package/src/test/mod.ts +154 -0
  246. package/src/utils.ts +172 -0
@@ -0,0 +1,408 @@
1
+ import { A as ActorFeature } from '../common-CXCe7s6i.js';
2
+ export { d as Actor, a as ActorId, b as ActorLogEntry, c as ActorSchema, v as Build, B as BuildSchema, x as Builds, w as BuildsSchema, p as Column, o as ColumnSchema, r as Columns, q as ColumnsSchema, g as Connection, C as ConnectionSchema, z as CreateActor, y as CreateActorSchema, k as DatabaseQuery, D as DatabaseQuerySchema, s as ForeignKey, F as ForeignKeySchema, u as ForeignKeys, t as ForeignKeysSchema, e as Operation, O as OperationSchema, f as Patch, P as PatchSchema, h as RealtimeEvent, R as RealtimeEventSchema, j as RecordedRealtimeEvent, i as RecordedRealtimeEventSchema, l as Table, T as TableSchema, n as Tables, m as TablesSchema } from '../common-CXCe7s6i.js';
3
+ import * as hono_utils_http_status from 'hono/utils/http-status';
4
+ import * as hono_client from 'hono/client';
5
+ import { hc } from 'hono/client';
6
+ import * as z from 'zod/v4';
7
+
8
+ declare const client$1: {
9
+ ping: hono_client.ClientRequest<{
10
+ $get: {
11
+ input: {};
12
+ output: {
13
+ message: string;
14
+ };
15
+ outputFormat: "json";
16
+ status: 200;
17
+ };
18
+ }>;
19
+ } & {
20
+ state: hono_client.ClientRequest<{
21
+ $get: {
22
+ input: {};
23
+ output: {
24
+ enabled: boolean;
25
+ state: null;
26
+ };
27
+ outputFormat: "json";
28
+ status: 200;
29
+ };
30
+ } & {
31
+ $patch: {
32
+ input: {
33
+ json: {
34
+ patch: ({
35
+ op: "remove";
36
+ path: string;
37
+ } | {
38
+ op: "add";
39
+ path: string;
40
+ value: unknown;
41
+ } | {
42
+ op: "replace";
43
+ path: string;
44
+ value: unknown;
45
+ } | {
46
+ op: "move";
47
+ path: string;
48
+ from: string;
49
+ } | {
50
+ op: "copy";
51
+ path: string;
52
+ from: string;
53
+ } | {
54
+ op: "test";
55
+ path: string;
56
+ value: unknown;
57
+ })[];
58
+ } | {
59
+ replace: any;
60
+ };
61
+ };
62
+ output: {
63
+ enabled: boolean;
64
+ };
65
+ outputFormat: "json";
66
+ status: 200;
67
+ };
68
+ }>;
69
+ } & {
70
+ state: {
71
+ stream: hono_client.ClientRequest<{
72
+ $get: {
73
+ input: {};
74
+ output: {};
75
+ outputFormat: string;
76
+ status: hono_utils_http_status.StatusCode;
77
+ };
78
+ }>;
79
+ };
80
+ } & {
81
+ connections: hono_client.ClientRequest<{
82
+ $get: {
83
+ input: {};
84
+ output: {
85
+ connections: {
86
+ id: string;
87
+ params?: {
88
+ [x: string]: any;
89
+ } | undefined;
90
+ stateEnabled?: boolean | undefined;
91
+ state?: any;
92
+ auth?: {
93
+ [x: string]: any;
94
+ } | undefined;
95
+ }[];
96
+ };
97
+ outputFormat: "json";
98
+ status: 200;
99
+ };
100
+ }>;
101
+ } & {
102
+ connections: {
103
+ stream: hono_client.ClientRequest<{
104
+ $get: {
105
+ input: {};
106
+ output: {};
107
+ outputFormat: string;
108
+ status: hono_utils_http_status.StatusCode;
109
+ };
110
+ }>;
111
+ };
112
+ } & {
113
+ events: hono_client.ClientRequest<{
114
+ $get: {
115
+ input: {};
116
+ output: {
117
+ events: ({
118
+ type: "action";
119
+ name: string;
120
+ args: any[];
121
+ connId: string;
122
+ id: string;
123
+ timestamp: number;
124
+ } | {
125
+ type: "broadcast";
126
+ eventName: string;
127
+ args: any[];
128
+ id: string;
129
+ timestamp: number;
130
+ } | {
131
+ type: "subscribe";
132
+ eventName: string;
133
+ connId: string;
134
+ id: string;
135
+ timestamp: number;
136
+ } | {
137
+ type: "unsubscribe";
138
+ eventName: string;
139
+ connId: string;
140
+ id: string;
141
+ timestamp: number;
142
+ } | {
143
+ type: "event";
144
+ eventName: string;
145
+ args: any[];
146
+ connId: string;
147
+ id: string;
148
+ timestamp: number;
149
+ })[];
150
+ };
151
+ outputFormat: "json";
152
+ status: 200;
153
+ };
154
+ }>;
155
+ } & {
156
+ events: {
157
+ clear: hono_client.ClientRequest<{
158
+ $post: {
159
+ input: {};
160
+ output: {
161
+ message: string;
162
+ };
163
+ outputFormat: "json";
164
+ status: 200;
165
+ };
166
+ }>;
167
+ };
168
+ } & {
169
+ events: {
170
+ stream: hono_client.ClientRequest<{
171
+ $get: {
172
+ input: {};
173
+ output: {};
174
+ outputFormat: string;
175
+ status: hono_utils_http_status.StatusCode;
176
+ };
177
+ }>;
178
+ };
179
+ } & {
180
+ rpcs: hono_client.ClientRequest<{
181
+ $get: {
182
+ input: {};
183
+ output: {
184
+ rpcs: string[];
185
+ };
186
+ outputFormat: "json";
187
+ status: 200;
188
+ };
189
+ }>;
190
+ } & {
191
+ db: hono_client.ClientRequest<{
192
+ $get: {
193
+ input: {};
194
+ output: {
195
+ enabled: boolean;
196
+ db: null;
197
+ };
198
+ outputFormat: "json";
199
+ status: 200;
200
+ } | {
201
+ input: {};
202
+ output: {
203
+ enabled: boolean;
204
+ db: {
205
+ table: {
206
+ schema: string;
207
+ name: string;
208
+ type: "table" | "view";
209
+ };
210
+ columns: {
211
+ cid: number;
212
+ name: string;
213
+ type: "integer" | "blob" | "text" | "real" | "numeric" | "serial";
214
+ notnull: boolean;
215
+ dflt_value: string | null;
216
+ pk: boolean | null;
217
+ }[];
218
+ foreignKeys: {
219
+ id: number;
220
+ table: string;
221
+ from: string;
222
+ to: string;
223
+ }[];
224
+ records: any;
225
+ }[];
226
+ };
227
+ outputFormat: "json";
228
+ status: 200;
229
+ };
230
+ } & {
231
+ $post: {
232
+ input: {
233
+ json: {
234
+ query: string;
235
+ params?: any[] | undefined;
236
+ };
237
+ };
238
+ output: {
239
+ enabled: boolean;
240
+ };
241
+ outputFormat: "json";
242
+ status: 200;
243
+ } | {
244
+ input: {
245
+ json: {
246
+ query: string;
247
+ params?: any[] | undefined;
248
+ };
249
+ };
250
+ output: {
251
+ error: string;
252
+ };
253
+ outputFormat: "json";
254
+ status: 500;
255
+ };
256
+ }>;
257
+ };
258
+ type ActorInspectorClient = typeof client$1;
259
+ declare const createActorInspectorClient: (...args: Parameters<typeof hc>) => ActorInspectorClient;
260
+
261
+ declare const client: {
262
+ ping: hono_client.ClientRequest<{
263
+ $get: {
264
+ input: {};
265
+ output: {
266
+ message: string;
267
+ };
268
+ outputFormat: "json";
269
+ status: 200;
270
+ };
271
+ }>;
272
+ } & {
273
+ actors: hono_client.ClientRequest<{
274
+ $get: {
275
+ input: {};
276
+ output: "Invalid limit";
277
+ outputFormat: "json";
278
+ status: 400;
279
+ } | {
280
+ input: {};
281
+ output: {
282
+ id: string & z.$brand<"ActorId">;
283
+ name: string;
284
+ key: string[];
285
+ tags?: {
286
+ [x: string]: string;
287
+ } | undefined;
288
+ region?: string | undefined;
289
+ createdAt?: string | undefined;
290
+ startedAt?: string | undefined;
291
+ destroyedAt?: string | undefined;
292
+ features?: ActorFeature[] | undefined;
293
+ }[];
294
+ outputFormat: "json";
295
+ status: 200;
296
+ } | {
297
+ input: {};
298
+ output: "Failed to fetch actors";
299
+ outputFormat: "json";
300
+ status: 500;
301
+ };
302
+ } & {
303
+ $post: {
304
+ input: {
305
+ json: {
306
+ name: string;
307
+ key: string[];
308
+ input: any;
309
+ };
310
+ };
311
+ output: {
312
+ id: string & z.$brand<"ActorId">;
313
+ name: string;
314
+ key: string[];
315
+ tags?: {
316
+ [x: string]: string;
317
+ } | undefined;
318
+ region?: string | undefined;
319
+ createdAt?: string | undefined;
320
+ startedAt?: string | undefined;
321
+ destroyedAt?: string | undefined;
322
+ features?: ActorFeature[] | undefined;
323
+ } | null;
324
+ outputFormat: "json";
325
+ status: 201;
326
+ };
327
+ }>;
328
+ } & {
329
+ builds: hono_client.ClientRequest<{
330
+ $get: {
331
+ input: {};
332
+ output: {
333
+ name: string;
334
+ createdAt?: string | undefined;
335
+ tags?: {
336
+ [x: string]: string;
337
+ } | undefined;
338
+ }[];
339
+ outputFormat: "json";
340
+ status: 200;
341
+ };
342
+ }>;
343
+ } & {
344
+ actor: {
345
+ ":id": hono_client.ClientRequest<{
346
+ $get: {
347
+ input: {
348
+ param: {
349
+ id: string;
350
+ };
351
+ };
352
+ output: {
353
+ error: string;
354
+ };
355
+ outputFormat: "json";
356
+ status: 404;
357
+ } | {
358
+ input: {
359
+ param: {
360
+ id: string;
361
+ };
362
+ };
363
+ output: {
364
+ id: string & z.$brand<"ActorId">;
365
+ name: string;
366
+ key: string[];
367
+ tags?: {
368
+ [x: string]: string;
369
+ } | undefined;
370
+ region?: string | undefined;
371
+ createdAt?: string | undefined;
372
+ startedAt?: string | undefined;
373
+ destroyedAt?: string | undefined;
374
+ features?: ActorFeature[] | undefined;
375
+ };
376
+ outputFormat: "json";
377
+ status: 200;
378
+ };
379
+ }>;
380
+ };
381
+ } & {
382
+ bootstrap: hono_client.ClientRequest<{
383
+ $get: {
384
+ input: {};
385
+ output: {
386
+ actors: {
387
+ id: string & z.$brand<"ActorId">;
388
+ name: string;
389
+ key: string[];
390
+ tags?: {
391
+ [x: string]: string;
392
+ } | undefined;
393
+ region?: string | undefined;
394
+ createdAt?: string | undefined;
395
+ startedAt?: string | undefined;
396
+ destroyedAt?: string | undefined;
397
+ features?: ActorFeature[] | undefined;
398
+ }[];
399
+ };
400
+ outputFormat: "json";
401
+ status: 200;
402
+ };
403
+ }>;
404
+ };
405
+ type ManagerInspectorClient = typeof client;
406
+ declare const createManagerInspectorClient: (...args: Parameters<typeof hc>) => ManagerInspectorClient;
407
+
408
+ export { ActorFeature, type ActorInspectorClient, type ManagerInspectorClient, createActorInspectorClient, createManagerInspectorClient };
@@ -0,0 +1,51 @@
1
+ import {
2
+ ActorFeature,
3
+ ActorId,
4
+ ActorLogEntry,
5
+ ActorSchema,
6
+ BuildSchema,
7
+ BuildsSchema,
8
+ ColumnSchema,
9
+ ColumnsSchema,
10
+ ConnectionSchema,
11
+ CreateActorSchema,
12
+ DatabaseQuerySchema,
13
+ ForeignKeySchema,
14
+ ForeignKeysSchema,
15
+ OperationSchema,
16
+ PatchSchema,
17
+ RealtimeEventSchema,
18
+ RecordedRealtimeEventSchema,
19
+ TableSchema,
20
+ TablesSchema,
21
+ createActorInspectorClient,
22
+ createManagerInspectorClient
23
+ } from "../chunk-H26RP6GD.js";
24
+ import "../chunk-HLLF4B4Q.js";
25
+ import "../chunk-LV2S3OU3.js";
26
+ import "../chunk-PQY7KKTL.js";
27
+ import "../chunk-NFU2BBT5.js";
28
+ export {
29
+ ActorFeature,
30
+ ActorId,
31
+ ActorLogEntry,
32
+ ActorSchema,
33
+ BuildSchema,
34
+ BuildsSchema,
35
+ ColumnSchema,
36
+ ColumnsSchema,
37
+ ConnectionSchema,
38
+ CreateActorSchema,
39
+ DatabaseQuerySchema,
40
+ ForeignKeySchema,
41
+ ForeignKeysSchema,
42
+ OperationSchema,
43
+ PatchSchema,
44
+ RealtimeEventSchema,
45
+ RecordedRealtimeEventSchema,
46
+ TableSchema,
47
+ TablesSchema,
48
+ createActorInspectorClient,
49
+ createManagerInspectorClient
50
+ };
51
+ //# sourceMappingURL=mod.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,67 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
+
3
+
4
+
5
+
6
+
7
+
8
+
9
+
10
+
11
+
12
+
13
+
14
+
15
+
16
+
17
+ var _chunkVO7ZRVVDcjs = require('./chunk-VO7ZRVVD.cjs');
18
+ require('./chunk-LWNKVZG5.cjs');
19
+ require('./chunk-QNNXFOQV.cjs');
20
+ require('./chunk-WHBPJNGW.cjs');
21
+
22
+
23
+
24
+
25
+
26
+
27
+
28
+
29
+
30
+ var _chunkGICQ3YCUcjs = require('./chunk-GICQ3YCU.cjs');
31
+ require('./chunk-4CXBCT26.cjs');
32
+
33
+
34
+
35
+ var _chunk6LJT3QRLcjs = require('./chunk-6LJT3QRL.cjs');
36
+
37
+
38
+ var _chunkSBHHJ6QScjs = require('./chunk-SBHHJ6QS.cjs');
39
+
40
+
41
+
42
+
43
+
44
+
45
+
46
+
47
+
48
+
49
+
50
+
51
+
52
+
53
+
54
+
55
+
56
+
57
+
58
+
59
+
60
+
61
+
62
+
63
+
64
+
65
+
66
+ exports.ALLOWED_PUBLIC_HEADERS = _chunkGICQ3YCUcjs.ALLOWED_PUBLIC_HEADERS; exports.CONNECTION_DRIVER_HTTP = _chunkGICQ3YCUcjs.CONNECTION_DRIVER_HTTP; exports.CONNECTION_DRIVER_SSE = _chunkGICQ3YCUcjs.CONNECTION_DRIVER_SSE; exports.CONNECTION_DRIVER_WEBSOCKET = _chunkGICQ3YCUcjs.CONNECTION_DRIVER_WEBSOCKET; exports.GenericConnGlobalState = _chunkVO7ZRVVDcjs.GenericConnGlobalState; exports.InlineWebSocketAdapter2 = _chunkVO7ZRVVDcjs.InlineWebSocketAdapter2; exports.PATH_CONNECT_WEBSOCKET = _chunkVO7ZRVVDcjs.PATH_CONNECT_WEBSOCKET; exports.PATH_RAW_WEBSOCKET_PREFIX = _chunkVO7ZRVVDcjs.PATH_RAW_WEBSOCKET_PREFIX; exports.Registry = _chunkVO7ZRVVDcjs.Registry; exports.RegistryConfigSchema = _chunkVO7ZRVVDcjs.RegistryConfigSchema; exports.UserError = _chunkSBHHJ6QScjs.UserError; exports.actor = _chunkVO7ZRVVDcjs.actor; exports.createActorRouter = _chunkVO7ZRVVDcjs.createActorRouter; exports.createClientWithDriver = _chunkVO7ZRVVDcjs.createClientWithDriver; exports.createEngineDriver = _chunkVO7ZRVVDcjs.createEngineDriver; exports.createFileSystemDriver = _chunkVO7ZRVVDcjs.createFileSystemDriver; exports.createGenericConnDrivers = _chunkVO7ZRVVDcjs.createGenericConnDrivers; exports.createMemoryDriver = _chunkVO7ZRVVDcjs.createMemoryDriver; exports.generateConnId = _chunkGICQ3YCUcjs.generateConnId; exports.generateConnToken = _chunkGICQ3YCUcjs.generateConnToken; exports.handleRawWebSocketHandler = _chunkGICQ3YCUcjs.handleRawWebSocketHandler; exports.handleWebSocketConnect = _chunkGICQ3YCUcjs.handleWebSocketConnect; exports.lookupInRegistry = _chunkVO7ZRVVDcjs.lookupInRegistry; exports.noopNext = _chunk6LJT3QRLcjs.noopNext; exports.setup = _chunkVO7ZRVVDcjs.setup; exports.toUint8Array = _chunk6LJT3QRLcjs.toUint8Array;
67
+ //# sourceMappingURL=mod.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["/Users/nathan/rivetkit/packages/rivetkit/dist/tsup/mod.cjs"],"names":[],"mappings":"AAAA;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,wDAA6B;AAC7B,gCAA6B;AAC7B,gCAA6B;AAC7B,gCAA6B;AAC7B;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,wDAA6B;AAC7B,gCAA6B;AAC7B;AACE;AACA;AACF,wDAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,ysDAAC","file":"/Users/nathan/rivetkit/packages/rivetkit/dist/tsup/mod.cjs"}
@@ -0,0 +1,105 @@
1
+ import { R as RunConfig, A as ActorDriver, a as AnyDatabaseProvider, b as Actions, c as ActorConfigInput, d as ActorDefinition, D as DriverConfig } from './connection-Dyd4NLGW.cjs';
2
+ export { n as ActionContext, v as ActionContextOf, K as ActorConfig, H as ActorConfigSchema, u as ActorContext, w as ActorContextOf, m as ActorKey, i as ActorQuery, F as ActorTypes, x as AnyActorDefinition, B as AnyActorInstance, f as AnyClient, J as AuthIntent, r as CONNECTION_DRIVER_HTTP, s as CONNECTION_DRIVER_SSE, t as CONNECTION_DRIVER_WEBSOCKET, C as Client, o as Conn, p as ConnectionDriver, q as ConnectionStatus, E as Encoding, G as GenericConnGlobalState, I as InitContext, O as OnConnectOptions, Q as Registry, N as RegistryActors, M as RegistryConfig, P as RegistryConfigSchema, j as RivetCloseEvent, k as RivetEvent, l as RivetMessageEvent, U as UniversalWebSocket, h as createClientWithDriver, z as createGenericConnDrivers, g as generateConnId, e as generateConnToken, y as lookupInRegistry, S as setup, L as test } from './connection-Dyd4NLGW.cjs';
3
+ export { A as ALLOWED_PUBLIC_HEADERS, I as InlineWebSocketAdapter2, U as UpgradeWebSocketArgs, h as handleRawWebSocketHandler, a as handleWebSocketConnect } from './router-endpoints-BTe_Rsdn.cjs';
4
+ export { n as noopNext } from './utils-fwx3o3K9.cjs';
5
+ import * as hono_types from 'hono/types';
6
+ import { Hono } from 'hono';
7
+ import { z } from 'zod';
8
+ export { toUint8Array } from './utils.cjs';
9
+ export { UserError, UserErrorOptions } from './actor/errors.cjs';
10
+ import 'pino';
11
+ import 'nanoevents';
12
+ import './common-CXCe7s6i.cjs';
13
+ import 'zod/v4';
14
+ import 'hono/streaming';
15
+ import 'hono/ws';
16
+ import 'hono/utils/http-status';
17
+
18
+ interface UniversalEvent {
19
+ type: string;
20
+ target?: any;
21
+ currentTarget?: any;
22
+ }
23
+ interface UniversalMessageEvent extends UniversalEvent {
24
+ data: string;
25
+ lastEventId: string;
26
+ origin: string;
27
+ }
28
+ interface UniversalErrorEvent extends UniversalEvent {
29
+ message: string;
30
+ filename?: string;
31
+ lineno?: number;
32
+ colno?: number;
33
+ error?: any;
34
+ }
35
+ /**
36
+ * Common EventSource interface that can be implemented by different EventSource-like classes
37
+ * This is compatible with the standard EventSource API but allows for custom implementations
38
+ */
39
+ interface UniversalEventSource {
40
+ readonly CONNECTING: 0;
41
+ readonly OPEN: 1;
42
+ readonly CLOSED: 2;
43
+ readonly readyState: 0 | 1 | 2;
44
+ readonly url: string;
45
+ readonly withCredentials: boolean;
46
+ close(): void;
47
+ addEventListener(type: string, listener: (event: any) => void): void;
48
+ removeEventListener(type: string, listener: (event: any) => void): void;
49
+ dispatchEvent(event: UniversalEvent): boolean;
50
+ onopen?: ((event: UniversalEvent) => void) | null;
51
+ onmessage?: ((event: UniversalMessageEvent) => void) | null;
52
+ onerror?: ((event: UniversalErrorEvent) => void) | null;
53
+ }
54
+
55
+ declare const PATH_CONNECT_WEBSOCKET = "/connect/websocket";
56
+ declare const PATH_RAW_WEBSOCKET_PREFIX = "/raw/websocket/";
57
+
58
+ interface ActorRouterBindings {
59
+ actorId: string;
60
+ }
61
+ type ActorRouter = Hono<{
62
+ Bindings: ActorRouterBindings;
63
+ }>;
64
+ /**
65
+ * Creates a router that runs on the partitioned instance.
66
+ */
67
+ declare function createActorRouter(runConfig: RunConfig, actorDriver: ActorDriver): ActorRouter;
68
+
69
+ declare function actor<TState, TConnParams, TConnState, TVars, TInput, TDatabase extends AnyDatabaseProvider, TActions extends Actions<TState, TConnParams, TConnState, TVars, TInput, TDatabase>>(input: ActorConfigInput<TState, TConnParams, TConnState, TVars, TInput, TDatabase, TActions>): ActorDefinition<TState, TConnParams, TConnState, TVars, TInput, TDatabase, TActions>;
70
+
71
+ declare const ConfigSchema: z.ZodDefault<z.ZodObject<{
72
+ app: z.ZodOptional<z.ZodType<Hono<hono_types.BlankEnv, hono_types.BlankSchema, "/">, z.ZodTypeDef, Hono<hono_types.BlankEnv, hono_types.BlankSchema, "/">>>;
73
+ endpoint: z.ZodDefault<z.ZodString>;
74
+ pegboardEndpoint: z.ZodOptional<z.ZodString>;
75
+ namespace: z.ZodDefault<z.ZodString>;
76
+ runnerName: z.ZodDefault<z.ZodString>;
77
+ runnerKey: z.ZodDefault<z.ZodString>;
78
+ totalSlots: z.ZodDefault<z.ZodNumber>;
79
+ }, "strip", z.ZodTypeAny, {
80
+ endpoint: string;
81
+ namespace: string;
82
+ runnerName: string;
83
+ runnerKey: string;
84
+ totalSlots: number;
85
+ app?: Hono<hono_types.BlankEnv, hono_types.BlankSchema, "/"> | undefined;
86
+ pegboardEndpoint?: string | undefined;
87
+ }, {
88
+ endpoint?: string | undefined;
89
+ namespace?: string | undefined;
90
+ runnerName?: string | undefined;
91
+ app?: Hono<hono_types.BlankEnv, hono_types.BlankSchema, "/"> | undefined;
92
+ pegboardEndpoint?: string | undefined;
93
+ runnerKey?: string | undefined;
94
+ totalSlots?: number | undefined;
95
+ }>>;
96
+ type InputConfig = z.input<typeof ConfigSchema>;
97
+
98
+ declare function createEngineDriver(inputConfig?: InputConfig): DriverConfig;
99
+
100
+ declare function createFileSystemDriver(opts?: {
101
+ path?: string;
102
+ }): DriverConfig;
103
+ declare function createMemoryDriver(): DriverConfig;
104
+
105
+ export { Actions, ActorConfigInput, ActorDefinition, type ActorRouter, DriverConfig, PATH_CONNECT_WEBSOCKET, PATH_RAW_WEBSOCKET_PREFIX, RunConfig, type UniversalErrorEvent, type UniversalEvent, type UniversalEventSource, type UniversalMessageEvent, actor, createActorRouter, createEngineDriver, createFileSystemDriver, createMemoryDriver };