Task 3.6 of novox/hq ADR 0116. A module is still written against request, handle, publish, subscribe, close; only what is underneath changes. main.ts still selects the AMQP client — steps 1 to 4 leave every node on AMQP, so this ships beside it and is selected at the rollout. Round-tripped against a real server (test/roundtrip.mjs): a tool answered across two connections, a throwing handler reaching the caller as an error rather than a timeout, an event delivered once with its key, body, node and event id intact, and an event landing under its emitter's own namespace. Three things the compiler and the server corrected: - the envelope's field is `key`, not `type`, and the payload is `env.body` with metadata in headers — not the whole envelope re-encoded. An implementation that nested the envelope would pass all its own tests and agree with nobody, which is what the conformance suite exists to stop. - the NATS client's TLS options are PEM strings with no verify hook, so the AMQP client's `checkServerIdentity: () => undefined` has no equivalent. The fingerprint check still happens and is still the guarantee, but the bus's certificate must now carry a SAN matching the address nodes dial. That is a constraint on the mesh's certificates, recorded where it bites. - a durable consumer is bound, never created: a module's account cannot reach the JetStream API, and a runtime creating its own would be a module choosing its own delivery semantics.
24 lines
579 B
JSON
24 lines
579 B
JSON
{
|
|
"name": "@novox/mesh-tools",
|
|
"version": "0.1.0",
|
|
"description": "The Novox Mesh tool runtime \u2014 binds the mesh broker and serves the assigned modules' tools.",
|
|
"type": "module",
|
|
"bin": {
|
|
"mesh-tools": "./dist/main.js"
|
|
},
|
|
"scripts": {
|
|
"build": "tsc",
|
|
"test": "node --test --experimental-strip-types 'test/*.test.ts'"
|
|
},
|
|
"dependencies": {
|
|
"@novox/mesh-sdk": "^0.1.0",
|
|
"amqplib": "^0.10.9",
|
|
"nats": "^2.29.0"
|
|
},
|
|
"devDependencies": {
|
|
"@types/amqplib": "^0.10.8",
|
|
"@types/node": "^22.20.1",
|
|
"typescript": "^5.9.3"
|
|
}
|
|
}
|