@celestia-island/plana-types 0.1.9 → 0.1.13
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/ops.ts +3 -3
- package/bindings/protocol-core-httpTypes.ts +46 -5
- package/bindings/ws/malkuth.ts +17 -9
- package/bindings/ws/tasks.ts +13 -1
- package/index.ts +17 -4
- 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/ops.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
// Vendored snapshot of packages/plana/bindings/ops.ts (ts-rs generated) so the
|
|
2
2
|
// published npm tarball carries the deferred-operation wire shapes: npm `files`
|
|
3
3
|
// cannot reach a sibling package's directory, exactly as with
|
|
4
|
-
// `protocol-core-httpTypes.ts` above.
|
|
5
|
-
//
|
|
6
|
-
//
|
|
4
|
+
// `protocol-core-httpTypes.ts` above. Regenerate with
|
|
5
|
+
// `python3 scripts/vendor_http_types.py` (CI runs `--check`; do not hand-edit
|
|
6
|
+
// this copy).
|
|
7
7
|
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
8
8
|
import type { JsonValue } from "./serde_json/JsonValue";
|
|
9
9
|
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
// re-export shim no longer owns) so the published npm tarball is
|
|
5
5
|
// self-contained: npm `files` cannot reach a sibling package's directory.
|
|
6
6
|
// Distinct filename to avoid colliding with this crate's own ts-rs-generated
|
|
7
|
-
// bindings/httpTypes.ts.
|
|
8
|
-
//
|
|
7
|
+
// bindings/httpTypes.ts. Regenerate with `python3 scripts/vendor_http_types.py`
|
|
8
|
+
// (CI runs `--check`; do not hand-edit this copy).
|
|
9
9
|
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
10
10
|
|
|
11
11
|
/**
|
|
@@ -29,7 +29,10 @@ export type GrantItem = { id: string, scope: string, user_id: string | null, gro
|
|
|
29
29
|
export type GrantListResponse = { grants: Array<GrantItem>, };
|
|
30
30
|
|
|
31
31
|
/**
|
|
32
|
-
* Standard /api/health response for all plana backends
|
|
32
|
+
* Standard /api/health response for all plana backends (backend service
|
|
33
|
+
* plane). Not to be confused with the malkuth supervision worker probe
|
|
34
|
+
* `plana_celestia_types::malkuth::WorkerHealthResponse` (`/healthz` on the
|
|
35
|
+
* worker-lifecycle plane) — a different type with a distinct field set.
|
|
33
36
|
*/
|
|
34
37
|
export type HealthResponse = { status: ServiceStatus, version: string, kind: BackendKind, uptime: bigint, network: NetworkInfo, build_hash: string | null, engine_version: string | null, };
|
|
35
38
|
|
|
@@ -52,11 +55,40 @@ export type OkResponse = { ok: boolean, };
|
|
|
52
55
|
|
|
53
56
|
export type PermissionsResponse = { role: string, permissions: Array<string>, };
|
|
54
57
|
|
|
55
|
-
export type RbacGroup = { id: string, name: string, description: string
|
|
58
|
+
export type RbacGroup = { id: string, name: string, description: string | null,
|
|
59
|
+
/**
|
|
60
|
+
* Members attached to this listing (the list response computes it from
|
|
61
|
+
* the membership table; single-group reads may not). Carried since the
|
|
62
|
+
* first DTO revision — the doc comment is what 2026-10-06 added.
|
|
63
|
+
*/
|
|
64
|
+
member_count: number,
|
|
65
|
+
/**
|
|
66
|
+
* Personal-visibility enforcement: members see only their own
|
|
67
|
+
* resources while the flag is on (and must acknowledge it once).
|
|
68
|
+
*/
|
|
69
|
+
enforce_personal_visibility: boolean,
|
|
70
|
+
/**
|
|
71
|
+
* Builtin groups ship with the deployment and cannot be deleted.
|
|
72
|
+
*/
|
|
73
|
+
is_builtin: boolean,
|
|
74
|
+
/**
|
|
75
|
+
* Stable key for a builtin group (e.g. "administrators"); null for
|
|
76
|
+
* admin-authored groups.
|
|
77
|
+
*/
|
|
78
|
+
builtin_key: string | null,
|
|
79
|
+
/**
|
|
80
|
+
* Admin-authored per-locale display names (locale tag → name); null
|
|
81
|
+
* when none are authored.
|
|
82
|
+
*/
|
|
83
|
+
display_names: { [key in string]: string } | null, created_at: string, updated_at: string, };
|
|
56
84
|
|
|
57
85
|
export type RbacGroupsResponse = { groups: Array<RbacGroup>, };
|
|
58
86
|
|
|
59
|
-
export type RbacUser = { id: string, username: string,
|
|
87
|
+
export type RbacUser = { id: string, username: string,
|
|
88
|
+
/**
|
|
89
|
+
* `auth_users.email` is nullable — accounts can exist without one.
|
|
90
|
+
*/
|
|
91
|
+
email: string | null, display_name: string | null, avatar_url: string | null, is_active: boolean, role: string, tier: string, created_at: string, updated_at: string, };
|
|
60
92
|
|
|
61
93
|
export type RbacUsersResponse = { users: Array<RbacUser>, };
|
|
62
94
|
|
|
@@ -68,3 +100,12 @@ export type ReadinessResponse = { status: string, database: boolean, };
|
|
|
68
100
|
export type ServiceStatus = "ok" | "degraded" | "unhealthy";
|
|
69
101
|
|
|
70
102
|
export type StatusResponse = { status: string, agent_id?: string, platform?: string, id?: string, plugin_id?: string, };
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* The version half of a health payload, shared by HTTP and JSON-RPC.
|
|
106
|
+
*
|
|
107
|
+
* Backends answer `Service.Info` with exactly this struct, built from the
|
|
108
|
+
* same [`HealthResponse`] they serve on `/health`, so the two transports can
|
|
109
|
+
* never drift apart.
|
|
110
|
+
*/
|
|
111
|
+
export type VersionReport = { version: string, build_hash?: string, kind: BackendKind, engine_version?: string, };
|
package/bindings/ws/malkuth.ts
CHANGED
|
@@ -27,15 +27,6 @@ drain_budget_secs: bigint | null, };
|
|
|
27
27
|
|
|
28
28
|
export type GateDecision = "allow" | "review" | "block";
|
|
29
29
|
|
|
30
|
-
/**
|
|
31
|
-
* Health probe response returned by each worker at `/healthz` or `/readyz`.
|
|
32
|
-
*/
|
|
33
|
-
export type HealthResponse = { worker_id: string, healthy: boolean, ready: boolean,
|
|
34
|
-
/**
|
|
35
|
-
* If not ready, the reason (e.g. "draining", "starting").
|
|
36
|
-
*/
|
|
37
|
-
not_ready_reason: string | null, uptime_secs: bigint, version: string, };
|
|
38
|
-
|
|
39
30
|
/**
|
|
40
31
|
* OreXis LAYER3_PREFLIGHT_GUARD gate decision for a restart proposal.
|
|
41
32
|
*/
|
|
@@ -48,6 +39,23 @@ export type RestartProposal = { proposal_id: string, worker_id: string, repo_pat
|
|
|
48
39
|
|
|
49
40
|
export type RestartRisk = "low" | "medium" | "high" | "critical";
|
|
50
41
|
|
|
42
|
+
/**
|
|
43
|
+
* Health probe response returned by each malkuth supervision worker at
|
|
44
|
+
* `/healthz` or `/readyz` (worker-lifecycle plane).
|
|
45
|
+
*
|
|
46
|
+
* Distinct from the generic backend descriptor
|
|
47
|
+
* `plana::protocol_core::http::HealthResponse` (the `/api/health` payload of
|
|
48
|
+
* plana backends): the two share only the historical concept, not a wire
|
|
49
|
+
* shape — this struct carries the worker probe fields, the other the backend
|
|
50
|
+
* service/build fields — so they are separate types with distinct shapes
|
|
51
|
+
* (both carry the generic `version` field).
|
|
52
|
+
*/
|
|
53
|
+
export type WorkerHealthResponse = { worker_id: string, healthy: boolean, ready: boolean,
|
|
54
|
+
/**
|
|
55
|
+
* If not ready, the reason (e.g. "draining", "starting").
|
|
56
|
+
*/
|
|
57
|
+
not_ready_reason: string | null, uptime_secs: bigint, version: string, };
|
|
58
|
+
|
|
51
59
|
/**
|
|
52
60
|
* Registers a new worker with the malkuth supervisor.
|
|
53
61
|
* Sent by a worker at startup to announce its presence and capabilities.
|
package/bindings/ws/tasks.ts
CHANGED
|
@@ -6,6 +6,18 @@ 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
|
+
* Round-21's finding: this field (and TaskEstimateUpdatedParams
|
|
15
|
+
* below) existed ONLY as a hand-edit in the generated binding — any
|
|
16
|
+
* regeneration silently wiped them from the published npm surface.
|
|
17
|
+
* They now live in the SOURCE, so regeneration is faithful.
|
|
18
|
+
*/
|
|
19
|
+
estimated_degrees?: number, };
|
|
20
|
+
|
|
21
|
+
export type TaskEstimateUpdatedParams = { task_id: string, estimated_degrees?: number, };
|
|
10
22
|
|
|
11
23
|
export type TaskStatusUpdateParams = { task_id: string, status: TaskStatus, progress: number, };
|
package/index.ts
CHANGED
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
// - Shadowed duplicates stay importable via deep imports
|
|
17
17
|
// (`import type { FileEntry } from "@celestia-island/plana-types/bindings/tools/kalos"`).
|
|
18
18
|
//
|
|
19
|
-
// The
|
|
19
|
+
// The 7 current collisions (flat winner -> shadowed source):
|
|
20
20
|
//
|
|
21
21
|
// WorkspaceStatusParams ws/workspace wins vs tools/aporia
|
|
22
22
|
// FileEntry httpTypes wins vs tools/kalos
|
|
@@ -24,10 +24,18 @@
|
|
|
24
24
|
// FileTreeEntry ws/fileBrowsing wins vs tools/kalos
|
|
25
25
|
// ContainerSnapshotParams ws/stateSync wins vs tools/neikos
|
|
26
26
|
// ReportHumanParams tools/hubris wins vs tools/orexis
|
|
27
|
+
// RbacGroup httpTypes wins vs protocol-core-httpTypes
|
|
28
|
+
// ↑ that winner is a STALE mirror: nothing in this crate generates it
|
|
29
|
+
// (it predates the RBAC DTOs moving to the foundation), and it survives
|
|
30
|
+
// only because UserProfileResponse — same file — references the bare
|
|
31
|
+
// name. The TRUTHFUL RbacGroup (builtin/personal-visibility fields,
|
|
32
|
+
// nullable description) is the foundation's, vendored into
|
|
33
|
+
// protocol-core-httpTypes; deep-import it from there until the DTOs
|
|
34
|
+
// move into this crate or ts-rs learns the cross-crate import.
|
|
27
35
|
//
|
|
28
|
-
// MAINTENANCE WARNING: the
|
|
36
|
+
// MAINTENANCE WARNING: the five exclusion lists are hand-maintained here —
|
|
29
37
|
// there is no generator script that rewrites this file. New types added to
|
|
30
|
-
// the generated aporia/kalos/neikos/orexis files do NOT appear in the flat
|
|
38
|
+
// the generated aporia/kalos/neikos/orexis/protocol-core-httpTypes files do NOT appear in the flat
|
|
31
39
|
// surface unless their name is appended to the matching `export { ... }`
|
|
32
40
|
// line below (keep the list alphabetically sorted). A type added with a
|
|
33
41
|
// name that already exists on the flat surface is silently shadowed: it
|
|
@@ -70,7 +78,12 @@ export * from "./bindings/tools/hubris";
|
|
|
70
78
|
export type { Annotation, FileCreateDirParams, FileDeleteParams, FileDeleteResult, FileEditParams, FileEditResult, FileExistsParams, FileExistsResult, FileGetInfoParams, FileInfoResult, FileListParams, FileListResult, FileReadResult, FileTreeListResult, FileWriteParams, FileWriteResult, ListAnnotationsResult, MkDirResult, ResolveAnnotationResult } from "./bindings/tools/kalos";
|
|
71
79
|
export type { CheckWaitParams, ContainerCreateResult, ContainerFilterCriteria, ContainerForkParams, ContainerForkResult, ContainerInfoParams, ContainerInfoResult, ContainerListItem, ContainerListParams, ContainerListResult, ContainerRemoveParams, ContainerRemoveResult, ContainerSnapshotResult, ContainerStartParams, ContainerStartResult, ContainerStopParams, ContainerStopResult, ExecOnContainerParams, ExecResult, GitPushBranchParams, GitPushResult, NewContainerToolParams, NewContainerVolumeMount, SidecarDeliverResult, SidecarKillParams, SidecarSendParams, SidecarSendResult, SidecarSpawnParams, ToolchainEnsureParams, ToolchainEnsureResult, ToolchainListParams, ToolchainListResult, ToolchainProfileInfo, ToolchainVolumeSpec, VolumeInfo, WaitParams } from "./bindings/tools/neikos";
|
|
72
80
|
export type { AgentIntegrityParams, AskResult, AuditAlignmentParams, AuditAlignmentResult, AuditFinding, AuditLegalityParams, AuditLegalityResult, BlockToolParams, CheckResultItem, ComplianceReportParams, ComplianceReportToolResult, ComplianceRule, ComplianceSummary, InspectToolCallParams, ManageSensitivityRulesParams, ReplyResult, ReportDetail, ReportHumanResult, RuleCheckResult, SecurityAuditParams, SecurityStatusParams, SecuritySuggestionsParams, SensitivityRule, SetNetworkPolicyParams, SetRiskThresholdParams, SetSecurityPolicyParams, StandardCheckParams, StandardCheckResult, StandardRegisterResult, UnblockToolParams } from "./bindings/tools/orexis";
|
|
73
|
-
|
|
81
|
+
// Vendored foundation snapshot (see the file header there): RbacGroup stays
|
|
82
|
+
// off this list on purpose — bindings/httpTypes already puts an identically
|
|
83
|
+
// shaped RbacGroup on the flat surface — and HealthResponse is aliased to
|
|
84
|
+
// ServiceHealthResponse so consumers that also bind their own backend's
|
|
85
|
+
// /api/health HealthResponse never import two same-named shapes.
|
|
86
|
+
export type { BackendKind, ConnectionStatus, CreatedResponse, DeletedResponse, ErrorResponse, GrantItem, GrantListResponse, HealthResponse as ServiceHealthResponse, IdResponse, MyPermissions, NetworkInfo, OAuthProvider, OkIdResponse, OkMessageResponse, OkResponse, PermissionsResponse, RbacGroupsResponse, RbacUser, RbacUsersResponse, ReadinessResponse, ServiceStatus, StatusResponse, VersionReport } from "./bindings/protocol-core-httpTypes";
|
|
74
87
|
export * from "./bindings/tools/philia";
|
|
75
88
|
export * from "./bindings/tools/polemos";
|
|
76
89
|
export * from "./bindings/tools/skemma";
|