Skip to main content
[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

Use MockConnector to test anything upstream of your connector (policy wiring, routing) without a real target system:
Real output, checked directly against this exact code:
To test failure handling, use 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 expectedVersion was configured at registration and the connector’s own metadata.version doesn’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 a ConnectorEvidence 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 by MockConnector or your own connector. request.capability didn’t match anything in connectorCapabilities([...]). Check for a typo, capability strings are exact, case-sensitive matches.
  • SdkConnectorExecutor rejects with a version mismatch. An expectedVersion was configured at registration and your connector’s metadata.version doesn’t match, this guards a rolling deployment that swapped connector builds underneath a pinned expectation.
  • Registered your connector but POST /execute still answers 503 CONNECTOR_NOT_REGISTERED. Registration in a ConnectorRegistry you constructed yourself, such as an InMemoryConnectorRegistry in your own code, doesn’t reach the running default server, that server builds its own registry in createConnectorRegistry.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.