Introducing The Sweep: OX’s New Live Security Research Series
Register Now
Breaking: The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Read the Report
Are you exposed? Connect your apps in minutes.
Scan your apps free

@parcha/agentrun-dsl

Latest version: v0.1.0-beta.65

Overview

Last scanned
27 Nov 2026
Published
27 Nov 2026
npm package Publisher: aj-parcha, miguel-parcha
1,275 Stars
106 Forks
57 Versions
17.7K Downloads
JavaScript Repo language

Scan summary

@parcha/agentrun-dsl was last scanned on 27 Nov 2026 at version 0.1.0-beta.65. Risk score 0 of 100. No malicious behavior was detected.

  • Releases: 57 versions; the latest 5 were published within 2 days (26 and 27 Nov 2026).
  • Findings: No rules fired in version 0.1.0-beta.65.
  • Downloads: 17,705 downloads.

Versions

57 versions published
Versions and the rules that fired in each
VersionPublishedStatus
0.1.0-beta.65 LATEST 27 Nov 2026 No rules fired
0.1.0-beta.64 27 Nov 2026 No rules fired
0.1.0-beta.63 26 Nov 2026 No rules fired
0.1.0-beta.62 26 Nov 2026 Not shown
0.1.0-beta.61 26 Nov 2026 Not shown

No rules fired in 0.1.0-beta.65

Findings

Findings for v0.1.0-beta.65. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.

The score describes 0.1.0-beta.65; other versions have their own rules, not their own score.

README

The publisher’s own README, as collected from the registry.

@parcha/agentrun-dsl

Typed workflows that your agent writes. It drafts a workflow, checks it, dry-runs it for free, then runs it; @parcha/agentrun-dsl/graph turns the workflow into its graph. The core provides the v2 workflow types, validator, interpreter, events, schema, and an offline CLI. Supply agent, judgment, and effect functions only when a workflow needs them.

Beta, on npm under the latest dist-tag (npm view @parcha/agentrun-dsl dist-tags). Requires Node 24.22.3+; TypeScript consumers require TypeScript 5.4+.

npm install @parcha/agentrun-dsl@latest
npx @parcha/agentrun-dsl@latest demo

For the JavaScript API, save this as demo.mjs and run node demo.mjs:

import { runTriageDemo } from '@parcha/agentrun-dsl/demo';
const { result } = await runTriageDemo('billing');
console.log(result.output); // { queue: 'billing', priority: 'normal' }

The demo runs real control flow with scripted judgments. ambiguous escalates. No model SDK or API key is required by the core. The optional @parcha/agentrun-jev adapter adds live judgments; your host supplies agent steps through runNode.

From a draft to a run

A workflow is a JSON document of typed nodes: each node that asks a model names the JSON Schema its answer must match, and the workflow names the schemas of its input and output. An agent writes the document. This package checks it, tries it without a model, and runs it.

  1. Draft. In your own host, authorWorkflow gives your agent the packaged author contract and keeps the candidate and its feedback without running it.
  2. Check. validateWorkflow(workflow) checks the structure, the schemas, the state paths between nodes and the predicates, with no model call. A refused workflow lists its issues: each names the node or schema at fault with a JSON Pointer path, and the rule it breaks with a code, so the agent repairs that node and checks again. inspectWorkflow shows the tree and the tools and adapters it needs, without running any code.
  3. Dry-run, for free. dryRunWorkflow(workflow) runs the whole workflow on synthetic values made from its schemas, with no model, Jev or tool call. Its status is passed when every check ran, failed with the problems, or not_run when a check could not run, with the reasons in skipped. A not_run dry run proves nothing.
  4. Run. runWorkflow(workflow, input, deps) runs it with your agent, judgment and effect functions, and returns an output that matches the output schema, or an escalation. deps is the object of adapters your application supplies (runNode, runJudge, runEffect); Integrate with your application says what each one owes the engine.
  5. Watch every node. workflowGraph(workflow) from @parcha/agentrun-dsl/graph lists every node and edge from the JSON alone, and nodeStatus marks each node done, working, failed or not-run from what a durable run kept, and escalated where the run's terminal result says it stopped. The AgentRun console draws the same graph for a workflow run, with each node's state as the run goes.

The same checks from a shell, in the project where you installed the package, on one of the author skill's examples that ships with it (an agent extracts the change in each release note, then summarizes the migration):

cp node_modules/@parcha/agentrun-dsl/skills/author/examples/review-release-notes.json workflow.json
npx @parcha/agentrun-dsl@latest inspect workflow.json
npx @parcha/agentrun-dsl@latest validate workflow.json --trusted
npx @parcha/agentrun-dsl@latest dry-run workflow.json --trusted

