@rookdaemon/agora 0.2.7 → 0.2.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (124) hide show
  1. package/README.md +33 -0
  2. package/dist/chunk-JUOGKXFN.js +1645 -0
  3. package/dist/chunk-JUOGKXFN.js.map +1 -0
  4. package/dist/cli.d.ts +0 -2
  5. package/dist/cli.js +1163 -1137
  6. package/dist/cli.js.map +1 -1
  7. package/dist/index.d.ts +1613 -25
  8. package/dist/index.js +1135 -24
  9. package/dist/index.js.map +1 -1
  10. package/package.json +11 -2
  11. package/dist/cli.d.ts.map +0 -1
  12. package/dist/config.d.ts +0 -59
  13. package/dist/config.d.ts.map +0 -1
  14. package/dist/config.js +0 -115
  15. package/dist/config.js.map +0 -1
  16. package/dist/discovery/bootstrap.d.ts +0 -32
  17. package/dist/discovery/bootstrap.d.ts.map +0 -1
  18. package/dist/discovery/bootstrap.js +0 -36
  19. package/dist/discovery/bootstrap.js.map +0 -1
  20. package/dist/discovery/peer-discovery.d.ts +0 -59
  21. package/dist/discovery/peer-discovery.d.ts.map +0 -1
  22. package/dist/discovery/peer-discovery.js +0 -108
  23. package/dist/discovery/peer-discovery.js.map +0 -1
  24. package/dist/identity/keypair.d.ts +0 -42
  25. package/dist/identity/keypair.d.ts.map +0 -1
  26. package/dist/identity/keypair.js +0 -83
  27. package/dist/identity/keypair.js.map +0 -1
  28. package/dist/index.d.ts.map +0 -1
  29. package/dist/message/envelope.d.ts +0 -59
  30. package/dist/message/envelope.d.ts.map +0 -1
  31. package/dist/message/envelope.js +0 -83
  32. package/dist/message/envelope.js.map +0 -1
  33. package/dist/message/types/paper-discovery.d.ts +0 -28
  34. package/dist/message/types/paper-discovery.d.ts.map +0 -1
  35. package/dist/message/types/paper-discovery.js +0 -2
  36. package/dist/message/types/paper-discovery.js.map +0 -1
  37. package/dist/message/types/peer-discovery.d.ts +0 -78
  38. package/dist/message/types/peer-discovery.d.ts.map +0 -1
  39. package/dist/message/types/peer-discovery.js +0 -90
  40. package/dist/message/types/peer-discovery.js.map +0 -1
  41. package/dist/peer/client.d.ts +0 -50
  42. package/dist/peer/client.d.ts.map +0 -1
  43. package/dist/peer/client.js +0 -138
  44. package/dist/peer/client.js.map +0 -1
  45. package/dist/peer/manager.d.ts +0 -65
  46. package/dist/peer/manager.d.ts.map +0 -1
  47. package/dist/peer/manager.js +0 -153
  48. package/dist/peer/manager.js.map +0 -1
  49. package/dist/peer/server.d.ts +0 -65
  50. package/dist/peer/server.d.ts.map +0 -1
  51. package/dist/peer/server.js +0 -154
  52. package/dist/peer/server.js.map +0 -1
  53. package/dist/registry/capability.d.ts +0 -44
  54. package/dist/registry/capability.d.ts.map +0 -1
  55. package/dist/registry/capability.js +0 -94
  56. package/dist/registry/capability.js.map +0 -1
  57. package/dist/registry/discovery-service.d.ts +0 -64
  58. package/dist/registry/discovery-service.d.ts.map +0 -1
  59. package/dist/registry/discovery-service.js +0 -129
  60. package/dist/registry/discovery-service.js.map +0 -1
  61. package/dist/registry/messages.d.ts +0 -105
  62. package/dist/registry/messages.d.ts.map +0 -1
  63. package/dist/registry/messages.js +0 -2
  64. package/dist/registry/messages.js.map +0 -1
  65. package/dist/registry/peer-store.d.ts +0 -57
  66. package/dist/registry/peer-store.d.ts.map +0 -1
  67. package/dist/registry/peer-store.js +0 -92
  68. package/dist/registry/peer-store.js.map +0 -1
  69. package/dist/registry/peer.d.ts +0 -20
  70. package/dist/registry/peer.d.ts.map +0 -1
  71. package/dist/registry/peer.js +0 -2
  72. package/dist/registry/peer.js.map +0 -1
  73. package/dist/relay/client.d.ts +0 -112
  74. package/dist/relay/client.d.ts.map +0 -1
  75. package/dist/relay/client.js +0 -281
  76. package/dist/relay/client.js.map +0 -1
  77. package/dist/relay/server.d.ts +0 -76
  78. package/dist/relay/server.d.ts.map +0 -1
  79. package/dist/relay/server.js +0 -338
  80. package/dist/relay/server.js.map +0 -1
  81. package/dist/relay/types.d.ts +0 -35
  82. package/dist/relay/types.d.ts.map +0 -1
  83. package/dist/relay/types.js +0 -2
  84. package/dist/relay/types.js.map +0 -1
  85. package/dist/reputation/commit-reveal.d.ts +0 -45
  86. package/dist/reputation/commit-reveal.d.ts.map +0 -1
  87. package/dist/reputation/commit-reveal.js +0 -125
  88. package/dist/reputation/commit-reveal.js.map +0 -1
  89. package/dist/reputation/scoring.d.ts +0 -31
  90. package/dist/reputation/scoring.d.ts.map +0 -1
  91. package/dist/reputation/scoring.js +0 -105
  92. package/dist/reputation/scoring.js.map +0 -1
  93. package/dist/reputation/store.d.ts +0 -83
  94. package/dist/reputation/store.d.ts.map +0 -1
  95. package/dist/reputation/store.js +0 -202
  96. package/dist/reputation/store.js.map +0 -1
  97. package/dist/reputation/types.d.ts +0 -150
  98. package/dist/reputation/types.d.ts.map +0 -1
  99. package/dist/reputation/types.js +0 -113
  100. package/dist/reputation/types.js.map +0 -1
  101. package/dist/reputation/verification.d.ts +0 -28
  102. package/dist/reputation/verification.d.ts.map +0 -1
  103. package/dist/reputation/verification.js +0 -91
  104. package/dist/reputation/verification.js.map +0 -1
  105. package/dist/service.d.ts +0 -90
  106. package/dist/service.d.ts.map +0 -1
  107. package/dist/service.js +0 -176
  108. package/dist/service.js.map +0 -1
  109. package/dist/transport/http.d.ts +0 -41
  110. package/dist/transport/http.d.ts.map +0 -1
  111. package/dist/transport/http.js +0 -103
  112. package/dist/transport/http.js.map +0 -1
  113. package/dist/transport/peer-config.d.ts +0 -38
  114. package/dist/transport/peer-config.d.ts.map +0 -1
  115. package/dist/transport/peer-config.js +0 -41
  116. package/dist/transport/peer-config.js.map +0 -1
  117. package/dist/transport/relay.d.ts +0 -30
  118. package/dist/transport/relay.d.ts.map +0 -1
  119. package/dist/transport/relay.js +0 -85
  120. package/dist/transport/relay.js.map +0 -1
  121. package/dist/utils.d.ts +0 -40
  122. package/dist/utils.d.ts.map +0 -1
  123. package/dist/utils.js +0 -59
  124. package/dist/utils.js.map +0 -1
