@rikalabs/akter-cli 0.0.0-stage → 0.1.0-alpha.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/CHANGELOG.md +19 -0
- package/LICENSE +202 -0
- package/NOTICE +8 -0
- package/README.md +16 -2
- package/dist/cloud-api/auth.d.ts +76 -0
- package/dist/cloud-api/billing.d.ts +347 -0
- package/dist/cloud-api/contract.d.ts +1556 -0
- package/dist/cloud-api/deployments.d.ts +161 -0
- package/dist/cloud-api/errors.d.ts +75 -0
- package/dist/cloud-api/groups/account.d.ts +370 -0
- package/dist/cloud-api/groups/billing.d.ts +179 -0
- package/dist/cloud-api/groups/deployments.d.ts +304 -0
- package/dist/cloud-api/groups/projects.d.ts +275 -0
- package/dist/cloud-api/groups/runtime.d.ts +482 -0
- package/dist/cloud-api/identity.d.ts +313 -0
- package/dist/cloud-api/index.d.ts +15 -0
- package/dist/cloud-api/index.js +1645 -0
- package/dist/cloud-api/logs.d.ts +44 -0
- package/dist/cloud-api/primitives.d.ts +82 -0
- package/dist/cloud-api/projects.d.ts +184 -0
- package/dist/cloud-api/runtime.d.ts +595 -0
- package/dist/inspector-client.js +14 -0
- package/dist/main.d.ts +2 -0
- package/dist/main.js +3257 -0
- package/package.json +1 -6
|
@@ -0,0 +1,595 @@
|
|
|
1
|
+
import * as Framework from "@rikalabs/akter/client";
|
|
2
|
+
import { Schema } from "effect";
|
|
3
|
+
export declare const SidebarCounts: Schema.Struct<{
|
|
4
|
+
readonly actorTypes: Schema.Int;
|
|
5
|
+
readonly openDeadLetters: Schema.Int;
|
|
6
|
+
}>;
|
|
7
|
+
export type SidebarCounts = typeof SidebarCounts.Type;
|
|
8
|
+
/**
|
|
9
|
+
* One environment's runtime at a glance: how many actors there are, the
|
|
10
|
+
* pending jobs (`inFlight`, queued or waiting to retry) and the dead letters
|
|
11
|
+
* by job name from the runners' durable views, and from the serving runner's
|
|
12
|
+
* memory, while it is the only runner, the command rates and turn times
|
|
13
|
+
* (`perSecond` over the current minute and the four before it, `series24h`
|
|
14
|
+
* hourly since the runner began recording, `p50Ms` and `p99Ms` over the last
|
|
15
|
+
* hour, null with no turn), the resident (`awake`) actors and the deepest
|
|
16
|
+
* mailbox (`depth` 0 and `actor` null when none waits). Each nullable field is
|
|
17
|
+
* null when the runners do not report it, never zero or empty: throughput and
|
|
18
|
+
* p99 series, jobs done per hour and the runner, database, socket and
|
|
19
|
+
* outbox-lag health. `lastDeployAt` is when the environment's newest
|
|
20
|
+
* deployment was created, null when it has none. `recentDeployments` is null
|
|
21
|
+
* here; the deployments list reports them with their rollout state.
|
|
22
|
+
*/
|
|
23
|
+
export declare const Overview: Schema.Struct<{
|
|
24
|
+
readonly commands: Schema.NullOr<Schema.Struct<{
|
|
25
|
+
readonly perSecond: Schema.Finite;
|
|
26
|
+
readonly series24h: Schema.$Array<Schema.Struct<{
|
|
27
|
+
readonly at: Schema.DateTimeUtc;
|
|
28
|
+
readonly value: Schema.Finite;
|
|
29
|
+
}>>;
|
|
30
|
+
readonly p50Ms: Schema.NullOr<Schema.Finite>;
|
|
31
|
+
readonly p99Ms: Schema.NullOr<Schema.Finite>;
|
|
32
|
+
}>>;
|
|
33
|
+
readonly actors: Schema.Struct<{
|
|
34
|
+
readonly awake: Schema.NullOr<Schema.Int>;
|
|
35
|
+
readonly total: Schema.Int;
|
|
36
|
+
}>;
|
|
37
|
+
readonly jobs: Schema.Struct<{
|
|
38
|
+
readonly inFlight: Schema.Int;
|
|
39
|
+
readonly donePerHour: Schema.NullOr<Schema.Int>;
|
|
40
|
+
}>;
|
|
41
|
+
readonly deadLettersByJobType: Schema.$Array<Schema.Struct<{
|
|
42
|
+
readonly jobName: Schema.String;
|
|
43
|
+
readonly count: Schema.Int;
|
|
44
|
+
}>>;
|
|
45
|
+
readonly throughput: Schema.NullOr<Schema.$Array<Schema.Struct<{
|
|
46
|
+
readonly at: Schema.DateTimeUtc;
|
|
47
|
+
readonly value: Schema.Finite;
|
|
48
|
+
}>>>;
|
|
49
|
+
readonly p99: Schema.NullOr<Schema.$Array<Schema.Struct<{
|
|
50
|
+
readonly at: Schema.DateTimeUtc;
|
|
51
|
+
readonly value: Schema.Finite;
|
|
52
|
+
}>>>;
|
|
53
|
+
readonly health: Schema.Struct<{
|
|
54
|
+
readonly runners: Schema.NullOr<Schema.Struct<{
|
|
55
|
+
readonly healthy: Schema.Int;
|
|
56
|
+
readonly total: Schema.Int;
|
|
57
|
+
}>>;
|
|
58
|
+
readonly databaseCpuPercent: Schema.NullOr<Schema.Finite>;
|
|
59
|
+
readonly maxMailbox: Schema.NullOr<Schema.Struct<{
|
|
60
|
+
readonly depth: Schema.Int;
|
|
61
|
+
readonly actor: Schema.NullOr<Schema.String>;
|
|
62
|
+
}>>;
|
|
63
|
+
readonly parkedSockets: Schema.NullOr<Schema.Int>;
|
|
64
|
+
readonly outboxLagP99Ms: Schema.NullOr<Schema.Finite>;
|
|
65
|
+
readonly lastDeployAt: Schema.NullOr<Schema.DateTimeUtc>;
|
|
66
|
+
}>;
|
|
67
|
+
readonly recentDeployments: Schema.NullOr<Schema.$Array<Schema.Struct<{
|
|
68
|
+
readonly id: Schema.brand<Schema.String, "DeploymentId">;
|
|
69
|
+
readonly projectId: Schema.brand<Schema.String, "ProjectId">;
|
|
70
|
+
readonly environment: Schema.Literals<readonly ["production", "staging", "dev"]>;
|
|
71
|
+
readonly environmentHost: Schema.optional<Schema.String>;
|
|
72
|
+
readonly commitSha: Schema.String;
|
|
73
|
+
readonly message: Schema.String;
|
|
74
|
+
readonly author: Schema.Struct<{
|
|
75
|
+
readonly name: Schema.String;
|
|
76
|
+
readonly image: Schema.NullOr<Schema.String>;
|
|
77
|
+
}>;
|
|
78
|
+
readonly regions: Schema.$Array<Schema.Literals<readonly ["us-east-1", "us-west-2"]>>;
|
|
79
|
+
readonly runnerCount: Schema.Int;
|
|
80
|
+
readonly durationMs: Schema.NullOr<Schema.Int>;
|
|
81
|
+
readonly status: Schema.Literals<readonly ["in-progress", "live", "drained", "rolled-back", "failed"]>;
|
|
82
|
+
readonly rolledBackFrom: Schema.NullOr<Schema.brand<Schema.String, "DeploymentId">>;
|
|
83
|
+
readonly createdAt: Schema.DateTimeUtc;
|
|
84
|
+
}>>>;
|
|
85
|
+
}>;
|
|
86
|
+
export type Overview = typeof Overview.Type;
|
|
87
|
+
/**
|
|
88
|
+
* One actor type and how many actors of it the runners hold. While one runner
|
|
89
|
+
* serves the deployment, it reports how many of them are resident (`awake`),
|
|
90
|
+
* the type's command rate over the current minute and the four before it, its
|
|
91
|
+
* p99 turn time over the last hour (null with no turn) and its deepest
|
|
92
|
+
* mailbox; otherwise those are null. The commands a type declares are not
|
|
93
|
+
* reported, so `commands` is null, never empty.
|
|
94
|
+
*/
|
|
95
|
+
export declare const ActorTypeSummary: Schema.Struct<{
|
|
96
|
+
readonly name: Schema.String;
|
|
97
|
+
readonly commands: Schema.NullOr<Schema.$Array<Schema.String>>;
|
|
98
|
+
readonly instances: Schema.Int;
|
|
99
|
+
readonly awake: Schema.NullOr<Schema.Int>;
|
|
100
|
+
readonly commandsPerSecond: Schema.NullOr<Schema.Finite>;
|
|
101
|
+
readonly p99Ms: Schema.NullOr<Schema.Finite>;
|
|
102
|
+
readonly maxMailbox: Schema.NullOr<Schema.Int>;
|
|
103
|
+
}>;
|
|
104
|
+
export type ActorTypeSummary = typeof ActorTypeSummary.Type;
|
|
105
|
+
/** How far back a series reaches, ending now; the server picks the point spacing for the window. */
|
|
106
|
+
export declare const SeriesWindow: Schema.Literals<readonly ["1h", "24h", "7d"]>;
|
|
107
|
+
export type SeriesWindow = typeof SeriesWindow.Type;
|
|
108
|
+
/** One command's volume over a window: its total and its mean rate. */
|
|
109
|
+
export declare const CommandVolume: Schema.Struct<{
|
|
110
|
+
readonly command: Schema.String;
|
|
111
|
+
readonly count: Schema.Int;
|
|
112
|
+
readonly perSecond: Schema.Finite;
|
|
113
|
+
}>;
|
|
114
|
+
export type CommandVolume = typeof CommandVolume.Type;
|
|
115
|
+
/**
|
|
116
|
+
* Commands of one actor type over a window, as the serving runner counted the
|
|
117
|
+
* turns that wrote a receipt. `series` is commands per second at evenly spaced
|
|
118
|
+
* instants (minutes for `1h`, hours otherwise), oldest first, each the rate
|
|
119
|
+
* over the part of its interval the runner observed; `commands` is the volume
|
|
120
|
+
* of each command the type handled in the window, busiest first. `since` is
|
|
121
|
+
* when the runner began recording: the window holds no point before it.
|
|
122
|
+
*/
|
|
123
|
+
export declare const ActorTypeActivity: Schema.Struct<{
|
|
124
|
+
readonly window: Schema.Literals<readonly ["1h", "24h", "7d"]>;
|
|
125
|
+
readonly since: Schema.DateTimeUtc;
|
|
126
|
+
readonly series: Schema.$Array<Schema.Struct<{
|
|
127
|
+
readonly at: Schema.DateTimeUtc;
|
|
128
|
+
readonly value: Schema.Finite;
|
|
129
|
+
}>>;
|
|
130
|
+
readonly commands: Schema.$Array<Schema.Struct<{
|
|
131
|
+
readonly command: Schema.String;
|
|
132
|
+
readonly count: Schema.Int;
|
|
133
|
+
readonly perSecond: Schema.Finite;
|
|
134
|
+
}>>;
|
|
135
|
+
}>;
|
|
136
|
+
export type ActorTypeActivity = typeof ActorTypeActivity.Type;
|
|
137
|
+
/** Turns that finished in at most `upToMs` and more than the previous bucket's bound; the last bucket has a null bound and takes every slower turn. */
|
|
138
|
+
export declare const LatencyBucket: Schema.Struct<{
|
|
139
|
+
readonly upToMs: Schema.NullOr<Schema.Finite>;
|
|
140
|
+
readonly count: Schema.Int;
|
|
141
|
+
}>;
|
|
142
|
+
export type LatencyBucket = typeof LatencyBucket.Type;
|
|
143
|
+
/**
|
|
144
|
+
* How long the turns of one actor type took over a window, from their fenced
|
|
145
|
+
* read to the database clock after `COMMIT`: buckets in ascending bound order
|
|
146
|
+
* and the 50th, 95th and 99th percentile in milliseconds, each the bound of
|
|
147
|
+
* the bucket it falls in capped by the slowest turn, and null when no turn
|
|
148
|
+
* committed. `since` is when the serving runner began recording.
|
|
149
|
+
*/
|
|
150
|
+
export declare const TurnLatency: Schema.Struct<{
|
|
151
|
+
readonly window: Schema.Literals<readonly ["1h", "24h", "7d"]>;
|
|
152
|
+
readonly since: Schema.DateTimeUtc;
|
|
153
|
+
readonly buckets: Schema.$Array<Schema.Struct<{
|
|
154
|
+
readonly upToMs: Schema.NullOr<Schema.Finite>;
|
|
155
|
+
readonly count: Schema.Int;
|
|
156
|
+
}>>;
|
|
157
|
+
readonly p50Ms: Schema.NullOr<Schema.Finite>;
|
|
158
|
+
readonly p95Ms: Schema.NullOr<Schema.Finite>;
|
|
159
|
+
readonly p99Ms: Schema.NullOr<Schema.Finite>;
|
|
160
|
+
}>;
|
|
161
|
+
export type TurnLatency = typeof TurnLatency.Type;
|
|
162
|
+
/**
|
|
163
|
+
* One actor of a type. `lastCommand` and `lastActivityAt` are the command and
|
|
164
|
+
* commit time of its retained receipt with the newest recorded commit time,
|
|
165
|
+
* null when none records one. `status` is whether it is resident on the
|
|
166
|
+
* serving runner, null unless that runner is the only one.
|
|
167
|
+
*/
|
|
168
|
+
export declare const ActorInstance: Schema.Struct<{
|
|
169
|
+
readonly key: Schema.String;
|
|
170
|
+
readonly status: Schema.NullOr<Schema.Literals<readonly ["awake", "idle"]>>;
|
|
171
|
+
readonly lastCommand: Schema.NullOr<Schema.String>;
|
|
172
|
+
readonly lastActivityAt: Schema.NullOr<Schema.DateTimeUtc>;
|
|
173
|
+
readonly generation: Schema.Int;
|
|
174
|
+
}>;
|
|
175
|
+
export type ActorInstance = typeof ActorInstance.Type;
|
|
176
|
+
export declare const OwnedTableRows: Schema.Struct<{
|
|
177
|
+
readonly table: Schema.String;
|
|
178
|
+
readonly columns: Schema.$Array<Schema.String>;
|
|
179
|
+
readonly rows: Schema.$Array<Schema.$Array<Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
180
|
+
}>;
|
|
181
|
+
export type OwnedTableRows = typeof OwnedTableRows.Type;
|
|
182
|
+
/**
|
|
183
|
+
* Whom a command ran as, as the runner recorded it: a `user` with its
|
|
184
|
+
* `subject` (`user:<id>` or `api-key:<id>` for a command sent from the
|
|
185
|
+
* console), an `anonymous` caller, or a `system` delivery the framework made
|
|
186
|
+
* from `source` (an actor's intent, a timer, cron, a workflow, a job or a
|
|
187
|
+
* subscription), with `subject` the principal of the turn that caused it when
|
|
188
|
+
* there was one.
|
|
189
|
+
*/
|
|
190
|
+
export declare const CommandCaller: Schema.Struct<{
|
|
191
|
+
readonly kind: Schema.Literals<readonly ["user", "anonymous", "system"]>;
|
|
192
|
+
readonly subject: Schema.NullOr<Schema.String>;
|
|
193
|
+
readonly source: Schema.NullOr<Schema.String>;
|
|
194
|
+
}>;
|
|
195
|
+
export type CommandCaller = typeof CommandCaller.Type;
|
|
196
|
+
/**
|
|
197
|
+
* A command receipt the runner still holds. `result` is the outcome's tag
|
|
198
|
+
* (`Success` or `Failure`), never the stored value, so reading a receipt
|
|
199
|
+
* reveals that a command ran but not what it returned. `caller` is whom it
|
|
200
|
+
* ran as, null when the runner's record of the caller does not decode.
|
|
201
|
+
* `expiresAt` is when the runner stops answering a retry from it. `at` is when
|
|
202
|
+
* its commit wrote it, on the database clock; null for a receipt written
|
|
203
|
+
* before runners recorded it. A receipt is the committed turn itself, so
|
|
204
|
+
* `replayed` is false unless the entry describes an answer served again from
|
|
205
|
+
* the receipt.
|
|
206
|
+
*/
|
|
207
|
+
export declare const Receipt: Schema.Struct<{
|
|
208
|
+
readonly commandId: Schema.String;
|
|
209
|
+
readonly command: Schema.String;
|
|
210
|
+
readonly result: Schema.NullOr<Schema.String>;
|
|
211
|
+
readonly caller: Schema.NullOr<Schema.Struct<{
|
|
212
|
+
readonly kind: Schema.Literals<readonly ["user", "anonymous", "system"]>;
|
|
213
|
+
readonly subject: Schema.NullOr<Schema.String>;
|
|
214
|
+
readonly source: Schema.NullOr<Schema.String>;
|
|
215
|
+
}>>;
|
|
216
|
+
readonly at: Schema.NullOr<Schema.DateTimeUtc>;
|
|
217
|
+
readonly expiresAt: Schema.DateTimeUtc;
|
|
218
|
+
readonly replayed: Schema.Boolean;
|
|
219
|
+
}>;
|
|
220
|
+
export type Receipt = typeof Receipt.Type;
|
|
221
|
+
/**
|
|
222
|
+
* An event the actor emitted: the cursor and emission time of its newest
|
|
223
|
+
* retained one, and its subscribers, the event feeds open on it that name the
|
|
224
|
+
* event, null unless the serving runner is the only one.
|
|
225
|
+
*/
|
|
226
|
+
export declare const ActorEvent: Schema.Struct<{
|
|
227
|
+
readonly name: Schema.String;
|
|
228
|
+
readonly cursor: Schema.String;
|
|
229
|
+
readonly emittedAt: Schema.DateTimeUtc;
|
|
230
|
+
readonly subscribers: Schema.NullOr<Schema.Int>;
|
|
231
|
+
}>;
|
|
232
|
+
export type ActorEvent = typeof ActorEvent.Type;
|
|
233
|
+
export declare const JobStatus: Schema.Literals<readonly ["queued", "running", "retrying", "done", "dead"]>;
|
|
234
|
+
export type JobStatus = typeof JobStatus.Type;
|
|
235
|
+
export declare const ActorJob: Schema.Struct<{
|
|
236
|
+
readonly name: Schema.String;
|
|
237
|
+
readonly id: Schema.String;
|
|
238
|
+
readonly attempts: Schema.Int;
|
|
239
|
+
readonly status: Schema.Literals<readonly ["queued", "running", "retrying", "done", "dead"]>;
|
|
240
|
+
}>;
|
|
241
|
+
export type ActorJob = typeof ActorJob.Type;
|
|
242
|
+
/**
|
|
243
|
+
* One moment of an actor's history: an event it emitted (`label` the event)
|
|
244
|
+
* or a command whose turn emitted events (`label` the command), both at the
|
|
245
|
+
* turn's emission time, with `detail` the command id. `caller` is whom the
|
|
246
|
+
* command ran as, null once its receipt has expired.
|
|
247
|
+
*/
|
|
248
|
+
export declare const ActorTimelineEntry: Schema.Struct<{
|
|
249
|
+
readonly at: Schema.DateTimeUtc;
|
|
250
|
+
readonly kind: Schema.Literals<readonly ["command", "event", "job"]>;
|
|
251
|
+
readonly label: Schema.String;
|
|
252
|
+
readonly detail: Schema.NullOr<Schema.String>;
|
|
253
|
+
readonly caller: Schema.NullOr<Schema.Struct<{
|
|
254
|
+
readonly kind: Schema.Literals<readonly ["user", "anonymous", "system"]>;
|
|
255
|
+
readonly subject: Schema.NullOr<Schema.String>;
|
|
256
|
+
readonly source: Schema.NullOr<Schema.String>;
|
|
257
|
+
}>>;
|
|
258
|
+
}>;
|
|
259
|
+
export type ActorTimelineEntry = typeof ActorTimelineEntry.Type;
|
|
260
|
+
/**
|
|
261
|
+
* One actor as the inspector shows it, read from the runner that owns it.
|
|
262
|
+
* `state` is the committed state, one field per stored entry, and null when
|
|
263
|
+
* an entry does not decode. `timeline` is its newest timeline page. While one
|
|
264
|
+
* runner serves the deployment, it reports whether the actor is resident
|
|
265
|
+
* (`awake`), its open sockets, its mailbox depth (0 when idle), and, while it
|
|
266
|
+
* is awake, the runner's name and region as the runner was configured. Every
|
|
267
|
+
* other nullable field is null when the runner does not report it: the turn
|
|
268
|
+
* count, owned-table rows, and those live fields with more than one runner.
|
|
269
|
+
* A null is unknown, never zero or empty.
|
|
270
|
+
*/
|
|
271
|
+
export declare const ActorInspector: Schema.Struct<{
|
|
272
|
+
readonly address: Schema.String;
|
|
273
|
+
readonly state: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
274
|
+
readonly turn: Schema.NullOr<Schema.Int>;
|
|
275
|
+
readonly tables: Schema.NullOr<Schema.$Array<Schema.Struct<{
|
|
276
|
+
readonly table: Schema.String;
|
|
277
|
+
readonly columns: Schema.$Array<Schema.String>;
|
|
278
|
+
readonly rows: Schema.$Array<Schema.$Array<Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
279
|
+
}>>>;
|
|
280
|
+
readonly receipts: Schema.$Array<Schema.Struct<{
|
|
281
|
+
readonly commandId: Schema.String;
|
|
282
|
+
readonly command: Schema.String;
|
|
283
|
+
readonly result: Schema.NullOr<Schema.String>;
|
|
284
|
+
readonly caller: Schema.NullOr<Schema.Struct<{
|
|
285
|
+
readonly kind: Schema.Literals<readonly ["user", "anonymous", "system"]>;
|
|
286
|
+
readonly subject: Schema.NullOr<Schema.String>;
|
|
287
|
+
readonly source: Schema.NullOr<Schema.String>;
|
|
288
|
+
}>>;
|
|
289
|
+
readonly at: Schema.NullOr<Schema.DateTimeUtc>;
|
|
290
|
+
readonly expiresAt: Schema.DateTimeUtc;
|
|
291
|
+
readonly replayed: Schema.Boolean;
|
|
292
|
+
}>>;
|
|
293
|
+
readonly events: Schema.$Array<Schema.Struct<{
|
|
294
|
+
readonly name: Schema.String;
|
|
295
|
+
readonly cursor: Schema.String;
|
|
296
|
+
readonly emittedAt: Schema.DateTimeUtc;
|
|
297
|
+
readonly subscribers: Schema.NullOr<Schema.Int>;
|
|
298
|
+
}>>;
|
|
299
|
+
readonly jobs: Schema.$Array<Schema.Struct<{
|
|
300
|
+
readonly name: Schema.String;
|
|
301
|
+
readonly id: Schema.String;
|
|
302
|
+
readonly attempts: Schema.Int;
|
|
303
|
+
readonly status: Schema.Literals<readonly ["queued", "running", "retrying", "done", "dead"]>;
|
|
304
|
+
}>>;
|
|
305
|
+
readonly connections: Schema.Struct<{
|
|
306
|
+
readonly sockets: Schema.NullOr<Schema.Int>;
|
|
307
|
+
readonly feedCursor: Schema.NullOr<Schema.String>;
|
|
308
|
+
}>;
|
|
309
|
+
readonly properties: Schema.Struct<{
|
|
310
|
+
readonly status: Schema.NullOr<Schema.Literals<readonly ["awake", "idle"]>>;
|
|
311
|
+
readonly type: Schema.String;
|
|
312
|
+
readonly generation: Schema.Int;
|
|
313
|
+
readonly runner: Schema.NullOr<Schema.String>;
|
|
314
|
+
readonly region: Schema.NullOr<Schema.String>;
|
|
315
|
+
readonly tenant: Schema.String;
|
|
316
|
+
readonly mailboxDepth: Schema.NullOr<Schema.Int>;
|
|
317
|
+
}>;
|
|
318
|
+
readonly timeline: Schema.NullOr<Schema.$Array<Schema.Struct<{
|
|
319
|
+
readonly at: Schema.DateTimeUtc;
|
|
320
|
+
readonly kind: Schema.Literals<readonly ["command", "event", "job"]>;
|
|
321
|
+
readonly label: Schema.String;
|
|
322
|
+
readonly detail: Schema.NullOr<Schema.String>;
|
|
323
|
+
readonly caller: Schema.NullOr<Schema.Struct<{
|
|
324
|
+
readonly kind: Schema.Literals<readonly ["user", "anonymous", "system"]>;
|
|
325
|
+
readonly subject: Schema.NullOr<Schema.String>;
|
|
326
|
+
readonly source: Schema.NullOr<Schema.String>;
|
|
327
|
+
}>>;
|
|
328
|
+
}>>>;
|
|
329
|
+
}>;
|
|
330
|
+
export type ActorInspector = typeof ActorInspector.Type;
|
|
331
|
+
export declare const CommandOutcome: Schema.Literals<readonly ["ok", "error", "replayed"]>;
|
|
332
|
+
export type CommandOutcome = typeof CommandOutcome.Type;
|
|
333
|
+
/**
|
|
334
|
+
* One committed command; `errorTag` is set only when `outcome` is `error`.
|
|
335
|
+
* The command log is read from the runners' receipts: `at` is when the commit
|
|
336
|
+
* wrote the receipt and `durationMs` the turn from its fenced read to that
|
|
337
|
+
* write, both on the database clock and null for a receipt written before
|
|
338
|
+
* runners recorded them; receipts keep no payload, so `payloadPreview` is
|
|
339
|
+
* null there. The live stream sends each command as the serving runner
|
|
340
|
+
* commits it, `at` read after `COMMIT` and `durationMs` through it, with a
|
|
341
|
+
* preview of at most 256 characters that the runner cut and redacted. `caller`
|
|
342
|
+
* is as in `Receipt`.
|
|
343
|
+
*/
|
|
344
|
+
export declare const CommandLogEntry: Schema.Struct<{
|
|
345
|
+
readonly commandId: Schema.String;
|
|
346
|
+
readonly at: Schema.NullOr<Schema.DateTimeUtc>;
|
|
347
|
+
readonly durationMs: Schema.NullOr<Schema.Finite>;
|
|
348
|
+
readonly address: Schema.String;
|
|
349
|
+
readonly command: Schema.String;
|
|
350
|
+
readonly caller: Schema.NullOr<Schema.Struct<{
|
|
351
|
+
readonly kind: Schema.Literals<readonly ["user", "anonymous", "system"]>;
|
|
352
|
+
readonly subject: Schema.NullOr<Schema.String>;
|
|
353
|
+
readonly source: Schema.NullOr<Schema.String>;
|
|
354
|
+
}>>;
|
|
355
|
+
readonly payloadPreview: Schema.NullOr<Schema.String>;
|
|
356
|
+
readonly outcome: Schema.Literals<readonly ["ok", "error", "replayed"]>;
|
|
357
|
+
readonly errorTag: Schema.NullOr<Schema.String>;
|
|
358
|
+
}>;
|
|
359
|
+
export type CommandLogEntry = typeof CommandLogEntry.Type;
|
|
360
|
+
/**
|
|
361
|
+
* A command the console sends to one actor. `commandId` is the client
|
|
362
|
+
* idempotency key: when omitted the server mints a new one, and when a caller
|
|
363
|
+
* resends the same key the control plane reuses its durably assigned command
|
|
364
|
+
* id. The runner then answers from its stored receipt without running the
|
|
365
|
+
* command again.
|
|
366
|
+
*/
|
|
367
|
+
export declare const SendCommand: Schema.Struct<{
|
|
368
|
+
readonly address: Schema.String;
|
|
369
|
+
readonly command: Schema.String;
|
|
370
|
+
readonly payload: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
371
|
+
readonly commandId: Schema.optional<Schema.String>;
|
|
372
|
+
}>;
|
|
373
|
+
export type SendCommand = typeof SendCommand.Type;
|
|
374
|
+
/** The actor's return value for a command; `replayed` is true when it came from the stored receipt of an earlier send of the same `commandId`. */
|
|
375
|
+
export declare const CommandSent: Schema.Struct<{
|
|
376
|
+
readonly commandId: Schema.String;
|
|
377
|
+
readonly result: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
378
|
+
readonly replayed: Schema.Boolean;
|
|
379
|
+
}>;
|
|
380
|
+
export type CommandSent = typeof CommandSent.Type;
|
|
381
|
+
declare const CommandExpired_base: Schema.Class<CommandExpired, Schema.TaggedStruct<"CommandExpired", {
|
|
382
|
+
readonly commandId: Schema.String;
|
|
383
|
+
}>, import("effect/Cause").YieldableError>;
|
|
384
|
+
/** A client key remains expired for 30 days after its runner identity expires; answered 410. */
|
|
385
|
+
export declare class CommandExpired extends CommandExpired_base {
|
|
386
|
+
}
|
|
387
|
+
declare const CommandStreamGap_base: Schema.Class<CommandStreamGap, Schema.TaggedStruct<"CommandStreamGap", {}>, import("effect/Cause").YieldableError>;
|
|
388
|
+
/**
|
|
389
|
+
* The command stream missed commands: the serving runner no longer held what
|
|
390
|
+
* came after the last one it sent, or this stream fell too far behind. It ends
|
|
391
|
+
* the stream, so a client that reconnects knows it has a gap rather than
|
|
392
|
+
* skipping entries unseen.
|
|
393
|
+
*/
|
|
394
|
+
export declare class CommandStreamGap extends CommandStreamGap_base {
|
|
395
|
+
}
|
|
396
|
+
declare const RunnerDefect_base: Schema.Class<RunnerDefect, Schema.TaggedStruct<"RunnerDefect", {}>, import("effect/Cause").YieldableError>;
|
|
397
|
+
/** A remote runner defect is opaque and must never cause an automatic retry; answered 502. */
|
|
398
|
+
export declare class RunnerDefect extends RunnerDefect_base {
|
|
399
|
+
}
|
|
400
|
+
declare const CommandRefused_base: Schema.Class<CommandRefused, Schema.TaggedStruct<"CommandRefused", {
|
|
401
|
+
readonly commandId: Schema.String;
|
|
402
|
+
readonly reasonTag: Schema.String;
|
|
403
|
+
readonly reason: Schema.Union<readonly [typeof Framework.CommandConflict, typeof Framework.CommandExpired, typeof Framework.InvalidCommandId, typeof Framework.Unauthorized, typeof Framework.ActorUnavailable, typeof Framework.Timeout, typeof Framework.NotCreated, typeof Framework.MailboxFull, typeof Framework.RunnerAtCapacity, typeof Framework.QuotaExceeded, typeof Framework.SessionEnded, typeof Framework.InvalidInput, typeof Framework.TransportError]>;
|
|
404
|
+
}>, import("effect/Cause").YieldableError>;
|
|
405
|
+
/**
|
|
406
|
+
* The runner refused admission without committing a command receipt; answered
|
|
407
|
+
* 422. `reason` is the framework's own refusal, already taken out of the
|
|
408
|
+
* runner's `ActorError` envelope, and `reasonTag` its tag.
|
|
409
|
+
*/
|
|
410
|
+
export declare class CommandRefused extends CommandRefused_base {
|
|
411
|
+
}
|
|
412
|
+
declare const CommandFailed_base: Schema.Class<CommandFailed, Schema.TaggedStruct<"CommandFailed", {
|
|
413
|
+
readonly commandId: Schema.String;
|
|
414
|
+
readonly errorTag: Schema.String;
|
|
415
|
+
readonly error: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
416
|
+
readonly replayed: Schema.Boolean;
|
|
417
|
+
}>, import("effect/Cause").YieldableError>;
|
|
418
|
+
/**
|
|
419
|
+
* The actor ran the command and returned a typed error, answered 422. `errorTag`
|
|
420
|
+
* and `error` are the actor's own error; `replayed` is as in `CommandSent`.
|
|
421
|
+
*/
|
|
422
|
+
export declare class CommandFailed extends CommandFailed_base {
|
|
423
|
+
}
|
|
424
|
+
declare const QuotaExceeded_base: Schema.Class<QuotaExceeded, Schema.TaggedStruct<"QuotaExceeded", {
|
|
425
|
+
readonly organizationId: Schema.String;
|
|
426
|
+
readonly period: Schema.String;
|
|
427
|
+
readonly cap: Schema.Literals<readonly ["compute", "storage", "connections", "spend"]>;
|
|
428
|
+
readonly limit: Schema.Finite;
|
|
429
|
+
readonly used: Schema.Finite;
|
|
430
|
+
readonly retryAfterMs: Schema.Finite;
|
|
431
|
+
}>, import("effect/Cause").YieldableError>;
|
|
432
|
+
/**
|
|
433
|
+
* The organization reached one of its plan's hard caps, named by `cap`;
|
|
434
|
+
* answered 429. It carries the framework's `QuotaExceeded` payload, including
|
|
435
|
+
* when the period resets as `retryAfterMs`.
|
|
436
|
+
*/
|
|
437
|
+
export declare class QuotaExceeded extends QuotaExceeded_base {
|
|
438
|
+
}
|
|
439
|
+
declare const QuotaUnbound_base: Schema.Class<QuotaUnbound, Schema.TaggedStruct<"QuotaUnbound", {
|
|
440
|
+
readonly deployment: Schema.String;
|
|
441
|
+
readonly tenant: Schema.String;
|
|
442
|
+
readonly reason: Schema.Literals<readonly ["tenant", "account", "plan"]>;
|
|
443
|
+
}>, import("effect/Cause").YieldableError>;
|
|
444
|
+
/**
|
|
445
|
+
* The edge refused a metered command because it cannot bill it: no
|
|
446
|
+
* organization is bound to the deployment's tenant (`tenant`), the
|
|
447
|
+
* organization has no billing account (`account`), or its stored plan is not
|
|
448
|
+
* in the pricing configuration (`plan`); answered 402. It carries the edge's
|
|
449
|
+
* own `QuotaUnbound` tag and payload. Retrying will not succeed until the
|
|
450
|
+
* binding is fixed, which is why it is not an `Unavailable`.
|
|
451
|
+
*/
|
|
452
|
+
export declare class QuotaUnbound extends QuotaUnbound_base {
|
|
453
|
+
}
|
|
454
|
+
/**
|
|
455
|
+
* The edge's usage refusals of a new command: the framework's `QuotaExceeded`,
|
|
456
|
+
* which names the cap, and the edge's own `QuotaUnbound`.
|
|
457
|
+
*/
|
|
458
|
+
export declare const QuotaErrors: readonly [typeof QuotaExceeded, typeof QuotaUnbound];
|
|
459
|
+
/**
|
|
460
|
+
* One job name: `retried` counts its pending jobs that have failed at least
|
|
461
|
+
* one attempt and `dead` its dead letters. Jobs done and their latency are
|
|
462
|
+
* null when the runners do not report them.
|
|
463
|
+
*/
|
|
464
|
+
export declare const JobTypeStats: Schema.Struct<{
|
|
465
|
+
readonly jobName: Schema.String;
|
|
466
|
+
readonly done: Schema.NullOr<Schema.Int>;
|
|
467
|
+
readonly retried: Schema.Int;
|
|
468
|
+
readonly dead: Schema.Int;
|
|
469
|
+
readonly p99Ms: Schema.NullOr<Schema.Finite>;
|
|
470
|
+
}>;
|
|
471
|
+
export type JobTypeStats = typeof JobTypeStats.Type;
|
|
472
|
+
/**
|
|
473
|
+
* The environment's jobs: pending ones that have not failed an attempt yet
|
|
474
|
+
* (`queued`) or have (`retrying`), and dead letters. Which jobs are running
|
|
475
|
+
* and the throughput are null when the runners do not report them.
|
|
476
|
+
*/
|
|
477
|
+
export declare const JobsSummary: Schema.Struct<{
|
|
478
|
+
readonly queued: Schema.Int;
|
|
479
|
+
readonly running: Schema.NullOr<Schema.Int>;
|
|
480
|
+
readonly retrying: Schema.Int;
|
|
481
|
+
readonly dead: Schema.Int;
|
|
482
|
+
readonly byType: Schema.$Array<Schema.Struct<{
|
|
483
|
+
readonly jobName: Schema.String;
|
|
484
|
+
readonly done: Schema.NullOr<Schema.Int>;
|
|
485
|
+
readonly retried: Schema.Int;
|
|
486
|
+
readonly dead: Schema.Int;
|
|
487
|
+
readonly p99Ms: Schema.NullOr<Schema.Finite>;
|
|
488
|
+
}>>;
|
|
489
|
+
readonly throughput: Schema.NullOr<Schema.$Array<Schema.Struct<{
|
|
490
|
+
readonly at: Schema.DateTimeUtc;
|
|
491
|
+
readonly value: Schema.Finite;
|
|
492
|
+
}>>>;
|
|
493
|
+
}>;
|
|
494
|
+
export type JobsSummary = typeof JobsSummary.Type;
|
|
495
|
+
export declare const DeadLetter: Schema.Struct<{
|
|
496
|
+
readonly id: Schema.brand<Schema.String, "DeadLetterId">;
|
|
497
|
+
readonly jobName: Schema.String;
|
|
498
|
+
readonly jobId: Schema.String;
|
|
499
|
+
readonly actor: Schema.String;
|
|
500
|
+
readonly attempts: Schema.Int;
|
|
501
|
+
readonly lastError: Schema.String;
|
|
502
|
+
readonly since: Schema.DateTimeUtc;
|
|
503
|
+
}>;
|
|
504
|
+
export type DeadLetter = typeof DeadLetter.Type;
|
|
505
|
+
/**
|
|
506
|
+
* One workflow run. `step` is the step it reached last: `index` counts the
|
|
507
|
+
* distinct steps it has recorded, from 1, so a run showing "step n of m" has
|
|
508
|
+
* `index` n and `total` m, and `index` never exceeds `total`. `total` is null
|
|
509
|
+
* when the runner does not know how many steps the workflow has, and `step`
|
|
510
|
+
* is null when the run holds no recorded step, as once it finished. A failed
|
|
511
|
+
* run ended with a declared failure, a defect or an interruption. `status` is
|
|
512
|
+
* null for a finished run whose stored result does not decode.
|
|
513
|
+
*/
|
|
514
|
+
export declare const Workflow: Schema.Struct<{
|
|
515
|
+
readonly id: Schema.String;
|
|
516
|
+
readonly name: Schema.String;
|
|
517
|
+
readonly actor: Schema.String;
|
|
518
|
+
readonly step: Schema.NullOr<Schema.Struct<{
|
|
519
|
+
readonly index: Schema.Int;
|
|
520
|
+
readonly total: Schema.NullOr<Schema.Int>;
|
|
521
|
+
readonly name: Schema.String;
|
|
522
|
+
}>>;
|
|
523
|
+
readonly waitingFor: Schema.NullOr<Schema.Struct<{
|
|
524
|
+
readonly kind: Schema.Literals<readonly ["event", "timer"]>;
|
|
525
|
+
readonly name: Schema.String;
|
|
526
|
+
}>>;
|
|
527
|
+
readonly startedAt: Schema.DateTimeUtc;
|
|
528
|
+
readonly status: Schema.NullOr<Schema.Literals<readonly ["running", "waiting", "completed", "failed"]>>;
|
|
529
|
+
}>;
|
|
530
|
+
export type Workflow = typeof Workflow.Type;
|
|
531
|
+
export declare const TimersSummary: Schema.Struct<{
|
|
532
|
+
readonly pending: Schema.Int;
|
|
533
|
+
readonly nextFireAt: Schema.NullOr<Schema.DateTimeUtc>;
|
|
534
|
+
}>;
|
|
535
|
+
export type TimersSummary = typeof TimersSummary.Type;
|
|
536
|
+
/**
|
|
537
|
+
* One cron entry an actor type declares: `name` is the command it runs,
|
|
538
|
+
* `actorPattern` the type's actors (`Type/*`) and `cron` the expression as the
|
|
539
|
+
* runtime keys it. `nextRunAt` is the soonest pending tick of the tenant's
|
|
540
|
+
* actors of the type, null when none holds one. `lastRun` is the newest tick
|
|
541
|
+
* that committed, found among the type's newest 10,000 receipts, null when
|
|
542
|
+
* none is there; its `durationMs` is null when the receipt holds no start.
|
|
543
|
+
*/
|
|
544
|
+
export declare const Schedule: Schema.Struct<{
|
|
545
|
+
readonly name: Schema.String;
|
|
546
|
+
readonly actorPattern: Schema.String;
|
|
547
|
+
readonly cron: Schema.String;
|
|
548
|
+
readonly lastRun: Schema.NullOr<Schema.Struct<{
|
|
549
|
+
readonly at: Schema.DateTimeUtc;
|
|
550
|
+
readonly outcome: Schema.Literals<readonly ["ok", "error"]>;
|
|
551
|
+
readonly durationMs: Schema.NullOr<Schema.Finite>;
|
|
552
|
+
}>>;
|
|
553
|
+
readonly nextRunAt: Schema.NullOr<Schema.DateTimeUtc>;
|
|
554
|
+
}>;
|
|
555
|
+
export type Schedule = typeof Schedule.Type;
|
|
556
|
+
/**
|
|
557
|
+
* The tenant's open connections on the serving runner, which reports them
|
|
558
|
+
* only while it is the only runner: `open` counts every WebSocket session and
|
|
559
|
+
* SSE response, `sseStreams` the SSE responses (event feeds, stream members
|
|
560
|
+
* and query watches) and `feedSubscribers` the event feeds, overall and by
|
|
561
|
+
* actor type. Runners do not measure parked connections, replay gaps or their
|
|
562
|
+
* history, so `parked`, `replayGaps` and `openVersusParked` are null.
|
|
563
|
+
*/
|
|
564
|
+
export declare const ConnectionsSummary: Schema.Struct<{
|
|
565
|
+
readonly open: Schema.Int;
|
|
566
|
+
readonly parked: Schema.NullOr<Schema.Int>;
|
|
567
|
+
readonly sseStreams: Schema.Int;
|
|
568
|
+
readonly feedSubscribers: Schema.Int;
|
|
569
|
+
readonly replayGaps: Schema.NullOr<Schema.Int>;
|
|
570
|
+
readonly openVersusParked: Schema.NullOr<Schema.$Array<Schema.Struct<{
|
|
571
|
+
readonly at: Schema.DateTimeUtc;
|
|
572
|
+
readonly open: Schema.Int;
|
|
573
|
+
readonly parked: Schema.Int;
|
|
574
|
+
}>>>;
|
|
575
|
+
readonly byActorType: Schema.$Array<Schema.Struct<{
|
|
576
|
+
readonly actorType: Schema.String;
|
|
577
|
+
readonly open: Schema.Int;
|
|
578
|
+
readonly parked: Schema.NullOr<Schema.Int>;
|
|
579
|
+
readonly sse: Schema.Int;
|
|
580
|
+
}>>;
|
|
581
|
+
}>;
|
|
582
|
+
export type ConnectionsSummary = typeof ConnectionsSummary.Type;
|
|
583
|
+
/**
|
|
584
|
+
* A command-palette hit among the runtime's own data; pages and settings are
|
|
585
|
+
* searched client side. An `actor-type` hit's `id` is the type's name and an
|
|
586
|
+
* `actor` hit's its address.
|
|
587
|
+
*/
|
|
588
|
+
export declare const SearchResult: Schema.Struct<{
|
|
589
|
+
readonly kind: Schema.Literals<readonly ["actor-type", "actor", "deployment"]>;
|
|
590
|
+
readonly id: Schema.String;
|
|
591
|
+
readonly title: Schema.String;
|
|
592
|
+
readonly subtitle: Schema.NullOr<Schema.String>;
|
|
593
|
+
}>;
|
|
594
|
+
export type SearchResult = typeof SearchResult.Type;
|
|
595
|
+
export {};
|