@rikalabs/akter 0.1.0-alpha.0 → 0.1.0-alpha.3

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 (308) hide show
  1. package/CHANGELOG.md +46 -3
  2. package/README.md +2 -2
  3. package/dist/actor/definition.d.ts +13 -9
  4. package/dist/actor/descriptor.d.ts +2 -2
  5. package/dist/actor/descriptor.js +4 -4
  6. package/dist/client/calls.js +1 -1
  7. package/dist/client/index.d.ts +1 -1
  8. package/dist/client/index.js +1 -1
  9. package/dist/errors/actor.d.ts +12 -42
  10. package/dist/errors/actor.js +13 -42
  11. package/dist/index.d.ts +1 -1
  12. package/dist/index.js +1 -1
  13. package/dist/members/payload.d.ts +1 -1
  14. package/dist/protocol/inspection.d.ts +221 -1
  15. package/dist/protocol/inspection.js +151 -2
  16. package/dist/protocol/wire.d.ts +6 -49
  17. package/dist/protocol/wire.js +1 -10
  18. package/dist/runtime/actors.d.ts +3 -0
  19. package/dist/runtime/adoption/backfill.js +1 -1
  20. package/dist/runtime/adoption/enforce.js +2 -2
  21. package/dist/runtime/adoption/observe.js +1 -1
  22. package/dist/runtime/adoption/plan.d.ts +1 -1
  23. package/dist/runtime/adoption/startup.js +1 -1
  24. package/dist/runtime/adoption/status.d.ts +1 -1
  25. package/dist/runtime/app.d.ts +65 -0
  26. package/dist/runtime/app.js +38 -0
  27. package/dist/runtime/connections/holder.d.ts +11 -1
  28. package/dist/runtime/connections/holder.js +8 -4
  29. package/dist/runtime/connections/streams.d.ts +4 -4
  30. package/dist/runtime/content/store.js +15 -11
  31. package/dist/runtime/database/bounded.d.ts +4 -18
  32. package/dist/runtime/database/bounded.js +36 -22
  33. package/dist/runtime/database/coordination.d.ts +12 -3
  34. package/dist/runtime/database/coordination.js +29 -36
  35. package/dist/runtime/database/migrations.d.ts +61 -29
  36. package/dist/runtime/database/migrations.js +375 -139
  37. package/dist/runtime/database/replica.d.ts +4 -1
  38. package/dist/runtime/database/replica.js +4 -1
  39. package/dist/runtime/database/schema.d.ts +13 -0
  40. package/dist/runtime/database/schema.js +13 -0
  41. package/dist/runtime/database/shards.d.ts +31 -13
  42. package/dist/runtime/database/shards.js +38 -26
  43. package/dist/runtime/entity/register.d.ts +8 -1
  44. package/dist/runtime/entity/register.js +58 -7
  45. package/dist/runtime/fleet/checks.js +4 -4
  46. package/dist/runtime/fleet/maintainer.d.ts +1 -1
  47. package/dist/runtime/fleet/maintainer.js +1 -1
  48. package/dist/runtime/index.d.ts +2 -0
  49. package/dist/runtime/index.js +1 -0
  50. package/dist/runtime/inspector/layer.d.ts +20 -0
  51. package/dist/runtime/inspector/layer.js +224 -5
  52. package/dist/runtime/inspector/queries.d.ts +54 -8
  53. package/dist/runtime/inspector/queries.js +84 -15
  54. package/dist/runtime/layer.d.ts +48 -39
  55. package/dist/runtime/layer.js +124 -56
  56. package/dist/runtime/operators/audit.d.ts +3 -0
  57. package/dist/runtime/operators/audit.js +6 -2
  58. package/dist/runtime/operators/repair.js +30 -10
  59. package/dist/runtime/operators/seed.js +4 -2
  60. package/dist/runtime/payloads/versions.d.ts +4 -4
  61. package/dist/runtime/payloads/versions.js +24 -15
  62. package/dist/runtime/queries.js +4 -2
  63. package/dist/runtime/registration.d.ts +5 -2
  64. package/dist/runtime/registration.js +3 -3
  65. package/dist/runtime/runner.d.ts +12 -0
  66. package/dist/runtime/runner.js +12 -0
  67. package/dist/runtime/storage/codec.d.ts +19 -7
  68. package/dist/runtime/storage/codec.js +23 -7
  69. package/dist/runtime/storage/placements.d.ts +6 -1
  70. package/dist/runtime/storage/placements.js +98 -6
  71. package/dist/runtime/storage/retention.d.ts +6 -0
  72. package/dist/runtime/storage/retention.js +25 -13
  73. package/dist/runtime/subscriptions/relay.js +47 -44
  74. package/dist/runtime/subscriptions/storage.d.ts +3 -2
  75. package/dist/runtime/subscriptions/storage.js +9 -6
  76. package/dist/runtime/telemetry/live.d.ts +255 -0
  77. package/dist/runtime/telemetry/live.js +540 -0
  78. package/dist/runtime/telemetry/metrics.d.ts +2 -0
  79. package/dist/runtime/telemetry/metrics.js +4 -1
  80. package/dist/runtime/telemetry/sampler.js +33 -13
  81. package/dist/runtime/telemetry/spans.d.ts +1 -1
  82. package/dist/runtime/telemetry/spans.js +1 -1
  83. package/dist/runtime/topology/locks.d.ts +6 -3
  84. package/dist/runtime/topology/locks.js +27 -4
  85. package/dist/runtime/turn/execute.d.ts +2 -0
  86. package/dist/runtime/turn/execute.js +5 -2
  87. package/dist/runtime/turn/pipeline.d.ts +5 -12
  88. package/dist/runtime/turn/pipeline.js +11 -11
  89. package/dist/runtime/turn/relay.d.ts +13 -3
  90. package/dist/runtime/turn/relay.js +27 -14
  91. package/dist/runtime/turn/rows.js +4 -4
  92. package/dist/runtime/workflows/compatibility.d.ts +1 -1
  93. package/dist/runtime/workflows/compatibility.js +85 -31
  94. package/dist/runtime/workflows/engine.js +20 -17
  95. package/dist/serve/layer.js +3 -2
  96. package/dist/tables/owned.d.ts +1 -1
  97. package/dist/tables/owned.js +1 -1
  98. package/dist/testing/actor-test.d.ts +2 -24
  99. package/dist/testing/actor-test.js +1 -27
  100. package/dist/testing/index.d.ts +0 -12
  101. package/dist/testing/index.js +0 -6
  102. package/package.json +1 -1
  103. package/dist/runtime/database/neki/migrations.d.ts +0 -31
  104. package/dist/runtime/database/neki/migrations.js +0 -276
  105. package/dist/runtime/database/neki/session.d.ts +0 -23
  106. package/dist/runtime/database/neki/session.js +0 -31
  107. package/dist/testing/cluster.d.ts +0 -93
  108. package/dist/testing/cluster.js +0 -296
  109. package/dist/testing/conformance/access.d.ts +0 -5
  110. package/dist/testing/conformance/access.js +0 -531
  111. package/dist/testing/conformance/admission.d.ts +0 -11
  112. package/dist/testing/conformance/admission.js +0 -182
  113. package/dist/testing/conformance/adoption.d.ts +0 -2
  114. package/dist/testing/conformance/adoption.js +0 -1019
  115. package/dist/testing/conformance/assertions.d.ts +0 -202
  116. package/dist/testing/conformance/assertions.js +0 -849
  117. package/dist/testing/conformance/batches.d.ts +0 -41
  118. package/dist/testing/conformance/batches.js +0 -388
  119. package/dist/testing/conformance/blobs.d.ts +0 -14
  120. package/dist/testing/conformance/blobs.js +0 -405
  121. package/dist/testing/conformance/capacity.d.ts +0 -8
  122. package/dist/testing/conformance/capacity.js +0 -433
  123. package/dist/testing/conformance/client.d.ts +0 -5
  124. package/dist/testing/conformance/client.js +0 -719
  125. package/dist/testing/conformance/cold-serve.d.ts +0 -16
  126. package/dist/testing/conformance/cold-serve.js +0 -254
  127. package/dist/testing/conformance/connections/actors.d.ts +0 -1143
  128. package/dist/testing/conformance/connections/actors.js +0 -180
  129. package/dist/testing/conformance/connections/harness.d.ts +0 -1754
  130. package/dist/testing/conformance/connections/harness.js +0 -142
  131. package/dist/testing/conformance/connections/holders.d.ts +0 -4
  132. package/dist/testing/conformance/connections/holders.js +0 -165
  133. package/dist/testing/conformance/connections/lifecycle.d.ts +0 -4
  134. package/dist/testing/conformance/connections/lifecycle.js +0 -113
  135. package/dist/testing/conformance/connections/limits.d.ts +0 -4
  136. package/dist/testing/conformance/connections/limits.js +0 -127
  137. package/dist/testing/conformance/connections/reauthorization.d.ts +0 -4
  138. package/dist/testing/conformance/connections/reauthorization.js +0 -170
  139. package/dist/testing/conformance/connections/resync.d.ts +0 -4
  140. package/dist/testing/conformance/connections/resync.js +0 -360
  141. package/dist/testing/conformance/connections/takeover.d.ts +0 -4
  142. package/dist/testing/conformance/connections/takeover.js +0 -287
  143. package/dist/testing/conformance/connections.d.ts +0 -4
  144. package/dist/testing/conformance/connections.js +0 -15
  145. package/dist/testing/conformance/content-blobs.d.ts +0 -16
  146. package/dist/testing/conformance/content-blobs.js +0 -534
  147. package/dist/testing/conformance/counter.d.ts +0 -16
  148. package/dist/testing/conformance/counter.js +0 -813
  149. package/dist/testing/conformance/cron.d.ts +0 -5
  150. package/dist/testing/conformance/cron.js +0 -665
  151. package/dist/testing/conformance/drain.d.ts +0 -26
  152. package/dist/testing/conformance/drain.js +0 -540
  153. package/dist/testing/conformance/effect-control.d.ts +0 -38
  154. package/dist/testing/conformance/effect-control.js +0 -1059
  155. package/dist/testing/conformance/effects.d.ts +0 -23
  156. package/dist/testing/conformance/effects.js +0 -432
  157. package/dist/testing/conformance/events.d.ts +0 -28
  158. package/dist/testing/conformance/events.js +0 -335
  159. package/dist/testing/conformance/export.d.ts +0 -2
  160. package/dist/testing/conformance/export.js +0 -368
  161. package/dist/testing/conformance/fleet.d.ts +0 -444
  162. package/dist/testing/conformance/fleet.js +0 -1009
  163. package/dist/testing/conformance/groups.d.ts +0 -7
  164. package/dist/testing/conformance/groups.js +0 -353
  165. package/dist/testing/conformance/heap.d.ts +0 -3
  166. package/dist/testing/conformance/heap.js +0 -149
  167. package/dist/testing/conformance/http.d.ts +0 -2809
  168. package/dist/testing/conformance/http.js +0 -1234
  169. package/dist/testing/conformance/inspection-views.d.ts +0 -8
  170. package/dist/testing/conformance/inspection-views.js +0 -272
  171. package/dist/testing/conformance/inspector.d.ts +0 -7
  172. package/dist/testing/conformance/inspector.js +0 -650
  173. package/dist/testing/conformance/mint.d.ts +0 -58
  174. package/dist/testing/conformance/mint.js +0 -692
  175. package/dist/testing/conformance/multi-runner.d.ts +0 -8
  176. package/dist/testing/conformance/multi-runner.js +0 -403
  177. package/dist/testing/conformance/neki/plan.d.ts +0 -19
  178. package/dist/testing/conformance/neki/plan.js +0 -30
  179. package/dist/testing/conformance/observability.d.ts +0 -3
  180. package/dist/testing/conformance/observability.js +0 -343
  181. package/dist/testing/conformance/offline.d.ts +0 -4
  182. package/dist/testing/conformance/offline.js +0 -474
  183. package/dist/testing/conformance/operator-harness.d.ts +0 -57
  184. package/dist/testing/conformance/operator-harness.js +0 -78
  185. package/dist/testing/conformance/operator.d.ts +0 -3
  186. package/dist/testing/conformance/operator.js +0 -379
  187. package/dist/testing/conformance/outbox-cross-shard.d.ts +0 -14
  188. package/dist/testing/conformance/outbox-cross-shard.js +0 -160
  189. package/dist/testing/conformance/outbox.d.ts +0 -36
  190. package/dist/testing/conformance/outbox.js +0 -437
  191. package/dist/testing/conformance/payload-migrations.d.ts +0 -3
  192. package/dist/testing/conformance/payload-migrations.js +0 -612
  193. package/dist/testing/conformance/pipeline.d.ts +0 -3
  194. package/dist/testing/conformance/pipeline.js +0 -1040
  195. package/dist/testing/conformance/placement.d.ts +0 -22
  196. package/dist/testing/conformance/placement.js +0 -539
  197. package/dist/testing/conformance/platform.d.ts +0 -40
  198. package/dist/testing/conformance/platform.js +0 -101
  199. package/dist/testing/conformance/progress.d.ts +0 -39
  200. package/dist/testing/conformance/progress.js +0 -666
  201. package/dist/testing/conformance/properties.d.ts +0 -6
  202. package/dist/testing/conformance/properties.js +0 -295
  203. package/dist/testing/conformance/protocols.d.ts +0 -4
  204. package/dist/testing/conformance/protocols.js +0 -618
  205. package/dist/testing/conformance/provider/advertise.d.ts +0 -21
  206. package/dist/testing/conformance/provider/advertise.js +0 -44
  207. package/dist/testing/conformance/read-your-writes.d.ts +0 -20
  208. package/dist/testing/conformance/read-your-writes.js +0 -192
  209. package/dist/testing/conformance/reducers.d.ts +0 -8
  210. package/dist/testing/conformance/reducers.js +0 -258
  211. package/dist/testing/conformance/relay.d.ts +0 -42
  212. package/dist/testing/conformance/relay.js +0 -1115
  213. package/dist/testing/conformance/restore.d.ts +0 -43
  214. package/dist/testing/conformance/restore.js +0 -341
  215. package/dist/testing/conformance/retention.d.ts +0 -14
  216. package/dist/testing/conformance/retention.js +0 -463
  217. package/dist/testing/conformance/rls.d.ts +0 -24
  218. package/dist/testing/conformance/rls.js +0 -576
  219. package/dist/testing/conformance/simulation.d.ts +0 -31
  220. package/dist/testing/conformance/simulation.js +0 -167
  221. package/dist/testing/conformance/single-shard.d.ts +0 -2
  222. package/dist/testing/conformance/single-shard.js +0 -125
  223. package/dist/testing/conformance/singleton.d.ts +0 -3
  224. package/dist/testing/conformance/singleton.js +0 -293
  225. package/dist/testing/conformance/statements.d.ts +0 -60
  226. package/dist/testing/conformance/statements.js +0 -108
  227. package/dist/testing/conformance/streams.d.ts +0 -7
  228. package/dist/testing/conformance/streams.js +0 -280
  229. package/dist/testing/conformance/subscriptions/access.d.ts +0 -4
  230. package/dist/testing/conformance/subscriptions/access.js +0 -98
  231. package/dist/testing/conformance/subscriptions/actors.d.ts +0 -4910
  232. package/dist/testing/conformance/subscriptions/actors.js +0 -372
  233. package/dist/testing/conformance/subscriptions/cluster.d.ts +0 -4
  234. package/dist/testing/conformance/subscriptions/cluster.js +0 -89
  235. package/dist/testing/conformance/subscriptions/delivery.d.ts +0 -4
  236. package/dist/testing/conformance/subscriptions/delivery.js +0 -253
  237. package/dist/testing/conformance/subscriptions/deploys.d.ts +0 -4
  238. package/dist/testing/conformance/subscriptions/deploys.js +0 -162
  239. package/dist/testing/conformance/subscriptions/epochs.d.ts +0 -4
  240. package/dist/testing/conformance/subscriptions/epochs.js +0 -169
  241. package/dist/testing/conformance/subscriptions/failures.d.ts +0 -4
  242. package/dist/testing/conformance/subscriptions/failures.js +0 -108
  243. package/dist/testing/conformance/subscriptions/feeds.d.ts +0 -4
  244. package/dist/testing/conformance/subscriptions/feeds.js +0 -218
  245. package/dist/testing/conformance/subscriptions/harness.d.ts +0 -124
  246. package/dist/testing/conformance/subscriptions/harness.js +0 -143
  247. package/dist/testing/conformance/subscriptions/operator.d.ts +0 -4
  248. package/dist/testing/conformance/subscriptions/operator.js +0 -128
  249. package/dist/testing/conformance/subscriptions/retention.d.ts +0 -4
  250. package/dist/testing/conformance/subscriptions/retention.js +0 -288
  251. package/dist/testing/conformance/subscriptions/routing.d.ts +0 -4
  252. package/dist/testing/conformance/subscriptions/routing.js +0 -179
  253. package/dist/testing/conformance/subscriptions.d.ts +0 -4
  254. package/dist/testing/conformance/subscriptions.js +0 -19
  255. package/dist/testing/conformance/tables.d.ts +0 -125
  256. package/dist/testing/conformance/tables.js +0 -664
  257. package/dist/testing/conformance/transports/actors.d.ts +0 -1907
  258. package/dist/testing/conformance/transports/actors.js +0 -163
  259. package/dist/testing/conformance/transports/client.d.ts +0 -3
  260. package/dist/testing/conformance/transports/client.js +0 -237
  261. package/dist/testing/conformance/transports/feeds.d.ts +0 -3
  262. package/dist/testing/conformance/transports/feeds.js +0 -232
  263. package/dist/testing/conformance/transports/harness.d.ts +0 -93
  264. package/dist/testing/conformance/transports/harness.js +0 -84
  265. package/dist/testing/conformance/transports/streams.d.ts +0 -3
  266. package/dist/testing/conformance/transports/streams.js +0 -96
  267. package/dist/testing/conformance/transports/websocket.d.ts +0 -3
  268. package/dist/testing/conformance/transports/websocket.js +0 -384
  269. package/dist/testing/conformance/transports/wire.d.ts +0 -141
  270. package/dist/testing/conformance/transports/wire.js +0 -204
  271. package/dist/testing/conformance/transports.d.ts +0 -3
  272. package/dist/testing/conformance/transports.js +0 -11
  273. package/dist/testing/conformance/watch.d.ts +0 -59
  274. package/dist/testing/conformance/watch.js +0 -879
  275. package/dist/testing/conformance/workflow-engine.d.ts +0 -97
  276. package/dist/testing/conformance/workflow-engine.js +0 -253
  277. package/dist/testing/conformance/workflow-versions.d.ts +0 -3
  278. package/dist/testing/conformance/workflow-versions.js +0 -545
  279. package/dist/testing/conformance/workflows/access.d.ts +0 -4
  280. package/dist/testing/conformance/workflows/access.js +0 -147
  281. package/dist/testing/conformance/workflows/actors.d.ts +0 -2317
  282. package/dist/testing/conformance/workflows/actors.js +0 -305
  283. package/dist/testing/conformance/workflows/basics.d.ts +0 -4
  284. package/dist/testing/conformance/workflows/basics.js +0 -144
  285. package/dist/testing/conformance/workflows/engine.d.ts +0 -4
  286. package/dist/testing/conformance/workflows/engine.js +0 -80
  287. package/dist/testing/conformance/workflows/guards.d.ts +0 -4
  288. package/dist/testing/conformance/workflows/guards.js +0 -172
  289. package/dist/testing/conformance/workflows/harness.d.ts +0 -14
  290. package/dist/testing/conformance/workflows/harness.js +0 -44
  291. package/dist/testing/conformance/workflows/recovery.d.ts +0 -4
  292. package/dist/testing/conformance/workflows/recovery.js +0 -181
  293. package/dist/testing/conformance/workflows/starts.d.ts +0 -4
  294. package/dist/testing/conformance/workflows/starts.js +0 -57
  295. package/dist/testing/conformance/workflows/suspension.d.ts +0 -4
  296. package/dist/testing/conformance/workflows/suspension.js +0 -106
  297. package/dist/testing/conformance/workflows/waits.d.ts +0 -4
  298. package/dist/testing/conformance/workflows/waits.js +0 -284
  299. package/dist/testing/conformance/workflows.d.ts +0 -4
  300. package/dist/testing/conformance/workflows.js +0 -19
  301. package/dist/testing/conformance.d.ts +0 -330
  302. package/dist/testing/conformance.js +0 -364
  303. package/dist/testing/foundation.d.ts +0 -41
  304. package/dist/testing/foundation.js +0 -517
  305. package/dist/testing/simulate-cluster.d.ts +0 -112
  306. package/dist/testing/simulate-cluster.js +0 -257
  307. package/dist/testing/simulate.d.ts +0 -90
  308. package/dist/testing/simulate.js +0 -127
