@7h3/protocol 0.5.0 → 0.5.2

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 +3670 -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} +6 -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
@@ -1,371 +0,0 @@
1
- # This file is automatically @generated by Cargo.
2
- # It is not intended for manual editing.
3
- version = 4
4
-
5
- [[package]]
6
- name = "base64"
7
- version = "0.22.1"
8
- source = "registry+https://github.com/rust-lang/crates.io-index"
9
- checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6"
10
-
11
- [[package]]
12
- name = "base64ct"
13
- version = "1.8.3"
14
- source = "registry+https://github.com/rust-lang/crates.io-index"
15
- checksum = "2af50177e190e07a26ab74f8b1efbfe2ef87da2116221318cb1c2e82baf7de06"
16
-
17
- [[package]]
18
- name = "block-buffer"
19
- version = "0.10.4"
20
- source = "registry+https://github.com/rust-lang/crates.io-index"
21
- checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71"
22
- dependencies = [
23
- "generic-array",
24
- ]
25
-
26
- [[package]]
27
- name = "cfg-if"
28
- version = "1.0.4"
29
- source = "registry+https://github.com/rust-lang/crates.io-index"
30
- checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801"
31
-
32
- [[package]]
33
- name = "const-oid"
34
- version = "0.9.6"
35
- source = "registry+https://github.com/rust-lang/crates.io-index"
36
- checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8"
37
-
38
- [[package]]
39
- name = "cpufeatures"
40
- version = "0.2.17"
41
- source = "registry+https://github.com/rust-lang/crates.io-index"
42
- checksum = "59ed5838eebb26a2bb2e58f6d5b5316989ae9d08bab10e0e6d103e656d1b0280"
43
- dependencies = [
44
- "libc",
45
- ]
46
-
47
- [[package]]
48
- name = "crypto-common"
49
- version = "0.1.7"
50
- source = "registry+https://github.com/rust-lang/crates.io-index"
51
- checksum = "78c8292055d1c1df0cce5d180393dc8cce0abec0a7102adb6c7b1eef6016d60a"
52
- dependencies = [
53
- "generic-array",
54
- "typenum",
55
- ]
56
-
57
- [[package]]
58
- name = "curve25519-dalek"
59
- version = "4.1.3"
60
- source = "registry+https://github.com/rust-lang/crates.io-index"
61
- checksum = "97fb8b7c4503de7d6ae7b42ab72a5a59857b4c937ec27a3d4539dba95b5ab2be"
62
- dependencies = [
63
- "cfg-if",
64
- "cpufeatures",
65
- "curve25519-dalek-derive",
66
- "digest",
67
- "fiat-crypto",
68
- "rustc_version",
69
- "subtle",
70
- "zeroize",
71
- ]
72
-
73
- [[package]]
74
- name = "curve25519-dalek-derive"
75
- version = "0.1.1"
76
- source = "registry+https://github.com/rust-lang/crates.io-index"
77
- checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3"
78
- dependencies = [
79
- "proc-macro2",
80
- "quote",
81
- "syn",
82
- ]
83
-
84
- [[package]]
85
- name = "der"
86
- version = "0.7.10"
87
- source = "registry+https://github.com/rust-lang/crates.io-index"
88
- checksum = "e7c1832837b905bbfb5101e07cc24c8deddf52f93225eee6ead5f4d63d53ddcb"
89
- dependencies = [
90
- "const-oid",
91
- "zeroize",
92
- ]
93
-
94
- [[package]]
95
- name = "digest"
96
- version = "0.10.7"
97
- source = "registry+https://github.com/rust-lang/crates.io-index"
98
- checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292"
99
- dependencies = [
100
- "block-buffer",
101
- "crypto-common",
102
- "subtle",
103
- ]
104
-
105
- [[package]]
106
- name = "ed25519"
107
- version = "2.2.3"
108
- source = "registry+https://github.com/rust-lang/crates.io-index"
109
- checksum = "115531babc129696a58c64a4fef0a8bf9e9698629fb97e9e40767d235cfbcd53"
110
- dependencies = [
111
- "pkcs8",
112
- "signature",
113
- ]
114
-
115
- [[package]]
116
- name = "ed25519-dalek"
117
- version = "2.2.0"
118
- source = "registry+https://github.com/rust-lang/crates.io-index"
119
- checksum = "70e796c081cee67dc755e1a36a0a172b897fab85fc3f6bc48307991f64e4eca9"
120
- dependencies = [
121
- "curve25519-dalek",
122
- "ed25519",
123
- "serde",
124
- "sha2",
125
- "subtle",
126
- "zeroize",
127
- ]
128
-
129
- [[package]]
130
- name = "fiat-crypto"
131
- version = "0.2.9"
132
- source = "registry+https://github.com/rust-lang/crates.io-index"
133
- checksum = "28dea519a9695b9977216879a3ebfddf92f1c08c05d984f8996aecd6ecdc811d"
134
-
135
- [[package]]
136
- name = "generic-array"
137
- version = "0.14.7"
138
- source = "registry+https://github.com/rust-lang/crates.io-index"
139
- checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a"
140
- dependencies = [
141
- "typenum",
142
- "version_check",
143
- ]
144
-
145
- [[package]]
146
- name = "getrandom"
147
- version = "0.2.17"
148
- source = "registry+https://github.com/rust-lang/crates.io-index"
149
- checksum = "ff2abc00be7fca6ebc474524697ae276ad847ad0a6b3faa4bcb027e9a4614ad0"
150
- dependencies = [
151
- "cfg-if",
152
- "libc",
153
- "wasi",
154
- ]
155
-
156
- [[package]]
157
- name = "hmac"
158
- version = "0.12.1"
159
- source = "registry+https://github.com/rust-lang/crates.io-index"
160
- checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e"
161
- dependencies = [
162
- "digest",
163
- ]
164
-
165
- [[package]]
166
- name = "itoa"
167
- version = "1.0.18"
168
- source = "registry+https://github.com/rust-lang/crates.io-index"
169
- checksum = "8f42a60cbdf9a97f5d2305f08a87dc4e09308d1276d28c869c684d7777685682"
170
-
171
- [[package]]
172
- name = "libc"
173
- version = "0.2.186"
174
- source = "registry+https://github.com/rust-lang/crates.io-index"
175
- checksum = "68ab91017fe16c622486840e4c83c9a37afeff978bd239b5293d61ece587de66"
176
-
177
- [[package]]
178
- name = "memchr"
179
- version = "2.8.1"
180
- source = "registry+https://github.com/rust-lang/crates.io-index"
181
- checksum = "6b947ae49db0d222b1dbc6b113ce7248a3fc3a6ca21b696717bfc000ba4484d8"
182
-
183
- [[package]]
184
- name = "pkcs8"
185
- version = "0.10.2"
186
- source = "registry+https://github.com/rust-lang/crates.io-index"
187
- checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7"
188
- dependencies = [
189
- "der",
190
- "spki",
191
- ]
192
-
193
- [[package]]
194
- name = "proc-macro2"
195
- version = "1.0.106"
196
- source = "registry+https://github.com/rust-lang/crates.io-index"
197
- checksum = "8fd00f0bb2e90d81d1044c2b32617f68fcb9fa3bb7640c23e9c748e53fb30934"
198
- dependencies = [
199
- "unicode-ident",
200
- ]
201
-
202
- [[package]]
203
- name = "protocol-7h3"
204
- version = "0.5.0"
205
- dependencies = [
206
- "base64",
207
- "ed25519-dalek",
208
- "hmac",
209
- "serde",
210
- "serde_json",
211
- "sha2",
212
- ]
213
-
214
- [[package]]
215
- name = "quote"
216
- version = "1.0.45"
217
- source = "registry+https://github.com/rust-lang/crates.io-index"
218
- checksum = "41f2619966050689382d2b44f664f4bc593e129785a36d6ee376ddf37259b924"
219
- dependencies = [
220
- "proc-macro2",
221
- ]
222
-
223
- [[package]]
224
- name = "rand_core"
225
- version = "0.6.4"
226
- source = "registry+https://github.com/rust-lang/crates.io-index"
227
- checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c"
228
- dependencies = [
229
- "getrandom",
230
- ]
231
-
232
- [[package]]
233
- name = "rustc_version"
234
- version = "0.4.1"
235
- source = "registry+https://github.com/rust-lang/crates.io-index"
236
- checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92"
237
- dependencies = [
238
- "semver",
239
- ]
240
-
241
- [[package]]
242
- name = "semver"
243
- version = "1.0.28"
244
- source = "registry+https://github.com/rust-lang/crates.io-index"
245
- checksum = "8a7852d02fc848982e0c167ef163aaff9cd91dc640ba85e263cb1ce46fae51cd"
246
-
247
- [[package]]
248
- name = "serde"
249
- version = "1.0.228"
250
- source = "registry+https://github.com/rust-lang/crates.io-index"
251
- checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e"
252
- dependencies = [
253
- "serde_core",
254
- "serde_derive",
255
- ]
256
-
257
- [[package]]
258
- name = "serde_core"
259
- version = "1.0.228"
260
- source = "registry+https://github.com/rust-lang/crates.io-index"
261
- checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad"
262
- dependencies = [
263
- "serde_derive",
264
- ]
265
-
266
- [[package]]
267
- name = "serde_derive"
268
- version = "1.0.228"
269
- source = "registry+https://github.com/rust-lang/crates.io-index"
270
- checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79"
271
- dependencies = [
272
- "proc-macro2",
273
- "quote",
274
- "syn",
275
- ]
276
-
277
- [[package]]
278
- name = "serde_json"
279
- version = "1.0.150"
280
- source = "registry+https://github.com/rust-lang/crates.io-index"
281
- checksum = "e8014e44b4736ed0538adeecded0fce2a272f22dc9578a7eb6b2d9993c74cfb9"
282
- dependencies = [
283
- "itoa",
284
- "memchr",
285
- "serde",
286
- "serde_core",
287
- "zmij",
288
- ]
289
-
290
- [[package]]
291
- name = "sha2"
292
- version = "0.10.9"
293
- source = "registry+https://github.com/rust-lang/crates.io-index"
294
- checksum = "a7507d819769d01a365ab707794a4084392c824f54a7a6a7862f8c3d0892b283"
295
- dependencies = [
296
- "cfg-if",
297
- "cpufeatures",
298
- "digest",
299
- ]
300
-
301
- [[package]]
302
- name = "signature"
303
- version = "2.2.0"
304
- source = "registry+https://github.com/rust-lang/crates.io-index"
305
- checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de"
306
- dependencies = [
307
- "rand_core",
308
- ]
309
-
310
- [[package]]
311
- name = "spki"
312
- version = "0.7.3"
313
- source = "registry+https://github.com/rust-lang/crates.io-index"
314
- checksum = "d91ed6c858b01f942cd56b37a94b3e0a1798290327d1236e4d9cf4eaca44d29d"
315
- dependencies = [
316
- "base64ct",
317
- "der",
318
- ]
319
-
320
- [[package]]
321
- name = "subtle"
322
- version = "2.6.1"
323
- source = "registry+https://github.com/rust-lang/crates.io-index"
324
- checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292"
325
-
326
- [[package]]
327
- name = "syn"
328
- version = "2.0.117"
329
- source = "registry+https://github.com/rust-lang/crates.io-index"
330
- checksum = "e665b8803e7b1d2a727f4023456bbbbe74da67099c585258af0ad9c5013b9b99"
331
- dependencies = [
332
- "proc-macro2",
333
- "quote",
334
- "unicode-ident",
335
- ]
336
-
337
- [[package]]
338
- name = "typenum"
339
- version = "1.20.1"
340
- source = "registry+https://github.com/rust-lang/crates.io-index"
341
- checksum = "b6f5e870be6c3b371b77fe0ee0bafb859fa4964b4404c27de1d380043c4dda20"
342
-
343
- [[package]]
344
- name = "unicode-ident"
345
- version = "1.0.24"
346
- source = "registry+https://github.com/rust-lang/crates.io-index"
347
- checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75"
348
-
349
- [[package]]
350
- name = "version_check"
351
- version = "0.9.5"
352
- source = "registry+https://github.com/rust-lang/crates.io-index"
353
- checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a"
354
-
355
- [[package]]
356
- name = "wasi"
357
- version = "0.11.1+wasi-snapshot-preview1"
358
- source = "registry+https://github.com/rust-lang/crates.io-index"
359
- checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b"
360
-
361
- [[package]]
362
- name = "zeroize"
363
- version = "1.8.2"
364
- source = "registry+https://github.com/rust-lang/crates.io-index"
365
- checksum = "b97154e67e32c85465826e8bcc1c59429aaaf107c1e4a9e53c8d8ccd5eff88d0"
366
-
367
- [[package]]
368
- name = "zmij"
369
- version = "1.0.21"
370
- source = "registry+https://github.com/rust-lang/crates.io-index"
371
- checksum = "b8848ee67ecc8aedbaf3e4122217aff892639231befc6a1b58d29fff4c2cabaa"
@@ -1,25 +0,0 @@
1
- [package]
2
- name = "protocol-7h3"
3
- version = "0.5.0"
4
- edition = "2021"
5
- description = "7h3 Protocol — Rust SDK. Deterministic, signed, replay-safe AI-to-AI messaging with TypeScript/Python parity. Wire version 7h3/0.1."
6
- license = "MIT"
7
- repository = "https://github.com/IceMasterT/7h3-protocol-aip"
8
- homepage = "https://github.com/IceMasterT/7h3-protocol-aip"
9
- documentation = "https://docs.rs/7h3-protocol"
10
- keywords = ["7h3", "agent", "protocol", "ed25519", "mcp"]
11
- categories = ["cryptography", "network-programming", "web-programming::http-server"]
12
- readme = "README.md"
13
- include = ["src/**/*", "README.md", "Cargo.toml"]
14
-
15
- [lib]
16
- name = "protocol_7h3"
17
- path = "src/lib.rs"
18
-
19
- [dependencies]
20
- base64 = "0.22"
21
- ed25519-dalek = { version = "2", features = ["pkcs8"] }
22
- hmac = "0.12"
23
- serde = { version = "1.0", features = ["derive"] }
24
- serde_json = "1.0"
25
- sha2 = "0.10"
@@ -1,31 +0,0 @@
1
- # 7h3 Protocol AIP Rust SDK
2
-
3
- Reference `aip/0.1` SDK in Rust (crate `aip7h3`) with shared conformance fixtures.
4
-
5
- ## Included
6
-
7
- - deterministic canonicalization matching TypeScript behavior
8
- - HS256 HMAC signing and verification
9
- - ED25519 signing and verification
10
- - compact wire encode/decode
11
- - envelope validation helpers (version, required fields, TTL)
12
- - JSON-RPC bridge helpers for TASK/RESULT mapping
13
- - line-based MCP-style gateway runtime over signed AIP envelopes
14
- - conformance tests using `conformance/aip_v0_1.json`
15
-
16
- ## Run tests
17
-
18
- ```bash
19
- cargo test --manifest-path sdk/rust/Cargo.toml
20
- ```
21
-
22
- ## Run MCP-style gateway CLI
23
-
24
- ```bash
25
- cargo run --manifest-path sdk/rust/Cargo.toml --bin aip_mcp_gateway
26
- ```
27
-
28
- Optional env vars:
29
-
30
- - `AIP_SHARED_SECRET` (default `mcp-gateway-secret`)
31
- - `AIP_ALLOWED_METHODS` (comma-separated allowlist)
@@ -1,29 +0,0 @@
1
- [package]
2
- name = "aip7h3-fuzz"
3
- version = "0.0.0"
4
- edition = "2021"
5
- publish = false
6
-
7
- [package.metadata]
8
- cargo-fuzz = true
9
-
10
- [dependencies]
11
- libfuzzer-sys = "0.4"
12
-
13
- [dependencies.aip7h3]
14
- path = ".."
15
-
16
- # Each fuzz target is a separate binary
17
- [[bin]]
18
- name = "fuzz_decode"
19
- path = "fuzz_targets/fuzz_decode.rs"
20
- test = false
21
- doc = false
22
- bench = false
23
-
24
- [[bin]]
25
- name = "fuzz_canonicalize"
26
- path = "fuzz_targets/fuzz_canonicalize.rs"
27
- test = false
28
- doc = false
29
- bench = false
@@ -1,46 +0,0 @@
1
- #![no_main]
2
-
3
- use libfuzzer_sys::fuzz_target;
4
-
5
- // Invariant: canonicalize_envelope must be pure — calling it twice on the same
6
- // input must return the same string. We construct minimal envelopes from the
7
- // fuzz input and verify idempotence.
8
- fuzz_target!(|data: &[u8]| {
9
- if data.len() < 4 {
10
- return;
11
- }
12
- // Carve the fuzz bytes into two string fields to avoid heavy JSON parsing
13
- let mid_len = (data[0] as usize % 32) + 1;
14
- let content_len = (data[1] as usize % 64).min(data.len().saturating_sub(2 + mid_len));
15
-
16
- let mid_bytes = &data[2..2 + mid_len.min(data.len().saturating_sub(2))];
17
- let content_bytes = &data[2 + mid_len..2 + mid_len + content_len.min(
18
- data.len().saturating_sub(2 + mid_len),
19
- )];
20
-
21
- let mid = String::from_utf8_lossy(mid_bytes).to_string();
22
- let content = String::from_utf8_lossy(content_bytes).to_string();
23
-
24
- let envelope = protocol_7h3::ProtocolEnvelope {
25
- header: protocol_7h3::ProtocolHeader {
26
- version: "7h3/0.1".to_string(),
27
- message_id: mid,
28
- timestamp_ms: 1_700_000_000_000,
29
- ttl_ms: 30_000,
30
- sender: "fuzzer".to_string(),
31
- recipient: None,
32
- nonce: "nonce-fuzz".to_string(),
33
- },
34
- body: protocol_7h3::ProtocolBody {
35
- intent: "PING".to_string(),
36
- content,
37
- capability: None,
38
- correlation_id: None,
39
- },
40
- signature: None,
41
- };
42
-
43
- let c1 = protocol_7h3::canonicalize_envelope(&envelope);
44
- let c2 = protocol_7h3::canonicalize_envelope(&envelope);
45
- assert_eq!(c1, c2, "canonicalize_envelope must be idempotent");
46
- });
@@ -1,11 +0,0 @@
1
- #![no_main]
2
-
3
- use libfuzzer_sys::fuzz_target;
4
-
5
- // Invariant: decode_envelope must never panic on any UTF-8-valid string input.
6
- // On garbage/malformed input it must return Err(...), not panic.
7
- fuzz_target!(|data: &[u8]| {
8
- if let Ok(s) = std::str::from_utf8(data) {
9
- let _ = protocol_7h3::decode_envelope(s);
10
- }
11
- });
@@ -1,59 +0,0 @@
1
- use protocol_7h3::{create_aip_mcp_gateway_runtime, AipMcpGatewayOptions};
2
- use std::io::{self, BufRead, Write};
3
- use std::time::{SystemTime, UNIX_EPOCH};
4
-
5
- fn current_time_ms() -> i64 {
6
- let millis = SystemTime::now()
7
- .duration_since(UNIX_EPOCH)
8
- .unwrap_or_default()
9
- .as_millis();
10
- i64::try_from(millis).unwrap_or(i64::MAX)
11
- }
12
-
13
- fn parse_allowed_methods_from_env() -> Vec<String> {
14
- std::env::var("AIP_ALLOWED_METHODS")
15
- .ok()
16
- .map(|raw| {
17
- raw.split(',')
18
- .map(|item| item.trim().to_string())
19
- .filter(|item| !item.is_empty())
20
- .collect::<Vec<_>>()
21
- })
22
- .filter(|items| !items.is_empty())
23
- .unwrap_or_else(|| {
24
- vec![
25
- "tools/call".to_string(),
26
- "resources/read".to_string(),
27
- "prompts/get".to_string(),
28
- ]
29
- })
30
- }
31
-
32
- fn main() {
33
- let shared_secret =
34
- std::env::var("AIP_SHARED_SECRET").unwrap_or_else(|_| "mcp-gateway-secret".to_string());
35
- let runtime = create_aip_mcp_gateway_runtime(AipMcpGatewayOptions {
36
- shared_secret,
37
- allowed_methods: parse_allowed_methods_from_env(),
38
- ..AipMcpGatewayOptions::default()
39
- });
40
-
41
- let stdin = io::stdin();
42
- let mut stdout = io::stdout();
43
-
44
- for line_result in stdin.lock().lines() {
45
- let line = match line_result {
46
- Ok(value) => value,
47
- Err(_) => break,
48
- };
49
-
50
- if let Some(response) = runtime.handle_line(&line, current_time_ms()) {
51
- if writeln!(stdout, "{}", response).is_err() {
52
- break;
53
- }
54
- if stdout.flush().is_err() {
55
- break;
56
- }
57
- }
58
- }
59
- }