@contractspec/integration.runtime
v3.10.1
Published
Runtime integration with secret management
Maintainers
Readme
@contractspec/integration.runtime
Website: https://contractspec.io
Runtime integration with secret management.
What It Provides
- Layer: integration.
- Consumers:
providers-impls, bundles, apps that need secrets or channel routing. - Related ContractSpec packages include
@contractspec/lib.contracts-integrations,@contractspec/lib.contracts-spec,@contractspec/lib.logger,@contractspec/tool.bun,@contractspec/tool.typescript.
Installation
npm install @contractspec/integration.runtime
or
bun add @contractspec/integration.runtime
Usage
Import the root entrypoint from @contractspec/integration.runtime, or choose a documented subpath when you only need one part of the package surface.
The channel runtime keeps policy evaluation deterministic and auditable:
- Signature-invalid events are rejected before processing.
MessagingPolicyEnginecan be replaced by a contract-backed policy evaluator throughChannelRuntimeService.ChannelApprovalServiceexposes a generic approval queue for CLI, API, web, or custom operator surfaces via the shared channel store.ControlPlaneSkillRegistryServiceverifies, installs, lists, and disables signed skill artifacts against an allowlisted trust policy.- Compiled plans now carry deterministic plan and step IDs, DAG dependency metadata, typed step I/O schema refs, actor audit context, and approval timeout fallback state.
- Capability grants are intended to be bound by the hosting application, for example through
CHANNEL_RUNTIME_DEFAULT_CAPABILITY_GRANTS, rather than trusted from inbound event payload metadata. - Hosting applications should also bind a server-side actor via
actorResolverso runtime approvals and execution are attributed to the authenticated service, operator, or agent principal rather than raw inbound channel claims. - Telemetry now carries
traceId,sessionId, andworkflowIdwhen callers provide them in inbound metadata. - Trace services now persist stage-level trace events so operators can inspect the full intent -> plan -> policy -> action -> outcome chain.
Architecture
src/channelis part of the package's public or composition surface.src/health.tsis part of the package's public or composition surface.src/index.tsis the root public barrel and package entrypoint.src/runtime.health.test.tsis part of the package's public or composition surface.src/runtime.tsis part of the package's public or composition surface.src/secretsis part of the package's public or composition surface.src/transportis part of the package's public or composition surface.
Public Entry Points
- Export
.resolves through./src/index.ts. - Export
./channelresolves through./src/channel/index.ts. - Export
./channel/approvalresolves through./src/channel/approval.ts. - Export
./channel/authorizationresolves through./src/channel/authorization.ts. - Export
./channel/base-typesresolves through./src/channel/base-types.ts. - Export
./channel/dispatcherresolves through./src/channel/dispatcher.ts. - Export
./channel/githubresolves through./src/channel/github.ts. - Export
./channel/memory-storeresolves through./src/channel/memory-store.ts. - Export
./channel/plan-typesresolves through./src/channel/plan-types.ts. - Export
./channel/plan-utilsresolves through./src/channel/plan-utils.ts. - Export
./channel/plannerresolves through./src/channel/planner.ts. - Export
./channel/planner-typesresolves through./src/channel/planner-types.ts. - Export
./channel/policyresolves through./src/channel/policy.ts. - Export
./channel/postgres-queriesresolves through./src/channel/postgres-queries.ts. - Export
./channel/postgres-schemaresolves through./src/channel/postgres-schema.ts. - Export
./channel/postgres-storeresolves through./src/channel/postgres-store.ts. - Export
./channel/replay-fixturesresolves through./src/channel/replay-fixtures.ts. - Export
./channel/serviceresolves through./src/channel/service.ts. - Export
./channel/slackresolves through./src/channel/slack.ts. - Export
./channel/storeresolves through./src/channel/store.ts. - Export
./channel/telegramresolves through./src/channel/telegram.ts. - Export
./channel/telemetryresolves through./src/channel/telemetry.ts. - Export
./channel/traceresolves through./src/channel/trace.ts. - Export
./channel/typesresolves through./src/channel/types.ts. - Export
./channel/whatsapp-metaresolves through./src/channel/whatsapp-meta.ts. - Export
./channel/whatsapp-twilioresolves through./src/channel/whatsapp-twilio.ts. - Export
./healthresolves through./src/health.ts. - Export
./runtimeresolves through./src/runtime.ts. - Export
./secretsresolves through./src/secrets/index.ts. - Export
./secrets/env-secret-providerresolves through./src/secrets/env-secret-provider.ts. - Export
./secrets/gcp-secret-managerresolves through./src/secrets/gcp-secret-manager.ts. - Export
./secrets/managerresolves through./src/secrets/manager.ts. - Export
./secrets/providerresolves through./src/secrets/provider.ts. - Export
./transportresolves through./src/transport/index.ts. - Export
./transport/auth-resolverresolves through./src/transport/auth-resolver.ts. - Export
./transport/transport-factoryresolves through./src/transport/transport-factory.ts. - Export
./transport/version-negotiatorresolves through./src/transport/version-negotiator.ts. - The package publishes 41 total export subpaths; keep docs aligned with
package.json.
Local Commands
bun run dev— contractspec-bun-build devbun run build— bun run prebuild && bun run build:bundle && bun run build:typesbun run test— bun test --pass-with-no-testsbun run lint— bun lint:fixbun run lint:check— biome check .bun run lint:fix— biome check --write --unsafe --only=nursery/useSortedClasses . && biome check --write .bun run typecheck— tsc --noEmitbun run publish:pkg— bun publish --tolerate-republish --ignore-scripts --verbosebun run publish:pkg:canary— bun publish:pkg --tag canarybun run clean— rimraf dist .turbobun run build:bundle— contractspec-bun-build transpilebun run build:types— contractspec-bun-build typesbun run prebuild— contractspec-bun-build prebuild
Recent Updates
- Replace eslint+prettier by biomejs to optimize speed.
- Resolve lint, build, and type errors across nine packages.
- Add Composio universal fallback, fix provider-ranking types, and expand package exports.
- Add first-class transport, auth, versioning, and BYOK support across all integrations.
- Add monorepo-aware environment resolution helpers that materialize framework aliases and redact secret values in reports.
- Upgrade dependencies.
- Stabilize lint gate and runtime contract typing.
Notes
- Secret providers must implement the
providerinterface; never read secrets directly. - Environment resolution reports must stay redacted; secret and sensitive values are never serialized into examples, reports, telemetry, or errors.
- Channel stores (memory, postgres) are swappable; do not couple to a specific backend.
- Never import from apps or bundles.