@@ -40,6 +40,24 @@ export declare const ActorRow: Schema.Struct<{
40
40
  readonly lastEventSequence: Schema.Finite;
41
41
  }>;
42
42
  export type ActorRow = typeof ActorRow.Type;
43
+ /**
44
+ * An actor as a list shows it, with its last command: the command and commit
45
+ * time of its receipt with the newest recorded commit time among its 256
46
+ * greatest command ids, null when none of them records one.
47
+ */
48
+ export declare const ActorListRow: Schema.Struct<{
49
+ readonly actorType: Schema.String;
50
+ readonly actorId: Schema.String;
51
+ readonly placement: Schema.NullOr<Schema.String>;
52
+ readonly generation: Schema.Finite;
53
+ readonly created: Schema.Boolean;
54
+ readonly lastEventSequence: Schema.Finite;
55
+ readonly lastCommand: Schema.NullOr<Schema.Struct<{
56
+ readonly command: Schema.String;
57
+ readonly committedAtMs: Schema.Finite;
58
+ }>>;
59
+ }>;
60
+ export type ActorListRow = typeof ActorListRow.Type;
43
61
  /** A page of actors; `next` is the identity to continue from, or null at the end. */
44
62
  export declare const ActorsPage: Schema.Struct<{
45
63
  readonly actors: Schema.$Array<Schema.Struct<{
@@ -49,6 +67,10 @@ export declare const ActorsPage: Schema.Struct<{
49
67
  readonly generation: Schema.Finite;
50
68
  readonly created: Schema.Boolean;
51
69
  readonly lastEventSequence: Schema.Finite;
70
+ readonly lastCommand: Schema.NullOr<Schema.Struct<{
71
+ readonly command: Schema.String;
72
+ readonly committedAtMs: Schema.Finite;
73
+ }>>;
52
74
  }>>;
53
75
  readonly next: Schema.NullOr<Schema.Struct<{
54
76
  actorType: Schema.String;
@@ -186,7 +208,10 @@ export declare const WorkflowRow: Schema.Struct<{
186
208
  export type WorkflowRow = typeof WorkflowRow.Type;
187
209
  /**
188
210
  * A command receipt with its outcome, expiry in epoch milliseconds and the
189
- * sequences of the events it emitted.
211
+ * sequences of the events it emitted. `startedAtMs` is the database clock its
212
+ * batch's fenced read selected and `committedAtMs` the database clock when
213
+ * its commit wrote it; both are null on a receipt written before the runtime
214
+ * recorded them.
190
215
  */
191
216
  export declare const ReceiptRow: Schema.Struct<{
192
217
  readonly commandId: Schema.String;
@@ -203,6 +228,8 @@ export declare const ReceiptRow: Schema.Struct<{
203
228
  readonly undecodable: Schema.String;
204
229
  }>]>>;
205
230
  readonly expiresAtMs: Schema.Finite;
231
+ readonly startedAtMs: Schema.NullOr<Schema.Finite>;
232
+ readonly committedAtMs: Schema.NullOr<Schema.Finite>;
206
233
  readonly events: Schema.$Array<Schema.Finite>;
207
234
  }>;
208
235
  export type ReceiptRow = typeof ReceiptRow.Type;
@@ -257,6 +284,8 @@ export declare const ActorDetail: Schema.Struct<{
257
284
  readonly undecodable: Schema.String;
258
285
  }>]>>;
259
286
  readonly expiresAtMs: Schema.Finite;
287
+ readonly startedAtMs: Schema.NullOr<Schema.Finite>;
288
+ readonly committedAtMs: Schema.NullOr<Schema.Finite>;
260
289
  readonly events: Schema.$Array<Schema.Finite>;
261
290
  }>>;
262
291
  readonly events: Schema.$Array<Schema.Struct<{
@@ -532,6 +561,8 @@ export declare const OperatorActorDetail: Schema.Struct<{
532
561
  }>]>>;
533
562
  readonly outcomeTag: Schema.NullOr<Schema.String>;
534
563
  readonly expiresAtMs: Schema.Finite;
564
+ readonly startedAtMs: Schema.NullOr<Schema.Finite>;
565
+ readonly committedAtMs: Schema.NullOr<Schema.Finite>;
535
566
  readonly events: Schema.$Array<Schema.Finite>;
536
567
  readonly outcome: Schema.optionalKey<Schema.NullOr<Schema.Union<readonly [Schema.Struct<{
537
568
  readonly json: Schema.Codec<Schema.Json, Schema.Json, never, never>;
@@ -693,6 +724,8 @@ export declare const ActorReceiptRow: Schema.Struct<{
693
724
  readonly undecodable: Schema.String;
694
725
  }>]>>;
695
726
  readonly expiresAtMs: Schema.Finite;
727
+ readonly startedAtMs: Schema.NullOr<Schema.Finite>;
728
+ readonly committedAtMs: Schema.NullOr<Schema.Finite>;
696
729
  readonly events: Schema.$Array<Schema.Finite>;
697
730
  }>;
698
731
  export type ActorReceiptRow = typeof ActorReceiptRow.Type;
@@ -718,6 +751,8 @@ export declare const ReceiptsPage: Schema.Struct<{
718
751
  readonly undecodable: Schema.String;
719
752
  }>]>>;
