@celestia-island/plana-types 0.1.8 → 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.
@@ -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, };
@@ -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, };
@@ -0,0 +1,383 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+
3
+ /**
4
+ * The base view a template is built on — the spec arm that must be set.
5
+ */
6
+ export type BaseViewKind = "waterfall" | "node-canvas" | "data-grid" | "kanban" | "blank-canvas";
7
+
8
+ /**
9
+ * The blank-canvas base's spec.
10
+ */
11
+ export type BlankCanvasSpec = {
12
+ /**
13
+ * What mounts into the canvas (a renderer id the host resolves).
14
+ */
15
+ mount: string,
16
+ /**
17
+ * Optional DOM overlay drawn above the canvas.
18
+ */
19
+ overlay?: string, };
20
+
21
+ /**
22
+ * Camera behaviour of a node canvas.
23
+ */
24
+ export type CameraSpec = {
25
+ /**
26
+ * Smallest allowed zoom factor.
27
+ */
28
+ min_zoom: number,
29
+ /**
30
+ * Largest allowed zoom factor.
31
+ */
32
+ max_zoom: number,
33
+ /**
34
+ * Zoom step as a fraction (0.05 = 5%).
35
+ */
36
+ zoom_step?: number,
37
+ /**
38
+ * Whether the camera fits the content on first paint.
39
+ */
40
+ fit_on_load: boolean, };
41
+
42
+ /**
43
+ * How a node canvas draws its layers.
44
+ */
45
+ export type CanvasBackend = "svg" | "dom-overlay-svg" | "canvas-edges-dom" | "blank";
46
+
47
+ /**
48
+ * The chrome a template asks the shell to draw around it.
49
+ */
50
+ export type ChromeSpec = {
51
+ /**
52
+ * Docked widgets this view contributes.
53
+ */
54
+ docks: Array<DockContribution>,
55
+ /**
56
+ * Whether the shell draws its breadcrumb bar.
57
+ */
58
+ breadcrumb: boolean, };
59
+
60
+ /**
61
+ * The data-grid base's spec.
62
+ */
63
+ export type DataGridSpec = {
64
+ /**
65
+ * Field schema ids this grid binds to.
66
+ */
67
+ fields: Array<string>,
68
+ /**
69
+ * Whether rows can be edited in place.
70
+ */
71
+ editable: boolean,
72
+ /**
73
+ * Optional overlay widget drawn above the grid (trend, alarms).
74
+ */
75
+ overlay?: string, };
76
+
77
+ /**
78
+ * Drag-and-drop behaviour of a kanban.
79
+ */
80
+ export type DndSpec = {
81
+ /**
82
+ * Whether cards can move between lanes.
83
+ */
84
+ across_lanes: boolean,
85
+ /**
86
+ * Whether cards can be reordered inside a lane.
87
+ */
88
+ reorder: boolean, };
89
+
90
+ /**
91
+ * The plane a dock surface sits on.
92
+ */
93
+ export type DockAnchor = "page" | "plane";
94
+
95
+ /**
96
+ * One dock widget a template hangs.
97
+ */
98
+ export type DockContribution = {
99
+ /**
100
+ * Widget id the host resolves.
101
+ */
102
+ widget: string,
103
+ /**
104
+ * Where it hangs.
105
+ */
106
+ placement: DockPlacement,
107
+ /**
108
+ * Which plane carries it.
109
+ */
110
+ anchor: DockAnchor,
111
+ /**
112
+ * Surface finish.
113
+ */
114
+ surface: DockSurface,
115
+ /**
116
+ * Stacking order among contributions sharing a placement.
117
+ */
118
+ order: number, };
119
+
120
+ /**
121
+ * Where a dock surface hangs.
122
+ */
123
+ export type DockPlacement = "top" | "bottom" | "left" | "right" | "top-left" | "top-right" | "bottom-left" | "bottom-right";
124
+
125
+ /**
126
+ * The finish of a dock surface.
127
+ */
128
+ export type DockSurface = "glass" | "solid";
129
+
130
+ /**
131
+ * How a waterfall groups its items into buckets (day sections, lanes, …).
132
+ */
133
+ export type GroupingSpec = {
134
+ /**
135
+ * Field of the item the bucket key is read from.
136
+ */
137
+ field: string,
138
+ /**
139
+ * Whether the buckets are ordered newest-first.
140
+ */
141
+ newest_first: boolean, };
142
+
143
+ /**
144
+ * The kanban base's spec.
145
+ */
146
+ export type KanbanSpec = {
147
+ /**
148
+ * Scroll directions the board supports.
149
+ */
150
+ axes: ScrollAxes,
151
+ /**
152
+ * Lane definition.
153
+ */
154
+ lanes: LaneSpec,
155
+ /**
156
+ * Draggable card kinds, in picker order.
157
+ */
158
+ card_kinds: Array<string>,
159
+ /**
160
+ * Drag-and-drop behaviour.
161
+ */
162
+ dnd: DndSpec,
163
+ /**
164
+ * Optional windowing for long boards.
165
+ */
166
+ windowing?: WindowingSpec, };
167
+
168
+ /**
169
+ * One lane of a kanban.
170
+ */
171
+ export type LaneSpec = {
172
+ /**
173
+ * Field of the item the lane key is read from.
174
+ */
175
+ field: string,
176
+ /**
177
+ * Whether the lane header is drawn as a card of its own.
178
+ */
179
+ header_is_card: boolean, };
180
+
181
+ /**
182
+ * The built-in minimap, which is on by default for node canvases.
183
+ */
184
+ export type MinimapSpec = {
185
+ /**
186
+ * Whether the minimap is drawn.
187
+ */
188
+ enabled: boolean,
189
+ /**
190
+ * Where it is anchored.
191
+ */
192
+ placement: DockPlacement, };
193
+
194
+ /**
195
+ * The node-canvas base's spec.
196
+ */
197
+ export type NodeCanvasSpec = {
198
+ /**
199
+ * Which rendering backend draws the layers.
200
+ */
201
+ backend: CanvasBackend,
202
+ /**
203
+ * Camera bounds and first-paint behaviour.
204
+ */
205
+ camera: CameraSpec,
206
+ /**
207
+ * The minimap, on by default.
208
+ */
209
+ minimap?: MinimapSpec,
210
+ /**
211
+ * Node kinds this canvas may render.
212
+ */
213
+ node_kinds: Array<string>,
214
+ /**
215
+ * Optional left rail (a node palette).
216
+ */
217
+ palette?: string,
218
+ /**
219
+ * Optional right rail (an inspector).
220
+ */
221
+ inspector?: string,
222
+ /**
223
+ * Optional auto-layout algorithm id.
224
+ */
225
+ auto_layout?: string, };
226
+
227
+ /**
228
+ * One panel template: identity, presentation and the base view's spec.
229
+ */
230
+ export type PanelTemplate = {
231
+ /**
232
+ * Template id — kebab-case, stable across config layers.
233
+ */
234
+ id: string,
235
+ /**
236
+ * Display title (the author's language).
237
+ */
238
+ title: string,
239
+ /**
240
+ * Optional i18n key; when present the shell translates it instead of
241
+ * using `title`.
242
+ */
243
+ title_key?: string,
244
+ /**
245
+ * Optional description.
246
+ */
247
+ description?: string,
248
+ /**
249
+ * Optional description i18n key.
250
+ */
251
+ description_key?: string,
252
+ /**
253
+ * Render-engine (plugin) id that draws this template.
254
+ */
255
+ render_engine: string,
256
+ /**
257
+ * The base view and its configuration.
258
+ */
259
+ spec: ViewTemplateSpec, };
260
+
261
+ /**
262
+ * Which way a kanban scrolls.
263
+ */
264
+ export type ScrollAxes = "horizontal" | "vertical" | "both";
265
+
266
+ /**
267
+ * A template file — the TOML document a workspace or plugin ships.
268
+ */
269
+ export type ViewTemplateFile = {
270
+ /**
271
+ * Format version. A reader that does not know the version must reject
272
+ * the file rather than guess — the same explicit stance the MDD
273
+ * descriptor takes for its `schema_version`.
274
+ */
275
+ version: number,
276
+ /**
277
+ * The templates the file declares.
278
+ */
279
+ template: Array<PanelTemplate>, };
280
+
281
+ /**
282
+ * The spec arm matching a template's base view.
283
+ *
284
+ * Exactly one arm is set — the one named by [`ViewTemplateSpec::base`] —
285
+ * so a reader never has to guess which of the five it is looking at.
286
+ */
287
+ export type ViewTemplateSpec = {
288
+ /**
289
+ * The base view this template is drawn on.
290
+ */
291
+ base: BaseViewKind,
292
+ /**
293
+ * Set iff `base` is `waterfall`.
294
+ */
295
+ waterfall?: WaterfallSpec,
296
+ /**
297
+ * Set iff `base` is `node-canvas`.
298
+ */
299
+ node_canvas?: NodeCanvasSpec,
300
+ /**
301
+ * Set iff `base` is `data-grid`.
302
+ */
303
+ data_grid?: DataGridSpec,
304
+ /**
305
+ * Set iff `base` is `kanban`.
306
+ */
307
+ kanban?: KanbanSpec,
308
+ /**
309
+ * Set iff `base` is `blank-canvas`.
310
+ */
311
+ blank_canvas?: BlankCanvasSpec,
312
+ /**
313
+ * Optional chrome (docks, breadcrumb).
314
+ */
315
+ chrome?: ChromeSpec, };
316
+
317
+ /**
318
+ * How a waterfall splits its item stream into columns.
319
+ */
320
+ export type WaterfallColumns = { "kind": "single" } | { "kind": "fixed",
321
+ /**
322
+ * Number of columns (>= 1).
323
+ */
324
+ count: number, } | { "kind": "adaptive",
325
+ /**
326
+ * Upper bound on the derived column count.
327
+ */
328
+ max: number,
329
+ /**
330
+ * Minimum column width in pixels.
331
+ */
332
+ min_width: number, };
333
+
334
+ /**
335
+ * The waterfall base's spec.
336
+ */
337
+ export type WaterfallSpec = {
338
+ /**
339
+ * Column layout.
340
+ */
341
+ columns: WaterfallColumns,
342
+ /**
343
+ * Optional bucketing.
344
+ */
345
+ grouping?: GroupingSpec,
346
+ /**
347
+ * Optional windowing (absent = render the whole list).
348
+ */
349
+ windowing?: WindowingSpec,
350
+ /**
351
+ * Card kinds this view may render, in picker order.
352
+ */
353
+ card_kinds: Array<string>,
354
+ /**
355
+ * Optional rail widget drawn beside the stream (a timeline).
356
+ */
357
+ rail?: string,
358
+ /**
359
+ * Optional search affordance.
360
+ */
361
+ search?: string, };
362
+
363
+ /**
364
+ * Where the windowed rows come from.
365
+ */
366
+ export type WindowingSource = "client" | "host";
367
+
368
+ /**
369
+ * Windowing parameters for a scrolling base view.
370
+ */
371
+ export type WindowingSpec = {
372
+ /**
373
+ * Which side owns the window.
374
+ */
375
+ source: WindowingSource,
376
+ /**
377
+ * Estimated row height in pixels before measurement.
378
+ */
379
+ estimated_item_height?: number,
380
+ /**
381
+ * Screens of overscan kept mounted on either side.
382
+ */
383
+ overscan_screens?: number, };
@@ -1,31 +1,5 @@
1
1
  // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
