@elaraai/e3-api-server 0.0.2-beta.8 → 1.0.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 (129) hide show
  1. package/LICENSE.md +4 -0
  2. package/README.md +194 -43
  3. package/dist/src/async-operation-state.d.ts +37 -0
  4. package/dist/src/async-operation-state.d.ts.map +1 -0
  5. package/dist/src/async-operation-state.js +118 -0
  6. package/dist/src/async-operation-state.js.map +1 -0
  7. package/dist/src/auth/device.d.ts +26 -0
  8. package/dist/src/auth/device.d.ts.map +1 -0
  9. package/dist/src/auth/device.js +227 -0
  10. package/dist/src/auth/device.js.map +1 -0
  11. package/dist/src/auth/discovery.d.ts +23 -0
  12. package/dist/src/auth/discovery.d.ts.map +1 -0
  13. package/dist/src/auth/discovery.js +40 -0
  14. package/dist/src/auth/discovery.js.map +1 -0
  15. package/dist/src/auth/index.d.ts +56 -0
  16. package/dist/src/auth/index.d.ts.map +1 -0
  17. package/dist/src/auth/index.js +69 -0
  18. package/dist/src/auth/index.js.map +1 -0
  19. package/dist/src/auth/keys.d.ts +55 -0
  20. package/dist/src/auth/keys.d.ts.map +1 -0
  21. package/dist/src/auth/keys.js +78 -0
  22. package/dist/src/auth/keys.js.map +1 -0
  23. package/dist/src/beast2.d.ts +15 -3
  24. package/dist/src/beast2.d.ts.map +1 -1
  25. package/dist/src/beast2.js +38 -8
  26. package/dist/src/beast2.js.map +1 -1
  27. package/dist/src/cli.js +58 -6
  28. package/dist/src/cli.js.map +1 -1
  29. package/dist/src/errors.d.ts +11 -0
  30. package/dist/src/errors.d.ts.map +1 -1
  31. package/dist/src/errors.js +95 -2
  32. package/dist/src/errors.js.map +1 -1
  33. package/dist/src/handlers/dataflow.d.ts +43 -0
  34. package/dist/src/handlers/dataflow.d.ts.map +1 -0
  35. package/dist/src/handlers/dataflow.js +363 -0
  36. package/dist/src/handlers/dataflow.js.map +1 -0
  37. package/dist/src/handlers/datasets.d.ts +39 -0
  38. package/dist/src/handlers/datasets.d.ts.map +1 -0
  39. package/dist/src/handlers/datasets.js +232 -0
  40. package/dist/src/handlers/datasets.js.map +1 -0
  41. package/dist/src/handlers/datasets.spec.d.ts +6 -0
  42. package/dist/src/handlers/datasets.spec.d.ts.map +1 -0
  43. package/dist/src/handlers/datasets.spec.js +151 -0
  44. package/dist/src/handlers/datasets.spec.js.map +1 -0
  45. package/dist/src/handlers/index.d.ts +11 -0
  46. package/dist/src/handlers/index.d.ts.map +1 -0
  47. package/dist/src/handlers/index.js +11 -0
  48. package/dist/src/handlers/index.js.map +1 -0
  49. package/dist/src/handlers/packages.d.ts +18 -0
  50. package/dist/src/handlers/packages.d.ts.map +1 -0
  51. package/dist/src/handlers/packages.js +51 -0
  52. package/dist/src/handlers/packages.js.map +1 -0
  53. package/dist/src/handlers/repository.d.ts +24 -0
  54. package/dist/src/handlers/repository.d.ts.map +1 -0
  55. package/dist/src/handlers/repository.js +79 -0
  56. package/dist/src/handlers/repository.js.map +1 -0
  57. package/dist/src/handlers/tasks.d.ts +18 -0
  58. package/dist/src/handlers/tasks.d.ts.map +1 -0
  59. package/dist/src/handlers/tasks.js +136 -0
  60. package/dist/src/handlers/tasks.js.map +1 -0
  61. package/dist/src/handlers/workspaces.d.ts +34 -0
  62. package/dist/src/handlers/workspaces.d.ts.map +1 -0
  63. package/dist/src/handlers/workspaces.js +225 -0
  64. package/dist/src/handlers/workspaces.js.map +1 -0
  65. package/dist/src/index.d.ts +3 -0
  66. package/dist/src/index.d.ts.map +1 -1
  67. package/dist/src/index.js +6 -0
  68. package/dist/src/index.js.map +1 -1
  69. package/dist/src/middleware/auth.d.ts +51 -0
  70. package/dist/src/middleware/auth.d.ts.map +1 -0
  71. package/dist/src/middleware/auth.js +158 -0
  72. package/dist/src/middleware/auth.js.map +1 -0
  73. package/dist/src/orchestrator-manager.d.ts +45 -0
  74. package/dist/src/orchestrator-manager.d.ts.map +1 -0
  75. package/dist/src/orchestrator-manager.js +150 -0
  76. package/dist/src/orchestrator-manager.js.map +1 -0
  77. package/dist/src/routes/data.d.ts +21 -0
  78. package/dist/src/routes/data.d.ts.map +1 -0
  79. package/dist/src/routes/data.js +123 -0
  80. package/dist/src/routes/data.js.map +1 -0
  81. package/dist/src/routes/datasets.d.ts +2 -1
  82. package/dist/src/routes/datasets.d.ts.map +1 -1
  83. package/dist/src/routes/datasets.js +59 -83
  84. package/dist/src/routes/datasets.js.map +1 -1
  85. package/dist/src/routes/executions.d.ts +2 -1
  86. package/dist/src/routes/executions.d.ts.map +1 -1
  87. package/dist/src/routes/executions.js +54 -287
  88. package/dist/src/routes/executions.js.map +1 -1
  89. package/dist/src/routes/index.d.ts +15 -0
  90. package/dist/src/routes/index.d.ts.map +1 -0
  91. package/dist/src/routes/index.js +15 -0
  92. package/dist/src/routes/index.js.map +1 -0
  93. package/dist/src/routes/objects.d.ts +8 -0
  94. package/dist/src/routes/objects.d.ts.map +1 -0
  95. package/dist/src/routes/objects.js +37 -0
  96. package/dist/src/routes/objects.js.map +1 -0
  97. package/dist/src/routes/package-transfer.d.ts +23 -0
  98. package/dist/src/routes/package-transfer.d.ts.map +1 -0
  99. package/dist/src/routes/package-transfer.js +152 -0
  100. package/dist/src/routes/package-transfer.js.map +1 -0
  101. package/dist/src/routes/packages.d.ts +2 -1
  102. package/dist/src/routes/packages.d.ts.map +1 -1
  103. package/dist/src/routes/packages.js +18 -109
  104. package/dist/src/routes/packages.js.map +1 -1
  105. package/dist/src/routes/repository.d.ts +2 -1
  106. package/dist/src/routes/repository.d.ts.map +1 -1
  107. package/dist/src/routes/repository.js +19 -54
  108. package/dist/src/routes/repository.js.map +1 -1
  109. package/dist/src/routes/tasks.d.ts +2 -1
  110. package/dist/src/routes/tasks.d.ts.map +1 -1
  111. package/dist/src/routes/tasks.js +22 -46
  112. package/dist/src/routes/tasks.js.map +1 -1
  113. package/dist/src/routes/transfer.d.ts +19 -0
  114. package/dist/src/routes/transfer.d.ts.map +1 -0
  115. package/dist/src/routes/transfer.js +124 -0
  116. package/dist/src/routes/transfer.js.map +1 -0
  117. package/dist/src/routes/workspaces.d.ts +2 -1
  118. package/dist/src/routes/workspaces.d.ts.map +1 -1
  119. package/dist/src/routes/workspaces.js +83 -112
  120. package/dist/src/routes/workspaces.js.map +1 -1
  121. package/dist/src/server.d.ts +24 -3
  122. package/dist/src/server.d.ts.map +1 -1
  123. package/dist/src/server.js +270 -19
  124. package/dist/src/server.js.map +1 -1
  125. package/dist/src/types.d.ts +786 -1223
  126. package/dist/src/types.d.ts.map +1 -1
  127. package/dist/src/types.js +65 -407
  128. package/dist/src/types.js.map +1 -1
  129. package/package.json +28 -16
