@celestia-island/plana-types 0.1.9 → 0.1.10
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/bindings/evernightGateway.ts +168 -0
- package/bindings/ws/tasks.ts +12 -1
- package/package.json +1 -1
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Node-side acknowledgment pushed back up the relay.
|
|
5
|
+
*/
|
|
6
|
+
export type ConfigApplyAck = { applied_version: bigint, manifest_id: string, };
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* The `Config.Apply` downlink payload: the manifest + its version for
|
|
10
|
+
* idempotent push (replayed old versions are refused by the node).
|
|
11
|
+
*/
|
|
12
|
+
export type ConfigApplyParams = { manifest: GatewayManifest,
|
|
13
|
+
/**
|
|
14
|
+
* Monotonically increasing version (refuse <= applied).
|
|
15
|
+
*/
|
|
16
|
+
config_version: bigint, };
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Route action, discriminated by the `type` field (serde internally-tagged).
|
|
20
|
+
*/
|
|
21
|
+
export type GatewayAction = { "type": "proxy",
|
|
22
|
+
/**
|
|
23
|
+
* Upstream URL(s); multiple = load-balanced (P1 feature).
|
|
24
|
+
*/
|
|
25
|
+
upstream: Array<string>,
|
|
26
|
+
/**
|
|
27
|
+
* Load-balancing strategy (default round_robin).
|
|
28
|
+
*/
|
|
29
|
+
lb: string,
|
|
30
|
+
/**
|
|
31
|
+
* **Critical for SigV4**: preserve the original Host header.
|
|
32
|
+
* rustfs presigned URLs verify the Host; changing it = 403.
|
|
33
|
+
*/
|
|
34
|
+
preserve_host: boolean, } | { "type": "static", status: number, body: string, } | { "type": "redirect", to: string, status: number, } | { "type": "reject", status: number, };
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Top-level manifest: identifies the document, pins the executing node,
|
|
38
|
+
* and carries the server blocks.
|
|
39
|
+
*/
|
|
40
|
+
export type GatewayManifest = {
|
|
41
|
+
/**
|
|
42
|
+
* Schema version (for forward-compatible evolution).
|
|
43
|
+
*/
|
|
44
|
+
version: number,
|
|
45
|
+
/**
|
|
46
|
+
* Unique manifest id (for idempotent push/pull and audit).
|
|
47
|
+
*/
|
|
48
|
+
id: string,
|
|
49
|
+
/**
|
|
50
|
+
* Who produced this manifest ("chest-admin" or "hand-written").
|
|
51
|
+
*/
|
|
52
|
+
generated_by: string,
|
|
53
|
+
/**
|
|
54
|
+
* The tier-3 node that must execute this manifest (I2 invariant).
|
|
55
|
+
*/
|
|
56
|
+
exit_node: string,
|
|
57
|
+
/**
|
|
58
|
+
* Server blocks: one per public hostname.
|
|
59
|
+
*/
|
|
60
|
+
servers: Array<GatewayServer>, };
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Structured route matcher. Fields AND across, arrays OR within.
|
|
64
|
+
* Rejects string-DSL patterns (traefik-style) — everything is
|
|
65
|
+
* structurally validated at parse time.
|
|
66
|
+
*/
|
|
67
|
+
export type GatewayMatch = {
|
|
68
|
+
/**
|
|
69
|
+
* Path prefixes to match (any of).
|
|
70
|
+
*/
|
|
71
|
+
path_prefix: Array<string>,
|
|
72
|
+
/**
|
|
73
|
+
* Exact paths (any of).
|
|
74
|
+
*/
|
|
75
|
+
path: Array<string>,
|
|
76
|
+
/**
|
|
77
|
+
* HTTP methods (any of).
|
|
78
|
+
*/
|
|
79
|
+
methods: Array<string>,
|
|
80
|
+
/**
|
|
81
|
+
* Header presence/value match.
|
|
82
|
+
*/
|
|
83
|
+
headers: { [key in string]: string }, };
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* Per-route rate limit.
|
|
87
|
+
*/
|
|
88
|
+
export type GatewayRateLimit = { requests: number, per: string, key: string, };
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* One route: a structured matcher + a discriminated action.
|
|
92
|
+
*/
|
|
93
|
+
export type GatewayRoute = {
|
|
94
|
+
/**
|
|
95
|
+
* Route id (for logs and mutation targeting).
|
|
96
|
+
*/
|
|
97
|
+
id: string,
|
|
98
|
+
/**
|
|
99
|
+
* Structured match table (fields are AND'd; arrays within a field are OR'd).
|
|
100
|
+
*/
|
|
101
|
+
match: GatewayMatch,
|
|
102
|
+
/**
|
|
103
|
+
* What to do when the route matches (discriminated by `type`).
|
|
104
|
+
*/
|
|
105
|
+
action: GatewayAction,
|
|
106
|
+
/**
|
|
107
|
+
* Named middleware to apply (references or inline). Serde renames to
|
|
108
|
+
* `use` so hand-written TOML (`use = [mw]`) round-trips — without
|
|
109
|
+
* the rename serde looks for `use_` and silently drops the field.
|
|
110
|
+
*/
|
|
111
|
+
use: Array<string>,
|
|
112
|
+
/**
|
|
113
|
+
* Rate limit for this route.
|
|
114
|
+
*/
|
|
115
|
+
ratelimit: GatewayRateLimit | null,
|
|
116
|
+
/**
|
|
117
|
+
* Request body size ceiling.
|
|
118
|
+
*/
|
|
119
|
+
body_max: string | null,
|
|
120
|
+
/**
|
|
121
|
+
* Request timeout.
|
|
122
|
+
*/
|
|
123
|
+
timeout: string | null, };
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* One public hostname's routing tree.
|
|
127
|
+
*/
|
|
128
|
+
export type GatewayServer = {
|
|
129
|
+
/**
|
|
130
|
+
* Public hostname(s) this server block answers (SNI + Host match).
|
|
131
|
+
*/
|
|
132
|
+
host: Array<string>,
|
|
133
|
+
/**
|
|
134
|
+
* Listen address (default `0.0.0.0:443`).
|
|
135
|
+
*/
|
|
136
|
+
listen: string,
|
|
137
|
+
/**
|
|
138
|
+
* TLS termination config.
|
|
139
|
+
*/
|
|
140
|
+
tls: GatewayTls | null,
|
|
141
|
+
/**
|
|
142
|
+
* Redirect plain HTTP to HTTPS (adds a :80 listener).
|
|
143
|
+
*/
|
|
144
|
+
redirect_http: boolean,
|
|
145
|
+
/**
|
|
146
|
+
* Ordered routes (first match wins).
|
|
147
|
+
*/
|
|
148
|
+
routes: Array<GatewayRoute>, };
|
|
149
|
+
|
|
150
|
+
/**
|
|
151
|
+
* TLS material reference: the cert/key live on the tier-3 node's local
|
|
152
|
+
* secure storage; the manifest only carries a **reference** (the door's
|
|
153
|
+
* host), never the private key bytes.
|
|
154
|
+
*/
|
|
155
|
+
export type GatewayTls = {
|
|
156
|
+
/**
|
|
157
|
+
* `static` (file-based, managed by acme.sh + install-cert) — ACME
|
|
158
|
+
* in-process is a future variant.
|
|
159
|
+
*/
|
|
160
|
+
type: string,
|
|
161
|
+
/**
|
|
162
|
+
* Reference to the door's certificate (e.g. "door:s3.celestia.world").
|
|
163
|
+
*/
|
|
164
|
+
cert: string,
|
|
165
|
+
/**
|
|
166
|
+
* Reference to the door's private key (same node-local storage).
|
|
167
|
+
*/
|
|
168
|
+
key: string, };
|
package/bindings/ws/tasks.ts
CHANGED
|
@@ -6,6 +6,17 @@ export type TaskCreatedParams = { task_id: string, issue_id: string, title: stri
|
|
|
6
6
|
* Topic correlation: the conversation this task was spawned for,
|
|
7
7
|
* when the spawning chain knows one.
|
|
8
8
|
*/
|
|
9
|
-
conversation_id?: string,
|
|
9
|
+
conversation_id?: string,
|
|
10
|
+
/**
|
|
11
|
+
* Task Decompose estimate in degrees; absent = no estimate produced.
|
|
12
|
+
* Consumers MUST use `!= null` — 0 is a legitimate zero-cost estimate.
|
|
13
|
+
*/
|
|
14
|
+
estimated_degrees?: number, };
|
|
10
15
|
|
|
11
16
|
export type TaskStatusUpdateParams = { task_id: string, status: TaskStatus, progress: number, };
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* A task's estimate was updated after creation (S2c follow-up).
|
|
20
|
+
* Consumers MUST use `!= null` — 0 is a legitimate zero-cost estimate.
|
|
21
|
+
*/
|
|
22
|
+
export type TaskEstimateUpdatedParams = { task_id: string, estimated_degrees?: number, };
|