@voxgig/station-js
v0.0.2
Published
station: one control surface for outbound integrations
Readme
station — JavaScript
The JavaScript port of station: one control surface for outbound integrations.
npm test # conformance + integration suitesA direct port of the TypeScript, minus the types. Secrets are brokered
through @voxgig/sekreto-js; the config grammar validates through the
javascript port of voxgig/struct,
found as a sibling checkout (set STRUCT_HOME if yours is elsewhere —
the same convention as omni below).
Station.js requires adapter.js lazily — at the single point
construction needs the carried adapter. CommonJS resolves the cycle
that way round; the other way, adapter would see a half-built module.
Layout
| | |
|---|---|
| src/Station.js | the core: open/connect/adopt/options, sdk/create/check/warm, registry, transport middleware, the ref grammar |
| src/adapter.js | featureBinding (the one binding entry) + the carried adapter |
| src/shape.js | normalizeConfig/validateConfig: the §4 grammar, the §4.4 workarounds, the §5.2 credential scans |
| src/feature.js | the §8 three-level merge, order resolver, and descriptor-derived checker |
| src/factory.js | the process-global factory table (provide, §6.2) |
| src/loader.js | loadSync/loadAsync: CommonJS require + guarded dynamic import (§6.3) |
| src/descriptor.js | descriptor v1 normalizer + canonical serializer |
| src/secrets.js | the sekreto-backed broker + the placeholder |
| src/profile.js | station.json lookup, config scope, and profile resolution |
| src/structhome.js | locates the sibling voxgig/struct checkout |
| src/events.js | the bounded event ring + tap |
| src/error.js | the error-code catalog |
| test/conform.test.js | the conformance suite |
| test/quickstart.test.js | the §11 walkthroughs, against a live test API |
| test/pets.test.js | the awkward cases, against the gnarly-pets test API |
Testing
The conformance suite runs spec/station.json —
the same file every port runs — through the JavaScript
voxgig/omni runner. Set OMNI_HOME if
your omni checkout is not a sibling of this repository. The suite
carries a completeness guard: the sections it runs plus its explicit
PENDING list must exactly cover the sections in the spec, so a corpus
section silently not running is a failure, not a gap.
The integration suites run against a REAL generated SDK (the js target
of gnarly-pets, generated by sdkgen with the station feature) and the
test API servers in test/api/. Without a generated
checkout (STATION_TEST_SDKS, default /home/user/voxgig-sdk) they
skip rather than fail.
