gemi 0.218.0 → 0.219.0

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 (107) hide show
  1. package/dist/ai/index.js +2 -2
  2. package/dist/ai/index.js.map +2 -2
  3. package/dist/ai/testing/index.js +2 -2
  4. package/dist/ai/testing/index.js.map +1 -1
  5. package/dist/{chunk-ww62b10k.js → chunk-0egjv6cj.js} +2 -2
  6. package/dist/{chunk-ww62b10k.js.map → chunk-0egjv6cj.js.map} +1 -1
  7. package/dist/{chunk-9g5qh1ya.js → chunk-2vktfp1f.js} +2 -2
  8. package/dist/{chunk-9g5qh1ya.js.map → chunk-2vktfp1f.js.map} +1 -1
  9. package/dist/chunk-4g24ffv8.js +5 -0
  10. package/dist/{chunk-d6bgh2nr.js.map → chunk-4g24ffv8.js.map} +1 -1
  11. package/dist/chunk-4kkb85z8.js +8 -0
  12. package/dist/{chunk-xese0rng.js.map → chunk-4kkb85z8.js.map} +4 -5
  13. package/dist/{chunk-b1pps9bj.js → chunk-59p034g3.js} +2 -2
  14. package/dist/{chunk-b1pps9bj.js.map → chunk-59p034g3.js.map} +1 -1
  15. package/dist/{chunk-c95ds04p.js → chunk-66re5qsr.js} +2 -2
  16. package/dist/{chunk-c95ds04p.js.map → chunk-66re5qsr.js.map} +1 -1
  17. package/dist/{chunk-sqqh78tf.js → chunk-6my6c6b1.js} +2 -2
  18. package/dist/{chunk-sqqh78tf.js.map → chunk-6my6c6b1.js.map} +1 -1
  19. package/dist/chunk-71r1x773.js +19 -0
  20. package/dist/{chunk-4sbrvmz9.js.map → chunk-71r1x773.js.map} +3 -3
  21. package/dist/chunk-ak85ee4e.js +39 -0
  22. package/dist/chunk-ak85ee4e.js.map +20 -0
  23. package/dist/{chunk-gxd1388t.js → chunk-c250kpcm.js} +2 -2
  24. package/dist/{chunk-gxd1388t.js.map → chunk-c250kpcm.js.map} +1 -1
  25. package/dist/{chunk-4s72m6zx.js → chunk-cmyt2txd.js} +3 -3
  26. package/dist/{chunk-4s72m6zx.js.map → chunk-cmyt2txd.js.map} +1 -1
  27. package/dist/{chunk-fq7wkefg.js → chunk-cw50n89n.js} +2 -2
  28. package/dist/{chunk-fq7wkefg.js.map → chunk-cw50n89n.js.map} +1 -1
  29. package/dist/{chunk-7rmb1v9c.js → chunk-g5drp5xx.js} +2 -2
  30. package/dist/{chunk-7rmb1v9c.js.map → chunk-g5drp5xx.js.map} +1 -1
  31. package/dist/{chunk-snt0523y.js → chunk-gf3m0866.js} +2 -2
  32. package/dist/{chunk-snt0523y.js.map → chunk-gf3m0866.js.map} +1 -1
  33. package/dist/{chunk-tw338bbv.js → chunk-jfpwjqvq.js} +2 -2
  34. package/dist/{chunk-tw338bbv.js.map → chunk-jfpwjqvq.js.map} +1 -1
  35. package/dist/{chunk-gxfyd8wr.js → chunk-kt174y9e.js} +3 -3
  36. package/dist/{chunk-gxfyd8wr.js.map → chunk-kt174y9e.js.map} +1 -1
  37. package/dist/{chunk-s7jwsbfd.js → chunk-nrv7hdeh.js} +3 -3
  38. package/dist/{chunk-s7jwsbfd.js.map → chunk-nrv7hdeh.js.map} +1 -1
  39. package/dist/{chunk-7t13vyzg.js → chunk-p4b5hmr8.js} +2 -2
  40. package/dist/{chunk-7t13vyzg.js.map → chunk-p4b5hmr8.js.map} +1 -1
  41. package/dist/chunk-pnt0c59g.js +484 -0
  42. package/dist/{chunk-ktee4gy4.js.map → chunk-pnt0c59g.js.map} +8 -7
  43. package/dist/{chunk-m0pfdc1n.js → chunk-s4sx97fn.js} +3 -3
  44. package/dist/{chunk-m0pfdc1n.js.map → chunk-s4sx97fn.js.map} +1 -1
  45. package/dist/{chunk-ncw3zjxm.js → chunk-w4aw44zg.js} +2 -2
  46. package/dist/{chunk-ncw3zjxm.js.map → chunk-w4aw44zg.js.map} +1 -1
  47. package/dist/{chunk-7081awrd.js → chunk-w9a3b4vs.js} +2 -2
  48. package/dist/{chunk-7081awrd.js.map → chunk-w9a3b4vs.js.map} +1 -1
  49. package/dist/{chunk-bcfwa370.js → chunk-xm6hfksv.js} +2 -2
  50. package/dist/{chunk-bcfwa370.js.map → chunk-xm6hfksv.js.map} +1 -1
  51. package/dist/{chunk-k8nsefzb.js → chunk-xrkr2yzz.js} +2 -2
  52. package/dist/{chunk-k8nsefzb.js.map → chunk-xrkr2yzz.js.map} +1 -1
  53. package/dist/{chunk-evgs2tr8.js → chunk-xvf1hcxg.js} +2 -2
  54. package/dist/{chunk-evgs2tr8.js.map → chunk-xvf1hcxg.js.map} +2 -2
  55. package/dist/{chunk-eh3ktv8k.js → chunk-y12m6w7b.js} +2 -2
  56. package/dist/{chunk-eh3ktv8k.js.map → chunk-y12m6w7b.js.map} +1 -1
  57. package/dist/chunk-yv3y3r9q.js +88 -0
  58. package/dist/{chunk-sxxkkx75.js.map → chunk-yv3y3r9q.js.map} +3 -10
  59. package/dist/client/index.d.ts +2 -0
  60. package/dist/client/index.d.ts.map +1 -1
  61. package/dist/client/index.js +54 -1
  62. package/dist/client/index.js.map +1 -1
  63. package/dist/client/useWorkflow.d.ts +51 -0
  64. package/dist/client/useWorkflow.d.ts.map +1 -0
  65. package/dist/console/run.js +2 -2
  66. package/dist/console/run.js.map +1 -1
  67. package/dist/database/index.js +1 -1
  68. package/dist/facades/index.js +2 -2
  69. package/dist/facades/index.js.map +1 -1
  70. package/dist/http/index.js +2 -2
  71. package/dist/http/index.js.map +1 -1
  72. package/dist/i18n/index.js +2 -2
  73. package/dist/i18n/index.js.map +1 -1
  74. package/dist/kernel/index.js +2 -2
  75. package/dist/kernel/index.js.map +1 -1
  76. package/dist/orm/index.js +2 -2
  77. package/dist/orm/index.js.map +1 -1
  78. package/dist/server/index.js +1 -1
  79. package/dist/services/index.d.ts +2 -1
  80. package/dist/services/index.d.ts.map +1 -1
  81. package/dist/services/index.js +3 -3
  82. package/dist/services/index.js.map +2 -2
  83. package/dist/services/queue/QueueManager.d.ts +2 -0
  84. package/dist/services/queue/QueueManager.d.ts.map +1 -1
  85. package/dist/services/queue/work.js +2 -2
  86. package/dist/services/queue/work.js.map +1 -1
  87. package/dist/services/queue/workflow/Step.d.ts +2 -9
  88. package/dist/services/queue/workflow/Step.d.ts.map +1 -1
  89. package/dist/services/queue/workflow/Workflow.d.ts +26 -38
  90. package/dist/services/queue/workflow/Workflow.d.ts.map +1 -1
  91. package/dist/services/queue/workflow/WorkflowRuntime.d.ts +45 -0
  92. package/dist/services/queue/workflow/WorkflowRuntime.d.ts.map +1 -1
  93. package/dist/services/queue/workflow/WorkflowStore.d.ts +2 -16
  94. package/dist/services/queue/workflow/WorkflowStore.d.ts.map +1 -1
  95. package/dist/services/queue/workflow/wire.d.ts +71 -0
  96. package/dist/services/queue/workflow/wire.d.ts.map +1 -0
  97. package/dist/services/queue/workflow/workflowContract.d.ts.map +1 -1
  98. package/dist/support/index.js +2 -2
  99. package/dist/support/index.js.map +1 -1
  100. package/package.json +1 -1
  101. package/dist/chunk-4sbrvmz9.js +0 -19
  102. package/dist/chunk-d6bgh2nr.js +0 -5
  103. package/dist/chunk-ktee4gy4.js +0 -484
  104. package/dist/chunk-sxxkkx75.js +0 -117
  105. package/dist/chunk-xb0evp2m.js +0 -5
  106. package/dist/chunk-xb0evp2m.js.map +0 -12
  107. package/dist/chunk-xese0rng.js +0 -13
