[AVAILABLE].
packages/execution-gateway, 25 tests.What it is
ExecutionGateway is the sole boundary through which a signed execution
authorization actually results in something running. It
does not trust the authorization it’s handed: it independently re-verifies the envelope and
re-derives the content hash itself before anything reaches a connector.
Why it exists
An authorization envelope proves that Parmana decided to approve something. It doesn’t by itself stop a receiving system from executing something else under that approval, or from skipping verification altogether. The gateway is the one place designed to say no even if every earlier stage said yes: the last point before a real system state changes.How it behaves
ExecutionGateway implements @parmana/execution-system’s ExecutionSystem interface, so
it plugs into RuntimeFactory.create() exactly like any other execution system, no change
to RuntimeEngine or RuntimePipeline is required to use it. It composes
@parmana/envelope-verifier’s checks (version, signature, expiry, TTL, nonce) and adds
three more, each optional and additive: recomputing the executable content hash and
comparing it to businessTransactionHash (always attempted); recomputing the current
policy content hash and comparing it to policyContentHash, when a PolicyRepository is
supplied (policyStillCurrent, CLAIMS.md §2.27); and independently re-verifying the
authorization’s declared runtime signals against real-world state, when a
SignalStateVerifier is supplied (signalsStillCurrent, CLAIMS.md §2.29, G-31) — see
Content Binding & TOCTOU for the full mechanism of the
latter two.
ExecutionGateway.ts):
ExecutionGateway.ts:170-180).
ExecutableContentHasher delegates to the same TrustRecordHasher used elsewhere in the
system (packages/crypto/src/ExecutableContentHasher.ts), the signing side and verifying
side run identical canonical serialization and hashing, never two parallel implementations
of the same computation.
Nonce single-use is scoped to whichever
NonceStore instance checks it. Multiple
independent gateway instances each using their own MemoryNonceStore can each accept the
same authorization once. Fleet-wide single-use requires one shared store (CLAIMS.md 3.2).Minimal example
packages/api/src/bootstrap/createExecutionGateway.ts)
follows this exact shape, using executionControl rather than a direct connector, see
Credential isolation.
Connectors: what’s actually wired today
AConnector is what the gateway hands verified, frozen content to after every check
passes. HttpConnector and MockConnector are reference implementations in
@parmana/connector-sdk. One real, production-registered connector exists today,
hubspot (whenever HUBSPOT_PRIVATE_APP_TOKEN is configured),
making genuine external API calls, not scripted responses (github also registers, for
github:pr-fetch/github:pr-merge). A second connector, razorpay, was previously
registered here too; it was deliberately removed from the repository entirely, 2026-08-12,
see docs/CLAIMS.md’s “Key Compromise Notice” section in the source repository. Four
enterprise-named mocks also exist in the codebase
(packages/connector-sdk/src/connectors/{sap,oracle,workday,salesforce}/), each an explicit
MockConnector wrapper, self-documented as “deterministic, in-memory, used until the real
enterprise connector is implemented.” These are reference mocks, not integrations, are
never registered by packages/api/src/bootstrap, and should not be represented as SAP,
Oracle, Workday, or Salesforce connectivity.
Failure reporting
ExecutionGateway.execute() throws on any failed check, naming every failing check and, on
a content mismatch, both hashes:
ExecutionGateway.ts:250-265, describeFailure.)
Next
Gateway attestation
The gateway’s own signature: what it proves about a release, and what it doesn’t.
Credential isolation
What happens to the credential a connector needs, once the gateway releases execution.