Compatibility with the official engine

August 17, 2026 ยท View on GitHub

dsh-workflow-isolate targets the workflow seam in DeepSeek Harness 0.1.0-rc.7. It is intended to replace @deepseek-ai/dsh-workflow-worker-thread, not run alongside it. Both provide the single ctx.workflowEngine service consumed by @deepseek-ai/dsh-tool-workflow and @deepseek-ai/dsh-tool-ralph.

The upstream API is a release candidate. Compatibility claims below are version-specific and should be revalidated before widening the peer range.

Matrix

SurfaceOfficial dsh-workflow-worker-thread rc.7dsh-workflow-isolateStatus / difference
Cordis serviceProvides ctx.workflowEngineProvides ctx.workflowEngineCompatible
Run APIWorkflowStartRequest to WorkflowRunSame DSH typesCompatible
Result contractNever-rejecting result; completed, cancelled, errorSameCompatible
Run ownershipcancel() plus idempotent bounded dispose()SameCompatible
Metadataname, description, optional whenToUse, phasesSame strict shapeCompatible
Script formPlain JavaScript function body with top-level awaitSameCompatible subset; QuickJS rather than V8 syntax/runtime
Guest inputGlobal argsGlobal argsCompatible, JSON snapshot enforced
Child hookagent(prompt, options?)SameCompatible
Child optionslabel, phase, schema, provider, modelSame closed vocabularyCompatible
Structured outputDSH object-rooted JSON Schema subsetSame DSH validatorCompatible
Combinatorsparallel(thunks), pipeline(items, ...stages)Same semanticsCompatible
Progress hooksphase(title), log(message)Same eventsCompatible
Child failuresOrdinary failed child resolves to nullSameCompatible
Fatal hook errorsInvalid call/schema/cap terminates workflowSameCompatible
Event familySix workflow/* eventsSameCompatible
Event pairingStart/end and agent-start/agent-end pairedSame, including synthesized termination endsCompatible
Provider policyConfigured provider; per-run overrideSameCompatible
Per-run total capMay lower configured ceilingSameCompatible
Agent request sizeNo separate payload cap1 MiB default UTF-8 JSON capAdditional limit
Worker topologyOne Node worker per runOne Node worker per runCompatible operational shape
Guest runtimeV8 node:vm in workerQuickJS/WASM in workerDeliberately different
Security stanceUpstream explicitly says node:vm is not a security boundarySeparate language runtime with narrow bridge; still not an absolute sandbox claimStronger boundary, different risk profile
Synchronous limitV8 vm timeout for initial sliceQuickJS interrupt-fuel budget across guest executionDifferent tuning unit
Elapsed limitCancellation/disposal graceExplicit host wall deadline plus disposal graceAdditional limit
Guest memory/stackPrimarily worker/V8 behaviorExplicit QuickJS heap and stack limits plus worker limitsAdditional limits
Node globalsNot intentionally injected; recoverable after a VM escapeNot injected; guest constructors remain in QuickJSDeliberately stronger separation
Timers/modules/I/ONot part of script APINot installedCompatible intended API
Error stacks/textV8 formattingQuickJS/bridge formattingMay differ; do not parse free-form text
MetricsNo isolate-metrics contractConcrete IsolatedRun.metrics promise with QuickJS termination/resource dataPublic extension; not part of DSH seam

JavaScript portability

Workflow scripts should be runtime-neutral orchestration code. Supported patterns include async functions, promises, arrays, plain objects, JSON methods, Promise.all, closures, and the provided workflow hooks.

Do not depend on:

  • Node.js globals or built-in modules;
  • dynamic import() or CommonJS loading;
  • Buffer, streams, filesystem, sockets, subprocesses, or timers;
  • V8-specific syntax, stack traces, error messages, or optimization behavior;
  • shared object identity with the host; or
  • non-JSON return values.

The engine synchronously parse-checks the same async-function-body shape with V8, then QuickJS compiles it in the worker. A script accepted by the official V8 engine can therefore settle as an error if it uses a JavaScript feature that the pinned QuickJS build does not implement.

Script-hook behavior

agent(prompt, options?)

The prompt must be a non-empty string. Options are a plain JSON object containing only label, phase, schema, provider, and model. With schema, the resolved value is validated structured output; without it, the resolved value is final child text. A child that ends without completed resolves to null.

Bad arguments, unknown options, unsupported schema keywords, provider startup failure, infrastructure result failure, cancellation, and budget exhaustion are fatal. The combinators rethrow those failures rather than silently converting them to an item-level null.

parallel(thunks)

Accepts an array of zero-argument functions, runs them concurrently subject to the engine's agent admission cap, and waits for all. An ordinary thunk exception becomes null for that item.

pipeline(items, ...stages)

Each item progresses through the stages independently. A stage receives (previous, originalItem, index). There is no barrier between stages. An ordinary exception turns that item into null and skips its later stages.

phase(title) and log(message)

These are observer narration only. A phase groups later agents by title; it does not impose execution ordering. Calls emit the standard DSH lifecycle events.

Upgrade checklist

Before claiming compatibility with a newer DSH release:

  1. Diff @deepseek-ai/dsh-workflow request, result, event, and error types.
  2. Diff the official worker engine's metadata, hook, cap, cancellation, and lifecycle behavior.
  3. Run the shared contract tests against both providers.
  4. Boot a real DSH profile with @deepseek-ai/dsh-tool-workflow and tool-ralph consumers.
  5. Exercise cancellation before ready, during provider start, during a child, and during guest computation.
  6. Verify exact event pairing and that the final value is absent from workflow/end.
  7. Re-baseline fuel, wall-time, and memory thresholds on supported Node platforms.
  8. Update the peer dependency range and this matrix only after those checks pass.

Upstream references