2
 
3
- /**
4
- * Dashboard layout — a collection of views arranged in a grid.
5
- */
6
- export type DashboardLayout = {
7
- /**
8
- * Workspace ID this dashboard belongs to.
9
- */
10
- workspace_id: string,
11
- /**
12
- * Dashboard name.
13
- */
14
- name: string,
15
- /**
16
- * All view instances in this dashboard.
17
- */
18
- views: Array<ViewInstance>,
19
- /**
20
- * Grid columns count (0 = auto).
21
- */
22
- grid_columns: number, };
23
-
24
- /**
25
- * Push a dashboard layout update to connected clients.
26
- */
27
- export type DashboardLayoutPushParams = { layout: DashboardLayout, };
28
-
29
3
  /**
30
4
  * A widget inside a webui dashboard descriptor (P3#A4).
31
5
  *
@@ -63,54 +37,6 @@ config?: Record<string, unknown>,
63
37
  */
64
38
  data?: Record<string, unknown>, };
65
39
 
66
- /**
67
- * View data update — incremental data push for a specific view.
68
- */
69
- export type ViewDataPushParams = {
70
- /**
71
- * Target view ID.
72
- */
73
- view_id: string,
74
- /**
75
- * Data payload (format depends on ViewKind).
76
- */
77
- data: Record<string, unknown>,
78
- /**
79
- * Whether this is a full replacement or incremental update.
80
- */
81
- full_replace: boolean, };
82
-
83
- /**
84
- * A view instance — one panel in the dashboard.
85
- */
86
- export type ViewInstance = {
87
- /**
88
- * Unique view ID within the workspace.
89
- */
90
- view_id: string,
91
- /**
92
- * What kind of renderer to use.
93
- */
94
- kind: ViewKind,
95
- /**
96
- * Display title.
97
- */
98
- title: string,
99
- /**
100
- * Data source identifier — what the view is bound to.
101
- * Examples: "industrial:station:19", "chat:conversation:abc",
102
- * "kanban:project:xyz", "media:flow:comfyui"
103
- */
104
- data_source: string,
105
- /**
106
- * View-specific configuration (JSON, interpreted by the renderer).
107
- */
108
- config: Record<string, unknown>,
109
- /**
110
- * Layout position (grid area, tab order, etc.).
111
- */
112
- layout?: ViewLayout, };
113
-
114
40
  /**
115
41
  * Widget create/update/delete on an existing layout (P3#A4).
116
42
  */
