@sixb/core 0.1.13 → 0.1.15

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 (236) hide show
  1. package/dist/actions/index.js +22 -22
  2. package/dist/agents/index.js +34 -34
  3. package/dist/agents/index.js.map +1 -1
  4. package/dist/agents/streams/index.js +2 -2
  5. package/dist/agents/streams/internal.js +2 -2
  6. package/dist/auth/errors.d.ts +12 -0
  7. package/dist/auth/errors.d.ts.map +1 -1
  8. package/dist/auth/index.d.ts +1 -1
  9. package/dist/auth/index.d.ts.map +1 -1
  10. package/dist/auth/index.js +7 -5
  11. package/dist/auth/index.js.map +1 -1
  12. package/dist/auth/runtime.d.ts.map +1 -1
  13. package/dist/auth/strategy.d.ts +2 -0
  14. package/dist/auth/strategy.d.ts.map +1 -1
  15. package/dist/auth/strategy.js +4 -2
  16. package/dist/auth/strategy.js.map +1 -1
  17. package/dist/auth/types.d.ts +8 -0
  18. package/dist/auth/types.d.ts.map +1 -1
  19. package/dist/authorization/index.js +2 -2
  20. package/dist/bootstrap/index.js +37 -37
  21. package/dist/{chunk-693f3zn8.js → chunk-1jvq82rp.js} +3 -3
  22. package/dist/{chunk-0321g649.js → chunk-2jntasmh.js} +13 -2
  23. package/dist/{chunk-0321g649.js.map → chunk-2jntasmh.js.map} +3 -3
  24. package/dist/{chunk-cvrbhvtr.js → chunk-2tz5vnvz.js} +28 -28
  25. package/dist/{chunk-cvrbhvtr.js.map → chunk-2tz5vnvz.js.map} +1 -1
  26. package/dist/{chunk-898y24dd.js → chunk-3c90jvfj.js} +2 -2
  27. package/dist/{chunk-vn3yh259.js → chunk-4gmng3vf.js} +1 -1
  28. package/dist/{chunk-91wthfwe.js → chunk-4jph1t3v.js} +7 -7
  29. package/dist/{chunk-znw0zvy4.js → chunk-4wn7bxxa.js} +25 -7
  30. package/dist/chunk-4wn7bxxa.js.map +12 -0
  31. package/dist/{chunk-3qpcrcj8.js → chunk-6aawea28.js} +2 -4
  32. package/dist/chunk-6aawea28.js.map +10 -0
  33. package/dist/{chunk-rzkr70gr.js → chunk-6fsr7y93.js} +5 -1
  34. package/dist/{chunk-rzkr70gr.js.map → chunk-6fsr7y93.js.map} +3 -3
  35. package/dist/{chunk-y487ywrv.js → chunk-6q7c68yx.js} +4 -4
  36. package/dist/{chunk-ypj2wqtj.js → chunk-70jmg2zx.js} +2 -2
  37. package/dist/{chunk-s24qbp32.js → chunk-7jc21943.js} +3 -3
  38. package/dist/{chunk-rzcjp5m2.js → chunk-8fjmqjyx.js} +1 -1
  39. package/dist/{chunk-m8zkvep1.js → chunk-8w27xf9e.js} +1 -1
  40. package/dist/{chunk-z9h698s8.js → chunk-a4g5yjm0.js} +1 -1
  41. package/dist/{chunk-gmt22nxx.js → chunk-adbve9zt.js} +1 -1
  42. package/dist/{chunk-mf6hwpzh.js → chunk-dqkd3kdj.js} +41 -23
  43. package/dist/{chunk-mf6hwpzh.js.map → chunk-dqkd3kdj.js.map} +3 -3
  44. package/dist/{chunk-gbcrz0gr.js → chunk-ex8s8wsk.js} +6 -6
  45. package/dist/{chunk-4tnrzqqh.js → chunk-fj1dvp37.js} +1 -1
  46. package/dist/{chunk-gc226ten.js → chunk-fjw417jf.js} +127 -69
  47. package/dist/{chunk-gc226ten.js.map → chunk-fjw417jf.js.map} +4 -4
  48. package/dist/{chunk-ht4a7mjg.js → chunk-g4rbm4a6.js} +42 -8
  49. package/dist/{chunk-ht4a7mjg.js.map → chunk-g4rbm4a6.js.map} +3 -3
  50. package/dist/{chunk-qma80ych.js → chunk-hn2r7z41.js} +3 -2
  51. package/dist/chunk-hn2r7z41.js.map +11 -0
  52. package/dist/{chunk-bdhfn0ww.js → chunk-kkqwzy6h.js} +1 -1
  53. package/dist/{chunk-bep5rrdq.js → chunk-mmac1mp6.js} +2 -2
  54. package/dist/{chunk-w9bp61e7.js → chunk-n5t4mq6z.js} +5 -5
  55. package/dist/{chunk-n33e8dz8.js → chunk-p0nbkys4.js} +1 -1
  56. package/dist/{chunk-04h4t2b5.js → chunk-py2dw8cw.js} +3 -3
  57. package/dist/{chunk-jhyc777j.js → chunk-q3grgzp1.js} +2 -2
  58. package/dist/{chunk-9pfw47qx.js → chunk-qne45xqq.js} +53 -48
  59. package/dist/{chunk-9pfw47qx.js.map → chunk-qne45xqq.js.map} +7 -7
  60. package/dist/{chunk-cbn96bve.js → chunk-r5sc1d2b.js} +2 -2
  61. package/dist/{chunk-y6vnvayj.js → chunk-vjcd8d27.js} +1 -1
  62. package/dist/{chunk-jmwy25mf.js → chunk-wd34wnsy.js} +6 -6
  63. package/dist/{chunk-63fp9x3q.js → chunk-wem5vqjw.js} +7 -7
  64. package/dist/{chunk-darm7eeg.js → chunk-xr7y35yj.js} +3 -3
  65. package/dist/{chunk-a69fkrtr.js → chunk-y0zmae99.js} +5 -5
  66. package/dist/{chunk-xgptywp0.js → chunk-y2aq6ag9.js} +1 -1
  67. package/dist/{chunk-2hbhn1ff.js → chunk-yfppyaty.js} +1 -1
  68. package/dist/{chunk-rqtdtm43.js → chunk-z708gemf.js} +129 -70
  69. package/dist/{chunk-rqtdtm43.js.map → chunk-z708gemf.js.map} +5 -5
  70. package/dist/deploy/define.d.ts +4 -0
  71. package/dist/deploy/define.d.ts.map +1 -0
  72. package/dist/deploy/index.d.ts +3 -0
  73. package/dist/deploy/index.d.ts.map +1 -0
  74. package/dist/deploy/index.js +10 -0
  75. package/dist/deploy/index.js.map +10 -0
  76. package/dist/deploy/internal.d.ts +3 -0
  77. package/dist/deploy/internal.d.ts.map +1 -0
  78. package/dist/deploy/internal.js +244 -0
  79. package/dist/deploy/internal.js.map +11 -0
  80. package/dist/deploy/services.d.ts +8 -0
  81. package/dist/deploy/services.d.ts.map +1 -0
  82. package/dist/deploy/types.d.ts +309 -0
  83. package/dist/deploy/types.d.ts.map +1 -0
  84. package/dist/deploy/validation.d.ts +7 -0
  85. package/dist/deploy/validation.d.ts.map +1 -0
  86. package/dist/error-reporting/internal.js +3 -3
  87. package/dist/errors/catalog.d.ts +4 -0
  88. package/dist/errors/catalog.d.ts.map +1 -1
  89. package/dist/errors/internal.js +1 -1
  90. package/dist/events/index.js +3 -3
  91. package/dist/execution/agent.js +33 -33
  92. package/dist/execution/primitive.js +29 -29
  93. package/dist/execution/request.js +31 -31
  94. package/dist/execution/request.js.map +1 -1
  95. package/dist/index.js +49 -49
  96. package/dist/index.js.map +1 -1
  97. package/dist/maintenance/ontology-maintenance.d.ts +2 -0
  98. package/dist/maintenance/ontology-maintenance.d.ts.map +1 -1
  99. package/dist/maintenance/types.d.ts +8 -2
  100. package/dist/maintenance/types.d.ts.map +1 -1
  101. package/dist/materialization/dataset-watermark.d.ts +6 -1
  102. package/dist/materialization/dataset-watermark.d.ts.map +1 -1
  103. package/dist/materialization/index.js +1 -1
  104. package/dist/materialization/model.d.ts +6 -0
  105. package/dist/materialization/model.d.ts.map +1 -1
  106. package/dist/materializer/index.js +18 -18
  107. package/dist/materializer/index.js.map +1 -1
  108. package/dist/materializer/projections/finish-run.d.ts.map +1 -1
  109. package/dist/materializer/projections/replace.d.ts.map +1 -1
  110. package/dist/materializer/projections/source-materialization.d.ts +6 -2
  111. package/dist/materializer/projections/source-materialization.d.ts.map +1 -1
  112. package/dist/models/execution/index.js +14 -14
  113. package/dist/objects/index.js +21 -21
  114. package/dist/objects/query/index.js +15 -15
  115. package/dist/pipelines/index.js +19 -19
  116. package/dist/projections/internal.js +16 -16
  117. package/dist/projections/types.d.ts +1 -1
  118. package/dist/projections/types.d.ts.map +1 -1
  119. package/dist/queues/in-memory.d.ts +1 -1
  120. package/dist/queues/in-memory.d.ts.map +1 -1
  121. package/dist/runtime/internal.js +19 -19
  122. package/dist/shares/internal.js +14 -14
  123. package/dist/shares/internal.js.map +1 -1
  124. package/dist/storage/action-runs/failure.js +2 -2
  125. package/dist/storage/ai-limits/enforcement.js +2 -2
  126. package/dist/storage/auth/errors.d.ts +1 -1
  127. package/dist/storage/auth/errors.d.ts.map +1 -1
  128. package/dist/storage/auth/in-memory/auth-storage.d.ts +2 -1
  129. package/dist/storage/auth/in-memory/auth-storage.d.ts.map +1 -1
  130. package/dist/storage/auth/types.d.ts +15 -7
  131. package/dist/storage/auth/types.d.ts.map +1 -1
  132. package/dist/storage/connector-connections/provider.js +1 -1
  133. package/dist/storage/file-upload-sessions/provider.js +5 -5
  134. package/dist/storage/index.d.ts +2 -2
  135. package/dist/storage/index.d.ts.map +1 -1
  136. package/dist/storage/index.js +29 -29
  137. package/dist/storage/index.js.map +1 -1
  138. package/dist/storage/internal.js +1 -1
  139. package/dist/storage/ontology/in-memory/sources.d.ts +6 -3
  140. package/dist/storage/ontology/in-memory/sources.d.ts.map +1 -1
  141. package/dist/storage/ontology/index.d.ts +1 -1
  142. package/dist/storage/ontology/index.d.ts.map +1 -1
  143. package/dist/storage/ontology/provider.d.ts +16 -3
  144. package/dist/storage/ontology/provider.d.ts.map +1 -1
  145. package/dist/storage/ontology/provider.js +8 -4
  146. package/dist/storage/ontology/provider.js.map +1 -1
  147. package/dist/storage/ontology/sources.d.ts +36 -8
  148. package/dist/storage/ontology/sources.d.ts.map +1 -1
  149. package/dist/storage/projection-runs/in-memory.d.ts +3 -1
  150. package/dist/storage/projection-runs/in-memory.d.ts.map +1 -1
  151. package/dist/storage/projection-runs/index.d.ts +1 -1
  152. package/dist/storage/projection-runs/index.d.ts.map +1 -1
  153. package/dist/storage/projection-runs/lifecycle.d.ts +12 -0
  154. package/dist/storage/projection-runs/lifecycle.d.ts.map +1 -1
  155. package/dist/storage/projection-runs/provider.js +10 -4
  156. package/dist/storage/projection-runs/provider.js.map +1 -1
  157. package/dist/storage/projection-runs/types.d.ts +32 -1
  158. package/dist/storage/projection-runs/types.d.ts.map +1 -1
  159. package/dist/storage/workflow-runs/provider.js +5 -5
  160. package/dist/syncs/index.js +20 -20
  161. package/dist/testing/auth-storage-contract.d.ts.map +1 -1
  162. package/dist/testing/index.js +381 -171
  163. package/dist/testing/index.js.map +5 -5
  164. package/dist/testing/ontology-storage-contract.d.ts.map +1 -1
  165. package/dist/testing/projection-run-storage-contract.d.ts.map +1 -1
  166. package/dist/webhooks/internal.js +15 -15
  167. package/dist/webhooks/internal.js.map +1 -1
  168. package/dist/workers/index.js +1 -1
  169. package/dist/workflows/index.js +34 -34
  170. package/package.json +13 -1
  171. package/src/auth/errors.ts +23 -0
  172. package/src/auth/index.ts +1 -1
  173. package/src/auth/runtime.ts +56 -22
  174. package/src/auth/strategy.ts +2 -0
  175. package/src/auth/types.ts +8 -0
  176. package/src/deploy/define.ts +6 -0
  177. package/src/deploy/index.ts +41 -0
  178. package/src/deploy/internal.ts +7 -0
  179. package/src/deploy/services.ts +51 -0
  180. package/src/deploy/types.ts +338 -0
  181. package/src/deploy/validation.ts +261 -0
  182. package/src/errors/catalog.ts +4 -0
  183. package/src/maintenance/ontology-maintenance.ts +32 -2
  184. package/src/maintenance/types.ts +8 -2
  185. package/src/materialization/dataset-watermark.ts +6 -4
  186. package/src/materialization/model.ts +7 -0
  187. package/src/materializer/README.md +26 -6
  188. package/src/materializer/projections/finish-run.ts +129 -26
  189. package/src/materializer/projections/replace.ts +67 -49
  190. package/src/materializer/projections/source-materialization.ts +11 -6
  191. package/src/projections/types.ts +1 -0
  192. package/src/storage/auth/errors.ts +0 -1
  193. package/src/storage/auth/in-memory/auth-storage.ts +44 -65
  194. package/src/storage/auth/types.ts +15 -7
  195. package/src/storage/index.ts +6 -1
  196. package/src/storage/ontology/in-memory/sources.ts +119 -55
  197. package/src/storage/ontology/index.ts +4 -1
  198. package/src/storage/ontology/provider.ts +64 -7
  199. package/src/storage/ontology/sources.ts +42 -8
  200. package/src/storage/projection-runs/in-memory.ts +41 -2
  201. package/src/storage/projection-runs/index.ts +2 -0
  202. package/src/storage/projection-runs/lifecycle.ts +61 -4
  203. package/src/storage/projection-runs/types.ts +41 -1
  204. package/src/testing/auth-storage-contract.ts +104 -130
  205. package/src/testing/ontology-storage-contract.ts +141 -15
  206. package/src/testing/projection-run-storage-contract.ts +174 -1
  207. package/dist/chunk-3qpcrcj8.js.map +0 -10
  208. package/dist/chunk-qma80ych.js.map +0 -11
  209. package/dist/chunk-znw0zvy4.js.map +0 -12
  210. /package/dist/{chunk-693f3zn8.js.map → chunk-1jvq82rp.js.map} +0 -0
  211. /package/dist/{chunk-898y24dd.js.map → chunk-3c90jvfj.js.map} +0 -0
  212. /package/dist/{chunk-vn3yh259.js.map → chunk-4gmng3vf.js.map} +0 -0
  213. /package/dist/{chunk-91wthfwe.js.map → chunk-4jph1t3v.js.map} +0 -0
  214. /package/dist/{chunk-y487ywrv.js.map → chunk-6q7c68yx.js.map} +0 -0
  215. /package/dist/{chunk-ypj2wqtj.js.map → chunk-70jmg2zx.js.map} +0 -0
  216. /package/dist/{chunk-s24qbp32.js.map → chunk-7jc21943.js.map} +0 -0
  217. /package/dist/{chunk-rzcjp5m2.js.map → chunk-8fjmqjyx.js.map} +0 -0
  218. /package/dist/{chunk-m8zkvep1.js.map → chunk-8w27xf9e.js.map} +0 -0
  219. /package/dist/{chunk-z9h698s8.js.map → chunk-a4g5yjm0.js.map} +0 -0
  220. /package/dist/{chunk-gmt22nxx.js.map → chunk-adbve9zt.js.map} +0 -0
  221. /package/dist/{chunk-gbcrz0gr.js.map → chunk-ex8s8wsk.js.map} +0 -0
  222. /package/dist/{chunk-4tnrzqqh.js.map → chunk-fj1dvp37.js.map} +0 -0
  223. /package/dist/{chunk-bdhfn0ww.js.map → chunk-kkqwzy6h.js.map} +0 -0
  224. /package/dist/{chunk-bep5rrdq.js.map → chunk-mmac1mp6.js.map} +0 -0
  225. /package/dist/{chunk-w9bp61e7.js.map → chunk-n5t4mq6z.js.map} +0 -0
  226. /package/dist/{chunk-n33e8dz8.js.map → chunk-p0nbkys4.js.map} +0 -0
  227. /package/dist/{chunk-04h4t2b5.js.map → chunk-py2dw8cw.js.map} +0 -0
  228. /package/dist/{chunk-jhyc777j.js.map → chunk-q3grgzp1.js.map} +0 -0
  229. /package/dist/{chunk-cbn96bve.js.map → chunk-r5sc1d2b.js.map} +0 -0
  230. /package/dist/{chunk-y6vnvayj.js.map → chunk-vjcd8d27.js.map} +0 -0
  231. /package/dist/{chunk-jmwy25mf.js.map → chunk-wd34wnsy.js.map} +0 -0
  232. /package/dist/{chunk-63fp9x3q.js.map → chunk-wem5vqjw.js.map} +0 -0
  233. /package/dist/{chunk-darm7eeg.js.map → chunk-xr7y35yj.js.map} +0 -0
  234. /package/dist/{chunk-a69fkrtr.js.map → chunk-y0zmae99.js.map} +0 -0
  235. /package/dist/{chunk-xgptywp0.js.map → chunk-y2aq6ag9.js.map} +0 -0
  236. /package/dist/{chunk-2hbhn1ff.js.map → chunk-yfppyaty.js.map} +0 -0