package/LICENSE.md CHANGED
@@ -34,6 +34,10 @@ On the Change Date (four years after each release), the Licensed Work will be ma
34
34
 
35
35
  THE LICENSED WORK IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND. THE LICENSOR DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
36
36
 
37
+ ### Package-Specific Licenses
38
+
39
+ Individual packages within this repository may have different licensing terms. See the LICENSE.md file in each package directory for details.
40
+
37
41
  ## Commercial Licensing
38
42
 
39
43
  To obtain a commercial license for Production Use, contact:
package/README.md CHANGED
@@ -12,88 +12,183 @@ npm install @elaraai/e3-api-server
12
12
 
13
13
  REST API server exposing e3-core operations over HTTP. Uses BEAST2 binary serialization for efficient request/response encoding.
14
14
 
15
+ Supports two modes:
16
+ - **Single-repo mode**: Serve one repository, accessed via `/repos/default`
17
+ - **Multi-repo mode**: Serve multiple repositories from a directory, accessed via `/repos/:name`
18
+
15
19
  ## CLI Usage
16
20
 
17
21
  ```bash
18
- # Start server on default port 3000
19
- e3-api-server /path/to/.e3
22
+ # Single repository mode
23
+ e3-api-server --repo /path/to/repo
24
+ e3-api-server --repo /path/to/repo --port 8080 --cors
25
+
26
+ # Multi-repository mode (serves repos from subdirectories)
27
+ e3-api-server --repos /path/to/repos-dir
28
+
29
+ # With OIDC authentication
30
+ e3-api-server --repo /path/to/repo --oidc
20
31
 
21
32
  # Custom port and host
22
- e3-api-server /path/to/.e3 --port 8080 --host 0.0.0.0
33
+ e3-api-server --repo /path/to/repo --port 8080 --host 0.0.0.0
23
34
  ```
