@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.
- package/README.md +6 -1317
- package/agentAdapter.d.ts +26 -0
- package/auditLog.d.ts +54 -0
- package/capability.d.ts +67 -0
- package/cborCodec.d.ts +34 -0
- package/conformanceVectors.d.ts +20 -0
- package/encryption.d.ts +85 -0
- package/envelopeCbor.d.ts +33 -0
- package/frameworkAdapters.d.ts +72 -0
- package/gateway.d.ts +53 -0
- package/grpcBinding.d.ts +29 -0
- package/httpBinding.d.ts +50 -0
- package/index.d.ts +39 -0
- package/index.js +3670 -0
- package/keyInfra.d.ts +64 -0
- package/keyRegistry.d.ts +9 -0
- package/keyRotation.d.ts +20 -0
- package/mcpGateway.d.ts +37 -0
- package/mcpTransports.d.ts +62 -0
- package/mcpWrapper.d.ts +83 -0
- package/otel.d.ts +65 -0
- package/package.json +13 -121
- package/policyEnforcer.d.ts +50 -0
- package/policyTelemetryFeedback.d.ts +11 -0
- package/{src/protocol.d.ts → protocol.d.ts} +6 -2
- package/protocolAgent.d.ts +58 -0
- package/protocolBinary.d.ts +8 -0
- package/protocolCapabilities.d.ts +24 -0
- package/protocolReplay.d.ts +35 -0
- package/protocolTransport.d.ts +73 -0
- package/queueBinding.d.ts +43 -0
- package/rateLimiter.d.ts +18 -0
- package/{src/redisClient.ts → redisClient.d.ts} +25 -75
- package/replayStores.d.ts +98 -0
- package/revocation.d.ts +71 -0
- package/routePolicy.d.ts +30 -0
- package/runtimePolicy.d.ts +24 -0
- package/runtimePolicyManager.d.ts +15 -0
- package/runtimePolicyPresets.d.ts +11 -0
- package/signedResponse.d.ts +21 -0
- package/stream.d.ts +59 -0
- package/telemetry.d.ts +79 -0
- package/webhookBinding.d.ts +30 -0
- package/wsBinding.d.ts +52 -0
- package/.dockerignore +0 -19
- package/.github/dependabot.yml +0 -32
- package/.github/workflows/ci.yml +0 -31
- package/.github/workflows/publish.yml +0 -59
- package/.github/workflows/scorecard.yml +0 -37
- package/7h3.example.yaml +0 -125
- package/CHANGELOG.md +0 -152
- package/CONTRIBUTING.md +0 -82
- package/Dockerfile +0 -73
- package/GOVERNANCE.md +0 -62
- package/SECURITY.md +0 -70
- package/bench-results/replay-cache-full-1777891033256.json +0 -10
- package/bench-results/replay-cache-full-1777896317488.json +0 -10
- package/bench-results/replay-cache-full-1777900993184.json +0 -10
- package/bench-results/replay-cache-full-1777901019285.json +0 -10
- package/bench-results/replay-cache-quick-1777870170126.json +0 -10
- package/bench-results/signature-profiles-quick-1775875160079.json +0 -85
- package/bench-results/signature-profiles-quick-1775983539716.json +0 -85
- package/bench-results/signature-profiles-quick-1776237913190.json +0 -85
- package/bench-results/wire-codecs-full-1777891019803.json +0 -93
- package/bench-results/wire-codecs-full-1777896260964.json +0 -93
- package/bench-results/wire-codecs-full-1777901004247.json +0 -93
- package/bench-results/wire-codecs-quick-1775972879056.json +0 -93
- package/bench-results/wire-codecs-quick-1775983541111.json +0 -93
- package/bench-results/wire-codecs-quick-1776237914299.json +0 -93
- package/bench-results/wire-codecs-quick-1777841285236.json +0 -93
- package/bench-results/wire-codecs-quick-1777841321772.json +0 -93
- package/bench-results/wire-codecs-quick-1777841330408.json +0 -93
- package/bench-results/wire-codecs-quick-1777852886082.json +0 -93
- package/bench-results/wire-codecs-quick-1777852988773.json +0 -93
- package/bench-results/wire-codecs-quick-1777870188095.json +0 -93
- package/bench-results/wire-codecs-quick-1777870263918.json +0 -93
- package/bench-results/wire-codecs-quick-1777870455034.json +0 -93
- package/bench-results/wire-codecs-quick-1778816163081.json +0 -93
- package/bench-results/wire-codecs-quick-1778843936130.json +0 -93
- package/bin/7h3.ts +0 -406
- package/conformance/7h3_v0_1.json +0 -77
- package/conformance/7h3_v0_1_binary.json +0 -20
- package/conformance/aip_v0_1_binary.json +0 -20
- package/docker-compose.yaml +0 -77
- package/docs/ADOPTION_PLAN.md +0 -120
- package/docs/AGENTS.md +0 -77
- package/docs/AIP_RFC_v0.1.md +0 -97
- package/docs/AI_DECISION_CARD.md +0 -122
- package/docs/AI_RUNTIME_POLICY.json +0 -126
- package/docs/AI_RUNTIME_POLICY.yaml +0 -110
- package/docs/BACKPRESSURE_TUNING.md +0 -65
- package/docs/BENCHMARK_CLAIM_MATRIX.md +0 -42
- package/docs/BENCHMARK_REPORT_TEMPLATE.md +0 -169
- package/docs/BINARY_CODEC_BENCH.md +0 -23
- package/docs/CLEAN_CLONE_RUNBOOK.md +0 -36
- package/docs/CLOCK_SKEW_POLICY.md +0 -30
- package/docs/DISTRIBUTED_REPLAY.md +0 -142
- package/docs/FUZZ_CAMPAIGN.md +0 -121
- package/docs/GATEWAY.md +0 -195
- package/docs/KEY_MANAGEMENT_POLICY.md +0 -53
- package/docs/KEY_REVOCATION.md +0 -69
- package/docs/MCP_WRAPPER.md +0 -159
- package/docs/MIGRATION_GUIDE.md +0 -40
- package/docs/OPERATORS.md +0 -184
- package/docs/PERF_REGRESSION_POLICY.md +0 -34
- package/docs/PROJECT_EXAMINATION_2026-05-31.md +0 -219
- package/docs/RELEASE_BENCHMARK_REPORT_2026-05-15.md +0 -135
- package/docs/RELEASE_GATE.md +0 -25
- package/docs/RELEASE_NOTES_v0.1.0.md +0 -54
- package/docs/SECURITY_REVIEW_2026-06-05.md +0 -165
- package/docs/TELEMETRY.md +0 -41
- package/docs/THREAT_MODEL.md +0 -89
- package/docs/VERSIONING_POLICY.md +0 -30
- package/docs/assets/banner-github.png +0 -0
- package/docs/assets/banner.png +0 -0
- package/docs/assets/banner.svg +0 -123
- package/eslint.config.js +0 -15
- package/fuzz/ts/harness-decode.ts +0 -136
- package/fuzz/ts/harness-verify.ts +0 -121
- package/fuzz/ts/run.ts +0 -35
- package/mcp-server/README.md +0 -38
- package/mcp-server/package-lock.json +0 -1187
- package/mcp-server/package.json +0 -35
- package/mcp-server/src/index.ts +0 -236
- package/mcp-server/tsconfig.json +0 -14
- package/scripts/aip-framework-quickstart.ts +0 -110
- package/scripts/aip-mcp-gateway.ts +0 -38
- package/scripts/aip-mcp-wrap-demo.ts +0 -72
- package/scripts/aip-quickstart.ts +0 -60
- package/scripts/bench-diff.ts +0 -118
- package/scripts/bench-protocol-e2e.ts +0 -937
- package/scripts/bench-protocol-openloop.ts +0 -1397
- package/scripts/bench-replay-cache.ts +0 -76
- package/scripts/bench-signature-profiles.ts +0 -180
- package/scripts/bench-wire-codecs.ts +0 -161
- package/scripts/build-binary-conformance.ts +0 -36
- package/scripts/build-release-dashboard.ts +0 -175
- package/scripts/canary-rollout.ts +0 -38
- package/scripts/mcpGatewayCli.test.ts +0 -116
- package/scripts/prepare-aip-package.ts +0 -88
- package/scripts/regen-conformance-sigs.ts +0 -18
- package/scripts/release-gate.ts +0 -19
- package/scripts/validate-runtime-policy.ts +0 -18
- package/sdk/browser/index.test.ts +0 -162
- package/sdk/browser/index.ts +0 -257
- package/sdk/browser/package.json +0 -13
- package/sdk/go/cbor.go +0 -551
- package/sdk/go/cbor_test.go +0 -232
- package/sdk/go/encryption.go +0 -280
- package/sdk/go/encryption_test.go +0 -318
- package/sdk/go/go.mod +0 -7
- package/sdk/go/go.sum +0 -4
- package/sdk/go/http.go +0 -135
- package/sdk/go/protocol.go +0 -324
- package/sdk/go/protocol_test.go +0 -334
- package/sdk/go/replay.go +0 -121
- package/sdk/go/replay_test.go +0 -149
- package/sdk/go/webhook.go +0 -136
- package/sdk/pq/package-lock.json +0 -1358
- package/sdk/pq/package.json +0 -42
- package/sdk/pq/src/index.test.ts +0 -143
- package/sdk/pq/src/index.ts +0 -166
- package/sdk/pq/tsconfig.json +0 -14
- package/sdk/pq/vitest.config.ts +0 -7
- package/sdk/python/README.md +0 -18
- package/sdk/python/protocol_7h3/__init__.py +0 -46
- package/sdk/python/protocol_7h3/encryption.py +0 -252
- package/sdk/python/protocol_7h3/http.py +0 -212
- package/sdk/python/protocol_7h3/keys.py +0 -149
- package/sdk/python/protocol_7h3/pq.py +0 -244
- package/sdk/python/protocol_7h3/protocol.py +0 -525
- package/sdk/python/protocol_7h3/queue.py +0 -118
- package/sdk/python/protocol_7h3/replay.py +0 -98
- package/sdk/python/protocol_7h3/webhook.py +0 -116
- package/sdk/python/pyproject.toml +0 -40
- package/sdk/python/tests/test_conformance.py +0 -110
- package/sdk/python/tests/test_encryption.py +0 -206
- package/sdk/python/tests/test_http.py +0 -305
- package/sdk/python/tests/test_keys.py +0 -417
- package/sdk/python/tests/test_queue.py +0 -120
- package/sdk/python/tests/test_webhook.py +0 -345
- package/sdk/rust/Cargo.lock +0 -371
- package/sdk/rust/Cargo.toml +0 -25
- package/sdk/rust/README.md +0 -31
- package/sdk/rust/fuzz/Cargo.toml +0 -29
- package/sdk/rust/fuzz/fuzz_targets/fuzz_canonicalize.rs +0 -46
- package/sdk/rust/fuzz/fuzz_targets/fuzz_decode.rs +0 -11
- package/sdk/rust/src/bin/aip_mcp_gateway.rs +0 -59
- package/sdk/rust/src/http.rs +0 -145
- package/sdk/rust/src/keys.rs +0 -161
- package/sdk/rust/src/lib.rs +0 -688
- package/sdk/rust/src/queue.rs +0 -79
- package/sdk/rust/src/webhook.rs +0 -86
- package/sdk/rust/tests/conformance.rs +0 -148
- package/sdk/rust/tests/gateway.rs +0 -130
- package/sdk/rust/tests/http_webhook_queue.rs +0 -201
- package/sdk/rust/tests/keys.rs +0 -189
- package/sdk/threshold/index.d.ts +0 -68
- package/sdk/threshold/index.d.ts.map +0 -1
- package/sdk/threshold/index.js +0 -254
- package/sdk/threshold/package-lock.json +0 -1361
- package/sdk/threshold/package.json +0 -39
- package/sdk/threshold/src/index.d.ts +0 -68
- package/sdk/threshold/src/index.d.ts.map +0 -1
- package/sdk/threshold/src/index.js +0 -254
- package/sdk/threshold/src/index.test.ts +0 -238
- package/sdk/threshold/src/index.ts +0 -355
- package/sdk/threshold/tsconfig.json +0 -19
- package/sdk/threshold/vitest.config.ts +0 -12
- package/src/agentAdapter.test.ts +0 -48
- package/src/agentAdapter.ts +0 -56
- package/src/auditLog.test.ts +0 -145
- package/src/auditLog.ts +0 -147
- package/src/capability.test.ts +0 -504
- package/src/capability.ts +0 -380
- package/src/cborCodec.test.ts +0 -263
- package/src/cborCodec.ts +0 -339
- package/src/conformance.test.ts +0 -136
- package/src/conformanceVectors.ts +0 -99
- package/src/encryption.test.ts +0 -206
- package/src/encryption.ts +0 -245
- package/src/envelopeCbor.ts +0 -140
- package/src/frameworkAdapters.test.ts +0 -290
- package/src/frameworkAdapters.ts +0 -261
- package/src/gateway.test.ts +0 -343
- package/src/gateway.ts +0 -246
- package/src/grpcBinding.test.ts +0 -211
- package/src/grpcBinding.ts +0 -103
- package/src/httpBinding.test.ts +0 -376
- package/src/httpBinding.ts +0 -189
- package/src/index.ts +0 -39
- package/src/keyInfra.test.ts +0 -278
- package/src/keyInfra.ts +0 -228
- package/src/keyRegistry.ts +0 -59
- package/src/keyRotation.test.ts +0 -78
- package/src/keyRotation.ts +0 -72
- package/src/mcpGateway.test.ts +0 -129
- package/src/mcpGateway.ts +0 -250
- package/src/mcpTransports.test.ts +0 -92
- package/src/mcpTransports.ts +0 -169
- package/src/mcpWrapper.test.ts +0 -179
- package/src/mcpWrapper.ts +0 -206
- package/src/otel.ts +0 -136
- package/src/policyEnforcer.test.ts +0 -99
- package/src/policyEnforcer.ts +0 -169
- package/src/policyTelemetryFeedback.test.ts +0 -25
- package/src/policyTelemetryFeedback.ts +0 -38
- package/src/protocol.bench.ts +0 -37
- package/src/protocol.d.ts.map +0 -1
- package/src/protocol.js +0 -294
- package/src/protocol.test.ts +0 -155
- package/src/protocol.ts +0 -414
- package/src/protocolAgent.test.ts +0 -105
- package/src/protocolAgent.ts +0 -169
- package/src/protocolBinary.test.ts +0 -165
- package/src/protocolBinary.ts +0 -312
- package/src/protocolCapabilities.ts +0 -70
- package/src/protocolFuzz.advanced.test.ts +0 -235
- package/src/protocolFuzz.test.ts +0 -111
- package/src/protocolNegative.test.ts +0 -97
- package/src/protocolReplay.test.ts +0 -71
- package/src/protocolReplay.ts +0 -194
- package/src/protocolTransport.test.ts +0 -556
- package/src/protocolTransport.ts +0 -483
- package/src/queueBinding.test.ts +0 -130
- package/src/queueBinding.ts +0 -102
- package/src/rateLimiter.test.ts +0 -96
- package/src/rateLimiter.ts +0 -46
- package/src/redisIntegration.test.ts +0 -134
- package/src/replayStores.test.ts +0 -273
- package/src/replayStores.ts +0 -215
- package/src/revocation.test.ts +0 -98
- package/src/revocation.ts +0 -0
- package/src/routePolicy.test.ts +0 -87
- package/src/routePolicy.ts +0 -72
- package/src/runtimePolicy.test.ts +0 -49
- package/src/runtimePolicy.ts +0 -81
- package/src/runtimePolicyManager.test.ts +0 -29
- package/src/runtimePolicyManager.ts +0 -50
- package/src/runtimePolicyPresets.ts +0 -43
- package/src/signedResponse.test.ts +0 -111
- package/src/signedResponse.ts +0 -83
- package/src/stream.test.ts +0 -254
- package/src/stream.ts +0 -417
- package/src/telemetry.test.ts +0 -251
- package/src/telemetry.ts +0 -299
- package/src/webhookBinding.test.ts +0 -144
- package/src/webhookBinding.ts +0 -115
- package/src/wsBinding.test.ts +0 -221
- package/src/wsBinding.ts +0 -200
- package/tsconfig.json +0 -15
- package/tsconfig.lib.json +0 -23
- package/vite.lib.config.ts +0 -16
- package/vitest.config.ts +0 -11
package/sdk/rust/Cargo.lock
DELETED
|
@@ -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"
|
package/sdk/rust/Cargo.toml
DELETED
|
@@ -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"
|
package/sdk/rust/README.md
DELETED
|
@@ -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)
|
package/sdk/rust/fuzz/Cargo.toml
DELETED
|
@@ -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
|
-
}
|