@celestia-island/plana-types 0.1.0

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.
Files changed (96) hide show
  1. package/Cargo.toml +38 -0
  2. package/bindings/FileAnchor.ts +3 -0
  3. package/bindings/engine.ts +277 -0
  4. package/bindings/enums.ts +31 -0
  5. package/bindings/httpTypes.ts +197 -0
  6. package/bindings/index.ts +47 -0
  7. package/bindings/mcp/aporia.ts +61 -0
  8. package/bindings/mcp/eleos.ts +18 -0
  9. package/bindings/mcp/epieikeia.ts +48 -0
  10. package/bindings/mcp/haplotes.ts +47 -0
  11. package/bindings/mcp/hubris.ts +41 -0
  12. package/bindings/mcp/index.ts +13 -0
  13. package/bindings/mcp/kalos.ts +47 -0
  14. package/bindings/mcp/neikos.ts +76 -0
  15. package/bindings/mcp/orexis.ts +64 -0
  16. package/bindings/mcp/philia.ts +57 -0
  17. package/bindings/mcp/polemos.ts +55 -0
  18. package/bindings/mcp/skemma.ts +58 -0
  19. package/bindings/mcp/skopeo.ts +56 -0
  20. package/bindings/mcp/webAutomation.ts +31 -0
  21. package/bindings/model.ts +240 -0
  22. package/bindings/package.json +16 -0
  23. package/bindings/region.ts +3 -0
  24. package/bindings/serde_json/JsonValue.ts +3 -0
  25. package/bindings/ws/agentLifecycle.ts +41 -0
  26. package/bindings/ws/auth.ts +15 -0
  27. package/bindings/ws/baseMessages.ts +7 -0
  28. package/bindings/ws/bridgeNetwork.ts +71 -0
  29. package/bindings/ws/core.ts +51 -0
  30. package/bindings/ws/fileBrowsing.ts +57 -0
  31. package/bindings/ws/handshake.ts +23 -0
  32. package/bindings/ws/industrial.ts +72 -0
  33. package/bindings/ws/knowledgeBase.ts +10 -0
  34. package/bindings/ws/layer2.ts +25 -0
  35. package/bindings/ws/llmProvider.ts +74 -0
  36. package/bindings/ws/logs.ts +11 -0
  37. package/bindings/ws/malkuth.ts +62 -0
  38. package/bindings/ws/noa.ts +17 -0
  39. package/bindings/ws/stateSync.ts +19 -0
  40. package/bindings/ws/systemUi.ts +5 -0
  41. package/bindings/ws/tasks.ts +6 -0
  42. package/bindings/ws/views.ts +163 -0
  43. package/bindings/ws/workspace.ts +11 -0
  44. package/bindings/ws/yolo.ts +32 -0
  45. package/examples/schema_dump.rs +51 -0
  46. package/package.json +6 -0
  47. package/pnpm-workspace.yaml +2 -0
  48. package/src/engine.rs +602 -0
  49. package/src/enums.rs +334 -0
  50. package/src/external_mcp.rs +132 -0
  51. package/src/http.rs +1077 -0
  52. package/src/identity.rs +160 -0
  53. package/src/lib.rs +1215 -0
  54. package/src/malkuth.rs +145 -0
  55. package/src/mcp/aporia.rs +272 -0
  56. package/src/mcp/eleos.rs +210 -0
  57. package/src/mcp/epieikeia.rs +194 -0
  58. package/src/mcp/haplotes.rs +310 -0
  59. package/src/mcp/hubris.rs +377 -0
  60. package/src/mcp/kalos.rs +251 -0
  61. package/src/mcp/mod.rs +23 -0
  62. package/src/mcp/neikos.rs +533 -0
  63. package/src/mcp/orexis.rs +493 -0
  64. package/src/mcp/philia.rs +267 -0
  65. package/src/mcp/polemos.rs +241 -0
  66. package/src/mcp/skemma.rs +442 -0
  67. package/src/mcp/skopeo.rs +282 -0
  68. package/src/mcp/web_automation.rs +122 -0
  69. package/src/model.rs +421 -0
  70. package/src/protocol/base_messages.rs +125 -0
  71. package/src/protocol/handshake.rs +364 -0
  72. package/src/protocol/jsonrpc.rs +888 -0
  73. package/src/protocol/mod.rs +10 -0
  74. package/src/rbac.rs +786 -0
  75. package/src/region.rs +362 -0
  76. package/src/tracing_helpers.rs +9 -0
  77. package/src/ws/agent/agent_lifecycle.rs +221 -0
  78. package/src/ws/agent/layer2.rs +126 -0
  79. package/src/ws/agent/mod.rs +9 -0
  80. package/src/ws/agent/state_sync.rs +111 -0
  81. package/src/ws/agent/tasks.rs +43 -0
  82. package/src/ws/agent/yolo.rs +161 -0
  83. package/src/ws/mod.rs +10 -0
  84. package/src/ws/services/auth.rs +99 -0
  85. package/src/ws/services/industrial.rs +647 -0
  86. package/src/ws/services/knowledge_base.rs +59 -0
  87. package/src/ws/services/llm_provider.rs +371 -0
  88. package/src/ws/services/mod.rs +7 -0
  89. package/src/ws/ui/bridge_network.rs +96 -0
  90. package/src/ws/ui/file_browsing.rs +88 -0
  91. package/src/ws/ui/logs.rs +55 -0
  92. package/src/ws/ui/mod.rs +11 -0
  93. package/src/ws/ui/noa.rs +105 -0
  94. package/src/ws/ui/system_ui.rs +27 -0
  95. package/src/ws/ui/views.rs +159 -0
  96. package/src/ws/ui/workspace.rs +73 -0
