@smthrs/control 0.0.0-stage → 1.0.0-rc.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 (418) hide show
  1. package/CHANGELOG.md +194 -0
  2. package/LICENSE +21 -0
  3. package/README.md +168 -2
  4. package/dist/cjs/ApprovalAuthority.d.ts +73 -0
  5. package/dist/cjs/ApprovalAuthority.d.ts.map +1 -0
  6. package/dist/cjs/ApprovalAuthority.js +62 -0
  7. package/dist/cjs/ApprovalAuthority.js.map +7 -0
  8. package/dist/cjs/Cancellation.d.ts +107 -0
  9. package/dist/cjs/Cancellation.d.ts.map +1 -0
  10. package/dist/cjs/Cancellation.js +72 -0
  11. package/dist/cjs/Cancellation.js.map +7 -0
  12. package/dist/cjs/Channels.d.ts +170 -0
  13. package/dist/cjs/Channels.d.ts.map +1 -0
  14. package/dist/cjs/Channels.js +278 -0
  15. package/dist/cjs/Channels.js.map +7 -0
  16. package/dist/cjs/Control.d.ts +202 -0
  17. package/dist/cjs/Control.d.ts.map +1 -0
  18. package/dist/cjs/Control.js +47 -0
  19. package/dist/cjs/Control.js.map +7 -0
  20. package/dist/cjs/ControlClient.d.ts +52 -0
  21. package/dist/cjs/ControlClient.d.ts.map +1 -0
  22. package/dist/cjs/ControlClient.js +191 -0
  23. package/dist/cjs/ControlClient.js.map +7 -0
  24. package/dist/cjs/ControlError.d.ts +318 -0
  25. package/dist/cjs/ControlError.d.ts.map +1 -0
  26. package/dist/cjs/ControlError.js +249 -0
  27. package/dist/cjs/ControlError.js.map +7 -0
  28. package/dist/cjs/ControlExecutor.d.ts +372 -0
  29. package/dist/cjs/ControlExecutor.d.ts.map +1 -0
  30. package/dist/cjs/ControlExecutor.js +123 -0
  31. package/dist/cjs/ControlExecutor.js.map +7 -0
  32. package/dist/cjs/ControlFacts.d.ts +454 -0
  33. package/dist/cjs/ControlFacts.d.ts.map +1 -0
  34. package/dist/cjs/ControlFacts.js +261 -0
  35. package/dist/cjs/ControlFacts.js.map +7 -0
  36. package/dist/cjs/ControlLive.d.ts +23 -0
  37. package/dist/cjs/ControlLive.d.ts.map +1 -0
  38. package/dist/cjs/ControlLive.js +1280 -0
  39. package/dist/cjs/ControlLive.js.map +7 -0
  40. package/dist/cjs/ControlRpcs.d.ts +1204 -0
  41. package/dist/cjs/ControlRpcs.d.ts.map +1 -0
  42. package/dist/cjs/ControlRpcs.js +247 -0
  43. package/dist/cjs/ControlRpcs.js.map +7 -0
  44. package/dist/cjs/ControlRuntime.d.ts +635 -0
  45. package/dist/cjs/ControlRuntime.d.ts.map +1 -0
  46. package/dist/cjs/ControlRuntime.js +740 -0
  47. package/dist/cjs/ControlRuntime.js.map +7 -0
  48. package/dist/cjs/ControlSchema.d.ts +2642 -0
  49. package/dist/cjs/ControlSchema.d.ts.map +1 -0
  50. package/dist/cjs/ControlSchema.js +634 -0
  51. package/dist/cjs/ControlSchema.js.map +7 -0
  52. package/dist/cjs/ControlServer.d.ts +51 -0
  53. package/dist/cjs/ControlServer.d.ts.map +1 -0
  54. package/dist/cjs/ControlServer.js +121 -0
  55. package/dist/cjs/ControlServer.js.map +7 -0
  56. package/dist/cjs/Credential.d.ts +136 -0
  57. package/dist/cjs/Credential.d.ts.map +1 -0
  58. package/dist/cjs/Credential.js +168 -0
  59. package/dist/cjs/Credential.js.map +7 -0
  60. package/dist/cjs/CredentialCipher.d.ts +90 -0
  61. package/dist/cjs/CredentialCipher.d.ts.map +1 -0
  62. package/dist/cjs/CredentialCipher.js +45 -0
  63. package/dist/cjs/CredentialCipher.js.map +7 -0
  64. package/dist/cjs/CredentialStore.d.ts +97 -0
  65. package/dist/cjs/CredentialStore.d.ts.map +1 -0
  66. package/dist/cjs/CredentialStore.js +81 -0
  67. package/dist/cjs/CredentialStore.js.map +7 -0
  68. package/dist/cjs/DispatchReader.d.ts +112 -0
  69. package/dist/cjs/DispatchReader.d.ts.map +1 -0
  70. package/dist/cjs/DispatchReader.js +45 -0
  71. package/dist/cjs/DispatchReader.js.map +7 -0
  72. package/dist/cjs/Health.d.ts +333 -0
  73. package/dist/cjs/Health.d.ts.map +1 -0
  74. package/dist/cjs/Health.js +311 -0
  75. package/dist/cjs/Health.js.map +7 -0
  76. package/dist/cjs/JevSessionChecker.d.ts +57 -0
  77. package/dist/cjs/JevSessionChecker.d.ts.map +1 -0
  78. package/dist/cjs/JevSessionChecker.js +113 -0
  79. package/dist/cjs/JevSessionChecker.js.map +7 -0
  80. package/dist/cjs/Lineage.d.ts +131 -0
  81. package/dist/cjs/Lineage.d.ts.map +1 -0
  82. package/dist/cjs/Lineage.js +81 -0
  83. package/dist/cjs/Lineage.js.map +7 -0
  84. package/dist/cjs/Migrations.d.ts +34 -0
  85. package/dist/cjs/Migrations.d.ts.map +1 -0
  86. package/dist/cjs/Migrations.js +60 -0
  87. package/dist/cjs/Migrations.js.map +7 -0
  88. package/dist/cjs/Monitor.d.ts +282 -0
  89. package/dist/cjs/Monitor.d.ts.map +1 -0
  90. package/dist/cjs/Monitor.js +283 -0
  91. package/dist/cjs/Monitor.js.map +7 -0
  92. package/dist/cjs/ScopedToken.d.ts +193 -0
  93. package/dist/cjs/ScopedToken.d.ts.map +1 -0
  94. package/dist/cjs/ScopedToken.js +135 -0
  95. package/dist/cjs/ScopedToken.js.map +7 -0
  96. package/dist/cjs/SqlControlRuntime.d.ts +161 -0
  97. package/dist/cjs/SqlControlRuntime.d.ts.map +1 -0
  98. package/dist/cjs/SqlControlRuntime.js +1521 -0
  99. package/dist/cjs/SqlControlRuntime.js.map +7 -0
  100. package/dist/cjs/SqlCredentialStore.d.ts +43 -0
  101. package/dist/cjs/SqlCredentialStore.d.ts.map +1 -0
  102. package/dist/cjs/SqlCredentialStore.js +113 -0
  103. package/dist/cjs/SqlCredentialStore.js.map +7 -0
  104. package/dist/cjs/Steering.d.ts +69 -0
  105. package/dist/cjs/Steering.d.ts.map +1 -0
  106. package/dist/cjs/Steering.js +49 -0
  107. package/dist/cjs/Steering.js.map +7 -0
  108. package/dist/cjs/SystemFlows.d.ts +223 -0
  109. package/dist/cjs/SystemFlows.d.ts.map +1 -0
  110. package/dist/cjs/SystemFlows.js +195 -0
  111. package/dist/cjs/SystemFlows.js.map +7 -0
  112. package/dist/cjs/WebCryptoCipher.d.ts +49 -0
  113. package/dist/cjs/WebCryptoCipher.d.ts.map +1 -0
  114. package/dist/cjs/WebCryptoCipher.js +129 -0
  115. package/dist/cjs/WebCryptoCipher.js.map +7 -0
  116. package/dist/cjs/WebhookChannel.d.ts +113 -0
  117. package/dist/cjs/WebhookChannel.d.ts.map +1 -0
  118. package/dist/cjs/WebhookChannel.js +98 -0
  119. package/dist/cjs/WebhookChannel.js.map +7 -0
  120. package/dist/cjs/index.d.ts +160 -0
  121. package/dist/cjs/index.d.ts.map +1 -0
  122. package/dist/cjs/index.js +91 -0
  123. package/dist/cjs/index.js.map +7 -0
  124. package/dist/cjs/internal/MutationBoundary.d.ts +27 -0
  125. package/dist/cjs/internal/MutationBoundary.d.ts.map +1 -0
  126. package/dist/cjs/internal/MutationBoundary.js +50 -0
  127. package/dist/cjs/internal/MutationBoundary.js.map +7 -0
  128. package/dist/cjs/internal/activeFibers.d.ts +12 -0
  129. package/dist/cjs/internal/activeFibers.d.ts.map +1 -0
  130. package/dist/cjs/internal/activeFibers.js +30 -0
  131. package/dist/cjs/internal/activeFibers.js.map +7 -0
  132. package/dist/cjs/internal/issues.d.ts +28 -0
  133. package/dist/cjs/internal/issues.d.ts.map +1 -0
  134. package/dist/cjs/internal/issues.js +34 -0
  135. package/dist/cjs/internal/issues.js.map +7 -0
  136. package/dist/cjs/internal/planning.d.ts +347 -0
  137. package/dist/cjs/internal/planning.d.ts.map +1 -0
  138. package/dist/cjs/internal/planning.js +137 -0
  139. package/dist/cjs/internal/planning.js.map +7 -0
  140. package/dist/cjs/internal/sqlSchemaErrors.d.ts +18 -0
  141. package/dist/cjs/internal/sqlSchemaErrors.d.ts.map +1 -0
  142. package/dist/cjs/internal/sqlSchemaErrors.js +40 -0
  143. package/dist/cjs/internal/sqlSchemaErrors.js.map +7 -0
  144. package/dist/cjs/migrations/0001_control_tables.d.ts +18 -0
  145. package/dist/cjs/migrations/0001_control_tables.d.ts.map +1 -0
  146. package/dist/cjs/migrations/0001_control_tables.js +115 -0
  147. package/dist/cjs/migrations/0001_control_tables.js.map +7 -0
  148. package/dist/cjs/migrations/0002_run_keys.d.ts +15 -0
  149. package/dist/cjs/migrations/0002_run_keys.d.ts.map +1 -0
  150. package/dist/cjs/migrations/0002_run_keys.js +44 -0
  151. package/dist/cjs/migrations/0002_run_keys.js.map +7 -0
  152. package/dist/cjs/migrations/0003_signal_commands.d.ts +13 -0
  153. package/dist/cjs/migrations/0003_signal_commands.d.ts.map +1 -0
  154. package/dist/cjs/migrations/0003_signal_commands.js +50 -0
  155. package/dist/cjs/migrations/0003_signal_commands.js.map +7 -0
  156. package/dist/cjs/migrations/0004_approval_decisions.d.ts +13 -0
  157. package/dist/cjs/migrations/0004_approval_decisions.d.ts.map +1 -0
  158. package/dist/cjs/migrations/0004_approval_decisions.js +45 -0
  159. package/dist/cjs/migrations/0004_approval_decisions.js.map +7 -0
  160. package/dist/cjs/migrations/0005_signal_principals.d.ts +18 -0
  161. package/dist/cjs/migrations/0005_signal_principals.d.ts.map +1 -0
  162. package/dist/cjs/migrations/0005_signal_principals.js +45 -0
  163. package/dist/cjs/migrations/0005_signal_principals.js.map +7 -0
  164. package/dist/cjs/migrations/0006_run_principals.d.ts +18 -0
  165. package/dist/cjs/migrations/0006_run_principals.d.ts.map +1 -0
  166. package/dist/cjs/migrations/0006_run_principals.js +49 -0
  167. package/dist/cjs/migrations/0006_run_principals.js.map +7 -0
  168. package/dist/cjs/migrations/0007_resume_consent.d.ts +18 -0
  169. package/dist/cjs/migrations/0007_resume_consent.d.ts.map +1 -0
  170. package/dist/cjs/migrations/0007_resume_consent.js +46 -0
  171. package/dist/cjs/migrations/0007_resume_consent.js.map +7 -0
  172. package/dist/cjs/package.json +1 -0
  173. package/dist/cjs/test/TestControl.d.ts +19 -0
  174. package/dist/cjs/test/TestControl.d.ts.map +1 -0
  175. package/dist/cjs/test/TestControl.js +62 -0
  176. package/dist/cjs/test/TestControl.js.map +7 -0
  177. package/dist/esm/ApprovalAuthority.d.ts +73 -0
  178. package/dist/esm/ApprovalAuthority.d.ts.map +1 -0
  179. package/dist/esm/ApprovalAuthority.js +72 -0
  180. package/dist/esm/ApprovalAuthority.js.map +1 -0
  181. package/dist/esm/Cancellation.d.ts +107 -0
  182. package/dist/esm/Cancellation.d.ts.map +1 -0
  183. package/dist/esm/Cancellation.js +116 -0
  184. package/dist/esm/Cancellation.js.map +1 -0
  185. package/dist/esm/Channels.d.ts +170 -0
  186. package/dist/esm/Channels.d.ts.map +1 -0
  187. package/dist/esm/Channels.js +312 -0
  188. package/dist/esm/Channels.js.map +1 -0
  189. package/dist/esm/Control.d.ts +202 -0
  190. package/dist/esm/Control.d.ts.map +1 -0
  191. package/dist/esm/Control.js +42 -0
  192. package/dist/esm/Control.js.map +1 -0
  193. package/dist/esm/ControlClient.d.ts +52 -0
  194. package/dist/esm/ControlClient.d.ts.map +1 -0
  195. package/dist/esm/ControlClient.js +217 -0
  196. package/dist/esm/ControlClient.js.map +1 -0
  197. package/dist/esm/ControlError.d.ts +318 -0
  198. package/dist/esm/ControlError.d.ts.map +1 -0
  199. package/dist/esm/ControlError.js +359 -0
  200. package/dist/esm/ControlError.js.map +1 -0
  201. package/dist/esm/ControlExecutor.d.ts +372 -0
  202. package/dist/esm/ControlExecutor.d.ts.map +1 -0
  203. package/dist/esm/ControlExecutor.js +212 -0
  204. package/dist/esm/ControlExecutor.js.map +1 -0
  205. package/dist/esm/ControlFacts.d.ts +454 -0
  206. package/dist/esm/ControlFacts.d.ts.map +1 -0
  207. package/dist/esm/ControlFacts.js +324 -0
  208. package/dist/esm/ControlFacts.js.map +1 -0
  209. package/dist/esm/ControlLive.d.ts +23 -0
  210. package/dist/esm/ControlLive.d.ts.map +1 -0
  211. package/dist/esm/ControlLive.js +1585 -0
  212. package/dist/esm/ControlLive.js.map +1 -0
  213. package/dist/esm/ControlRpcs.d.ts +1204 -0
  214. package/dist/esm/ControlRpcs.d.ts.map +1 -0
  215. package/dist/esm/ControlRpcs.js +299 -0
  216. package/dist/esm/ControlRpcs.js.map +1 -0
  217. package/dist/esm/ControlRuntime.d.ts +635 -0
  218. package/dist/esm/ControlRuntime.d.ts.map +1 -0
  219. package/dist/esm/ControlRuntime.js +807 -0
  220. package/dist/esm/ControlRuntime.js.map +1 -0
  221. package/dist/esm/ControlSchema.d.ts +2642 -0
  222. package/dist/esm/ControlSchema.d.ts.map +1 -0
  223. package/dist/esm/ControlSchema.js +1030 -0
  224. package/dist/esm/ControlSchema.js.map +1 -0
  225. package/dist/esm/ControlServer.d.ts +51 -0
  226. package/dist/esm/ControlServer.d.ts.map +1 -0
  227. package/dist/esm/ControlServer.js +145 -0
  228. package/dist/esm/ControlServer.js.map +1 -0
  229. package/dist/esm/Credential.d.ts +136 -0
  230. package/dist/esm/Credential.d.ts.map +1 -0
  231. package/dist/esm/Credential.js +190 -0
  232. package/dist/esm/Credential.js.map +1 -0
  233. package/dist/esm/CredentialCipher.d.ts +90 -0
  234. package/dist/esm/CredentialCipher.d.ts.map +1 -0
  235. package/dist/esm/CredentialCipher.js +56 -0
  236. package/dist/esm/CredentialCipher.js.map +1 -0
  237. package/dist/esm/CredentialStore.d.ts +97 -0
  238. package/dist/esm/CredentialStore.d.ts.map +1 -0
  239. package/dist/esm/CredentialStore.js +101 -0
  240. package/dist/esm/CredentialStore.js.map +1 -0
  241. package/dist/esm/DispatchReader.d.ts +112 -0
  242. package/dist/esm/DispatchReader.d.ts.map +1 -0
  243. package/dist/esm/DispatchReader.js +76 -0
  244. package/dist/esm/DispatchReader.js.map +1 -0
  245. package/dist/esm/Health.d.ts +333 -0
  246. package/dist/esm/Health.d.ts.map +1 -0
  247. package/dist/esm/Health.js +400 -0
  248. package/dist/esm/Health.js.map +1 -0
  249. package/dist/esm/JevSessionChecker.d.ts +57 -0
  250. package/dist/esm/JevSessionChecker.d.ts.map +1 -0
  251. package/dist/esm/JevSessionChecker.js +108 -0
  252. package/dist/esm/JevSessionChecker.js.map +1 -0
  253. package/dist/esm/Lineage.d.ts +131 -0
  254. package/dist/esm/Lineage.d.ts.map +1 -0
  255. package/dist/esm/Lineage.js +174 -0
  256. package/dist/esm/Lineage.js.map +1 -0
  257. package/dist/esm/Migrations.d.ts +34 -0
  258. package/dist/esm/Migrations.d.ts.map +1 -0
  259. package/dist/esm/Migrations.js +53 -0
  260. package/dist/esm/Migrations.js.map +1 -0
  261. package/dist/esm/Monitor.d.ts +282 -0
  262. package/dist/esm/Monitor.d.ts.map +1 -0
  263. package/dist/esm/Monitor.js +415 -0
  264. package/dist/esm/Monitor.js.map +1 -0
  265. package/dist/esm/ScopedToken.d.ts +193 -0
  266. package/dist/esm/ScopedToken.d.ts.map +1 -0
  267. package/dist/esm/ScopedToken.js +224 -0
  268. package/dist/esm/ScopedToken.js.map +1 -0
  269. package/dist/esm/SqlControlRuntime.d.ts +161 -0
  270. package/dist/esm/SqlControlRuntime.d.ts.map +1 -0
  271. package/dist/esm/SqlControlRuntime.js +1756 -0
  272. package/dist/esm/SqlControlRuntime.js.map +1 -0
  273. package/dist/esm/SqlCredentialStore.d.ts +43 -0
  274. package/dist/esm/SqlCredentialStore.d.ts.map +1 -0
  275. package/dist/esm/SqlCredentialStore.js +97 -0
  276. package/dist/esm/SqlCredentialStore.js.map +1 -0
  277. package/dist/esm/Steering.d.ts +69 -0
  278. package/dist/esm/Steering.d.ts.map +1 -0
  279. package/dist/esm/Steering.js +89 -0
  280. package/dist/esm/Steering.js.map +1 -0
  281. package/dist/esm/SystemFlows.d.ts +223 -0
  282. package/dist/esm/SystemFlows.d.ts.map +1 -0
  283. package/dist/esm/SystemFlows.js +198 -0
  284. package/dist/esm/SystemFlows.js.map +1 -0
  285. package/dist/esm/WebCryptoCipher.d.ts +49 -0
  286. package/dist/esm/WebCryptoCipher.d.ts.map +1 -0
  287. package/dist/esm/WebCryptoCipher.js +123 -0
  288. package/dist/esm/WebCryptoCipher.js.map +1 -0
  289. package/dist/esm/WebhookChannel.d.ts +113 -0
  290. package/dist/esm/WebhookChannel.d.ts.map +1 -0
  291. package/dist/esm/WebhookChannel.js +109 -0
  292. package/dist/esm/WebhookChannel.js.map +1 -0
  293. package/dist/esm/index.d.ts +160 -0
  294. package/dist/esm/index.d.ts.map +1 -0
  295. package/dist/esm/index.js +160 -0
  296. package/dist/esm/index.js.map +1 -0
  297. package/dist/esm/internal/MutationBoundary.d.ts +27 -0
  298. package/dist/esm/internal/MutationBoundary.d.ts.map +1 -0
  299. package/dist/esm/internal/MutationBoundary.js +40 -0
  300. package/dist/esm/internal/MutationBoundary.js.map +1 -0
  301. package/dist/esm/internal/activeFibers.d.ts +12 -0
  302. package/dist/esm/internal/activeFibers.d.ts.map +1 -0
  303. package/dist/esm/internal/activeFibers.js +17 -0
  304. package/dist/esm/internal/activeFibers.js.map +1 -0
  305. package/dist/esm/internal/issues.d.ts +28 -0
  306. package/dist/esm/internal/issues.d.ts.map +1 -0
  307. package/dist/esm/internal/issues.js +35 -0
  308. package/dist/esm/internal/issues.js.map +1 -0
  309. package/dist/esm/internal/planning.d.ts +347 -0
  310. package/dist/esm/internal/planning.d.ts.map +1 -0
  311. package/dist/esm/internal/planning.js +199 -0
  312. package/dist/esm/internal/planning.js.map +1 -0
  313. package/dist/esm/internal/sqlSchemaErrors.d.ts +18 -0
  314. package/dist/esm/internal/sqlSchemaErrors.d.ts.map +1 -0
  315. package/dist/esm/internal/sqlSchemaErrors.js +38 -0
  316. package/dist/esm/internal/sqlSchemaErrors.js.map +1 -0
  317. package/dist/esm/migrations/0001_control_tables.d.ts +18 -0
  318. package/dist/esm/migrations/0001_control_tables.d.ts.map +1 -0
  319. package/dist/esm/migrations/0001_control_tables.js +96 -0
  320. package/dist/esm/migrations/0001_control_tables.js.map +1 -0
  321. package/dist/esm/migrations/0002_run_keys.d.ts +15 -0
  322. package/dist/esm/migrations/0002_run_keys.d.ts.map +1 -0
  323. package/dist/esm/migrations/0002_run_keys.js +22 -0
  324. package/dist/esm/migrations/0002_run_keys.js.map +1 -0
  325. package/dist/esm/migrations/0003_signal_commands.d.ts +13 -0
  326. package/dist/esm/migrations/0003_signal_commands.d.ts.map +1 -0
  327. package/dist/esm/migrations/0003_signal_commands.js +26 -0
  328. package/dist/esm/migrations/0003_signal_commands.js.map +1 -0
  329. package/dist/esm/migrations/0004_approval_decisions.d.ts +13 -0
  330. package/dist/esm/migrations/0004_approval_decisions.d.ts.map +1 -0
  331. package/dist/esm/migrations/0004_approval_decisions.js +25 -0
  332. package/dist/esm/migrations/0004_approval_decisions.js.map +1 -0
  333. package/dist/esm/migrations/0005_signal_principals.d.ts +18 -0
  334. package/dist/esm/migrations/0005_signal_principals.d.ts.map +1 -0
  335. package/dist/esm/migrations/0005_signal_principals.js +27 -0
  336. package/dist/esm/migrations/0005_signal_principals.js.map +1 -0
  337. package/dist/esm/migrations/0006_run_principals.d.ts +18 -0
  338. package/dist/esm/migrations/0006_run_principals.d.ts.map +1 -0
  339. package/dist/esm/migrations/0006_run_principals.js +30 -0
  340. package/dist/esm/migrations/0006_run_principals.js.map +1 -0
  341. package/dist/esm/migrations/0007_resume_consent.d.ts +18 -0
  342. package/dist/esm/migrations/0007_resume_consent.d.ts.map +1 -0
  343. package/dist/esm/migrations/0007_resume_consent.js +27 -0
  344. package/dist/esm/migrations/0007_resume_consent.js.map +1 -0
  345. package/dist/esm/test/TestControl.d.ts +19 -0
  346. package/dist/esm/test/TestControl.d.ts.map +1 -0
  347. package/dist/esm/test/TestControl.js +30 -0
  348. package/dist/esm/test/TestControl.js.map +1 -0
  349. package/docs/README.md +189 -0
  350. package/docs/api.md +982 -0
  351. package/docs/concepts/authority.md +109 -0
  352. package/docs/concepts/cancellation.md +129 -0
  353. package/docs/concepts/lineage.md +132 -0
  354. package/docs/concepts/ownership.md +139 -0
  355. package/docs/concepts/projections.md +203 -0
  356. package/docs/concepts/receipts.md +128 -0
  357. package/docs/guides/approvals.md +284 -0
  358. package/docs/guides/cancel-and-resume.md +162 -0
  359. package/docs/guides/durable-storage.md +147 -0
  360. package/docs/guides/implement-an-executor.md +173 -0
  361. package/docs/guides/ingest-a-webhook.md +177 -0
  362. package/docs/guides/list-runs.md +160 -0
  363. package/docs/guides/monitor-runs.md +176 -0
  364. package/docs/guides/observe-health.md +147 -0
  365. package/docs/guides/postgres-tests.md +5 -0
  366. package/docs/guides/serve-over-rpc.md +220 -0
  367. package/docs/guides/signal-a-run.md +53 -0
  368. package/docs/guides/steer-a-run.md +138 -0
  369. package/docs/guides/store-credentials.md +164 -0
  370. package/docs/guides/testing.md +139 -0
  371. package/docs/guides/watch-a-run.md +154 -0
  372. package/docs/installation.md +106 -0
  373. package/docs/quickstart.md +163 -0
  374. package/docs/troubleshooting.md +208 -0
  375. package/package.json +405 -3
  376. package/src/ApprovalAuthority.ts +114 -0
  377. package/src/Cancellation.ts +172 -0
  378. package/src/Channels.ts +493 -0
  379. package/src/Control.ts +337 -0
  380. package/src/ControlClient.ts +319 -0
  381. package/src/ControlError.ts +378 -0
  382. package/src/ControlExecutor.ts +490 -0
  383. package/src/ControlFacts.ts +383 -0
  384. package/src/ControlLive.ts +2113 -0
  385. package/src/ControlRpcs.ts +443 -0
  386. package/src/ControlRuntime.ts +1597 -0
  387. package/src/ControlSchema.ts +1380 -0
  388. package/src/ControlServer.ts +182 -0
  389. package/src/Credential.ts +310 -0
  390. package/src/CredentialCipher.ts +110 -0
  391. package/src/CredentialStore.ts +152 -0
  392. package/src/DispatchReader.ts +122 -0
  393. package/src/Health.ts +591 -0
  394. package/src/JevSessionChecker.ts +127 -0
  395. package/src/Lineage.ts +203 -0
  396. package/src/Migrations.ts +56 -0
  397. package/src/Monitor.ts +600 -0
  398. package/src/ScopedToken.ts +306 -0
  399. package/src/SqlControlRuntime.ts +2476 -0
  400. package/src/SqlCredentialStore.ts +148 -0
  401. package/src/Steering.ts +96 -0
  402. package/src/SystemFlows.ts +225 -0
  403. package/src/WebCryptoCipher.ts +169 -0
  404. package/src/WebhookChannel.ts +166 -0
  405. package/src/index.ts +188 -0
  406. package/src/internal/MutationBoundary.ts +46 -0
  407. package/src/internal/activeFibers.ts +22 -0
  408. package/src/internal/issues.ts +40 -0
  409. package/src/internal/planning.ts +262 -0
  410. package/src/internal/sqlSchemaErrors.ts +37 -0
  411. package/src/migrations/0001_control_tables.ts +99 -0
  412. package/src/migrations/0002_run_keys.ts +23 -0
  413. package/src/migrations/0003_signal_commands.ts +27 -0
  414. package/src/migrations/0004_approval_decisions.ts +25 -0
  415. package/src/migrations/0005_signal_principals.ts +27 -0
  416. package/src/migrations/0006_run_principals.ts +31 -0
  417. package/src/migrations/0007_resume_consent.ts +28 -0
  418. package/src/test/TestControl.ts +47 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ControlClient.js","sourceRoot":"","sources":["../../src/ControlClient.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AACrE,OAAO,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAA;AACpE,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAA;AAC/D,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AAC5C,OAAO,EAAqB,kBAAkB,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AACvG,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAC9C,OAAO,EACL,mBAAmB,EACnB,iBAAiB,EACjB,WAAW,EACX,eAAe,EACf,iBAAiB,EACjB,cAAc,EACd,iBAAiB,EACjB,gBAAgB,EAChB,WAAW,EACZ,MAAM,oBAAoB,CAAA;AAE3B;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C,cAAc,CAAC,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,gBAAgB,CAAC,WAAW,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;YACzG,gEAAgE;YAChE,sEAAsE;YACtE,mEAAmE;YACnE,iEAAiE;YACjE,mEAAmE;YACnE,KAAK,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,sBAAsB,CAAC,YAAY,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC,SAAS,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;SAC5F,CAAC,CAAA;IACJ,CAAC,CAAC,CACH,CAAA;AACH,CAAC,CAAA","sourcesContent":["/**\n * RPC client layer projected back into the control service interface.\n *\n * @since 0.1.0\n */\n\nimport { Cause, Effect, Layer, Result, Schema, Stream } from \"effect\"\nimport { HttpClient, HttpClientRequest } from \"effect/unstable/http\"\nimport { RpcClient, RpcClientError } from \"effect/unstable/rpc\"\nimport { Control, make } from \"./Control.ts\"\nimport { type ControlError, ControlErrorSchema, TransportError, Unauthorized } from \"./ControlError.ts\"\nimport { ControlRpcs } from \"./ControlRpcs.ts\"\nimport {\n ApprovalInputSchema,\n CancelInputSchema,\n ListRequest,\n PlanInputSchema,\n ResumeInputSchema,\n RunInputSchema,\n SignalInputSchema,\n SteerInputSchema,\n WatchFilter\n} from \"./ControlSchema.ts\"\n\n/**\n * Whether a value is one of the control plane's declared failures, as opposed\n * to a defect that escaped some other layer.\n *\n * Derived from `ControlError.ControlErrorSchema` rather than restated, so a new\n * error class cannot be a member of the union and a stranger to the client.\n *\n * @category refinements\n * @since 0.1.0\n */\nexport const isControlError = Schema.is(ControlErrorSchema)\n\ninterface TransportClassification {\n readonly message: string\n readonly retryable: boolean\n}\n\nconst requestEncoding: TransportClassification = {\n message: \"The control request could not be encoded.\",\n retryable: false\n}\n\nconst responseDecoding: TransportClassification = {\n message: \"The control response could not be decoded.\",\n retryable: false\n}\n\nconst connectionFailure: TransportClassification = {\n message: \"The control server could not be reached.\",\n retryable: true\n}\n\nconst clientHttpFailure: TransportClassification = {\n message: \"The control server rejected the HTTP request.\",\n retryable: false\n}\n\nconst serverHttpFailure: TransportClassification = {\n message: \"The control server failed while handling the HTTP request.\",\n retryable: true\n}\n\nconst invalidClientUrl: TransportClassification = {\n message: \"The control server URL is invalid.\",\n retryable: false\n}\n\nconst unknownClientFailure: TransportClassification = {\n message: \"The control RPC client failed.\",\n retryable: false\n}\n\nconst transportError = (cause: unknown, classification: TransportClassification): TransportError =>\n new TransportError({\n ...classification,\n cause\n })\n\n// A `StatusCodeError` reported by the RPC client always carries the concrete\n// error, and that error always carries its response. The three refusals below\n// are what keeps a hand-built wrapper without one from being read as a 5xx and\n// retried forever; none of them is reachable from the client's own transports.\nconst statusFrom = (cause: unknown): number | undefined => {\n /* v8 ignore next -- a StatusCodeError cause always carries its response */\n if (typeof cause !== \"object\" || cause === null || !(\"response\" in cause)) return undefined\n const response = cause.response\n /* v8 ignore next -- as above: the response is an object carrying a status */\n if (typeof response !== \"object\" || response === null || !(\"status\" in response)) return undefined\n /* v8 ignore next -- as above: the status is a number */\n return typeof response.status === \"number\" ? response.status : undefined\n}\n\ntype HttpFailureKind = Extract<RpcClientError.RpcClientError[\"reason\"], { readonly _tag: \"HttpError\" }>[\"kind\"]\ntype TransportReason = RpcClientError.RpcClientError[\"reason\"][\"_tag\"]\n\n/**\n * What each HTTP failure means for a retry.\n *\n * `StatusCodeError` is absent on purpose: it is the one kind whose answer\n * depends on the response, not on the kind.\n */\nconst httpClassification: Record<Exclude<HttpFailureKind, \"StatusCodeError\">, TransportClassification> = {\n TransportError: connectionFailure,\n EncodeError: requestEncoding,\n InvalidUrlError: invalidClientUrl,\n DecodeError: responseDecoding,\n EmptyBodyError: responseDecoding\n}\n\n/**\n * What each non-HTTP transport failure means for a retry.\n *\n * A table rather than a switch, because the mapping is data: the compiler\n * still requires every reason the RPC client can report to have an answer, and\n * a reader can check the whole policy at a glance.\n */\nconst reasonClassification: Record<Exclude<TransportReason, \"HttpError\">, TransportClassification> = {\n RpcClientDefect: responseDecoding,\n SocketReadError: connectionFailure,\n SocketWriteError: connectionFailure,\n SocketOpenError: connectionFailure,\n // The socket cannot perform a requested protocol upgrade; retries of the\n // same unsupported operation cannot change that host capability.\n SocketUpgradeError: unknownClientFailure,\n SocketCloseError: connectionFailure,\n // A worker transport is not composable with this client, which speaks HTTP\n // and WebSocket. The entries exist so the table stays exhaustive.\n WorkerSpawnError: unknownClientFailure,\n WorkerSendError: unknownClientFailure,\n WorkerReceiveError: unknownClientFailure,\n WorkerUnknownError: unknownClientFailure\n}\n\nconst classifyRpcClientError = (error: RpcClientError.RpcClientError): TransportClassification => {\n const reason = error.reason\n if (reason._tag !== \"HttpError\") return reasonClassification[reason._tag]\n if (reason.kind !== \"StatusCodeError\") return httpClassification[reason.kind]\n // Effect's serializable HttpError keeps the concrete StatusCodeError in\n // `cause`. The wrapper has no separate status field, so a hand-built wrapper\n // without that cause cannot safely be classified as retryable and falls back\n // to the client class.\n const status = statusFrom(reason.cause)\n return status !== undefined && status >= 500 && status <= 599\n ? serverHttpFailure\n : clientHttpFailure\n}\n\nconst isRpcClientError = Schema.is(RpcClientError.RpcClientError)\n\nconst classify = (error: unknown): TransportClassification => {\n if (Schema.isSchemaError(error)) return responseDecoding\n if (isRpcClientError(error)) return classifyRpcClientError(error)\n return unknownClientFailure\n}\n\n// Preserve the operation-specific control failures from the RPC schema while\n// replacing transport and decoding failures with the public TransportError.\nconst normalizedFailure = <E>(cause: Cause.Cause<E>): Effect.Effect<never, (E & ControlError) | TransportError> => {\n const failure = Cause.findError(cause)\n if (Result.isSuccess(failure)) {\n return Effect.fail(\n isControlError(failure.success)\n ? failure.success\n : transportError(failure.success, classify(failure.success))\n )\n }\n const defect = Cause.findDefect(cause)\n // A cause with neither a failure nor a defect is an interruption, and an\n // operator's own cancellation is not the server failing. It is re-raised\n // exactly as it arrived rather than described as a transport failure.\n /* v8 ignore next 2 -- the fiber propagates an interrupt-only cause without reaching this operator */\n return Result.isSuccess(defect)\n ? Effect.fail(transportError(defect.success, classify(defect.success)))\n : Effect.failCause(cause as Cause.Cause<(E & ControlError) | TransportError>)\n}\n\nconst normalize = <A, E, R>(effect: Effect.Effect<A, E, R>): Effect.Effect<A, (E & ControlError) | TransportError, R> =>\n Effect.catchCause(effect, normalizedFailure)\n\ntype RequestEncoder = (input: unknown) => Effect.Effect<unknown, Schema.SchemaError>\n\nconst encoder = (schema: Schema.Top): RequestEncoder =>\n // Every request schema in this module is service-free. `Schema.Top` erases\n // that fact to `unknown`, so restore it at this one construction boundary.\n Schema.encodeUnknownEffect(Schema.toCodecJson(schema)) as RequestEncoder\n\nconst planEncoder = encoder(PlanInputSchema)\nconst runEncoder = encoder(RunInputSchema)\nconst approvalEncoder = encoder(ApprovalInputSchema)\nconst steerEncoder = encoder(SteerInputSchema)\nconst signalEncoder = encoder(SignalInputSchema)\nconst cancelEncoder = encoder(CancelInputSchema)\nconst resumeEncoder = encoder(ResumeInputSchema)\nconst listEncoder = encoder(ListRequest)\nconst watchEncoder = encoder(WatchFilter)\n\nconst normalizeRequest = <A, E, R>(\n encode: RequestEncoder,\n input: unknown,\n request: () => Effect.Effect<A, E, R>\n): Effect.Effect<A, (E & ControlError) | TransportError, R> =>\n encode(input).pipe(\n Effect.mapError((cause) => transportError(cause, requestEncoding)),\n Effect.andThen(Effect.suspend(() => normalize(request())))\n )\n\nconst normalizeStream = <A, E, R>(\n stream: Stream.Stream<A, E, R>\n): Stream.Stream<A, (E & ControlError) | TransportError, R> =>\n Stream.catchCause(stream, (cause) => Stream.fromEffect(normalizedFailure(cause)))\n\nconst normalizeStreamRequest = <A, E, R>(\n encode: RequestEncoder,\n input: unknown,\n request: () => Stream.Stream<A, E, R>\n): Stream.Stream<A, (E & ControlError) | TransportError, R> =>\n Stream.unwrap(\n encode(input).pipe(\n Effect.mapError((cause) => transportError(cause, requestEncoding)),\n Effect.map(() => normalizeStream(request()))\n )\n )\n\n/**\n * Client transport configuration. Unary procedures use HTTP at this URL;\n * `watch` uses the abstract WebSocket supplied by the platform layer.\n *\n * `credential` reaches the HTTP protocol only. It is attached as a bearer\n * token on each HTTP RPC request; the `watch` stream rides a WebSocket whose\n * upgrade request a browser cannot add headers to, so the socket carries no\n * credential at all in a browser deployment. A deployment that authenticates\n * control traffic must therefore front the socket (terminate auth at a proxy\n * that injects the credential on the upgrade) or serve `watch` over the HTTP\n * protocol instead.\n *\n * @category models\n * @since 0.1.0\n */\nexport interface ClientConfig {\n readonly url: string\n /**\n * Bearer token attached to every HTTP RPC request when present.\n *\n * Not sent on the `watch` WebSocket: see {@link ClientConfig}.\n */\n readonly credential?: string | undefined\n}\n\n/**\n * Provides `Control` through an RPC client while preserving the local vtable.\n *\n * @category layers\n * @since 0.1.0\n */\nexport const layer = (config: ClientConfig) => {\n const http = RpcClient.layerProtocolHttp({\n url: config.url,\n transformClient: (client) => {\n // The RPC protocol already admits HttpClientError, but transformClient's\n // generic signature cannot express that filtering adds the same error\n // its input client already carries.\n const checked = HttpClient.filterStatusOk(client) as typeof client\n return config.credential === undefined\n ? checked\n : HttpClient.mapRequest(checked, HttpClientRequest.bearerToken(config.credential))\n }\n })\n const websocket = RpcClient.layerProtocolSocket()\n return Layer.effect(\n Control,\n Effect.gen(function*() {\n // Built into the layer's own scope: `Effect.provide(layer)` would close\n // each protocol as soon as the client was constructed.\n const httpServices = yield* Layer.build(http)\n const websocketServices = yield* Layer.build(websocket)\n const unary = yield* RpcClient.make(ControlRpcs).pipe(Effect.provide(httpServices))\n const streaming = yield* RpcClient.make(ControlRpcs).pipe(Effect.provide(websocketServices))\n return make({\n plan: Effect.fn(\"Control.plan\")((input) => normalizeRequest(planEncoder, input, () => unary.Plan(input))),\n run: Effect.fn(\"Control.run\")((input) => normalizeRequest(runEncoder, input, () => unary.Run(input))),\n // RPC authenticates with this client's credential and does not carry\n // local attribution. Refuse here before an agent becomes that operator.\n approve: Effect.fn(\"Control.approve\")((input) =>\n normalizeRequest(approvalEncoder, input, () =>\n input.principal?.kind === \"agent\"\n ? Effect.fail(new Unauthorized({ message: \"Approval decisions are operator-only\" }))\n : unary.Approve(input))\n ),\n deny: Effect.fn(\"Control.deny\")((input) =>\n normalizeRequest(approvalEncoder, input, () =>\n input.principal?.kind === \"agent\"\n ? Effect.fail(new Unauthorized({ message: \"Approval decisions are operator-only\" }))\n : unary.Deny(input))\n ),\n steer: Effect.fn(\"Control.steer\")((input) => normalizeRequest(steerEncoder, input, () => unary.Steer(input))),\n signal: Effect.fn(\"Control.signal\")((input) =>\n normalizeRequest(signalEncoder, input, () => unary.Signal(input))\n ),\n cancel: Effect.fn(\"Control.cancel\")((input) =>\n normalizeRequest(cancelEncoder, input, () => unary.Cancel(input))\n ),\n resume: Effect.fn(\"Control.resume\")((input) =>\n normalizeRequest(resumeEncoder, input, () => unary.Resume(input))\n ),\n list: Effect.fn(\"Control.list\")((input) => normalizeRequest(listEncoder, input, () => unary.List(input))),\n // `watch` is the only procedure on the socket protocol, and the\n // socket is why `credential` cannot protect it: a browser's WebSocket\n // upgrade takes no headers, so the bearer token that authenticates\n // every unary call above never reaches this stream. Credentialed\n // deployments front the socket or use the HTTP protocol for watch.\n watch: (input) => normalizeStreamRequest(watchEncoder, input, () => streaming.Watch(input))\n })\n })\n )\n}\n"]}
