[AVAILABLE] as a library,
packages/connector-sdk. Parmana ships no
built-in connector. To connect a system with no code change, register an
external connector instead: Connect any external
system.Examples below are TypeScript. Building a connector from Python instead? The
identical contract is published as
parmana-connector-sdk on
PyPI — see Connector SDK
(Python).Connector responsibilities, and what a Connector must never do
A Connector validates a request, executes using an already-resolved credential, and returns a response with a fixed, predictable shape. A Connector never evaluates policy, authorizes execution, interprets AI output, makes a business decision, or resolves a credential itself, credential resolution happens exclusively inside the Execution Gateway, before a Connector is ever called.Capabilities are namespaced verbs
ConnectorCapability is a plain string, validated eagerly by connectorCapabilities()
against namespace:verb (e.g. http:get, crm:read, payments:refund), a malformed
capability throws at connector construction, not at execution time. By convention,
ExecutableContent.action is the capability string; this is what
execution-control’s DefaultConnectorPolicy already checks unchanged.
Registering a connector
createGatewayConnectorRegistry returns execution-control’s ConnectorRegistry interface (get()), so
registry plugs directly into ExecutionControlService exactly like InMemoryConnectorRegistry. Pass one
registration per connector in the array.
Testing your connector hermetically
UseMockConnector to test anything upstream of your connector (policy wiring, routing)
without a real target system:
script: { failWith: new Error("upstream unavailable") }.
mock.invocations records every ConnectorRequest the connector received, so tests can
assert exactly what was executed.
Version and health checks fail closed
SdkConnectorExecutor rejects execution, before invoking your connector, if:
- an
expectedVersionwas configured at registration and the connector’s ownmetadata.versiondoesn’t match (guards a rolling deployment that swapped connector builds underneath a pinned expectation), or metadata.health.status === "unavailable".
What every connector’s evidence looks like
Every execution produces aConnectorEvidence object, connector ID, version, capability,
a sanitized endpoint (credentials and query parameters stripped), the credential provider’s
ID, redacted request/response summaries, timestamps, and a hash computed by the existing
TrustRecordHasher, attached at ExecutionResult.metadata.connector. See
Execution Trust Record for how this reaches the Trust Record
without any change to its schema or hashing pipeline.
Troubleshoot
does not declare capability "..."thrown byMockConnectoror your own connector.request.capabilitydidn’t match anything inconnectorCapabilities([...]). Check for a typo, capability strings are exact, case-sensitive matches.SdkConnectorExecutorrejects with a version mismatch. AnexpectedVersionwas configured at registration and your connector’smetadata.versiondoesn’t match, this guards a rolling deployment that swapped connector builds underneath a pinned expectation.- Registered your connector but
POST /executestill answers503 CONNECTOR_NOT_REGISTERED. Registration in aConnectorRegistryyou constructed yourself, such as anInMemoryConnectorRegistryin your own code, doesn’t reach the running default server, that server builds its own registry increateConnectorRegistry.ts, see the Warning above.
Next
Issue and verify session credentials
What your connector’s
context.credential actually is, and its lifecycle.Credential isolation
The concept this guide’s credential handling exercises.