CJackHwang/Succinix--packages-engine ↗★ 6
@succinix/engine
Succinix engine as a dsh-compatible Cordis plugin: a Unix-like sandbox (real Node runtime + Lifo userland) inside a WebContainer, exposed through ctx.fs, ctx.sandbox, ctx.terminals and ctx.sessionPersistence. 适合需要在浏览器中管理文件系统、执行Node/Python命令的开发。
Install
This plugin has no verified bundle, or compatibility checks failed. Read the repository notes first. Read the full README ↗
README
Read the full README ↗@succinix/engine
@succinix/engine is the Cordis plugin for embedding Succinix in an application. It provides a browser project workspace that manages files, command execution, terminal sessions, and session persistence.
What It Is For
You do not need to build a filesystem, command router, terminal, and persistence layer yourself. Once connected to WebContainer, Node, Python, and Unix commands use the same workspace.
How To Use It
Install the package and publish its assets as static files:
npm install @succinix/engine@0.7.0 @deepseek-ai/cordis @webcontainer/api
mkdir -p public/engine
cp -R node_modules/@succinix/engine/assets/. public/engine/
import { Context } from '@deepseek-ai/cordis'
import engine from '@succinix/engine'
import { WebContainer } from '@webcontainer/api'
const ctx = new Context()
const fiber = ctx.plugin(engine, {
hostJsUrl: '/engine/host.js',
lifoCoreUrl: '/engine/lifo-core.js',
pythonAssetsUrl: '/engine/pyodide/',
container: { mode: 'external' },
})
await fiber
const host = ctx.get('succinix', false)!
await host.attach(await WebContainer.boot())
await host.ensureInstance('default', { executor: {} })
await host.executor.exec('npm run dev')
await host.shutdown()
await fiber.dispose()
Application plugins needing files, confinement, terminals, or session persistence declare:
export const inject = ['fs', 'sandbox', 'terminals', 'sessionPersistence']
Use ctx.get('succinix', false) for host lifecycle, instances, ports, and executor management; use the four services for daily plugin work.
Check Before Integrating
- Peer dependencies are
@deepseek-ai/cordis ^4.0.1and@webcontainer/api ^1.6.4. - Chromium only; the page needs COOP/COEP.
- Ports are browser previews, not public services.
See Integration for fields and lifecycle and Migration for older versions.