@elaraai/e3-core

中文文档
1.0.107发布于 2026/11/13BUSL-1.1TypeScriptES Module构建来源已验证近 30 天下载 5136

East Execution Engine Core - Programmatic API for e3 repository operations

原始使用文档
文档目录14 节
  1. Installation
  2. Overview
  3. API
  4. Repository
  5. Packages
  6. Workspaces
  7. Datasets
  8. Dataflow Execution
  9. The local runner's processes
  10. Claude Code plugin
  11. License
  12. Ecosystem
  13. Links
  14. About Elara

@elaraai/e3-core

Core library for e3 repository operations, similar to libgit2 for git.

Installation

npm install @elaraai/e3-core

Overview

Pure business logic with no UI dependencies. Use this to build custom tools, integrations, or alternative interfaces on top of e3.

API

Repository

import { repoInit, repoFind, repoGet } from '@elaraai/e3-core';

await repoInit('/path/to/project');
const repoPath = repoFind();  // Searches cwd and parents

Packages

import { packageImport, packageList, packageResolve } from '@elaraai/e3-core';

await packageImport(repoPath, zipPath);
const packages = await packageList(repoPath);
const pkg = await packageResolve(repoPath, '[email protected]');

Workspaces

import { workspaceCreate, workspaceList, workspaceDeploy, workspaceStatus, LocalTaskRunner } from '@elaraai/e3-core';

await workspaceCreate(repoPath, 'dev');
await workspaceDeploy(repoPath, 'dev', '[email protected]');
// The runner says whether an execution recorded running can still finish
const status = await workspaceStatus(storage, new LocalTaskRunner(repoPath), repoPath, 'dev');

A workspace's bundle is the workspace as it is, in one stream of beast2: its package, every dataset's ref, the executions its tasks' outputs come from, and every object those reach. Another repository, in any store, makes the workspace from it under a name no workspace there has.

import { workspaceBundleExport, workspaceBundleImport } from '@elaraai/e3-core';

// Written to a WHATWG stream, and made from one, or from chunks
await workspaceBundleExport(storage, repoPath, 'dev', writable);
await workspaceBundleImport(otherStorage, otherRepo, 'dev', readable);

Datasets

import { workspaceGetDataset, workspaceSetDataset } from '@elaraai/e3-core';

const value = await workspaceGetDataset(storage, repoPath, 'dev', ['inputs', 'config']);
await workspaceSetDataset(storage, repoPath, 'dev', ['inputs', 'config'], newValue);

Dataflow Execution

import { dataflowExecute, dataflowStart } from '@elaraai/e3-core';

// Blocking execution
const result = await dataflowExecute(storage, repoPath, 'dev', { force: true });

// Non-blocking execution
const handle = await dataflowStart(storage, repoPath, 'dev');

The local runner's processes

Every process a local runner starts is started under the runner's settings: task and unit runners, function calls, intake units, and environment installs.

import { LocalTaskRunner, resolveBudget } from '@elaraai/e3-core';

const runner = new LocalTaskRunner(repoPath, resolveBudget(), {
  // In place of this process's own environment: e3 still puts its bins ahead
  // of PATH and sets its own variables, and a call's extraEnv comes after
  env: { PATH: '/usr/local/bin:/usr/bin:/bin', HOME: '/home/tasks' },
  // Another user and group (POSIX), which e3 needs root to start them as
  uid: 1500,
  gid: 1500,
});
  • env replaces this process's environment for every process. An install runs with it as it is, so it names the home and caches the installs write.
  • uid and gid are POSIX alone, and refused on Windows. e3 must run as root, or hold CAP_SETUID, CAP_SETGID, CAP_CHOWN, CAP_KILL and CAP_DAC_OVERRIDE.
    • e3 gives the user each directory it makes for a process to write in: an execution's or a call's scratch directory, the segment directory of an input its runner asks for, an intake's, and an environment's build directory.
    • What a process only reads stays e3's: a staged input is a link to an object, which never changes hands.
    • What e3 keeps of what the user wrote is e3's own: an output is stored as a copy, never linked, and a built environment is taken back before any runner reads it.
    • The repository's directories must let the user pass through to its scratch directory and its environments.
  • No install runs a lifecycle script. A project's own packages arrive built: npm pack runs prepack when the package is exported.

Claude Code plugin