24
35
 
36
+ ### CLI Options
37
+
38
+ | Option | Description |
39
+ |--------|-------------|
40
+ | `--repo <path>` | Single repository mode - serve one repo at `/repos/default` |
41
+ | `--repos <dir>` | Multi-repo mode - serve repos from subdirectories |
42
+ | `-p, --port <port>` | HTTP port (default: 3000) |
43
+ | `-H, --host <host>` | Bind address (default: localhost) |
44
+ | `--cors` | Enable CORS for cross-origin requests |
45
+ | `--oidc` | Enable built-in OIDC authentication provider |
46
+ | `--token-expiry <duration>` | Access token expiry, e.g., "5s", "15m", "1h" (default: 1h) |
47
+ | `--refresh-token-expiry <duration>` | Refresh token expiry, e.g., "7d", "90d" (default: 90d) |
48
+
25
49
  ## Programmatic Usage
26
50
 
51
+ ### Single Repository (Embedded Server)
52
+
53
+ For embedding in applications like VS Code extensions:
54
+
27
55
  ```typescript
28
56
  import { createServer } from '@elaraai/e3-api-server';
29
57
 
30
- const server = createServer({
31
- repo: '/path/to/.e3',
58
+ // createServer is async
59
+ const server = await createServer({
60
+ singleRepoPath: '/path/to/repo',
32
61
  port: 3000,
33
62
  host: 'localhost',
63
+ cors: true, // Enable for webview/cross-origin access
34
64
  });
35
65
 
36
66
  await server.start();
37
- console.log(`Server listening on port ${server.port}`);
67
+ console.log(`Server listening on http://localhost:${server.port}`);
68
+ console.log('Access repository via: /repos/default');
38
69
 
39
70
  // Graceful shutdown
40
71
  await server.stop();