Its dry run is passed: every node ran on synthetic values, with no model call. The demo's workflow (npx @parcha/agentrun-dsl@latest example demo.json) comes back not_run instead: its confidence check escalates on a synthetic answer, so the queue choice after it is not exercised, and skipped says so. dry-run --strict exits 3 on not_run, for a script that must stop there; a failure exits 1.

Run it with no key

runWorkflow calls back into your application for every model step. To see a run end to end with no key and no network, give it a runNode that returns a fixed record. Save this as run.mjs next to node_modules and run node run.mjs:

import { readFileSync } from 'node:fs';
import { runWorkflow } from '@parcha/agentrun-dsl';

const dir = 'node_modules/@parcha/agentrun-dsl/skills/author/examples/';
const workflow = JSON.parse(readFileSync(dir + 'review-release-notes.json', 'utf8'));
const input = JSON.parse(readFileSync(dir + 'review-release-notes.input.json', 'utf8'));

// deps holds the adapters your application supplies. This runNode answers each
// model step with a fixed record instead of calling a model.
const deps = {
  async runNode({ label, user }) {
    const state = JSON.parse(user); // the node's projected state, as JSON text
    if (label === 'extract-change') {
      return { breakingChange: state.text, migrationAction: 'Follow the release note.' };
    }
    return { summary: `${state.changes.length} breaking changes.`, changes: state.changes };
  },
};

const result = await runWorkflow(workflow, input, deps);
console.log(result.status, result.output);

It prints complete and a report with the two changes. Each answer is checked against the node's schema: a runNode that returns {} makes the run throw submission does not satisfy schema "Change". A node whose adapter you did not supply fails with a message that names the node and the adapter (extract node "extract-change" requires runNode). The three adapters take different parameters, listed in WorkflowDeps: runNode (agent, decide, extract and report nodes) receives kind, label, system, user, schema, tools and signal, which a real host forwards to its agent; runJudge (judge, pick, sift, route and ask) receives label, kind, state and questions, and returns an object with the answers; runEffect (call nodes) receives node, input, attempt, idempotencyKey and signal, and returns the tool's result.

The run command of the CLI supplies no adapters, so it runs only a workflow that needs none, such as one made of code nodes. Save this as total.json:

{
  "v": 2,
  "name": "total",
  "schemas": {
    "Input": { "type": "object", "properties": { "items": { "type": "array", "items": { "type": "number" } } }, "required": ["items"] },
    "Output": { "type": "object", "properties": { "total": { "type": "number" } }, "required": ["total"] }
  },
  "input": { "schemaId": "Input" },
  "output": { "schemaId": "Output" },
  "root": { "node": "code", "label": "sum", "code": "(s) => ({ total: s.items.reduce((a, b) => a + b, 0) })" }
}

Save its input as total.input.json:

{ "items": [1, 2, 3] }

Then run it:

npx @parcha/agentrun-dsl@latest run total.json total.input.json --trusted

It prints "status": "complete" and an output with "total": 6. The shipped examples each need an adapter, so run stops on them naming it: review-release-notes.json needs runNode, evidence-gate.json needs runJudge, and read-file.json and read-source-decision.json need runEffect (the latter also runJudge). Run those with runWorkflow and your own adapters.

The agentrun-dsl CLI provides demo, example, inspect, validate, dry-run, and deterministic run. inspect workflow.json [--json] displays structure without executing code. Validation/run require --trusted because workflow JavaScript can execute, including during validation. This package is not an isolation boundary.

runWorkflow(workflow, input, deps) returns a complete schema-validated output or an escalation; its TypeScript output type is unknown. defineWorkflow binds Standard JSON Schema contracts, including supported Zod schemas, to a frozen v2 document; runTypedWorkflow infers those input/output types and delegates to the same interpreter. Intermediate state paths remain runtime-validated. Execution and verification failures throw. Hosts own tools, file delivery, idempotency and activation, and choose where a run's journal lives; the package ships the recovery driver (see Durable runs below). A durable run's store keeps each effect's arguments as given, so redact secrets before they reach an effect.

Raw JSON schemas retain unknown boundary types. Zod transforms, refinements, defaults and coercion are rejected rather than silently dropped. The core does not depend on Zod at runtime. Other Standard JSON Schema providers must faithfully represent their contracts. Typed execution accepts the original defineWorkflow result; copied or deserialized documents use runWorkflow.

A judge on any model

