@b3os/sdk 0.0.1 → 0.1.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 (204) hide show
  1. package/README.md +171 -42
  2. package/dist/cjs/core/bytes.d.ts +30 -0
  3. package/dist/cjs/core/bytes.js +115 -0
  4. package/dist/cjs/core/bytes.js.map +1 -0
  5. package/dist/cjs/core/client.d.ts +61 -3
  6. package/dist/cjs/core/client.js +211 -33
  7. package/dist/cjs/core/client.js.map +1 -1
  8. package/dist/cjs/core/errors.d.ts +16 -4
  9. package/dist/cjs/core/errors.js +9 -6
  10. package/dist/cjs/core/errors.js.map +1 -1
  11. package/dist/cjs/core/handle.d.ts +31 -0
  12. package/dist/cjs/core/handle.js +86 -0
  13. package/dist/cjs/core/handle.js.map +1 -0
  14. package/dist/cjs/core/index.d.ts +6 -4
  15. package/dist/cjs/core/index.js +8 -1
  16. package/dist/cjs/core/index.js.map +1 -1
  17. package/dist/cjs/core/login.d.ts +24 -0
  18. package/dist/cjs/core/login.js +93 -0
  19. package/dist/cjs/core/login.js.map +1 -0
  20. package/dist/cjs/core/namespace.d.ts +1 -1
  21. package/dist/cjs/core/namespace.js +1 -1
  22. package/dist/cjs/core/op.d.ts +11 -1
  23. package/dist/cjs/core/timing.d.ts +1 -1
  24. package/dist/cjs/core/timing.js +8 -1
  25. package/dist/cjs/core/timing.js.map +1 -1
  26. package/dist/cjs/core/transport.js +1 -1
  27. package/dist/cjs/core/transport.js.map +1 -1
  28. package/dist/cjs/core/util.d.ts +15 -3
  29. package/dist/cjs/core/util.js +54 -2
  30. package/dist/cjs/core/util.js.map +1 -1
  31. package/dist/cjs/core/ws.d.ts +4 -0
  32. package/dist/cjs/core/ws.js +7 -4
  33. package/dist/cjs/core/ws.js.map +1 -1
  34. package/dist/cjs/generated/client.d.ts +2 -2
  35. package/dist/cjs/generated/client.js +2 -2
  36. package/dist/cjs/generated/errors.d.ts +1 -1
  37. package/dist/cjs/generated/errors.js +30 -0
  38. package/dist/cjs/generated/errors.js.map +1 -1
  39. package/dist/cjs/generated/jobs.js +1 -1
  40. package/dist/cjs/generated/ns/actions.d.ts +48 -6
  41. package/dist/cjs/generated/ns/actions.js +59 -6
  42. package/dist/cjs/generated/ns/actions.js.map +1 -1
  43. package/dist/cjs/generated/ns/infer.d.ts +185 -54
  44. package/dist/cjs/generated/ns/infer.js +28 -74
  45. package/dist/cjs/generated/ns/infer.js.map +1 -1
  46. package/dist/cjs/generated/ns/keys.d.ts +12 -0
  47. package/dist/cjs/generated/ns/keys.js +22 -0
  48. package/dist/cjs/generated/ns/keys.js.map +1 -1
  49. package/dist/cjs/generated/ns/render.d.ts +95 -6
  50. package/dist/cjs/generated/ns/render.js +124 -7
  51. package/dist/cjs/generated/ns/render.js.map +1 -1
  52. package/dist/cjs/generated/ns/requests.d.ts +3 -1
  53. package/dist/cjs/generated/ns/requests.js +3 -1
  54. package/dist/cjs/generated/ns/requests.js.map +1 -1
  55. package/dist/cjs/generated/ns/routines.d.ts +131 -9
  56. package/dist/cjs/generated/ns/routines.js +186 -9
  57. package/dist/cjs/generated/ns/routines.js.map +1 -1
  58. package/dist/cjs/generated/ns/sandboxes.d.ts +298 -31
  59. package/dist/cjs/generated/ns/sandboxes.js +368 -29
  60. package/dist/cjs/generated/ns/sandboxes.js.map +1 -1
  61. package/dist/cjs/generated/ns/vision.d.ts +133 -14
  62. package/dist/cjs/generated/ns/vision.js +158 -12
  63. package/dist/cjs/generated/ns/vision.js.map +1 -1
  64. package/dist/cjs/generated/ns/webhooks.d.ts +8 -5
  65. package/dist/cjs/generated/ns/webhooks.js +8 -5
  66. package/dist/cjs/generated/ns/webhooks.js.map +1 -1
  67. package/dist/cjs/generated/types.d.ts +1956 -301
  68. package/dist/cjs/helpers/agents.d.ts +95 -0
  69. package/dist/cjs/helpers/agents.js +205 -0
  70. package/dist/cjs/helpers/agents.js.map +1 -0
  71. package/dist/cjs/helpers/render.d.ts +15 -0
  72. package/dist/cjs/helpers/render.js +74 -0
  73. package/dist/cjs/helpers/render.js.map +1 -0
  74. package/dist/cjs/helpers/routines.d.ts +61 -0
  75. package/dist/cjs/helpers/routines.js +234 -0
  76. package/dist/cjs/helpers/routines.js.map +1 -0
  77. package/dist/cjs/helpers/sandboxes.d.ts +237 -0
  78. package/dist/cjs/helpers/sandboxes.js +608 -0
  79. package/dist/cjs/helpers/sandboxes.js.map +1 -0
  80. package/dist/cjs/index.d.ts +4 -1
  81. package/dist/cjs/index.js +8 -5
  82. package/dist/cjs/index.js.map +1 -1
  83. package/dist/cjs/routines.d.ts +1 -0
  84. package/dist/cjs/routines.js +21 -0
  85. package/dist/cjs/routines.js.map +1 -0
  86. package/dist/cjs/webhooks.js.map +1 -1
  87. package/dist/esm/core/bytes.d.ts +30 -0
  88. package/dist/esm/core/bytes.js +111 -0
  89. package/dist/esm/core/bytes.js.map +1 -0
  90. package/dist/esm/core/client.d.ts +61 -3
  91. package/dist/esm/core/client.js +208 -31
  92. package/dist/esm/core/client.js.map +1 -1
  93. package/dist/esm/core/errors.d.ts +16 -4
  94. package/dist/esm/core/errors.js +9 -6
  95. package/dist/esm/core/errors.js.map +1 -1
  96. package/dist/esm/core/handle.d.ts +31 -0
  97. package/dist/esm/core/handle.js +82 -0
  98. package/dist/esm/core/handle.js.map +1 -0
  99. package/dist/esm/core/index.d.ts +6 -4
  100. package/dist/esm/core/index.js +4 -2
  101. package/dist/esm/core/index.js.map +1 -1
  102. package/dist/esm/core/login.d.ts +24 -0
  103. package/dist/esm/core/login.js +85 -0
  104. package/dist/esm/core/login.js.map +1 -0
  105. package/dist/esm/core/namespace.d.ts +1 -1
  106. package/dist/esm/core/namespace.js +1 -1
  107. package/dist/esm/core/op.d.ts +11 -1
  108. package/dist/esm/core/timing.d.ts +1 -1
  109. package/dist/esm/core/timing.js +8 -1
  110. package/dist/esm/core/timing.js.map +1 -1
  111. package/dist/esm/core/transport.js +1 -1
  112. package/dist/esm/core/transport.js.map +1 -1
  113. package/dist/esm/core/util.d.ts +15 -3
  114. package/dist/esm/core/util.js +48 -1
  115. package/dist/esm/core/util.js.map +1 -1
  116. package/dist/esm/core/ws.d.ts +4 -0
  117. package/dist/esm/core/ws.js +7 -4
  118. package/dist/esm/core/ws.js.map +1 -1
  119. package/dist/esm/generated/client.d.ts +2 -2
  120. package/dist/esm/generated/client.js +2 -2
  121. package/dist/esm/generated/errors.d.ts +1 -1
  122. package/dist/esm/generated/errors.js +30 -0
  123. package/dist/esm/generated/errors.js.map +1 -1
  124. package/dist/esm/generated/jobs.js +1 -1
  125. package/dist/esm/generated/ns/actions.d.ts +48 -6
  126. package/dist/esm/generated/ns/actions.js +59 -6
  127. package/dist/esm/generated/ns/actions.js.map +1 -1
  128. package/dist/esm/generated/ns/infer.d.ts +185 -54
  129. package/dist/esm/generated/ns/infer.js +28 -74
  130. package/dist/esm/generated/ns/infer.js.map +1 -1
  131. package/dist/esm/generated/ns/keys.d.ts +12 -0
  132. package/dist/esm/generated/ns/keys.js +22 -0
  133. package/dist/esm/generated/ns/keys.js.map +1 -1
  134. package/dist/esm/generated/ns/render.d.ts +95 -6
  135. package/dist/esm/generated/ns/render.js +124 -7
  136. package/dist/esm/generated/ns/render.js.map +1 -1
  137. package/dist/esm/generated/ns/requests.d.ts +3 -1
  138. package/dist/esm/generated/ns/requests.js +3 -1
  139. package/dist/esm/generated/ns/requests.js.map +1 -1
  140. package/dist/esm/generated/ns/routines.d.ts +131 -9
  141. package/dist/esm/generated/ns/routines.js +186 -9
  142. package/dist/esm/generated/ns/routines.js.map +1 -1
  143. package/dist/esm/generated/ns/sandboxes.d.ts +298 -31
  144. package/dist/esm/generated/ns/sandboxes.js +368 -29
  145. package/dist/esm/generated/ns/sandboxes.js.map +1 -1
  146. package/dist/esm/generated/ns/vision.d.ts +133 -14
  147. package/dist/esm/generated/ns/vision.js +158 -12
  148. package/dist/esm/generated/ns/vision.js.map +1 -1
  149. package/dist/esm/generated/ns/webhooks.d.ts +8 -5
  150. package/dist/esm/generated/ns/webhooks.js +8 -5
  151. package/dist/esm/generated/ns/webhooks.js.map +1 -1
  152. package/dist/esm/generated/types.d.ts +1956 -301
  153. package/dist/esm/helpers/agents.d.ts +95 -0
  154. package/dist/esm/helpers/agents.js +199 -0
  155. package/dist/esm/helpers/agents.js.map +1 -0
  156. package/dist/esm/helpers/render.d.ts +15 -0
  157. package/dist/esm/helpers/render.js +70 -0
  158. package/dist/esm/helpers/render.js.map +1 -0
  159. package/dist/esm/helpers/routines.d.ts +61 -0
  160. package/dist/esm/helpers/routines.js +226 -0
  161. package/dist/esm/helpers/routines.js.map +1 -0
  162. package/dist/esm/helpers/sandboxes.d.ts +237 -0
  163. package/dist/esm/helpers/sandboxes.js +600 -0
  164. package/dist/esm/helpers/sandboxes.js.map +1 -0
  165. package/dist/esm/index.d.ts +4 -1
  166. package/dist/esm/index.js +6 -5
  167. package/dist/esm/index.js.map +1 -1
  168. package/dist/esm/routines.d.ts +1 -0
  169. package/dist/esm/routines.js +5 -0
  170. package/dist/esm/routines.js.map +1 -0
  171. package/dist/esm/webhooks.js.map +1 -1
  172. package/package.json +18 -7
  173. package/src/core/bytes.ts +112 -0
  174. package/src/core/client.ts +253 -33
  175. package/src/core/errors.ts +27 -10
  176. package/src/core/handle.ts +97 -0
  177. package/src/core/index.ts +7 -2
  178. package/src/core/login.ts +98 -0
  179. package/src/core/namespace.ts +1 -1
  180. package/src/core/op.ts +11 -1
  181. package/src/core/timing.ts +7 -2
  182. package/src/core/transport.ts +1 -1
  183. package/src/core/util.ts +53 -3
  184. package/src/core/ws.ts +11 -4
  185. package/src/generated/client.ts +2 -2
  186. package/src/generated/errors.ts +60 -0
  187. package/src/generated/jobs.ts +1 -1
  188. package/src/generated/ns/actions.ts +69 -6
  189. package/src/generated/ns/infer.ts +229 -61
  190. package/src/generated/ns/keys.ts +23 -0
  191. package/src/generated/ns/render.ts +152 -7
  192. package/src/generated/ns/requests.ts +3 -1
  193. package/src/generated/ns/routines.ts +205 -9
  194. package/src/generated/ns/sandboxes.ts +434 -34
  195. package/src/generated/ns/vision.ts +168 -14
  196. package/src/generated/ns/webhooks.ts +8 -5
  197. package/src/generated/types.ts +2211 -422
  198. package/src/helpers/agents.ts +300 -0
  199. package/src/helpers/render.ts +91 -0
  200. package/src/helpers/routines.ts +278 -0
  201. package/src/helpers/sandboxes.ts +788 -0
  202. package/src/index.ts +29 -5
  203. package/src/routines.ts +5 -0
  204. package/src/webhooks.ts +5 -1
