gm-plugkit 2.0.1247 → 2.0.1248

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gm-plugkit",
3
- "version": "2.0.1247",
3
+ "version": "2.0.1248",
4
4
  "description": "Bootstrap and daemon-spawn tool for gm plugkit binary. Downloads the correct platform binary, verifies SHA256, and starts the spool watcher daemon. Includes plugkit-wasm-wrapper for WASM-based spool watching.",
5
5
  "main": "index.js",
6
6
  "bin": {
@@ -984,13 +984,31 @@ function createWasiShim(instanceRef) {
984
984
  },
985
985
  environ_get: () => 0,
986
986
  environ_sizes_get: () => 0,
987
+ fd_prestat_get: () => 8,
988
+ fd_prestat_dir_name: () => 8,
989
+ fd_close: () => 0,
990
+ fd_fdstat_get: () => 0,
991
+ fd_fdstat_set_flags: () => 0,
992
+ fd_filestat_get: () => 0,
993
+ fd_seek: (_fd, _offset_lo, _offset_hi, _whence, newoffset_ptr) => {
994
+ try { new DataView(getMemory()).setBigUint64(newoffset_ptr, 0n, true); } catch (_) {}
995
+ return 0;
996
+ },
997
+ fd_read: (_fd, _iovs_ptr, _iovs_len, nread_ptr) => {
998
+ try { new DataView(getMemory()).setUint32(nread_ptr, 0, true); } catch (_) {}
999
+ return 0;
1000
+ },
1001
+ path_open: () => 8,
1002
+ path_filestat_get: () => 8,
1003
+ poll_oneoff: () => 0,
1004
+ sched_yield: () => 0,
987
1005
  };
988
1006
  return new Proxy(shim, {
989
1007
  get(target, prop) {
990
1008
  if (prop in target) return target[prop];
991
1009
  return (...args) => {
992
1010
  console.error(`[plugkit-wasm] unimplemented WASI call: ${String(prop)} args=${args.length}`);
993
- return 52;
1011
+ return 8;
994
1012
  };
995
1013
  }
996
1014
  });