@@ -133,6 +133,8 @@ export declare class QueueManager {
133
133
  * `signal`, `find` and `cancel` call.
134
134
  */
135
135
  get workflows(): WorkflowRuntime;
136
+ /** @internal The application this queue belongs to, when it was built with one. */
137
+ get boundApplication(): Application | undefined;
136
138
  /**
137
139
  * The tick job, beside the app's own, once there is a workflow to tick.
138
140
  * Not in `registeredJobs`, which reports what the app handed over.
@@ -1 +1 @@
1
- {"version":3,"file":"QueueManager.d.ts","sourceRoot":"","sources":["../../../services/queue/QueueManager.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAMhE,OAAO,EAAiB,WAAW,EAAE,MAAM,qBAAqB,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G;IACH,KAAK;IAgBL;;;;;;;;;;;;OAYG;IACG,KAAK,CAAC,SAAS,SAAW,GAAG,OAAO,CAAC,WAAW,CAAC;IA0BvD,6EAA6E;IAC7E,IAAI,IAAI,OAAO,CAAC,WAAW,CAAC;IAI5B,uDAAuD;IACvD,IAAI,OAAO,IAAI,MAAM,CAEpB;IAED;;;;;;;;;;OAUG;YACW,IAAI;YASJ,iBAAiB;IAmD/B;;;;;;;;;;;;;;;;;OAiBG;IACH,OAAO,CAAC,KAAK;IAoBb,0EAA0E;IAC1E,OAAO,CAAC,UAAU;IAKlB,OAAO,CAAC,IAAI;IAOZ;;;OAGG;IACH,IAAI,OAAO,YAEV;IAED,qEAAqE;IACrE,OAAO,CAAC,YAAY;IAIpB,OAAO,CAAC,KAAK;IAIb,OAAO,CAAC,OAAO;IAwBf;;;;OAIG;IACH,OAAO,CAAC,SAAS;IAoBjB;;;;;;;OAOG;YACW,GAAG;IAoNjB,yEAAyE;IACzE,OAAO,CAAC,WAAW;IAanB;;;;;;;;;;OAUG;YACW,KAAK;CAiDpB;AAmBD;;;;;;;;;;;GAWG;AACH,wBAAgB,mBAAmB,YAIlC;AAED;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAAC,GAAG,GAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAe,WAEtF;AAQD,mFAAmF;AACnF,wBAAgB,eAAe,CAAC,MAAM,UAAO,QAE5C;AAED,wBAAgB,aAAa,IAAI,OAAO,CAEvC"}
@@ -1,4 +1,4 @@
1
1
  // @bun
2
- import{He as J,Ke as A}from"../../chunk-ktee4gy4.js";import{Xk as V}from"../../chunk-k8nsefzb.js";import"../../chunk-xb0evp2m.js";import"../../chunk-yxtfg4wy.js";import"../../chunk-xyv3y476.js";import"../../chunk-qa528feb.js";import"../../chunk-aes0ecnp.js";import"../../chunk-sba3s380.js";import{Cm as I,tm as Y,wm as N,xm as Z,ym as _}from"../../chunk-q0d45r2j.js";import{Gm as x}from"../../chunk-hmtn7996.js";import"../../chunk-yedb5vvg.js";import $ from"path";function X(z){if(!z.config.get("route.channels"))return null;let C=z.config.get("broadcast",{}).driver;if(!(C===void 0||C==="memory"||C instanceof V))return null;return'[gemi] Broadcasts from this worker reach no one: the broadcast driver is "memory", which delivers to the sockets of the process that emits, and a worker has none. Set `driver: "redis"` in app/config/broadcast.ts.'}class L extends Error{name="QueueWorkerRefused"}class O{kernel;stopping;keepAlive;settings;constructor(z,C={}){this.kernel=z;this.settings={..._(),...C}}async start(){if(await this.kernel.waitForBoot(),this.stopping)return;let z=this.kernel.app;if(!z.bound(J))throw new L("[gemi] `gemi queue:work` has no queue to claim from: this application does not register QueueServiceProvider.");let C=z.make(J);if(!C.durable)throw new L('[gemi] `gemi queue:work` refuses to start: the queue uses the memory driver, which keeps each job in the process that dispatched it, so a worker never sees one. Set `driver: "database"` (or another driver every process can reach) in app/config/queue.ts, or run jobs in the server and drop the worker.');C.start(),this.keepAlive=setInterval(()=>{},1073741824),console.log(`[gemi] Queue worker started: claiming up to ${C.config.concurrency} job(s) at a time.`);let E=X(z);if(E)console.warn(E)}stop(z={}){return this.stopping??=this.drain({...this.settings,...z}),this.stopping}async drain(z){let C=Date.now()+z.timeoutMs;Y();let E=this.kernel.app,F=E.resolved(J)?E.make(J):void 0;if(F)console.log(`[gemi] Shutting down: waiting for ${F.running} running job(s) (up to ${z.timeoutMs/1000}s).`),await F.drain(z.timeoutMs);let G=N()===0;if(!G){let U=C-Date.now();if(G=U>0&&await Promise.race([Z().then(()=>!0),new Promise((K)=>setTimeout(()=>K(!1),U))]),!G)console.error(`[gemi] Shutdown grace period elapsed with ${N()} held background task(s) still running; abandoning them.`)}let H=await this.kernel.shutdown({timeoutMs:z.providerTimeoutMs});clearInterval(this.keepAlive);let T=G&&(F?.running??0)===0&&H.failed.length===0&&H.timedOut.length===0;return console.log(`[gemi] Shutdown ${T?"complete":"finished with errors"}.`),T?0:1}}async function j(){let z=x();process.env.ROOT_DIR=z,process.env.APP_DIR=$.join(z,"app"),A();let C=$.join(z,"app/kernel/Kernel.ts"),{default:E}=await import(C);if(typeof E!=="function")return console.error(`[gemi] ${C} has no default export to boot the worker from.`),1;let F=new E;F.boot();let G=new O(F);I(()=>G.stop());try{await G.start()}catch(H){if(!(H instanceof L))throw H;return console.error(H.message),1}return}j().then((z)=>{if(z!==void 0)process.exit(z)},(z)=>{console.error("[gemi] The queue worker failed to start:",z),process.exit(1)});
2
+ import{Ie as J,Le as A}from"../../chunk-pnt0c59g.js";import{Kk as V}from"../../chunk-xrkr2yzz.js";import"../../chunk-ak85ee4e.js";import"../../chunk-yxtfg4wy.js";import"../../chunk-xyv3y476.js";import"../../chunk-qa528feb.js";import"../../chunk-aes0ecnp.js";import"../../chunk-sba3s380.js";import{Cm as I,tm as Y,wm as N,xm as Z,ym as _}from"../../chunk-q0d45r2j.js";import{Gm as x}from"../../chunk-hmtn7996.js";import"../../chunk-yedb5vvg.js";import $ from"path";function X(z){if(!z.config.get("route.channels"))return null;let C=z.config.get("broadcast",{}).driver;if(!(C===void 0||C==="memory"||C instanceof V))return null;return'[gemi] Broadcasts from this worker reach no one: the broadcast driver is "memory", which delivers to the sockets of the process that emits, and a worker has none. Set `driver: "redis"` in app/config/broadcast.ts.'}class L extends Error{name="QueueWorkerRefused"}class O{kernel;stopping;keepAlive;settings;constructor(z,C={}){this.kernel=z;this.settings={..._(),...C}}async start(){if(await this.kernel.waitForBoot(),this.stopping)return;let z=this.kernel.app;if(!z.bound(J))throw new L("[gemi] `gemi queue:work` has no queue to claim from: this application does not register QueueServiceProvider.");let C=z.make(J);if(!C.durable)throw new L('[gemi] `gemi queue:work` refuses to start: the queue uses the memory driver, which keeps each job in the process that dispatched it, so a worker never sees one. Set `driver: "database"` (or another driver every process can reach) in app/config/queue.ts, or run jobs in the server and drop the worker.');C.start(),this.keepAlive=setInterval(()=>{},1073741824),console.log(`[gemi] Queue worker started: claiming up to ${C.config.concurrency} job(s) at a time.`);let E=X(z);if(E)console.warn(E)}stop(z={}){return this.stopping??=this.drain({...this.settings,...z}),this.stopping}async drain(z){let C=Date.now()+z.timeoutMs;Y();let E=this.kernel.app,F=E.resolved(J)?E.make(J):void 0;if(F)console.log(`[gemi] Shutting down: waiting for ${F.running} running job(s) (up to ${z.timeoutMs/1000}s).`),await F.drain(z.timeoutMs);let G=N()===0;if(!G){let U=C-Date.now();if(G=U>0&&await Promise.race([Z().then(()=>!0),new Promise((K)=>setTimeout(()=>K(!1),U))]),!G)console.error(`[gemi] Shutdown grace period elapsed with ${N()} held background task(s) still running; abandoning them.`)}let H=await this.kernel.shutdown({timeoutMs:z.providerTimeoutMs});clearInterval(this.keepAlive);let T=G&&(F?.running??0)===0&&H.failed.length===0&&H.timedOut.length===0;return console.log(`[gemi] Shutdown ${T?"complete":"finished with errors"}.`),T?0:1}}async function j(){let z=x();process.env.ROOT_DIR=z,process.env.APP_DIR=$.join(z,"app"),A();let C=$.join(z,"app/kernel/Kernel.ts"),{default:E}=await import(C);if(typeof E!=="function")return console.error(`[gemi] ${C} has no default export to boot the worker from.`),1;let F=new E;F.boot();let G=new O(F);I(()=>G.stop());try{await G.start()}catch(H){if(!(H instanceof L))throw H;return console.error(H.message),1}return}j().then((z)=>{if(z!==void 0)process.exit(z)},(z)=>{console.error("[gemi] The queue worker failed to start:",z),process.exit(1)});
3
3
 
4
- //# debugId=FE54B66218B3B73A64756E2164756E21
4
+ //# debugId=83EF710EC1DC40DC64756E2164756E21
@@ -7,6 +7,6 @@
7
7
  "import type { Application, ShutdownReport } from \"../../foundation/Application\";\nimport {\n heldWork,\n heldWorkSettled,\n markShuttingDown,\n shutdownSettings,\n type ShutdownSettings,\n} from \"../../server/shutdown\";\nimport { memoryBroadcastInWorker } from \"../broadcast/workerWarning\";\nimport { QueueManager } from \"./QueueManager\";\n\n/** The part of a `Kernel` a worker drives. */\nexport type WorkerKernel = {\n readonly app: Application;\n waitForBoot(): Promise<void>;\n shutdown(options?: { timeoutMs?: number }): Promise<ShutdownReport>;\n};\n\n/**\n * A worker that was told to start in an application it cannot claim for. The\n * message is written for the operator reading the deploy's logs.\n */\nexport class QueueWorkerRefused extends Error {\n name = \"QueueWorkerRefused\";\n}\n\n/**\n * The process `gemi queue:work` runs: the application booted as a server boots\n * it, claiming from the queue, and no `Bun.serve`. It exists so job capacity\n * can be scaled apart from request traffic, which needs a driver both kinds of\n * process can reach; see `start` for why the memory driver is refused.\n *\n * The caller marks the process as a worker (`markQueueWorker`) before the\n * kernel registers, so every claim rule that asks `claimsInThisProcess` sees a\n * process that claims, whatever `GEMI_QUEUE_CLAIM` says.\n */\nexport class QueueWorker {\n private stopping: Promise<number> | undefined;\n private keepAlive: ReturnType<typeof setInterval> | undefined;\n private readonly settings: ShutdownSettings;\n\n /**\n * `settings` default to the `GEMI_SHUTDOWN_*` variables, read here rather\n * than at the signal so a bad value is warned about while the deploy is\n * being watched, as `Server.start` does.\n */\n constructor(\n private readonly kernel: WorkerKernel,\n settings: Partial<ShutdownSettings> = {},\n ) {\n this.settings = { ...shutdownSettings(), ...settings };\n }\n\n /**\n * Boots the application and starts claiming. Rejects with\n * `QueueWorkerRefused` when the application has no queue, or its queue uses\n * the memory driver.\n *\n * Refused rather than warned about, because a memory worker can never do\n * anything: its jobs live in a `Map` in the process that dispatched them,\n * so a worker's is always empty. Left running, it looks like a healthy\n * deploy — a process up, no errors — that runs nothing, and scaling it out\n * adds no capacity. An exit the platform reports as a crash loop is a form\n * of the mistake someone will see.\n */\n async start(): Promise<void> {\n await this.kernel.waitForBoot();\n // A signal during the boot has already drained and cleared the handle\n // below. Going on would start the loop again and arm a handle nothing\n // clears, holding open a worker that has finished shutting down.\n if (this.stopping) return;\n\n const application = this.kernel.app;\n // `bound`, not `make` in a try: an application built without the queue\n // provider is a configuration to name, not an unbound-token stack trace.\n if (!application.bound(QueueManager)) {\n throw new QueueWorkerRefused(\n \"[gemi] `gemi queue:work` has no queue to claim from: this application \" +\n \"does not register QueueServiceProvider.\",\n );\n }\n const queue = application.make(QueueManager);\n if (!queue.durable) {\n throw new QueueWorkerRefused(\n \"[gemi] `gemi queue:work` refuses to start: the queue uses the memory \" +\n \"driver, which keeps each job in the process that dispatched it, so \" +\n 'a worker never sees one. Set `driver: \"database\"` (or another driver ' +\n \"every process can reach) in app/config/queue.ts, or run jobs in the \" +\n \"server and drop the worker.\",\n );\n }\n\n // Idempotent: a production boot with a durable driver has already started\n // it (`startClaimingIfServing`). Development has not, and a worker claims\n // in either.\n queue.start();\n // The queue's poll timer is unref'd, so that a script's queue does not\n // hold it open; here the queue is the process, and without a handle of its\n // own an idle worker would exit 0 as soon as it booted.\n this.keepAlive = setInterval(() => {}, 1 << 30);\n console.log(\n `[gemi] Queue worker started: claiming up to ${queue.config.concurrency} job(s) at a time.`,\n );\n const broadcastWarning = memoryBroadcastInWorker(application);\n if (broadcastWarning) console.warn(broadcastWarning);\n }\n\n /**\n * Stops claiming, waits for the running jobs, runs every provider's\n * `shutdown()`, and resolves with the exit code: 0 when no job was left\n * running and every provider finished in time, 1 otherwise. Idempotent.\n *\n * `gemi start`'s drain, with the jobs where the requests were:\n * `isShuttingDown()` turns true, which stops a durable queue claiming;\n * running jobs get `timeoutMs` (`GEMI_SHUTDOWN_TIMEOUT`), which a server\n * spends on requests; then `Application.shutdown` gets `providerTimeoutMs`,\n * and in it the queue provider waits for whatever is still running and\n * names it. The two budgets add up as they do for a server, so a worker\n * fits the same grace period. `delayMs` is not waited: it is for a load\n * balancer, and nothing routes to a worker.\n */\n stop(settings: Partial<ShutdownSettings> = {}): Promise<number> {\n this.stopping ??= this.drain({ ...this.settings, ...settings });\n return this.stopping;\n }\n\n private async drain(settings: ShutdownSettings): Promise<number> {\n const deadline = Date.now() + settings.timeoutMs;\n markShuttingDown();\n const application = this.kernel.app;\n // Resolving the manager now would build a driver only to stop it, which\n // is what a signal during the boot, before the provider resolved it, finds.\n const queue = application.resolved(QueueManager) ? application.make(QueueManager) : undefined;\n if (queue) {\n console.log(\n `[gemi] Shutting down: waiting for ${queue.running} running job(s) ` +\n `(up to ${settings.timeoutMs / 1000}s).`,\n );\n await queue.drain(settings.timeoutMs);\n }\n // Work held with `holdShutdown` (#1210) gets what is left of the same budget.\n let held = heldWork() === 0;\n if (!held) {\n const remaining = deadline - Date.now();\n held =\n remaining > 0 &&\n (await Promise.race([\n heldWorkSettled().then(() => true),\n new Promise<false>((resolve) => setTimeout(() => resolve(false), remaining)),\n ]));\n if (!held) {\n console.error(\n `[gemi] Shutdown grace period elapsed with ${heldWork()} held background task(s) still running; abandoning them.`,\n );\n }\n }\n\n const report = await this.kernel.shutdown({ timeoutMs: settings.providerTimeoutMs });\n clearInterval(this.keepAlive);\n const clean =\n held && (queue?.running ?? 0) === 0 && report.failed.length === 0 && report.timedOut.length === 0;\n console.log(`[gemi] Shutdown ${clean ? \"complete\" : \"finished with errors\"}.`);\n return clean ? 0 : 1;\n }\n}\n"
8
8
  ],
9
9
  "mappings": ";gdAYA,kBCDO,OAAS,DAAuB,DAAC,AAAyC,DAC/E,CAAI,DAAC,AAAY,KAAO,IAAI,gBAAgB,EAAG,OAAO,KACtD,IAAM,EAAS,EAAY,OAAO,IAAqB,YAAa,CAAC,CAAC,EAAE,OAGxE,GAAI,EADF,IAAW,QAAa,IAAW,UAAY,aAAkB,GACtD,OAAO,KACpB,MACE,uNCIG,MAAM,UAA2B,KAAM,CAC5C,KAAO,oBACT,CAYO,MAAM,CAAY,CAWJ,OAVX,SACA,UACS,SAOjB,WAAW,CACQ,EACjB,EAAsC,CAAC,EACvC,CAFiB,cAGjB,KAAK,SAAW,IAAK,EAAiB,KAAM,CAAS,OAejD,MAAK,EAAkB,CAK3B,GAJA,MAAM,KAAK,OAAO,YAAY,EAI1B,KAAK,SAAU,OAEnB,IAAM,EAAc,KAAK,OAAO,IAGhC,GAAI,CAAC,EAAY,MAAM,CAAY,EACjC,MAAM,IAAI,EACR,+GAEF,EAEF,IAAM,EAAQ,EAAY,KAAK,CAAY,EAC3C,GAAI,CAAC,EAAM,QACT,MAA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Y,EAI5B,QAAQ,IAAI,SAAW,EACvB,QAAQ,IAAI,QAAU,EAAK,KAAK,EAAS,KAAK,EAE9C,EAAgB,EAEhB,IAAM,EAAa,EAAK,KAAK,EAAS,sBAAsB,GACpD,QAAS,GAAY,MAAa,UAG1C,GAAI,OAAO,IAAW,WAEpB,OADA,QAAQ,MAAM,UAAU,kDAA2D,EAC5E,EAET,IAAM,EAAS,IAAI,EACnB,EAAO,KAAK,EAEZ,IAAM,EAAS,IAAI,EAAY,CAAM,EAKrC,EAAuB,IAAM,EAAO,KAAK,CAAC,EAE1C,GAAI,CACF,MAAM,EAAO,MAAM,EACnB,MAAO,EAAO,CACd,GAAI,EAAE,aAAiB,GAAqB,MAAM,EAElD,OADA,QAAQ,MAAM,EAAM,OAAO,EACpB,EAGT,OAGF,EAAK,EAAE,KACL,CAAC,IAAS,CACR,GAAI,IAAS,OAAW,QAAQ,KAAK,CAAI,GAE3C,CAAC,IAAU,CACT,QAAQ,MAAM,2CAA4C,CAAK,EAC/D,QAAQ,KAAK,CAAC,EAElB",
10
- "debugId": "FE54B66218B3B73A64756E2164756E21",
10
+ "debugId": "83EF710EC1DC40DC64756E2164756E21",
11
11
  "names": []
12
12
  }