@@ -8,18 +8,23 @@ import type * as T from "../types.ts";
8
8
  export declare const routinesOps: {
9
9
  readonly listRoutines: Op;
10
10
  readonly createRoutine: Op;
11
+ readonly sendEvent: Op;
11
12
  readonly importRoutine: Op;
12
13
  readonly getRun: Op;
13
14
  readonly cancelRun: Op;
14
15
  readonly runEvents: Op;
16
+ readonly replayRun: Op;
15
17
  readonly signalRun: Op;
16
18
  readonly listRunSteps: Op;
17
19
  readonly validateRoutine: Op;
20
+ readonly getWait: Op;
18
21
  readonly deleteRoutine: Op;
19
22
  readonly getRoutine: Op;
20
23
  readonly updateRoutine: Op;
21
24
  readonly publishRoutine: Op;
25
+ readonly listHookDeliveries: Op;
22
26
  readonly rotateHookSecret: Op;
27
+ readonly testHook: Op;
23
28
  readonly rollbackRoutine: Op;
24
29
  readonly listRuns: Op;
25
30
  readonly createRun: Op;
@@ -43,11 +48,28 @@ export declare class RoutinesAPI extends Namespace {
43
48
  * (`Content-Type: application/yaml`). Fails with `routine_invalid` (pointers into the definition) when it does
44
49
  * not compile, and with `routine_name_taken` when the name exists; `PUT /v1/routines/{routine}` creates or
45
50
  * updates by name instead. Webhook triggers verified with the `b3os` scheme get a signing secret that is
46
- * returned in this response only.
51
+ * returned in this response only. A webhook trigger that names a vault connection (`verify.secret`,
52
+ * `challenge.token_connection`) needs `vault:run` on top of `routines:write`: without it the request answers
53
+ * 403 `forbidden` with `required_scope: vault:run` and nothing is read from the vault.
47
54
  *
48
55
  * `POST /v1/routines` · scope `routines:write` · served by the node
49
56
  */
50
57
  createRoutine(body: T.RoutineDefinition | string, options?: RequestOptions): APIPromise<T.Routine>;
58
+ /**
59
+ * Send an event to waiting runs
60
+ *
61
+ * Resumes every step of your project's active runs that waits for this event (`wait: {event, match}`,
62
+ * routine.schema.json) and whose `match` values are all in `data`, without knowing their run IDs: an order
63
+ * system sends `order.paid` with the order's ID, and the run waiting for that order continues. Each step
64
+ * completes with `{event, data, id, received_at, timed_out: false}`, journaled with its run like a signal.
65
+ * Events are not buffered: a step that starts waiting after the event does not see it, and an event no step
66
+ * waits for answers `delivered: 0`. Runs of other projects never see your events. Each step journals the
67
+ * event, so an event's JSON plus 256 bytes a step may add up to at most 4 MiB across the steps it resumes; past
68
+ * that it is refused whole with `event_fan_out_too_large` and no step continues.
69
+ *
70
+ * `POST /v1/routines/events` · scope `routines:run` · served by the node
71
+ */
72
+ sendEvent(body: T.RoutineEventRequest, options?: RequestOptions): APIPromise<T.RoutineEvent>;
51
73
  /**
52
74
  * Convert a B3OS workflow
53
75
  *
@@ -61,7 +83,7 @@ export declare class RoutinesAPI extends Namespace {
61
83
  /**
62
84
  * Get a run
63
85
  *
64
- * Returns the run with its status, input, result and the state of every top-level step (map items are summarized; list them with `…/steps`).
86
+ * Returns the run with its status, input, result and the state of every top-level step (map items are summarized; list them with `…/steps`). An `ephemeral` run read after it ended returns its summary: `steps` is empty and `steps_kept` is `false`, since its step history was not kept.
65
87
  *
66
88
  * `GET /v1/routines/runs/{run_id}` · scope `routines:read` · served by the node
67
89
  */
@@ -69,7 +91,7 @@ export declare class RoutinesAPI extends Namespace {
69
91
  /**
70
92
  * Cancel a run
71
93
  *
72
- * Cancels the run. In-flight steps are told to stop; steps that already had effects are not undone. The run ends `canceled` with `job_canceled`.
94
+ * Cancels the run. In-flight steps are told to stop (their in-process calls end; a buffered sandbox command is killed with its connection), child runs of `routine/` steps are canceled too, and steps that already had effects are not undone. The run ends `canceled` with `job_canceled`.
73
95
  *
74
96
  * `POST /v1/routines/runs/{run_id}/cancel` · scope `routines:run` · served by the node
75
97
  */
@@ -79,17 +101,47 @@ export declare class RoutinesAPI extends Namespace {
79
101
  *
80
102
  * Server-sent events for the run: lifecycle events, `step.*` events as steps start, retry, wait and finish,
81
103
  * and `run.log` from `core/log` steps. Ends after the terminal event; reconnect with `Last-Event-ID` to resume
82
- * (events are kept with the run history).
104
+ * (events are kept with the run history). An `ephemeral` run that ended kept no events but its terminal one:
105
+ * the stream sends that event alone, with the `seq` it had and the run's summary as its `job`.
83
106
  *
84
107
  * `GET /v1/routines/runs/{run_id}/events` · scope `routines:read` · served by the node
85
108
  */
86
109
  runEvents(runId: string, options?: StreamOptions): EventStream<T.RunEvent>;
110
+ /**
111
+ * Replay a run
112
+ *
113
+ * Starts a new run of a finished run's routine that reuses what the source run already did. Each top-level
114
+ * step that succeeded in the source run is copied: it succeeds at once with its recorded outputs, does not
115
+ * run its callable again (no request, no sandbox, no charge) and shows `replayed: true`. Everything else runs:
116
+ * `from_step` and every step downstream of it, the steps that failed, were skipped or were canceled, steps
117
+ * another version adds or changes (compared with the source version's step of the same id: the step as
118
+ * written, the pack and routine versions it pinned at publish, the steps it depends on, and the `vars` and
119
+ * `env` it reads), steps that read an `input` that differs from the source's (directly or through `env`),
120
+ * steps that wait for a signal unless the version and input are the source's, and every step downstream of
121
+ * one of those. `trigger` and `run` are not compared. Without `from_step`, a replay of a failed run picks up
122
+ * where it failed.
123
+ *
124
+ * The new run uses the source run's version and input unless `version` or `input` is given, so a fix
125
+ * published as a new version can be replayed against the run that failed. Its trigger is
126
+ * `{type: replay, parent_run_id, from_step}`; steps that run again read what the source got from its
127
+ * trigger through the input. Copied steps do not count toward `routines.steps.daily`. The copied outputs
128
+ * and the input together are at most `routines.max_step_output_bytes` (1 MiB by default), or the replay
129
+ * answers 422 `replay_too_large`. Answers like `routinesCreateRun`: `?wait=`, `Accept: text/event-stream`,
130
+ * `webhook` and `Idempotency-Key` work the same way. An `ephemeral` source run kept no step outputs to copy:
131
+ * 410 `run_steps_not_kept` (start a new run with its input instead).
132
+ *
133
+ * `POST /v1/routines/runs/{run_id}/replay` · scope `routines:run` · served by the node
134
+ */
135
+ replayRun(runId: string, body?: T.RunReplayRequest, options?: RequestOptions): JobPromise<T.RoutineRun, T.RunEvent>;
87
136
  /**
88
137
  * Send a signal to a run
89
138
  *
90
139
  * Delivers a named signal to the run. A `wait` step waiting for it completes with `payload` as its outputs; a
91
140
  * signal sent before its step starts waiting is buffered (up to 16 per name) and consumed in order. Fails with
92
- * `run_not_waiting` when the run already finished or the buffer for this name is full.
141
+ * `run_not_waiting` when the run already finished or the buffer for this name is full. The payload counts
142
+ * against the organization's run data on the node (`max_org_run_bytes`): one that does not fit answers 429
143
+ * `concurrency_limited` (503 `capacity_unavailable` at the node's cap), except a payload of up to 1 KiB that
144
+ * ends a wait, so a run can always be let go.
93
145
  *
94
146
  * `POST /v1/routines/runs/{run_id}/signal` · scope `routines:run` · served by the node
95
147
  */
@@ -97,7 +149,7 @@ export declare class RoutinesAPI extends Namespace {
97
149
  /**
98
150
  * List a run's steps
99
151
  *
100
- * Lists every step execution of the run in start order, including each map item (`item_index`) and retries (`attempt`), with outputs and errors.
152
+ * Lists every step execution of the run in start order, including each map item (`item_index`) and retries (`attempt`), with outputs and errors. An `ephemeral` run that ended kept none: 410 `run_steps_not_kept`.
101
153
  *
102
154
  * `GET /v1/routines/runs/{run_id}/steps` · scope `routines:read` · served by the node
103
155
  */
@@ -112,6 +164,24 @@ export declare class RoutinesAPI extends Namespace {
112
164
  * `POST /v1/routines/validate` · scope `routines:write` · served by the node
113
165
  */
114
166
  validateRoutine(body: T.RoutineDefinition, options?: RequestOptions): APIPromise<T.RoutineValidation>;
167
+ /**
168
+ * Read a wait link
169
+ *
170
+ * The link of a `wait` step with `token: true` (`run.wait_urls.<step id>`, routine.schema.json). Send it
171
+ * to the person who should answer: no API key and no login are needed, the link is the credential. A
172
+ * browser (`Accept: text/html`) gets a page with the step's `prompt` (title, body, image, link) and Approve
173
+ * and Reject buttons; `?decision=approve` or `?decision=reject` preselects one, for buttons in a Slack or
174
+ * email message (the person still confirms, so link previews and mail scanners that fetch the URL answer
175
+ * nothing). Programs get the `RoutineWait` JSON. The link names one run and step of one project and is
176
+ * signed by the node; it works once, while the step waits, and for at most 7 days after the step started
177
+ * waiting. The run's end, the step's own deadline or a signal sent through the API ends it too. Any link
178
+ * that is malformed, signed for another run, step or project, or whose run is no longer kept answers the
179
+ * same 404 `wait_link_invalid`. Answers carry `Cache-Control: no-store` and `Referrer-Policy:
180
+ * no-referrer`, and the link never appears in your organization's request log.
181
+ *
182
+ * `GET /v1/routines/waits/{token}` · scope `public` · served by the node
183
+ */
184
+ getWait(token: string, params?: T.RoutinesGetWaitParams, options?: RequestOptions): APIPromise<T.RoutineWait>;
115
185
  /**
116
186
  * Delete a routine
117
187
  *
@@ -149,11 +219,33 @@ export declare class RoutinesAPI extends Namespace {
149
219
  * identity and its scopes are snapshotted. Hook IDs stay the same across versions for the same trigger ID.
150
220
  * Pack triggers (`type: action`) are subscriptions: publishing creates or updates one trigger subscription
151
221
  * (`tsub_`, read-only at `GET /v1/actions/subscriptions`) per action trigger, and removes the subscriptions of
152
- * action triggers the new version no longer has.
222
+ * action triggers the new version no longer has. When the actions product cannot take the subscriptions now
223
+ * (it is not running, or answers 5xx or 429), the version is still published and the routine carries a
224
+ * `product_unavailable` entry in `warnings` per action trigger until a retry subscribes it; when it refuses
225
+ * a trigger (an unknown trigger, a `with` that fails its config schema, a missing connection), the publish
226
+ * fails with `routine_invalid` and an `errors[]` item at that trigger. A webhook trigger that names a vault
227
+ * connection (`verify.secret`, `challenge.token_connection`) needs `vault:run` on top of `routines:write`
228
+ * (403 `forbidden`, `required_scope: vault:run`), as a connection in a pack trigger does.
153
229
  *
154
230
  * `PUT /v1/routines/{routine}` · scope `routines:write` · served by the node
155
231
  */
156
232
  publishRoutine(routine: string, body: T.RoutineDefinition | string, options?: RequestOptions): APIPromise<T.Routine>;
233
+ /**
234
+ * List a hook's deliveries
235
+ *
236
+ * The hook's delivery log, newest first: every request that reached a known hook in the last 7 days, the
237
+ * GET verifications included, whatever the answer (a run started, a duplicate, `if` false, a handshake, a
238
+ * 401 with its `reason`, a 422, a 503). An entry is listed within a second of the answer. Each entry has the
239
+ * status, the error `code`, `reason` and `detail`, the run, the size of the body and a fixed set of headers
240
+ * (`content-type`, `content-length`, `user-agent`, `idempotency-key`, `traceparent`, `x-github-event`,
241
+ * `x-github-delivery`, `x-github-hook-id`, `x-slack-retry-num`, `x-slack-retry-reason`, `webhook-id`,
242
+ * `webhook-timestamp`); no body, signature, cookie, credential or infrastructure header is stored. At most
243
+ * the newest 10,000 entries per hook are kept, and at most 1,200 POST and 60 GET requests per hook and
244
+ * minute are written: requests past that are answered as usual but not listed.
245
+ *
246
+ * `GET /v1/routines/{routine}/hooks/{hook_id}/deliveries` · scope `routines:read` · served by the node
247
+ */
248
+ listHookDeliveries(routine: string, hookId: string, params?: T.RoutinesListHookDeliveriesParams, options?: RequestOptions): ListPromise<T.HookDeliveryEntryList, T.HookDeliveryEntry>;
157
249
  /**
158
250
  * Rotate a hook's signing secret
159
251
  *
@@ -163,13 +255,27 @@ export declare class RoutinesAPI extends Namespace {
163
255
  * `POST /v1/routines/{routine}/hooks/{hook_id}/rotate` · scope `routines:write` · served by the node
164
256
  */
165
257
  rotateHookSecret(routine: string, hookId: string, body?: T.HookRotateRequest, options?: RequestOptions): APIPromise<T.HookSecret>;
258
+ /**
259
+ * Send a test delivery
260
+ *
261
+ * Signs `body` (default `{"test": true, "sent_at": "<now>"}`) with the hook's current secret and delivers it
262
+ * through the hook ingress the way a sender would, with a fresh `Idempotency-Key`. It is verified, matched
263
+ * against `if` and starts a run like any delivery, and its log entry (`source: test`) is the answer and is
264
+ * listed with the hook's deliveries. Only hooks verified with the `b3os` scheme: B3OS does not hold another
265
+ * provider's signing secret in the clear, so send a test from that provider's settings instead.
266
+ *
267
+ * `POST /v1/routines/{routine}/hooks/{hook_id}/test` · scope `routines:write` · served by the node
268
+ */
269
+ testHook(routine: string, hookId: string, body?: T.HookTestRequest, options?: RequestOptions): APIPromise<T.HookDeliveryEntry>;
166
270
  /**
167
271
  * Roll back to a version
168
272
  *
169
273
  * Makes an earlier version active again (triggers switch atomically). Running runs keep their version. The
170
274
  * rollback is recorded as the routine's update; no new version is created. Trigger subscriptions follow the
171
275
  * version: those of action triggers the earlier version does not have are removed, and the others are updated
172
- * to its definition.
276
+ * to its definition (pending, with `warnings`, when the actions product cannot take them now, as on publish).
277
+ * An earlier version whose webhook triggers name vault connections needs `vault:run` of the caller and of the
278
+ * key that published it; either missing answers 403 `forbidden` with `required_scope: vault:run`.
173
279
  *
174
280
  * `POST /v1/routines/{routine}/rollback` · scope `routines:write` · served by the node
175
281
  */
@@ -177,7 +283,7 @@ export declare class RoutinesAPI extends Namespace {
177
283
  /**
178
284
  * List a routine's runs
179
285
  *
180
- * Lists runs of the routine, newest first. Run history is kept for 30 days.
286
+ * Lists runs of the routine, newest first. Run history is kept for 30 days (for an `ephemeral` run, its summary only: `steps_kept: false`).
181
287
  *
182
288
  * `GET /v1/routines/{routine}/runs` · scope `routines:read` · served by the node
183
289
  */
@@ -190,6 +296,22 @@ export declare class RoutinesAPI extends Namespace {
190
296
  * the journal), `Accept: text/event-stream` to follow steps live, or `webhook`. Effect steps without a product
191
297
  * meter of their own bill `routines.effect_step`; product steps bill their product's unit.
192
298
  *
299
+ * Once an `ephemeral` run ends, only its summary is stored: status, timing, `input`, `result`, `error` and its
300
+ * IDs, without its step history. The `?wait=` answer, the event stream and the webhook carry its steps as it
301
+ * ends; every read after that returns the summary with `steps_kept: false` (`routinesGetRun`).
302
+ *
303
+ * Organizations share a node's run shards fairly: the next turn goes to the organization that used the least
304
+ * so far, and each organization's I/O steps run within per-organization, per-routine and per-key budgets.
305
+ * The data an organization's runs hold on the node is capped (`max_org_run_bytes`): a run's input and its
306
+ * journal records count from its start, so a run that does not fit answers 429 `concurrency_limited` with
307
+ * `Retry-After` (503 `capacity_unavailable` when the node's own cap is reached), and a step whose data does
308
+ * not fit fails with `limit_exceeded`; new runs also answer 429 while the run store is a whole cap behind on
309
+ * the organization's finished runs. If the node restarts while a step runs, the step runs again as a new
310
+ * attempt (its `attempt` grows, with the same `Idempotency-Key` to the destination); a result of the earlier
311
+ * attempt that arrives late is discarded. With `defaults.pause_sandboxes`, a run that execs in an existing
312
+ * sandbox and then waits a long time pauses that sandbox until its next exec there (or until the run ends),
313
+ * unless another run on the node execs in it too.
314
+ *
193
315
  * `POST /v1/routines/{routine}/runs` · scope `routines:run` · served by the node
194
316
  */
195
317
  createRun(routine: string, body?: T.RunCreateRequest, options?: RequestOptions): JobPromise<T.RoutineRun, T.RunEvent>;
@@ -17,6 +17,14 @@ const createRoutineOp = {
17
17
  timeoutMs: 15000,
18
18
  scope: "routines:write",
19
19
  };
20
+ const sendEventOp = {
21
+ id: "routinesSendEvent",
22
+ method: "POST",
23
+ path: "/v1/routines/events",
24
+ body: "json",
25
+ timeoutMs: 10000,
26
+ scope: "routines:run",
27
+ };
20
28
  const importRoutineOp = {
21
29
  id: "routinesImportRoutine",
22
30
  method: "POST",
@@ -76,6 +84,14 @@ const validateRoutineOp = {
76
84
  timeoutMs: 15000,
77
85
  scope: "routines:write",
78
86
  };
87
+ const getWaitOp = {
88
+ id: "routinesGetWait",
89
+ method: "GET",
90
+ path: "/v1/routines/waits/{token}",
91
+ params: ["token"],
92
+ timeoutMs: 10000,
93
+ scope: "public",
94
+ };
79
95
  const deleteRoutineOp = {
80
96
  id: "routinesDeleteRoutine",
81
97
  method: "DELETE",
@@ -111,6 +127,14 @@ const publishRoutineOp = {
111
127
  timeoutMs: 15000,
112
128
  scope: "routines:write",
113
129
  };
130
+ const listHookDeliveriesOp = {
131
+ id: "routinesListHookDeliveries",
132
+ method: "GET",
133
+ path: "/v1/routines/{routine}/hooks/{hook_id}/deliveries",
134
+ params: ["routine", "hook_id"],
135
+ timeoutMs: 10000,
136
+ scope: "routines:read",
137
+ };
114
138
  const rotateHookSecretOp = {
115
139
  id: "routinesRotateHookSecret",
116
140
  method: "POST",
@@ -120,6 +144,15 @@ const rotateHookSecretOp = {
120
144
  timeoutMs: 10000,
121
145
  scope: "routines:write",
122
146
  };
147
+ const testHookOp = {
148
+ id: "routinesTestHook",
149
+ method: "POST",
150
+ path: "/v1/routines/{routine}/hooks/{hook_id}/test",
151
+ params: ["routine", "hook_id"],
152
+ body: "json",
153
+ timeoutMs: 10000,
154
+ scope: "routines:write",
155
+ };
123
156
  const rollbackRoutineOp = {
124
157
  id: "routinesRollbackRoutine",
125
158
  method: "POST",
@@ -153,6 +186,18 @@ const getVersionOp = {
153
186
  timeoutMs: 10000,
154
187
  scope: "routines:read",
155
188
  };
189
+ const replayRunOp = {
190
+ id: "routinesReplayRun",
191
+ method: "POST",
192
+ path: "/v1/routines/runs/{run_id}/replay",
193
+ params: ["run_id"],
194
+ body: "json",
195
+ idem: true,
196
+ stream: "sse",
197
+ timeoutMs: 3600000,
198
+ scope: "routines:run",
199
+ job: { get: getRunOp, events: runEventsOp, cancel: cancelRunOp },
200
+ };
156
201
  const createRunOp = {
157
202
  id: "routinesCreateRun",
158
203
  method: "POST",
@@ -169,18 +214,23 @@ const createRunOp = {
169
214
  export const routinesOps = {
170
215
  listRoutines: listRoutinesOp,
171
216
  createRoutine: createRoutineOp,
217
+ sendEvent: sendEventOp,
172
218
  importRoutine: importRoutineOp,
173
219
  getRun: getRunOp,
174
220
  cancelRun: cancelRunOp,
175
221
  runEvents: runEventsOp,
222
+ replayRun: replayRunOp,
176
223
  signalRun: signalRunOp,
177
224
  listRunSteps: listRunStepsOp,
178
225
  validateRoutine: validateRoutineOp,
226
+ getWait: getWaitOp,
179
227
  deleteRoutine: deleteRoutineOp,
180
228
  getRoutine: getRoutineOp,
181
229
  updateRoutine: updateRoutineOp,
182
230
  publishRoutine: publishRoutineOp,
231
+ listHookDeliveries: listHookDeliveriesOp,
183
232
  rotateHookSecret: rotateHookSecretOp,
233
+ testHook: testHookOp,
184
234
  rollbackRoutine: rollbackRoutineOp,
185
235
  listRuns: listRunsOp,
186
236
  createRun: createRunOp,
@@ -206,13 +256,32 @@ export class RoutinesAPI extends Namespace {
206
256
  * (`Content-Type: application/yaml`). Fails with `routine_invalid` (pointers into the definition) when it does
207
257
  * not compile, and with `routine_name_taken` when the name exists; `PUT /v1/routines/{routine}` creates or
208
258
  * updates by name instead. Webhook triggers verified with the `b3os` scheme get a signing secret that is
209
- * returned in this response only.
259
+ * returned in this response only. A webhook trigger that names a vault connection (`verify.secret`,
260
+ * `challenge.token_connection`) needs `vault:run` on top of `routines:write`: without it the request answers
261
+ * 403 `forbidden` with `required_scope: vault:run` and nothing is read from the vault.
210
262
  *
211
263
  * `POST /v1/routines` · scope `routines:write` · served by the node
212
264
  */
213
265
  createRoutine(body, options) {
214
266
  return this._client._call(createRoutineOp, { body, bodyType: typeof body === "string" ? "yaml" : "json" }, options);
215
267
  }
268
+ /**
269
+ * Send an event to waiting runs
270
+ *
271
+ * Resumes every step of your project's active runs that waits for this event (`wait: {event, match}`,
272
+ * routine.schema.json) and whose `match` values are all in `data`, without knowing their run IDs: an order
273
+ * system sends `order.paid` with the order's ID, and the run waiting for that order continues. Each step
274
+ * completes with `{event, data, id, received_at, timed_out: false}`, journaled with its run like a signal.
275
+ * Events are not buffered: a step that starts waiting after the event does not see it, and an event no step
276
+ * waits for answers `delivered: 0`. Runs of other projects never see your events. Each step journals the
277
+ * event, so an event's JSON plus 256 bytes a step may add up to at most 4 MiB across the steps it resumes; past
278
+ * that it is refused whole with `event_fan_out_too_large` and no step continues.
279
+ *
280
+ * `POST /v1/routines/events` · scope `routines:run` · served by the node
281
+ */
282
+ sendEvent(body, options) {
283
+ return this._client._call(sendEventOp, { body }, options);
284
+ }
216
285
  /**
217
286
  * Convert a B3OS workflow
218
287
  *
@@ -228,7 +297,7 @@ export class RoutinesAPI extends Namespace {
228
297
  /**
229
298
  * Get a run
230
299
  *
231
- * Returns the run with its status, input, result and the state of every top-level step (map items are summarized; list them with `…/steps`).
300
+ * Returns the run with its status, input, result and the state of every top-level step (map items are summarized; list them with `…/steps`). An `ephemeral` run read after it ended returns its summary: `steps` is empty and `steps_kept` is `false`, since its step history was not kept.
232
301
  *
233
302
  * `GET /v1/routines/runs/{run_id}` · scope `routines:read` · served by the node
234
303
  */
@@ -238,7 +307,7 @@ export class RoutinesAPI extends Namespace {
238
307
  /**
239
308
  * Cancel a run
240
309
  *
241
- * Cancels the run. In-flight steps are told to stop; steps that already had effects are not undone. The run ends `canceled` with `job_canceled`.
310
+ * Cancels the run. In-flight steps are told to stop (their in-process calls end; a buffered sandbox command is killed with its connection), child runs of `routine/` steps are canceled too, and steps that already had effects are not undone. The run ends `canceled` with `job_canceled`.
242
311
  *
243
312
  * `POST /v1/routines/runs/{run_id}/cancel` · scope `routines:run` · served by the node
244
313
  */
@@ -250,7 +319,8 @@ export class RoutinesAPI extends Namespace {
250
319
  *
251
320
  * Server-sent events for the run: lifecycle events, `step.*` events as steps start, retry, wait and finish,
252
321
  * and `run.log` from `core/log` steps. Ends after the terminal event; reconnect with `Last-Event-ID` to resume
253
- * (events are kept with the run history).
322
+ * (events are kept with the run history). An `ephemeral` run that ended kept no events but its terminal one:
323
+ * the stream sends that event alone, with the `seq` it had and the run's summary as its `job`.
254
324
  *
255
325
  * `GET /v1/routines/runs/{run_id}/events` · scope `routines:read` · served by the node
256
326
  */
@@ -260,12 +330,43 @@ export class RoutinesAPI extends Namespace {
260
330
  reconnectOnEnd: true,
261
331
  });
262
332
  }
333
+ /**
334
+ * Replay a run
335
+ *
336
+ * Starts a new run of a finished run's routine that reuses what the source run already did. Each top-level
337
+ * step that succeeded in the source run is copied: it succeeds at once with its recorded outputs, does not
338
+ * run its callable again (no request, no sandbox, no charge) and shows `replayed: true`. Everything else runs:
339
+ * `from_step` and every step downstream of it, the steps that failed, were skipped or were canceled, steps
340
+ * another version adds or changes (compared with the source version's step of the same id: the step as
341
+ * written, the pack and routine versions it pinned at publish, the steps it depends on, and the `vars` and
342
+ * `env` it reads), steps that read an `input` that differs from the source's (directly or through `env`),
343
+ * steps that wait for a signal unless the version and input are the source's, and every step downstream of
344
+ * one of those. `trigger` and `run` are not compared. Without `from_step`, a replay of a failed run picks up
345
+ * where it failed.
346
+ *
347
+ * The new run uses the source run's version and input unless `version` or `input` is given, so a fix
348
+ * published as a new version can be replayed against the run that failed. Its trigger is
349
+ * `{type: replay, parent_run_id, from_step}`; steps that run again read what the source got from its
350
+ * trigger through the input. Copied steps do not count toward `routines.steps.daily`. The copied outputs
351
+ * and the input together are at most `routines.max_step_output_bytes` (1 MiB by default), or the replay
352
+ * answers 422 `replay_too_large`. Answers like `routinesCreateRun`: `?wait=`, `Accept: text/event-stream`,
353
+ * `webhook` and `Idempotency-Key` work the same way. An `ephemeral` source run kept no step outputs to copy:
354
+ * 410 `run_steps_not_kept` (start a new run with its input instead).
355
+ *
356
+ * `POST /v1/routines/runs/{run_id}/replay` · scope `routines:run` · served by the node
357
+ */
358
+ replayRun(runId, body, options) {
359
+ return this._client._job(replayRunOp, { path: [runId], body }, options);
360
+ }
263
361
  /**
264
362
  * Send a signal to a run
265
363
  *
266
364
  * Delivers a named signal to the run. A `wait` step waiting for it completes with `payload` as its outputs; a
267
365
  * signal sent before its step starts waiting is buffered (up to 16 per name) and consumed in order. Fails with
268
- * `run_not_waiting` when the run already finished or the buffer for this name is full.
366
+ * `run_not_waiting` when the run already finished or the buffer for this name is full. The payload counts
367
+ * against the organization's run data on the node (`max_org_run_bytes`): one that does not fit answers 429
368
+ * `concurrency_limited` (503 `capacity_unavailable` at the node's cap), except a payload of up to 1 KiB that
369
+ * ends a wait, so a run can always be let go.
269
370
  *
270
371
  * `POST /v1/routines/runs/{run_id}/signal` · scope `routines:run` · served by the node
271
372
  */
@@ -275,7 +376,7 @@ export class RoutinesAPI extends Namespace {
275
376
  /**
276
377
  * List a run's steps
277
378
  *
278
- * Lists every step execution of the run in start order, including each map item (`item_index`) and retries (`attempt`), with outputs and errors.
379
+ * Lists every step execution of the run in start order, including each map item (`item_index`) and retries (`attempt`), with outputs and errors. An `ephemeral` run that ended kept none: 410 `run_steps_not_kept`.
279
380
  *
280
381
  * `GET /v1/routines/runs/{run_id}/steps` · scope `routines:read` · served by the node
281
382
  */
@@ -294,6 +395,26 @@ export class RoutinesAPI extends Namespace {
294
395
  validateRoutine(body, options) {
295
396
  return this._client._call(validateRoutineOp, { body }, options);
296
397
  }
398
+ /**
399
+ * Read a wait link
400
+ *
401
+ * The link of a `wait` step with `token: true` (`run.wait_urls.<step id>`, routine.schema.json). Send it
402
+ * to the person who should answer: no API key and no login are needed, the link is the credential. A
403
+ * browser (`Accept: text/html`) gets a page with the step's `prompt` (title, body, image, link) and Approve
404
+ * and Reject buttons; `?decision=approve` or `?decision=reject` preselects one, for buttons in a Slack or
405
+ * email message (the person still confirms, so link previews and mail scanners that fetch the URL answer
406
+ * nothing). Programs get the `RoutineWait` JSON. The link names one run and step of one project and is
407
+ * signed by the node; it works once, while the step waits, and for at most 7 days after the step started
408
+ * waiting. The run's end, the step's own deadline or a signal sent through the API ends it too. Any link
409
+ * that is malformed, signed for another run, step or project, or whose run is no longer kept answers the
410
+ * same 404 `wait_link_invalid`. Answers carry `Cache-Control: no-store` and `Referrer-Policy:
411
+ * no-referrer`, and the link never appears in your organization's request log.
412
+ *
413
+ * `GET /v1/routines/waits/{token}` · scope `public` · served by the node
414
+ */
415
+ getWait(token, params, options) {
416
+ return this._client._call(getWaitOp, { path: [token], query: params }, options);
417
+ }
297
418
  /**
298
419
  * Delete a routine
299
420
  *
@@ -337,13 +458,37 @@ export class RoutinesAPI extends Namespace {
337
458
  * identity and its scopes are snapshotted. Hook IDs stay the same across versions for the same trigger ID.
338
459
  * Pack triggers (`type: action`) are subscriptions: publishing creates or updates one trigger subscription
339
460
  * (`tsub_`, read-only at `GET /v1/actions/subscriptions`) per action trigger, and removes the subscriptions of
340
- * action triggers the new version no longer has.
461
+ * action triggers the new version no longer has. When the actions product cannot take the subscriptions now
462
+ * (it is not running, or answers 5xx or 429), the version is still published and the routine carries a
463
+ * `product_unavailable` entry in `warnings` per action trigger until a retry subscribes it; when it refuses
464
+ * a trigger (an unknown trigger, a `with` that fails its config schema, a missing connection), the publish
465
+ * fails with `routine_invalid` and an `errors[]` item at that trigger. A webhook trigger that names a vault
466
+ * connection (`verify.secret`, `challenge.token_connection`) needs `vault:run` on top of `routines:write`
467
+ * (403 `forbidden`, `required_scope: vault:run`), as a connection in a pack trigger does.
341
468
  *
342
469
  * `PUT /v1/routines/{routine}` · scope `routines:write` · served by the node
343
470
  */
344
471
  publishRoutine(routine, body, options) {
345
472
  return this._client._call(publishRoutineOp, { path: [routine], body, bodyType: typeof body === "string" ? "yaml" : "json" }, options);
346
473
  }
474
+ /**
475
+ * List a hook's deliveries
476
+ *
477
+ * The hook's delivery log, newest first: every request that reached a known hook in the last 7 days, the
478
+ * GET verifications included, whatever the answer (a run started, a duplicate, `if` false, a handshake, a
479
+ * 401 with its `reason`, a 422, a 503). An entry is listed within a second of the answer. Each entry has the
480
+ * status, the error `code`, `reason` and `detail`, the run, the size of the body and a fixed set of headers
481
+ * (`content-type`, `content-length`, `user-agent`, `idempotency-key`, `traceparent`, `x-github-event`,
482
+ * `x-github-delivery`, `x-github-hook-id`, `x-slack-retry-num`, `x-slack-retry-reason`, `webhook-id`,
483
+ * `webhook-timestamp`); no body, signature, cookie, credential or infrastructure header is stored. At most
484
+ * the newest 10,000 entries per hook are kept, and at most 1,200 POST and 60 GET requests per hook and
485
+ * minute are written: requests past that are answered as usual but not listed.
486
+ *
487
+ * `GET /v1/routines/{routine}/hooks/{hook_id}/deliveries` · scope `routines:read` · served by the node
488
+ */
489
+ listHookDeliveries(routine, hookId, params, options) {
490
+ return this._client._list(listHookDeliveriesOp, { path: [routine, hookId], query: params }, options);
491
+ }
347
492
  /**
348
493
  * Rotate a hook's signing secret
349
494
  *
@@ -355,13 +500,29 @@ export class RoutinesAPI extends Namespace {
355
500
  rotateHookSecret(routine, hookId, body, options) {
356
501
  return this._client._call(rotateHookSecretOp, { path: [routine, hookId], body }, options);
357
502
  }
503
+ /**
504
+ * Send a test delivery
505
+ *
506
+ * Signs `body` (default `{"test": true, "sent_at": "<now>"}`) with the hook's current secret and delivers it
507
+ * through the hook ingress the way a sender would, with a fresh `Idempotency-Key`. It is verified, matched
508
+ * against `if` and starts a run like any delivery, and its log entry (`source: test`) is the answer and is
509
+ * listed with the hook's deliveries. Only hooks verified with the `b3os` scheme: B3OS does not hold another
510
+ * provider's signing secret in the clear, so send a test from that provider's settings instead.
511
+ *
512
+ * `POST /v1/routines/{routine}/hooks/{hook_id}/test` · scope `routines:write` · served by the node
513
+ */
514
+ testHook(routine, hookId, body, options) {
515
+ return this._client._call(testHookOp, { path: [routine, hookId], body }, options);
516
+ }
358
517
  /**
359
518
  * Roll back to a version
360
519
  *
361
520
  * Makes an earlier version active again (triggers switch atomically). Running runs keep their version. The
362
521
  * rollback is recorded as the routine's update; no new version is created. Trigger subscriptions follow the
363
522
  * version: those of action triggers the earlier version does not have are removed, and the others are updated
364
- * to its definition.
523
+ * to its definition (pending, with `warnings`, when the actions product cannot take them now, as on publish).
524
+ * An earlier version whose webhook triggers name vault connections needs `vault:run` of the caller and of the
525
+ * key that published it; either missing answers 403 `forbidden` with `required_scope: vault:run`.
365
526
  *
366
527
  * `POST /v1/routines/{routine}/rollback` · scope `routines:write` · served by the node
367
528
  */
@@ -371,7 +532,7 @@ export class RoutinesAPI extends Namespace {
371
532
  /**
372
533
  * List a routine's runs
373
534
  *
374
- * Lists runs of the routine, newest first. Run history is kept for 30 days.
535
+ * Lists runs of the routine, newest first. Run history is kept for 30 days (for an `ephemeral` run, its summary only: `steps_kept: false`).
375
536
  *
376
537
  * `GET /v1/routines/{routine}/runs` · scope `routines:read` · served by the node
377
538
  */
@@ -386,6 +547,22 @@ export class RoutinesAPI extends Namespace {
386
547
  * the journal), `Accept: text/event-stream` to follow steps live, or `webhook`. Effect steps without a product
387
548
  * meter of their own bill `routines.effect_step`; product steps bill their product's unit.
388
549
  *
550
+ * Once an `ephemeral` run ends, only its summary is stored: status, timing, `input`, `result`, `error` and its
551
+ * IDs, without its step history. The `?wait=` answer, the event stream and the webhook carry its steps as it
552
+ * ends; every read after that returns the summary with `steps_kept: false` (`routinesGetRun`).
553
+ *
554
+ * Organizations share a node's run shards fairly: the next turn goes to the organization that used the least
555
+ * so far, and each organization's I/O steps run within per-organization, per-routine and per-key budgets.
556
+ * The data an organization's runs hold on the node is capped (`max_org_run_bytes`): a run's input and its
557
+ * journal records count from its start, so a run that does not fit answers 429 `concurrency_limited` with
558
+ * `Retry-After` (503 `capacity_unavailable` when the node's own cap is reached), and a step whose data does
559
+ * not fit fails with `limit_exceeded`; new runs also answer 429 while the run store is a whole cap behind on
560
+ * the organization's finished runs. If the node restarts while a step runs, the step runs again as a new
561
+ * attempt (its `attempt` grows, with the same `Idempotency-Key` to the destination); a result of the earlier
562
+ * attempt that arrives late is discarded. With `defaults.pause_sandboxes`, a run that execs in an existing
563
+ * sandbox and then waits a long time pauses that sandbox until its next exec there (or until the run ends),
564
+ * unless another run on the node execs in it too.
565
+ *
389
566
  * `POST /v1/routines/{routine}/runs` · scope `routines:run` · served by the node
390
567
  */
391
568
  createRun(routine, body, options) {
@@ -1 +1 @@
1
- {"version":3,"file":"routines.js","sourceRoot":"","sources":["../../../../src/generated/ns/routines.ts"],"names":[],"mappings":"AAAA,4GAA4G;AAG5G,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAMpD,MAAM,cAAc,GAAO;IACzB,EAAE,EAAE,sBAAsB;IAC1B,MAAM,EAAE,KAAK;IACb,IAAI,EAAE,cAAc;IACpB,SAAS,EAAE,KAAK;IAChB,KAAK,EAAE,eAAe;CACvB,CAAC;AACF,MAAM,eAAe,GAAO;IAC1B,EAAE,EAAE,uBAAuB;IAC3B,MAAM,EAAE,MAAM;IACd,IAAI,E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