@ecmaos/kernel 0.1.2 → 0.2.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.
package/README.md CHANGED
@@ -10,7 +10,7 @@ The goal is to create a kernel and supporting apps that tie together modern web
10
10
  > — Hal Finney
11
11
 
12
12
  [![API Reference](https://img.shields.io/badge/API-Reference-success)](https://docs.ecmaos.sh)
13
- [![Version](https://img.shields.io/github/package-json/v/ecmaos/ecmaos?color=success)](https://ecmaos.sh)
13
+ [![Version](https://img.shields.io/github/package-json/v/ecmaos/ecmaos?color=success)](https://www.npmjs.com/package/@ecmaos/kernel)
14
14
  [![Site Status](https://img.shields.io/website?url=https%3A%2F%2Fecmaos.sh)](https://ecmaos.sh)
15
15
  [![Created](https://img.shields.io/github/created-at/ecmaos/ecmaos?style=flat&label=created&color=success)](https://github.com/ecmaos/ecmaos/pulse)
16
16
  [![Last Commit](https://img.shields.io/github/last-commit/ecmaos/ecmaos.svg)](https://github.com/ecmaos/ecmaos/commit/main)
@@ -36,7 +36,7 @@ The goal is to create a kernel and supporting apps that tie together modern web
36
36
 
37
37
  ## Features
38
38
 
39
- - TypeScript, WebAssembly
39
+ - TypeScript, WebAssembly, AssemblyScript, C++
40
40
  - Filesystem supporting multiple backends powered by [zenfs](https://github.com/zen-fs/core)
41
41
  - Terminal interface powered by [xterm.js](https://xtermjs.org)
42
42
  - Pseudo-streams, allowing redirection and piping
@@ -50,8 +50,9 @@ The goal is to create a kernel and supporting apps that tie together modern web
50
50
  - Storage manager for managing Storage API capabilities: IndexedDB, localStorage, etc.
51
51
  - Internationalization framework for translating text powered by [i18next](https://www.i18next.com)
52
52
  - Window manager powered by [WinBox](https://github.com/nextapps-de/winbox)
53
- - `SWAPI`: An API server running completely inside a service worker using [Hono](https://hono.dev)
53
+ - `BIOS`: A C++ module compiled to WebAssembly with [Emscripten](https://emscripten.org) providing performance-critical functionality
54
54
  - `Metal`: An API server for allowing connections to physical systems from ecmaOS using [Hono](https://hono.dev)
55
+ - `SWAPI`: An API server running completely inside a service worker using [Hono](https://hono.dev)
55
56
 
56
57
  ## Basic Overview
57
58
 
@@ -79,32 +80,64 @@ The goal is to create a kernel and supporting apps that tie together modern web
79
80
 
80
81
  - `BIOS`
81
82
  - The BIOS is a C++ module compiled to WebAssembly with [Emscripten](https://emscripten.org) providing performance-critical functionality
82
- - The BIOS has its own filesystem, located at `/bios`
83
+ - The BIOS has its own filesystem, located at `/bios` — this allows data to be copied in and out of the BIOS for custom code and utilities
83
84
  - The main idea is that data and custom code can be loaded into it from the OS for WASM-native performance, as well as providing various utilities
84
- - Confusingly, the Kernel loads the BIOS - not the other way around
85
+ - Confusingly, the Kernel loads the BIOS not the other way around
85
86
 
86
87
  - `Apps`
87
- - These are full applications that are developed to work with ecmaOS
88
+ - These are full applications that are developed specifically to work with ecmaOS
89
+ - An app is an npm package, in which the bin file has a shebang line of `#!ecmaos:bin:app:myappname`
90
+ - Its default export (or exported `main` function) will be called with the `ProcessEntryParams` object
91
+ - They can be installed from the terminal using the `install` command, e.g. `# install @ecmaos-apps/boilerplate`
92
+ - Run the installed app: `# /usr/bin/boilerplate arg1 arg2` *(absolute path not required)*
93
+ - During development, it can be useful to run a [Verdaccio](https://github.com/verdaccio/verdaccio) server to test local packages: `# install @myscope/mypackage --registry http://localhost:4873`
94
+ - To publish to Verdaccio, run `# npm publish --registry http://localhost:4873` in your app's development environment
95
+ - Then to install from your local registry, run `# install @myscope/mypackage --registry http://localhost:4873`
88
96
 
89
97
  - `Core`
90
98
  - Core modules provide the system's essential functionality; this includes the kernel itself
99
+ - Other core modules include Metal, SWAPI, BIOS, as well as the main `@ecmaos/types` package
91
100
 
92
101
  - `Commands`
93
102
  - Commands are small utilities that aren't quite full Apps, provided by the shell
103
+ - Some builtin commands that exist now will be moved into separate apps over time
94
104
 
95
105
  - `Devices`
96
106
  - Devices get loaded on boot, e.g. /dev/bluetooth, /dev/random, /dev/battery, etc.
97
107
  - A device can support being "run" by a user, e.g. `# /dev/battery status`
98
- - Devices may also be directly read/written, and will behave accordingly
108
+ - Devices may also be directly read/written, and will behave accordingly (or have no effect)
99
109
  - An individual device module can provide multiple device drivers, e.g. `/dev/usb` provides `/dev/usb-mydevice-0001-0002`
100
110
 
111
+ - `Metal`
112
+ - Metal is an API server for allowing connections to physical systems from ecmaOS using [Hono](https://hono.dev)
113
+ - Authenticated and encrypted connections with JWK/JWE/JOSE
114
+
115
+ - `Modules`
116
+ - Modules are dynamically loaded into the kernel at boot and can be enabled or disabled
117
+ - They can provide additional functionality, devices, commands, etc.
118
+ - They offer a [common interface](./core/types/modules.ts) for interacting with the kernel
119
+ - Generally they should be written in [AssemblyScript](https://www.assemblyscript.org), but this isn't required
120
+
121
+ - `Packages`
122
+ - Packages are [npm packages](https://www.npmjs.com) that are installed into the ecmaOS environment
123
+ - They can be installed from the terminal using the `install` command, e.g. `# install jquery`
124
+ - NPM version specifiers are supported, e.g.:
125
+ - `# install jquery@3.7.1`
126
+ - `# install jquery@^3.7.1`
127
+ - `# install jquery@latest`
128
+ - [JSR](https://jsr.io) support is coming soon
129
+
130
+ - `SWAPI`
131
+ - The SWAPI is an API server running completely inside a service worker using [Hono](https://hono.dev)
132
+ - e.g., `# fetch /swapi/fake/person/fullName`
133
+
101
134
  - `Utils`
102
- - Utilities used during development
135
+ - Utilities and configuration used during development
103
136
 
104
137
  ## Command Examples
105
138
 
106
139
  ```sh
107
- ai "Despite all my rage" # use env OPENAI_API_KEY --set sk-
140
+ ai "Despite all my rage" # use `env OPENAI_API_KEY --set sk-`
108
141
  cat /var/log/kernel.log
109
142
  cd /tmp
110
143
  echo "Hello, world!" > hello.txt
@@ -116,6 +149,8 @@ download hello.txt
116
149
  edit hello.txt
117
150
  env hello --set world ; env
118
151
  fetch https://ipecho.net/plain > /tmp/myip.txt
152
+ fetch /xkcd-os.sixel # xterm.js includes sixel support
153
+ fetch /swapi/fake/person/fullName # fetch a random person from the SWAPI
119
154
  install jquery
120
155
  ls /dev
121
156
  mkdir /tmp/zip ; cd /tmp/zip
@@ -1,4 +1,4 @@
1
- import { g as getDefaultExportFromCjs } from "./index-xODqy1dm.js";
1
+ import { g as getDefaultExportFromCjs } from "./index-_qi20yzV.js";
2
2
  var browser$2;
3
3
  var hasRequiredBrowser;
4
4
  function requireBrowser() {
@@ -20,4 +20,4 @@ const browser$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePro
20
20
  export {
21
21
  browser$1 as b
22
22
  };
23
- //# sourceMappingURL=browser-DwS0anQc.js.map
23
+ //# sourceMappingURL=browser-BgTges7v.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"browser-DwS0anQc.js","sources":["../../node_modules/.pnpm/ws@8.18.0/node_modules/ws/browser.js"],"sourcesContent":["'use strict';\n\nmodule.exports = function () {\n throw new Error(\n 'ws does not work in the browser. Browser clients must use the native ' +\n 'WebSocket object'\n );\n};\n"],"names":["browser"],"mappings":";;;;;;AAEAA,cAAiB,WAAY;AAC3B,UAAM,IAAI;AAAA,MACR;AAAA,IAED;AAAA,EACF;;;;;;;;;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"browser-BgTges7v.js","sources":["../../node_modules/.pnpm/ws@8.18.0/node_modules/ws/browser.js"],"sourcesContent":["'use strict';\n\nmodule.exports = function () {\n throw new Error(\n 'ws does not work in the browser. Browser clients must use the native ' +\n 'WebSocket object'\n );\n};\n"],"names":["browser"],"mappings":";;;;;;AAEAA,cAAiB,WAAY;AAC3B,UAAM,IAAI;AAAA,MACR;AAAA,IAED;AAAA,EACF;;;;;;;;;","x_google_ignoreList":[0]}