runJudge is a plain function: it receives the node's questions and returns answers, so any model can stand behind it. This one answers every question with a fixed probability, so it runs with no key; replace its body with a call to your model that returns a probability for each question. Save this as judge.mjs next to node_modules and run node judge.mjs:

import { readFileSync } from 'node:fs';
import { runWorkflow } from '@parcha/agentrun-dsl';

const dir = 'node_modules/@parcha/agentrun-dsl/skills/author/examples/';
const workflow = JSON.parse(readFileSync(dir + 'evidence-gate.json', 'utf8'));
const input = JSON.parse(readFileSync(dir + 'evidence-gate.input.json', 'utf8'));

// A yes-probability for every question, as a noul answer.
const runJudge = async ({ questions }) => ({
  answers: Object.fromEntries(Object.keys(questions).map(id => [id, { type: 'noul', noul: 0.95 }])),
});

const result = await runWorkflow(workflow, input, { runJudge });
console.log(result.status, result.output?.accepted);

It prints complete true: the workflow's own code gate accepts a yes-probability of 0.90 or more. Set noul to 0.5 and it prints escalated undefined instead. The Jev adapter, @parcha/agentrun-jev, is this same function backed by TypeSafe's judgment service.

Durable runs

@parcha/agentrun-dsl/recovery journals a run so a process that dies can continue it. openRecovery(store, workflow, { key }) opens the run's journal (fileStore(directory) keeps it in a directory, memoryStore() in memory) and withRecovery(driver, deps) wraps your adapters. A run opened again with the same key answers each committed step from the journal and runs only the rest; a tool call that was in flight when the process died has an unknown outcome and is refused, not repeated, unless your reconcile option settles it. The same journal opened for a completed run runs nothing. Save this as durable.mjs and run it three times: CRASH=1 node durable.mjs (the process exits before the last step commits), then node durable.mjs (it runs one model step, the one that did not commit), then node durable.mjs again (zero steps):

import { readFileSync } from 'node:fs';
import { runWorkflow } from '@parcha/agentrun-dsl';
import { openRecovery, withRecovery, fileStore } from '@parcha/agentrun-dsl/recovery';

const dir = 'node_modules/@parcha/agentrun-dsl/skills/author/examples/';
const workflow = JSON.parse(readFileSync(dir + 'review-release-notes.json', 'utf8'));
const input = JSON.parse(readFileSync(dir + 'review-release-notes.input.json', 'utf8'));

let calls = 0;
const runNode = async ({ label, user }) => {
  calls += 1;
  if (process.env.CRASH && label === 'summarize-migration') process.exit(1); // dies before the last step commits
  const state = JSON.parse(user);
  return label === 'extract-change'
    ? { breakingChange: state.text, migrationAction: 'Follow the release note.' }
    : { summary: `${state.changes.length} breaking changes.`, changes: state.changes };
};

const driver = await openRecovery(fileStore('./run-journal'), workflow, { key: 'release-review' });
try {
  const result = await runWorkflow(workflow, input, withRecovery(driver, { runNode }));
  console.log(result.status, `model steps run this time: ${calls}`);
} finally { await driver.close(); }

The first run exits with code 1 and leaves run-journal/; the second prints complete model steps run this time: 1; the third prints complete model steps run this time: 0. Delete run-journal/ to start over. The key names the run, so use one per run; the journal is bound to the workflow and input it was opened with, and a change to either is refused. Hosts keep the store, the key and the decision to resume: see Integrate with your application.

Public API

The package root exports a deliberate API. The beta retains agent, structured-output, report, artifact, effect, child-workflow and focused-evaluation paths. Hosts supply their adapters and policy; a workflow cannot grant itself tool permissions.

OX Radar and Response Center

Find threats in your stack.

OX Radar can check high-priority threats, like critical package CVEs, against your context.

Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.

Where it’s listed

The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).

  • npm @parcha/agentrun-dsl

References

The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.

Powered by Read the latest findings

Scan your whole stack

Group 1261154050 1
Group 1261154050
 

From OX Research Newsroom

Ethersphere Hijacked With Crypto Stealing Malware (1)
npm

Ethersphere Hijacked With Crypto Stealing Malware Via Github & npm

CVE

Java4Shell (CVE-2026-114938): Easy to Crash, Hard to Exploit — Less Than 0.12% of JVMs Estimated at Risk of RCE

Critical Apache HTTP Server Flaw Exposes Web Servers to RCE (1)
CVE

CVE-2026-119618: Critical Apache HTTP Server Flaw Exposes Web Servers to Remote Code Execution

Frame 2085668439 (1)
Group 1261154229