@@ -0,0 +1,309 @@
1
+ /**
2
+ * A deployment of this project: which services run, how browsers reach them, and the target that
3
+ * runs them. `sixb deploy` loads it from `sixb.deploy.ts`; the running app never reads it.
4
+ */
5
+ export interface DeployConfig {
6
+ /**
7
+ * Names the deployment on its target and in default domains. Lowercase letters, numbers, and
8
+ * hyphens.
9
+ */
10
+ readonly name: string;
11
+ /**
12
+ * Parent domain for HTTP services without their own `domain`: `<name>-<service>.<domain>`.
13
+ * Required unless every enabled HTTP service sets `domain`.
14
+ */
15
+ readonly domain?: string;
16
+ /** Where the services run, such as `new SshTarget({ host })` from `@sixb/deploy-ssh`. */
17
+ readonly target: DeployTarget;
18
+ /**
19
+ * Environment for every service and release step. Committed with the project, so secrets
20
+ * belong in the target's `.env` instead.
21
+ */
22
+ readonly env?: DeployEnv;
23
+ /** Override or disable the Sixb services. Every service runs unless set to `false`. */
24
+ readonly services?: DeployServicesConfig;
25
+ /** Long-running project scripts, supervised alongside the Sixb services. */
26
+ readonly processes?: Readonly<Record<string, DeployProcessDefinition>>;
27
+ }
28
+ export type DeployEnv = Readonly<Record<string, string>>;
29
+ /** The services a browser or client reaches through a public domain. */
30
+ export type DeployHttpServiceName = "api" | "atlas" | "app";
31
+ /** The services that must run as exactly one process: a second would duplicate their work. */
32
+ export type DeploySingletonServiceName = "orchestrator" | "scheduler" | "rules";
33
+ export type DeployServiceName = DeployHttpServiceName | DeploySingletonServiceName | "workers";
34
+ export type DeployWorkerType = "sync" | "action" | "agent" | "pipeline" | "projection" | "workflow";
35
+ /** Action jobs run one at a time, so their concurrency is fixed. */
36
+ export type DeployConfigurableWorkerType = Exclude<DeployWorkerType, "action">;
37
+ export interface DeployServicesConfig {
38
+ readonly api?: boolean | DeployHttpServiceConfig;
39
+ readonly atlas?: boolean | DeployHttpServiceConfig;
40
+ readonly app?: boolean | DeployHttpServiceConfig;
41
+ readonly orchestrator?: boolean | DeploySingletonServiceConfig;
42
+ readonly scheduler?: boolean | DeploySingletonServiceConfig;
43
+ readonly rules?: boolean | DeploySingletonServiceConfig;
44
+ readonly workers?: boolean | DeployWorkersConfig;
45
+ }
46
+ export interface DeployHttpServiceConfig {
47
+ /** Public hostname. Defaults to `<name>-<service>.<domain>`. */
48
+ readonly domain?: string;
49
+ /** Added to the deployment's `env` for this service only. */
50
+ readonly env?: DeployEnv;
51
+ readonly process?: DeployProcessOptions;
52
+ }
53
+ export interface DeploySingletonServiceConfig {
54
+ /** Added to the deployment's `env` for this service only. */
55
+ readonly env?: DeployEnv;
56
+ readonly process?: DeployProcessOptions;
57
+ }
58
+ export interface DeployWorkersConfig {
59
+ /**
60
+ * The worker types to run. `"all"`, the default, runs every type the project registers work
61
+ * for.
62
+ */
63
+ readonly types?: readonly DeployWorkerType[] | "all";
64
+ /** Wall-clock budget for one agent turn, such as `"30s"`, `"10m"`, or `"1h"`. */
65
+ readonly agentTurnTimeout?: string;
66
+ /** Jobs each worker type runs at once inside one process. */
67
+ readonly concurrency?: Readonly<Partial<Record<DeployConfigurableWorkerType, number>>>;
68
+ /** Added to the deployment's `env` for the workers only. */
69
+ readonly env?: DeployEnv;
70
+ readonly process?: DeployScalableProcessOptions;
71
+ }
72
+ export interface DeployProcessDefinition {
73
+ /** Script to run with Bun, relative to the project directory. */
74
+ readonly entrypoint: string;
75
+ readonly args?: readonly string[];
76
+ /** Added to the deployment's `env` for this process only. */
77
+ readonly env?: DeployEnv;
78
+ readonly process?: DeployScalableProcessOptions;
79
+ }
80
+ export interface DeployProcessOptions {
81
+ /** How long a stopping process may take before it is killed. Defaults to 10000. */
82
+ readonly killTimeoutMs?: number;
83
+ /** Wait before restarting a process that exited, growing with each restart. Defaults to 1000. */
84
+ readonly restartDelayMs?: number;
85
+ /** Restart the process when its memory passes this size, such as `"512M"` or `"2G"`. */
86
+ readonly maxMemory?: string;
87
+ }
88
+ export interface DeployScalableProcessOptions extends DeployProcessOptions {
89
+ /** How many copies of the process to run. Defaults to 1. */
90
+ readonly instances?: number;
91
+ }
92
+ /**
93
+ * Runs a deployment. `@sixb/deploy-ssh` provides the SSH target. Third-party targets are not
94
+ * supported in 0.1.x: this contract still grows with each thing `sixb deploy` learns to do.
95
+ */
96
+ export interface DeployTarget {
97
+ /** The kind of target, shown in `sixb deploy` output, such as `"ssh"`. */
98
+ readonly kind: string;
99
+ /** Where the deployment runs, shown in output, such as `"sixb@203.0.113.10"`. */
100
+ readonly location: string;
101
+ /** The address an HTTP service listens on, where the target's proxy reaches it. */
102
+ listenAddress(service: DeployHttpServiceName): DeployListenAddress;
103
+ /**
104
+ * Ships the source, runs the release, and resolves once its services answer. Rejects with the
105
+ * reason when a step fails; the steps it reported say how far it got.
106
+ */
107
+ deploy(release: DeployRelease, source: DeploySource, context: DeployContext): Promise<void>;
108
+ /** What the deployment runs right now, and which release it runs. */
109
+ status(context: DeployOperationContext): Promise<DeployStatus>;
110
+ /** Writes recent log lines, then new ones as they arrive when `follow` is set. */
111
+ logs(options: DeployLogsOptions, context: DeployOperationContext): Promise<void>;
112
+ /** Restarts, stops, or starts one service, or every service. */
113
+ control(action: DeployControlAction, service: string | undefined, context: DeployOperationContext): Promise<void>;
114
+ /** What stands between the target and a working deploy of the release, changing nothing. */
115
+ check(release: DeployRelease, context: DeployCheckContext): Promise<readonly DeployCheck[]>;
116
+ /** Prepares the target for the release, fixing what `check` reports as fixable. */
117
+ setup?(release: DeployRelease, context: DeploySetupContext): Promise<void>;
118
+ /** Who may deploy and operate the deployment, for a target reached with keys. */
119
+ readonly access?: DeployAccess;
120
+ /** Credentials for a CI job that deploys, for a target reached with keys. */
121
+ readonly ci?: DeployCi;
122
+ }
123
+ export interface DeployCheck {
124
+ readonly id: string;
125
+ /** What was checked, such as `"SSH"` or `"api DNS"`. */
126
+ readonly label: string;
127
+ /**
128
+ * `fixable`: `sixb deploy setup` fixes it. `manual`: only you can, as `remedy` says. Both stop
129
+ * a deploy; a `warning` does not.
130
+ */
131
+ readonly status: "ok" | "fixable" | "manual" | "warning";
132
+ readonly detail: string;
133
+ /** What to do about it, when the status is not `ok`. */
134
+ readonly remedy?: string;
135
+ }
136
+ export interface DeployCheckContext extends DeployOperationContext {
137
+ /** The project's directory inside its repository: `.` at the root. */
138
+ readonly projectPath: string;
139
+ }
140
+ export interface DeploySetupContext extends DeployCheckContext {
141
+ /** The account with sudo that prepares a server, for a target that needs one. */
142
+ readonly admin?: string;
143
+ /** A public key file to authorize for deploys, instead of the one the target would pick. */
144
+ readonly key?: string;
145
+ /** A line of progress for the person running setup. */
146
+ write(line: string): void;
147
+ }
148
+ export interface DeployAccess {
149
+ list(context: DeployOperationContext): Promise<readonly DeployAccessKey[]>;
150
+ /** Authorizes a public key, given as its text (`ssh-ed25519 AAAA… comment`). */
151
+ add(key: string, context: DeployOperationContext): Promise<DeployAccessKey>;
152
+ /** Revokes the keys whose fingerprint or comment matches, and returns them. */
153
+ remove(match: string, context: DeployOperationContext): Promise<readonly DeployAccessKey[]>;
154
+ }
155
+ export interface DeployAccessKey {
156
+ readonly type: string;
157
+ readonly fingerprint: string;
158
+ readonly comment: string;
159
+ /** Whether the key is limited to running commands: no forwarding, no terminal. */
160
+ readonly restricted: boolean;
161
+ }
162
+ /**
163
+ * Lets a CI job deploy. `sixb deploy ci` stores what `create` returns as the CI system's secrets and
164
+ * writes the workflow around it.
165
+ */
166
+ export interface DeployCi {
167
+ /**
168
+ * Creates a credential for one CI job, such as `"github:acme/shop"`, and authorizes it on the
169
+ * target next to the job's earlier ones. Running it again for the same job rotates the credential.
170
+ */
171
+ create(job: string, context: DeployOperationContext): Promise<DeployCiCredential>;
172
+ }
173
+ export interface DeployCiCredential {
174
+ /** Describes the credential, such as its key's fingerprint. */
175
+ readonly description: string;
176
+ /** What the CI job needs, by environment variable name. CI stores them as secrets. */
177
+ readonly secrets: Readonly<Record<string, string>>;
178
+ /** Shell lines that install the credential on the CI runner, with `secrets` in the environment. */
179
+ readonly install: readonly string[];
180
+ /** Revokes the job's earlier credentials once CI holds this one, and returns them. */
181
+ retireOthers(): Promise<readonly DeployAccessKey[]>;
182
+ /** Revokes this credential, when CI could not store it. */
183
+ revoke(): Promise<void>;
184
+ }
185
+ export interface DeployListenAddress {
186
+ readonly host: string;
187
+ readonly port: number;
188
+ }
189
+ /**
190
+ * Everything a deployment runs, resolved by `sixb deploy` from `sixb.deploy.ts`. A target decides
191
+ * where and how it runs; which processes exist, and the command each one starts with, come from
192
+ * Sixb.
193
+ */
194
+ export interface DeployRelease {
195
+ readonly name: string;
196
+ readonly target: {
197
+ readonly kind: string;
198
+ readonly location: string;
199
+ };
200
+ /** The Bun version the project runs on. */
201
+ readonly bunVersion: string;
202
+ /** The environment every step and service starts from. */
203
+ readonly env: DeployEnv;
204
+ readonly steps: {
205
+ /** Runs while the previous release still serves. */
206
+ readonly build: readonly DeployCommand[];
207
+ /** Runs after the services stop and before they start again. */
208
+ readonly beforeStart: readonly DeployCommand[];
209
+ };
210
+ readonly services: readonly DeployReleaseService[];
211
+ }
212
+ export interface DeployCommand {
213
+ /** `sixb` is the CLI the project installs; `bun` runs a project script. */
214
+ readonly program: "sixb" | "bun";
215
+ readonly args: readonly string[];
216
+ }
217
+ export interface DeployReleaseService {
218
+ readonly name: string;
219
+ readonly kind: "http" | "singleton" | "workers" | "script";
220
+ readonly command: DeployCommand;
221
+ /** The complete environment: the release's, then the service's own additions. */
222
+ readonly env: DeployEnv;
223
+ readonly instances: number;
224
+ readonly http?: DeployReleaseHttp;
225
+ readonly process: DeployReleaseProcess;
226
+ }
227
+ export interface DeployReleaseHttp extends DeployListenAddress {
228
+ readonly domain: string;
229
+ readonly publicOrigin: string;
230
+ /** Answers once the service can take traffic, when the service has such a route. */
231
+ readonly readinessPath?: string;
232
+ }
233
+ export interface DeployReleaseProcess {
234
+ readonly killTimeoutMs: number;
235
+ readonly restartDelayMs: number;
236
+ readonly maxMemory?: string;
237
+ }
238
+ /** The committed files a deployment runs, read from git by `sixb deploy`. */
239
+ export interface DeploySource {
240
+ /** The commit being deployed. */
241
+ readonly commit: string;
242
+ /** What the deployer asked for, such as `HEAD` or `main`. */
243
+ readonly ref: string;
244
+ /** The project's directory inside the repository: `.` at its root. */
245
+ readonly projectPath: string;
246
+ /** Tar archives of the committed files: the repository first, then each submodule. */
247
+ readonly archives: readonly DeploySourceArchive[];
248
+ }
249
+ export interface DeploySourceArchive {
250
+ /** Where the archive's files belong, relative to the repository root: `.` for the root. */
251
+ readonly path: string;
252
+ open(): ReadableStream<Uint8Array>;
253
+ }
254
+ export interface DeployOperationContext {
255
+ /** The deployment's `name`, which a target may run several of. */
256
+ readonly name: string;
257
+ }
258
+ export interface DeployContext extends DeployOperationContext {
259
+ /** Who deployed, recorded with the release. */
260
+ readonly deployedBy: string;
261
+ report(event: DeployEvent): void;
262
+ }
263
+ export type DeployEvent =
264
+ /** The steps the deployment will run, reported before the first one starts. */
265
+ {
266
+ readonly type: "steps";
267
+ readonly labels: readonly string[];
268
+ } | {
269
+ readonly type: "step";
270
+ readonly index: number;
271
+ readonly status: "running" | "done";
272
+ } | {
273
+ readonly type: "output";
274
+ readonly line: string;
275
+ };
276
+ export interface DeployStatus {
277
+ /** The release the target last deployed, if any. */
278
+ readonly release: DeployRecord | null;
279
+ /** Whether the target's process supervisor is running. */
280
+ readonly running: boolean;
281
+ readonly processes: readonly DeployProcessStatus[];
282
+ }
283
+ export interface DeployRecord {
284
+ readonly commit: string;
285
+ readonly ref: string;
286
+ readonly deployedAt: string;
287
+ readonly deployedBy: string;
288
+ }
289
+ export interface DeployProcessStatus {
290
+ readonly service: string;
291
+ readonly instance: number;
292
+ readonly status: "starting" | "running" | "stopping" | "stopped" | "exited";
293
+ readonly pid?: number;
294
+ readonly restarts: number;
295
+ readonly startedAt?: string;
296
+ readonly cpuPercent?: number;
297
+ readonly memoryBytes?: number;
298
+ readonly lastError?: string;
299
+ }
300
+ export interface DeployLogsOptions {
301
+ /** One service's logs, or every service's. */
302
+ readonly service?: string;
303
+ /** How many recent lines to write first. */
304
+ readonly tail: number;
305
+ readonly follow: boolean;
306
+ write(line: string): void;
307
+ }
308
+ export type DeployControlAction = "restart" | "start" | "stop";
309
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/deploy/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,WAAW,YAAY;IAC3B;;;OAGG;IACH,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB;;;OAGG;IACH,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAA;IACxB,yFAAyF;IACzF,QAAQ,CAAC,MAAM,EAAE,YAAY,CAAA;IAC7B;;;OAGG;IACH,QAAQ,CAAC,GAAG,CAAC,EAAE,SAAS,CAAA;IACxB,uFAAuF;IACvF,QAAQ,CAAC,QAAQ,CAAC,EAAE,oBAAoB,CAAA;IACxC,4EAA4E;IAC5E,QAAQ,CAAC,SAAS,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,uBAAuB,CAAC,CAAC,CAAA;CACvE;AAED,MAAM,MAAM,SAAS,GAAG,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAA;AAExD,wEAAwE;AACxE,MAAM,MAAM,qBAAqB,GAAG,KAAK,GAAG,OAAO,GAAG,KAAK,CAAA;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AA;IACzB,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAA;IAC3B,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAA;IAC5B,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAA;IAC7B,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAC5B;AAED,MAAM,WAAW,iBAAiB;IAChC,8CAA8C;IAC9C,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAA;IACzB,4CAA4C;IAC5C,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAA;IACxB,KAAK,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAA;CAC1B;AAED,MAAM,MAAM,mBAAmB,GAAG,SAAS,GAAG,OAAO,GAAG,MAAM,CAAA"}
@@ -0,0 +1,7 @@
1
+ import type { DeployConfig } from "./types";
2
+ /**
3
+ * Checks a loaded `sixb.deploy.ts` default export and returns it typed. Validates shape and
4
+ * values only; `sixb deploy` resolves defaults and checks what depends on the target.
5
+ */
6
+ export declare function validateDeployConfig(value: unknown): DeployConfig;
7
+ //# sourceMappingURL=validation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validation.d.ts","sourceRoot":"","sources":["../../src/deploy/validation.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAe3C;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,OAAO,GAAG,YAAY,CAYjE"}
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import"../chunk-rzkr70gr.js";
2
+ import"../chunk-6fsr7y93.js";
3
3
  import"../chunk-z3y5kg1x.js";