41
72
  ```
42
73
 
74
+ ### Multi-Repository Mode
75
+
76
+ For serving multiple repositories:
77
+
78
+ ```typescript
79
+ import { createServer } from '@elaraai/e3-api-server';
80
+
81
+ const server = await createServer({
82
+ reposDir: '/path/to/repos', // Each subdirectory is a repo
83
+ port: 3000,
84
+ host: 'localhost',
85
+ });
86
+
87
+ await server.start();
88
+ // Repos accessible at /repos/repo1, /repos/repo2, etc.
89
+ ```
90
+
91
+ ### With Authentication
92
+
93
+ ```typescript
94
+ import { createServer } from '@elaraai/e3-api-server';
95
+
96
+ const server = await createServer({
97
+ singleRepoPath: '/path/to/repo',
98
+ port: 3000,
99
+ oidc: {
100
+ baseUrl: 'http://localhost:3000',
101
+ tokenExpiry: '1h',
102
+ refreshTokenExpiry: '90d',
103
+ },
104
+ });
105
+
106
+ await server.start();
107
+ // OIDC endpoints available at /.well-known/*, /oauth2/*, /device
108
+ ```
109
+
110
+ ### ServerConfig Options
111
+
112
+ ```typescript
113
+ interface ServerConfig {
114
+ // Repository mode (specify exactly one)
115
+ singleRepoPath?: string; // Single repo at /repos/default
116
+ reposDir?: string; // Multi-repo from subdirectories
117
+
118
+ // Server options
119
+ port?: number; // Default: 3000
120
+ host?: string; // Default: 'localhost'
121
+ cors?: boolean; // Enable CORS (default: false)
122
+
123
+ // Authentication (optional)
124
+ auth?: AuthConfig; // External JWT validation
125
+ oidc?: OidcConfig; // Built-in OIDC provider
126
+ }
127
+ ```
128
+
43
129
  ## API Endpoints
44
130
 
131
+ All endpoints are prefixed with `/api/repos/:repo` where `:repo` is:
132
+ - `default` in single-repo mode
133
+ - The repository name in multi-repo mode
134
+
45
135
  ### Repository
46
136
 
47
137
  | Method | Endpoint | Description |
48
138
  |--------|----------|-------------|
49
- | GET | `/api/status` | Repository status (path, object/package/workspace counts) |
50
- | POST | `/api/gc` | Garbage collection |
139
+ | GET | `/api/repos` | List available repositories (multi-repo mode) |
140
+ | PUT | `/api/repos/:repo` | Create repository (multi-repo mode) |
141
+ | DELETE | `/api/repos/:repo` | Delete repository (multi-repo mode, async) |
142
+ | GET | `/api/repos/:repo/status` | Repository status (counts) |
143
+ | POST | `/api/repos/:repo/gc` | Start garbage collection (async) |
144
+ | GET | `/api/repos/:repo/gc/:id` | Get GC status |
51
145
 
52
146
  ### Packages
53
147
 
54
148
  | Method | Endpoint | Description |
55
149
  |--------|----------|-------------|
56
- | GET | `/api/packages` | List all packages |
57
- | GET | `/api/packages/:name/:version` | Get package details |
58
- | POST | `/api/packages` | Import package (zip body) |
59
- | GET | `/api/packages/:name/:version/export` | Export package as zip |
60
- | DELETE | `/api/packages/:name/:version` | Remove package |
150
+ | GET | `/api/repos/:repo/packages` | List all packages |
151
+ | GET | `/api/repos/:repo/packages/:name/:version` | Get package details |
152
+ | POST | `/api/repos/:repo/packages` | Import package (zip body) |
153
+ | GET | `/api/repos/:repo/packages/:name/:version/export` | Export package as zip |
154
+ | DELETE | `/api/repos/:repo/packages/:name/:version` | Remove package |
61
155
 
62
156
  ### Workspaces
63
157
 
64
158
  | Method | Endpoint | Description |
65
159
  |--------|----------|-------------|
66
- | GET | `/api/workspaces` | List all workspaces |
67
- | POST | `/api/workspaces` | Create workspace |
68
- | GET | `/api/workspaces/:ws` | Get workspace info |
69
- | GET | `/api/workspaces/:ws/status` | Get workspace status (datasets, tasks, summary) |
70
- | POST | `/api/workspaces/:ws/deploy` | Deploy package to workspace |
71
- | DELETE | `/api/workspaces/:ws` | Remove workspace |
160
+ | GET | `/api/repos/:repo/workspaces` | List all workspaces |
161
+ | POST | `/api/repos/:repo/workspaces` | Create workspace |
162
+ | GET | `/api/repos/:repo/workspaces/:ws` | Get workspace info |
163
+ | GET | `/api/repos/:repo/workspaces/:ws/status` | Get workspace status (datasets, tasks, summary) |
164
+ | POST | `/api/repos/:repo/workspaces/:ws/deploy` | Deploy package to workspace |
165
+ | DELETE | `/api/repos/:repo/workspaces/:ws` | Remove workspace |
166
+ | GET | `/api/repos/:repo/workspaces/:ws/export` | Export workspace as package zip |
72
167
 
73
168
  ### Datasets
74
169
 
75
170
  | Method | Endpoint | Description |
76
171
  |--------|----------|-------------|
77
- | GET | `/api/workspaces/:ws/list` | List root dataset fields |
78
- | GET | `/api/workspaces/:ws/list/*path` | List nested dataset fields |
79
- | GET | `/api/workspaces/:ws/get/*path` | Get dataset value (BEAST2) |
80
- | PUT | `/api/workspaces/:ws/set/*path` | Set dataset value (BEAST2) |
172
+ | GET | `/api/repos/:repo/workspaces/:ws/datasets` | List root datasets |
173
+ | GET | `/api/repos/:repo/workspaces/:ws/datasets/*path` | Get dataset value (BEAST2) |
174
+ | PUT | `/api/repos/:repo/workspaces/:ws/datasets/*path` | Set dataset value (BEAST2) |
81
175
 
82
176
  ### Tasks
83
177
 
84
178
  | Method | Endpoint | Description |
85
179
  |--------|----------|-------------|
86
- | GET | `/api/workspaces/:ws/tasks` | List tasks |
87
- | GET | `/api/workspaces/:ws/tasks/:task` | Get task details |
180
+ | GET | `/api/repos/:repo/workspaces/:ws/tasks` | List tasks |
181
+ | GET | `/api/repos/:repo/workspaces/:ws/tasks/:task` | Get task details |
88
182
 
89
183
  ### Execution
90
184
 
91
185
  | Method | Endpoint | Description |
92
186
  |--------|----------|-------------|
93
- | POST | `/api/workspaces/:ws/start` | Start dataflow (non-blocking) |
94
- | POST | `/api/workspaces/:ws/execute` | Execute dataflow (blocking, returns result) |
95
- | GET | `/api/workspaces/:ws/graph` | Get dependency graph |
96
- | GET | `/api/workspaces/:ws/logs/:task` | Read task logs |
187
+ | POST | `/api/repos/:repo/workspaces/:ws/dataflow/start` | Start dataflow (async, returns immediately) |
188
+ | POST | `/api/repos/:repo/workspaces/:ws/dataflow/execute` | Execute dataflow (blocking, returns result) |
189
+ | GET | `/api/repos/:repo/workspaces/:ws/dataflow/graph` | Get dependency graph |
190
+ | GET | `/api/repos/:repo/workspaces/:ws/dataflow/logs/:task` | Read task logs |
191
+ | GET | `/api/repos/:repo/workspaces/:ws/dataflow/state` | Get current execution state |
97
192
 
98
193
  ## Request/Response Format
99
194
 
@@ -113,38 +208,90 @@ Error variants include:
113
208
  - `task_not_found` - Task doesn't exist
114
209
  - `internal` - Internal server error
115
210
 
211
+ ## Using with e3-api-client
212
+
213
+ ```typescript
214
+ import { workspaceList, workspaceStatus, datasetGet } from '@elaraai/e3-api-client';
215
+
216
+ const baseUrl = 'http://localhost:3000';
217
+ const repo = 'default'; // In single-repo mode
218
+ const options = { token: '' }; // Empty token if no auth configured
219
+
220
+ // List workspaces
221
+ const workspaces = await workspaceList(baseUrl, repo, options);
222
+
223
+ // Get workspace status
224
+ const status = await workspaceStatus(baseUrl, repo, 'my-workspace', options);
225
+
226
+ // Get dataset value
227
+ const path = [{ value: 'inputs' }, { value: 'data' }];
228
+ const data = await datasetGet(baseUrl, repo, 'my-workspace', path, options);
229
+ ```
230
+
231
+ ## Claude Code plugin
232
+
233
+ The East ecosystem also ships a [Claude Code](https://claude.com/claude-code) plugin — East language skills, example search, and preemptive diagnostics for East code — installed separately from the `elaraai` marketplace:
234
+
235
+ ```text
236
+ # Inside Claude Code
237
+ /plugin marketplace add elaraai/east-workspace
238
+ /plugin install east@elaraai
239
+ ```
240
+
241
+ ```bash
242
+ # From a terminal
243
+ claude plugin marketplace add elaraai/east-workspace
244
+ claude plugin install east@elaraai
245
+ ```
246
+
116
247
  ## License
117
248
 
118
249
  BSL 1.1. See [LICENSE.md](./LICENSE.md).
119
250
 
120
251
  ### Ecosystem
121
252
 
122
- - **[East Node](https://github.com/elaraai/east-node)**: Node.js platform functions for I/O, databases, and system operations. Connect East programs to filesystems, SQL/NoSQL databases, cloud storage, and network services.
123
- - [@elaraai/east-node-std](https://www.npmjs.com/package/@elaraai/east-node-std): Filesystem, console, HTTP fetch, crypto, random distributions, timestamps
124
- - [@elaraai/east-node-io](https://www.npmjs.com/package/@elaraai/east-node-io): SQLite, PostgreSQL, MySQL, MongoDB, S3, FTP, SFTP
253
+ - **[East](https://github.com/elaraai/east-workspace/tree/main/libs/east)**: Statically typed, expression-based language with serializable IR. Run portable logic across TypeScript, Python, C, and other runtimes.
254
+ - [@elaraai/east](https://www.npmjs.com/package/@elaraai/east): Core language SDK with type system, expressions, and reference JS compiler
255
+
256
+ - **[East Node](https://github.com/elaraai/east-workspace/tree/main/libs/east-node)**: Node.js platform functions for I/O, databases, and system operations.
257
+ - [@elaraai/east-node-std](https://www.npmjs.com/package/@elaraai/east-node-std): Console, FileSystem, Fetch, Crypto, Time, Path, Random
258
+ - [@elaraai/east-node-io](https://www.npmjs.com/package/@elaraai/east-node-io): SQLite, PostgreSQL, MySQL, MongoDB, Redis, S3, FTP, SFTP, XLSX, XML, compression
125
259
  - [@elaraai/east-node-cli](https://www.npmjs.com/package/@elaraai/east-node-cli): CLI for running East IR programs in Node.js
126
260
 
127
- - **[East Python](https://github.com/elaraai/east-py)**: Python runtime and platform functions for data science and machine learning. Execute East programs with access to optimization solvers, gradient boosting, neural networks, and model explainability.
128
- - [@elaraai/east-py-datascience](https://www.npmjs.com/package/@elaraai/east-py-datascience): TypeScript types for optimization, gradient boosting, neural networks, explainability
261
+ - **[East C](https://github.com/elaraai/east-workspace/tree/main/libs/east-c)**: C11 native runtime for executing East IR. Tarballed for `linux-x64` and `linux-arm64`, attached to each GitHub Release.
262
+ - `east-c`: Core runtime type system, IR interpreter, 200+ builtins, serialization (Beast2, JSON, CSV, East text)
263
+ - `east-c-std`: Console, FileSystem, Fetch, Crypto, Time, Path, Random
264
+ - `east-c-cli`: CLI for running East IR programs natively
265
+
266
+ - **[East Python](https://github.com/elaraai/east-workspace/tree/main/libs/east-py)**: Python runtime, standard platform, I/O, and data-science platform functions. Published to PyPI.
267
+ - [east-py](https://pypi.org/project/east-py/): Core Python runtime — type system, IR compiler, 212+ builtins, Cython-accelerated hot paths
268
+ - [east-py-std](https://pypi.org/project/east-py-std/): Console, FileSystem, Fetch, Crypto, Time, Path, Random
269
+ - [east-py-io](https://pypi.org/project/east-py-io/): SQLite, PostgreSQL, MySQL, MongoDB, Redis, S3, FTP, SFTP, XLSX, XML, compression
270
+ - [east-py-cli](https://pypi.org/project/east-py-cli/): CLI for running East IR programs in Python
271
+ - [east-py-datascience](https://pypi.org/project/east-py-datascience/) (PyPI) + [@elaraai/east-py-datascience](https://www.npmjs.com/package/@elaraai/east-py-datascience) (npm): Optimization (MADS, Optuna, ALNS, GoogleOR), ML (XGBoost, LightGBM, NGBoost, PyTorch, Lightning, GP), Bayesian inference (PyMC), explainability (SHAP), conformal prediction (MAPIE)
129
272
 
130
- - **[East UI](https://github.com/elaraai/east-ui)**: East types and expressions for building dashboards and interactive layouts. Define UIs as data structures that render consistently across React, web, and other environments.
273
+ - **[East UI](https://github.com/elaraai/east-workspace/tree/main/libs/east-ui)**: Typed UI component definitions and React renderer, plus VS Code preview.
131
274
  - [@elaraai/east-ui](https://www.npmjs.com/package/@elaraai/east-ui): 50+ typed UI components for layouts, forms, charts, tables, dialogs
132
- - [@elaraai/east-ui-components](https://www.npmjs.com/package/@elaraai/east-ui-components): React renderer with Chakra UI styling
275
+ - [@elaraai/east-ui-components](https://www.npmjs.com/package/@elaraai/east-ui-components): React renderer with Chakra UI v3 styling
276
+ - [@elaraai/e3-ui](https://www.npmjs.com/package/@elaraai/e3-ui): e3 + UI bridge — Data bindings, `e3.ui()` task, manifest
277
+ - [@elaraai/e3-ui-components](https://www.npmjs.com/package/@elaraai/e3-ui-components): React Query hooks and preview components for the e3 API
278
+ - [east-ui-preview](https://marketplace.visualstudio.com/items?itemName=ElaraAI.east-ui-preview): VS Code extension for live East UI component preview
133
279
 
134
- - **[e3 - East Execution Engine](https://github.com/elaraai/e3)**: Durable execution engine for running East pipelines at scale. Features Git-like content-addressable storage, automatic memoization, task queuing, and real-time monitoring.
280
+ - **[e3 East Execution Engine](https://github.com/elaraai/east-workspace/tree/main/libs/e3)**: Durable execution engine for running East pipelines at scale. Git-like content-addressable storage, automatic memoization, reactive dataflow, real-time monitoring.
135
281
  - [@elaraai/e3](https://www.npmjs.com/package/@elaraai/e3): SDK for authoring e3 packages with typed tasks and pipelines
136
- - [@elaraai/e3-core](https://www.npmjs.com/package/@elaraai/e3-core): Git-like object store, task queue, result caching
282
+ - [@elaraai/e3-core](https://www.npmjs.com/package/@elaraai/e3-core): Object store, dataflow orchestrator, execution state
137
283
  - [@elaraai/e3-types](https://www.npmjs.com/package/@elaraai/e3-types): Shared type definitions for e3 packages
138
- - [@elaraai/e3-cli](https://www.npmjs.com/package/@elaraai/e3-cli): `e3 init`, `e3 run`, `e3 logs` commands for managing and monitoring tasks
139
- - [@elaraai/e3-api-client](https://www.npmjs.com/package/@elaraai/e3-api-client): HTTP client for remote e3 servers
284
+ - [@elaraai/e3-cli](https://www.npmjs.com/package/@elaraai/e3-cli): `e3 repo`, `e3 package`, `e3 workspace`, `e3 start`, `e3 watch`, `e3 logs` commands
285
+ - [@elaraai/e3-api-client](https://www.npmjs.com/package/@elaraai/e3-api-client): HTTP client for remote e3 repositories
140
286
  - [@elaraai/e3-api-server](https://www.npmjs.com/package/@elaraai/e3-api-server): REST API server for e3 repositories
287
+ - [@elaraai/e3-api-tests](https://www.npmjs.com/package/@elaraai/e3-api-tests): Shared API compliance test suites
141
288
 
142
289
  ## Links
143
290
 
144
- - [East Language](https://github.com/elaraai/east)
145
- - [East Python Runtime](https://github.com/elaraai/east-py)
291
+ - [East Language](https://github.com/elaraai/east-workspace/tree/main/libs/east)
292
+ - [East Python Runtime](https://github.com/elaraai/east-workspace/tree/main/libs/east-py)
146
293
  - [Elara AI](https://elaraai.com/)
147
- - [Issues](https://github.com/elaraai/e3/issues)
294
+ - [Issues](https://github.com/elaraai/east-workspace/issues)
148
295
  - support@elara.ai
149
296
 
150
297
  ## About Elara
@@ -153,4 +300,8 @@ East is developed by [Elara AI Pty Ltd](https://elaraai.com/), an AI-powered pla
153
300
 
154
301
  ---
155
302
 
303
+ *Developed by [Elara AI Pty Ltd](https://elaraai.com/).*
304
+
305
+ ---
306
+
156
307
  *Developed by [Elara AI Pty Ltd](https://elaraai.com/)*
@@ -0,0 +1,37 @@
1
+ /**
2
+ * Copyright (c) 2025 Elara AI Pty Ltd
3
+ * Licensed under BSL 1.1. See LICENSE for details.
4
+ */
5
+ import type { GcResult, GcStatusResult } from './types.js';
6
+ /**
7
+ * Create a new GC operation and return its execution ID.
8
+ */
9
+ export declare function createGcOperation(): string;
10
+ /**
11
+ * Mark a GC operation as succeeded with stats.
12
+ */
13
+ export declare function completeGcOperation(executionId: string, stats: GcResult): void;
14
+ /**
15
+ * Mark a GC operation as failed with error message.
16
+ */
17
+ export declare function failGcOperation(executionId: string, error: string): void;
18
+ /**
19
+ * Get the status of a GC operation.
20
+ * Returns null if operation doesn't exist.
21
+ */
22
+ export declare function getGcOperationStatus(executionId: string): GcStatusResult | null;
23
+ /**
24
+ * Check if a GC operation exists.
25
+ */
26
+ export declare function hasGcOperation(executionId: string): boolean;
27
+ /**
28
+ * Clear a GC operation.
29
+ * Useful for cleanup in tests.
30
+ */
31
+ export declare function clearGcOperation(executionId: string): void;
32
+ /**
33
+ * Clear all async operation states.
34
+ * Useful for cleanup in tests.
35
+ */
36
+ export declare function clearAllAsyncOperations(): void;
37
+ //# sourceMappingURL=async-operation-state.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"async-operation-state.d.ts","sourceRoot":"","sources":["../../src/async-operation-state.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAcH,OAAO,KAAK,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAuB3D;;GAEG;AACH,wBAAgB,iBAAiB,IAAI,MAAM,CAO1C;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,WAAW,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,GAAG,IAAI,CAa9E;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,WAAW,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,CAOxE;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,WAAW,EAAE,MAAM,GAAG,cAAc,GAAG,IAAI,CAoC/E;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAE3D;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI,CAE1D;AAMD;;;GAGG;AACH,wBAAgB,uBAAuB,IAAI,IAAI,CAE9C"}
@@ -0,0 +1,118 @@
1
+ /**
2
+ * Copyright (c) 2025 Elara AI Pty Ltd
3
+ * Licensed under BSL 1.1. See LICENSE for details.
4
+ */
5
+ /**
6
+ * In-memory state storage for async operations (GC, repo deletion).
7
+ *
8
+ * Tracks operation status for each execution, allowing clients to poll
9
+ * for progress updates during long-running operations.
10
+ *
11
+ * This serves as a development/test mock for the Step Function-based
12
+ * execution tracking in e3-aws.
13
+ */
14
+ import { randomUUID } from 'crypto';
15
+ import { variant, some, none } from '@elaraai/east';
16
+ // Key: executionId (UUID)
17
+ const gcOperations = new Map();
18
+ /**
19
+ * Create a new GC operation and return its execution ID.
20
+ */
21
+ export function createGcOperation() {
22
+ const executionId = randomUUID();
23
+ gcOperations.set(executionId, {
24
+ status: 'running',
25
+ startedAt: new Date(),
26
+ });
27
+ return executionId;
28
+ }
29
+ /**
30
+ * Mark a GC operation as succeeded with stats.
31
+ */
32
+ export function completeGcOperation(executionId, stats) {
33
+ const op = gcOperations.get(executionId);
34
+ if (op) {
35
+ op.status = 'succeeded';
36
+ op.completedAt = new Date();
37
+ op.stats = {
38
+ deletedObjects: stats.deletedObjects,
39
+ deletedPartials: stats.deletedPartials,
40
+ retainedObjects: stats.retainedObjects,
41
+ skippedYoung: stats.skippedYoung,
42
+ bytesFreed: stats.bytesFreed,
43
+ };
44
+ }
45
+ }
46
+ /**
47
+ * Mark a GC operation as failed with error message.
48
+ */
49
+ export function failGcOperation(executionId, error) {
50
+ const op = gcOperations.get(executionId);
51
+ if (op) {
52
+ op.status = 'failed';
53
+ op.completedAt = new Date();
54
+ op.error = error;
55
+ }
56
+ }
57
+ /**
58
+ * Get the status of a GC operation.
59
+ * Returns null if operation doesn't exist.
60
+ */
61
+ export function getGcOperationStatus(executionId) {
62
+ const op = gcOperations.get(executionId);
63
+ if (!op) {
64
+ return null;
65
+ }
66
+ // Convert status to East variant
67
+ let status;
68
+ switch (op.status) {
69
+ case 'running':
70
+ status = variant('running', null);
71
+ break;
72
+ case 'succeeded':
73
+ status = variant('succeeded', null);
74
+ break;
75
+ case 'failed':
76
+ status = variant('failed', null);
77
+ break;
78
+ }
79
+ // Convert stats to East option
80
+ const stats = op.stats
81
+ ? some({
82
+ deletedObjects: op.stats.deletedObjects,
83
+ deletedPartials: op.stats.deletedPartials,
84
+ retainedObjects: op.stats.retainedObjects,
85
+ skippedYoung: op.stats.skippedYoung,
86
+ bytesFreed: op.stats.bytesFreed,
87
+ })
88
+ : none;
89
+ return {
90
+ status,
91
+ stats,
92
+ error: op.error ? some(op.error) : none,
93
+ };
94
+ }
95
+ /**
96
+ * Check if a GC operation exists.
97
+ */
98
+ export function hasGcOperation(executionId) {
99
+ return gcOperations.has(executionId);
100
+ }
101
+ /**
102
+ * Clear a GC operation.
103
+ * Useful for cleanup in tests.
104
+ */
105
+ export function clearGcOperation(executionId) {
106
+ gcOperations.delete(executionId);
107
+ }
108
+ // =============================================================================
109
+ // Test Utilities
110
+ // =============================================================================
111
+ /**
112
+ * Clear all async operation states.
113
+ * Useful for cleanup in tests.
114
+ */
115
+ export function clearAllAsyncOperations() {
116
+ gcOperations.clear();
117
+ }
118
+ //# sourceMappingURL=async-operation-state.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"async-operation-state.js","sourceRoot":"","sources":["../../src/async-operation-state.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;GAQG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AACpC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAqBpD,0BAA0B;AAC1B,MAAM,YAAY,GAAG,IAAI,GAAG,EAA+B,CAAC;AAE5D;;GAEG;AACH,MAAM,UAAU,iBAAiB;IAC/B,MAAM,WAAW,GAAG,UAAU,EAAE,CAAC;IACjC,YAAY,CAAC,GAAG,CAAC,WAAW,EAAE;QAC5B,MAAM,EAAE,SAAS;QACjB,SAAS,EAAE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6
+ import type { KeyPair } from './keys.js';
7
+ /**
8
+ * Device flow configuration.
9
+ */
10
+ export interface DeviceFlowConfig {
11
+ /** Server base URL (e.g., http://localhost:3000) */
12
+ baseUrl: string;
13
+ /** RSA keypair for signing tokens */
14
+ keys: KeyPair;
15
+ /** Access token expiry in seconds (default: 3600 = 1 hour) */
16
+ accessTokenExpiry: number;
17
+ /** Refresh token expiry in seconds (default: 7776000 = 90 days) */
18
+ refreshTokenExpiry: number;
19
+ /** Auto-approve device codes (for CI testing) */
20
+ autoApprove: boolean;
21
+ }
22
+ /**
23
+ * Create device flow routes.
24
+ */
25
+ export declare function createDeviceRoutes(config: DeviceFlowConfig): Hono;
26
+ //# sourceMappingURL=device.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"device.d.ts","sourceRoot":"","sources":["../../../src/auth/device.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAOH,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,KAAK,EAAE,OAAO,EAAc,MAAM,WAAW,CAAC;AAYrD;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,oDAAoD;IACpD,OAAO,EAAE,MAAM,CAAC;IAChB,qCAAqC;IACrC,IAAI,EAAE,OAAO,CAAC;IACd,8DAA8D;IAC9D,iBAAiB,EAAE,MAAM,CAAC;IAC1B,mEAAmE;IACnE,kBAAkB,EAAE,MAAM,CAAC;IAC3B,iDAAiD;IACjD,WAAW,EAAE,OAAO,CAAC;CACtB;AAqCD;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,gBAAgB,GAAG,IAAI,CA0MjE"}