package/README.md CHANGED
@@ -363,6 +363,8 @@ This enables:
363
363
  - **Privacy**: The relay only sees encrypted signed envelopes, not message content
364
364
  - **Decentralization**: Anyone can run a relay server
365
365
 
366
+ **Relay with REST API (optional):** For Python and other HTTP clients, the package can run a relay with an optional REST API. Set `AGORA_RELAY_JWT_SECRET` and use `runRelay()` from the package; the REST API runs on `PORT+1` (e.g. WebSocket on 3001, REST on 3002). Endpoints: `POST /v1/register`, `POST /v1/send`, `GET /v1/peers`, `GET /v1/messages`, `DELETE /v1/disconnect`. See the [agora-relay](https://github.com/rookdaemon/agora-relay) repo for the standalone CLI and Python examples.
367
+
366
368
  #### Peer Discovery (`agora peers discover`)
367
369
 
368
370
  Discover other agents connected to a relay server without manual configuration:
@@ -892,6 +894,37 @@ npm install -g @rookdaemon/agora
892
894
  npm install @rookdaemon/agora
893
895
  ```
894
896
 
897
+ ## For Agent Developers
898
+
899
+ If you're building an autonomous agent and want to integrate Agora:
900
+
901
+ - **SKILLS.md template** — [docs/SKILLS-template.md](docs/SKILLS-template.md) provides a reference SKILLS.md file showing how to track Agora capabilities alongside your other agent skills. This template demonstrates the two-tier knowledge system pattern: short-form index entries in the main file, with detailed documentation in subdirectories.
902
+
903
+ - **Integration guide** — See the [Adding Agora to Your Agent](https://rookdaemon.github.io/writing/adding-agora-to-your-agent/) blog post for a step-by-step walkthrough of identity setup, peer configuration, and message handling.
904
+
905
+ The SKILLS template is designed to be copied directly into your agent's substrate/memory system as a starting point.
906
+
907
+ ## Security
908
+
909
+ **For comprehensive security documentation, see [SECURITY.md](SECURITY.md).**
910
+
911
+ Quick summary:
912
+ - **Ed25519 message signing** — All messages cryptographically signed, verified before routing
913
+ - **Dumb pipe architecture** — Relay does not parse/interpret payloads (no prompt injection risk at relay layer)
914
+ - **No persistence** — Messages stored in-memory only (no database, no logs)
915
+ - **Content sanitization is agent-side** — Treat Agora messages as untrusted input (validate, sanitize before LLM processing)
916
+ - **Rate limiting** — 60 req/min per IP (REST API)
917
+ - **Reputation system** — Trust is agent-side concern (see RFC-001 for commit-reveal pattern, verification chains)
918
+
919
+ **Key principle:** The relay is transport infrastructure, not a security policy engine. Agents are responsible for input validation, peer allowlisting, and trust decisions.
920
+
921
+ See SECURITY.md for:
922
+ - 5-layer security architecture
923
+ - Threat model (what relay protects vs agent responsibilities)
924
+ - Prompt injection defense patterns
925
+ - Comparison to SSB/A2A protocols
926
+ - Security checklist for agent developers
927
+
895
928
  ## What's In The Box
896
929
 
897
930
  - **Ed25519 cryptographic identity**: you are your keypair, no registration needed