@@ -0,0 +1,318 @@
1
+ /**
2
+ * Stable, schema-backed control-plane failures.
3
+ *
4
+ * @since 0.1.0
5
+ */
6
+ import { NotificationError } from "@smthrs/notifications/NotificationQueue";
7
+ import { Schema } from "effect";
8
+ declare const RunNotFound_base: Schema.Class<RunNotFound, Schema.TaggedStruct<"/control/RunNotFound", {
9
+ readonly code: Schema.withConstructorDefault<Schema.Literal<"run_not_found">>;
10
+ readonly runId: Schema.String;
11
+ }>, import("effect/Cause").YieldableError>;
12
+ /**
13
+ * No run with this id exists.
14
+ *
15
+ * @category errors
16
+ * @since 0.1.0
17
+ */
18
+ export declare class RunNotFound extends RunNotFound_base {
19
+ /**
20
+ * The sentence an operator reads. Without one the CLI printed the bare
21
+ * fields, `run_not_found runId=nope`, which names no next action.
22
+ */
23
+ get message(): string;
24
+ }
25
+ declare const PlanNotFound_base: Schema.Class<PlanNotFound, Schema.TaggedStruct<"/control/PlanNotFound", {
26
+ readonly code: Schema.withConstructorDefault<Schema.Literal<"plan_not_found">>;
27
+ readonly planId: Schema.String;
28
+ }>, import("effect/Cause").YieldableError>;
29
+ /**
30
+ * No plan with this id exists.
31
+ *
32
+ * @category errors
33
+ * @since 0.1.0
34
+ */
35
+ export declare class PlanNotFound extends PlanNotFound_base {
36
+ /**
37
+ * The sentence an operator reads. Every renderer in the tree prints
38
+ * `message`, so a refusal without one does not explain the next action.
39
+ */
40
+ get message(): string;
41
+ }
42
+ declare const PlanDenied_base: Schema.Class<PlanDenied, Schema.TaggedStruct<"/control/PlanDenied", {
43
+ readonly code: Schema.withConstructorDefault<Schema.Literal<"plan_denied">>;
44
+ readonly planId: Schema.String;
45
+ }>, import("effect/Cause").YieldableError>;
46
+ /**
47
+ * The plan was denied and cannot be launched.
48
+ *
49
+ * @category errors
50
+ * @since 0.1.0
51
+ */
52
+ export declare class PlanDenied extends PlanDenied_base {
53
+ /**
54
+ * The sentence an operator reads. Every renderer in the tree prints
55
+ * `message`, so a denial must state how to make a later launch possible.
56
+ */
57
+ get message(): string;
58
+ }
59
+ declare const FlowNotFound_base: Schema.Class<FlowNotFound, Schema.TaggedStruct<"/control/FlowNotFound", {
60
+ readonly code: Schema.withConstructorDefault<Schema.Literal<"flow_not_found">>;
61
+ readonly flowId: Schema.String;
62
+ }>, import("effect/Cause").YieldableError>;
63
+ /**
64
+ * No flow with this id is registered.
65
+ *
66
+ * @category errors
67
+ * @since 0.1.0
68
+ */
69
+ export declare class FlowNotFound extends FlowNotFound_base {
70
+ /**
71
+ * The sentence an operator reads, which names the command that lists the
72
+ * flows a caller can start.
73
+ */
74
+ get message(): string;
75
+ }
76
+ declare const PlanDigestMismatch_base: Schema.Class<PlanDigestMismatch, Schema.TaggedStruct<"/control/PlanDigestMismatch", {
77
+ readonly code: Schema.withConstructorDefault<Schema.Literal<"plan_digest_mismatch">>;
78
+ readonly planId: Schema.String;
79
+ readonly expected: Schema.String;
80
+ readonly actual: Schema.String;
81
+ }>, import("effect/Cause").YieldableError>;
82
+ /**
83
+ * The submitted plan does not hash to the digest the caller declared, so
84
+ * the control plane refuses to store it.
85
+ *
86
+ * @category errors
87
+ * @since 0.1.0
88
+ */
89
+ export declare class PlanDigestMismatch extends PlanDigestMismatch_base {
90
+ }
91
+ declare const EnvelopeMismatch_base: Schema.Class<EnvelopeMismatch, Schema.TaggedStruct<"/control/EnvelopeMismatch", {
92
+ readonly code: Schema.withConstructorDefault<Schema.Literal<"envelope_mismatch">>;
93
+ readonly planId: Schema.String;
94
+ readonly expected: Schema.String;
95
+ readonly actual: Schema.String;
96
+ }>, import("effect/Cause").YieldableError>;
97
+ /**
98
+ * The plan's effect envelope differs from the one the caller declared.
99
+ *
100
+ * @category errors
101
+ * @since 0.1.0
102
+ */
103
+ export declare class EnvelopeMismatch extends EnvelopeMismatch_base {
104
+ }
105
+ declare const ClaimLost_base: Schema.Class<ClaimLost, Schema.TaggedStruct<"/control/ClaimLost", {
106
+ readonly code: Schema.withConstructorDefault<Schema.Literal<"claim_lost">>;
107
+ readonly runId: Schema.String;
108
+ readonly reason: Schema.optional<Schema.String>;
109
+ readonly parkedBy: Schema.optional<Schema.Struct<{
110
+ readonly hostId: Schema.String;
111
+ readonly pid: Schema.Number;
112
+ }>>;
113
+ }>, import("effect/Cause").YieldableError>;
114
+ /**
115
+ * The caller's claim on this run lapsed or was fenced by a newer owner.
116
+ *
117
+ * `parkedBy` names the live process that parked the run: it, not the caller,
118
+ * drives the run, so `Control.resume` hands the resume to it.
119
+ *
120
+ * @category errors
121
+ * @since 0.1.0
122
+ */
123
+ export declare class ClaimLost extends ClaimLost_base {
124
+ }
125
+ declare const CodeDrift_base: Schema.Class<CodeDrift, Schema.TaggedStruct<"/control/CodeDrift", {
126
+ readonly code: Schema.withConstructorDefault<Schema.Literal<"code_drift">>;
127
+ readonly runId: Schema.String;
128
+ readonly flowId: Schema.String;
129
+ /** The execution digest the run started with; absent when only the engine changed. */
130
+ readonly recorded: Schema.optional<Schema.String>;
131
+ /** The flow's execution digest now; absent when the flow is gone or declares none. */
132
+ readonly current: Schema.optional<Schema.String>;
133
+ /** The engine version the run started on, when the engine changed. */
134
+ readonly recordedEngine: Schema.optional<Schema.String>;
135
+ /** The engine version resuming it, when the engine changed. */
136
+ readonly currentEngine: Schema.optional<Schema.String>;
137
+ }>, import("effect/Cause").YieldableError>;
138
+ /**
139
+ * The run's flow or engine changed since the run started, so resuming it would
140
+ * run code the run did not start with. Pass `allowCodeDrift` to resume it
141
+ * anyway; the run then records the code it resumed on.
142
+ *
143
+ * @category errors
144
+ * @since 1.0.0
145
+ */
146
+ export declare class CodeDrift extends CodeDrift_base {
147
+ get message(): string;
148
+ }
149
+ declare const AlreadyResolved_base: Schema.Class<AlreadyResolved, Schema.TaggedStruct<"/control/AlreadyResolved", {
150
+ readonly code: Schema.withConstructorDefault<Schema.Literal<"already_resolved">>;
151
+ readonly requestId: Schema.String;
152
+ }>, import("effect/Cause").YieldableError>;
153
+ /**
154
+ * This request was already answered; a second answer is refused rather
155
+ * than overwriting the first.
156
+ *
157
+ * @category errors
158
+ * @since 0.1.0
159
+ */
160
+ export declare class AlreadyResolved extends AlreadyResolved_base {
161
+ }
162
+ declare const InvalidInput_base: Schema.Class<InvalidInput, Schema.TaggedStruct<"/control/InvalidInput", {
163
+ readonly code: Schema.withConstructorDefault<Schema.Literal<"invalid_input">>;
164
+ readonly issue: Schema.String;
165
+ }>, import("effect/Cause").YieldableError>;
166
+ /**
167
+ * The request did not satisfy its schema or a stated precondition.
168
+ *
169
+ * @category errors
170
+ * @since 0.1.0
171
+ */
172
+ export declare class InvalidInput extends InvalidInput_base {
173
+ }
174
+ declare const Unauthorized_base: Schema.Class<Unauthorized, Schema.TaggedStruct<"/control/Unauthorized", {
175
+ readonly code: Schema.withConstructorDefault<Schema.Literal<"unauthorized">>;
176
+ readonly message: Schema.String;
177
+ }>, import("effect/Cause").YieldableError>;
178
+ /**
179
+ * The caller lacks a usable credential or authority for this operation.
180
+ *
181
+ * @category errors
182
+ * @since 0.1.0
183
+ */
184
+ export declare class Unauthorized extends Unauthorized_base {
185
+ }
186
+ declare const Unavailable_base: Schema.Class<Unavailable, Schema.TaggedStruct<"/control/Unavailable", {
187
+ readonly code: Schema.withConstructorDefault<Schema.Literal<"unavailable">>;
188
+ readonly feature: Schema.String;
189
+ readonly ticket: Schema.String;
190
+ }>, import("effect/Cause").YieldableError>;
191
+ /**
192
+ * The operation is not implemented in this deployment. `ticket` names the
193
+ * issue that tracks it, per `Concepts/Tickets Not Exceptions.md`.
194
+ *
195
+ * @category errors
196
+ * @since 0.1.0
197
+ */
198
+ export declare class Unavailable extends Unavailable_base {
199
+ }
200
+ declare const TransportError_base: Schema.Class<TransportError, Schema.TaggedStruct<"/control/TransportError", {
201
+ readonly code: Schema.withConstructorDefault<Schema.Literal<"transport_error">>;
202
+ readonly message: Schema.String;
203
+ readonly retryable: Schema.Boolean;
204
+ readonly cause: Schema.optional<Schema.Defect>;
205
+ }>, import("effect/Cause").YieldableError>;
206
+ /**
207
+ * The request failed before a declared control response reached the caller.
208
+ *
209
+ * `retryable` classifies only the transport phase. Connection failures and
210
+ * HTTP 5xx responses are retryable; local encode failures, response decode
211
+ * failures, and HTTP 4xx responses are not. A caller may resend a retryable
212
+ * mutation only when its idempotency key makes replay safe. A keyless request
213
+ * can have reached the server even when its response was lost.
214
+ *
215
+ * `message` is a fixed operator-facing sentence. `cause` retains the original
216
+ * client failure for diagnostics without copying its raw text into output.
217
+ *
218
+ * @category errors
219
+ * @since 0.1.0
220
+ */
221
+ export declare class TransportError extends TransportError_base {
222
+ }
223
+ declare const PersistenceError_base: Schema.Class<PersistenceError, Schema.TaggedStruct<"/control/PersistenceError", {
224
+ readonly code: Schema.withConstructorDefault<Schema.Literal<"persistence_failed">>;
225
+ readonly operation: Schema.String;
226
+ readonly message: Schema.String;
227
+ readonly cause: Schema.optional<Schema.Defect>;
228
+ }>, import("effect/Cause").YieldableError>;
229
+ /**
230
+ * A control-plane store operation failed.
231
+ *
232
+ * @category errors
233
+ * @since 0.1.0
234
+ */
235
+ export declare class PersistenceError extends PersistenceError_base {
236
+ }
237
+ declare const LaunchFailed_base: Schema.Class<LaunchFailed, Schema.TaggedStruct<"/control/LaunchFailed", {
238
+ readonly code: Schema.withConstructorDefault<Schema.Literal<"launch_failed">>;
239
+ readonly runId: Schema.String;
240
+ readonly message: Schema.String;
241
+ readonly cause: Schema.optional<Schema.Defect>;
242
+ }>, import("effect/Cause").YieldableError>;
243
+ /**
244
+ * The executor refused or could not start the run.
245
+ *
246
+ * @category errors
247
+ * @since 0.1.0
248
+ */
249
+ export declare class LaunchFailed extends LaunchFailed_base {
250
+ }
251
+ declare const NoMatchingWait_base: Schema.Class<NoMatchingWait, Schema.TaggedStruct<"/control/NoMatchingWait", {
252
+ readonly code: Schema.withConstructorDefault<Schema.Literal<"no_matching_wait">>;
253
+ readonly runId: Schema.String;
254
+ readonly waitName: Schema.String;
255
+ }>, import("effect/Cause").YieldableError>;
256
+ /**
257
+ * A signal named a wait point the run does not have open.
258
+ *
259
+ * `Control.signal` completes the `WaitFor` deferred a run is parked on. A
260
+ * signal whose name matches no open wait point completes nothing, and recording
261
+ * it anyway would leave an operator watching a delivery that never lands, so it
262
+ * is refused where it arrives.
263
+ *
264
+ * The signal's name is `waitName`, not `name`. A field spelled `name` on an
265
+ * `Error` subclass shadows `Error.prototype.name`, which every renderer in the
266
+ * tree reads: `smithers signal run-3 '{"name":"go"}'` against a timer-parked
267
+ * run printed `go: ` to stderr and exited 1, because `bin.ts` reports
268
+ * `${error.name}: ${error.message}` and this class had overwritten one and
269
+ * defined neither (release validation, defect D3).
270
+ *
271
+ * @category errors
272
+ * @since 0.1.0
273
+ */
274
+ export declare class NoMatchingWait extends NoMatchingWait_base {
275
+ /**
276
+ * The sentence an operator reads. Every other renderer in the tree prints
277
+ * `message`, so a refusal with none is a refusal with no reason.
278
+ */
279
+ get message(): string;
280
+ }
281
+ declare const CredentialConflict_base: Schema.Class<CredentialConflict, Schema.TaggedStruct<"/control/CredentialConflict", {
282
+ readonly code: Schema.withConstructorDefault<Schema.Literal<"credential_conflict">>;
283
+ readonly id: Schema.String;
284
+ readonly expectedVersion: Schema.Number;
285
+ readonly actualVersion: Schema.Number;
286
+ }>, import("effect/Cause").YieldableError>;
287
+ /**
288
+ * A credential write lost a race: the record moved on before this writer
289
+ * committed, so the update is refused rather than silently overwriting the
290
+ * winner.
291
+ *
292
+ * @since 0.1.0
293
+ * @category errors
294
+ */
295
+ export declare class CredentialConflict extends CredentialConflict_base {
296
+ }
297
+ /**
298
+ * Every stable failure emitted by the control plane, as one schema.
299
+ *
300
+ * This is the single membership list. The exported union type is derived from
301
+ * it and `ControlClient.isControlError` is `Schema.is` of it, so an error class
302
+ * added here reaches both. Two hand-maintained lists drifted: `ControlError`
303
+ * omitted `CredentialConflict` while the README documented it as a member, and
304
+ * `isControlError` repeated the same thirteen names a second time.
305
+ *
306
+ * @since 0.1.0
307
+ * @category errors
308
+ */
309
+ export declare const ControlErrorSchema: Schema.Union<readonly [typeof RunNotFound, typeof PlanNotFound, typeof PlanDenied, typeof FlowNotFound, typeof PlanDigestMismatch, typeof EnvelopeMismatch, typeof ClaimLost, typeof CodeDrift, typeof AlreadyResolved, typeof InvalidInput, typeof Unauthorized, typeof Unavailable, typeof TransportError, typeof PersistenceError, typeof LaunchFailed, typeof NoMatchingWait, typeof CredentialConflict, typeof NotificationError]>;
310
+ /**
311
+ * Every stable failure emitted by the control plane.
312
+ *
313
+ * @since 0.1.0
314
+ * @category errors
315
+ */
316
+ export type ControlError = typeof ControlErrorSchema.Type;
317
+ export {};
318
+ //# sourceMappingURL=ControlError.d.ts.map
@@ -0,0 +1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