@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,282 @@
1
+ use crate::enums::{GoalStatus, GoalTaskStatus, TrackStatus};
2
+
3
+ // ═══════════════════════════════════════════════════════════════════════════════
4
+ // Goal / Track / GoalTask — replaces the old OKR system
5
+ // ═══════════════════════════════════════════════════════════════════════════════
6
+
7
+ // ── Goal result types ──
8
+
9
+ #[derive(Debug, Clone, serde::Serialize, serde::Deserialize, ts_rs::TS)]
10
+ #[ts(export, export_to = "mcp/skopeo.ts")]
11
+ pub struct GoalEntry {
12
+ pub id: String,
13
+ pub title: String,
14
+ pub description: Option<String>,
15
+ pub status: GoalStatus,
16
+ pub priority: u32,
17
+ pub owner: String,
18
+ pub parent_goal_id: Option<String>,
19
+ pub workspace_ids: Vec<String>,
20
+ pub alignment_score: Option<f64>,
21
+ pub created_at: String,
22
+ pub updated_at: String,
23
+ }
24
+
25
+ #[derive(Debug, Clone, serde::Serialize, serde::Deserialize, ts_rs::TS)]
26
+ #[ts(export, export_to = "mcp/skopeo.ts")]
27
+ pub struct GoalCreateResult {
28
+ pub goal_id: String,
29
+ pub title: String,
30
+ pub status: GoalStatus,
31
+ pub workspace_ids: Vec<String>,
32
+ }
33
+
34
+ #[derive(Debug, Clone, serde::Serialize, serde::Deserialize, ts_rs::TS)]
35
+ #[ts(export, export_to = "mcp/skopeo.ts")]
36
+ pub struct GoalUpdateResult {
37
+ pub goal_id: String,
38
+ pub title: String,
39
+ pub status: GoalStatus,
40
+ }
41
+
42
+ #[derive(Debug, Clone, serde::Serialize, serde::Deserialize, ts_rs::TS)]
43
+ #[ts(export, export_to = "mcp/skopeo.ts")]
44
+ pub struct GoalCloseResult {
45
+ pub goal_id: String,
46
+ pub status: GoalStatus,
47
+ }
48
+
49
+ #[derive(Debug, Clone, serde::Serialize, serde::Deserialize, ts_rs::TS)]
50
+ #[ts(export, export_to = "mcp/skopeo.ts")]
51
+ pub struct GoalListResult {
52
+ pub count: usize,
53
+ pub goals: Vec<GoalEntry>,
54
+ }
55
+
56
+ // ── Track result types ──
57
+
58
+ #[derive(Debug, Clone, serde::Serialize, serde::Deserialize, ts_rs::TS)]
59
+ #[ts(export, export_to = "mcp/skopeo.ts")]
60
+ pub struct TrackEntry {
61
+ pub id: String,
62
+ pub goal_id: String,
63
+ pub title: String,
64
+ pub description: Option<String>,
65
+ pub status: TrackStatus,
66
+ pub target_value: Option<f64>,
67
+ pub current_value: f64,
68
+ pub unit: Option<String>,
69
+ pub weight: f64,
70
+ pub due_at: Option<String>,
71
+ pub workspace_ids: Vec<String>,
72
+ pub created_at: String,
73
+ pub updated_at: String,
74
+ }
75
+
76
+ #[derive(Debug, Clone, serde::Serialize, serde::Deserialize, ts_rs::TS)]
77
+ #[ts(export, export_to = "mcp/skopeo.ts")]
78
+ pub struct TrackCreateResult {
79
+ pub track_id: String,
80
+ pub goal_id: String,
81
+ pub title: String,
82
+ pub status: TrackStatus,
83
+ }
84
+
85
+ #[derive(Debug, Clone, serde::Serialize, serde::Deserialize, ts_rs::TS)]
86
+ #[ts(export, export_to = "mcp/skopeo.ts")]
87
+ pub struct TrackUpdateResult {
88
+ pub track_id: String,
89
+ pub title: String,
90
+ pub status: TrackStatus,
91
+ pub current_value: f64,
92
+ pub target_value: Option<f64>,
93
+ }
94
+
95
+ #[derive(Debug, Clone, serde::Serialize, serde::Deserialize, ts_rs::TS)]
96
+ #[ts(export, export_to = "mcp/skopeo.ts")]
97
+ pub struct TrackCloseResult {
98
+ pub track_id: String,
99
+ pub status: TrackStatus,
100
+ }
101
+
102
+ // ── GoalTask result types ──
103
+
104
+ #[derive(Debug, Clone, serde::Serialize, serde::Deserialize, ts_rs::TS)]
105
+ #[ts(export, export_to = "mcp/skopeo.ts")]
106
+ pub struct GoalTaskEntry {
107
+ pub id: String,
108
+ pub track_id: String,
109
+ pub title: String,
110
+ pub description: Option<String>,
111
+ pub status: GoalTaskStatus,
112
+ pub assignee: Option<String>,
113
+ pub effort_estimate: Option<String>,
114
+ pub due_at: Option<String>,
115
+ pub workspace_ids: Vec<String>,
116
+ pub created_at: String,
117
+ pub updated_at: String,
118
+ }
119
+
120
+ #[derive(Debug, Clone, serde::Serialize, serde::Deserialize, ts_rs::TS)]
121
+ #[ts(export, export_to = "mcp/skopeo.ts")]
122
+ pub struct GoalTaskCreateResult {
123
+ pub task_id: String,
124
+ pub track_id: String,
125
+ pub title: String,
126
+ pub status: GoalTaskStatus,
127
+ pub workspace_ids: Vec<String>,
128
+ }
129
+
130
+ #[derive(Debug, Clone, serde::Serialize, serde::Deserialize, ts_rs::TS)]
131
+ #[ts(export, export_to = "mcp/skopeo.ts")]
132
+ pub struct GoalTaskUpdateResult {
133
+ pub task_id: String,
134
+ pub title: String,
135
+ pub status: GoalTaskStatus,
136
+ }
137
+
138
+ #[derive(Debug, Clone, serde::Serialize, serde::Deserialize, ts_rs::TS)]
139
+ #[ts(export, export_to = "mcp/skopeo.ts")]
140
+ pub struct GoalTaskCompleteResult {
141
+ pub task_id: String,
142
+ pub status: GoalTaskStatus,
143
+ }
144
+
145
+ #[derive(Debug, Clone, serde::Serialize, serde::Deserialize, ts_rs::TS)]
146
+ #[ts(export, export_to = "mcp/skopeo.ts")]
147
+ pub struct GoalTaskListResult {
148
+ pub count: usize,
149
+ pub tasks: Vec<GoalTaskEntry>,
150
+ }
151
+
152
+ // ── Alignment check ──
153
+
154
+ #[derive(Debug, Clone, serde::Serialize, serde::Deserialize, ts_rs::TS)]
155
+ #[ts(export, export_to = "mcp/skopeo.ts")]
156
+ pub struct AlignmentCheckResult {
157
+ pub goal_id: String,
158
+ pub alignment_status: String,
159
+ pub score: f64,
160
+ pub recommendations: String,
161
+ }
162
+
163
+ // ── Param types ──
164
+
165
+ #[derive(Debug, Clone, serde::Serialize, serde::Deserialize, ts_rs::TS)]
166
+ #[ts(export, export_to = "mcp/skopeo.ts")]
167
+ pub struct GoalCreateParams {
168
+ pub title: String,
169
+ pub description: Option<String>,
170
+ pub priority: Option<u32>,
171
+ pub owner: Option<String>,
172
+ pub parent_goal_id: Option<String>,
173
+ pub workspace_ids: Option<Vec<String>>,
174
+ }
175
+
176
+ #[derive(Debug, Clone, serde::Serialize, serde::Deserialize, ts_rs::TS)]
177
+ #[ts(export, export_to = "mcp/skopeo.ts")]
178
+ pub struct GoalUpdateParams {
179
+ pub goal_id: String,
180
+ pub title: Option<String>,
181
+ pub description: Option<String>,
182
+ pub priority: Option<u32>,
183
+ pub status: Option<String>,
184
+ }
185
+
186
+ #[derive(Debug, Clone, serde::Serialize, serde::Deserialize, ts_rs::TS)]
187
+ #[ts(export, export_to = "mcp/skopeo.ts")]
188
+ pub struct GoalCloseParams {
189
+ pub goal_id: String,
190
+ pub outcome: Option<String>,
191
+ }
192
+
193
+ #[derive(Debug, Clone, serde::Serialize, serde::Deserialize, ts_rs::TS)]
194
+ #[ts(export, export_to = "mcp/skopeo.ts")]
195
+ pub struct GoalListParams {
196
+ pub workspace_id: Option<String>,
197
+ pub status: Option<String>,
198
+ pub parent_goal_id: Option<String>,
199
+ pub limit: Option<u32>,
200
+ }
201
+
202
+ #[derive(Debug, Clone, serde::Serialize, serde::Deserialize, ts_rs::TS)]
203
+ #[ts(export, export_to = "mcp/skopeo.ts")]
204
+ pub struct TrackCreateParams {
205
+ pub goal_id: String,
206
+ pub title: String,
207
+ pub description: Option<String>,
208
+ pub target_value: Option<f64>,
209
+ pub current_value: Option<f64>,
210
+ pub unit: Option<String>,
211
+ pub weight: Option<f64>,
212
+ pub due_at: Option<String>,
213
+ pub workspace_ids: Option<Vec<String>>,
214
+ }
215
+
216
+ #[derive(Debug, Clone, serde::Serialize, serde::Deserialize, ts_rs::TS)]
217
+ #[ts(export, export_to = "mcp/skopeo.ts")]
218
+ pub struct TrackUpdateParams {
219
+ pub track_id: String,
220
+ pub title: Option<String>,
221
+ pub target_value: Option<f64>,
222
+ pub current_value: Option<f64>,
223
+ pub status: Option<String>,
224
+ pub weight: Option<f64>,
225
+ }
226
+
227
+ #[derive(Debug, Clone, serde::Serialize, serde::Deserialize, ts_rs::TS)]
228
+ #[ts(export, export_to = "mcp/skopeo.ts")]
229
+ pub struct TrackCloseParams {
230
+ pub track_id: String,
231
+ pub outcome: Option<String>,
232
+ }
233
+
234
+ #[derive(Debug, Clone, serde::Serialize, serde::Deserialize, ts_rs::TS)]
235
+ #[ts(export, export_to = "mcp/skopeo.ts")]
236
+ pub struct GoalTaskCreateParams {
237
+ pub track_id: String,
238
+ pub title: String,
239
+ pub description: Option<String>,
240
+ pub assignee: Option<String>,
241
+ pub effort_estimate: Option<String>,
242
+ pub due_at: Option<String>,
243
+ pub workspace_ids: Option<Vec<String>>,
244
+ pub parent_task_id: Option<String>,
245
+ }
246
+
247
+ #[derive(Debug, Clone, serde::Serialize, serde::Deserialize, ts_rs::TS)]
248
+ #[ts(export, export_to = "mcp/skopeo.ts")]
249
+ pub struct GoalTaskUpdateParams {
250
+ pub task_id: String,
251
+ pub title: Option<String>,
252
+ pub description: Option<String>,
253
+ pub status: Option<String>,
254
+ pub assignee: Option<String>,
255
+ #[ts(type = "Record<string, unknown> | null")]
256
+ pub result: Option<serde_json::Value>,
257
+ }
258
+
259
+ #[derive(Debug, Clone, serde::Serialize, serde::Deserialize, ts_rs::TS)]
260
+ #[ts(export, export_to = "mcp/skopeo.ts")]
261
+ pub struct GoalTaskCompleteParams {
262
+ pub task_id: String,
263
+ #[ts(type = "Record<string, unknown> | null")]
264
+ pub result: Option<serde_json::Value>,
265
+ }
266
+
267
+ #[derive(Debug, Clone, serde::Serialize, serde::Deserialize, ts_rs::TS)]
268
+ #[ts(export, export_to = "mcp/skopeo.ts")]
269
+ pub struct GoalTaskListParams {
270
+ pub track_id: Option<String>,
271
+ pub goal_id: Option<String>,
272
+ pub workspace_id: Option<String>,
273
+ pub status: Option<String>,
274
+ pub assignee: Option<String>,
275
+ pub limit: Option<u32>,
276
+ }
277
+
278
+ #[derive(Debug, Clone, serde::Serialize, serde::Deserialize, ts_rs::TS)]
279
+ #[ts(export, export_to = "mcp/skopeo.ts")]
280
+ pub struct AlignmentCheckParams {
281
+ pub goal_id: String,
282
+ }
@@ -0,0 +1,122 @@
1
+ use serde::{Deserialize, Serialize};
2
+
3
+ #[derive(Debug, Clone, Serialize, Deserialize, ts_rs::TS)]
4
+ #[ts(export, export_to = "mcp/webAutomation.ts")]
5
+ pub struct BrowserInstanceInfo {
6
+ pub browser_id: String,
7
+ pub browser_type: String,
8
+ pub headless: bool,
9
+ pub window_size: String,
10
+ }
11
+
12
+ #[derive(Debug, Clone, Serialize, Deserialize, ts_rs::TS)]
13
+ #[ts(export, export_to = "mcp/webAutomation.ts")]
14
+ pub struct BrowserCreateResult {
15
+ pub browser_id: String,
16
+ pub browser_type: String,
17
+ pub headless: bool,
18
+ pub window_size: String,
19
+ }
20
+
21
+ #[derive(Debug, Clone, Serialize, Deserialize, ts_rs::TS)]
22
+ #[ts(export, export_to = "mcp/webAutomation.ts")]
23
+ pub struct BrowserCloseResult {
24
+ pub browser_id: String,
25
+ pub status: String,
26
+ }
27
+
28
+ #[derive(Debug, Clone, Serialize, Deserialize, ts_rs::TS)]
29
+ #[ts(export, export_to = "mcp/webAutomation.ts")]
30
+ pub struct BrowserListResult {
31
+ pub instances: Vec<BrowserInstanceInfo>,
32
+ }
33
+
34
+ #[derive(Debug, Clone, Serialize, Deserialize, ts_rs::TS)]
35
+ #[ts(export, export_to = "mcp/webAutomation.ts")]
36
+ pub struct BrowserNavigateResult {
37
+ pub browser_id: String,
38
+ pub final_url: String,
39
+ pub title: String,
40
+ pub http_status: u16,
41
+ }
42
+
43
+ #[derive(Debug, Clone, Serialize, Deserialize, ts_rs::TS)]
44
+ #[ts(export, export_to = "mcp/webAutomation.ts")]
45
+ pub struct BrowserScreenshotResult {
46
+ pub browser_id: String,
47
+ pub format: String,
48
+ pub width: u32,
49
+ pub height: u32,
50
+ pub data_base64: String,
51
+ }
52
+
53
+ #[derive(Debug, Clone, Serialize, Deserialize, ts_rs::TS)]
54
+ #[ts(export, export_to = "mcp/webAutomation.ts")]
55
+ pub struct BrowserScriptResult {
56
+ pub browser_id: String,
57
+ #[ts(type = "Record<string, unknown>")]
58
+ pub result: serde_json::Value,
59
+ pub return_type: String,
60
+ }
61
+
62
+ #[derive(Debug, Clone, Serialize, Deserialize, ts_rs::TS)]
63
+ #[ts(export, export_to = "mcp/webAutomation.ts")]
64
+ pub struct BrowserConsoleLogEntry {
65
+ pub level: String,
66
+ pub text: String,
67
+ pub timestamp: String,
68
+ }
69
+
70
+ #[derive(Debug, Clone, Serialize, Deserialize, ts_rs::TS)]
71
+ #[ts(export, export_to = "mcp/webAutomation.ts")]
72
+ pub struct BrowserConsoleLogsResult {
73
+ pub browser_id: String,
74
+ pub entries: Vec<BrowserConsoleLogEntry>,
75
+ }
76
+
77
+ #[derive(Debug, Clone, Serialize, Deserialize, ts_rs::TS)]
78
+ #[ts(export, export_to = "mcp/webAutomation.ts")]
79
+ pub struct BrowserNetworkEntry {
80
+ pub method: String,
81
+ pub url: String,
82
+ pub status: String,
83
+ pub content_type: String,
84
+ }
85
+
86
+ #[derive(Debug, Clone, Serialize, Deserialize, ts_rs::TS)]
87
+ #[ts(export, export_to = "mcp/webAutomation.ts")]
88
+ pub struct BrowserNetworkLogsResult {
89
+ pub browser_id: String,
90
+ pub entries: Vec<BrowserNetworkEntry>,
91
+ }
92
+
93
+ #[derive(Debug, Clone, Serialize, Deserialize, ts_rs::TS)]
94
+ #[ts(export, export_to = "mcp/webAutomation.ts")]
95
+ pub struct BrowserKeypressResult {
96
+ pub browser_id: String,
97
+ pub key: String,
98
+ }
99
+
100
+ #[derive(Debug, Clone, Serialize, Deserialize, ts_rs::TS)]
101
+ #[ts(export, export_to = "mcp/webAutomation.ts")]
102
+ pub struct BrowserMouseClickResult {
103
+ pub browser_id: String,
104
+ pub selector: String,
105
+ }
106
+
107
+ #[derive(Debug, Clone, Serialize, Deserialize, ts_rs::TS)]
108
+ #[ts(export, export_to = "mcp/webAutomation.ts")]
109
+ pub struct BrowserMouseMoveResult {
110
+ pub browser_id: String,
111
+ pub x: f64,
112
+ pub y: f64,
113
+ }
114
+
115
+ #[derive(Debug, Clone, Serialize, Deserialize, ts_rs::TS)]
116
+ #[ts(export, export_to = "mcp/webAutomation.ts")]
117
+ pub struct BrowserRecordResult {
118
+ pub browser_id: String,
119
+ pub action: String,
120
+ pub status: String,
121
+ pub file_path: Option<String>,
122
+ }