@celestia-island/plana-types 0.1.10 → 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/ops.ts +3 -3
- package/bindings/protocol-core-httpTypes.ts +46 -5
- package/bindings/ws/malkuth.ts +17 -9
- package/bindings/ws/tasks.ts +8 -7
- package/index.ts +17 -4
- package/package.json +1 -1
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,17 +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
10
|
/**
|
|
11
11
|
* Task Decompose estimate in degrees; absent = no estimate produced.
|
|
12
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.
|
|
13
18
|
*/
|
|
14
19
|
estimated_degrees?: number, };
|
|
15
20
|
|
|
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
21
|
export type TaskEstimateUpdatedParams = { task_id: string, estimated_degrees?: number, };
|
|
22
|
+
|
|
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";
|