The East ecosystem also ships a Claude Code plugin — East language skills, example search, and preemptive diagnostics for East code — installed separately from the elaraai marketplace:

# Inside Claude Code
/plugin marketplace add elaraai/east-workspace
/plugin install east@elaraai
# From a terminal
claude plugin marketplace add elaraai/east-workspace
claude plugin install east@elaraai

License

BSL 1.1. See LICENSE.md.

Ecosystem

  • East: Statically typed, expression-based language with serializable IR. Run portable logic across TypeScript, Python, C, and other runtimes.

    • @elaraai/east: Core language SDK with type system, expressions, and reference JS compiler
  • East Node: Node.js platform functions for I/O, databases, and system operations.

  • East C: C11 native runtime for executing East IR. Distributed via npm (launcher + per-platform optional dependencies) and as tarballs on each GitHub Release.

    • @elaraai/east-c-cli: npm launcher — installs the matching native binary as an optional dependency
    • east-c: Core runtime — type system, IR interpreter, builtins, serialization (Beast2, JSON, CSV, East text)
    • east-c-std: Console, FileSystem, Fetch, Crypto, Time, Path, Random
    • east-c-cli: CLI for running East IR programs natively
  • East Python: Python runtime, standard platform, I/O, and data-science platform functions. Published to PyPI.

    • east-py: Core Python runtime — type system, IR compiler, 212+ builtins, Cython-accelerated hot paths
    • east-py-std: Console, FileSystem, Fetch, Crypto, Time, Path, Random
    • east-py-io: SQLite, PostgreSQL, MySQL, MongoDB, Redis, S3, FTP, SFTP, XLSX, XML, compression
    • east-py-cli: CLI for running East IR programs in Python
    • east-py-datascience (PyPI) + @elaraai/east-py-datascience (npm): Optimization (MADS, Optuna, ALNS, GoogleOR), ML (XGBoost, LightGBM, NGBoost, PyTorch, Lightning, GP), Bayesian inference (PyMC), explainability (SHAP), conformal prediction (MAPIE)
  • East UI: Typed UI component definitions and React renderer, plus VS Code preview.

  • e3 — East Execution Engine: Durable execution engine for running East pipelines at scale. Git-like content-addressable storage, automatic memoization, reactive dataflow, real-time monitoring.

About Elara

East is developed by Elara AI Pty Ltd, an AI-powered platform that creates economic digital twins of businesses that optimize performance. Elara combines business objectives, decisions and data to help organizations make data-driven decisions across operations, purchasing, sales and customer engagement, and project and investment planning. East powers the computational layer of Elara solutions, enabling the expression of complex business logic and data in a simple, type-safe and portable language.


Developed by Elara AI Pty Ltd.


Developed by Elara AI Pty Ltd

版本与发布记录

@elaraai/e3-core 共发布 165 个版本,首次发布于 2025/12/12;过去 12 个月发布了 165 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
1.0.107latest2026/11/13今天
1.0.1062026/11/094 天前
1.0.1052026/11/085 天前
1.0.1042026/11/067 天前
1.0.1032026/11/049 天前
1.0.1022026/11/0310 天前

其他发布通道:alpha → 0.0.1-alpha.3,beta → 0.0.2-beta.54。

关于 @elaraai/e3-core 的常见问题

@elaraai/e3-core 是什么?

East Execution Engine Core - Programmatic API for e3 repository operations

如何安装 @elaraai/e3-core?

在项目目录运行 npm install @elaraai/e3-core,或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖:@elaraai/east(1.0.107)。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖,Yarn 需要手动安装。

@elaraai/e3-core 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@elaraai/e3-core 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@elaraai/e3-core 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >=22.2.0。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@elaraai/e3-core 可以商用吗?

@elaraai/e3-core 使用 BUSL-1.1 许可。声明的许可为 BUSL-1.1,请阅读许可原文确认使用条件。以上为概括,不构成法律意见,请以许可原文为准。

@elaraai/e3-core 的下载量有多少?

根据 npm 官方下载统计,@elaraai/e3-core 在 2026/10/13 – 2026/11/11 这 30 天内被下载 5,136 次,日均约 171 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@elaraai/e3-core 还在维护吗?

最新版本 1.0.107 发布于 2026/11/13(今天);至今共发布 165 个版本,其中过去 12 个月发布了 165 个;首次发布于 2025/12/12。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。