@x12i/memorix-io-matrix
v1.1.0
Published
Derive Object–Property I/O Matrices from Memorix connector and multistep pipeline metadata
Readme
@x12i/memorix-io-matrix
Derive Object–Property I/O Matrices from Memorix generic connector definitions and multistep pipelines. This package is the information-contract layer for Connectors Studio. It does not ship the React editor — render with @x12i/io-matrix-view.
Requires Node.js ≥ 20.11. React is only needed in a host app that mounts the view.
Install
npm i @x12i/memorix-io-matrix @x12i/io-matrix-schema
# hosts that render the editor also:
npm i @x12i/io-matrix-viewAPI
| Function | Input | Result |
| --- | --- | --- |
| sourceConnectorToMatrix | Source / service connector.json | Workflow steps × stream object properties |
| targetConnectorToMatrix | Target connector.json | Operations × delivery input / receipt fields |
| pipelineToMatrix | PipelineDefinition + optional nested connector matrices | Stages × ports; mgc-pull / composite get subMatrix |
| mergeMatrixOverlay | Derived matrix + authored overlay | Derived structure wins; abstracts, transforms, examples, extra columns kept |
| matrixSummary | Matrix or document | Step / object-type / abstract / payload-property counts |
| mergeDerivedDocument | Derived matrix + optional overlay | { document, summary, overlayPresent } |
| toDocument | Matrix | { formatVersion, matrix } via serializeDocument |
Duck-typed inputs — pass a parsed definition object; this package does not depend on the connector runtimes.
Usage
import { sourceConnectorToMatrix, mergeDerivedDocument } from "@x12i/memorix-io-matrix";
import { parseDocument } from "@x12i/io-matrix-schema";
const derived = sourceConnectorToMatrix(definition);
const { document, summary, overlayPresent } = mergeDerivedDocument(
derived,
overlay ? parseDocument(overlay) : undefined,
);Host that renders (Connectors Studio):
import { ObjectPropertyIOMatrix } from "@x12i/io-matrix-view";
import "@x12i/io-matrix-view/style.css";
<ObjectPropertyIOMatrix matrix={matrix} onChange={setMatrix} mode="edit" />Leave the view memorix prop unset. Hosts own load/save of the versioned document. @x12i/[email protected] CSS includes Tailwind Preflight — import a host recovery stylesheet after style.css until 1.2.0 scoped CSS.
Abstracts vs Map-1
I/O matrix abstracts (abstractCatalog, property abstracts[], step abstractInputs / abstractOutputs) are a companion information contract. They are seeded from semanticProfileId, identity paths, and delivery schema keys.
Do not put Map-1 propertyMappings into connector.json (MGC-11). Persist authored abstracts/transforms/examples as a sidecar io-matrix.json or host overlay document (formatVersion 1.2.0). Never save steps alone — object types, abstracts, transforms, and examples travel together.
See also
- Engineering:
docs/io-matrix.mdinmemorix-generic-connectors - Spec / view: https://docs.io-matrix.x12i.com