720
753
  readonly expiresAtMs: Schema.Finite;
754
+ readonly startedAtMs: Schema.NullOr<Schema.Finite>;
755
+ readonly committedAtMs: Schema.NullOr<Schema.Finite>;
721
756
  readonly events: Schema.$Array<Schema.Finite>;
722
757
  }>>;
723
758
  readonly next: Schema.NullOr<Schema.Struct<{
@@ -805,3 +840,188 @@ export declare const JobTypesPage: Schema.Struct<{
805
840
  }>>;
806
841
  readonly next: Schema.NullOr<Schema.String>;
807
842
  }>;
843
+ /**
844
+ * Which runner answered a live read and what it covers: its name and region
845
+ * as the inspector was configured (null when not), when it began recording,
846
+ * and how many other runners the cluster lists (null when it could not tell).
847
+ * A live answer is this runner's alone; it covers the deployment only when
848
+ * `peers` is 0.
849
+ */
850
+ export declare const LiveScope: Schema.Struct<{
851
+ readonly runner: Schema.NullOr<Schema.String>;
852
+ readonly region: Schema.NullOr<Schema.String>;
853
+ readonly startedAtMs: Schema.Finite;
854
+ readonly peers: Schema.NullOr<Schema.Finite>;
855
+ }>;
856
+ export type LiveScope = typeof LiveScope.Type;
857
+ /**
858
+ * One runner's live view of a tenant: its rates, resident activations and
859
+ * deepest mailbox overall, and per actor type that has either.
860
+ */
861
+ export declare const LiveOverview: Schema.Struct<{
862
+ readonly scope: Schema.Struct<{
863
+ readonly runner: Schema.NullOr<Schema.String>;
864
+ readonly region: Schema.NullOr<Schema.String>;
865
+ readonly startedAtMs: Schema.Finite;
866
+ readonly peers: Schema.NullOr<Schema.Finite>;
867
+ }>;
868
+ readonly total: Schema.Struct<{
869
+ readonly perSecond: Schema.NullOr<Schema.Finite>;
870
+ readonly p50Ms: Schema.NullOr<Schema.Finite>;
871
+ readonly p99Ms: Schema.NullOr<Schema.Finite>;
872
+ readonly awake: Schema.Finite;
873
+ readonly maxMailbox: Schema.NullOr<Schema.Struct<{
874
+ readonly depth: Schema.Finite;
875
+ readonly actorType: Schema.String;
876
+ readonly actorId: Schema.String;
877
+ }>>;
878
+ }>;
879
+ readonly actorTypes: Schema.$Array<Schema.Struct<{
880
+ readonly perSecond: Schema.NullOr<Schema.Finite>;
881
+ readonly p50Ms: Schema.NullOr<Schema.Finite>;
882
+ readonly p99Ms: Schema.NullOr<Schema.Finite>;
883
+ readonly actorType: Schema.String;
884
+ readonly awake: Schema.Finite;
885
+ readonly maxMailbox: Schema.NullOr<Schema.Struct<{
886
+ readonly depth: Schema.Finite;
887
+ readonly actorId: Schema.String;
888
+ }>>;
889
+ }>>;
890
+ }>;
891
+ export type LiveOverview = typeof LiveOverview.Type;
892
+ /**
893
+ * One actor type's commands over a window: the rate at each slot this runner
894
+ * observed (minutes for `1h`, hours otherwise), oldest first, and each
895
+ * command's volume; `activity` is null when the runner cannot say.
896
+ */
897
+ export declare const LiveActivity: Schema.Struct<{
898
+ readonly scope: Schema.Struct<{
899
+ readonly runner: Schema.NullOr<Schema.String>;
900
+ readonly region: Schema.NullOr<Schema.String>;
901
+ readonly startedAtMs: Schema.Finite;
902
+ readonly peers: Schema.NullOr<Schema.Finite>;
903
+ }>;
904
+ readonly activity: Schema.NullOr<Schema.Struct<{
905
+ readonly sinceMs: Schema.Finite;
906
+ readonly points: Schema.$Array<Schema.Struct<{
907
+ readonly atMs: Schema.Finite;
908
+ readonly perSecond: Schema.Finite;
909
+ }>>;
910
+ readonly commands: Schema.$Array<Schema.Struct<{
911
+ readonly command: Schema.String;
912
+ readonly count: Schema.Finite;
913
+ readonly perSecond: Schema.Finite;
914
+ }>>;
915
+ }>>;
916
+ }>;
917
+ export type LiveActivity = typeof LiveActivity.Type;
918
+ /** One actor type's turn times over a window as a histogram and percentiles; null when the runner cannot say. */
919
+ export declare const LiveLatency: Schema.Struct<{
920
+ readonly scope: Schema.Struct<{
921
+ readonly runner: Schema.NullOr<Schema.String>;
922
+ readonly region: Schema.NullOr<Schema.String>;
923
+ readonly startedAtMs: Schema.Finite;
924
+ readonly peers: Schema.NullOr<Schema.Finite>;
925
+ }>;
926
+ readonly latency: Schema.NullOr<Schema.Struct<{
927
+ readonly sinceMs: Schema.Finite;
928
+ readonly count: Schema.Finite;
929
+ readonly buckets: Schema.$Array<Schema.Struct<{
930
+ readonly upToMs: Schema.NullOr<Schema.Finite>;
931
+ readonly count: Schema.Finite;
932
+ }>>;
933
+ readonly p50Ms: Schema.NullOr<Schema.Finite>;
934
+ readonly p95Ms: Schema.NullOr<Schema.Finite>;
935
+ readonly p99Ms: Schema.NullOr<Schema.Finite>;
936
+ }>>;
937
+ }>;
938
+ export type LiveLatency = typeof LiveLatency.Type;
939
+ /**
940
+ * Named actors as this runner holds them: whether each is resident, its
941
+ * mailbox depth when it is, its open sockets and its open feeds per event.
942
+ */
943
+ export declare const LiveActors: Schema.Struct<{
944
+ readonly scope: Schema.Struct<{
945
+ readonly runner: Schema.NullOr<Schema.String>;
946
+ readonly region: Schema.NullOr<Schema.String>;
947
+ readonly startedAtMs: Schema.Finite;
948
+ readonly peers: Schema.NullOr<Schema.Finite>;
949
+ }>;
950
+ readonly actors: Schema.$Array<Schema.Struct<{
951
+ readonly actorId: Schema.String;
952
+ readonly awake: Schema.Boolean;
953
+ readonly mailbox: Schema.NullOr<Schema.Finite>;
954
+ readonly sockets: Schema.Finite;
955
+ readonly feeds: Schema.$Array<Schema.Struct<{
956
+ readonly event: Schema.String;
957
+ readonly subscribers: Schema.Finite;
958
+ }>>;
959
+ }>>;
960
+ }>;
961
+ export type LiveActors = typeof LiveActors.Type;
962
+ /** The tenant's open WebSocket sessions and SSE responses on this runner, overall and per actor type. */
963
+ export declare const LiveConnections: Schema.Struct<{
964
+ readonly sockets: Schema.Finite;
965
+ readonly feeds: Schema.Finite;
966
+ readonly streams: Schema.Finite;
967
+ readonly watches: Schema.Finite;
968
+ readonly scope: Schema.Struct<{
969
+ readonly runner: Schema.NullOr<Schema.String>;
970
+ readonly region: Schema.NullOr<Schema.String>;
971
+ readonly startedAtMs: Schema.Finite;
972
+ readonly peers: Schema.NullOr<Schema.Finite>;
973
+ }>;
974
+ readonly byActorType: Schema.$Array<Schema.Struct<{
975
+ readonly sockets: Schema.Finite;
976
+ readonly feeds: Schema.Finite;
977
+ readonly streams: Schema.Finite;
978
+ readonly watches: Schema.Finite;
979
+ readonly actorType: Schema.String;
980
+ }>>;
981
+ }>;
982
+ export type LiveConnections = typeof LiveConnections.Type;
983
+ /**
984
+ * One committed command as the command stream sends it: its turn's time on
985
+ * the database clock (`atMs` read after `COMMIT`), its caller key, outcome,
986
+ * the declared failure's tag, and a bounded, redacted payload preview.
987
+ */
988
+ export declare const StreamCommand: Schema.Struct<{
989
+ readonly id: Schema.String;
990
+ readonly commandId: Schema.String;
991
+ readonly atMs: Schema.Finite;
992
+ readonly durationMs: Schema.Finite;
993
+ readonly actorType: Schema.String;
994
+ readonly actorId: Schema.String;
995
+ readonly command: Schema.String;
996
+ readonly callerKey: Schema.NullOr<Schema.Union<readonly [Schema.Struct<{
997
+ readonly json: Schema.Codec<Schema.Json, Schema.Json, never, never>;
998
+ }>, Schema.Struct<{
999
+ readonly undecodable: Schema.String;
1000
+ }>]>>;
1001
+ readonly outcomeTag: Schema.Literals<readonly ["Success", "Failure"]>;
1002
+ readonly errorTag: Schema.NullOr<Schema.String>;
1003
+ readonly payloadPreview: Schema.NullOr<Schema.String>;
1004
+ }>;
1005
+ export type StreamCommand = typeof StreamCommand.Type;
1006
+ /**
1007
+ * Each cron entry the runtime registers, with the tenant's pending ticks of
1008
+ * it, the soonest one's due time, and the newest committed tick among the
1009
+ * type's newest receipts: its command id, commit time, duration and outcome.
1010
+ */
1011
+ export declare const Schedules: Schema.Struct<{
1012
+ readonly schedules: Schema.$Array<Schema.Struct<{
1013
+ readonly actorType: Schema.String;
1014
+ readonly key: Schema.String;
1015
+ readonly expression: Schema.String;
1016
+ readonly command: Schema.String;
1017
+ readonly pending: Schema.Finite;
1018
+ readonly nextDueAtMs: Schema.NullOr<Schema.Finite>;
1019
+ readonly lastRun: Schema.NullOr<Schema.Struct<{
1020
+ readonly commandId: Schema.String;
1021
+ readonly committedAtMs: Schema.Finite;
1022
+ readonly durationMs: Schema.NullOr<Schema.Finite>;
1023
+ readonly outcomeTag: Schema.NullOr<Schema.String>;
1024
+ }>>;
1025
+ }>>;
1026
+ }>;
1027
+ export type Schedules = typeof Schedules.Type;
@@ -35,9 +35,18 @@ export const ActorRow = Schema.Struct({
35
35
  created: Schema.Boolean,
36
36
  lastEventSequence: Schema.Finite,
37
37
  });
