Skip to content

Repository files navigation

Workflow Self-Recursive — Execution System

English | 中文

Workflow Self-Recursive banner

License npm DSH bundle CI

Turn every agent conversation into an auditable, recoverable, version-bound delivery.

The Execution System is the host-neutral execution boundary of workflow-self-recursive: it resolves and validates one exact Workflow Package, binds it in an immutable Delivery Manifest, coordinates the Delivery inside an isolated Runner-owned execution context, recovers from the last durable boundary after crashes, and emits bounded observations over OTLP — observation never controls execution.

Delivery forms (交付形态)

The Execution System is a host-neutral product, not a plugin. DSH is one entry point among several:

Form Package Audience
Embedded library wsr-execution Host-neutral embedding — import ExecutionApplicationFactory and bootstrap with create(configFile, dependencies)
DSH plugin entry dsh-wsr-execution DeepSeek Harness users — run workflows from chat and sidebar tabs
CLI execution-config (in wsr-execution) Configuration init / copy / validate / dump-effective

The DSH plugin is the first product entry; every admitted Workflow Action runs in a Runner-owned, isolated DSH execution context (DSH-E), never in the Intake context (DSH-I).

Why it exists

Bare agent chat What actually happens Execution System
Execution is a black box What the model did, and with which workflow definition, cannot be audited afterwards Every Delivery binds one exact version + SHA-256 into an immutable Manifest
Interruptions lose state After a crash or restart there is nowhere to look Manifest/current-slot persist; /wsr recover resumes from the last durable boundary
Version drift The same request can execute different definitions at different times Exact name@version selectors, immutable GitHub assets, and a validated exact-content READY cache
Observation couples to execution A telemetry outage can take the run down with it One-way, best-effort OTLP; Execution continues when Evidence or telemetry is unavailable

How it works

Three modules carry the responsibility:

  • Delivery Binding resolves one exact, locally READY Workflow Package (selector → validation → local MISSING/STAGING/READY store) and constructs the Manifest content.
  • Runtime Interaction owns canonical worktree exclusivity, the current Delivery slot, Manifest persistence, Runtime invocation, recovery, and final handling.
  • Delivery Observation maps outbound bounded facts to a one-way, best-effort OTLP profile without controlling execution.

The default Source is the configured firestige/wsr-workflow-package GitHub Release. implementation-workflow@0.3.0 and system-design-workflow@0.3.0 are downloaded, validated, and published to the local READY store; neither is embedded in an Execution artifact.

Architecture

Install (DSH entry, one command)

# 1. Approve the better-sqlite3 native build once (pnpm 11)
dsh plugin --profile web config set --location=project --json allowBuilds '{"better-sqlite3":true}'
# 2. Install the Execution bundle from the DSH release authority
dsh plugin --profile web add dsh-wsr-execution@0.1.0

Requires Node >=24.12 <25 and DSH 0.1.1-rc.2. The independently versioned DSH bundle is published by firestige/wsr-dsh and pins its compatible wsr-execution version.

Quick start

  1. Point the plugin at durable state files (outside the installation directory):

    # $DSH_HOME/profiles/web/cordis.patch.yml — the workflow-execution row
    - id: workflow-execution
      config:
        configFile: /absolute/path/wsr-local/execution.yaml
        bindingFile: /absolute/path/wsr-local/dsh-intake-bindings.json

    Initialize the config with execution-config init <path> yaml, replace the __REQUIRED__ values, and provision the referenced API key in an external DSH credential file.

  2. Start DSH Web from the target worktree and create a Delivery from chat:

    /wsr create implementation-workflow@0.3.0
    Implement the requested change and preserve existing user edits.
    
  3. Watch progress in the same conversation, inspect the bound Delivery in the sidebar Deliveries / Current status tabs, answer multi-turn Actions in chat, and finish an interaction with /wsr action finish.

Commands

