@elaraai/e3-types 0.0.1-alpha.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE.md ADDED
@@ -0,0 +1,31 @@
1
+ Copyright (c) 2025 Elara AI Pty Ltd
2
+
3
+ # Dual License
4
+
5
+ This software is available under two licenses. You may choose which license applies to your use:
6
+
7
+ ## Option 1: AGPL-3.0 (Open Source)
8
+
9
+ You may use, modify, and distribute this software under the terms of the GNU Affero General Public License v3.0.
10
+
11
+ This requires that if you use this software in a network service, you must make your complete source code available under AGPL-3.0.
12
+
13
+ Full text: https://www.gnu.org/licenses/agpl-3.0.html
14
+
15
+ ## Option 2: Commercial License
16
+
17
+ If you wish to use this software without the source code disclosure requirements of AGPL-3.0, you must obtain a commercial license from Elara AI Pty Ltd.
18
+
19
+ Contact: support@elara.ai
20
+
21
+ ## Contributions
22
+
23
+ Contributions are welcome. By submitting a pull request, you agree to license your contribution under both AGPL-3.0 and our commercial license terms.
24
+
25
+ ## Governing Law
26
+
27
+ This license is governed by the laws of New South Wales, Australia.
28
+
29
+ ---
30
+
31
+ *Elara AI Pty Ltd*
package/README.md ADDED
@@ -0,0 +1,62 @@
1
+ # @elaraai/e3-types
2
+
3
+ Shared type definitions for e3 (East Execution Engine).
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ npm install @elaraai/e3-types
9
+ ```
10
+
11
+ ## Types
12
+
13
+ - **Repository** - Repository configuration and paths
14
+ - **Commit** - Task commit types (new, done, error)
15
+ - **Task** - Task definition and state
16
+ - **Package** - Package manifest and metadata
17
+ - **Dataset** - Dataset schemas and paths
18
+ - **Dataflow** - Dataflow definitions
19
+ - **Runner** - Runner configuration
20
+
21
+
22
+ ## License
23
+
24
+ Dual AGPL-3.0 / Commercial. See [LICENSE.md](./LICENSE.md).
25
+
26
+ ### Ecosystem
27
+
28
+ - **[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.
29
+ - [@elaraai/east-node-std](https://www.npmjs.com/package/@elaraai/east-node-std): Filesystem, console, HTTP fetch, crypto, random distributions, timestamps
30
+ - [@elaraai/east-node-io](https://www.npmjs.com/package/@elaraai/east-node-io): SQLite, PostgreSQL, MySQL, MongoDB, S3, FTP, SFTP
31
+ - [@elaraai/east-node-cli](https://www.npmjs.com/package/@elaraai/east-node-cli): CLI for running East IR programs in Node.js
32
+
33
+ - **[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.
34
+ - [@elaraai/east-py-datascience](https://www.npmjs.com/package/@elaraai/east-py-datascience): TypeScript types for optimization, gradient boosting, neural networks, explainability
35
+
36
+ - **[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.
37
+ - [@elaraai/east-ui](https://www.npmjs.com/package/@elaraai/east-ui): 50+ typed UI components for layouts, forms, charts, tables, dialogs
38
+ - [@elaraai/east-ui-components](https://www.npmjs.com/package/@elaraai/east-ui-components): React renderer with Chakra UI styling
39
+
40
+ - **[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.
41
+ - [@elaraai/e3](https://www.npmjs.com/package/@elaraai/e3): SDK for authoring e3 packages with typed tasks and pipelines
42
+ - [@elaraai/e3-core](https://www.npmjs.com/package/@elaraai/e3-core): Git-like object store, task queue, result caching
43
+ - [@elaraai/e3-types](https://www.npmjs.com/package/@elaraai/e3-types): Shared type definitions for e3 packages
44
+ - [@elaraai/e3-cli](https://www.npmjs.com/package/@elaraai/e3-cli): `e3 init`, `e3 run`, `e3 logs` commands for managing and monitoring tasks
45
+ - [@elaraai/e3-api-client](https://www.npmjs.com/package/@elaraai/e3-api-client): HTTP client for remote e3 servers
46
+ - [@elaraai/e3-api-server](https://www.npmjs.com/package/@elaraai/e3-api-server): REST API server for e3 repositories
47
+
48
+ ## Links
49
+
50
+ - [East Language](https://github.com/elaraai/east)
51
+ - [East Python Runtime](https://github.com/elaraai/east-py)
52
+ - [Elara AI](https://elaraai.com/)
53
+ - [Issues](https://github.com/elaraai/e3/issues)
54
+ - support@elara.ai
55
+
56
+ ## About Elara
57
+
58
+ East is developed by [Elara AI Pty Ltd](https://elaraai.com/), an AI-powered platform that creates economic digital twins of businesses that optimize performance. Elara combines business objectives, decisions and data to help organizations make data-driven decisions across operations, purchasing, sales and customer engagement, and project and investment planning. East powers the computational layer of Elara solutions, enabling the expression of complex business logic and data in a simple, type-safe and portable language.
59
+
60
+ ---
61
+
62
+ *Developed by [Elara AI Pty Ltd](https://elaraai.com/)*
@@ -0,0 +1,109 @@
1
+ /**
2
+ * Copyright (c) 2025 Elara AI Pty Ltd
3
+ * Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details.
4
+ */
5
+ /**
6
+ * Dataset reference and tree types for e3's persistent data structures.
7
+ *
8
+ * e3 stores data as persistent trees with structural sharing (like git trees).
9
+ * Each node is either a leaf (value) or a branch (tree of refs).
10
+ */
11
+ import { VariantType, StringType, NullType, ValueTypeOf, StructType, EastType } from '@elaraai/east';
12
+ /**
13
+ * Reference to data in the object store.
14
+ *
15
+ * DataRef is the fundamental building block of e3's data trees.
16
+ * Each ref points to either a value or another tree node.
17
+ *
18
+ * @remarks
19
+ * - `unassigned`: Placeholder for pending task outputs
20
+ * - `null`: Inline null value (optimization)
21
+ * - `value`: Hash of a typed value blob in objects/
22
+ * - `tree`: Hash of a tree object in objects/
23
+ *
24
+ * @example
25
+ * ```ts
26
+ * // Pending output
27
+ * const pending: DataRef = variant('unassigned', null);
28
+ *
29
+ * // Value reference
30
+ * const ref: DataRef = variant('value', 'abc123...');
31
+ *
32
+ * // Tree reference
33
+ * const treeRef: DataRef = variant('tree', 'def456...');
34
+ * ```
35
+ */
36
+ export declare const DataRefType: VariantType<{
37
+ /** Unassigned value (e.g., pending task output) */
38
+ unassigned: NullType;
39
+ /** Inline null value (optimization for NullType) */
40
+ null: NullType;
41
+ /** Hash of a beast2 value blob in objects/ */
42
+ value: StringType;
43
+ /** Hash of a tree object in objects/ */
44
+ tree: StringType;
45
+ }>;
46
+ export type DataRefType = typeof DataRefType;
47
+ export type DataRef = ValueTypeOf<typeof DataRefType>;
48
+ /**
49
+ * Singleton DataRef representing an unassigned value.
50
+ *
51
+ * Used for dataset fields that have not yet been computed (e.g., pending task outputs).
52
+ *
53
+ * @example
54
+ * ```ts
55
+ * const tree = {
56
+ * computed: variant('value', 'abc123...'),
57
+ * pending: unassignedRef,
58
+ * };
59
+ * ```
60
+ */
61
+ export declare const unassignedRef: DataRef;
62
+ /**
63
+ * Singleton DataRef representing an inline null value.
64
+ *
65
+ * Optimization for datasets with NullType fields - avoids storing a separate object.
66
+ */
67
+ export declare const nullRef: DataRef;
68
+ /**
69
+ * Computes the DataTreeType for a given EastType.
70
+ *
71
+ * A DataTreeType is a StructType where each field is replaced with a DataRefType,
72
+ * enabling structural sharing in e3's persistent data trees.
73
+ *
74
+ * @typeParam T - The source EastType (must be a StructType for MVP)
75
+ *
76
+ * @remarks
77
+ * Currently only StructType is supported. Future versions may support
78
+ * ArrayType, DictType, VariantType, and RecursiveType.
79
+ *
80
+ * @example
81
+ * ```ts
82
+ * const PersonType = StructType({ name: StringType, age: IntegerType });
83
+ * type PersonTree = DataTreeType<typeof PersonType>;
84
+ * // Equivalent to: StructType<{ name: DataRefType, age: DataRefType }>
85
+ * ```
86
+ */
87
+ export type DataTreeType<T extends EastType> = T extends StructType<infer Fields> ? StructType<{
88
+ [K in keyof Fields]: DataRefType;
89
+ }> : never;
90
+ /**
91
+ * Creates a DataTreeType from an EastType at runtime.
92
+ *
93
+ * Transforms a StructType into a new StructType where each field
94
+ * is replaced with DataRefType.
95
+ *
96
+ * @param type - The source EastType (must be a StructType)
97
+ * @returns A new StructType with DataRefType fields
98
+ *
99
+ * @throws {Error} When the input type is not a StructType
100
+ *
101
+ * @example
102
+ * ```ts
103
+ * const PersonType = StructType({ name: StringType, age: IntegerType });
104
+ * const PersonTreeType = DataTreeType(PersonType);
105
+ * // PersonTreeType.fields = { name: DataRefType, age: DataRefType }
106
+ * ```
107
+ */
108
+ export declare function DataTreeType<T extends EastType>(type: T): DataTreeType<T>;
109
+ //# sourceMappingURL=dataset.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dataset.d.ts","sourceRoot":"","sources":["../../src/dataset.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;GAKG;AAEH,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,QAAQ,EAAE,WAAW,EAAW,UAAU,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAE9G;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,eAAO,MAAM,WAAW;IACtB,mDAAmD;;IAEnD,oDAAoD;;IAEpD,8CAA8C;;IAE9C,wCAAwC;;EAExC,CAAC;AACH,MAAM,MAAM,WAAW,GAAG,OAAO,WAAW,CAAC;AAE7C,MAAM,MAAM,OAAO,GAAG,WAAW,CAAC,OAAO,WAAW,CAAC,CAAC;AAEtD;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,aAAa,EAAE,OAAqC,CAAC;AAElE;;;;GAIG;AACH,eAAO,MAAM,OAAO,EAAE,OAA+B,CAAC;AAEtD;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,MAAM,YAAY,CAAC,CAAC,SAAS,QAAQ,IACzC,CAAC,SAAS,UAAU,CAAC,MAAM,MAAM,CAAC,GAAG,UAAU,CAAC;KAAG,CAAC,IAAI,MAAM,MAAM,GAAG,WAAW;CAAE,CAAC,GACrF,KAAK,CAAC;AAER;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,YAAY,CAAC,CAAC,SAAS,QAAQ,EAAE,IAAI,EAAE,CAAC,GAAG,YAAY,CAAC,CAAC,CAAC,CAUzE"}
@@ -0,0 +1,96 @@
1
+ /**
2
+ * Copyright (c) 2025 Elara AI Pty Ltd
3
+ * Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details.
4
+ */
5
+ /**
6
+ * Dataset reference and tree types for e3's persistent data structures.
7
+ *
8
+ * e3 stores data as persistent trees with structural sharing (like git trees).
9
+ * Each node is either a leaf (value) or a branch (tree of refs).
10
+ */
11
+ import { VariantType, StringType, NullType, variant, StructType } from '@elaraai/east';
12
+ /**
13
+ * Reference to data in the object store.
14
+ *
15
+ * DataRef is the fundamental building block of e3's data trees.
16
+ * Each ref points to either a value or another tree node.
17
+ *
18
+ * @remarks
19
+ * - `unassigned`: Placeholder for pending task outputs
20
+ * - `null`: Inline null value (optimization)
21
+ * - `value`: Hash of a typed value blob in objects/
22
+ * - `tree`: Hash of a tree object in objects/
23
+ *
24
+ * @example
25
+ * ```ts
26
+ * // Pending output
27
+ * const pending: DataRef = variant('unassigned', null);
28
+ *
29
+ * // Value reference
30
+ * const ref: DataRef = variant('value', 'abc123...');
31
+ *
32
+ * // Tree reference
33
+ * const treeRef: DataRef = variant('tree', 'def456...');
34
+ * ```
35
+ */
36
+ export const DataRefType = VariantType({
37
+ /** Unassigned value (e.g., pending task output) */
38
+ unassigned: NullType,
39
+ /** Inline null value (optimization for NullType) */
40
+ null: NullType,
41
+ /** Hash of a beast2 value blob in objects/ */
42
+ value: StringType,
43
+ /** Hash of a tree object in objects/ */
44
+ tree: StringType,
45
+ });
46
+ /**
47
+ * Singleton DataRef representing an unassigned value.
48
+ *
49
+ * Used for dataset fields that have not yet been computed (e.g., pending task outputs).
50
+ *
51
+ * @example
52
+ * ```ts
53
+ * const tree = {
54
+ * computed: variant('value', 'abc123...'),
55
+ * pending: unassignedRef,
56
+ * };
57
+ * ```
58
+ */
59
+ export const unassignedRef = variant('unassigned', null);
60
+ /**
61
+ * Singleton DataRef representing an inline null value.
62
+ *
63
+ * Optimization for datasets with NullType fields - avoids storing a separate object.
64
+ */
65
+ export const nullRef = variant('null', null);
66
+ /**
67
+ * Creates a DataTreeType from an EastType at runtime.
68
+ *
69
+ * Transforms a StructType into a new StructType where each field
70
+ * is replaced with DataRefType.
71
+ *
72
+ * @param type - The source EastType (must be a StructType)
73
+ * @returns A new StructType with DataRefType fields
74
+ *
75
+ * @throws {Error} When the input type is not a StructType
76
+ *
77
+ * @example
78
+ * ```ts
79
+ * const PersonType = StructType({ name: StringType, age: IntegerType });
80
+ * const PersonTreeType = DataTreeType(PersonType);
81
+ * // PersonTreeType.fields = { name: DataRefType, age: DataRefType }
82
+ * ```
83
+ */
84
+ export function DataTreeType(type) {
85
+ if (type.type === "Struct") {
86
+ const fields = {};
87
+ for (const key of Object.keys(type.fields)) {
88
+ fields[key] = DataRefType;
89
+ }
90
+ return StructType(fields);
91
+ }
92
+ else {
93
+ throw new Error(`DataTreeType not implemented for type .${type.type}`);
94
+ }
95
+ }
96
+ //# sourceMappingURL=dataset.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dataset.js","sourceRoot":"","sources":["../../src/dataset.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;GAKG;AAEH,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,QAAQ,EAAe,OAAO,EAAE,UAAU,EAAY,MAAM,eAAe,CAAC;AAE9G;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,WAAW,CAAC;IACrC,mDAAmD;IACnD,UAAU,EAAE,QAAQ;IACpB,oDAAoD;IACpD,IAAI,EAAE,QAAQ;IACd,8CAA8C;IAC9C,KAAK,EAAE,UAAU;IACjB,wCAAwC;IACxC,IAAI,EAAE,UAAU;CACjB,CAAC,CAAC;AAKH;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,MAAM,aAAa,GAAY,OAAO,CAAC,YAAY,EAAE,IAAI,CAAC,CAAC;AAElE;;;;GAIG;AACH,MAAM,CAAC,MAAM,OAAO,GAAY,OAAO,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;AAyBtD;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,UAAU,YAAY,CAAqB,IAAO;IACtD,IAAI,IAAI,CAAC,IAAI,KAAK,QAAQ,EAAE,CAAC;QAC3B,MAAM,MAAM,GAAgC,EAAE,CAAC;QAC/C,KAAK,MAAM,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC;YAC3C,MAAM,CAAC,GAAG,CAAC,GAAG,WAAW,CAAC;QAC5B,CAAC;QACD,OAAO,UAAU,CAAC,MAAM,CAAoB,CAAC;IAC/C,CAAC;SAAM,CAAC;QACN,MAAM,IAAI,KAAK,CAAC,0CAA0C,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC;IACzE,CAAC;AACH,CAAC"}
@@ -0,0 +1,80 @@
1
+ /**
2
+ * Copyright (c) 2025 Elara AI Pty Ltd
3
+ * Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details.
4
+ */
5
+ /**
6
+ * Execution status type definitions.
7
+ *
8
+ * An execution represents a single run of a task with specific inputs.
9
+ * Executions are stored at: executions/<taskHash>/<inputsHash>/
10
+ *
11
+ * The status file tracks:
12
+ * - For running: process identification for crash detection
13
+ * - For success: output hash and timing
14
+ * - For failed: exit code and timing
15
+ * - For error: internal error message and timing
16
+ */
17
+ import { VariantType, StructType, ArrayType, StringType, IntegerType, DateTimeType, ValueTypeOf } from '@elaraai/east';
18
+ /**
19
+ * Execution status stored in executions/<taskHash>/<inputsHash>/status.beast2
20
+ *
21
+ * A variant type representing the four possible states of an execution:
22
+ *
23
+ * - `running`: Task has been launched but not yet completed
24
+ * - `success`: Task ran and returned exit code 0
25
+ * - `failed`: Task ran and returned non-zero exit code
26
+ * - `error`: e3 execution engine had an internal error (runner not found, output missing, etc.)
27
+ *
28
+ * The `running` state includes process identification fields (pid, pidStartTime, bootId)
29
+ * to enable detection of crashed executions. See design/e3-execution.md for details.
30
+ */
31
+ export declare const ExecutionStatusType: VariantType<{
32
+ /** Task has been launched but not yet completed */
33
+ running: StructType<{
34
+ /** Input dataset hashes */
35
+ inputHashes: ArrayType<StringType>;
36
+ /** When execution started */
37
+ startedAt: DateTimeType;
38
+ /** Process ID of the runner */
39
+ pid: IntegerType;
40
+ /** Process start time in jiffies since boot (from /proc/<pid>/stat field 22) */
41
+ pidStartTime: IntegerType;
42
+ /** System boot ID (from /proc/sys/kernel/random/boot_id) */
43
+ bootId: StringType;
44
+ }>;
45
+ /** Task ran and returned exit code 0 */
46
+ success: StructType<{
47
+ /** Input dataset hashes */
48
+ inputHashes: ArrayType<StringType>;
49
+ /** Hash of the output dataset */
50
+ outputHash: StringType;
51
+ /** When execution started */
52
+ startedAt: DateTimeType;
53
+ /** When execution completed */
54
+ completedAt: DateTimeType;
55
+ }>;
56
+ /** Task ran and returned non-zero exit code */
57
+ failed: StructType<{
58
+ /** Input dataset hashes */
59
+ inputHashes: ArrayType<StringType>;
60
+ /** When execution started */
61
+ startedAt: DateTimeType;
62
+ /** When execution completed */
63
+ completedAt: DateTimeType;
64
+ /** Process exit code */
65
+ exitCode: IntegerType;
66
+ }>;
67
+ /** e3 execution engine had an internal error */
68
+ error: StructType<{
69
+ /** Input dataset hashes */
70
+ inputHashes: ArrayType<StringType>;
71
+ /** When execution started */
72
+ startedAt: DateTimeType;
73
+ /** When execution completed */
74
+ completedAt: DateTimeType;
75
+ /** Error message describing what went wrong */
76
+ message: StringType;
77
+ }>;
78
+ }>;
79
+ export type ExecutionStatus = ValueTypeOf<typeof ExecutionStatusType>;
80
+ //# sourceMappingURL=execution.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"execution.d.ts","sourceRoot":"","sources":["../../src/execution.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;;;GAWG;AAEH,OAAO,EACL,WAAW,EACX,UAAU,EACV,SAAS,EACT,UAAU,EACV,WAAW,EACX,YAAY,EACZ,WAAW,EACZ,MAAM,eAAe,CAAC;AAEvB;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,mBAAmB;IAC9B,mDAAmD;;QAEjD,2BAA2B;;QAE3B,6BAA6B;;QAE7B,+BAA+B;;QAE/B,gFAAgF;;QAEhF,4DAA4D;;;IAG9D,wCAAwC;;QAEtC,2BAA2B;;QAE3B,iCAAiC;;QAEjC,6BAA6B;;QAE7B,+BAA+B;;;IAGjC,+CAA+C;;QAE7C,2BAA2B;;QAE3B,6BAA6B;;QAE7B,+BAA+B;;QAE/B,wBAAwB;;;IAG1B,gDAAgD;;QAE9C,2BAA2B;;QAE3B,6BAA6B;;QAE7B,+BAA+B;;QAE/B,+CAA+C;;;EAGjD,CAAC;AAEH,MAAM,MAAM,eAAe,GAAG,WAAW,CAAC,OAAO,mBAAmB,CAAC,CAAC"}
@@ -0,0 +1,79 @@
1
+ /**
2
+ * Copyright (c) 2025 Elara AI Pty Ltd
3
+ * Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details.
4
+ */
5
+ /**
6
+ * Execution status type definitions.
7
+ *
8
+ * An execution represents a single run of a task with specific inputs.
9
+ * Executions are stored at: executions/<taskHash>/<inputsHash>/
10
+ *
11
+ * The status file tracks:
12
+ * - For running: process identification for crash detection
13
+ * - For success: output hash and timing
14
+ * - For failed: exit code and timing
15
+ * - For error: internal error message and timing
16
+ */
17
+ import { VariantType, StructType, ArrayType, StringType, IntegerType, DateTimeType, } from '@elaraai/east';
18
+ /**
19
+ * Execution status stored in executions/<taskHash>/<inputsHash>/status.beast2
20
+ *
21
+ * A variant type representing the four possible states of an execution:
22
+ *
23
+ * - `running`: Task has been launched but not yet completed
24
+ * - `success`: Task ran and returned exit code 0
25
+ * - `failed`: Task ran and returned non-zero exit code
26
+ * - `error`: e3 execution engine had an internal error (runner not found, output missing, etc.)
27
+ *
28
+ * The `running` state includes process identification fields (pid, pidStartTime, bootId)
29
+ * to enable detection of crashed executions. See design/e3-execution.md for details.
30
+ */
31
+ export const ExecutionStatusType = VariantType({
32
+ /** Task has been launched but not yet completed */
33
+ running: StructType({
34
+ /** Input dataset hashes */
35
+ inputHashes: ArrayType(StringType),
36
+ /** When execution started */
37
+ startedAt: DateTimeType,
38
+ /** Process ID of the runner */
39
+ pid: IntegerType,
40
+ /** Process start time in jiffies since boot (from /proc/<pid>/stat field 22) */
41
+ pidStartTime: IntegerType,
42
+ /** System boot ID (from /proc/sys/kernel/random/boot_id) */
43
+ bootId: StringType,
44
+ }),
45
+ /** Task ran and returned exit code 0 */
46
+ success: StructType({
47
+ /** Input dataset hashes */
48
+ inputHashes: ArrayType(StringType),
49
+ /** Hash of the output dataset */
50
+ outputHash: StringType,
51
+ /** When execution started */
52
+ startedAt: DateTimeType,
53
+ /** When execution completed */
54
+ completedAt: DateTimeType,
55
+ }),
56
+ /** Task ran and returned non-zero exit code */
57
+ failed: StructType({
58
+ /** Input dataset hashes */
59
+ inputHashes: ArrayType(StringType),
60
+ /** When execution started */
61
+ startedAt: DateTimeType,
62
+ /** When execution completed */
63
+ completedAt: DateTimeType,
64
+ /** Process exit code */
65
+ exitCode: IntegerType,
66
+ }),
67
+ /** e3 execution engine had an internal error */
68
+ error: StructType({
69
+ /** Input dataset hashes */
70
+ inputHashes: ArrayType(StringType),
71
+ /** When execution started */
72
+ startedAt: DateTimeType,
73
+ /** When execution completed */
74
+ completedAt: DateTimeType,
75
+ /** Error message describing what went wrong */
76
+ message: StringType,
77
+ }),
78
+ });
79
+ //# sourceMappingURL=execution.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"execution.js","sourceRoot":"","sources":["../../src/execution.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;;;GAWG;AAEH,OAAO,EACL,WAAW,EACX,UAAU,EACV,SAAS,EACT,UAAU,EACV,WAAW,EACX,YAAY,GAEb,MAAM,eAAe,CAAC;AAEvB;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,WAAW,CAAC;IAC7C,mDAAmD;IACnD,OAAO,EAAE,UAAU,CAAC;QAClB,2BAA2B;QAC3B,WAAW,EAAE,SAAS,CAAC,UAAU,CAAC;QAClC,6BAA6B;QAC7B,SAAS,EAAE,YAAY;QACvB,+BAA+B;QAC/B,GAAG,EAAE,WAAW;QAChB,gFAAgF;QAChF,YAAY,EAAE,WAAW;QACzB,4DAA4D;QAC5D,MAAM,EAAE,UAAU;KACnB,CAAC;IACF,wCAAwC;IACxC,OAAO,EAAE,UAAU,CAAC;QAClB,2BAA2B;QAC3B,WAAW,EAAE,SAAS,CAAC,UAAU,CAAC;QAClC,iCAAiC;QACjC,UAAU,EAAE,UAAU;QACtB,6BAA6B;QAC7B,SAAS,EAAE,YAAY;QACvB,+BAA+B;QAC/B,WAAW,EAAE,YAAY;KAC1B,CAAC;IACF,+CAA+C;IAC/C,MAAM,EAAE,UAAU,CAAC;QACjB,2BAA2B;QAC3B,WAAW,EAAE,SAAS,CAAC,UAAU,CAAC;QAClC,6BAA6B;QAC7B,SAAS,EAAE,YAAY;QACvB,+BAA+B;QAC/B,WAAW,EAAE,YAAY;QACzB,wBAAwB;QACxB,QAAQ,EAAE,WAAW;KACtB,CAAC;IACF,gDAAgD;IAChD,KAAK,EAAE,UAAU,CAAC;QAChB,2BAA2B;QAC3B,WAAW,EAAE,SAAS,CAAC,UAAU,CAAC;QAClC,6BAA6B;QAC7B,SAAS,EAAE,YAAY;QACvB,+BAA+B;QAC/B,WAAW,EAAE,YAAY;QACzB,+CAA+C;QAC/C,OAAO,EAAE,UAAU;KACpB,CAAC;CACH,CAAC,CAAC"}
@@ -0,0 +1,29 @@
1
+ /**
2
+ * Copyright (c) 2025 Elara AI Pty Ltd
3
+ * Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details.
4
+ */
5
+ /**
6
+ * e3-types: Shared type definitions for e3 (East Execution Engine)
7
+ *
8
+ * This package defines the East types used for serializing e3 objects:
9
+ * - Data references and tree structures
10
+ * - Task definitions (command IR, input/output paths)
11
+ * - Package objects
12
+ * - Data structure and paths
13
+ * - Workspace state
14
+ * - Execution status
15
+ *
16
+ * Terminology:
17
+ * - **Dataset**: A location holding a value (leaf node)
18
+ * - **Tree**: A location containing other locations (branch node)
19
+ * - **Structure**: The shape of the data tree
20
+ * - **Task**: A computation with command IR and input/output paths
21
+ * - **Path**: An address in the data tree
22
+ */
23
+ export { DataRefType, type DataRef, unassignedRef, nullRef, DataTreeType, } from './dataset.js';
24
+ export { TaskObjectType, type TaskObject, } from './task.js';
25
+ export { StructureType, type Structure, PathSegmentType, type PathSegment, TreePathType, type TreePath, type ParsePathResult, type ParseDatasetPathResult, type ParsePackageRefResult, treePath, pathToString, parsePath, parseDatasetPath, parsePackageRef, urlPathToTreePath, DatasetSchemaType, type DatasetSchema, } from './structure.js';
26
+ export { PackageDataType, type PackageData, PackageObjectType, type PackageObject, PackageDatasetsType, type PackageDatasets, } from './package.js';
27
+ export { WorkspaceStateType, type WorkspaceState, } from './workspace.js';
28
+ export { ExecutionStatusType, type ExecutionStatus, } from './execution.js';
29
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;;;;;;;;;GAiBG;AAGH,OAAO,EACL,WAAW,EACX,KAAK,OAAO,EACZ,aAAa,EACb,OAAO,EACP,YAAY,GACb,MAAM,cAAc,CAAC;AAGtB,OAAO,EACL,cAAc,EACd,KAAK,UAAU,GAChB,MAAM,WAAW,CAAC;AAGnB,OAAO,EACL,aAAa,EACb,KAAK,SAAS,EACd,eAAe,EACf,KAAK,WAAW,EAChB,YAAY,EACZ,KAAK,QAAQ,EACb,KAAK,eAAe,EACpB,KAAK,sBAAsB,EAC3B,KAAK,qBAAqB,EAC1B,QAAQ,EACR,YAAY,EACZ,SAAS,EACT,gBAAgB,EAChB,eAAe,EACf,iBAAiB,EAEjB,iBAAiB,EACjB,KAAK,aAAa,GACnB,MAAM,gBAAgB,CAAC;AAGxB,OAAO,EACL,eAAe,EACf,KAAK,WAAW,EAChB,iBAAiB,EACjB,KAAK,aAAa,EAElB,mBAAmB,EACnB,KAAK,eAAe,GACrB,MAAM,cAAc,CAAC;AAGtB,OAAO,EACL,kBAAkB,EAClB,KAAK,cAAc,GACpB,MAAM,gBAAgB,CAAC;AAGxB,OAAO,EACL,mBAAmB,EACnB,KAAK,eAAe,GACrB,MAAM,gBAAgB,CAAC"}
@@ -0,0 +1,39 @@
1
+ /**
2
+ * Copyright (c) 2025 Elara AI Pty Ltd
3
+ * Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details.
4
+ */
5
+ /**
6
+ * e3-types: Shared type definitions for e3 (East Execution Engine)
7
+ *
8
+ * This package defines the East types used for serializing e3 objects:
9
+ * - Data references and tree structures
10
+ * - Task definitions (command IR, input/output paths)
11
+ * - Package objects
12
+ * - Data structure and paths
13
+ * - Workspace state
14
+ * - Execution status
15
+ *
16
+ * Terminology:
17
+ * - **Dataset**: A location holding a value (leaf node)
18
+ * - **Tree**: A location containing other locations (branch node)
19
+ * - **Structure**: The shape of the data tree
20
+ * - **Task**: A computation with command IR and input/output paths
21
+ * - **Path**: An address in the data tree
22
+ */
23
+ // Data references and trees
24
+ export { DataRefType, unassignedRef, nullRef, DataTreeType, } from './dataset.js';
25
+ // Task definitions
26
+ export { TaskObjectType, } from './task.js';
27
+ // Data structure and paths
28
+ export { StructureType, PathSegmentType, TreePathType, treePath, pathToString, parsePath, parseDatasetPath, parsePackageRef, urlPathToTreePath,
29
+ // Backwards compatibility
30
+ DatasetSchemaType, } from './structure.js';
31
+ // Package objects
32
+ export { PackageDataType, PackageObjectType,
33
+ // Backwards compatibility
34
+ PackageDatasetsType, } from './package.js';
35
+ // Workspace state
36
+ export { WorkspaceStateType, } from './workspace.js';
37
+ // Execution status
38
+ export { ExecutionStatusType, } from './execution.js';
39
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;;;;;;;;;GAiBG;AAEH,4BAA4B;AAC5B,OAAO,EACL,WAAW,EAEX,aAAa,EACb,OAAO,EACP,YAAY,GACb,MAAM,cAAc,CAAC;AAEtB,mBAAmB;AACnB,OAAO,EACL,cAAc,GAEf,MAAM,WAAW,CAAC;AAEnB,2BAA2B;AAC3B,OAAO,EACL,aAAa,EAEb,eAAe,EAEf,YAAY,EAKZ,QAAQ,EACR,YAAY,EACZ,SAAS,EACT,gBAAgB,EAChB,eAAe,EACf,iBAAiB;AACjB,0BAA0B;AAC1B,iBAAiB,GAElB,MAAM,gBAAgB,CAAC;AAExB,kBAAkB;AAClB,OAAO,EACL,eAAe,EAEf,iBAAiB;AAEjB,0BAA0B;AAC1B,mBAAmB,GAEpB,MAAM,cAAc,CAAC;AAEtB,kBAAkB;AAClB,OAAO,EACL,kBAAkB,GAEnB,MAAM,gBAAgB,CAAC;AAExB,mBAAmB;AACnB,OAAO,EACL,mBAAmB,GAEpB,MAAM,gBAAgB,CAAC"}