@@ -0,0 +1,240 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ import type { ModelTier } from "./ws/core";
3
+
4
+ /**
5
+ * Generation quality tier — applies to image / 3D generation models.
6
+ *
7
+ * Distinct from [`super::ModelTier`] (which ranks LLM reasoning depth),
8
+ * `GenerationTier` ranks output fidelity vs. speed for generative models.
9
+ */
10
+ export type GenerationTier = "fast_preview" | "standard" | "production";
11
+
12
+ /**
13
+ * Minimum hardware requirements for a local generative model.
14
+ *
15
+ * Populated for GPU-deployed models (TRELLIS, SDXL …). Remote-API models
16
+ * leave this as `None`.
17
+ */
18
+ export type HardwareRequirements = {
19
+ /**
20
+ * Minimum VRAM in GB.
21
+ */
22
+ min_vram_gb?: number,
23
+ /**
24
+ * Minimum system RAM in GB.
25
+ */
26
+ min_ram_gb?: number,
27
+ /**
28
+ * Recommended GPU (e.g. `"NVIDIA RTX 4090"`).
29
+ */
30
+ recommended_gpu?: string, };
31
+
32
+ /**
33
+ * Where a model physically executes. evernight chooses the backend based on
34
+ * GPU availability — GPU-first, CPU-fallback.
35
+ */
36
+ export type ModelBackend = "remote_api" | "gpu" | "cpu";
37
+
38
+ /**
39
+ * Fine-grained model capability flags.
40
+ *
41
+ * Whereas [`ModelCategory`] answers "what kind of model is this?",
42
+ * `ModelCapability` answers "what specific things can this model do?".
43
+ * Skills declare their `required_capabilities`; the scepter router filters
44
+ * available models by capability intersection.
45
+ *
46
+ * This replaces the scattered boolean flags (`supports_vision`,
47
+ * `supports_function_calling` …) with a single extensible enum. The booleans
48
+ * remain for backward compatibility but are superseded by this enum when
49
+ * present.
50
+ */
51
+ export type ModelCapability = "text_chat" | "text_streaming" | "function_calling" | "reasoning" | "code_generation" | "text_embedding" | "speech_to_text" | "text_to_speech" | "image_input" | "video_input" | "visual_critique" | "text_to_image" | "image_to_image" | "image_edit" | "image_upscale" | "text_to_3d" | "image_to_3d" | "three_d_edit" | "three_d_export" | "pbr_texturing" | "mesh_optimization";
52
+
53
+ /**
54
+ * Top-level model category. Determines which subsystem consumes the model.
55
+ */
56
+ export type ModelCategory = "llm" | "embedding" | "speech_to_text" | "text_to_speech" | "image_generation" | "three_d_generation" | "multi_modal";
57
+
58
+ /**
59
+ * A unified description of an AI model, shared between scepter and chest.
60
+ *
61
+ * Both sides can enumerate available models, check their status, and request
62
+ * inference using this common vocabulary.
63
+ */
64
+ export type ModelDescriptor = {
65
+ /**
66
+ * Unique id, e.g. `"bge-m3"`, `"whisper-tiny"`, `"claude-opus-4.8"`.
67
+ */
68
+ id: string,
69
+ /**
70
+ * Human-readable display name.
71
+ */
72
+ display_name: string,
73
+ /**
74
+ * What kind of model this is.
75
+ */
76
+ category: ModelCategory,
77
+ /**
78
+ * Where it runs.
79
+ */
80
+ backend: ModelBackend,
81
+ /**
82
+ * Size tier (LLM coding-plan concept; `None` for non-LLM models).
83
+ */
84
+ tier?: ModelTier,
85
+ /**
86
+ * Output dimension (embedding models only).
87
+ */
88
+ dimension?: number,
89
+ /**
90
+ * Approximate model size in bytes (local models).
91
+ */
92
+ size_bytes?: bigint,
93
+ /**
94
+ * Provider index (`#N` convention; LLM models only).
95
+ */
96
+ provider_index?: number,
97
+ /**
98
+ * Fine-grained capability flags. When non-empty, the scepter router uses
99
+ * these to match skills that declare `required_capabilities`. When empty,
100
+ * falls back to the legacy boolean flags on `ModelFsInfo`.
101
+ */
102
+ capabilities: Array<ModelCapability>,
103
+ /**
104
+ * Generation quality tier (image / 3D generation models only).
105
+ */
106
+ generation_tier?: GenerationTier,
107
+ /**
108
+ * Hardware requirements (local generative models only).
109
+ */
110
+ hardware_requirements?: HardwareRequirements, };
111
+
112
+ /**
113
+ * A model inference request, sent from the web UI to the upstream engine
114
+ * over the WS JSON-RPC channel. The engine routes it to the appropriate
115
+ * backend (local CPU / local GPU / remote GPU / remote API).
116
+ */
117
+ export type ModelInferenceRequest = {
118
+ /**
119
+ * Which model to use (by id).
120
+ */
121
+ model_id: string,
122
+ /**
123
+ * Input data (format depends on category: text for LLM/embedding,
124
+ * base64 audio for STT, base64 image for vision).
125
+ */
126
+ input: string,
127
+ /**
128
+ * Optional parameters (temperature, max_tokens, language hint …).
129
+ */
130
+ parameters?: Record<string, unknown>, };
131
+
132
+ /**
133
+ * Inference result returned to the web UI.
134
+ */
135
+ export type ModelInferenceResult = {
136
+ /**
137
+ * Model that produced the output.
138
+ */
139
+ model_id: string,
140
+ /**
141
+ * Output data (text for LLM/embedding/TTS, text for STT, JSON for vision).
142
+ */
143
+ output: string,
144
+ /**
145
+ * Time spent (milliseconds).
146
+ */
147
+ elapsed_ms?: bigint,
148
+ /**
149
+ * Token/processing usage (if applicable).
150
+ */
151
+ usage?: Record<string, unknown>, };
152
+
153
+ /**
154
+ * `Sync.ModelInferenceResult` — inference result push.
155
+ */
156
+ export type ModelInferenceResultParams = { result: ModelInferenceResult, };
157
+
158
+ /**
159
+ * `Sync.ModelList` — model catalogue response.
160
+ */
161
+ export type ModelListParams = { models: Array<ModelDescriptor>, servers: Array<ModelServerInfo>, };
162
+
163
+ /**
164
+ * What to do with a model server.
165
+ */
166
+ export type ModelServerAction = "start" | "stop" | "restart";
167
+
168
+ /**
169
+ * `Sync.ModelServerActionResult` — action result.
170
+ */
171
+ export type ModelServerActionResultParams = { kind: ModelServerKind, status: ModelServerStatus, };
172
+
173
+ /**
174
+ * A managed model server instance, deployed and owned by **evernight**.
175
+ * Neither scepter nor chest starts/stops these directly — they issue
176
+ * `RequestModelServerAction` and evernight performs the lifecycle.
177
+ */
178
+ export type ModelServerInfo = {
179
+ /**
180
+ * Server kind (determines the Docker image / launch command).
181
+ */
182
+ kind: ModelServerKind,
183
+ /**
184
+ * HTTP endpoint (e.g. `http://localhost:8178`).
185
+ */
186
+ endpoint: string,
187
+ /**
188
+ * Current lifecycle status.
189
+ */
190
+ status: ModelServerStatus,
191
+ /**
192
+ * Which backend this server is running on (GPU or CPU).
193
+ */
194
+ backend: ModelBackend,
195
+ /**
196
+ * Docker container id (managed by evernight's container runtime).
197
+ */
198
+ container_id?: string,
199
+ /**
200
+ * Which models are loaded in this server.
201
+ */
202
+ loaded_models: Array<string>, };
203
+
204
+ /**
205
+ * The type of model server. evernight deploys and manages these; the choice
206
+ * of GPU vs CPU variant is made by evernight at deploy time (GPU-first).
207
+ */
208
+ export type ModelServerKind = "ollama" | "whisper_cpp" | "vllm";
209
+
210
+ /**
211
+ * Status of a local model server (ollama, whisper.cpp, …).
212
+ */
213
+ export type ModelServerStatus = "running" | "starting" | "stopped" | "failed";
214
+
215
+ /**
216
+ * `Sync.RequestModelInference` — ask the engine to run a model.
217
+ */
218
+ export type RequestModelInferenceParams = { request: ModelInferenceRequest, };
219
+
220
+ /**
221
+ * `Sync.RequestModelList` — enumerate available models.
222
+ */
223
+ export type RequestModelListParams = {
224
+ /**
225
+ * Filter by category (omit for all).
226
+ */
227
+ category?: ModelCategory, };
228
+
229
+ /**
230
+ * `Sync.RequestModelServerAction` — ask evernight (via scepter) to start /
231
+ * stop / restart a model server. Neither chest nor scepter performs the
232
+ * deployment directly; the action is forwarded to evernight's model lifecycle
233
+ * manager.
234
+ */
235
+ export type RequestModelServerActionParams = { kind: ModelServerKind, action: ModelServerAction,
236
+ /**
237
+ * Preferred backend. evernight will honour this if possible; falls back
238
+ * to CPU if the requested GPU is unavailable.
239
+ */
240
+ preferred_backend?: ModelBackend, };
@@ -0,0 +1,16 @@
1
+ {
2
+ "name": "@celestia-island/plana-types",
3
+ "version": "0.1.0",
4
+ "private": true,
5
+ "description": "TypeScript type bindings for the plana protocol crate (auto-generated by ts-rs)",
6
+ "main": "index.ts",
7
+ "types": "index.ts",
8
+ "files": [
9
+ "index.ts",
10
+ "ws/",
11
+ "httpTypes.ts",
12
+ "model.ts",
13
+ "enums.ts",
14
+ "mcp/"
15
+ ]
16
+ }
@@ -0,0 +1,3 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+
3
+ export type RegionPolicy = { "china": { icp_number: string | null, data_residency_required: boolean, payment_domestic_only: boolean, pipi_consent_required: boolean, } } | { "european_union": { gdpr_consent_required: boolean, right_to_deletion: boolean, right_to_export: boolean, dpo_contact: string | null, cookie_consent_required: boolean, } } | { "russia": { data_localization_required: boolean, payment_mir_supported: boolean, } } | "free_market";
@@ -0,0 +1,3 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+
3
+ export type JsonValue = number | string | boolean | Array<JsonValue> | { [key in string]: JsonValue } | null;
@@ -0,0 +1,41 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ import type { Agent, AgentStatus, CompletionOutcome, LlmStream, ModelTier, ReportSelection, ReportType, RequestState, RouteInfo, SkillStage, StreamChunkKind, StructuredAgentError, WorkStatus } from "./core";
3
+
4
+ export type AgentListResponseParams = { agents: Array<TuiAgentInfo>, };
5
+
6
+ export type AgentReportParams = { report_type: ReportType, agent_type: Agent, agent_id: string, agent_number?: string, title: string, content: string, summary?: string, timestamp: string, preset_options: Array<string>,
7
+ /**
8
+ * For `report_type: "query"`: whether `preset_options` are mutually
9
+ * exclusive (single) or pick-any (multiple). Omit ⇒ single.
10
+ */
11
+ selection_mode?: ReportSelection,
12
+ /**
13
+ * For `report_type: "query"`: whether the recipient may type a free-form
14
+ * answer in addition to (or instead of) picking presets. Omit ⇒ true
15
+ * when `report_type == Query`, false otherwise.
16
+ */
17
+ allow_custom_reply?: boolean,
18
+ /**
19
+ * Subset of `preset_options` the agent suggests. Empty when no
20
+ * recommendation is offered.
21
+ */
22
+ recommended_options: Array<string>, model_name?: string, token_usage?: [number, number], skill_count?: number, mcp_count?: number, next_route?: RouteInfo, stream?: LlmStream, error?: StructuredAgentError, };
23
+
24
+ /**
25
+ * Reply payload for an inquiry (`report_type: "query"`) report.
26
+ *
27
+ * Wire method: `Sync.AgentReportReply` (server-bound). `report_id` mirrors
28
+ * the `agent_id` of the originating `AgentReportParams` so the upstream can
29
+ * correlate without keeping a separate consultation registry.
30
+ */
31
+ export type AgentReportReplyParams = { report_id: string, selected_options: Array<string>, custom_answer?: string, timestamp: string, };
32
+
33
+ export type AgentResponseParams = { agent_type: Agent, agent_id: string, agent_number?: string, content: string, timestamp: string, parent_id?: string, };
34
+
35
+ export type AgentStreamingChunkParams = { agent_type: Agent, agent_id: string, agent_number?: string, chunk: string, is_done: boolean, timestamp: string, task_id?: string, chunk_kind?: StreamChunkKind, };
36
+
37
+ export type McpToolResultParams = { tool_name: string, call_id: string, parameters_summary?: string, result: string, agent_type: Agent, agent_id: string, agent_number?: string, success: boolean, duration_ms?: bigint, };
38
+
39
+ export type OrchestrationStatusParams = { stage: SkillStage, agent: string, agent_type?: Agent, tool_name?: string, call_id?: string, parent_agent?: string, parameters_summary?: string, };
40
+
41
+ export type TuiAgentInfo = { agent_type: Agent, agent_number?: string, agent_uuid?: string, agent_id: string, status: AgentStatus, llm_working: boolean, cpu_usage: number, memory_mb: bigint, parent_id?: string, work_status?: WorkStatus, current_model?: string, model_tier?: ModelTier, llm_handle?: string, token_usage?: [number, number], mcp_tool_calls: number, request_state: RequestState, completion_outcome: CompletionOutcome, retry_count: number, max_retries: number, };
@@ -0,0 +1,15 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+
3
+ export type AuthChangePasswordResponseParams = { ok: boolean, error?: string, };
4
+
5
+ export type AuthDeleteUserResponseParams = { ok: boolean, error?: string, };
6
+
7
+ export type AuthGetUserResponseParams = { ok: boolean, user?: UserProfileSummary, error?: string, };
8
+
9
+ export type AuthListUsersResponseParams = { ok: boolean, users?: Array<UserProfileSummary>, error?: string, };
10
+
11
+ export type AuthLoginResponseParams = { ok: boolean, token?: string, session_id?: string, user_id?: string, username?: string, display_name?: string, role?: string, error?: string, };
12
+
13
+ export type AuthRegisterResponseParams = { ok: boolean, user_id?: string, username?: string, error?: string, };
14
+
15
+ export type UserProfileSummary = { id: string, username: string, email: string, display_name: string, role: string, is_active: boolean, };
@@ -0,0 +1,7 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+
3
+ export type BaseAckParams = { message_id: string, };
4
+
5
+ export type BaseErrorParams = { code: string, message: string, };
6
+
7
+ export type BaseHeartbeatParams = { timestamp: bigint, };
@@ -0,0 +1,71 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+
3
+ /**
4
+ * `Sync.BridgeNetwork` — the host/workspace roster response/push.
5
+ */
6
+ export type BridgeNetworkParams = { hosts: Array<HostMetrics>, workspaces: Array<WorkspaceNode>, };
7
+
8
+ /**
9
+ * Live performance snapshot for one host machine.
10
+ */
11
+ export type HostMetrics = {
12
+ /**
13
+ * Stable host id ("localhost" for self, or a polemos device id).
14
+ */
15
+ host_id: string, hostname: string, os: string,
16
+ /**
17
+ * CPU utilisation, 0..100.
18
+ */
19
+ cpu_usage_percent: number,
20
+ /**
21
+ * Logical CPU core count (shown with an i18n "cores" unit).
22
+ */
23
+ cpu_cores: number, mem_used_bytes: bigint, mem_total_bytes: bigint,
24
+ /**
25
+ * Outbound network rate (bytes/sec). Omitted when unknown.
26
+ */
27
+ net_up_bps?: bigint,
28
+ /**
29
+ * Inbound network rate (bytes/sec). Omitted when unknown.
30
+ */
31
+ net_down_bps?: bigint, };
32
+
33
+ /**
34
+ * `Sync.RequestBridgeNetwork` — request the host/workspace roster.
35
+ */
36
+ export type RequestBridgeNetworkParams = Record<symbol, never>;
37
+
38
+ /**
39
+ * noa-git status for a workspace checkout (branch / dirty / ahead / behind).
40
+ */
41
+ export type WorkspaceGitStatus = { branch: string,
42
+ /**
43
+ * Modified/untracked file count.
44
+ */
45
+ modified: number,
46
+ /**
47
+ * Commits ahead of upstream.
48
+ */
49
+ ahead: number,
50
+ /**
51
+ * Commits behind upstream.
52
+ */
53
+ behind: number,
54
+ /**
55
+ * `true` when there are uncommitted changes.
56
+ */
57
+ dirty: boolean, };
58
+
59
+ /**
60
+ * A workspace attached to a host, with its git + token-usage summary.
61
+ */
62
+ export type WorkspaceNode = { workspace_id: string, host_id: string, path: string, alias?: string, git?: WorkspaceGitStatus,
63
+ /**
64
+ * Top token consumers in this workspace (max 3).
65
+ */
66
+ token_usage: Array<WorkspaceTokenUsage>, };
67
+
68
+ /**
69
+ * One agent's token usage within a workspace (top-N entries).
70
+ */
71
+ export type WorkspaceTokenUsage = { agent: string, input: bigint, output: bigint, };
@@ -0,0 +1,51 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+
3
+ export type Agent = "HapLotes" | "SkoPeo" | "HubRis" | "KaLos" | "NeiKos" | "SkeMma" | "ApoRia" | "EleOs" | "EpieiKeia" | "OreXis" | "PhiLia" | "PoleMos" | "WebAutomation";
4
+
5
+ export type AgentBadge = string;
6
+
7
+ export type AgentErrorCode = "model_no_providers" | "model_no_models" | "model_tier_mismatch" | "model_all_excluded" | "model_env_incomplete" | "model_selection_retry_exhausted" | "llm_call_failed" | "llm_empty_response" | "llm_rate_limited" | "llm_auth_failed" | "llm_timeout" | "cosmos_no_connection" | "cosmos_tool_failed" | "cosmos_local_unavailable" | "chain_max_depth" | "chain_cycle" | "chain_failed" | "skill_failed" | "skill_empty_output" | "skill_missing_report";
8
+
9
+ export type AgentStatus = "Initializing" | "Online" | "Busy" | "Offline" | "Error";
10
+
11
+ export type CompletionOutcome = "None" | "Reported" | "Failed";
12
+
13
+ export type ContainerStatus = "created" | "running" | "paused" | "restarting" | "removing" | "exited" | "dead" | "unknown";
14
+
15
+ export type EmbeddingModel = "OpenAiSmall" | "OpenAiLarge" | "OpenAiAda" | "Custom";
16
+
17
+ export type KnowledgeBaseStatus = "Uninitialized" | "Indexing" | "Ready" | "Error";
18
+
19
+ export type LlmStream = { segments: Array<StreamSegment>, };
20
+
21
+ export type ModelTier = "Deep" | "Normal" | "Basic";
22
+
23
+ export type PeriodType = "Hour5" | "Day7" | "Month1";
24
+
25
+ /**
26
+ * Selection semantics for an inquiry (`report_type: "query"`) report's
27
+ * `preset_options`. Defaults to `Single` when omitted.
28
+ */
29
+ export type ReportSelection = "single" | "multiple";
30
+
31
+ export type ReportType = "query" | "human" | "reply" | "skill_terminal" | "skill_step" | "next_action_fallback" | "chain_max_depth" | "chain_cycle" | "skill_failed" | "skill_empty_output" | "skill_missing_report" | "error" | "system" | "pending";
32
+
33
+ export type RequestState = "Idle" | "Waiting" | "Streaming" | "Retrying" | "WaitingTool";
34
+
35
+ export type RetryReason = "EmptyOutput" | "ReportNotCaptured" | { "LlmError": { message: string, } };
36
+
37
+ export type RouteInfo = { direction: string, target: string, target_token?: string, };
38
+
39
+ export type SkillStage = { "Started": string } | { "Done": string } | { "Complete": string } | { "Failed": string } | { "ToolCall": string } | { "Retrying": [string, number, number, RetryReason | null] } | { "TryingModel": [string, string] } | { "ModelFailed": [string, string, string] } | { "Nudging": string };
40
+
41
+ export type StreamChunkKind = "Text" | "Thinking" | "DeepThinking";
42
+
43
+ export type StreamSegment = { "Text": { text: string, message_id?: string, } } | { "Thinking": { text: string, message_id?: string, } } | { "DeepThinking": { text: string, message_id?: string, } } | { "McpCall": { tool_name: string, call_id: string, params: unknown, agent_type?: string, message_id?: string, } } | { "McpResult": { tool_name: string, call_id: string, success: boolean, data: unknown, duration_ms?: bigint, agent_type?: string, message_id?: string, } };
44
+
45
+ export type StructuredAgentError = { code: AgentErrorCode, detail?: string, context: { [key in string]: string }, };
46
+
47
+ export type TaskStatus = "not_started" | "in_progress" | "paused" | "completed" | "failed" | "warning" | { "waiting": { deadline: string, handle: string, } };
48
+
49
+ export type WorkStatus = "Thinking" | "StreamingResponse" | { "Executing": { skill_name: string, } } | { "Retrying": { retry_count: number, max_retries: number, } } | "Nudging" | "Completed" | "RequestFailed" | "Failed" | "ToolLoopTerminated" | "CallingTool";
50
+
51
+ export type YoloTaskTier = "realtime" | "periodic" | "daily" | "strategic";
@@ -0,0 +1,57 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+
3
+ /**
4
+ * `Sync.FileRead` — file-content response.
5
+ */
6
+ export type FileReadParams = { target: FileTarget, path: string, content: string, size: bigint,
7
+ /**
8
+ * `true` when content was truncated to the server read cap.
9
+ */
10
+ truncated: boolean, };
11
+
12
+ /**
13
+ * A file-operation target — a (kind, id) pair plus optional workspace
14
+ * context (container slots are per-workspace).
15
+ */
16
+ export type FileTarget = { kind: FileTargetKind,
17
+ /**
18
+ * Container badge (`#demiurge` / `#001`), host id, or workspace id.
19
+ */
20
+ id: string,
21
+ /**
22
+ * Owning workspace id (container slots are workspace-scoped).
23
+ */
24
+ workspace_id?: string, };
25
+
26
+ /**
27
+ * Which filesystem a file operation targets.
28
+ */
29
+ export type FileTargetKind = "container" | "host" | "workspace";
30
+
31
+ /**
32
+ * One entry in a directory listing.
33
+ */
34
+ export type FileTreeEntry = { name: string,
35
+ /**
36
+ * `"file"` | `"dir"` | `"symlink"`.
37
+ */
38
+ kind: string, size: bigint, };
39
+
40
+ /**
41
+ * `Sync.FileTree` — directory listing response.
42
+ */
43
+ export type FileTreeParams = { target: FileTarget, path: string, entries: Array<FileTreeEntry>, };
44
+
45
+ /**
46
+ * `Sync.RequestFileRead` — read a single (text) file, capped server-side.
47
+ */
48
+ export type RequestFileReadParams = { target: FileTarget, path: string, };
49
+
50
+ /**
51
+ * `Sync.RequestFileTree` — list one level of a directory.
52
+ */
53
+ export type RequestFileTreeParams = { target: FileTarget,
54
+ /**
55
+ * Sub-path under the target root (empty/`""` = root).
56
+ */
57
+ path: string, };
@@ -0,0 +1,23 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+
3
+ export type ClientCapability = "file_relay" | "terminal" | "screen_capture" | "noa_workspace";
4
+
5
+ export type ClientNodeInfo = { hostname: string, os: string, workspace_root?: string, user_id?: string, };
6
+
7
+ export type ConnectHandshakeParams = {
8
+ /**
9
+ * Handshake wire-protocol version advertised by the client. Defaults to
10
+ * [`HANDSHAKE_VERSION`] when absent (backward-compatible with old clients).
11
+ */
12
+ protocol_version: number, token: string, session_id?: string, capabilities: Array<ClientCapability>, node_info?: ClientNodeInfo,
13
+ /**
14
+ * Stringified UUID — kept as a string on the wire so consumers
15
+ * don't need a UUID parser to round-trip the JSON-RPC payload.
16
+ */
17
+ workspace_id?: string, };
18
+
19
+ export type HandshakeAckParams = { ok: boolean, error?: string, };
20
+
21
+ export type PingParams = { timestamp: bigint, };
22
+
23
+ export type ScepterIdentityParams = { device_id: string, };
@@ -0,0 +1,72 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+
3
+ export type IndustrialAlarmAckParams = { station_id: string, address: string, acknowledged_by: string, };
4
+
5
+ /**
6
+ * Fired on threshold breach (breached=true) or clear (breached=false).
7
+ */
8
+ export type IndustrialAlarmEvent = { station_id: string, protocol: string, address: string, field_name: string, level: IndustrialAlarmLevel, value: number, threshold: number, unit: string, breached: boolean, timestamp: string, };
9
+
10
+ export type IndustrialAlarmHistory = { entries: Array<IndustrialAlarmHistoryEntry>, total: bigint, };
11
+
12
+ /**
13
+ * One entry in the historical alarm log (last N days).
14
+ */
15
+ export type IndustrialAlarmHistoryEntry = { station_id: string, protocol: string, address: string, field_name: string, level: IndustrialAlarmLevel, value: number, threshold: number, unit: string, breached: boolean, timestamp: string,
16
+ /**
17
+ * Whether an operator acknowledged the alarm, and when.
18
+ */
19
+ acknowledged: boolean, acknowledged_at?: string, acknowledged_by?: string, };
20
+
21
+ /**
22
+ * Severity ordering matches ISA-18.2 alarm severity.
23
+ */
24
+ export type IndustrialAlarmLevel = "Log" | "LowLow" | "Low" | "High" | "HighHigh" | "RateOfChange" | "Emergency";
25
+
26
+ export type IndustrialAlarmPushParams = { alarm: IndustrialAlarmEvent, };
27
+
28
+ export type IndustrialAlarmThresholds = { ll?: number, l?: number, h?: number, hh?: number, };
29
+
30
+ /**
31
+ * Phases of an evernight discovery scan. Ordered by typical progress.
32
+ */
33
+ export type IndustrialDiscoveryPhase = "TransportScan" | "ProtocolIdentify" | "DataModelScan" | "SemanticInference" | "ManifestGeneration" | "ManifestValidation" | "Complete";
34
+
35
+ export type IndustrialDiscoveryProgress = { session_id: string, phase: IndustrialDiscoveryPhase, message: string, found_devices: bigint, progress_percent: number, raw_findings?: Record<string, unknown> | null, };
36
+
37
+ export type IndustrialDiscoveryProgressPushParams = { event: IndustrialDiscoveryProgress, };
38
+
39
+ /**
40
+ * A single live reading from an industrial field (e.g. pressure cell on a
41
+ * Modbus register, S7 DBX bit). Pushed by scepter at the scan cycle of the
42
+ * underlying transport.
43
+ */
44
+ export type IndustrialSensorReading = { station_id: string, protocol: string, address: string, name: string, raw_value: number, scaled_value: number, unit: string, quality: string, timestamp: string, };
45
+
46
+ export type IndustrialStationField = { address: string, name: string, data_type: string, unit?: string, alarm?: IndustrialAlarmThresholds, current_value?: number, };
47
+
48
+ export type IndustrialStationInfo = { station_id: string, protocol: string, connection: string, device_class: string, vendor?: string, model?: string, firmware?: string, status: string, fields: Array<IndustrialStationField>, };
49
+
50
+ export type IndustrialTelemetryBatch = { readings: Array<IndustrialSensorReading>, station_id: string, timestamp: string, };
51
+
52
+ export type IndustrialTelemetryPushParams = { batch: IndustrialTelemetryBatch, };
53
+
54
+ export type IndustrialTopologyParams = { stations: Array<IndustrialStationInfo>, };
55
+
56
+ export type WriteApprovalRequest = {
57
+ /**
58
+ * Unique id assigned by the producer (orexis). The operator UI echoes it
59
+ * back in `industrial.approveWrite` so scepter's resolver can match the
60
+ * response to the pending oneshot. `#[serde(default)]` keeps the wire
61
+ * format backward-compatible with older push events that predate it.
62
+ */
63
+ request_id: string, station_id: string, protocol: string, address: string, field_name: string, current_value: number, proposed_value: number, unit: string, reason: string, agent: string, risk_level: WriteApprovalRisk, };
64
+
65
+ export type WriteApprovalRequestParams = { request: WriteApprovalRequest, };
66
+
67
+ export type WriteApprovalResponseParams = { request_id: string, approved: boolean, approved_by: string, modified_value?: number, };
68
+
69
+ /**
70
+ * Operator confirmation gate for safety-critical PLC writes.
71
+ */
72
+ export type WriteApprovalRisk = "safe" | "caution" | "critical";
@@ -0,0 +1,10 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ import type { EmbeddingModel, KnowledgeBaseStatus } from "./core";
3
+
4
+ export type GetKnowledgeBaseResponseParams = { knowledge_base?: KnowledgeBaseInfo, };
5
+
6
+ export type KbGenericResponseParams = { ok: boolean, error?: string, id?: string, };
7
+
8
+ export type KnowledgeBaseInfo = { id: string, name: string, description?: string, status: KnowledgeBaseStatus, embedding_model?: EmbeddingModel, custom_embedding_endpoint?: string, document_count: number, subscription_count: number, tags: Array<string>, created_at: string, updated_at: string, };
9
+
10
+ export type ListKnowledgeBasesResponseParams = { knowledge_bases: Array<KnowledgeBaseInfo>, };
@@ -0,0 +1,25 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+
3
+ export type CustomAgentInfo = { name: string, display_name: string, description: string, skills_count: number, source: string, version?: string, last_updated?: string, };
4
+
5
+ export type CustomAgentListResponseParams = { agents: Array<CustomAgentInfo>, };
6
+
7
+ export type Layer2AgentInfo = { name: string, description: string, mcp_count: number, skills_count: number, languages: Array<string>, enabled: boolean, };
8
+
9
+ export type Layer2AgentListResponseParams = { agents: Array<Layer2AgentInfo>, };
10
+
11
+ export type Layer2AgentMcpResponseParams = { agent_name: string, tools: Array<Layer2McpToolInfo>, };
12
+
13
+ export type Layer2AgentSkillsResponseParams = { agent_name: string, skills: Array<Layer2SkillInfo>, };
14
+
15
+ export type Layer2McpPromptResponseParams = { agent_name: string, tool: string, lang: string, content: string, name: string, };
16
+
17
+ export type Layer2McpToolInfo = { name: string, description: string, languages: Array<string>, references_layer1: Array<string>, references_layer2: Array<string>, related_items: Array<string>, referenced_by_items: Array<string>, };
18
+
19
+ export type Layer2SkillInfo = { name: string, description: string, languages: Array<string>, references_layer1: Array<string>, references_layer2: Array<string>, related_items: Array<string>, referenced_by_items: Array<string>, };
20
+
21
+ export type Layer2SkillPromptResponseParams = { agent_name: string, skill: string, lang: string, content: string, name: string, };
22
+
23
+ export type SubscribeCustomAgentResponseParams = { success: boolean, error?: string, agent?: CustomAgentInfo, skills: Array<string>, permissions: Array<string>, };
24
+
25
+ export type UnsubscribeCustomAgentResponseParams = { success: boolean, error?: string, };