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