38
+ /**
39
+ * An actor as a list shows it, with its last command: the command and commit
40
+ * time of its receipt with the newest recorded commit time among its 256
41
+ * greatest command ids, null when none of them records one.
42
+ */
43
+ export const ActorListRow = Schema.Struct({
44
+ ...ActorRow.fields,
45
+ lastCommand: Schema.NullOr(Schema.Struct({ command: Schema.String, committedAtMs: Millis })),
46
+ });
38
47
  /** A page of actors; `next` is the identity to continue from, or null at the end. */
39
48
  export const ActorsPage = Schema.Struct({
40
- actors: Schema.Array(ActorRow),
49
+ actors: Schema.Array(ActorListRow),
41
50
  next: Schema.NullOr(Schema.Struct(Identity)),
42
51
  });
43
52
  /** A staged intent with its target, attempts, last error and due time in epoch milliseconds. */
@@ -112,7 +121,10 @@ export const WorkflowRow = Schema.Struct({
112
121
  });
113
122
  /**
114
123
  * A command receipt with its outcome, expiry in epoch milliseconds and the
115
- * sequences of the events it emitted.
124
+ * sequences of the events it emitted. `startedAtMs` is the database clock its
125
+ * batch's fenced read selected and `committedAtMs` the database clock when
126
+ * its commit wrote it; both are null on a receipt written before the runtime
127
+ * recorded them.
116
128
  */
