@actor-web/cli is the distributed Actor-Web runtime host and remote operator
shell. It packages the v2 distributed runtime-host surface and the v3
authenticated control-plane recovery path without taking ownership of
provider-specific workflow policy.
actor-web serve <topology>starts an in-process or distributed host from a topology module.actor-web connect <topology> <gateway-url>attaches a remote operator shell to an authenticated gateway.- The programmatic API exports
createRuntimeHost,createRuntimeHostFromFile,executeCommand,splitExecScript, and the runtime-host types from the package root.
- Gateway and transport listeners stay loopback-only unless you pass an explicit unsafe-exposure override.
- Remote shells authenticate at the authoritative gateway; the CLI does not own provider policy.
- Checkpoint readiness can be required explicitly and is mandatory for non-localhost distributed exposure.
- Command admission belongs at the gateway/runtime boundary, not in downstream product adapters.
The shipped console and programmatic API cover:
- host
statusand readiness facts for process, transport, directory, checkpoint store, and policy admission; watch-tracegateway projection and receipt streaming for remote sessions;- authenticated
sendandaskcommand admission over remote gateways; - checkpoint-backed interruption, import, resume, and reconciliation flows; and
- graceful shutdown through
flush()plusstop().
Actor-Web owns the provider-neutral operator shell, runtime-host lifecycle, authenticated gateway connection, and trace/receipt plumbing. FAS-specific workflow semantics, durable execution policy, and downstream control-plane adapters stay outside this package.
The neutral consumer-facing conformance contract lives in @actor-web/testing.
That package owns the reusable executable control-plane fixture and scenario
expectations; @actor-web/cli stays focused on exposing the real host surface
that adapters exercise.
- Node.js
>=18 - ESM and CommonJS programmatic imports through the package root export
- Packed artifacts are expected to install outside the monorepo after workspace dependencies are rewritten during packing/versioning
Local host:
actor-web serve ./topology.mjs --checkpoint-dir ./.actor-web/checkpoints --exec 'status; ls; exit'Distributed host with authenticated remote access:
actor-web serve ./topology.mjs \
--gateway \
--transport \
--peer worker=ws://127.0.0.1:9001 \
--connect worker \
--checkpoint-dir ./.actor-web/checkpoints
actor-web connect ./topology.mjs ws://127.0.0.1:9000 --token gateway-secret --exec 'status; watch-trace controlPlaneSession; exit'import { createRuntimeHost } from '@actor-web/cli';
import { actor, defineActorWebTopology, defineBehavior, node } from '@actor-web/runtime';
const counter = defineBehavior()
.withContext({ count: 0 })
.onMessage(({ message, context }) => {
if (message.type === 'INCREMENT') {
return { context: { count: context.count + 1 } };
}
if (message.type === 'GET_COUNT') {
return { reply: { count: context.count } };
}
return {};
});
const topology = defineActorWebTopology({
nodes: { local: node('local') },
actors: { counter: actor({ id: 'counter', node: 'local', behavior: counter }) },
});
const started = await createRuntimeHost(topology);
if (started.ok) {
const host = started.value;
await host.send('counter', '{"type":"INCREMENT"}');
await host.stop();
}The old git-workflow console (save, ship, sync, git actor coordination,
and similar commands) is not part of the distributed runtime-host package and
must not appear in packed artifacts.