Agent skill
east-node-std
Node.js platform functions for the East language. Use when writing East programs that need Console I/O, FileSystem operations, HTTP Fetch requests, Cryptography, Time operations, Path manipulation, Random number generation, or Testing. Triggers for: (1) Writing East programs with @elaraai/east-node-std, (2) Using platform functions like Console.log, FileSystem.readFile, Fetch.get, Crypto.uuid, Time.now, Path.join, Random.normal, (3) Testing East code with describeEast and Assert.
Install this agent skill to your Project
npx add-skill https://github.com/elaraai/east-plugin/tree/main/skills/east-node-std
SKILL.md
East Node Standard Library
Node.js platform functions for the East language. Enables East programs to interact with the filesystem, network, console, and other I/O operations.
Quick Start
import { East, StringType, NullType } from "@elaraai/east";
import { NodePlatform, Console, FileSystem } from "@elaraai/east-node-std";
const processFile = East.function(
[StringType],
NullType,
($, path) => {
const content = $.let(FileSystem.readFile(path));
$(Console.log(content));
}
);
// Compile with NodePlatform (includes all platform functions)
const compiled = East.compile(processFile.toIR(), NodePlatform);
await compiled("input.txt");
Decision Tree: Which Module to Use
Task → What do you need?
│
├─ Console (stdout/stderr output)
│ └─ .log(), .error(), .write()
│
├─ FileSystem (read/write files and directories)
│ ├─ Text → .readFile(), .writeFile(), .appendFile()
│ ├─ Binary → .readFileBytes(), .writeFileBytes()
│ ├─ Query → .exists(), .isFile(), .isDirectory()
│ ├─ Directory → .createDirectory(), .readDirectory()
│ └─ Delete → .deleteFile()
│
├─ Fetch (HTTP requests)
│ └─ .get(), .getBytes(), .post(), .request()
│
├─ Crypto (hashing, UUIDs, random bytes)
│ └─ .uuid(), .randomBytes(), .hashSha256(), .hashSha256Bytes()
│
├─ Time (timestamps and delays)
│ └─ .now(), .sleep()
│
├─ Path (path manipulation)
│ └─ .join(), .resolve(), .dirname(), .basename(), .extname()
│
├─ Random (statistical distributions)
│ ├─ Basic → .uniform(), .normal(), .range()
│ ├─ Continuous → .exponential(), .weibull(), .pareto(), .logNormal()
│ ├─ Discrete → .bernoulli(), .binomial(), .geometric(), .poisson()
│ ├─ Composite → .irwinHall(), .bates()
│ └─ Control → .seed()
│
└─ Assert (testing with describeEast)
└─ .is(), .equal(), .notEqual(), .less(), .lessEqual(), .greater(), .greaterEqual(), .between(), .throws(), .fail()
Compiling East Programs
Option 1: Use NodePlatform (all modules)
const compiled = East.compile(myFunction.toIR(), NodePlatform);
Option 2: Use specific module implementations
const compiled = East.compile(myFunction.toIR(), [...Console.Implementation, ...FileSystem.Implementation]);
Reference Documentation
- API Reference - Complete function signatures, types, and arguments for all modules
- Examples - Working code examples by use case
Available Modules
| Module | Import | Purpose |
|---|---|---|
| Console | import { Console } from "@elaraai/east-node-std" |
stdout/stderr output |
| FileSystem | import { FileSystem } from "@elaraai/east-node-std" |
Read/write files and directories |
| Fetch | import { Fetch } from "@elaraai/east-node-std" |
HTTP requests |
| Crypto | import { Crypto } from "@elaraai/east-node-std" |
Hashing, UUIDs, random bytes |
| Time | import { Time } from "@elaraai/east-node-std" |
Timestamps and sleep |
| Path | import { Path } from "@elaraai/east-node-std" |
Path manipulation |
| Random | import { Random } from "@elaraai/east-node-std" |
14 statistical distributions |
| Assert | import { Assert, describeEast } from "@elaraai/east-node-std" |
Testing utilities |
Accessing Types
import { Fetch } from "@elaraai/east-node-std";
// Access types via Module.Types.TypeName
const method = Fetch.Types.Method;
const config = Fetch.Types.RequestConfig;
const response = Fetch.Types.Response;
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
east-ui
east-node-io
I/O platform functions for the East language on Node.js. Use when writing East programs that need SQL databases (SQLite, PostgreSQL, MySQL), NoSQL databases (Redis, MongoDB), S3 storage, file transfers (FTP, SFTP), file format parsing (XLSX, XML), or compression (Gzip, Zip, Tar). Triggers for: (1) Writing East programs with @elaraai/east-node-io, (2) Database operations with SQL.SQLite, SQL.Postgres, SQL.MySQL, NoSQL.Redis, NoSQL.MongoDB, (3) Cloud storage with Storage.S3, (4) File transfers with Transfer.FTP, Transfer.SFTP, (5) Format parsing with Format.XLSX, Format.XML, (6) Compression with Compression.Gzip, Compression.Zip, Compression.Tar.
east-py-datascience
Data science and machine learning platform functions for the East language (TypeScript types). Use when writing East programs that need optimization (MADS, Optuna, SimAnneal, Scipy, Optimization, GoogleOr), machine learning (XGBoost, LightGBM, NGBoost, Torch MLP, Lightning, GP), Bayesian inference (PyMC), simulation (Simulation DES), ML utilities (Sklearn preprocessing, metrics, splits), conformal prediction (MAPIE), or model explainability (SHAP). Triggers for: (1) Writing East programs with @elaraai/east-py-datascience, (2) Derivative-free optimization with MADS, (3) Bayesian optimization with Optuna, (4) Discrete/combinatorial optimization with SimAnneal, (5) Gradient boosting with XGBoost or LightGBM, (6) Probabilistic predictions with NGBoost or GP, (7) Neural networks with Torch MLP or Lightning, (8) Data preprocessing and metrics with Sklearn, (9) Conformal prediction intervals with MAPIE, (10) Model explainability with Shap, (11) Iterative coordinate descent with Optimization, (12) Constraint programming, vehicle routing, LP/MIP, or graph algorithms with GoogleOr, (13) Bayesian regression, hierarchical models, and multi-layer estimation with PyMC, (14) Economic ontology simulation via discrete event simulation with Simulation.
e3
East Execution Engine (e3) - durable dataflow execution for East programs. Use when: (1) Authoring e3 packages with @elaraai/e3 (e3.input, e3.task, e3.package, e3.export), (2) Running e3 CLI commands (e3 repo create, e3 start, e3 watch, e3 get, e3 set), (3) Working with workspaces and packages, (4) Content-addressable caching and dataflow execution.
east
East programming language - a statically typed, expression-based language embedded in TypeScript. Use when writing East programs with @elaraai/east. Triggers for: (1) Writing East functions with East.function() or East.asyncFunction(), (2) Defining types (IntegerType, StringType, ArrayType, StructType, VariantType, etc.), (3) Using platform functions with East.platform() or East.asyncPlatform(), (4) Compiling East programs with East.compile(), (5) Working with East expressions (arithmetic, collections, control flow), (6) Serializing East IR with .toIR() and EastIR.fromJSON(), (7) Standard library operations (formatting, rounding, generation).
east-py-datascience
Data science and machine learning platform functions for the East language (TypeScript types). Use when writing East programs that need optimization (MADS, Optuna, SimAnneal, Scipy, Optimization, GoogleOr), machine learning (XGBoost, LightGBM, NGBoost, Torch MLP, Lightning, GP), Bayesian inference (PyMC), simulation (Simulation DES), ML utilities (Sklearn preprocessing, metrics, splits), conformal prediction (MAPIE), or model explainability (SHAP). Triggers for: (1) Writing East programs with @elaraai/east-py-datascience, (2) Derivative-free optimization with MADS, (3) Bayesian optimization with Optuna, (4) Discrete/combinatorial optimization with SimAnneal, (5) Gradient boosting with XGBoost or LightGBM, (6) Probabilistic predictions with NGBoost or GP, (7) Neural networks with Torch MLP or Lightning, (8) Data preprocessing and metrics with Sklearn, (9) Conformal prediction intervals with MAPIE, (10) Model explainability with Shap, (11) Iterative coordinate descent with Optimization, (12) Constraint programming, vehicle routing, LP/MIP, or graph algorithms with GoogleOr, (13) Bayesian regression, hierarchical models, and multi-layer estimation with PyMC, (14) Economic ontology simulation via discrete event simulation with Simulation.
Didn't find tool you were looking for?