117
129
  export const ReceiptRow = Schema.Struct({
118
130
  commandId: Schema.String,
@@ -121,6 +133,8 @@ export const ReceiptRow = Schema.Struct({
121
133
  outcomeTag: Schema.NullOr(Schema.String),
122
134
  outcome: Stored,
123
135
  expiresAtMs: Millis,
136
+ startedAtMs: Schema.NullOr(Millis),
137
+ committedAtMs: Schema.NullOr(Millis),
124
138
  events: Schema.Array(Schema.Finite),
125
139
  });
126
140
  /** A stored event with its sequence, size in bytes and emission time in epoch milliseconds. */
@@ -241,3 +255,138 @@ export const JobTypesPage = Schema.Struct({
241
255
  jobTypes: Schema.Array(JobTypeRow),
242
256
  next: Schema.NullOr(Schema.String),
243
257
  });
258
+ /**
259
+ * Which runner answered a live read and what it covers: its name and region
260
+ * as the inspector was configured (null when not), when it began recording,
261
+ * and how many other runners the cluster lists (null when it could not tell).
262
+ * A live answer is this runner's alone; it covers the deployment only when
263
+ * `peers` is 0.
264
+ */
265
+ export const LiveScope = Schema.Struct({
266
+ runner: Schema.NullOr(Schema.String),
267
+ region: Schema.NullOr(Schema.String),
268
+ startedAtMs: Millis,
269
+ peers: Schema.NullOr(Schema.Finite),
270
+ });
271
+ /**
272
+ * A recent rate and turn times: commands per second over the current minute
273
+ * and the four before it, and the median and 99th percentile turn time over
274
+ * the last hour, each null when the runner cannot say (or, for a percentile,
275
+ * when no turn committed). Percentiles are histogram bucket bounds capped by
276
+ * the slowest turn seen.
277
+ */
278
+ const LiveRates = {
279
+ perSecond: Schema.NullOr(Schema.Finite),
280
+ p50Ms: Schema.NullOr(Schema.Finite),
281
+ p99Ms: Schema.NullOr(Schema.Finite),
282
+ };
283
+ /** The deepest mailbox among resident activations, null when none is resident. */
284
+ const MaxMailbox = Schema.NullOr(Schema.Struct({ depth: Schema.Finite, actorId: Schema.String }));
285
+ /**
286
+ * One runner's live view of a tenant: its rates, resident activations and
287
+ * deepest mailbox overall, and per actor type that has either.
288
+ */
289
+ export const LiveOverview = Schema.Struct({
290
+ scope: LiveScope,
291
+ total: Schema.Struct({
292
+ ...LiveRates,
293
+ awake: Schema.Finite,
294
+ maxMailbox: Schema.NullOr(Schema.Struct({ depth: Schema.Finite, actorType: Schema.String, actorId: Schema.String })),
295
+ }),
296
+ actorTypes: Schema.Array(Schema.Struct({
297
+ actorType: Schema.String,
298
+ ...LiveRates,
299
+ awake: Schema.Finite,
300
+ maxMailbox: MaxMailbox,
301
+ })),
302
+ });
303
+ /**
304
+ * One actor type's commands over a window: the rate at each slot this runner
305
+ * observed (minutes for `1h`, hours otherwise), oldest first, and each
306
+ * command's volume; `activity` is null when the runner cannot say.
307
+ */
308
+ export const LiveActivity = Schema.Struct({
309
+ scope: LiveScope,
310
+ activity: Schema.NullOr(Schema.Struct({
311
+ sinceMs: Millis,
312
+ points: Schema.Array(Schema.Struct({ atMs: Millis, perSecond: Schema.Finite })),
313
+ commands: Schema.Array(Schema.Struct({ command: Schema.String, count: Schema.Finite, perSecond: Schema.Finite })),
314
+ })),
315
+ });
316
+ /** One actor type's turn times over a window as a histogram and percentiles; null when the runner cannot say. */
317
+ export const LiveLatency = Schema.Struct({
318
+ scope: LiveScope,
319
+ latency: Schema.NullOr(Schema.Struct({
320
+ sinceMs: Millis,
321
+ count: Schema.Finite,
322
+ buckets: Schema.Array(Schema.Struct({ upToMs: Schema.NullOr(Schema.Finite), count: Schema.Finite })),
323
+ p50Ms: Schema.NullOr(Schema.Finite),
324
+ p95Ms: Schema.NullOr(Schema.Finite),
325
+ p99Ms: Schema.NullOr(Schema.Finite),
326
+ })),
327
+ });
328
+ /**
329
+ * Named actors as this runner holds them: whether each is resident, its
330
+ * mailbox depth when it is, its open sockets and its open feeds per event.
331
+ */
332
+ export const LiveActors = Schema.Struct({
333
+ scope: LiveScope,
334
+ actors: Schema.Array(Schema.Struct({
335
+ actorId: Schema.String,
336
+ awake: Schema.Boolean,
337
+ mailbox: Schema.NullOr(Schema.Finite),
338
+ sockets: Schema.Finite,
339
+ feeds: Schema.Array(Schema.Struct({ event: Schema.String, subscribers: Schema.Finite })),
340
+ })),
341
+ });
342
+ const ConnectionCounts = {
343
+ sockets: Schema.Finite,
344
+ feeds: Schema.Finite,
345
+ streams: Schema.Finite,
346
+ watches: Schema.Finite,
347
+ };
348
+ /** The tenant's open WebSocket sessions and SSE responses on this runner, overall and per actor type. */
349
+ export const LiveConnections = Schema.Struct({
350
+ scope: LiveScope,
351
+ ...ConnectionCounts,
352
+ byActorType: Schema.Array(Schema.Struct({ actorType: Schema.String, ...ConnectionCounts })),
353
+ });
354
+ /**
355
+ * One committed command as the command stream sends it: its turn's time on
356
+ * the database clock (`atMs` read after `COMMIT`), its caller key, outcome,
357
+ * the declared failure's tag, and a bounded, redacted payload preview.
358
+ */
359
+ export const StreamCommand = Schema.Struct({
360
+ id: Schema.String,
361
+ commandId: Schema.String,
362
+ atMs: Millis,
363
+ durationMs: Schema.Finite,
364
+ actorType: Schema.String,
365
+ actorId: Schema.String,
366
+ command: Schema.String,
367
+ callerKey: Stored,
368
+ outcomeTag: Schema.Literals(["Success", "Failure"]),
369
+ errorTag: Schema.NullOr(Schema.String),
370
+ payloadPreview: Schema.NullOr(Schema.String),
371
+ });
372
+ /**
373
+ * Each cron entry the runtime registers, with the tenant's pending ticks of
374
+ * it, the soonest one's due time, and the newest committed tick among the
375
+ * type's newest receipts: its command id, commit time, duration and outcome.
376
+ */
377
+ export const Schedules = Schema.Struct({
378
+ schedules: Schema.Array(Schema.Struct({
379
+ actorType: Schema.String,
380
+ key: Schema.String,
381
+ expression: Schema.String,
382
+ command: Schema.String,
383
+ pending: Schema.Finite,
384
+ nextDueAtMs: Schema.NullOr(Millis),
385
+ lastRun: Schema.NullOr(Schema.Struct({
386
+ commandId: Schema.String,
387
+ committedAtMs: Millis,
388
+ durationMs: Schema.NullOr(Schema.Finite),
389
+ outcomeTag: Schema.NullOr(Schema.String),
390
+ })),
391
+ })),
392
+ });
@@ -31,33 +31,10 @@ declare const reasonSchemas: {
31
31
  readonly _tag: Schema.tag<"QuotaExceeded">;
32
32
  readonly organizationId: Schema.String;
33
33
  readonly period: Schema.String;
34
- readonly limitUnits: Schema.Finite;
35
- readonly usedUnits: Schema.Finite;
36
- readonly requestedUnits: Schema.Finite;
37
- readonly unitsPerCommand: Schema.Int;
38
- readonly retryAfterMs: Schema.Finite;
39
- }>;
40
- readonly SpendLimitExceeded: Schema.TaggedStruct<"SpendLimitExceeded", {
41
- readonly _tag: Schema.tag<"SpendLimitExceeded">;
42
- readonly organizationId: Schema.String;
43
- readonly period: Schema.String;
44
- readonly limitCents: Schema.Finite;
45
- readonly projectedCents: Schema.Finite;
46
- }>;
47
- readonly ConnectionLimitExceeded: Schema.TaggedStruct<"ConnectionLimitExceeded", {
48
- readonly _tag: Schema.tag<"ConnectionLimitExceeded">;
49
- readonly organizationId: Schema.String;
50
- readonly kind: Schema.Literals<readonly ["socket", "sse"]>;
34
+ readonly cap: Schema.Literals<readonly ["compute", "storage", "connections", "spend"]>;
51
35
  readonly limit: Schema.Finite;
52
- readonly open: Schema.Finite;
53
- }>;
54
- readonly StorageQuotaExceeded: Schema.TaggedStruct<"StorageQuotaExceeded", {
55
- readonly _tag: Schema.tag<"StorageQuotaExceeded">;
56
- readonly organizationId: Schema.String;
57
- readonly deployment: Schema.String;
58
- readonly tenant: Schema.String;
59
- readonly limitBytes: Schema.Finite;
60
- readonly usedBytes: Schema.Finite;
36
+ readonly used: Schema.Finite;
37
+ readonly retryAfterMs: Schema.Finite;
61
38
  }>;
62
39
  readonly InvalidInput: Schema.TaggedStruct<"InvalidInput", {
63
40
  readonly _tag: Schema.tag<"InvalidInput">;
@@ -92,12 +69,6 @@ export declare const envelope: (route: {
92
69
  }> | Schema.TaggedStruct<"CommandExpired", {
93
70
  readonly _tag: Schema.tag<"CommandExpired">;
94
71
  readonly commandId: Schema.String;
95
- }> | Schema.TaggedStruct<"ConnectionLimitExceeded", {
96
- readonly _tag: Schema.tag<"ConnectionLimitExceeded">;
97
- readonly organizationId: Schema.String;
98
- readonly kind: Schema.Literals<readonly ["socket", "sse"]>;
99
- readonly limit: Schema.Finite;
100
- readonly open: Schema.Finite;
101
72
  }> | Schema.TaggedStruct<"InvalidCommandId", {
102
73
  readonly commandId: Schema.String;
103
74
  readonly code: Schema.Literals<readonly ["malformed", "future", "window", "version"]>;
@@ -112,29 +83,15 @@ export declare const envelope: (route: {
112
83
  readonly _tag: Schema.tag<"QuotaExceeded">;
113
84
  readonly organizationId: Schema.String;
114
85
  readonly period: Schema.String;
115
- readonly limitUnits: Schema.Finite;
116
- readonly usedUnits: Schema.Finite;
117
- readonly requestedUnits: Schema.Finite;
118
- readonly unitsPerCommand: Schema.Int;
86
+ readonly cap: Schema.Literals<readonly ["compute", "storage", "connections", "spend"]>;
87
+ readonly limit: Schema.Finite;
88
+ readonly used: Schema.Finite;
119
89
  readonly retryAfterMs: Schema.Finite;
120
90
  }> | Schema.TaggedStruct<"RunnerAtCapacity", {}> | Schema.TaggedStruct<"SessionEnded", {
121
91
  readonly _tag: Schema.tag<"SessionEnded">;
122
92
  readonly cause: Schema.Literals<readonly ["ClientClosed", "ServerClosed", "SlowConsumer", "HolderShutdown", "HolderLost", "OwnerLost", "ActivationEnded", "ActorUnavailable", "Defect", "Terminated"]>;
123
93
  readonly resync: Schema.Boolean;
124
94
  readonly retryAfterMs: Schema.optional<Schema.Finite>;
125
- }> | Schema.TaggedStruct<"SpendLimitExceeded", {
126
- readonly _tag: Schema.tag<"SpendLimitExceeded">;
127
- readonly organizationId: Schema.String;
128
- readonly period: Schema.String;
129
- readonly limitCents: Schema.Finite;
130
- readonly projectedCents: Schema.Finite;
131
- }> | Schema.TaggedStruct<"StorageQuotaExceeded", {
132
- readonly _tag: Schema.tag<"StorageQuotaExceeded">;
133
- readonly organizationId: Schema.String;
134
- readonly deployment: Schema.String;
135
- readonly tenant: Schema.String;
136
- readonly limitBytes: Schema.Finite;
137
- readonly usedBytes: Schema.Finite;
138
95
  }> | Schema.TaggedStruct<"Timeout", {
139
96
  readonly _tag: Schema.tag<"Timeout">;
140
97
  readonly commandId: Schema.optionalKey<Schema.String>;
@@ -1,5 +1,5 @@
1
1
  import { Effect, Match, Option, Schema } from "effect";
2
- import { ActorError, ActorUnavailable, CommandConflict, CommandExpired, ConnectionLimitExceeded, InvalidCommandId, InvalidInput, Reason, QuotaExceeded, SessionEnded, SpendLimitExceeded, StorageQuotaExceeded, Timeout, Unauthorized, withRetryAfter, } from "../errors/actor.js";
2
+ import { ActorError, ActorUnavailable, CommandConflict, CommandExpired, InvalidCommandId, InvalidInput, Reason, QuotaExceeded, SessionEnded, Timeout, Unauthorized, withRetryAfter, } from "../errors/actor.js";
3
3
  /** The served protocol's major version, sent and checked as `durable-protocol`. */
4
4
  export const PROTOCOL = 1;
5
5
  const reasonSchemas = {
@@ -16,9 +16,6 @@ const reasonSchemas = {
16
16
  MailboxFull: Schema.TaggedStruct("MailboxFull", {}),
17
17
  RunnerAtCapacity: Schema.TaggedStruct("RunnerAtCapacity", {}),
18
18
  QuotaExceeded: Schema.TaggedStruct("QuotaExceeded", QuotaExceeded.fields),
19
- SpendLimitExceeded: Schema.TaggedStruct("SpendLimitExceeded", SpendLimitExceeded.fields),
20
- ConnectionLimitExceeded: Schema.TaggedStruct("ConnectionLimitExceeded", ConnectionLimitExceeded.fields),
21
- StorageQuotaExceeded: Schema.TaggedStruct("StorageQuotaExceeded", StorageQuotaExceeded.fields),
22
19
  InvalidInput: Schema.TaggedStruct("InvalidInput", InvalidInput.fields),
23
20
  SessionEnded: Schema.TaggedStruct("SessionEnded", SessionEnded.fields),
24
21
  };
@@ -66,9 +63,6 @@ export const statusOf = (reason) => Match.value(reason).pipe(Match.tagsExhaustiv
66
63
  ActorUnavailable: () => 503,
67
64
  RunnerAtCapacity: () => 503,
68
65
  QuotaExceeded: () => 429,
69
- SpendLimitExceeded: () => 402,
70
- ConnectionLimitExceeded: () => 429,
71
- StorageQuotaExceeded: () => 429,
72
66
  Timeout: () => 504,
73
67
  NotCreated: () => 404,
74
68
  MailboxFull: () => 429,
@@ -81,9 +75,6 @@ export const closeCodeOf = (reason) => Match.value(reason).pipe(Match.tagsExhaus
81
75
  ActorUnavailable: () => 1013,
82
76
  RunnerAtCapacity: () => 1013,
83
77
  QuotaExceeded: () => 1008,
84
- SpendLimitExceeded: () => 1008,
85
- ConnectionLimitExceeded: () => 1008,
86
- StorageQuotaExceeded: () => 1008,
87
78
  NotCreated: () => 4404,
88
79
  Unauthorized: (unauthorized) => unauthorized.code === "reauthorization_unavailable" ? 1013 : 1008,
89
80
  InvalidInput: () => 4400,
@@ -1,3 +1,4 @@
1
+ import type { LiveRuntime } from "./telemetry/live.ts";
1
2
  import { Context, type Effect, type Scope, type Stream } from "effect";
2
3
  import type { Transport } from "./connections/transport.ts";
3
4
  import type { Holder } from "./connections/holder.ts";
@@ -18,6 +19,8 @@ declare const InternalActors_base: Context.ServiceClass<InternalActors, "@rikala
18
19
  readonly transport: Transport;
19
20
  /** This runner's in-process connection holder. */
20
21
  readonly holder: Holder;
22
+ /** What this runner knows only in memory, for the inspector's live reads. */
23
+ readonly live: LiveRuntime["Service"];
21
24
  /** Ends the actor's activation on this runner as idle expiry would. */
22
25
  readonly hibernate: (ref: ActorRef) => Effect.Effect<void>;
23
26
  readonly execute: (request: Request) => Effect.Effect<Executed, ActorError>;
@@ -42,7 +42,7 @@ const backfillTable = Effect.fnUntraced(function* (target, batch) {
42
42
  WHERE table_schema = ${target.schema} AND table_name = ${target.table}`;
43
43
  if (adoption === undefined)
44
44
  return yield* AdoptionRefused.make({
45
- message: `${name} is not observed; run durable adopt observe ${target.table} first`,
45
+ message: `${name} is not observed; run akter adopt observe ${target.table} first`,
46
46
  });
47
47
  if (adoption.mode === "enforce")
48
48
  return yield* AdoptionRefused.make({
@@ -53,7 +53,7 @@ const enforcementRefusals = Effect.fnUntraced(function* (target, options) {
53
53
  OR ${identifier(target.tenantColumn)}::text = '' OR ${identifier(target.actorColumn)}::text = '')::text AS unowned
54
54
  FROM ${table}`);
55
55
  if (Number(counts.unfilled) > 0)
56
- refusals.push(`${counts.unfilled} rows of ${name} have no routing_key; run durable adopt backfill ${target.table}`);
56
+ refusals.push(`${counts.unfilled} rows of ${name} have no routing_key; run akter adopt backfill ${target.table}`);
57
57
  if (Number(counts.unowned) > 0)
58
58
  refusals.push(`${counts.unowned} rows of ${name} have a NULL or empty ${target.tenantColumn} or ${target.actorColumn}, so no actor owns them`);
59
59
  const recent = yield* sql `
@@ -152,7 +152,7 @@ export const enforceAdoption = Effect.fnUntraced(function* (actors, options) {
152
152
  WHERE table_schema = ${target.schema} AND table_name = ${target.table} FOR UPDATE`;
153
153
  if (adoption === undefined)
154
154
  return yield* AdoptionRefused.make({
155
- message: `${name} is not observed; run durable adopt observe ${target.table} first`,
155
+ message: `${name} is not observed; run akter adopt observe ${target.table} first`,
156
156
  });
157
157
  if (adoption.mode === "enforce")
158
158
  return yield* AdoptionRefused.make({ message: `${name} is already enforced` });
@@ -66,7 +66,7 @@ export const observeAdoption = Effect.fnUntraced(function* (actors, only, lockTi
66
66
  });
67
67
  if (existing?.mode === "enforce")
68
68
  return yield* AdoptionRefused.make({
69
- message: `${name} is enforced; run durable adopt release ${target.table} --to observe first`,
69
+ message: `${name} is enforced; run akter adopt release ${target.table} --to observe first`,
70
70
  });
71
71
  const [column] = yield* sql `
72
72
  SELECT t.typname AS type FROM pg_attribute a
@@ -1,7 +1,7 @@
1
1
  import { Effect } from "effect";
2
2
  import { SqlClient } from "effect/sql";
3
3
  import { type AdoptionTarget } from "./target.ts";
4
- /** What `durable adopt plan` reports for one table; it changes nothing. */
4
+ /** What `akter adopt plan` reports for one table; it changes nothing. */
5
5
  export interface AdoptionPlan {
6
6
  readonly table: string;
7
7
  readonly actor: string;
@@ -32,7 +32,7 @@ export const checkEnforcedTable = Effect.fnUntraced(function* ({ target, writerR
32
32
  ]) {
33
33
  const found = triggers.find((trigger) => trigger.name === name);
34
34
  if (found === undefined)
35
- return yield* refuse(`is enforced but its guard trigger ${name} is missing; run durable adopt release ${target.table} --to observe and enforce it again`);
35
+ return yield* refuse(`is enforced but its guard trigger ${name} is missing; run akter adopt release ${target.table} --to observe and enforce it again`);
36
36
  if (found.enabled !== "A")
37
37
  return yield* refuse(`is enforced but its guard trigger ${name} is not enabled always; run ALTER TABLE ${target.table} ENABLE ALWAYS TRIGGER ${name}`);
38
38
  if (found.function !== "actor_adoption_guard" || found.type !== type)
@@ -1,6 +1,6 @@
1
1
  import { Effect } from "effect";
2
2
  import { SqlClient } from "effect/sql";
3
- /** One adopted table as `durable adopt status` reports it. */
3
+ /** One adopted table as `akter adopt status` reports it. */
4
4
  export interface AdoptionStatus {
5
5
  readonly table: string;
6
6
  readonly actor: string;