Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
omniagents / omniagents / workspace / pyodide_worker
  ..
  README.md
  __init__.py
  package.json
  worker.mjs
Size: Mime:

pyodide_worker

Node host for omniagents.workspace.pyodide.PyodideWorkspace. Loaded as a long-lived subprocess; serves newline-delimited JSON-RPC over stdio.

Install

cd omniagents/workspace/pyodide_worker
npm install

pyodide is the only runtime dep. The Python side discovers worker.mjs via package data — installs to the wheel automatically.

Run standalone (debugging)

node worker.mjs --workspace=/tmp/ws --packages=numpy,pandas

On startup the worker writes one {"ready": true, ...} line, then waits for JSON requests on stdin.

Op surface

See the top of worker.mjs for the full list. Two families:

  • fs_* — direct FS.* calls (read, write, stat, readdir, mkdir, unlink, rmdir, rmtree, syncfs). Bytes are base64.
  • exec_pythonrunPythonAsync(code) with stdout/stderr capture and optional loadPackagesFromImports.

The Python side composes recursive glob/grep/walk on top of fs_* via exec_python calls — we don't rebuild fnmatch/regex in JS.