@ecmaos/types 0.1.0 → 0.1.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/.turbo/turbo-build.log +1 -1
- package/CHANGELOG.md +15 -0
- package/LICENSE +3 -17
- package/dist/kernel.d.ts +105 -55
- package/dist/kernel.d.ts.map +1 -1
- package/dist/kernel.js.map +1 -1
- package/dist/wasm.d.ts +8 -0
- package/dist/wasm.d.ts.map +1 -1
- package/kernel.ts +85 -2
- package/package.json +5 -3
- package/wasm.ts +7 -1
package/.turbo/turbo-build.log
CHANGED
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# @ecmaos/types
|
|
2
|
+
|
|
3
|
+
## 0.1.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 9348f4b: WASM module loading
|
|
8
|
+
|
|
9
|
+
## 0.1.1
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- 3a2a173: many updates; bumping versions for new publications
|
|
14
|
+
- Updated dependencies [3a2a173]
|
|
15
|
+
- @ecmaos/bios@0.1.1
|
package/LICENSE
CHANGED
|
@@ -1,21 +1,7 @@
|
|
|
1
|
-
# MIT License
|
|
1
|
+
# Dual MIT/Apache-2.0 License
|
|
2
2
|
|
|
3
3
|
Copyright (c) 2024-2025 Jay Mathis <code@mathis.network>
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
5
|
+
Except as otherwise noted in individual files, this software is licensed under the MIT license (<http://opensource.org/licenses/MIT>), or the Apache License, Version 2.0 (<http://www.apache.org/licenses/LICENSE-2.0>).
|
|
11
6
|
|
|
12
|
-
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
7
|
+
Downstream projects and end users may choose either license individually, or both together, at their discretion. The motivation for this dual-licensing is the additional software patent assurance provided by Apache 2.0.
|
package/dist/kernel.d.ts
CHANGED
|
@@ -1,10 +1,113 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Core kernel types and interfaces
|
|
3
3
|
*/
|
|
4
|
-
import type {
|
|
4
|
+
import type { BIOSModule } from '@ecmaos/bios';
|
|
5
5
|
import type { DeviceDriver } from '@zenfs/core';
|
|
6
6
|
import type { InitOptions } from 'i18next';
|
|
7
|
-
import type {
|
|
7
|
+
import type { Notyf } from 'notyf';
|
|
8
|
+
import type Module from 'node:module';
|
|
9
|
+
import type { Auth, Components, Dom, DomOptions, KernelDevice, EventCallback, Events, Filesystem, FilesystemConfigMounts, FilesystemOptions, I18n, Intervals, Keyboard, Log, LogOptions, Memory, ProcessManager, Protocol, Service, ServiceOptions, Shell, StorageProvider, Terminal, Users, Wasm, Windows, Workers } from './index.ts';
|
|
10
|
+
/**
|
|
11
|
+
* @alpha
|
|
12
|
+
* @author Jay Mathis <code@mathis.network> (https://github.com/mathiscode)
|
|
13
|
+
*
|
|
14
|
+
* @remarks
|
|
15
|
+
* The Kernel class is the core of the ecmaOS system.
|
|
16
|
+
* It manages the system's resources and provides a framework for system services.
|
|
17
|
+
*
|
|
18
|
+
*/
|
|
19
|
+
export interface Kernel {
|
|
20
|
+
/** Unique identifier for this kernel instance */
|
|
21
|
+
readonly id: string;
|
|
22
|
+
/** Name of the kernel */
|
|
23
|
+
readonly name: string;
|
|
24
|
+
/** Version string of the kernel */
|
|
25
|
+
readonly version: string;
|
|
26
|
+
/** Current state of the kernel */
|
|
27
|
+
readonly state: KernelState;
|
|
28
|
+
/** Configuration options passed to the kernel */
|
|
29
|
+
readonly options: KernelOptions;
|
|
30
|
+
/** Terminal interface for user interaction */
|
|
31
|
+
readonly terminal: Terminal;
|
|
32
|
+
/** Shell for command interpretation and execution */
|
|
33
|
+
readonly shell: Shell;
|
|
34
|
+
/** Logging system, null if disabled */
|
|
35
|
+
readonly log: Log | null;
|
|
36
|
+
/** Authentication and authorization service */
|
|
37
|
+
readonly auth: Auth;
|
|
38
|
+
/** BIOS module providing low-level functionality */
|
|
39
|
+
bios?: BIOSModule;
|
|
40
|
+
/** Broadcast channel for inter-kernel communication */
|
|
41
|
+
readonly channel: BroadcastChannel;
|
|
42
|
+
/** Web Components manager */
|
|
43
|
+
readonly components: Components;
|
|
44
|
+
/** DOM manipulation service */
|
|
45
|
+
readonly dom: Dom;
|
|
46
|
+
/** Map of registered devices and their drivers */
|
|
47
|
+
readonly devices: Map<string, {
|
|
48
|
+
device: KernelDevice;
|
|
49
|
+
drivers?: DeviceDriver[];
|
|
50
|
+
}>;
|
|
51
|
+
/** Event management system */
|
|
52
|
+
readonly events: Events;
|
|
53
|
+
/** Virtual filesystem */
|
|
54
|
+
readonly filesystem: Filesystem;
|
|
55
|
+
/** Internationalization service */
|
|
56
|
+
readonly i18n: I18n;
|
|
57
|
+
/** Interval management service */
|
|
58
|
+
readonly intervals: Intervals;
|
|
59
|
+
/** Keyboard interface */
|
|
60
|
+
readonly keyboard: Keyboard;
|
|
61
|
+
/** Memory management service */
|
|
62
|
+
readonly memory: Memory;
|
|
63
|
+
/** Map of loaded packages */
|
|
64
|
+
readonly packages: Map<string, Module>;
|
|
65
|
+
/** Process management service */
|
|
66
|
+
readonly processes: ProcessManager;
|
|
67
|
+
/** Protocol handler service */
|
|
68
|
+
readonly protocol: Protocol;
|
|
69
|
+
/** Map of available screensavers */
|
|
70
|
+
readonly screensavers: Map<string, {
|
|
71
|
+
default: (options: {
|
|
72
|
+
terminal: Terminal;
|
|
73
|
+
}) => Promise<void>;
|
|
74
|
+
exit: () => Promise<void>;
|
|
75
|
+
}>;
|
|
76
|
+
/** Service management system */
|
|
77
|
+
readonly service: Service;
|
|
78
|
+
/** Storage provider interface */
|
|
79
|
+
readonly storage: StorageProvider;
|
|
80
|
+
/** Toast notification service */
|
|
81
|
+
readonly toast: Notyf;
|
|
82
|
+
/** User management service */
|
|
83
|
+
readonly users: Users;
|
|
84
|
+
/** WebAssembly service */
|
|
85
|
+
readonly wasm: Wasm;
|
|
86
|
+
/** Window management service */
|
|
87
|
+
readonly windows: Windows;
|
|
88
|
+
/** Web Worker management service */
|
|
89
|
+
readonly workers: Workers;
|
|
90
|
+
/** Add an event listener */
|
|
91
|
+
addEventListener: (event: KernelEvents, listener: EventCallback) => void;
|
|
92
|
+
/** Remove an event listener */
|
|
93
|
+
removeEventListener: (event: KernelEvents, listener: EventCallback) => void;
|
|
94
|
+
/** Boot the kernel with optional configuration */
|
|
95
|
+
boot(options?: BootOptions): Promise<void>;
|
|
96
|
+
/** Configure kernel options */
|
|
97
|
+
configure(options: KernelOptions): Promise<void>;
|
|
98
|
+
/** Execute a command or program */
|
|
99
|
+
execute(options: KernelExecuteOptions): Promise<number>;
|
|
100
|
+
/** Show a system notification */
|
|
101
|
+
notify(title: string, options?: object): Promise<Notification | void>;
|
|
102
|
+
/** Add an event listener */
|
|
103
|
+
on(event: KernelEvents, listener: EventCallback): void;
|
|
104
|
+
/** Remove an event listener */
|
|
105
|
+
off(event: KernelEvents, listener: EventCallback): void;
|
|
106
|
+
/** Reboot the kernel */
|
|
107
|
+
reboot(): Promise<void>;
|
|
108
|
+
/** Shutdown the kernel */
|
|
109
|
+
shutdown(): Promise<void>;
|
|
110
|
+
}
|
|
8
111
|
/**
|
|
9
112
|
* Kernel events
|
|
10
113
|
*/
|
|
@@ -84,57 +187,4 @@ export interface KernelUploadEvent {
|
|
|
84
187
|
file: string;
|
|
85
188
|
path: string;
|
|
86
189
|
}
|
|
87
|
-
/**
|
|
88
|
-
* Core kernel interface
|
|
89
|
-
*/
|
|
90
|
-
export interface Kernel {
|
|
91
|
-
readonly id: string;
|
|
92
|
-
readonly name: string;
|
|
93
|
-
readonly version: string;
|
|
94
|
-
readonly state: KernelState;
|
|
95
|
-
readonly options: KernelOptions;
|
|
96
|
-
readonly terminal: Terminal;
|
|
97
|
-
readonly shell: Shell;
|
|
98
|
-
readonly log: Log | null;
|
|
99
|
-
readonly auth: Auth;
|
|
100
|
-
readonly channel: BroadcastChannel;
|
|
101
|
-
readonly components: Components;
|
|
102
|
-
readonly dom: Dom;
|
|
103
|
-
readonly devices: Map<string, {
|
|
104
|
-
device: KernelDevice;
|
|
105
|
-
drivers?: DeviceDriver[];
|
|
106
|
-
}>;
|
|
107
|
-
readonly events: Events;
|
|
108
|
-
readonly filesystem: Filesystem;
|
|
109
|
-
readonly i18n: I18n;
|
|
110
|
-
readonly intervals: Intervals;
|
|
111
|
-
readonly keyboard: Keyboard;
|
|
112
|
-
readonly memory: Memory;
|
|
113
|
-
readonly packages: Map<string, unknown>;
|
|
114
|
-
readonly processes: ProcessManager;
|
|
115
|
-
readonly protocol: Protocol;
|
|
116
|
-
readonly screensavers: Map<string, {
|
|
117
|
-
default: (options: {
|
|
118
|
-
terminal: Terminal;
|
|
119
|
-
}) => Promise<void>;
|
|
120
|
-
exit: () => Promise<void>;
|
|
121
|
-
}>;
|
|
122
|
-
readonly service: Service;
|
|
123
|
-
readonly storage: StorageProvider;
|
|
124
|
-
readonly toast: Notyf;
|
|
125
|
-
readonly users: Users;
|
|
126
|
-
readonly wasm: Wasm;
|
|
127
|
-
readonly windows: Windows;
|
|
128
|
-
readonly workers: Workers;
|
|
129
|
-
addEventListener: (event: KernelEvents, listener: EventCallback) => void;
|
|
130
|
-
removeEventListener: (event: KernelEvents, listener: EventCallback) => void;
|
|
131
|
-
boot(options?: BootOptions): Promise<void>;
|
|
132
|
-
configure(options: KernelOptions): Promise<void>;
|
|
133
|
-
execute(options: KernelExecuteOptions): Promise<number>;
|
|
134
|
-
notify(title: string, options?: object): Promise<Notification | void>;
|
|
135
|
-
on(event: KernelEvents, listener: EventCallback): void;
|
|
136
|
-
off(event: KernelEvents, listener: EventCallback): void;
|
|
137
|
-
reboot(): Promise<void>;
|
|
138
|
-
shutdown(): Promise<void>;
|
|
139
|
-
}
|
|
140
190
|
//# sourceMappingURL=kernel.d.ts.map
|
package/dist/kernel.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"kernel.d.ts","sourceRoot":"","sources":["../kernel.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"kernel.d.ts","sourceRoot":"","sources":["../kernel.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAC9C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAC/C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAC1C,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,OAAO,CAAA;AAClC,OAAO,KAAK,MAAM,MAAM,aAAa,CAAA;AAErC,OAAO,KAAK,EACV,IAAI,EACJ,UAAU,EACV,GAAG,EACH,UAAU,EACV,YAAY,EACZ,aAAa,EACb,MAAM,EACN,UAAU,EACV,sBAAsB,EACtB,iBAAiB,EACjB,IAAI,EACJ,SAAS,EACT,QAAQ,EACR,GA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AE,OAAO,CAAC,CAAA;CAC9B;AAED,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;CACb"}
|
package/dist/kernel.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"kernel.js","sourceRoot":"","sources":["../kernel.ts"],"names":[],"mappings":"AAAA;;GAEG;
|
|
1
|
+
{"version":3,"file":"kernel.js","sourceRoot":"","sources":["../kernel.ts"],"names":[],"mappings":"AAAA;;GAEG;AAqLH;;GAEG;AACH,MAAM,CAAN,IAAY,YAOX;AAPD,WAAY,YAAY;IACtB,oCAAoB,CAAA;IACpB,0CAA0B,CAAA;IAC1B,sCAAsB,CAAA;IACtB,wCAAwB,CAAA;IACxB,4CAA4B,CAAA;IAC5B,wCAAwB,CAAA;AAC1B,CAAC,EAPW,YAAY,KAAZ,YAAY,QAOvB;AAED;;GAEG;AACH,MAAM,CAAN,IAAY,WAKX;AALD,WAAY,WAAW;IACrB,kCAAmB,CAAA;IACnB,8BAAe,CAAA;IACf,kCAAmB,CAAA;IACnB,oCAAqB,CAAA;AACvB,CAAC,EALW,WAAW,KAAX,WAAW,QAKtB"}
|
package/dist/wasm.d.ts
CHANGED
|
@@ -18,5 +18,13 @@ export interface Wasm {
|
|
|
18
18
|
* @param path - Path to the emscripten JS file
|
|
19
19
|
*/
|
|
20
20
|
loadEmscripten(path: string): Promise<void>;
|
|
21
|
+
/**
|
|
22
|
+
* Load a WebAssembly module
|
|
23
|
+
* @param path - Path to the WebAssembly module
|
|
24
|
+
*/
|
|
25
|
+
loadWasm(path: string): Promise<{
|
|
26
|
+
module: WebAssembly.Module;
|
|
27
|
+
instance: WebAssembly.Instance;
|
|
28
|
+
}>;
|
|
21
29
|
}
|
|
22
30
|
//# sourceMappingURL=wasm.d.ts.map
|
package/dist/wasm.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wasm.d.ts","sourceRoot":"","sources":["../wasm.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AAEzC;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,mCAAmC;IACnC,MAAM,EAAE,MAAM,CAAA;CACf;AAED;;GAEG;AACH,MAAM,WAAW,IAAI;IACnB;;;OAGG;IACH,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;
|
|
1
|
+
{"version":3,"file":"wasm.d.ts","sourceRoot":"","sources":["../wasm.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AAEzC;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,mCAAmC;IACnC,MAAM,EAAE,MAAM,CAAA;CACf;AAED;;GAEG;AACH,MAAM,WAAW,IAAI;IACnB;;;OAGG;IACH,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IAE3C;;;OAGG;IACH,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC;QAAE,MAAM,EAAE,WAAW,CAAC,MAAM,CAAC;QAAC,QAAQ,EAAE,WAAW,CAAC,QAAQ,CAAA;KAAE,CAAC,CAAA;CAChG"}
|
package/kernel.ts
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
* Core kernel types and interfaces
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
+
import type { BIOSModule } from '@ecmaos/bios'
|
|
5
6
|
import type { DeviceDriver } from '@zenfs/core'
|
|
6
7
|
import type { InitOptions } from 'i18next'
|
|
7
8
|
import type { Notyf } from 'notyf'
|
|
@@ -10,6 +11,7 @@ import type Module from 'node:module'
|
|
|
10
11
|
import type {
|
|
11
12
|
Auth,
|
|
12
13
|
Components,
|
|
14
|
+
Dom,
|
|
13
15
|
DomOptions,
|
|
14
16
|
KernelDevice,
|
|
15
17
|
EventCallback,
|
|
@@ -34,7 +36,6 @@ import type {
|
|
|
34
36
|
Wasm,
|
|
35
37
|
Windows,
|
|
36
38
|
Workers,
|
|
37
|
-
Dom
|
|
38
39
|
} from './index.ts'
|
|
39
40
|
|
|
40
41
|
/**
|
|
@@ -47,54 +48,136 @@ import type {
|
|
|
47
48
|
*
|
|
48
49
|
*/
|
|
49
50
|
export interface Kernel {
|
|
51
|
+
/** Unique identifier for this kernel instance */
|
|
50
52
|
readonly id: string
|
|
53
|
+
|
|
54
|
+
/** Name of the kernel */
|
|
51
55
|
readonly name: string
|
|
56
|
+
|
|
57
|
+
/** Version string of the kernel */
|
|
52
58
|
readonly version: string
|
|
59
|
+
|
|
60
|
+
/** Current state of the kernel */
|
|
53
61
|
readonly state: KernelState
|
|
62
|
+
|
|
63
|
+
/** Configuration options passed to the kernel */
|
|
54
64
|
readonly options: KernelOptions
|
|
65
|
+
|
|
66
|
+
/** Terminal interface for user interaction */
|
|
55
67
|
readonly terminal: Terminal
|
|
68
|
+
|
|
69
|
+
/** Shell for command interpretation and execution */
|
|
56
70
|
readonly shell: Shell
|
|
71
|
+
|
|
72
|
+
/** Logging system, null if disabled */
|
|
57
73
|
readonly log: Log | null
|
|
58
74
|
|
|
59
75
|
// Core services
|
|
76
|
+
|
|
77
|
+
/** Authentication and authorization service */
|
|
60
78
|
readonly auth: Auth
|
|
79
|
+
|
|
80
|
+
/** BIOS module providing low-level functionality */
|
|
81
|
+
bios?: BIOSModule
|
|
82
|
+
|
|
83
|
+
/** Broadcast channel for inter-kernel communication */
|
|
61
84
|
readonly channel: BroadcastChannel
|
|
85
|
+
|
|
86
|
+
/** Web Components manager */
|
|
62
87
|
readonly components: Components
|
|
88
|
+
|
|
89
|
+
/** DOM manipulation service */
|
|
63
90
|
readonly dom: Dom
|
|
91
|
+
|
|
92
|
+
/** Map of registered devices and their drivers */
|
|
64
93
|
readonly devices: Map<string, { device: KernelDevice, drivers?: DeviceDriver[] }>
|
|
94
|
+
|
|
95
|
+
/** Event management system */
|
|
65
96
|
readonly events: Events
|
|
97
|
+
|
|
98
|
+
/** Virtual filesystem */
|
|
66
99
|
readonly filesystem: Filesystem
|
|
100
|
+
|
|
101
|
+
/** Internationalization service */
|
|
67
102
|
readonly i18n: I18n
|
|
103
|
+
|
|
104
|
+
/** Interval management service */
|
|
68
105
|
readonly intervals: Intervals
|
|
106
|
+
|
|
107
|
+
/** Keyboard interface */
|
|
69
108
|
readonly keyboard: Keyboard
|
|
109
|
+
|
|
110
|
+
/** Memory management service */
|
|
70
111
|
readonly memory: Memory
|
|
112
|
+
|
|
113
|
+
/** Map of loaded packages */
|
|
71
114
|
readonly packages: Map<string, Module>
|
|
115
|
+
|
|
116
|
+
/** Process management service */
|
|
72
117
|
readonly processes: ProcessManager
|
|
118
|
+
|
|
119
|
+
/** Protocol handler service */
|
|
73
120
|
readonly protocol: Protocol
|
|
121
|
+
|
|
122
|
+
/** Map of available screensavers */
|
|
74
123
|
readonly screensavers: Map<string, {
|
|
75
124
|
default: (options: { terminal: Terminal }) => Promise<void>
|
|
76
|
-
exit: () => Promise<void>
|
|
125
|
+
exit: () => Promise<void>
|
|
77
126
|
}>
|
|
127
|
+
|
|
128
|
+
/** Service management system */
|
|
78
129
|
readonly service: Service
|
|
130
|
+
|
|
131
|
+
/** Storage provider interface */
|
|
79
132
|
readonly storage: StorageProvider
|
|
133
|
+
|
|
134
|
+
/** Toast notification service */
|
|
80
135
|
readonly toast: Notyf
|
|
136
|
+
|
|
137
|
+
/** User management service */
|
|
81
138
|
readonly users: Users
|
|
139
|
+
|
|
140
|
+
/** WebAssembly service */
|
|
82
141
|
readonly wasm: Wasm
|
|
142
|
+
|
|
143
|
+
/** Window management service */
|
|
83
144
|
readonly windows: Windows
|
|
145
|
+
|
|
146
|
+
/** Web Worker management service */
|
|
84
147
|
readonly workers: Workers
|
|
85
148
|
|
|
86
149
|
// Event handling aliases
|
|
150
|
+
|
|
151
|
+
/** Add an event listener */
|
|
87
152
|
addEventListener: (event: KernelEvents, listener: EventCallback) => void
|
|
153
|
+
|
|
154
|
+
/** Remove an event listener */
|
|
88
155
|
removeEventListener: (event: KernelEvents, listener: EventCallback) => void
|
|
89
156
|
|
|
90
157
|
// Core methods
|
|
158
|
+
|
|
159
|
+
/** Boot the kernel with optional configuration */
|
|
91
160
|
boot(options?: BootOptions): Promise<void>
|
|
161
|
+
|
|
162
|
+
/** Configure kernel options */
|
|
92
163
|
configure(options: KernelOptions): Promise<void>
|
|
164
|
+
|
|
165
|
+
/** Execute a command or program */
|
|
93
166
|
execute(options: KernelExecuteOptions): Promise<number>
|
|
167
|
+
|
|
168
|
+
/** Show a system notification */
|
|
94
169
|
notify(title: string, options?: object): Promise<Notification | void>
|
|
170
|
+
|
|
171
|
+
/** Add an event listener */
|
|
95
172
|
on(event: KernelEvents, listener: EventCallback): void
|
|
173
|
+
|
|
174
|
+
/** Remove an event listener */
|
|
96
175
|
off(event: KernelEvents, listener: EventCallback): void
|
|
176
|
+
|
|
177
|
+
/** Reboot the kernel */
|
|
97
178
|
reboot(): Promise<void>
|
|
179
|
+
|
|
180
|
+
/** Shutdown the kernel */
|
|
98
181
|
shutdown(): Promise<void>
|
|
99
182
|
}
|
|
100
183
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ecmaos/types",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "Type definitions for ecmaOS",
|
|
5
5
|
"author": "Jay Mathis",
|
|
6
6
|
"license": "MIT",
|
|
@@ -14,16 +14,18 @@
|
|
|
14
14
|
"@zenfs/dom": "^1.0.6",
|
|
15
15
|
"chalk": "^5.3.0",
|
|
16
16
|
"i18next": "^23.16.6",
|
|
17
|
-
"notyf": "^3.10.0"
|
|
17
|
+
"notyf": "^3.10.0",
|
|
18
|
+
"@ecmaos/bios": "^0.1.1"
|
|
18
19
|
},
|
|
19
20
|
"devDependencies": {
|
|
20
21
|
"@types/command-line-args": "^5.2.3",
|
|
22
|
+
"@types/emscripten": "^1.39.13",
|
|
21
23
|
"@types/winbox": "^0.2.5",
|
|
22
24
|
"command-line-args": "^6.0.0",
|
|
23
25
|
"tslog": "^4.9.3",
|
|
24
26
|
"typescript": "^5.6.3",
|
|
25
27
|
"winbox": "^0.2.82",
|
|
26
|
-
"@ecmaos/config-typescript": "^0.1.
|
|
28
|
+
"@ecmaos/config-typescript": "^0.1.1"
|
|
27
29
|
},
|
|
28
30
|
"publishConfig": {
|
|
29
31
|
"access": "public"
|
package/wasm.ts
CHANGED
|
@@ -21,4 +21,10 @@ export interface Wasm {
|
|
|
21
21
|
* @param path - Path to the emscripten JS file
|
|
22
22
|
*/
|
|
23
23
|
loadEmscripten(path: string): Promise<void>
|
|
24
|
-
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Load a WebAssembly module
|
|
27
|
+
* @param path - Path to the WebAssembly module
|
|
28
|
+
*/
|
|
29
|
+
loadWasm(path: string): Promise<{ module: WebAssembly.Module; instance: WebAssembly.Instance }>
|
|
30
|
+
}
|