4
4
  import {
5
5
  attachSixbErrorReporter2,
@@ -9,11 +9,11 @@ import {
9
9
  reportEventDeliveryFailure2,
10
10
  reportRuleEvaluationFailure2,
11
11
  flushSixbErrors2
12
- } from "../chunk-y6vnvayj.js";
12
+ } from "../chunk-vjcd8d27.js";
13
13
  import {
14
14
  normalizeReportedError2,
15
15
  SixbErrorReporter2
16
- } from "../chunk-bdhfn0ww.js";
16
+ } from "../chunk-kkqwzy6h.js";
17
17
  export {
18
18
  SixbErrorReporter2 as SixbErrorReporter,
19
19
  attachSixbErrorReporter2 as attachSixbErrorReporter,
@@ -141,6 +141,10 @@ export declare const SIXB_ERROR_DEFINITIONS: {
141
141
  readonly publicMessage: "The embedding call was interrupted; its outcome and charges may be unknown.";
142
142
  readonly retryable: false;
143
143
  };
144
+ readonly "storage.unavailable": {
145
+ readonly publicMessage: "Storage is temporarily unavailable.";
146
+ readonly retryable: true;
147
+ };
144
148
  readonly "sync.execution_failed": {
145
149
  readonly publicMessage: "Sync execution failed.";
146
150
  readonly retryable: false;
@@ -1 +1 @@
1
- {"version":3,"file":"catalog.d.ts","sourceRoot":"","sources":["../../src/errors/catalog.ts"],"names":[],"mappings":"AAKA;;;;;GAKG;AACH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyJ+B,CAAA;AAElE,KAAK,gBAAgB,GAAG,MAAM,OAAO,sBAAsB,CAAA;AAE3D,6EAA6E;AAC7E,eAAO,MAAM,gBAAgB,EAAyD,SAAS,CAC7F,gBAAgB,EAChB,GAAG,gBAAgB,EAAE,CACtB,CAAA"}
1
+ {"version":3,"file":"catalog.d.ts","sourceRoot":"","sources":["../../src/errors/catalog.ts"],"names":[],"mappings":"AAKA;;;;;GAKG;AACH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6J+B,CAAA;AAElE,KAAK,gBAAgB,GAAG,MAAM,OAAO,sBAAsB,CAAA;AAE3D,6EAA6E;AAC7E,eAAO,MAAM,gBAAgB,EAAyD,SAAS,CAC7F,gBAAgB,EAChB,GAAG,gBAAgB,EAAE,CACtB,CAAA"}
@@ -10,7 +10,7 @@ import {
10
10
  serializeSixbFailure2,
11
11
  parseSixbFailure2,
12
12
  summarizeErrorMessage2
13
- } from "../chunk-rzkr70gr.js";
13
+ } from "../chunk-6fsr7y93.js";
14
14
  import"../chunk-z3y5kg1x.js";
15
15
  export {
16
16
  SIXB_ERROR_CODES2 as SIXB_ERROR_CODES,
@@ -23,7 +23,7 @@ import {
23
23
  DomainEventService2,
24
24
  createDomainEventService2,
25
25
  toStoredEvent2
26
- } from "../chunk-ypj2wqtj.js";
26
+ } from "../chunk-70jmg2zx.js";
27
27
  import {
28
28
  events2,
29
29
  eventSelectorSpec2,
@@ -32,8 +32,8 @@ import {
32
32
  import {
33
33
  scopeKeysForEvent2
34
34
  } from "../chunk-r2y23egw.js";
35
- import"../chunk-bdhfn0ww.js";
36
- import"../chunk-rzkr70gr.js";
35
+ import"../chunk-kkqwzy6h.js";
36
+ import"../chunk-6fsr7y93.js";
37
37
  import"../chunk-z3y5kg1x.js";
38
38
  export {
39
39
  ACTION_EVENT_DEFINITIONS2 as ACTION_EVENT_DEFINITIONS,
@@ -6,69 +6,69 @@ import {
6
6
  bindDurableAgentExecution2,
7
7
  restoreAgentExecutionScope2,
8
8
  assertAgentExecutionRecord2
9
- } from "../chunk-cvrbhvtr.js";
10
- import"../chunk-a69fkrtr.js";
11
- import"../chunk-cbn96bve.js";
12
- import"../chunk-bep5rrdq.js";
13
- import"../chunk-gmt22nxx.js";
14
- import"../chunk-91wthfwe.js";
15
- import"../chunk-85cd7e8c.js";
16
- import"../chunk-w9bp61e7.js";
9
+ } from "../chunk-2tz5vnvz.js";
10
+ import"../chunk-y0zmae99.js";
11
+ import"../chunk-r5sc1d2b.js";
12
+ import"../chunk-adbve9zt.js";
13
+ import"../chunk-mmac1mp6.js";
17
14
  import"../chunk-bxx3ms5t.js";
18
- import"../chunk-04h4t2b5.js";
15
+ import"../chunk-py2dw8cw.js";
19
16
  import"../chunk-f85hpqnm.js";
20
- import"../chunk-4tnrzqqh.js";
17
+ import"../chunk-fj1dvp37.js";
18
+ import"../chunk-4jph1t3v.js";
19
+ import"../chunk-85cd7e8c.js";
20
+ import"../chunk-n5t4mq6z.js";
21
21
  import"../chunk-5a4a52tq.js";
22
22
  import"../chunk-91kcnbf0.js";
23
23
  import"../chunk-rb143ggb.js";
24
24
  import"../chunk-cd234ba4.js";
25
- import"../chunk-693f3zn8.js";
26
- import"../chunk-63fp9x3q.js";
27
- import"../chunk-898y24dd.js";
28
- import"../chunk-rqtdtm43.js";
25
+ import"../chunk-1jvq82rp.js";
26
+ import"../chunk-wem5vqjw.js";
27
+ import"../chunk-z708gemf.js";
28
+ import"../chunk-3c90jvfj.js";
29
29
  import {
30
30
  ensureExecutionRecord2
31
- } from "../chunk-m8zkvep1.js";
32
- import"../chunk-gc226ten.js";
31
+ } from "../chunk-8w27xf9e.js";
32
+ import"../chunk-fjw417jf.js";
33
+ import"../chunk-br3k6qbf.js";
33
34
  import"../chunk-jmfet9r4.js";
34
35
  import"../chunk-qf954wje.js";
35
- import"../chunk-darm7eeg.js";
36
+ import"../chunk-xr7y35yj.js";
37
+ import"../chunk-tw03bsmb.js";
38
+ import"../chunk-p0nbkys4.js";
36
39
  import"../chunk-zdkcdshk.js";
37
- import"../chunk-ht4a7mjg.js";
40
+ import"../chunk-h89wz928.js";
41
+ import"../chunk-g4rbm4a6.js";
38
42
  import"../chunk-mr60an99.js";
39
43
  import"../chunk-mmagke4x.js";
40
- import"../chunk-znw0zvy4.js";
41
- import"../chunk-qma80ych.js";
42
- import"../chunk-br3k6qbf.js";
44
+ import"../chunk-4wn7bxxa.js";
45
+ import"../chunk-hn2r7z41.js";
46
+ import"../chunk-y2aq6ag9.js";
43
47
  import"../chunk-fc5zfxy1.js";
44
48
  import"../chunk-69266efg.js";
45
49
  import"../chunk-xnx96gfy.js";
46
50
  import"../chunk-s3csryxe.js";
47
51
  import"../chunk-jgwb25gc.js";
48
- import"../chunk-tw03bsmb.js";
49
- import"../chunk-n33e8dz8.js";
50
- import"../chunk-h89wz928.js";
51
- import"../chunk-xgptywp0.js";
52
52
  import"../chunk-ky7zpbtt.js";
53
53
  import"../chunk-pqajwytd.js";
54
54
  import"../chunk-3nx8vj5a.js";
55
55
  import"../chunk-7ytf06d3.js";
56
- import"../chunk-y6vnvayj.js";
57
- import"../chunk-bdhfn0ww.js";
56
+ import"../chunk-wr8qp979.js";
57
+ import"../chunk-vjcd8d27.js";
58
+ import"../chunk-kkqwzy6h.js";
58
59
  import"../chunk-39tqv9hz.js";
59
60
  import"../chunk-gfdh9kqa.js";
60
- import"../chunk-wr8qp979.js";
61
61
  import"../chunk-dmn70ztd.js";
62
- import"../chunk-vn3yh259.js";
63
- import"../chunk-9pfw47qx.js";
62
+ import"../chunk-4gmng3vf.js";
63
+ import"../chunk-qne45xqq.js";
64
64
  import"../chunk-2fv8sajb.js";
65
65
  import"../chunk-drz59ve0.js";
66
- import"../chunk-rzcjp5m2.js";
66
+ import"../chunk-8fjmqjyx.js";
67
67
  import"../chunk-v4jbb3rs.js";
68
68
  import"../chunk-d8yes9yx.js";
69
- import"../chunk-rzkr70gr.js";
69
+ import"../chunk-6fsr7y93.js";
70
70
  import"../chunk-z3y5kg1x.js";
71
- import"../chunk-0321g649.js";
71
+ import"../chunk-2jntasmh.js";
72
72
  export {
73
73
  assertAgentExecutionRecord2 as assertAgentExecutionRecord,
74
74
  bindDurableAgentExecution2 as bindDurableAgentExecution,
@@ -2,21 +2,21 @@
2
2
  import {
3
3
  bindModelExecutionAttempt,
4
4
  isBoundSixb
5
- } from "../chunk-cvrbhvtr.js";
5
+ } from "../chunk-2tz5vnvz.js";
6
6
  import {
7
7
  getOntologyMutationRuntime2
8
8
  } from "../chunk-85cd7e8c.js";
9
- import"../chunk-rzcjp5m2.js";
10
- import"../chunk-rzkr70gr.js";
9
+ import"../chunk-8fjmqjyx.js";
10
+ import"../chunk-6fsr7y93.js";
11
11
  import"../chunk-z3y5kg1x.js";
12
12
  import"../chunk-v4jbb3rs.js";
13
13
  import"../chunk-d8yes9yx.js";
14
- import"../chunk-ht4a7mjg.js";
15
- import"../chunk-xgptywp0.js";
14
+ import"../chunk-g4rbm4a6.js";
15
+ import"../chunk-y2aq6ag9.js";
16
16
  import"../chunk-fc5zfxy1.js";
17
- import"../chunk-9pfw47qx.js";
17
+ import"../chunk-qne45xqq.js";
18
18
  import"../chunk-drz59ve0.js";
19
- import"../chunk-0321g649.js";
19
+ import"../chunk-2jntasmh.js";
20
20
  import"../chunk-pqajwytd.js";
21
21
  import"../chunk-ky7zpbtt.js";
22
22
  import"../chunk-gfdh9kqa.js";
@@ -25,47 +25,47 @@ import"../chunk-69266efg.js";
25
25
  import"../chunk-xnx96gfy.js";
26
26
  import"../chunk-jgwb25gc.js";
27
27
  import"../chunk-h89wz928.js";
28
- import"../chunk-n33e8dz8.js";
28
+ import"../chunk-p0nbkys4.js";
29
29
  import"../chunk-tw03bsmb.js";
30
30
  import"../chunk-3nx8vj5a.js";
31
- import"../chunk-gc226ten.js";
31
+ import"../chunk-fjw417jf.js";
32
32
  import"../chunk-7ytf06d3.js";
33
33
  import"../chunk-mr60an99.js";
34
34
  import"../chunk-mmagke4x.js";
35
- import"../chunk-qma80ych.js";
36
- import"../chunk-znw0zvy4.js";
35
+ import"../chunk-hn2r7z41.js";
36
+ import"../chunk-4wn7bxxa.js";
37
37
  import"../chunk-jmfet9r4.js";
38
38
  import"../chunk-qf954wje.js";
39
- import"../chunk-darm7eeg.js";
40
- import"../chunk-898y24dd.js";
41
- import"../chunk-63fp9x3q.js";
42
- import"../chunk-y6vnvayj.js";
43
- import"../chunk-4tnrzqqh.js";
39
+ import"../chunk-xr7y35yj.js";
40
+ import"../chunk-3c90jvfj.js";
41
+ import"../chunk-wem5vqjw.js";
42
+ import"../chunk-vjcd8d27.js";
43
+ import"../chunk-fj1dvp37.js";
44
44
  import"../chunk-dmn70ztd.js";
45
- import"../chunk-vn3yh259.js";
45
+ import"../chunk-4gmng3vf.js";
46
46
  import"../chunk-5a4a52tq.js";
47
- import"../chunk-cbn96bve.js";
47
+ import"../chunk-r5sc1d2b.js";
48
48
  import"../chunk-cd234ba4.js";
49
49
  import"../chunk-91kcnbf0.js";
50
50
  import"../chunk-f85hpqnm.js";
51
- import"../chunk-rqtdtm43.js";
51
+ import"../chunk-z708gemf.js";
52
52
  import"../chunk-wr8qp979.js";
53
- import"../chunk-693f3zn8.js";
54
- import"../chunk-a69fkrtr.js";
55
- import"../chunk-bep5rrdq.js";
56
- import"../chunk-gmt22nxx.js";
57
- import"../chunk-91wthfwe.js";
58
- import"../chunk-w9bp61e7.js";
53
+ import"../chunk-1jvq82rp.js";
54
+ import"../chunk-y0zmae99.js";
55
+ import"../chunk-adbve9zt.js";
56
+ import"../chunk-mmac1mp6.js";
59
57
  import"../chunk-bxx3ms5t.js";
60
- import"../chunk-04h4t2b5.js";
58
+ import"../chunk-py2dw8cw.js";
59
+ import"../chunk-4jph1t3v.js";
60
+ import"../chunk-n5t4mq6z.js";
61
61
  import"../chunk-rb143ggb.js";
62
62
  import {
63
63
  restoreTrustedPrimitiveExecutionScope
64
- } from "../chunk-m8zkvep1.js";
65
- import"../chunk-zdkcdshk.js";
64
+ } from "../chunk-8w27xf9e.js";
66
65
  import"../chunk-br3k6qbf.js";
66
+ import"../chunk-zdkcdshk.js";
67
67
  import"../chunk-s3csryxe.js";
68
- import"../chunk-bdhfn0ww.js";
68
+ import"../chunk-kkqwzy6h.js";
69
69
  import"../chunk-2fv8sajb.js";
70
70
 
71
71
  // src/execution/primitive.ts