/wsr list                         # privacy-safe Delivery and worktree state
/wsr create <name@version>
/wsr recover [delivery-id]
/wsr status [delivery-id]
/wsr action finish
/wsr abandon <delivery-id>

The explicit first-party skill /workflow-execution performs exactly one closed operation through the DSH-I-only workflow_execution_intake tool.

Compatibility

Dimension Requirement
Node.js >=24.12.0 <25
DeepSeek Harness 0.1.1-rc.2 (@deepseek-ai/dsh)
Workflow Package contract agentops.workflow-dsl@1.1.0 (historical runner) and agentops.workflow-dsl@2.0.0 (multi-Provider runner)
Observation contract agentops.observation@1.0.0
Checkpoint store better-sqlite3 (native build, approved via allowBuilds)

Known Limitations and Deferred Work

  • Developer preview — version 0.2.x is intended for trusted local use by individuals and small teams; compatibility-breaking changes are possible.
  • Exclusive Session/Delivery binding — the DSH Intake passes a private, typed, invocation-only proof of the exact registered conversation workspace; Execution derives and persists the canonical Git worktree, while Manifest/current-slot remain the durable Delivery/worktree authority. One Session, Delivery, and occupied worktree cannot be implicitly switched, shared, stolen, or released by timeout.
  • Observation disabled by default — set observation.enabled: true with a loopback OTLP base endpoint to enable the non-controlling exporter.
  • DSH-only interactive surface — the shipped web profile is the reference assembly; a custom profile contains only dsh-base and is not an interactive Intake surface.

For maintainers

Direct embedding

For host-neutral embedding, import ExecutionApplicationFactory, DefaultExecutionApplicationFactory, ExecutionRequest, TaskPrompt, and the configuration types from the package root. Calling the default factory's create(configFile, dependencies) is the single production bootstrap path. The exact DSH runtime is an optional peer: package-root import/type consumers need not install it, while executing the current dsh Provider requires the embedding profile to provide @deepseek-ai/dsh@0.1.1-rc.2. The release includes config/schema/execution.config.schema.json, versioned defaults/examples, compiled TypeScript declarations, and execution-config init|copy|validate|dump-effective.

Multi-Provider 2.0

execution.config@2.0.0 is the production multi-Provider path and contains no installation-wide Provider or model default. DefaultExecutionApplicationFactory registers the exact bundled Copilot SDK and Codex CLI Provider factories unless an embedding supplies an explicit registry. Each Agent-action Role must be present in <canonical-worktree>/.wsr/role-provider-bindings.json with an exact Provider identity/version and Provider-owned model coordinate. Admission validates required Workflow capabilities, freezes the factory descriptor digest into execution.delivery-manifest@2.0.0, and never performs priority selection or fallback. Recovery accepts only the same descriptor and starts realms only for Providers actually used by the persisted Delivery. See config/schema/execution.config.v2.schema.json.

The default Copilot factory registers provider.copilot@1.0.78 and reuses the local logged-in user through the exact bundled SDK. The default Codex factory registers provider.codex@0.144.5 and reuses Codex CLI's local login state. Neither path asks the embedding host for token material. Every Delivery realm admits only model coordinates frozen for its Roles and fails closed on runtime, login, model, recovery, or binding drift.

Get the source

This repository is normally consumed as a submodule of workflow-self-recursive:

git clone --recurse-submodules https://github.com/firestige/workflow-self-recursive.git

To clone it standalone:

git clone https://github.com/firestige/wsr-execution.git

Documentation

License

Apache-2.0

About

Host-neutral execution boundary for workflow-self-recursive: resolves one exact Workflow Package, binds an immutable Delivery Manifest, coordinates the Delivery, emits bounded OTLP observations. Install via dsh plugin add wsr-dsh-intake · 与宿主无关的 Agent 工作流执行边界:解析并校验确定的工作流包,绑定不可变交付清单,协调交付并发出有界观测。

Topics

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages