This commit is contained in:
Raven Scott
2026-05-20 23:36:32 -04:00
parent a020270cb1
commit be94546cd3
218 changed files with 9189 additions and 3078 deletions
@@ -34,6 +34,7 @@ await mod.close()
- [../_shared/PRODUCTION.md](../../_shared/PRODUCTION.md) — production checklist
- [../_shared/DOC_STANDARDS.md](../../_shared/DOC_STANDARDS.md) — documentation standards
- [examples/basic.js](examples/basic.js)
- Integration: [`../../real_tests/integration/`](../../../real_tests/integration/) — `intent-router-two-node.js`
## Test
@@ -0,0 +1,17 @@
require('bare-process/global')
const HyperP2PIntentRouter = require('../index.js')
async function main () {
const router = new HyperP2PIntentRouter({ enableBackgroundTimers: false })
await router.ready()
await router.registerIntent({
id: 'echo-1',
capabilities: ['echo'],
description: 'echo demo service',
topics: ['demo']
})
const matches = await router.resolveIntent({ capabilities: ['echo'] })
console.log('[intent-router]', matches.length, 'match(es)', router.getLocalIntents().length, 'local')
await router.close()
}
main().catch(console.error)