@@ -1,3 +1,4 @@
1
+ import type { EachProgress } from "./wire";
1
2
  import { type BatchStatus } from "../batch";
2
3
  import type { EnqueueBatch } from "../QueueDriver";
3
4
  import type { Job } from "../Job";
@@ -120,15 +121,7 @@ export type EachProblem = {
120
121
  /** Attempts started. */
121
122
  attempt: number;
122
123
  };
123
- /** How far a `step.each` is. */
124
- export type EachProgress = {
125
- total: number;
126
- /** Items that ended: `succeeded + skipped + failed`. */
127
- done: number;
128
- succeeded: number;
129
- skipped: number;
130
- failed: number;
131
- };
124
+ export type { EachProgress } from "./wire";
132
125
  /** What `step.each` returns once every item has ended. */
133
126
  export type EachSummary = EachProgress & {
134
127
  /** The first 100 problems, by index. `Workflow.items` lists them all. */
@@ -1 +1 @@
1
- {"version":3,"file":"Step.d.ts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KrB,OAAO,CAAC,OAAO;IAMf;;;;OAIG;YACW,KAAK;IAsCnB,OAAO,CAAC,MAAM;IAqBd,OAAO,CAAC,QAAQ;YAQF,OAAO;IA+HrB;;;OAGG;YACW,OAAO;YAiDP,SAAS;YAgCT,QAAQ;YAmDR,QAAQ;YAgUR,SAAS;CAwDxB;AAcD;;;GAGG;AACH,wBAAgB,MAAM,CAAC,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAclE;AAED,wBAAgB,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,GAAG,OAAO,CAErD;AAED,wBAAgB,QAAQ,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAE/C;AAgDD,gGAAgG;AAChG,wBAAgB,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,GAAG,YAAY,GAAG,IAAI,CAOzE;AAyBD,+DAA+D;AAC/D,wBAAgB,SAAS,CAAC,IAAI,EAAE,UAAU,GAAG,WAAW,CAUvD;AA0DD,2BAA2B;AAC3B,wBAAgB,iBAAiB,SAGhC"}
@@ -1,51 +1,19 @@
1
- import type { EachProblem, EachProgress, Step } from "./Step";
2
- import type { StepRunStatus, WorkflowRunStatus } from "./WorkflowStore";
1
+ import type { EachProblem, Step } from "./Step";
2
+ import type { ChangeFeedResponse, StreamOptions } from "../../change-feed/stream";
3
+ import type { WorkflowUpdate } from "./wire";
3
4
  /** The arguments `start` takes: `run`'s, after `step`. */
4
5
  export type WorkflowArgs<T extends Workflow> = Parameters<T["run"]> extends [
5
6
  any,
6
7
  ...infer Rest
7
8
  ] ? Rest : never;
8
- /** What `Workflow.find` resolves to. Times are epoch milliseconds. */
9
- export type WorkflowStatus = {
10
- id: string;
11
- /** The workflow class's `static name`. */
12
- name: string;
13
- status: WorkflowRunStatus;
9
+ /** What `Workflow.find` resolves to: the workflow's update, with its arguments and result. */
10
+ export type WorkflowStatus = WorkflowUpdate & {
14
11
  /** The `run` arguments after `step`. */
15
12
  args: unknown[];
16
- /** The key of the step it is on, or `null`. */
17
- currentStep: string | null;
18
- /** 0 to 1, as `step.progress` last set it; 1 once completed. */
19
- progress: number;
20
13
  /** What `run` returned, once completed. */
21
14
  result: unknown;
22
- /** Why it failed; for a cancelled one, why `onCancel` failed. */
23
- error: string | null;
24
- /** Every step recorded so far, in the order they were first reached. */
25
- steps: WorkflowStepStatus[];
26
- createdAt: number;
27
- updatedAt: number;
28
- };
29
- export type WorkflowStepStatus = {
30
- key: string;
31
- status: StepRunStatus;
32
- /** Attempts started; `step.run` only. */
33
- attempt: number;
34
- error: string | null;
35
- /** The batch a `step.batch` dispatched. */
36
- batchId: string | null;
37
- /**
38
- * 0 to 1: the batch's progress for a `step.batch`, or the share of items
39
- * that have ended for a `step.each`.
40
- */
41
- progress?: number;
42
- /** How far a `step.each` is. */
43
- items?: EachProgress;
44
- /** When a sleep ends, a wait times out, or a retry is due. */
45
- wakeAt: number | null;
46
- startedAt: number | null;
47
- finishedAt: number | null;
48
15
  };
16
+ export type { WorkflowStepStatus, WorkflowUpdate } from "./wire";
49
17
  /**
50
18
  * A durable workflow (#846): a `run` method made of steps, which survives
51
19
  * restarts and deploys, sleeps and waits without holding a process, and can
@@ -125,6 +93,26 @@ export declare class Workflow {
125
93
  after?: number;
126
94
  limit?: number;
127
95
  }): Promise<EachProblem[]>;
96
+ /** The ChangeFeed channel a workflow's changes are published to: `gemi:workflow:<id>`. */
97
+ static channel(id: string): string;
98
+ /**
99
+ * An SSE response following workflow `id`, for `useWorkflow`. Each event's
100
+ * `data` is a `WorkflowUpdate`: the status without `args` and `result`.
101
+ * Authorise the read first, as for any route. Resumes from
102
+ * `Last-Event-ID`, or `options.cursor` (`Workflow.cursor(id)`).
103
+ */
104
+ static stream(request: {
105
+ rawRequest: Request;
106
+ } | Request, id: string, options?: StreamOptions): ChangeFeedResponse<WorkflowUpdate>;
107
+ /** A cursor at the workflow's channel head, for a view that read it to hand its client. */
108
+ static cursor(id: string): Promise<string>;
109
+ /**
110
+ * Follows workflow `id` on the server: yields it as it is now, then each
111
+ * newer update, and ends after the one that ended it.
112
+ */
113
+ static subscribe(id: string, options?: {
114
+ signal?: AbortSignal;
115
+ }): AsyncGenerator<WorkflowUpdate, void, undefined>;
128
116
  /** The workflow's status, or `null` for an unknown id. */
129
117
  static find(id: string): Promise<WorkflowStatus | null>;
130
118
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"Workflow.d.ts","sourceRoot":"","sources":["../../../../services/queue/workflow/Workflow.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9D,OAAO,KAAK,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAExE,0DAA0D;AAC1D,MAAM,MAAM,YAAY,CAAC,CAAC,SAAS,QAAQ,IAAI,UAAU,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,SAAS;IAC1E,GAAG;IACH,GAAG,MAAM,IAAI;CACd,GACG,IAAI,GACJ,KAAK,CAAC;AAEV,sEAAsE;AACtE,MAAM,MAAM,cAAc,GAAG;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,0CAA0C;IAC1C,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,iBAAiB,CAAC;IAC1B,wCAAwC;IACxC,IAAI,EAAE,OAAO,EAAE,CAAC;IAChB,+CAA+C;IAC/C,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,gEAAgE;IAChE,QAAQ,EAAE,MAAM,CAAC;IACjB,2CAA2C;IAC3C,MAAM,EAAE,OAAO,CAAC;IAChB,iEAAiE;IACjE,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,wEAAwE;IACxE,KAAK,EAAE,kBAAkB,EAAE,CAAC;IAC5B,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,MAAM,MA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,CACd,EAAE,EAAE,MAAM,EACV,OAAO,GAAE;QAAE,MAAM,CAAC,EAAE,WAAW,CAAA;KAAO,GACrC,cAAc,CAAC,cAAc,EAAE,IAAI,EAAE,SAAS,CAAC;IAIlD,0DAA0D;IAC1D,MAAM,CAAC,IAAI,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,GAAG,IAAI,CAAC;IAIvD;;;;OAIG;IACH,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;CAG5C;AAED,MAAM,MAAM,aAAa,GAAG,CAAC,UAAU,QAAQ,CAAC,GAAG;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC"}
@@ -1,7 +1,10 @@
1
+ import { ChangeFeedManager } from "../../change-feed/ChangeFeedManager";
2
+ import type { ChangeFeedResponse, StreamOptions } from "../../change-feed/stream";
1
3
  import { Job } from "../Job";
2
4
  import type { QueueManager } from "../QueueManager";
3
5
  import { type EachProblem } from "./Step";
4
6
  import type { WorkflowClass, WorkflowStatus } from "./Workflow";
7
+ import { type WorkflowUpdate } from "./wire";
5
8
  import { type WorkflowStore } from "./WorkflowStore";
6
9
  /**
7
10
  * The queue's half of workflows: the registry of workflow classes, what
@@ -25,6 +28,10 @@ export declare class WorkflowRuntime {
25
28
  private readonly queue;
26
29
  private registry;
27
30
  private storeInstance;
31
+ private ownFeed;
32
+ /** Workflows with a publish scheduled, and when each was last published. */
33
+ private readonly publishing;
34
+ private readonly published;
28
35
  private tickClass;
29
36
  private readonly reportedNames;
30
37
  constructor(queue: QueueManager);
@@ -35,6 +42,44 @@ export declare class WorkflowRuntime {
35
42
  /** The internal job a workflow's passes run in, one class per manager. */
36
43
  get tickJob(): new () => Job;
37
44
  get store(): WorkflowStore;
45
+ /**
46
+ * The change feed workflow changes are published to: the application's,
47
+ * or one of this runtime's own (in memory) without one.
48
+ */
49
+ get feed(): ChangeFeedManager;
50
+ /** The ChangeFeed channel a workflow's changes are published to. */
51
+ channel(id: string): string;
52
+ /** What a change publishes: the status without `args` and `result`. */
53
+ update(id: string): Promise<WorkflowUpdate | null>;
54
+ /**
55
+ * An SSE response following workflow `id`: each event's `data` is a
56
+ * `WorkflowUpdate`, for a route that has already decided the caller may
57
+ * read it.
58
+ */
59
+ stream(request: {
60
+ rawRequest: Request;
61
+ } | Request, id: string, options?: StreamOptions): ChangeFeedResponse<WorkflowUpdate>;
62
+ /** A cursor at the workflow's channel head, for a view to hand its client. */
63
+ cursor(id: string): Promise<string>;
64
+ /**
65
+ * Follows workflow `id` on the server: yields it as it is now, then each
66
+ * newer update, and ends after the one that ended it. Yields nothing for
67
+ * an unknown id.
68
+ */
69
+ subscribe(id: string, options?: {
70
+ signal?: AbortSignal;
71
+ }): AsyncGenerator<WorkflowUpdate, void, undefined>;
72
+ /**
73
+ * The store, with every change scheduling a publish of the workflow it
74
+ * changed. Publishes are coalesced: at most one per workflow every
75
+ * `PUBLISH_INTERVAL_MS`, each carrying the workflow as it is then, so the
76
+ * last change is always published.
77
+ */
78
+ private publishingStore;
79
+ private schedulePublish;
80
+ private publish;
81
+ /** Ends this runtime's own feed, if it made one, and drops pending publishes. For tests. */
82
+ close(): Promise<void>;
38
83
  start(workflow: WorkflowClass, args: unknown[]): Promise<string>;
39
84
  signal(id: string, key: string, payload?: unknown): Promise<boolean>;
40
85
  cancel(id: string): Promise<boolean>;
@@ -1 +1 @@
1
- {"version":3,"file":"WorkflowRuntime.d.ts","sourceRoot":"","sources":["../../../../services/queue/workflow/WorkflowRuntime.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,GAAG,EAAE,MAAM,QAAQ,CAAC;AAC7B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,EACL,KAAK,WAAW,EAQjB,MAAM,QAAQ,CAAC;AAChB,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAChE,OAAO,EAML,KAAK,aAAa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AAC,OAAO,CAAC;IAkBpC,IAAI,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,GAAG,IAAI,CAAC;IA+ChD,KAAK,CACT,EAAE,EAAE,MAAM,EACV,GAAG,EAAE,MAAM,EACX,OAAO,GAAE;QAAE,MAAM,CAAC,EAAE,QAAQ,GAAG,SAAS,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAO,GAC9E,OAAO,CAAC,WAAW,EAAE,CAAC;IAYzB,0DAA0D;IACpD,IAAI,CAAC,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE,GAAG,GAAG,OAAO,CAAC,IAAI,CAAC;IA2G/C,iEAAiE;IACjE,OAAO,CAAC,MAAM;IA4Dd;;;;;OAKG;YACW,OAAO;IAgCrB;;;;OAIG;IACH,gBAAgB;IAChB,gBAAgB,CAAC,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK;CAiB1C"}
@@ -14,6 +14,7 @@
14
14
  * a workflow sleeps) is decided by the runtime, in the `decide` callback of
15
15
  * `update`, while the store holds the workflow exclusively.
16
16
  */
17
+ import type { StepRunStatus, WorkflowRunStatus } from "./wire";
17
18
  import type { EnqueueBatch } from "../QueueDriver";
18
19
  /** The registered name the internal tick job runs under. */
19
20
  export declare const WORKFLOW_TICK_JOB = "gemi.WorkflowTick";
@@ -22,22 +23,7 @@ export declare const WORKFLOW_TICK_JOB = "gemi.WorkflowTick";
22
23
  * as JSON, in bytes. Store an id for anything larger.
23
24
  */
24
25
  export declare const WORKFLOW_OUTPUT_LIMIT: number;
25
- /**
26
- * Where a workflow stands.
27
- *
28
- * - `running`: a tick is running it, or one is queued to.
29
- * - `sleeping`: waiting for a `step.sleep` or a step's retry backoff.
30
- * - `waiting`: waiting for a signal (`step.waitFor`) or a batch (`step.batch`).
31
- * - `cancelling`: `cancel` was accepted, and `onCancel` has not finished yet.
32
- * - `completed`, `failed`, `cancelled`: final.
33
- */
34
- export type WorkflowRunStatus = "running" | "sleeping" | "waiting" | "completed" | "failed" | "cancelling" | "cancelled";
35
- /**
36
- * Where one step stands. `signalled` is a signal that arrived before its
37
- * `step.waitFor`, kept until the workflow gets there. `iterating` is a
38
- * `step.each` that has items left.
39
- */
40
- export type StepRunStatus = "running" | "retrying" | "completed" | "failed" | "sleeping" | "waiting" | "signalled" | "timed_out" | "batching" | "iterating";
26
+ export type { StepRunStatus, WorkflowRunStatus } from "./wire";
41
27
  /** A workflow's row. Times are epoch milliseconds. */
42
28
  export type WorkflowRecord = {
43
29
  id: string;
@@ -1 +1 @@
1
- {"version":3,"file":"WorkflowStore.d.ts","sourceRoot":"","sources":["../../../../services/queue/workflow/WorkflowStore.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAEnD,4DAA4D;AAC5D,eAAO,MAAM,iBAAiB,sBAAsB,CAAC;AAErD;;;GAGG;AACH,eAAO,MAAM,qBAAqB,QAAa,CAAC;AAEhD;;;;;;;;GAQG;AACH,MAAM,MAAM,iBAAiB,GACzB,SAAS,GACT,UAAU,GACV,SAAS,GACT,WAAW,GACX,QAAQ,GACR,YAAY,GACZ,WAAW,CAAC;AAEhB;;;;GAIG;AACH,MAAM,MAAM,aAAa,GACrB,SAAS,GACT,UAAU,GACV,WAAW,GACX,QAAQ,GACR,UAAU,GACV,SAAS,GACT,WAAW,GACX,WAAW,GACX,UAAU,GACV,WAAW,CAAC;AAEhB,sDAAsD;AACtD,MAAM,MAAM,cAAc,GAAG;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,0CAA0C;IAC1C,IAAI,EAAE,MAAM,CAAC;IACb,iDAAiD;IACjD,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,iBAAiB,CAAC;IAC1B,+CAA+C;IAC/C,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,gEAAgE;IAChE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AClB,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE;QAAE,QAAQ,EAAE,aAAa,EAAE,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,GACpE,OAAO,CAAC,UAAU,EAAE,CAAC,CAAC;IAEzB;;;OAGG;IACH,KAAK,CAAC,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;CAC9C"}
@@ -0,0 +1,71 @@
1
+ /**
2
+ * Where a workflow stands.
3
+ *
4
+ * - `running`: a tick is running it, or one is queued to.
5
+ * - `sleeping`: waiting for a `step.sleep` or a step's retry backoff.
6
+ * - `waiting`: waiting for a signal (`step.waitFor`) or a batch (`step.batch`).
7
+ * - `cancelling`: `cancel` was accepted, and `onCancel` has not finished yet.
8
+ * - `completed`, `failed`, `cancelled`: final.
9
+ */
10
+ export type WorkflowRunStatus = "running" | "sleeping" | "waiting" | "completed" | "failed" | "cancelling" | "cancelled";
11
+ /**
12
+ * Where one step stands. `signalled` is a signal that arrived before its
13
+ * `step.waitFor`, kept until the workflow gets there. `iterating` is a
14
+ * `step.each` that has items left.
15
+ */
16
+ export type StepRunStatus = "running" | "retrying" | "completed" | "failed" | "sleeping" | "waiting" | "signalled" | "timed_out" | "batching" | "iterating";
17
+ /** How far a `step.each` is. */
18
+ export type EachProgress = {
19
+ total: number;
20
+ /** Items that ended: `succeeded + skipped + failed`. */
21
+ done: number;
22
+ succeeded: number;
23
+ skipped: number;
24
+ failed: number;
25
+ };
26
+ /** One step, as `Workflow.find` and the workflow's stream show it. Times are epoch milliseconds. */
27
+ export type WorkflowStepStatus = {
28
+ key: string;
29
+ status: StepRunStatus;
30
+ /** Attempts started; `step.run` only. */
31
+ attempt: number;
32
+ error: string | null;
33
+ /** The batch a `step.batch` dispatched. */
34
+ batchId: string | null;
35
+ /**
36
+ * 0 to 1: the batch's progress for a `step.batch`, or the share of items
37
+ * that have ended for a `step.each`.
38
+ */
39
+ progress?: number;
40
+ /** How far a `step.each` is. */
41
+ items?: EachProgress;
42
+ /** When a sleep ends, a wait times out, or a retry is due. */
43
+ wakeAt: number | null;
44
+ startedAt: number | null;
45
+ finishedAt: number | null;
46
+ };
47
+ /**
48
+ * What a workflow's channel publishes on every change, and what
49
+ * `useWorkflow` returns: its status without `args` and `result`, which can
50
+ * hold what a browser must not see.
51
+ */
52
+ export type WorkflowUpdate = {
53
+ id: string;
54
+ /** The workflow class's `static name`. */
55
+ name: string;
56
+ status: WorkflowRunStatus;
57
+ /** The key of the step it is on, or `null`. */
58
+ currentStep: string | null;
59
+ /** 0 to 1, as `step.progress` or a running `step.each` last set it; 1 once completed. */
60
+ progress: number;
61
+ /** Why it failed; for a cancelled one, why `onCancel` failed. */
62
+ error: string | null;
63
+ /** Every step recorded so far, in the order they were first reached. */
64
+ steps: WorkflowStepStatus[];
65
+ createdAt: number;
66
+ /** When it last changed: of two updates, the later one has the larger `updatedAt`. */
67
+ updatedAt: number;
68
+ };
69
+ /** Whether a workflow has ended: `completed`, `failed` or `cancelled`. */
70
+ export declare function workflowEnded(status: WorkflowRunStatus): boolean;
71
+ //# sourceMappingURL=wire.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"wire.d.ts","sourceRoot":"","sources":["../../../../services/queue/workflow/wire.ts"],"names":[],"mappings":"AAIA;;;;;;;;GAQG;AACH,MAAM,MAAM,iBAAiB,GACzB,SAAS,GACT,UAAU,GACV,SAAS,GACT,WAAW,GACX,QAAQ,GACR,YAAY,GACZ,WAAW,CAAC;AAEhB;;;;GAIG;AACH,MAAM,MAAM,aAAa,GACrB,SAAS,GACT,UAAU,GACV,WAAW,GACX,QAAQ,GACR,UAAU,GACV,SAAS,GACT,WAAW,GACX,WAAW,GACX,UAAU,GACV,WAAW,CAAC;AAEhB,gCAAgC;AAChC,MAAM,MAAM,YAAY,GAAG;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,wDAAwD;IACxD,IAAI,EAAE,M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ow/workflowContract.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAMlD;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,gBAAgB,CAC9B,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,MAAM,OAAO,CAAC;IAAE,MAAM,IAAI,WAAW,CAAC;IAAC,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC,CAAA;CAAE,CAAC,EAC3E,QAAQ,GAAE;IACR;;;;;OAKG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,oFAAoF;IACpF,UAAU,CAAC,EAAE,MAAM,CAAC;CACS,QA+4BhC"}
1
+ {"version":3,"file":"workflowContract.d.ts","sourceRoot":"","sources":["../../../../services/queue/workflow/workflowContract.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAOlD;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,gBAAgB,CAC9B,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,MAAM,OAAO,CAAC;IAAE,MAAM,IAAI,WAAW,CAAC;IAAC,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC,CAAA;CAAE,CAAC,EAC3E,QAAQ,GAAE;IACR;;;;;OAKG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,oFAAoF;IACpF,UAAU,CAAC,EAAE,MAAM,CAAC;CACS,QAk8BhC"}
@@ -1,4 +1,4 @@
1
1
  // @bun
2
- import{Pe as Y}from"../chunk-sqqh78tf.js";import{al as M}from"../chunk-yxtfg4wy.js";import{hm as P,jm as R}from"../chunk-aes0ecnp.js";import"../chunk-sba3s380.js";import{Dm as Q,Em as U,Fm as V,Gm as W}from"../chunk-hmtn7996.js";import"../chunk-yedb5vvg.js";class S{static token;async boot(){}onShutdown(x){}static inject(){if(!this.token)throw Error(`Service [${this.name}] does not declare a \`static token\`, so the container has no key to resolve it by.`);try{return R(this)}catch(x){throw Error(`Could not inject [${this.name}]. Services are constructed when the kernel boots, so `+"inject() only works from code that runs after that \u2014 a constructor default or a method "+`body, never module top level. Check that [${this.name}] is listed in \`services\` on your Kernel.`,{cause:x})}}static with(x){let f=new this;for(let[C,g]of Object.entries(x))if(g!==void 0)f[C]=g;return f}}import{readdir as z}from"fs/promises";import{join as B,parse as j}from"path";var H=[".ts",".tsx",".js",".mjs",".jsx"];function J(x={}){let f={};for(let[C,g]of Object.entries(x))f[C]=q(g);return new P(f)}async function L(x,f=new P){let C=[];try{C=await z(x)}catch(D){return f}let g=C.filter((D)=>{let{ext:v,name:F}=j(D);return H.includes(v)&&!F.startsWith(".")}).sort();for(let D of g){let{name:v}=j(D),F=await import(B(x,D));f.set(v,q(F))}return f}function q(x){if(x&&typeof x==="object"&&"default"in x)return x.default;return x}export{M as withDefaults,Q as sourceFiles,W as projectRoot,L as loadConfigFrom,V as discoverClasses,J as createConfigRepository,Y as ServiceProvider,S as Service,P as Repository,U as DiscoveryError};
2
+ import{Qe as Y}from"../chunk-6my6c6b1.js";import{al as M}from"../chunk-yxtfg4wy.js";import{hm as P,jm as R}from"../chunk-aes0ecnp.js";import"../chunk-sba3s380.js";import{Dm as Q,Em as U,Fm as V,Gm as W}from"../chunk-hmtn7996.js";import"../chunk-yedb5vvg.js";class S{static token;async boot(){}onShutdown(x){}static inject(){if(!this.token)throw Error(`Service [${this.name}] does not declare a \`static token\`, so the container has no key to resolve it by.`);try{return R(this)}catch(x){throw Error(`Could not inject [${this.name}]. Services are constructed when the kernel boots, so `+"inject() only works from code that runs after that \u2014 a constructor default or a method "+`body, never module top level. Check that [${this.name}] is listed in \`services\` on your Kernel.`,{cause:x})}}static with(x){let f=new this;for(let[C,g]of Object.entries(x))if(g!==void 0)f[C]=g;return f}}import{readdir as z}from"fs/promises";import{join as B,parse as j}from"path";var H=[".ts",".tsx",".js",".mjs",".jsx"];function J(x={}){let f={};for(let[C,g]of Object.entries(x))f[C]=q(g);return new P(f)}async function L(x,f=new P){let C=[];try{C=await z(x)}catch(D){return f}let g=C.filter((D)=>{let{ext:v,name:F}=j(D);return H.includes(v)&&!F.startsWith(".")}).sort();for(let D of g){let{name:v}=j(D),F=await import(B(x,D));f.set(v,q(F))}return f}function q(x){if(x&&typeof x==="object"&&"default"in x)return x.default;return x}export{M as withDefaults,Q as sourceFiles,W as projectRoot,L as loadConfigFrom,V as discoverClasses,J as createConfigRepository,Y as ServiceProvider,S as Service,P as Repository,U as DiscoveryError};
3
3
 
4
- //# debugId=6359932777B8C99064756E2164756E21
4
+ //# debugId=325CF77C44A8E78464756E2164756E21
@@ -6,6 +6,6 @@
6
6
  "import { readdir } from \"node:fs/promises\";\nimport { join, parse } from \"node:path\";\n\nimport { Repository } from \"./Repository\";\n\nconst CONFIG_EXTENSIONS = [\".ts\", \".tsx\", \".js\", \".mjs\", \".jsx\"];\n\n// Builds a Repository from an already-imported map of config modules. The map\n// key becomes the top-level config key, so `{ mail: mailModule }` is readable\n// as `config.get(\"mail.driver\")`. Each entry may be either the module namespace\n// (its `default` export is unwrapped) or the config object itself.\nexport function createConfigRepository(\n modules: Record<string, any> = {},\n): Repository {\n const items: Record<string, any> = {};\n\n for (const [key, mod] of Object.entries(modules)) {\n items[key] = unwrap(mod);\n }\n\n return new Repository(items);\n}\n\n// Reads every config module in an app's `app/config` directory into a\n// Repository. The file's basename is the top-level key: `app/config/mail.ts`\n// populates `mail.*`. A missing directory yields an empty Repository so apps\n// that declare no config still boot.\nexport async function loadConfigFrom(\n directory: string,\n repository = new Repository(),\n): Promise<Repository> {\n let entries: string[] = [];\n\n try {\n entries = await readdir(directory);\n } catch (err) {\n return repository;\n }\n\n const files = entries\n .filter((entry) => {\n const { ext, name } = parse(entry);\n return CONFIG_EXTENSIONS.includes(ext) && !name.startsWith(\".\");\n })\n .sort();\n\n for (const file of files) {\n const { name } = parse(file);\n const mod = await import(join(directory, file));\n repository.set(name, unwrap(mod));\n }\n\n return repository;\n}\n\nfunction unwrap(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AAO,CAAG,CAAC,EAGlC,OAAO,EAGT,SAAS,CAAM,CAAC,EAAU,CACxB,GAAI,GAAO,OAAO,IAAQ,UAAY,YAAa,EACjD,OAAO,EAAI,QAEb,OAAO",
9
- "debugId": "6359932777B8C99064756E2164756E21",
9
+ "debugId": "325CF77C44A8E78464756E2164756E21",
10
10
  "names": []
11
11
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gemi",
3
- "version": "0.218.0",
3
+ "version": "0.219.0",
4
4
  "private": false,
5
5
  "license": "MIT",
6
6
  "author": "Enes Tufekci <enes@gemijs.dev>",
@@ -1,19 +0,0 @@
1
- // @bun
2
- import{re as R}from"./chunk-7xe5vd4w.js";import{He as J,Me as M,ye as C}from"./chunk-ktee4gy4.js";import{jm as $}from"./chunk-aes0ecnp.js";import{Em as A,Fm as K,Gm as E}from"./chunk-hmtn7996.js";class j extends Error{code;constructor(q,z=1){super(q);this.code=z;this.name="CommandFailed"}}class S{static commandName="unset";static description="";static args=[];static options=[];run(q){}}function p(q){return q}function L(){return{commands:[],commandsDir:"app/commands"}}var I=Symbol.for("gemi.console.builder");function k(q){if(q.trim()==="")throw Error("A command name cannot be empty.");if(/[{}]/.test(q)||/\s/.test(q))throw Error(`Invalid command name ${JSON.stringify(q)}. gemi does not parse a signature string; the name is the whole of it. Declare arguments with .arg() and flags with .option():
3
-
4
- defineCommand("mail:send")
5
- .arg("user", { required: true })
6
- .option("queue", { type: "boolean" })
7
- .handle(async ({ args, options }) => { ... })`)}function c(q){k(q);let z=[],F=[],P="",X={[I]:q,describe(G){return P=G,X},arg(G,H={}){if(H.required&&H.default!==void 0)throw Error(`Argument "${G}" of command "${q}" is both required and has a default. An argument that is supplied when absent cannot also be `+"absent \u2014 drop one.");if(H.variadic&&H.default!==void 0)throw Error(`Argument "${G}" of command "${q}" is variadic and has a default. A variadic argument collects the remaining values and is an empty list when there are none, so the default could never `+"apply \u2014 drop it, or drop `variadic`.");let V=z.find((O)=>O.variadic);if(V)throw Error(`Argument "${G}" of command "${q}" is declared after the variadic argument "${V.name}", which collects everything that follows, so "${G}" could never receive a value. A variadic argument must be declared last.`);if(z.some((O)=>O.name===G))throw Error(`Command "${q}" declares the argument "${G}" twice.`);return z.push({...H,name:G}),X},option(G,H){if(F.some((Y)=>Y.name===G))throw Error(`Command "${q}" declares the option "${G}" twice.`);let V="alias"in H?H.alias:void 0,O=V===void 0?void 0:F.find((Y)=>("alias"in Y)&&Y.alias===V);if(O)throw Error(`Options "${O.name}" and "${G}" of command "${q}" both use the alias "-${V}".`);return F.push({...H,name:G}),X},handle(G){let H=q,V=P,O=class extends S{static commandName=H;static description=V;static args=[...z];static options=[...F];run(Y){return G(Y)}};return delete X[I],Object.defineProperty(O,"name",{value:H,configurable:!0}),O}};return X}function Q(q){return typeof q==="object"&&q!==null&&typeof q[I]==="string"}function o(q){return q}function T(){return{jobs:[],jobsDir:"app/cron"}}function i(q){return q}function B(){return{listeners:[],listenersDir:"app/listeners"}}class U{static name="unset";static event;queued=!1;maxAttempts=3;backoff=0;worker=!1}class W{static name="unset";run(q,...z){throw Error(`The workflow ${this.constructor.name} has no run method.`)}onCancel(q,...z){return}static start(...q){return $(J).workflows.start(this,q)}static signal(q,z,F){return $(J).workflows.signal(q,z,F)}static items(q,z,F={}){return $(J).workflows.items(q,z,F)}static find(q){return $(J).workflows.find(q)}static cancel(q){return $(J).workflows.cancel(q)}}import{existsSync as D}from"fs";import{dirname as x,isAbsolute as N,join as y}from"path";function Z(q){return N(q)?q:y(E(),q)}function _(q,z,F){if(D(q)||D(x(q)))return;console.warn(`No ${z} were discovered: neither ${q} nor the directory above it exists, so this process cannot see the application's source. If this is a deploy that ships only the build output, list the classes explicitly in app/config/${F}.ts so they travel with it.`)}async function Sq(q=C().jobsDir){let z=Z(q);_(z,"queue jobs","queue");let F=await K(z,M);return w(F),F}async function Zq(q=C().workflowsDir){let z=Z(q);_(z,"workflows","queue");let F=await K(z,W);for(let P of F){if(Object.getOwnPropertyDescriptor(P,"name")?.writable)continue;console.warn(`Workflow ${P.name} does not declare \`static name\`. A workflow is stored under its name, and a production build renames the class. Add: static name = "${P.name}";`)}return F}function w(q){for(let z of q){if(Object.getOwnPropertyDescriptor(z,"name")?.writable)continue;console.warn(`Queued job ${z.name} does not declare \`static name\`, so it is registered under its class name. A production build minifies the class that dispatches it and renames it, while discovery reads this `+"file from source and does not \u2014 so the dispatch would be dropped in "+`production and nowhere else. Add: static name = "${z.name}";`)}}async function _q(q=T().jobsDir){let z=Z(q);return _(z,"cron jobs","schedule"),await K(z,R)}async function Iq(q=L().commandsDir){let z=Z(q);_(z,"commands","command");let F=[],P=await K(z,S,[],(X,G)=>{if(Q(X))F.push(G)});return b(F),P}function b(q){if(q.length===0)return;let z=q.length===1?`${q[0]} exports a command builder that never called \`.handle()\``:`${q.length} files export a command builder that never called \`.handle()\`:
8
- ${q.join(`
9
- `)}`;throw new A(`${z}, so there is no command to run. \`.handle()\` is what turns `+`the chain into a command \u2014 finish it:
10
-
11
- `+` export default defineCommand("my-command")
12
- .handle(async ({ line }) => { line("hello") })`)}async function Uq(q=B().listenersDir){let z=Z(q);_(z,"event listeners","events");let F=await K(z,U);return f(F),v(F),u(F),F}function f(q){let z=q.filter((F)=>!F.event);if(z.length===0)return;throw new A(`${z.map((F)=>F.name).join(", ")} declare no \`static event\`, so there is no event name to register them under and their \`handle\` would never run. Every listener binds to exactly one event:
13
-
14
- static event = UserRegistered;
15
-
16
- If this is an abstract base its subclasses extend, move it out of the `+"listeners directory \u2014 the walk excludes gemi's `Listener` and "+"nothing else, so a base sitting beside its subclasses is registered and run like one of them.")}function v(q){for(let z of q){if(Object.getOwnPropertyDescriptor(z,"name")?.writable)continue;console.warn(`Event listener ${z.name} does not declare \`static name\`, so it is registered under its class name, which a production build renames. Nothing reads that name across a build boundary while the `+"listener is sync, which is why this is a warning \u2014 but adding "+`\`queued = true\` to it is refused at boot for the same reason, because the queue's key is that string. Add: static name = "${z.name}";`)}}function u(q){let z=new Set;for(let{event:F}of q){if(z.has(F))continue;if(Object.getOwnPropertyDescriptor(F,"name")?.writable)continue;z.add(F),console.warn(`Event ${F.name} does not declare \`static name\`, so it is dispatched under its class name. A production build minifies the code that dispatches it and renames the class, while discovery reads `+"the listener's copy from source and does not \u2014 so the dispatch would "+`reach no listener in production and nowhere else. Add: static name = "${F.name}";`)}}
17
- export{j as be,S as ce,p as de,L as ee,c as fe,o as ge,T as he,i as ie,B as je,U as ke,W as le,Sq as me,Zq as ne,_q as oe,Iq as pe,Uq as qe};
18
-
19
- //# debugId=F367297EE566131364756E2164756E21
@@ -1,5 +0,0 @@
1
- // @bun
2
- import{Oe as o}from"./chunk-7t13vyzg.js";import{Pe as i}from"./chunk-sqqh78tf.js";import{al as t}from"./chunk-yxtfg4wy.js";import{fm as r}from"./chunk-qstjm3cb.js";class n extends i{register(){this.app.singleton(r,()=>new r(t(o(),this.app.config.get("translation",{}))))}}
3
- export{n as pb};
4
-
5
- //# debugId=1BE1A2F1C892D74064756E2164756E21