
Security News
Agent Baseline Publishes Security Reference Architecture for Software Factories
Agent Baseline’s new reference architecture shows how to secure software factories with four boundaries enforced outside the AI agent.
@openmep/pascal-adapter
Advanced tools
Size and check HVAC duct systems in Pascal Editor scenes with OpenMEP's deterministic engine; emits apply_patch batches.
Deterministic duct sizing and checks for HVAC drawn in
Pascal Editor. Pascal holds the
geometry, ports, and MCP edit tools; this package supplies the airflow,
equal-friction sizing, and findings, and hands the result back as one
apply_patch batch (one undo step).
# with a local Pascal editor running (`npx @pascal-app/cli start`):
npx openmep-pascal mcp size
# or offline, on an exported scene:
npx openmep-pascal size scene.json --pretty
export_json / get_scene output, a saved scene
file, or the raw JSON string. Only duct-segment, duct-fitting,
duct-terminal, hvac-equipment, and level nodes matter; the rest are
kept for parent lookup.metadata.requiredCfm (also metadata.openmep.requiredCfm or
metadata.cfm; the key is configurable).@openmep/hvac-domain (recommendDuctSegments,
equal friction at 0.08 in. w.g./100 ft with role-based velocity caps per
system).apply_patch batch that sets round
duct-segment.diameter to the standard size and records CFM, velocity,
friction rate, and status under metadata.openmep.openmep-pascal size <scene.json|-> [--out file] [--patch-out file] [--items-out file]
[--metadata-key key] [--tolerance-m metres] [--no-resize] [--pretty] [--fail-on-findings]
openmep-pascal items <scene.json|-> [--out file] [--pretty]
openmep-pascal mcp size [connection] [--dry-run] [--no-verify] [sizing flags as for size]
openmep-pascal mcp export [connection] [--out file] [--pretty]
size prints { summary, findings, segments, patches, items }. --patch-out
writes { "patches": [...] }, which is exactly the apply_patch argument.
items prints the scene as NetworkItems so any other engine or grader can
consume it. Exit codes: 0 ran, 1 error findings with --fail-on-findings or a
failed post-apply verification, 2 malformed input, engine, or MCP error (typed
name and code on stderr).
openmep-pascal mcp sizeTalks to a running Pascal editor through Pascal's own MCP server and does the
whole round trip: export_json → size → apply_patch (validated as a batch,
one undo step in the editor) → export_json again to verify every patched
segment landed. Re-running is idempotent: segments whose diameter and recorded
result already match get no patch, so nothing is added to the undo history.
Connection, in order of preference:
npx @pascal-app/cli start (or
pascal editor) from $PASCAL_HOME/run/mcp.json (Pascal CLI 1.0.0; 0.1.x
used mcp.url in run/editor.json) and $PASCAL_HOME/run/mcp-token,
default ~/.pascal, exactly as pascal mcp connect does;--url http://127.0.0.1:PORT/mcp --token-file ~/.pascal/run/mcp-token (or
--token) for a Streamable HTTP server elsewhere;--stdio "pascal mcp connect" or --stdio "pascal-mcp --stdio" to spawn a
stdio server.--dry-run exports and sizes without applying. The output adds target,
applied (appliedOps, and Pascal's persistence warning when the editor
kept the change in memory only because no scene is bound), and
verification. The library equivalent is sizeThroughPascalMcp(session);
connectPascalMcp / openPascalMcpSession give a narrow typed session
(exportScene, applyPatch, undo, redo, callTool).
Verified against Pascal 0.1.5 from @pascal-app/cli on 2026-09-09
(examples/live-roundtrip.mjs, npm run live:roundtrip): the bundled scene
created through apply_patch, sized 6 → 9/8/7 in in one batch, undo
restored all three diameters in one step, redo reapplied them, and a second
pass patched nothing.
export_json → save as scene.json.openmep-pascal size scene.json --patch-out patches.json.apply_patch with the contents of patches.json.Try it on the bundled scene (a furnace, a round main, a tee, two runouts to a ceiling diffuser at 150 CFM and a floor register at 100 CFM, and a separate return drop):
npm run size:example --workspace @openmep/pascal-adapter
import { sizePascalScene } from "@openmep/pascal-adapter";
const result = sizePascalScene(sceneJson);
result.findings; // undersized runs, terminals with no path to equipment, missing CFM, ...
result.patches; // [{ op: "update", id, data: { diameter, metadata } }]
result.segments; // per-run CFM, role, recommended size, actual equivalent diameter, comparison
result.network; // NetworkItems, ports, connections
readPascalScene, buildPascalNetwork, and sizePascalNetwork expose the
stages separately. Errors are typed: PascalAdapterError (invalid-json,
invalid-scene, invalid-node, invalid-argument) from this package, and
DuctNetworkError / DuctSizingError / PortGraphError from
@openmep/hvac-domain.
| code | severity | meaning |
|---|---|---|
undersized | error | actual (or equivalent) diameter is below the exact required diameter |
no-equipment-path | error | a terminal with CFM has no same-system path to a furnace / air handler |
no-equipment | error | the scene has no furnace or air handler |
invalid-required-cfm | error | CFM metadata present but not a positive number |
diameter-out-of-host-range | error | recommended size is outside Pascal's 2–48 in duct-segment.diameter range |
dangling-reference | error | internal consistency failure from the engine |
mixed-system-segment | error | internal consistency failure: one run loaded by supply and return |
unsized-segment | warning | a supply run (or a return run, once any grille has CFM) on no terminal-to-equipment path |
missing-required-cfm | warning / info | supply terminal (warning) or return grille (info) without CFM metadata; it does not contribute |
oversized | info | at least one full standard size above the recommendation |
shape-not-resized | info | rect / oval run graded but left as drawn |
unsupported-fitting-type | info | fitting kind this adapter does not know; treated as unconnected |
rootNodeIds (normally a
level under a building). Pascal's editor drops unreachable nodes when it
opens a project and autosaves the pruned graph, while MCP export_json
still shows them; the adapter reports such nodes as detached-node.apply_patch update is a shallow merge, so the patch carries the
full metadata record with existing keys preserved. Apply patches to the
same scene state you exported.zone polygons are a later step.pascalorg/editor at 2026-09-09; the tests pin the expected positions.@pascal-app/core and @pascal-app/mcp packages are
bundler-only ESM (extensionless imports), so this package never imports
them: the live path speaks MCP over HTTP or stdio and needs only a running
editor.MIT. Port geometry is adapted from Pascal Editor (pascalorg/editor, MIT),
see src/ports.ts.
FAQs
Size and check HVAC duct systems in Pascal Editor scenes with OpenMEP's deterministic engine; emits apply_patch batches.
The npm package @openmep/pascal-adapter receives a total of 48 weekly downloads. As such, @openmep/pascal-adapter popularity was classified as not popular.
We found that @openmep/pascal-adapter demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.

Security News
Agent Baseline’s new reference architecture shows how to secure software factories with four boundaries enforced outside the AI agent.

Security News
arXiv now limits authors to two submissions a month as AI slop overwhelms moderators, delays good papers, and sparks debate over applying the limit to everyone.

Research
/Security News
A new GhostAction wave hits hundreds of GitHub repos, expanding CI/CD secret theft to cloud and AI credentials in source code and git history.