@x12i/connectix-simulator
v0.1.1
Published
Connectix package simulator built on @x12i/api-simulator: local, deterministic HTTP-shaped fixtures for /health, /metadata, /v1/*, and /pipeline without running the service.
Maintainers
Readme
@x12i/connectix-simulator
Connectix package simulator built on @x12i/api-simulator.
Deterministic, in-process fixtures for the Connectix HTTP surface (/health, /ready,
/metadata, /v1/*, /pipeline) so callers, tools, and tests can develop against Connectix
without running the service, Credorix, or any provider. It mirrors the service stub semantics;
it does not replace stub/live execution in the production runtime.
npm install -D @x12i/connectix-simulatorIn-process dispatch
import { createConnectixSimulator } from "@x12i/connectix-simulator";
const { simulator, pipeline } = createConnectixSimulator();
await simulator.dispatch({ method: "GET", path: "/metadata" });
await pipeline({
serviceId: "connectix",
serviceType: "connect.executeAction",
input: { actionId: "example.echo", bindingRef: "demo-echo", input: { message: "hi" } },
stub: { enabled: true },
});With @x12i/connectix-tools
import { createConnectToolRunner } from "@x12i/connectix-tools";
import { createSimulatorPipelineCaller } from "@x12i/connectix-simulator";
const runner = createConnectToolRunner(createSimulatorPipelineCaller());
await runner.run({ tool: "connect_search_actions", input: { query: "echo" } });Optional HTTP server
import { startConnectixSimulatorServer } from "@x12i/connectix-simulator";
const { port, close } = await startConnectixSimulatorServer(); // 127.0.0.1:5524 by defaultDefault port comes from CONNECTIX_SIMULATOR_PORT, falling back to 5524
(api-simulator port zone 5520–5539).
Semantics
- Stub execution mirrors the service fixtures (
example.echo,hackernews.get_item,hackernews.list_top_stories,github.issue.create) and the demo bindings (demo-echo,demo-hackernews,demo-github). - Binding policy errors match the service:
ACTION_NOT_FOUND,CONNECTION_BINDING_NOT_FOUND,ACTION_NOT_ALLOWED. - Live mode is rejected with
ACTION_IMPLEMENTATION_UNAVAILABLE— use the real service for live.
License: UNLICENSED (X12I internal; published for X12I service consumers).
