@7h3/protocol 0.4.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.
- package/README.md +6 -323
- 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 +3662 -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 -79
- package/policyEnforcer.d.ts +50 -0
- package/policyTelemetryFeedback.d.ts +11 -0
- package/protocol.d.ts +66 -0
- 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 -92
- 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 -385
- 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.png +0 -0
- 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/go.mod +0 -3
- 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/webhook.go +0 -136
- package/sdk/python/README.md +0 -18
- package/sdk/python/protocol_7h3/__init__.py +0 -46
- package/sdk/python/protocol_7h3/http.py +0 -212
- package/sdk/python/protocol_7h3/keys.py +0 -149
- package/sdk/python/protocol_7h3/protocol.py +0 -525
- package/sdk/python/protocol_7h3/queue.py +0 -118
- 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_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/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/conformance.test.ts +0 -136
- package/src/conformanceVectors.ts +0 -99
- 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 -171
- 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 -163
- package/src/index.ts +0 -32
- 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/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.test.ts +0 -155
- package/src/protocol.ts +0 -413
- 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 -141
- package/src/replayStores.ts +0 -82
- 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/webhookBinding.test.ts +0 -144
- package/src/webhookBinding.ts +0 -115
- package/src/wsBinding.test.ts +0 -221
- package/src/wsBinding.ts +0 -100
- package/tsconfig.json +0 -15
- package/tsconfig.lib.json +0 -23
- package/vite.lib.config.ts +0 -16
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { type AipAgentAdapter } from './agentAdapter';
|
|
2
|
+
import { type ProtocolEnvelope } from './protocol';
|
|
3
|
+
import { type WireEnvelope } from './protocolTransport';
|
|
4
|
+
export interface LangChainMessageLike {
|
|
5
|
+
content: string;
|
|
6
|
+
name?: string;
|
|
7
|
+
additionalKwargs?: Record<string, unknown>;
|
|
8
|
+
}
|
|
9
|
+
export interface LlamaIndexMessageLike {
|
|
10
|
+
role: 'user' | 'assistant' | 'system';
|
|
11
|
+
content: string;
|
|
12
|
+
additionalKwargs?: Record<string, unknown>;
|
|
13
|
+
}
|
|
14
|
+
export interface JsonRpcError {
|
|
15
|
+
code: number;
|
|
16
|
+
message: string;
|
|
17
|
+
data?: unknown;
|
|
18
|
+
}
|
|
19
|
+
export interface JsonRpcRequestLike {
|
|
20
|
+
jsonrpc: '2.0';
|
|
21
|
+
id: string | number;
|
|
22
|
+
method: string;
|
|
23
|
+
params?: unknown;
|
|
24
|
+
}
|
|
25
|
+
export interface JsonRpcResponseLike {
|
|
26
|
+
jsonrpc: '2.0';
|
|
27
|
+
id: string | number;
|
|
28
|
+
result?: unknown;
|
|
29
|
+
error?: JsonRpcError;
|
|
30
|
+
}
|
|
31
|
+
export interface JsonRpcBridgeOptions {
|
|
32
|
+
recipient?: string;
|
|
33
|
+
allowedMethods?: readonly string[];
|
|
34
|
+
methodToCapability?: (method: string) => string;
|
|
35
|
+
authorizeMethod?: (request: JsonRpcRequestLike, context: JsonRpcPolicyContext) => boolean | Promise<boolean>;
|
|
36
|
+
rateLimitKey?: (request: JsonRpcRequestLike, context: JsonRpcPolicyContext) => string;
|
|
37
|
+
rateLimiter?: {
|
|
38
|
+
consume: (key: string, request: JsonRpcRequestLike, context: JsonRpcPolicyContext) => boolean | Promise<boolean>;
|
|
39
|
+
};
|
|
40
|
+
onPolicyEvent?: (event: JsonRpcPolicyEvent) => void | Promise<void>;
|
|
41
|
+
}
|
|
42
|
+
export interface JsonRpcPolicyContext {
|
|
43
|
+
intent: 'TASK';
|
|
44
|
+
recipient?: string;
|
|
45
|
+
capability: string;
|
|
46
|
+
correlationId: string;
|
|
47
|
+
createdAtMs: number;
|
|
48
|
+
}
|
|
49
|
+
export interface JsonRpcPolicyEvent {
|
|
50
|
+
stage: 'allowlist' | 'authorize' | 'rateLimit';
|
|
51
|
+
decision: 'allow' | 'deny';
|
|
52
|
+
method: string;
|
|
53
|
+
context: JsonRpcPolicyContext;
|
|
54
|
+
reason?: string;
|
|
55
|
+
}
|
|
56
|
+
export interface JsonRpcResponseOptions {
|
|
57
|
+
defaultErrorCode?: number;
|
|
58
|
+
}
|
|
59
|
+
export declare function createRawTaskFromLangChain(adapter: AipAgentAdapter, message: LangChainMessageLike, options?: {
|
|
60
|
+
recipient?: string;
|
|
61
|
+
capability?: string;
|
|
62
|
+
correlationId?: string;
|
|
63
|
+
}): Promise<WireEnvelope>;
|
|
64
|
+
export declare function toLangChainMessage(envelope: ProtocolEnvelope): LangChainMessageLike;
|
|
65
|
+
export declare function createRawTaskFromLlamaIndex(adapter: AipAgentAdapter, message: LlamaIndexMessageLike, options?: {
|
|
66
|
+
recipient?: string;
|
|
67
|
+
capability?: string;
|
|
68
|
+
correlationId?: string;
|
|
69
|
+
}): Promise<WireEnvelope>;
|
|
70
|
+
export declare function toLlamaIndexMessage(envelope: ProtocolEnvelope): LlamaIndexMessageLike;
|
|
71
|
+
export declare function createRawTaskFromJsonRpc(adapter: AipAgentAdapter, request: JsonRpcRequestLike, options?: JsonRpcBridgeOptions): Promise<WireEnvelope>;
|
|
72
|
+
export declare function toJsonRpcResponse(envelope: ProtocolEnvelope, id: string | number, options?: JsonRpcResponseOptions): JsonRpcResponseLike;
|
package/gateway.d.ts
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { type KeyRegistry } from './keyRegistry';
|
|
2
|
+
import { type RoutePolicy } from './routePolicy';
|
|
3
|
+
import { SlidingWindowRateLimiter } from './rateLimiter';
|
|
4
|
+
import type { ReplayStore } from './replayStores';
|
|
5
|
+
export type { KeyRegistry, RoutePolicy };
|
|
6
|
+
export interface GatewayConfig {
|
|
7
|
+
upstream: string;
|
|
8
|
+
keyRegistry: KeyRegistry;
|
|
9
|
+
policies?: RoutePolicy[];
|
|
10
|
+
privateKey?: string;
|
|
11
|
+
sender?: string;
|
|
12
|
+
signResponses?: boolean;
|
|
13
|
+
defaultPolicy?: 'allow' | 'deny';
|
|
14
|
+
headerName?: string;
|
|
15
|
+
metricsPath?: string;
|
|
16
|
+
/** Optional distributed replay store — prevents nonce reuse across gateway instances. */
|
|
17
|
+
replayStore?: ReplayStore;
|
|
18
|
+
/** Optional capability token registry for capability-based auth. */
|
|
19
|
+
capabilityRegistry?: {
|
|
20
|
+
getPublicKey(id: string): Promise<string | null>;
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
export interface GatewayRequest {
|
|
24
|
+
method: string;
|
|
25
|
+
path: string;
|
|
26
|
+
headers: Record<string, string | string[]>;
|
|
27
|
+
body?: string;
|
|
28
|
+
url?: string;
|
|
29
|
+
}
|
|
30
|
+
export interface GatewayResponse {
|
|
31
|
+
status: number;
|
|
32
|
+
headers: Record<string, string>;
|
|
33
|
+
body: string;
|
|
34
|
+
}
|
|
35
|
+
export type GatewayVerifyOutcome = {
|
|
36
|
+
ok: true;
|
|
37
|
+
sender: string;
|
|
38
|
+
envelopeId?: string;
|
|
39
|
+
} | {
|
|
40
|
+
ok: false;
|
|
41
|
+
status: 401 | 403 | 429;
|
|
42
|
+
reason: string;
|
|
43
|
+
};
|
|
44
|
+
declare class Protocol7h3Gateway {
|
|
45
|
+
private config;
|
|
46
|
+
private rateLimiter;
|
|
47
|
+
constructor(config: GatewayConfig);
|
|
48
|
+
verify(req: GatewayRequest): Promise<GatewayVerifyOutcome>;
|
|
49
|
+
handle(req: GatewayRequest): Promise<GatewayResponse>;
|
|
50
|
+
getRateLimiter(): SlidingWindowRateLimiter;
|
|
51
|
+
}
|
|
52
|
+
export declare function createGateway(config: GatewayConfig): Protocol7h3Gateway;
|
|
53
|
+
export { Protocol7h3Gateway };
|
package/grpcBinding.d.ts
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { type ProtocolEnvelope } from './protocol';
|
|
2
|
+
import type { KeyRegistry } from './keyRegistry';
|
|
3
|
+
export { type KeyRegistry };
|
|
4
|
+
export declare const GRPC_METADATA_KEY = "7h3-envelope-bin";
|
|
5
|
+
export interface GrpcSignOptions {
|
|
6
|
+
privateKey: string;
|
|
7
|
+
sender: string;
|
|
8
|
+
recipient?: string;
|
|
9
|
+
ttlMs?: number;
|
|
10
|
+
metadataKey?: string;
|
|
11
|
+
}
|
|
12
|
+
export interface GrpcVerifyOptions {
|
|
13
|
+
keyRegistry: KeyRegistry;
|
|
14
|
+
metadataKey?: string;
|
|
15
|
+
strictTtl?: boolean;
|
|
16
|
+
}
|
|
17
|
+
export type GrpcVerifyResult = {
|
|
18
|
+
ok: true;
|
|
19
|
+
envelope: ProtocolEnvelope;
|
|
20
|
+
} | {
|
|
21
|
+
ok: false;
|
|
22
|
+
code: number;
|
|
23
|
+
message: string;
|
|
24
|
+
};
|
|
25
|
+
export declare function signGrpcCall(opts: GrpcSignOptions): Promise<Record<string, string>>;
|
|
26
|
+
export declare function verifyGrpcCall(metadata: Record<string, string | Buffer | string[]>, opts: GrpcVerifyOptions): Promise<GrpcVerifyResult>;
|
|
27
|
+
export declare function withGrpcVerification<TCall extends {
|
|
28
|
+
metadata: Record<string, string | Buffer | string[]>;
|
|
29
|
+
}, TResp>(handler: (call: TCall) => Promise<TResp>, opts: GrpcVerifyOptions): (call: TCall) => Promise<TResp>;
|
package/httpBinding.d.ts
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { type ProtocolEnvelope } from './protocol';
|
|
2
|
+
import type { KeyRegistry } from './keyRegistry';
|
|
3
|
+
import { CBOR_CONTENT_TYPE as _CBOR_CONTENT_TYPE } from './envelopeCbor';
|
|
4
|
+
export { _CBOR_CONTENT_TYPE as CBOR_CONTENT_TYPE };
|
|
5
|
+
export { type KeyRegistry };
|
|
6
|
+
export declare const DEFAULT_HEADER = "x-7h3-envelope";
|
|
7
|
+
export type VerifyFailReason = 'missing-header' | 'malformed-envelope' | 'unknown-sender' | 'invalid-signature' | 'ttl-expired' | 'validation-error';
|
|
8
|
+
export type VerifyHttpResult = {
|
|
9
|
+
ok: true;
|
|
10
|
+
envelope: ProtocolEnvelope;
|
|
11
|
+
} | {
|
|
12
|
+
ok: false;
|
|
13
|
+
reason: VerifyFailReason;
|
|
14
|
+
detail?: string;
|
|
15
|
+
};
|
|
16
|
+
export interface HttpBindingOptions {
|
|
17
|
+
keyRegistry: KeyRegistry;
|
|
18
|
+
headerName?: string;
|
|
19
|
+
strictTtl?: boolean;
|
|
20
|
+
}
|
|
21
|
+
export declare function verifyHttpEnvelope(headers: Record<string, string | string[] | undefined>, opts: HttpBindingOptions, body?: Uint8Array): Promise<VerifyHttpResult>;
|
|
22
|
+
export declare function signHttpRequest(envelope: Omit<ProtocolEnvelope, 'signature'>, privateKey: string, opts?: {
|
|
23
|
+
headerName?: string;
|
|
24
|
+
format?: 'cbor' | 'json';
|
|
25
|
+
}): Promise<{
|
|
26
|
+
headers: Record<string, string>;
|
|
27
|
+
body?: Uint8Array;
|
|
28
|
+
}>;
|
|
29
|
+
export declare function signHttpRequestHmac(envelope: Omit<ProtocolEnvelope, 'signature'>, secret: string, keyId: string, opts?: {
|
|
30
|
+
headerName?: string;
|
|
31
|
+
}): Promise<{
|
|
32
|
+
headers: Record<string, string>;
|
|
33
|
+
}>;
|
|
34
|
+
export declare function createHttpMiddleware(opts: HttpBindingOptions): (req: {
|
|
35
|
+
headers: Record<string, string | string[] | undefined>;
|
|
36
|
+
}, res: {
|
|
37
|
+
status: (n: number) => {
|
|
38
|
+
json: (b: unknown) => void;
|
|
39
|
+
};
|
|
40
|
+
}, next: (err?: unknown) => void) => Promise<void>;
|
|
41
|
+
export declare function signFetchRequest(request: Request, envelope: Omit<ProtocolEnvelope, 'signature'>, privateKey: string, opts?: {
|
|
42
|
+
headerName?: string;
|
|
43
|
+
}): Promise<Request>;
|
|
44
|
+
export declare function createSignedFetchRequest(request: Request, opts: {
|
|
45
|
+
privateKey: string;
|
|
46
|
+
sender: string;
|
|
47
|
+
recipient?: string;
|
|
48
|
+
ttlMs?: number;
|
|
49
|
+
headerName?: string;
|
|
50
|
+
}): Promise<Request>;
|
package/index.d.ts
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
export * from './protocol';
|
|
2
|
+
export * from './protocolTransport';
|
|
3
|
+
export * from './protocolBinary';
|
|
4
|
+
export * from './protocolCapabilities';
|
|
5
|
+
export * from './protocolReplay';
|
|
6
|
+
export * from './keyRotation';
|
|
7
|
+
export * from './protocolAgent';
|
|
8
|
+
export * from './agentAdapter';
|
|
9
|
+
export * from './frameworkAdapters';
|
|
10
|
+
export * from './mcpGateway';
|
|
11
|
+
export * from './runtimePolicy';
|
|
12
|
+
export * from './policyEnforcer';
|
|
13
|
+
export * from './runtimePolicyManager';
|
|
14
|
+
export * from './runtimePolicyPresets';
|
|
15
|
+
export * from './policyTelemetryFeedback';
|
|
16
|
+
export * from './redisClient';
|
|
17
|
+
export * from './replayStores';
|
|
18
|
+
export * from './revocation';
|
|
19
|
+
export * from './mcpWrapper';
|
|
20
|
+
export * from './mcpTransports';
|
|
21
|
+
export * from './keyRegistry';
|
|
22
|
+
export * from './httpBinding';
|
|
23
|
+
export * from './webhookBinding';
|
|
24
|
+
export * from './queueBinding';
|
|
25
|
+
export * from './wsBinding';
|
|
26
|
+
export * from './grpcBinding';
|
|
27
|
+
export * from './keyInfra';
|
|
28
|
+
export * from './rateLimiter';
|
|
29
|
+
export * from './routePolicy';
|
|
30
|
+
export * from './gateway';
|
|
31
|
+
export * from './signedResponse';
|
|
32
|
+
export * from './auditLog';
|
|
33
|
+
export * from './telemetry';
|
|
34
|
+
export * from './otel';
|
|
35
|
+
export * from './cborCodec';
|
|
36
|
+
export * from './envelopeCbor';
|
|
37
|
+
export * from './encryption';
|
|
38
|
+
export * from './capability';
|
|
39
|
+
export * from './stream';
|