@7h3/protocol 0.5.0 → 0.5.1

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 (294) hide show
  1. package/README.md +6 -1317
  2. package/agentAdapter.d.ts +26 -0
  3. package/auditLog.d.ts +54 -0
  4. package/capability.d.ts +67 -0
  5. package/cborCodec.d.ts +34 -0
  6. package/conformanceVectors.d.ts +20 -0
  7. package/encryption.d.ts +85 -0
  8. package/envelopeCbor.d.ts +33 -0
  9. package/frameworkAdapters.d.ts +72 -0
  10. package/gateway.d.ts +53 -0
  11. package/grpcBinding.d.ts +29 -0
  12. package/httpBinding.d.ts +50 -0
  13. package/index.d.ts +39 -0
  14. package/index.js +3662 -0
  15. package/keyInfra.d.ts +64 -0
  16. package/keyRegistry.d.ts +9 -0
  17. package/keyRotation.d.ts +20 -0
  18. package/mcpGateway.d.ts +37 -0
  19. package/mcpTransports.d.ts +62 -0
  20. package/mcpWrapper.d.ts +83 -0
  21. package/otel.d.ts +65 -0
  22. package/package.json +13 -121
  23. package/policyEnforcer.d.ts +50 -0
  24. package/policyTelemetryFeedback.d.ts +11 -0
  25. package/{src/protocol.d.ts → protocol.d.ts} +1 -2
  26. package/protocolAgent.d.ts +58 -0
  27. package/protocolBinary.d.ts +8 -0
  28. package/protocolCapabilities.d.ts +24 -0
  29. package/protocolReplay.d.ts +35 -0
  30. package/protocolTransport.d.ts +73 -0
  31. package/queueBinding.d.ts +43 -0
  32. package/rateLimiter.d.ts +18 -0
  33. package/{src/redisClient.ts → redisClient.d.ts} +25 -75
  34. package/replayStores.d.ts +98 -0
  35. package/revocation.d.ts +71 -0
  36. package/routePolicy.d.ts +30 -0
  37. package/runtimePolicy.d.ts +24 -0
  38. package/runtimePolicyManager.d.ts +15 -0
  39. package/runtimePolicyPresets.d.ts +11 -0
  40. package/signedResponse.d.ts +21 -0
  41. package/stream.d.ts +59 -0
  42. package/telemetry.d.ts +79 -0
  43. package/webhookBinding.d.ts +30 -0
  44. package/wsBinding.d.ts +52 -0
  45. package/.dockerignore +0 -19
  46. package/.github/dependabot.yml +0 -32
  47. package/.github/workflows/ci.yml +0 -31
  48. package/.github/workflows/publish.yml +0 -59
  49. package/.github/workflows/scorecard.yml +0 -37
  50. package/7h3.example.yaml +0 -125
  51. package/CHANGELOG.md +0 -152
  52. package/CONTRIBUTING.md +0 -82
  53. package/Dockerfile +0 -73
  54. package/GOVERNANCE.md +0 -62
  55. package/SECURITY.md +0 -70
  56. package/bench-results/replay-cache-full-1777891033256.json +0 -10
  57. package/bench-results/replay-cache-full-1777896317488.json +0 -10
  58. package/bench-results/replay-cache-full-1777900993184.json +0 -10
  59. package/bench-results/replay-cache-full-1777901019285.json +0 -10
  60. package/bench-results/replay-cache-quick-1777870170126.json +0 -10
  61. package/bench-results/signature-profiles-quick-1775875160079.json +0 -85
  62. package/bench-results/signature-profiles-quick-1775983539716.json +0 -85
  63. package/bench-results/signature-profiles-quick-1776237913190.json +0 -85
  64. package/bench-results/wire-codecs-full-1777891019803.json +0 -93
  65. package/bench-results/wire-codecs-full-1777896260964.json +0 -93
  66. package/bench-results/wire-codecs-full-1777901004247.json +0 -93
  67. package/bench-results/wire-codecs-quick-1775972879056.json +0 -93
  68. package/bench-results/wire-codecs-quick-1775983541111.json +0 -93
  69. package/bench-results/wire-codecs-quick-1776237914299.json +0 -93
  70. package/bench-results/wire-codecs-quick-1777841285236.json +0 -93
  71. package/bench-results/wire-codecs-quick-1777841321772.json +0 -93
  72. package/bench-results/wire-codecs-quick-1777841330408.json +0 -93
  73. package/bench-results/wire-codecs-quick-1777852886082.json +0 -93
  74. package/bench-results/wire-codecs-quick-1777852988773.json +0 -93
  75. package/bench-results/wire-codecs-quick-1777870188095.json +0 -93
  76. package/bench-results/wire-codecs-quick-1777870263918.json +0 -93
  77. package/bench-results/wire-codecs-quick-1777870455034.json +0 -93
  78. package/bench-results/wire-codecs-quick-1778816163081.json +0 -93
  79. package/bench-results/wire-codecs-quick-1778843936130.json +0 -93
  80. package/bin/7h3.ts +0 -406
  81. package/conformance/7h3_v0_1.json +0 -77
  82. package/conformance/7h3_v0_1_binary.json +0 -20
  83. package/conformance/aip_v0_1_binary.json +0 -20
  84. package/docker-compose.yaml +0 -77
  85. package/docs/ADOPTION_PLAN.md +0 -120
  86. package/docs/AGENTS.md +0 -77
  87. package/docs/AIP_RFC_v0.1.md +0 -97
  88. package/docs/AI_DECISION_CARD.md +0 -122
  89. package/docs/AI_RUNTIME_POLICY.json +0 -126
  90. package/docs/AI_RUNTIME_POLICY.yaml +0 -110
  91. package/docs/BACKPRESSURE_TUNING.md +0 -65
  92. package/docs/BENCHMARK_CLAIM_MATRIX.md +0 -42
  93. package/docs/BENCHMARK_REPORT_TEMPLATE.md +0 -169
  94. package/docs/BINARY_CODEC_BENCH.md +0 -23
  95. package/docs/CLEAN_CLONE_RUNBOOK.md +0 -36
  96. package/docs/CLOCK_SKEW_POLICY.md +0 -30
  97. package/docs/DISTRIBUTED_REPLAY.md +0 -142
  98. package/docs/FUZZ_CAMPAIGN.md +0 -121
  99. package/docs/GATEWAY.md +0 -195
  100. package/docs/KEY_MANAGEMENT_POLICY.md +0 -53
  101. package/docs/KEY_REVOCATION.md +0 -69
  102. package/docs/MCP_WRAPPER.md +0 -159
  103. package/docs/MIGRATION_GUIDE.md +0 -40
  104. package/docs/OPERATORS.md +0 -184
  105. package/docs/PERF_REGRESSION_POLICY.md +0 -34
  106. package/docs/PROJECT_EXAMINATION_2026-05-31.md +0 -219
  107. package/docs/RELEASE_BENCHMARK_REPORT_2026-05-15.md +0 -135
  108. package/docs/RELEASE_GATE.md +0 -25
  109. package/docs/RELEASE_NOTES_v0.1.0.md +0 -54
  110. package/docs/SECURITY_REVIEW_2026-06-05.md +0 -165
  111. package/docs/TELEMETRY.md +0 -41
  112. package/docs/THREAT_MODEL.md +0 -89
  113. package/docs/VERSIONING_POLICY.md +0 -30
  114. package/docs/assets/banner-github.png +0 -0
  115. package/docs/assets/banner.png +0 -0
  116. package/docs/assets/banner.svg +0 -123
  117. package/eslint.config.js +0 -15
  118. package/fuzz/ts/harness-decode.ts +0 -136
  119. package/fuzz/ts/harness-verify.ts +0 -121
  120. package/fuzz/ts/run.ts +0 -35
  121. package/mcp-server/README.md +0 -38
  122. package/mcp-server/package-lock.json +0 -1187
  123. package/mcp-server/package.json +0 -35
  124. package/mcp-server/src/index.ts +0 -236
  125. package/mcp-server/tsconfig.json +0 -14
  126. package/scripts/aip-framework-quickstart.ts +0 -110
  127. package/scripts/aip-mcp-gateway.ts +0 -38
  128. package/scripts/aip-mcp-wrap-demo.ts +0 -72
  129. package/scripts/aip-quickstart.ts +0 -60
  130. package/scripts/bench-diff.ts +0 -118
  131. package/scripts/bench-protocol-e2e.ts +0 -937
  132. package/scripts/bench-protocol-openloop.ts +0 -1397
  133. package/scripts/bench-replay-cache.ts +0 -76
  134. package/scripts/bench-signature-profiles.ts +0 -180
  135. package/scripts/bench-wire-codecs.ts +0 -161
  136. package/scripts/build-binary-conformance.ts +0 -36
  137. package/scripts/build-release-dashboard.ts +0 -175
  138. package/scripts/canary-rollout.ts +0 -38
  139. package/scripts/mcpGatewayCli.test.ts +0 -116
  140. package/scripts/prepare-aip-package.ts +0 -88
  141. package/scripts/regen-conformance-sigs.ts +0 -18
  142. package/scripts/release-gate.ts +0 -19
  143. package/scripts/validate-runtime-policy.ts +0 -18
  144. package/sdk/browser/index.test.ts +0 -162
  145. package/sdk/browser/index.ts +0 -257
  146. package/sdk/browser/package.json +0 -13
  147. package/sdk/go/cbor.go +0 -551
  148. package/sdk/go/cbor_test.go +0 -232
  149. package/sdk/go/encryption.go +0 -280
  150. package/sdk/go/encryption_test.go +0 -318
  151. package/sdk/go/go.mod +0 -7
  152. package/sdk/go/go.sum +0 -4
  153. package/sdk/go/http.go +0 -135
  154. package/sdk/go/protocol.go +0 -324
  155. package/sdk/go/protocol_test.go +0 -334
  156. package/sdk/go/replay.go +0 -121
  157. package/sdk/go/replay_test.go +0 -149
  158. package/sdk/go/webhook.go +0 -136
  159. package/sdk/pq/package-lock.json +0 -1358
  160. package/sdk/pq/package.json +0 -42
  161. package/sdk/pq/src/index.test.ts +0 -143
  162. package/sdk/pq/src/index.ts +0 -166
  163. package/sdk/pq/tsconfig.json +0 -14
  164. package/sdk/pq/vitest.config.ts +0 -7
  165. package/sdk/python/README.md +0 -18
  166. package/sdk/python/protocol_7h3/__init__.py +0 -46
  167. package/sdk/python/protocol_7h3/encryption.py +0 -252
  168. package/sdk/python/protocol_7h3/http.py +0 -212
  169. package/sdk/python/protocol_7h3/keys.py +0 -149
  170. package/sdk/python/protocol_7h3/pq.py +0 -244
  171. package/sdk/python/protocol_7h3/protocol.py +0 -525
  172. package/sdk/python/protocol_7h3/queue.py +0 -118
  173. package/sdk/python/protocol_7h3/replay.py +0 -98
  174. package/sdk/python/protocol_7h3/webhook.py +0 -116
  175. package/sdk/python/pyproject.toml +0 -40
  176. package/sdk/python/tests/test_conformance.py +0 -110
  177. package/sdk/python/tests/test_encryption.py +0 -206
  178. package/sdk/python/tests/test_http.py +0 -305
  179. package/sdk/python/tests/test_keys.py +0 -417
  180. package/sdk/python/tests/test_queue.py +0 -120
  181. package/sdk/python/tests/test_webhook.py +0 -345
  182. package/sdk/rust/Cargo.lock +0 -371
  183. package/sdk/rust/Cargo.toml +0 -25
  184. package/sdk/rust/README.md +0 -31
  185. package/sdk/rust/fuzz/Cargo.toml +0 -29
  186. package/sdk/rust/fuzz/fuzz_targets/fuzz_canonicalize.rs +0 -46
  187. package/sdk/rust/fuzz/fuzz_targets/fuzz_decode.rs +0 -11
  188. package/sdk/rust/src/bin/aip_mcp_gateway.rs +0 -59
  189. package/sdk/rust/src/http.rs +0 -145
  190. package/sdk/rust/src/keys.rs +0 -161
  191. package/sdk/rust/src/lib.rs +0 -688
  192. package/sdk/rust/src/queue.rs +0 -79
  193. package/sdk/rust/src/webhook.rs +0 -86
  194. package/sdk/rust/tests/conformance.rs +0 -148
  195. package/sdk/rust/tests/gateway.rs +0 -130
  196. package/sdk/rust/tests/http_webhook_queue.rs +0 -201
  197. package/sdk/rust/tests/keys.rs +0 -189
  198. package/sdk/threshold/index.d.ts +0 -68
  199. package/sdk/threshold/index.d.ts.map +0 -1
  200. package/sdk/threshold/index.js +0 -254
  201. package/sdk/threshold/package-lock.json +0 -1361
  202. package/sdk/threshold/package.json +0 -39
  203. package/sdk/threshold/src/index.d.ts +0 -68
  204. package/sdk/threshold/src/index.d.ts.map +0 -1
  205. package/sdk/threshold/src/index.js +0 -254
  206. package/sdk/threshold/src/index.test.ts +0 -238
  207. package/sdk/threshold/src/index.ts +0 -355
  208. package/sdk/threshold/tsconfig.json +0 -19
  209. package/sdk/threshold/vitest.config.ts +0 -12
  210. package/src/agentAdapter.test.ts +0 -48
  211. package/src/agentAdapter.ts +0 -56
  212. package/src/auditLog.test.ts +0 -145
  213. package/src/auditLog.ts +0 -147
  214. package/src/capability.test.ts +0 -504
  215. package/src/capability.ts +0 -380
  216. package/src/cborCodec.test.ts +0 -263
  217. package/src/cborCodec.ts +0 -339
  218. package/src/conformance.test.ts +0 -136
  219. package/src/conformanceVectors.ts +0 -99
  220. package/src/encryption.test.ts +0 -206
  221. package/src/encryption.ts +0 -245
  222. package/src/envelopeCbor.ts +0 -140
  223. package/src/frameworkAdapters.test.ts +0 -290
  224. package/src/frameworkAdapters.ts +0 -261
  225. package/src/gateway.test.ts +0 -343
  226. package/src/gateway.ts +0 -246
  227. package/src/grpcBinding.test.ts +0 -211
  228. package/src/grpcBinding.ts +0 -103
  229. package/src/httpBinding.test.ts +0 -376
  230. package/src/httpBinding.ts +0 -189
  231. package/src/index.ts +0 -39
  232. package/src/keyInfra.test.ts +0 -278
  233. package/src/keyInfra.ts +0 -228
  234. package/src/keyRegistry.ts +0 -59
  235. package/src/keyRotation.test.ts +0 -78
  236. package/src/keyRotation.ts +0 -72
  237. package/src/mcpGateway.test.ts +0 -129
  238. package/src/mcpGateway.ts +0 -250
  239. package/src/mcpTransports.test.ts +0 -92
  240. package/src/mcpTransports.ts +0 -169
  241. package/src/mcpWrapper.test.ts +0 -179
  242. package/src/mcpWrapper.ts +0 -206
  243. package/src/otel.ts +0 -136
  244. package/src/policyEnforcer.test.ts +0 -99
  245. package/src/policyEnforcer.ts +0 -169
  246. package/src/policyTelemetryFeedback.test.ts +0 -25
  247. package/src/policyTelemetryFeedback.ts +0 -38
  248. package/src/protocol.bench.ts +0 -37
  249. package/src/protocol.d.ts.map +0 -1
  250. package/src/protocol.js +0 -294
  251. package/src/protocol.test.ts +0 -155
  252. package/src/protocol.ts +0 -414
  253. package/src/protocolAgent.test.ts +0 -105
  254. package/src/protocolAgent.ts +0 -169
  255. package/src/protocolBinary.test.ts +0 -165
  256. package/src/protocolBinary.ts +0 -312
  257. package/src/protocolCapabilities.ts +0 -70
  258. package/src/protocolFuzz.advanced.test.ts +0 -235
  259. package/src/protocolFuzz.test.ts +0 -111
  260. package/src/protocolNegative.test.ts +0 -97
  261. package/src/protocolReplay.test.ts +0 -71
  262. package/src/protocolReplay.ts +0 -194
  263. package/src/protocolTransport.test.ts +0 -556
  264. package/src/protocolTransport.ts +0 -483
  265. package/src/queueBinding.test.ts +0 -130
  266. package/src/queueBinding.ts +0 -102
  267. package/src/rateLimiter.test.ts +0 -96
  268. package/src/rateLimiter.ts +0 -46
  269. package/src/redisIntegration.test.ts +0 -134
  270. package/src/replayStores.test.ts +0 -273
  271. package/src/replayStores.ts +0 -215
  272. package/src/revocation.test.ts +0 -98
  273. package/src/revocation.ts +0 -0
  274. package/src/routePolicy.test.ts +0 -87
  275. package/src/routePolicy.ts +0 -72
  276. package/src/runtimePolicy.test.ts +0 -49
  277. package/src/runtimePolicy.ts +0 -81
  278. package/src/runtimePolicyManager.test.ts +0 -29
  279. package/src/runtimePolicyManager.ts +0 -50
  280. package/src/runtimePolicyPresets.ts +0 -43
  281. package/src/signedResponse.test.ts +0 -111
  282. package/src/signedResponse.ts +0 -83
  283. package/src/stream.test.ts +0 -254
  284. package/src/stream.ts +0 -417
  285. package/src/telemetry.test.ts +0 -251
  286. package/src/telemetry.ts +0 -299
  287. package/src/webhookBinding.test.ts +0 -144
  288. package/src/webhookBinding.ts +0 -115
  289. package/src/wsBinding.test.ts +0 -221
  290. package/src/wsBinding.ts +0 -200
  291. package/tsconfig.json +0 -15
  292. package/tsconfig.lib.json +0 -23
  293. package/vite.lib.config.ts +0 -16
  294. package/vitest.config.ts +0 -11