@@ -127,37 +53,3 @@ op: string,
127
53
  * Widget descriptor to create/update (ignored for delete).
128
54
  */
129
55
  widget: DashboardWidget, };
130
-
131
- /**
132
- * View type identifier — determines which frontend renderer handles the view.
133
- */
134
- export type ViewKind = "industrial_scada" | "chat" | "kanban" | "gantt" | "data_table" | "media_flow" | "file_explorer" | "custom";
135
-
136
- /**
137
- * Layout descriptor for a view within the dashboard grid.
138
- */
139
- export type ViewLayout = {
140
- /**
141
- * Grid column start (1-based).
142
- */
143
- col: number,
144
- /**
145
- * Grid row start (1-based).
146
- */
147
- row: number,
148
- /**
149
- * Column span.
150
- */
151
- col_span: number,
152
- /**
153
- * Row span.
154
- */
155
- row_span: number,
156
- /**
157
- * Minimum width in pixels.
158
- */
159
- min_width?: number,
160
- /**
161
- * Minimum height in pixels.
162
- */
163
- min_height?: number, };
package/index.ts CHANGED
@@ -59,6 +59,7 @@ export * from "./bindings/ws/stateSync";
59
59
  export * from "./bindings/ws/systemUi";
60
60
  export * from "./bindings/ws/tasks";
61
61
  export * from "./bindings/ws/views";
62
+ export * from "./bindings/ws/viewTemplate";
62
63
  export * from "./bindings/ws/workspace";
63
64
  export * from "./bindings/ws/yolo";
64
65
  export type { AnomalyDetectParams, AnomalyInfo, AnomalyResult, CausalReasonParams, CausalReasonResult, CorrelationInfo, Hypothesis, LlmChatParams, LlmChatResult, MediaAssetItem, MediaAssetRegisterResult, MediaAssetRetrieveResult, RagDbDeleteParams, RagDbDeleteResult, RagDbReadParams, RagDbReadResult, RagDbStatsParams, RagDbStatsResult, RagDbWriteParams, RagDbWriteResult, RagDocResult, TranslateReportParams, TranslateReportResult, WorkspaceIndexParams, WorkspaceIndexResult, WorkspaceSearchDoc, WorkspaceSearchParams, WorkspaceSearchResult, WorkspaceStatusResult } from "./bindings/tools/aporia";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@celestia-island/plana-types",
3
- "version": "0.1.8",
3
+ "version": "0.1.10",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/celestia-island/plana"