@ai-ecoverse/slicc-jsh 0.3.2 → 0.3.3

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
@@ -12,7 +12,7 @@ Design and milestones: [slicc-kernel#68](https://github.com/ai-ecoverse/slicc-ke
12
12
 
13
13
  **M2 shipped:** `globalThis.fetch` / `WebSocket` from kernel ≥ 1.53.0 `OPEN_SLOTS` (`ctx.fetch` / `ctx.websocket`). `net` / `http` on `ctx.net` (loopback TCP); `https.createServer` waits on TLS, `https.request`/`get` use `ctx.fetch` with `redirect: 'manual'` (Node entry) and fall back to `'follow'` on browser transports that reject manual redirects (`ENOTSUP`). jsh `Buffer.allocUnsafe` / `allocUnsafeSlow` zero-fill and `poolSize` is `0`.
14
14
 
15
- **WebSocket / nodeTransport gap:** when `ctx.websocket` rejects, jsh maps that to an `error` Event (no `close`; `readyState` stays `CONNECTING`), matching Node 22 undici. On today's kernels the Node-entry `nodeTransport` / `fetchTransport` path often never rejects a failed connect (the transport ignores the socket `error` event before `open`), so a refused `ws://` can hang with no events until [slicc-kernel#366](https://github.com/ai-ecoverse/slicc-kernel/issues/366) lands. Do not probe with `ctx.net.connect` before open: that dials the **kernel** loopback, while `nodeTransport` WebSockets reach the **host**'s `127.0.0.1`.
15
+ **WebSocket refused connects** need `slicc-kernel` ≥ **1.59.1** on the Node entry (`nodeTransport` / `fetchTransport`). When `ctx.websocket` rejects, jsh emits an `error` Event (no `close`; `readyState` stays `CONNECTING`), matching Node 22 undici. The rejection's `err.cause.code` is passed through on `error.error.cause` (`ECONNREFUSED`, `EAI_NONAME`, `EHOSTUNREACH` / `ENETUNREACH`, `ETIMEDOUT`, `EPROTO`); Node undici's own `ErrorEvent.error` has no `.code` / `.cause`, so jsh does not invent one on the event. `ws://host.slicc.internal:port` reaches the host loopback. Do not probe with `ctx.net.connect` before open: that dials the **kernel** loopback, while `nodeTransport` WebSockets reach the **host**'s `127.0.0.1`.
16
16
 
17
17
  **M3 shipped:** ESM — `.mjs` / `"type":"module"`, static `import`/`export`, dynamic `import()`, `import.meta.url` / `import.meta.resolve`, and CJS↔ESM interop (`import` of CJS, `require` of ESM, `package.json` `"exports"` `import`/`require` conditions). The transform uses **acorn** (bundled) so multi-line imports/exports, strings/comments, and `$` identifiers parse correctly; imports are hoisted and export getters are registered before evaluation for cycles. Node-style detect-module for `-e` / ambiguous `.js` (dynamic `import()` alone stays CJS).
18
18
 
@@ -22,7 +22,7 @@ Design and milestones: [slicc-kernel#68](https://github.com/ai-ecoverse/slicc-ke
22
22
 
23
23
  **npm ecosystem gaps:** packages that import `node:tty` (e.g. chalk's Node build) or need `crypto` (e.g. nanoid's main entry) fail with `ERR_NOT_SUPPORTED` until those modules ship. Prefer the browser/`default` export condition, or a fixture that pins it, when dogfooding. The `tls` module itself is unsupported (`ERR_NOT_SUPPORTED`) — so **http-proxy-agent** / **https-proxy-agent** (which import `tls` for CONNECT tunnels) cannot run yet even though `http.Agent` subclasses via agent-base work for plain `http`.
24
24
 
25
- **`child_process` (0.3.0):** `spawn`, `execFile`, and `exec` (via `sh -c`) sit on `ctx.spawn` — argv/env/cwd, stdio `inherit`/`pipe`/`ignore`, streams on `.stdin`/`.stdout`/`.stderr`, events `spawn`/`exit`/`close`/`error` (ENOENT), `.kill(signal)`, `.pid`. Sync forms (`spawnSync`, `execSync`, `execFileSync`) and `fork` stay `ERR_NOT_SUPPORTED`. Also `fs.realpathSync` (no symlink walk) and `process.getuid`/`getgid`/`kill(self)` so pnpm's global cmd shims can resolve their target and re-raise signals.
25
+ **`child_process` (0.3.0):** `spawn`, `execFile`, and `exec` (via `sh -c`) sit on `ctx.spawn` — argv/env/cwd, stdio `inherit`/`pipe`/`ignore`, streams on `.stdin`/`.stdout`/`.stderr`, events `spawn`/`exit`/`close`/`error` (ENOENT), `.kill(signal)`, `.pid`. Sync forms (`spawnSync`, `execSync`, `execFileSync`) and `fork` stay `ERR_NOT_SUPPORTED`. Also `fs.realpathSync` (no symlink walk) and `process.getuid`/`getgid`/`kill(self)` so pnpm's global cmd shims can resolve their target and re-raise signals. As of 0.3.3, pipe stdio loads `readable-stream` from sources embedded in the bundle (not a sync read of `/node_modules/@ai-ecoverse/slicc-jsh/dist/vendor/…`), so `pnpm add -g` installs under `$PNPM_HOME/global/v11/<hash>/` work on seven.
26
26
 
27
27
  **Still later:** `crypto` / `zlib` / `readline` / `tty` / `tls` / `worker_threads` / TLS `https.createServer` throw `ERR_NOT_SUPPORTED` until their milestone.
28
28
 
@@ -10,7 +10,7 @@ import vm from "node:vm";
10
10
  // package.json
11
11
  var package_default = {
12
12
  name: "@ai-ecoverse/slicc-jsh",
13
- version: "0.3.2",
13
+ version: "0.3.3",
14
14
  description: "Node.js-compatible runtime for slicc-kernel: the node and jsh commands (abi: js)",
15
15
  type: "module",
16
16
  license: "Apache-2.0",
@@ -80,7 +80,7 @@ var package_default = {
80
80
  "trust:dry": "npx fledgling sync --dry-run -y --skip-publish"
81
81
  },
82
82
  devDependencies: {
83
- "@ai-ecoverse/slicc-kernel": "1.59.1",
83
+ "@ai-ecoverse/slicc-kernel": "1.61.0",
84
84
  "@ai-ecoverse/wasi-pnpm": "12.9.1-8",
85
85
  "abort-controller": "3.0.0",
86
86
  acorn: "8.19.0",