Skip to main content

Concepts

These are the objects you operate in ECP (Execution Control Protocol).

Workflow

A workflow is a portable execution graph. You author it as a *.ecp.ts file (Fluent TypeScript) or as JSON. The compiled manifest uses schema: "@executioncontrolprotocol.workflow" and version: "1.0". It never contains secrets or host config. Bindings declared with workflow(...).with([...]) compile into a separate requirements document (schema: "@executioncontrolprotocol.requirements"). Inference from step("id") fills missing rows.

Environment

An environment is a host plus the plugins and policies it loads. Node and browser are hosts. You compose with environment(id).with([...]). --env <file> on the CLI is an overlay, not a required pair. Omit it to use the process host (built-in Node plus installed plugins).

Extension

An extension is a capability package: transforms, models, storage, formats. Definitions are plain data (defineExtension(...)). Bind with extension(definition). .supports(environmentId, range?) restricts a definition to a host.

Policy

A policy is governance that runs around steps (budget, approval, state-control, registry-control). Bind with policy(definition). Hosts can attach always-on policies.

Plugin

A plugin is the npm packaging of an extension or policy. Package name is plugin- plus the extension or policy name; the protocol id stays unchanged. Installing a plugin registers the definition and generates CLI commands (ecp jsonata transform, ecp format-toon encode).

Ecp

env.init() returns an Ecp instance. Operational APIs live there: run, validate, describe, search, invoke, encode, decode, patch, terminate. They do not live on the environment builder.

Run and journal

A run executes a workflow against an Ecp. The journal for that run lives at .ecp/runs/<runId>/ (schema: "@executioncontrolprotocol.run.journal", journalVersion: 1). Use ecp runs list, show, resume, and rerun --from.

Next steps