package/docs/OPERATORS.md DELETED
@@ -1,184 +0,0 @@
1
- # GLUV Operators Guide
2
-
3
- This guide is for SRE, platform, and performance teams operating GLUV-backed workloads in production.
4
-
5
- ---
6
-
7
- ## 1) Operational objectives
8
-
9
- Primary objectives:
10
-
11
- 1. Maintain low drop-rate under declared load profiles
12
- 2. Maintain p99 latency SLO
13
- 3. Preserve signature/replay guarantees under stress
14
- 4. Detect and stop regressions before release
15
-
16
- ---
17
-
18
- ## 2) SLO model
19
-
20
- Define SLOs per traffic class (example baseline):
21
-
22
- - **Availability:** protocol receive path success ≥ 99.9%
23
- - **Drop rate:** `dropPct <= 0.1%` (or 0% for critical lanes)
24
- - **Latency:** p99 <= 20ms (adjust by payload and transport class)
25
- - **Integrity:** 100% signature verification and replay checks on ingress
26
-
27
- Important: “no drop” means **within declared operating envelope**. Any system can be overloaded if offered load exceeds capacity.
28
-
29
- ---
30
-
31
- ## 3) Transport selection matrix
32
-
33
- Use this default selection policy:
34
-
35
- | Workload | Recommended Mode | Why |
36
- |---|---|---|
37
- | High-throughput lane | `http-binary-batch` or `ws-binary-batch` | best throughput and lowest overhead |
38
- | Balanced latency/compatibility | `ws-batch` | low framing overhead and stable p99 |
39
- | Low/medium compatibility lane | `http` | simplest interoperability |
40
- | Stress testing only | `http` + `--allow-unsafe-http` | intentional overload characterization |
41
-
42
- Guardrail behavior in benchmark harness blocks unsafe plain HTTP at high concurrency unless explicitly overridden.
43
-
44
- ---
45
-
46
- ## 4) Benchmark discipline
47
-
48
- ### Sustainable benchmarks (default)
49
-
50
- Use adaptive benchmark commands for release confidence:
51
-
52
- ```bash
53
- npm run bench:openloop:quick
54
- npm run bench:openloop:full
55
- ```
56
-
57
- These discover sustainable operating rates using threshold gates.
58
-
59
- ### Stress benchmarks (explicit overload)
60
-
61
- Use only for capacity ceiling exploration:
62
-
63
- ```bash
64
- npm run bench:openloop:stress:quick
65
- npm run bench:openloop:stress:full
66
- ```
67
-
68
- Do not use stress runs alone as production readiness criteria.
69
-
70
- ---
71
-
72
- ## 5) Core runbook commands
73
-
74
- ### Quality and release gates
75
-
76
- ```bash
77
- npm run lint
78
- npm run test
79
- npm run build
80
- npm run release:gate
81
- ```
82
-
83
- ### Conformance gates
84
-
85
- ```bash
86
- npm run conformance:python
87
- npm run conformance:rust
88
- npm run conformance:binary
89
- ```
90
-
91
- ### Benchmark analysis
92
-
93
- ```bash
94
- npm run bench:diff -- --baseline <baseline.json> --candidate <candidate.json>
95
- npm run release:dashboard
96
- ```
97
-
98
- ---
99
-
100
- ## 6) Incident runbook
101
-
102
- ### Symptom: high drop rate
103
-
104
- 1. Confirm mode and benchmark class (adaptive vs stress)
105
- 2. Check if plain HTTP is being used at high concurrency
106
- 3. Switch to binary batch mode for hot lanes
107
- 4. Inspect overload/retry behavior and queue pressure
108
- 5. Reduce offered rate or widen worker capacity
109
-
110
- ### Symptom: p99 latency spike
111
-
112
- 1. Compare payload size distribution against baseline
113
- 2. Check in-flight cap / batch-size adaptation behavior
114
- 3. Verify no regression in signature profile or canonicalization path
115
- 4. Re-run adaptive benchmark for sustainable envelope
116
-
117
- ### Symptom: signature failures
118
-
119
- 1. Validate key resolver outputs and key IDs
120
- 2. Verify canonicalization parity across runtime boundaries
121
- 3. Check clock skew / TTL policy window
122
-
123
- ### Symptom: replay rejections
124
-
125
- 1. Verify message uniqueness (`messageId`, `nonce`)
126
- 2. Validate replay cache window sizing
127
- 3. Confirm producer retry semantics are idempotent
128
-
129
- ---
130
-
131
- ## 7) Tuning matrix (starting points)
132
-
133
- | Setting | Low Traffic | Medium Traffic | High Traffic |
134
- |---|---:|---:|---:|
135
- | Batch size | 4–8 | 8–32 | 32–64 |
136
- | In-flight cap | 16–64 | 64–256 | 256–1024 |
137
- | Retry backoff | 1–2ms | 2–8ms | 4–16ms |
138
- | Preferred mode | `http`/`ws` | `ws-batch` | `http-binary-batch` / `ws-binary-batch` |
139
-
140
- Treat this as a starting policy; tune from measured p99/drop under adaptive runs.
141
-
142
- ---
143
-
144
- ## 8) Security and reliability invariants
145
-
146
- Never disable these in production:
147
-
148
- - signature verification
149
- - canonicalization checks
150
- - replay defense
151
- - TTL and clock-skew enforcement
152
-
153
- Any performance optimization must preserve these invariants.
154
-
155
- ---
156
-
157
- ## 9) Release acceptance checklist
158
-
159
- Release candidate is acceptable when:
160
-
161
- 1. `release:gate` passes
162
- 2. conformance suites pass (TS/Python/Rust/binary)
163
- 3. adaptive benchmarks satisfy target SLO thresholds
164
- 4. no critical regression in benchmark diff vs baseline
165
- 5. rollback plan and threshold alerts are prepared
166
-
167
- ---
168
-
169
- ## 10) Recommended rollout strategy
170
-
171
- 1. Canary 5%
172
- 2. Observe drop/p99/signature/replay counters
173
- 3. Expand 25% → 50% → 100%
174
- 4. Auto-rollback if drop or p99 breaches thresholds for sustained window
175
-
176
- ---
177
-
178
- ## 11) Documentation map
179
-
180
- - Protocol technical guide: `README.md`
181
- - Executive brief: `README_EXECUTIVE.md`
182
- - Performance policy: `PERF_REGRESSION_POLICY.md`
183
- - Backpressure notes: `BACKPRESSURE_TUNING.md`
184
- - Release hardening: `RELEASE_GATE.md`
@@ -1,34 +0,0 @@
1
- # 7h3 Protocol AIP Performance Regression Policy
2
-
3
- ## Purpose
4
-
5
- Prevent unreviewed regressions in throughput and tail latency.
6
-
7
- ## CI gate
8
-
9
- - CI must run adaptive open-loop performance gate:
10
- - `npm run bench:openloop:adaptive:ci`
11
- - Fail build if p99 or drop-rate exceeds configured thresholds.
12
-
13
- ## Release gate
14
-
15
- For release candidates:
16
-
17
- 1. Run baseline and candidate benchmark suites using `full` profiles.
18
- 2. Compare with `npm run bench:diff -- --baseline <...> --candidate <...>`.
19
- 3. Block release if either condition is met without explicit waiver:
20
- - throughput regression beyond accepted threshold
21
- - p99 regression beyond accepted threshold
22
-
23
- ## Waiver process
24
-
25
- - Waiver requires:
26
- - documented reason
27
- - owner
28
- - rollback plan
29
- - follow-up due date
30
-
31
- ## Reporting
32
-
33
- - Attach benchmark artifacts and diff report to release PR.
34
- - Record claim context with hardware profile and command set.
@@ -1,219 +0,0 @@
1
- # @7h3/protocol — Independent Examination (updated 2026-06-01)
2
-
3
- **Original examination:** 2026-05-31 · **Updated:** 2026-06-01 (post-extraction, post-publish)
4
- **Reviewer stance:** Independent audit — claims split into **Verified** (ran it / read the code) vs **Asserted** (repo says so, unverified).
5
- **Repo:** `github.com/IceMasterT/7h3-protocol-aip` · local `/media/artiq/DATA/7h3-protocol`
6
- **Package:** `@7h3/protocol@0.1.0` · live on npm · MIT
7
-
8
- ---
9
-
10
- ## 0) TL;DR
11
-
12
- AIP is a **cryptographic hardening envelope for MCP and A2A traffic** — per-message signing, TTL-bounding, and replay-checking that those protocols don't provide natively. It is now extracted, published, and public. The engineering is real. The market gap is real and publicly acknowledged. The first meaningful risk is adoption, not implementation.
13
-
14
- ---
15
-
16
- ## 1) What shipped
17
-
18
- ### Core protocol (`aip/0.1`)
19
- - `protocol.ts` — envelope model, deterministic canonicalization (fixed key order), HMAC-SHA256 / Ed25519 signing and verification over real WebCrypto. Key handles LRU-cached.
20
- - `protocolTransport.ts` — wire encode/decode (`json` / `compact` / `binary`), full receive pipeline (validate → canonicalize → verify → replay-check), batch/session transport with bounded-concurrency and telemetry hooks.
21
- - `protocolBinary.ts` — MessagePack binary wire codec (highest-throughput lane).
22
- - `protocolReplay.ts` — `InMemoryReplayCache` (`(sender, messageId, nonce)` uniqueness window + TTL); `DistributedReplayCache` wrapping any `DistributedReplayStore`.
23
- - `keyRotation.ts`, `protocolCapabilities.ts`, `protocolAgent.ts` — key lifecycle, capability negotiation, agent identity.
24
- - `runtimePolicy*.ts` + `policyEnforcer.ts` + `policyTelemetryFeedback.ts` — declarative transport/retry/safety policy with telemetry-driven feedback.
25
- - `mcpGateway.ts`, `frameworkAdapters.ts`, `agentAdapter.ts` — JSON-RPC gateway runtime, LangChain/LlamaIndex/JSON-RPC bridges.
26
-
27
- ### Distributed stores (production gap — now closed)
28
- - `redisClient.ts` — `RedisLikeClient` interface (client-agnostic; no Redis npm dep) + `InMemoryRedisLikeClient` reference impl.
29
- - `replayStores.ts` — `createRedisReplayStore`: atomic `SET NX PX` reserve, `reserveMany` batch pipeline, `errorBehavior: 'fallback' | 'reject' | 'allow'`, `onDegraded` observability hook. Default: degrade-to-local, never silent.
30
- - `revocation.ts` — `InMemoryRevocationStore`; `createRedisRevocationStore` (cached reads, **fail-closed default**); `withRevocationCheck` wraps any `SignatureResolver` — one line to add fleet-wide revocation to any verify path.
31
-
32
- ### MCP hardening wrapper (production gap — now closed)
33
- - `mcpWrapper.ts` — `wrapMcpServer` / `wrapMcpClient` / `createMcpClientCodec`. Wire message is a signed AIP envelope carrying JSON-RPC in `body.content`; handler receives plain JSON-RPC (zero app changes).
34
- - **Recipient binding** — server rejects envelopes not addressed to `selfAgentId` (cross-server relay defense).
35
- - **Sender binding** — client accepts responses only when `sender === peerAgentId` (response-spoof defense).
36
- - **Correlation binding** — client enforces `correlationId === request messageId` (response-substitution defense).
37
- - **Replay on by default** — `InMemoryReplayCache` injected if none supplied.
38
- - `mcpTransports.ts` — `serveMcpOverStdio` / `createStdioMcpClient` (newline-delimited, in-order sequential chain); `createHttpMcpHandler` / `createHttpMcpClient` (`node:http` + global `fetch`, `binary` mode). No new runtime dependencies.
39
-
40
- ### Polyglot parity
41
- - Python SDK (`sdk/python`, `from aip7h3 import …`)
42
- - Rust SDK + gateway (`sdk/rust`, `use aip7h3::…`)
43
- - Shared conformance fixtures (`conformance/aip_v0_1.json`) drive byte-identical signature verification across all three runtimes.
44
-
45
- ### Governance scaffolding
46
- `docs/`: THREAT_MODEL, KEY_MANAGEMENT_POLICY, CLOCK_SKEW_POLICY, DISTRIBUTED_REPLAY, KEY_REVOCATION, MCP_WRAPPER, TELEMETRY, PERF_REGRESSION_POLICY, VERSIONING_POLICY, MIGRATION_GUIDE, RELEASE_GATE. Benchmark harnesses, release dashboard generator, canary planner.
47
-
48
- ---
49
-
50
- ## 2) Auditor's ledger
51
-
52
- ### ✅ Verified (ran it / read the code)
53
-
54
- **123 tests pass across 22 files in ~924ms.** (`npx vitest run`, 2026-06-01). Real coverage: envelope conformance, negative/malformed corpus, fuzz/property tests, replay cache (in-memory + distributed + batch), key rotation, transport, binary codec, gateway, policy, revocation, MCP wrapper (round-trip, tamper-reject, replay-reject, recipient/sender/correlation binding), stdio transport (PassThrough streams), HTTP transport (real `http.Server` on ephemeral port).
55
-
56
- **Real cryptography.** `protocol.ts` uses `crypto.subtle` — genuine HMAC-SHA256 and Ed25519 (PKCS8/SPKI import, base64url encoding). Not hand-rolled.
57
-
58
- **Deterministic canonicalization is real.** Fixed key order (not recursive sort), explicit `body`-then-`header` layout. This is what makes cross-language parity *provable*, not just asserted.
59
-
60
- **Genuine tri-language parity.** Python `unittest` and Rust `cargo test` both driven by the same JSON fixture set. Signatures verified against the same known vectors in all three runtimes.
61
-
62
- **Redis stores work.** Live-Redis integration test (`redisIntegration.test.ts`): replay reserve via `SET NX PX` and revocation round-trip both confirmed against a real server. Test auto-skips if no server present — no false passes.
63
-
64
- **Infinite-recursion bug in fallback chain caught by TDD before shipping.** `createRedisReplayStore` with default `errorBehavior:'fallback'` initially created a fallback store that also tried to create its own fallback. Fixed by passing `{ errorBehavior: 'reject' }` to the inner store. The test suite caught this before it shipped.
65
-
66
- **MCP wrapper security bindings all independently tested.** Each binding (recipient, sender, correlation, replay-default) has its own test that verifies rejection of the specific attack it defends against.
67
-
68
- **Honest threat model.** Lists remaining open risks (see §6). That candor is a credibility asset.
69
-
70
- **Published and public.** `@7h3/protocol@0.1.0` on npm. `github.com/IceMasterT/7h3-protocol-aip` public. 12 GitHub topics set.
71
-
72
- ### ⚠️ Asserted (treat as marketing until independently reproduced)
73
-
74
- - Benchmark numbers are from one dev machine with no external methodology audit. Read them as "comfortably adequate," not headline performance.
75
- - Python and Rust SDKs share the conformance fixture but the Python Ed25519 path requires the `cryptography` package (skipped if absent). Rust integration is straightforward but has not been published to crates.io.
76
- - No third-party security audit. For a cryptographic protocol, a formal audit or at minimum an external reproduction of conformance vectors is the credibility step this hasn't cleared yet.
77
-
78
- > Precedent from this workspace: a self-reported "95/100" on a separate project was independently re-scored to ~22. The discipline here is better (green suite, shared fixtures, honest risk listing), but the rule stands — believe the test run; discount self-graded readiness claims.
79
-
80
- ---
81
-
82
- ## 3) Architecture
83
-
84
- ### Receive pipeline (core)
85
-
86
- ```
87
- wire bytes ──▶ decode (json | compact | binary)
88
- ──▶ validate envelope shape + policy (version, ids, ttl, clock-skew)
89
- ──▶ canonicalize (fixed key order, body→header layout)
90
- ──▶ verify signature (HS256 | Ed25519) via key/secret resolver
91
- └──▶ withRevocationCheck (optional, wraps resolver)
92
- ──▶ replay-cache check (sender, messageId, nonce) + TTL window
93
- └──▶ InMemoryReplayCache (single-node)
94
- └──▶ DistributedReplayCache → RedisReplayStore (fleet-wide)
95
- ──▶ accept ──▶ app handler
96
- ```
97
-
98
- ### MCP wrapper pipeline
99
-
100
- ```
101
- JSON-RPC request
102
- ──▶ createEnvelope (sender=client, recipient=server, content=json-rpc)
103
- ──▶ signEnvelope
104
- ──▶ [transport: stdio newline / HTTP POST]
105
- ──▶ wrapMcpServer receives WireEnvelope
106
- ──▶ receiveEnvelope (full pipeline above)
107
- ──▶ recipient binding check (recipient === selfAgentId)
108
- ──▶ handler(plain json-rpc) ←─ zero app changes
109
- ──▶ signEnvelope(response, correlationId=request.messageId)
110
- ──▶ [transport]
111
- ──▶ wrapMcpClient decodeResponse
112
- ──▶ sender binding (sender === peerAgentId)
113
- ──▶ correlation binding (correlationId === request.messageId)
114
- ──▶ returns plain JSON-RPC response
115
- ```
116
-
117
- **Envelope structure:** `header{version, messageId, timestampMs, ttlMs, sender, recipient?, nonce}` + `body{intent, content, capability?, correlationId?}` + optional `signature{alg, keyId, value}`.
118
- **Intents:** `PING / PONG / CAPS / TASK / RESULT / ERROR` — a deliberately minimal verb set.
119
-
120
- This is a textbook-correct message-security design: validate → canonicalize → verify → replay → accept. Nothing exotic, everything in the right order.
121
-
122
- ---
123
-
124
- ## 4) Performance — honest read
125
-
126
- Quick-profile benchmarks (single dev machine, 2026-05-31):
127
-
128
- | Metric | Value | Interpretation |
129
- |---|---|---|
130
- | Canonicalization | ~1.07M ops/s | Near-zero overhead |
131
- | Compact codec (encode+decode) | ~0.98M ops/s | Near-zero overhead |
132
- | Sign + verify (HMAC-SHA256) | ~38.3k ops/s | **Binding ceiling** |
133
- | In-process E2E | ~50k ops/s, p99 ~4.7ms (c=100) | Protocol overhead only |
134
- | Open-loop adaptive HTTP | ~10.2k ops/s, p99 ~13.4ms, 0% drop | Transport-bound, not protocol-bound |
135
-
136
- The crypto sign+verify path (~38k/s/core) is the binding constraint. ~10k/s sustained over HTTP is honest and production-adequate for an agent control plane. This is not a "millions of messages/second" story, and the repo doesn't claim it — it explicitly distinguishes adaptive/sustainable throughput from firehose stress numbers. Market as **"predictable, signed, replay-safe throughput,"** never as raw speed.
137
-
138
- ---
139
-
140
- ## 5) Best use case
141
-
142
- **Lead with:** a drop-in cryptographic trust layer for MCP-mediated tool calls and multi-agent traffic — especially any flow where tool calls trigger real side effects (writes, payments, actions).
143
-
144
- AIP is at its best when:
145
- - 2+ agents or services are exchanging messages,
146
- - tool calls cause side effects that must not be replayed or tampered with,
147
- - you need tamper-evidence, replay-safety, and an audit trail,
148
- - you run a polyglot stack (TS orchestrator + Rust gateway + Python workers) and need signatures to match across all three.
149
-
150
- **Runnable entry point:** `npm run aip:mcp:wrap` — demonstrates tampered and replayed requests rejected in under 30 seconds.
151
-
152
- **Where not to use it:** single-process prototypes, no trust boundary, exploratory prompt UX. The repo says this itself.
153
-
154
- ---
155
-
156
- ## 6) Market positioning
157
-
158
- The competitive landscape (verified 2026-05-31) strongly favors a **complement-not-compete** posture:
159
-
160
- - **MCP** (Anthropic): JSON-RPC messages sent unsigned, no replay protection. Open issues requesting per-message signing. Community spec **MCPS** proposes a signing + nonce envelope as a backward-compatible layer. ~8.5% of MCP servers use OAuth.
161
- - **A2A** (Google, v1.2): Signed Agent Cards authenticate the identity card for domain verification — **not** per-message task traffic.
162
-
163
- AIP implements exactly the missing layer for both. The gap is not a niche opinion — it's in NSA guidance, in public GitHub issues, and in active community proposals. The positioning writes itself:
164
-
165
- > **"The signing-and-replay layer your agent protocol forgot."**
166
- > Sign, TTL-bound, and replay-protect every MCP/A2A message — with byte-identical verification across TypeScript, Python, and Rust.
167
-
168
- Do **not** position AIP as a competing agent protocol. Position it as the hardening envelope / trust middleware those protocols lack natively. The moat is "works today, polyglot, already tested, MIT."
169
-
170
- **Standardization risk:** MCPS or MCP itself may standardize this natively. That is the primary time-sensitivity argument. AIP's edge is "running in prod now," not "only possible solution."
171
-
172
- ---
173
-
174
- ## 7) Shipped state vs original plan
175
-
176
- The original examination identified four blockers and five execution steps. Current status:
177
-
178
- | Item | Status |
179
- |---|---|
180
- | Protocol never published / `private:true` / version `0.0.0` | ✅ `@7h3/protocol@0.1.0` live on npm |
181
- | Esolang-branded name buries the protocol | ✅ Extracted to `7h3-protocol-aip`; npm `@7h3/protocol` |
182
- | In-memory replay cache insufficient for multi-node | ✅ `createRedisReplayStore` — atomic `SET NX PX`, batch pipeline, graceful degradation |
183
- | No revocation/expiry enforcement layer | ✅ `createRedisRevocationStore` + `withRevocationCheck` — fail-closed, cached |
184
- | No MCP integration artifact | ✅ `wrapMcpServer` / `wrapMcpClient` + stdio + HTTP transport adapters |
185
- | Repo public and discoverable | ✅ Public, 12 topics, GitHub release v0.1.0 |
186
-
187
- **What the original plan identified as gaps that were then built before launch — not retrofitted.** That sequence (design → TDD → ship) is why the shipped state is consistent.
188
-
189
- ---
190
-
191
- ## 8) Open risks (carry forward)
192
-
193
- - **Adoption is the only live risk.** An unadopted protocol's value is ~0 regardless of implementation quality. First real users matter more than a seventh benchmark run. The MCP wrapper is the fastest path to "I protected my MCP server this afternoon."
194
- - **No independent security audit.** For a signing protocol, a third-party crypto review is the credential that converts skeptics. Particularly: the canonicalization algorithm (fixed-key-order scheme) and the nonce/TTL window assumptions deserve an external read.
195
- - **No formal fuzz campaign** on parser boundaries (wire decode, envelope validation). Reproducible fuzz corpus welcome.
196
- - **Distributed stores require an available Redis control plane.** Operators own HA and clock synchronization. Documented in `docs/DISTRIBUTED_REPLAY.md`; runtime degradation is observable via `onDegraded` hook.
197
- - **Wire version `aip/0.1` is frozen.** Any break to the envelope schema, canonicalization algorithm, or intent vocabulary is a major version bump. The TypeScript API is pre-1.0 — minor version may bring breaking changes.
198
- - **Python and Rust packages not yet published** (PyPI, crates.io). Polyglot claim is verifiable via the shared conformance fixture, but `pip install` and `cargo add` don't work yet.
199
- - **Standardization race.** MCPS or MCP native signing could absorb the niche. Speed of community adoption is the hedge.
200
-
201
- ---
202
-
203
- ## 9) Bottom line
204
-
205
- The engineering shipped clean: 123 tests green, real cryptography, genuine tri-language parity, four MCP security bindings all independently tested, distributed stores with graceful degradation, and a live-Redis integration test confirming the round-trip. The original examination's two core diagnoses — *mis-packaged* and *mis-positioned* — have both been addressed. The protocol is now a real, installable, documented, public artifact with honest caveats.
206
-
207
- The question is no longer "is this good enough to release?" It is "can it earn enough adoption that the standardization window doesn't close first?" That is a distribution and community problem, not an engineering problem. The MCP wrapper is the lever: it gives any developer a same-afternoon path from "interesting" to "running in my stack."
208
-
209
- ---
210
-
211
- ### Sources (competitive landscape, verified 2026-05-31)
212
-
213
- - MCP lacks per-message auth/integrity: https://github.com/google/mcp/issues/32
214
- - State of MCP Security 2026 (unsigned messages, no replay, MCPS proposal): https://nimblebrain.ai/blog/state-of-mcp-security-2026/
215
- - MCP Security Checklist 2026: https://www.networkintelligence.ai/blogs/model-context-protocol-mcp-security-checklist/
216
- - NSA MCP security guidance: https://www.nsa.gov/Portals/75/documents/Cybersecurity/CSI_MCP_SECURITY.pdf
217
- - "MCP is dead, long live MCPS" (per-message signing + nonce replay envelope): https://dev.to/razashariff/mcp-is-dead-long-live-mcps-5ddp
218
- - A2A Signed Agent Cards (card-level, not per-message): https://cloud.google.com/blog/products/ai-machine-learning/agent2agent-protocol-is-getting-an-upgrade
219
- - A2A protocol overview: https://a2a-protocol.org/latest/
@@ -1,135 +0,0 @@
1
- # Release Benchmark Report (2026-05-15)
2
-
3
- ## 1) Metadata
4
-
5
- - Report ID: `gluv-release-bench-2026-05-15`
6
- - Date/Time (UTC): 2026-05-15 (updated 2026-05-18)
7
- - Branch/Commit: `bbcd960` (Fix inFlight counter leak in HTTP batch bench server handler)
8
- - Runtime: Node.js `v24.10.0`
9
- - Machine: local benchmark host (same environment used for prior release-gate runs)
10
-
11
- ## 2) Scope
12
-
13
- - Profile: `full` (segmented mode-by-mode to avoid timeout)
14
- - Modes tested:
15
- - `ws`, `ws-batch`, `ws-binary`, `ws-binary-batch`
16
- - `http-binary`
17
- - `http-batch` (concurrency 10 lanes complete; concurrency 100 unstable/timeout)
18
- - `http-binary-batch` (concurrency 10 lanes complete; concurrency 100 incomplete)
19
- - Payload sizes: `256`, `1024`, `4096` bytes
20
- - Concurrency levels targeted: `10`, `100`
21
-
22
- ## 3) Security Configuration Matrix
23
-
24
- | Check | Full Secure Protocol |
25
- |---|---:|
26
- | Signature verification | enabled |
27
- | Canonicalization | enabled |
28
- | Replay defense | enabled |
29
- | TTL/clock-skew enforcement | enabled |
30
- | Policy checks/guardrails | enabled |
31
-
32
- Notes:
33
- - Guardrail for unsafe plain `http` high-concurrency was enforced.
34
- - No benchmark run in this report used invariant-bypass settings.
35
-
36
- ## 4) Commands Executed (Representative)
37
-
38
- ```bash
39
- npx tsx scripts/bench-protocol-openloop.ts --profile full --ci --adaptive --p99-threshold 250 --drop-threshold-pct 2 --adaptive-max-doublings 6 --adaptive-binary-steps 8 --modes ws
40
- npx tsx scripts/bench-protocol-openloop.ts --profile full --ci --adaptive --p99-threshold 250 --drop-threshold-pct 2 --adaptive-max-doublings 6 --adaptive-binary-steps 8 --modes ws-batch
41
- npx tsx scripts/bench-protocol-openloop.ts --profile full --ci --adaptive --p99-threshold 250 --drop-threshold-pct 2 --adaptive-max-doublings 6 --adaptive-binary-steps 8 --modes ws-binary
42
- npx tsx scripts/bench-protocol-openloop.ts --profile full --ci --adaptive --p99-threshold 250 --drop-threshold-pct 2 --adaptive-max-doublings 6 --adaptive-binary-steps 8 --modes ws-binary-batch
43
- npx tsx scripts/bench-protocol-openloop.ts --profile full --ci --adaptive --p99-threshold 250 --drop-threshold-pct 2 --adaptive-max-doublings 6 --adaptive-binary-steps 8 --modes http-binary
44
- npx tsx scripts/bench-protocol-openloop.ts --profile full --adaptive --p99-threshold 250 --drop-threshold-pct 2 --adaptive-max-doublings 6 --adaptive-binary-steps 8 --modes http-batch --payloads 256,1024,4096 --concurrency 10
45
- npx tsx scripts/bench-protocol-openloop.ts --profile full --adaptive --p99-threshold 250 --drop-threshold-pct 2 --adaptive-max-doublings 6 --adaptive-binary-steps 8 --modes http-binary-batch --payloads 256,1024,4096 --concurrency 10
46
- ```
47
-
48
- ## 5) Results Summary (Best observed per lane)
49
-
50
- ### Full Secure Protocol (authoritative)
51
-
52
- | Mode | Payload | Concurrency | Ops/s | Drop % | p99 ms | Sustainable |
53
- |---|---:|---:|---:|---:|---:|---|
54
- | ws | 256 | 100 | 6548.375 | 0.000 | 49.669 | yes |
55
- | ws | 1024 | 100 | 5887.500 | 0.000 | 53.772 | yes |
56
- | ws | 4096 | 100 | 3887.500 | 0.000 | 66.011 | yes |
57
- | ws-batch | 256 | 100 | 7649.000 | 0.000 | 30.971 | yes |
58
- | ws-batch | 1024 | 100 | 6749.500 | 0.000 | 37.306 | yes |
59
- | ws-batch | 4096 | 100 | 3850.000 | 0.000 | 49.455 | yes |
60
- | ws-binary | 256 | 100 | 7261.000 | 0.000 | 53.193 | yes |
61
- | ws-binary | 1024 | 100 | 5087.375 | 0.000 | 73.307 | yes |
62
- | ws-binary | 4096 | 100 | 3662.500 | 0.000 | 77.854 | yes |
63
- | ws-binary-batch | 256 | 100 | 5750.000 | 0.000 | 36.134 | yes |
64
- | ws-binary-batch | 1024 | 100 | 6499.000 | 0.000 | 35.508 | yes |
65
- | ws-binary-batch | 4096 | 100 | 4246.000 | 0.000 | 63.565 | yes |
66
- | http-binary | 256 | 100 | 2699.875 | 0.000 | 129.755 | yes |
67
- | http-binary | 1024 | 100 | 2385.000 | 0.000 | 119.438 | yes |
68
- | http-binary | 4096 | 100 | 11993.750 | 0.000 | 17.647 | yes |
69
- | http-batch | 256 | 10 | 399.125 | 1.359 | 0.867 | yes |
70
- | http-batch | 1024 | 10 | 291.625 | 1.686 | 0.939 | yes |
71
- | http-batch | 4096 | 10 | 320.500 | 1.536 | 1.259 | yes |
72
- | http-binary-batch | 256 | 10 | 276.000 | 1.779 | 0.979 | yes |
73
- | http-binary-batch | 1024 | 10 | 260.000 | 1.887 | 0.983 | yes |
74
- | http-binary-batch | 4096 | 10 | 447.500 | 1.214 | 1.260 | yes |
75
-
76
- ### Updated results after bug fix (2026-05-18, commit `bbcd960`)
77
-
78
- Root cause identified and fixed: the `inFlight` counter in the HTTP batch bench server handler was never decremented for batch requests, causing it to accumulate until the server began 503-ing all traffic. Fix: added `finally { this.inFlight -= 1 }` to the batch path.
79
-
80
- | Mode | Payload | Concurrency | Ops/s | Drop % | p99 ms | Sustainable |
81
- |---|---:|---:|---:|---:|---:|---|
82
- | http-batch | 256 | 100 | 34940.000 | 0.000 | 7.877 | yes |
83
- | http-batch | 1024 | 100 | 21460.000 | 0.000 | 11.470 | yes |
84
- | http-batch | 4096 | 100 | 17886.667 | 0.000 | 13.683 | yes |
85
- | http-binary-batch | 256 | 100 | 28238.000 | 0.000 | 8.551 | yes |
86
- | http-binary-batch | 1024 | 100 | 19056.000 | 0.000 | 22.214 | yes |
87
- | http-binary-batch | 4096 | 100 | 11096.000 | 0.000 | 20.675 | yes |
88
-
89
- Evidence: `dist/bench/protocol-openloop.quick.2026-05-18T09-23-51-852Z.json`
90
-
91
- ## 6) SLO Gate Status
92
-
93
- Defined gates used in this closure cycle:
94
-
95
- - Interactive lanes: `p99 <= 25ms`, `drop <= 2%`
96
- - High-throughput lanes: `p99 <= 250ms`, `drop <= 2%`
97
-
98
- Current status:
99
-
100
- - WS lanes (`ws*`): PASS on completed lanes.
101
- - `http-binary`: PASS on completed lanes.
102
- - `http-batch` and `http-binary-batch`: PASS at concurrency `100` after `bbcd960` bug fix (0% drop, all p99 within gate).
103
-
104
- Overall decision: `GO (all lanes pass SLO gates as of 2026-05-18)`
105
-
106
- ## 7) Reliability Hardening Applied During Benchmarking
107
-
108
- - Added HTTP/2 server stream `error` handling in bench harness.
109
- - Added HTTP/2 client session `error` handling in bench harness.
110
- - These are benchmark resilience fixes and do not alter protocol invariants.
111
-
112
- ## 8) Evidence Artifacts
113
-
114
- - `dist/bench/protocol-openloop.full.2026-05-15T08-33-35-118Z.json`
115
- - `dist/bench/protocol-openloop.full.2026-05-15T08-48-39-773Z.json`
116
- - `dist/bench/protocol-openloop.full.2026-05-15T09-03-28-317Z.json`
117
- - `dist/bench/protocol-openloop.full.2026-05-15T09-18-35-320Z.json`
118
- - `dist/bench/protocol-openloop.full.2026-05-15T09-33-32-306Z.json`
119
- - `dist/bench/protocol-openloop.full.2026-05-15T10-48-40-452Z.json`
120
- - `dist/bench/protocol-openloop.full.2026-05-15T11-18-47-746Z.json`
121
-
122
- ## 9) Security Review Checklist
123
-
124
- - [x] Signature verification enabled
125
- - [x] Replay defense enabled
126
- - [x] TTL/clock-skew checks enabled
127
- - [x] Canonicalization enabled
128
- - [x] Policy validation run (`npm run policy:validate`)
129
- - [x] Release gate re-run after harness changes (`npm run release:gate`)
130
-
131
- ## 10) Next Actions for Full Closure
132
-
133
- - ~~Rework HTTP batch transport path before re-qualification at concurrency `100`.~~ Resolved by `bbcd960`.
134
- - All transport modes qualified. No further bench gate blockers.
135
- - Proceed with `@7h3/protocol` publish from `dist/npm-aip/` via release automation.
@@ -1,25 +0,0 @@
1
- # GLUV Release Gate
2
-
3
- Run this gate before publishing protocol performance claims or changing transport defaults.
4
-
5
- ```bash
6
- npm run release:gate
7
- ```
8
-
9
- The gate runs tests, AIP build, lint, wire benchmarks, and adaptive open-loop CI checks. For release candidates, also run:
10
-
11
- ```bash
12
- npm run bench:wire:full
13
- npm run bench:replay:full
14
- npm run bench:openloop:full
15
- npm run conformance:binary
16
- npm run conformance:python
17
- npm run conformance:rust
18
- ```
19
-
20
- ## Rollout Rules
21
-
22
- - Compact JSON remains the default wire format for `aip/0.1` compatibility.
23
- - Binary wire and binary WebSocket modes are opt-in until negotiated through `CAPS`.
24
- - Signature verification, replay defense, TTL validation, and canonicalization must stay enabled in all benchmark claims.
25
- - README performance numbers must come from fresh benchmark artifacts committed or attached to the release.
@@ -1,54 +0,0 @@
1
- # v0.1.0 — First public release
2
-
3
- > **The signing-and-replay layer your agent protocol forgot.**
4
-
5
- MCP sends JSON-RPC unsigned. A2A signs the identity card, not the traffic.
6
- `@7h3/protocol` puts a signed, TTL-bounded, replay-checked AIP envelope around every message — without touching your handler.
7
-
8
- ## What's included
9
-
10
- **Core AIP (`aip/0.1`)**
11
- Real WebCrypto HMAC-SHA256 + Ed25519 over a deterministic canonical form. Byte-identical signatures in TypeScript, Python, and Rust via a shared conformance fixture.
12
-
13
- **Distributed replay protection**
14
- Redis-backed `SET NX PX` atomic reserve. Client-agnostic (`RedisLikeClient`) — works with ioredis, node-redis, or any adapter. Graceful degradation to local store on Redis outage; `onDegraded` hook for observability.
15
-
16
- **Fleet-wide key revocation**
17
- Cached reads, fail-closed default. Wraps any `SignatureResolver` — one line to add revocation to an existing verify path.
18
-
19
- **MCP hardening wrapper**
20
- Drop `wrapMcpServer` around your handler. Add `wrapMcpClient` on the caller. Four threat bindings enforced out of the box:
21
-
22
- | Binding | Defends against |
23
- |---|---|
24
- | Recipient | Cross-server replay |
25
- | Sender | Response spoofing |
26
- | Correlation | Response substitution |
27
- | Replay (default on) | Duplicate execution |
28
-
29
- **Transport adapters**
30
- `serveMcpOverStdio` + `createHttpMcpHandler` — real transports, no new npm deps.
31
-
32
- ## Install
33
-
34
- ```bash
35
- npm install @7h3/protocol
36
- ```
37
-
38
- ## Quick demo
39
-
40
- ```bash
41
- git clone https://github.com/IceMasterT/7h3-protocol-aip
42
- cd 7h3-protocol-aip && npm install
43
- npm run aip:mcp:wrap # proves tamper + replay rejection
44
- ```
45
-
46
- ## Honest caveats
47
-
48
- - No independent security audit yet — reproductions and findings welcome.
49
- - Distributed stores require a Redis (or equivalent) control plane; operators own HA and clock sync.
50
- - Wire version `aip/0.1` is stable; the TypeScript API is pre-1.0 (minor version may bring breaking changes).
51
-
52
- ## License
53
-
54
- MIT.