@clowder-ai/plugin-contract 0.1.0-beta.1 → 0.1.0-beta.10
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/dist/codegen/generate-contract.d.ts +5 -0
- package/dist/codegen/generate-contract.d.ts.map +1 -1
- package/dist/codegen/generate-contract.js +45 -4
- package/dist/codegen/generate-contract.js.map +1 -1
- package/dist/conformance/behavior-executor.d.ts +18 -0
- package/dist/conformance/behavior-executor.d.ts.map +1 -0
- package/dist/conformance/behavior-executor.js +52 -0
- package/dist/conformance/behavior-executor.js.map +1 -0
- package/dist/conformance/fixtures.d.ts +9 -0
- package/dist/conformance/fixtures.d.ts.map +1 -0
- package/dist/conformance/fixtures.js +8 -0
- package/dist/conformance/fixtures.js.map +1 -0
- package/dist/conformance/index.d.ts +5 -0
- package/dist/conformance/index.d.ts.map +1 -1
- package/dist/conformance/index.js +4 -0
- package/dist/conformance/index.js.map +1 -1
- package/dist/conformance/messaging-loopback-adapter.d.ts +23 -0
- package/dist/conformance/messaging-loopback-adapter.d.ts.map +1 -0
- package/dist/conformance/messaging-loopback-adapter.js +389 -0
- package/dist/conformance/messaging-loopback-adapter.js.map +1 -0
- package/dist/conformance/messaging-loopback-state.d.ts +22 -0
- package/dist/conformance/messaging-loopback-state.d.ts.map +1 -0
- package/dist/conformance/messaging-loopback-state.js +101 -0
- package/dist/conformance/messaging-loopback-state.js.map +1 -0
- package/dist/conformance/runner.d.ts +18 -1
- package/dist/conformance/runner.d.ts.map +1 -1
- package/dist/conformance/runner.js +153 -66
- package/dist/conformance/runner.js.map +1 -1
- package/dist/conformance/stdio-harness/child-process-harness.d.ts +65 -0
- package/dist/conformance/stdio-harness/child-process-harness.d.ts.map +1 -0
- package/dist/conformance/stdio-harness/child-process-harness.js +296 -0
- package/dist/conformance/stdio-harness/child-process-harness.js.map +1 -0
- package/dist/conformance/stdio-harness/dual-transport-oracle.d.ts +26 -0
- package/dist/conformance/stdio-harness/dual-transport-oracle.d.ts.map +1 -0
- package/dist/conformance/stdio-harness/dual-transport-oracle.js +32 -0
- package/dist/conformance/stdio-harness/dual-transport-oracle.js.map +1 -0
- package/dist/conformance/stdio-harness/harness-process-spawn.d.ts +27 -0
- package/dist/conformance/stdio-harness/harness-process-spawn.d.ts.map +1 -0
- package/dist/conformance/stdio-harness/harness-process-spawn.js +43 -0
- package/dist/conformance/stdio-harness/harness-process-spawn.js.map +1 -0
- package/dist/conformance/stdio-harness/index.d.ts +5 -0
- package/dist/conformance/stdio-harness/index.d.ts.map +1 -0
- package/dist/conformance/stdio-harness/index.js +4 -0
- package/dist/conformance/stdio-harness/index.js.map +1 -0
- package/dist/conformance/stdio-harness/ndjson-frame.d.ts +31 -0
- package/dist/conformance/stdio-harness/ndjson-frame.d.ts.map +1 -0
- package/dist/conformance/stdio-harness/ndjson-frame.js +125 -0
- package/dist/conformance/stdio-harness/ndjson-frame.js.map +1 -0
- package/dist/conformance/stdio-harness/node-process-tree-runtime.d.ts +15 -0
- package/dist/conformance/stdio-harness/node-process-tree-runtime.d.ts.map +1 -0
- package/dist/conformance/stdio-harness/node-process-tree-runtime.js +78 -0
- package/dist/conformance/stdio-harness/node-process-tree-runtime.js.map +1 -0
- package/dist/conformance/stdio-harness/process-tree-controller.d.ts +51 -0
- package/dist/conformance/stdio-harness/process-tree-controller.d.ts.map +1 -0
- package/dist/conformance/stdio-harness/process-tree-controller.js +162 -0
- package/dist/conformance/stdio-harness/process-tree-controller.js.map +1 -0
- package/dist/conformance/stdio-harness/windows-sentinel.d.ts +15 -0
- package/dist/conformance/stdio-harness/windows-sentinel.d.ts.map +1 -0
- package/dist/conformance/stdio-harness/windows-sentinel.js +160 -0
- package/dist/conformance/stdio-harness/windows-sentinel.js.map +1 -0
- package/dist/conformance/stdio-harness/wire-shape.d.ts +18 -0
- package/dist/conformance/stdio-harness/wire-shape.d.ts.map +1 -0
- package/dist/conformance/stdio-harness/wire-shape.js +2 -0
- package/dist/conformance/stdio-harness/wire-shape.js.map +1 -0
- package/dist/generated/contract.generated.d.ts +305 -1
- package/dist/generated/contract.generated.d.ts.map +1 -1
- package/dist/generated/contract.generated.js +1 -1
- package/dist/generated/contract.generated.js.map +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -1
- package/dist/index.js.map +1 -1
- package/dist/validation/index.d.ts +2 -0
- package/dist/validation/index.d.ts.map +1 -1
- package/dist/validation/index.js +2 -0
- package/dist/validation/index.js.map +1 -1
- package/dist/validation/manifest.d.ts +23 -0
- package/dist/validation/manifest.d.ts.map +1 -0
- package/dist/validation/manifest.js +53 -0
- package/dist/validation/manifest.js.map +1 -0
- package/dist/validation/signals.d.ts +26 -0
- package/dist/validation/signals.d.ts.map +1 -0
- package/dist/validation/signals.js +206 -0
- package/dist/validation/signals.js.map +1 -0
- package/dist/wire/constants.d.ts +36 -0
- package/dist/wire/constants.d.ts.map +1 -0
- package/dist/wire/constants.js +36 -0
- package/dist/wire/constants.js.map +1 -0
- package/dist/wire/disposition-fixtures.d.ts +110 -0
- package/dist/wire/disposition-fixtures.d.ts.map +1 -0
- package/dist/wire/disposition-fixtures.js +1462 -0
- package/dist/wire/disposition-fixtures.js.map +1 -0
- package/dist/wire/disposition.d.ts +102 -0
- package/dist/wire/disposition.d.ts.map +1 -0
- package/dist/wire/disposition.js +217 -0
- package/dist/wire/disposition.js.map +1 -0
- package/dist/wire/envelope.d.ts +253 -0
- package/dist/wire/envelope.d.ts.map +1 -0
- package/dist/wire/envelope.js +19 -0
- package/dist/wire/envelope.js.map +1 -0
- package/dist/wire/errors.d.ts +222 -0
- package/dist/wire/errors.d.ts.map +1 -0
- package/dist/wire/errors.js +153 -0
- package/dist/wire/errors.js.map +1 -0
- package/dist/wire/grants.d.ts +57 -0
- package/dist/wire/grants.d.ts.map +1 -0
- package/dist/wire/grants.js +59 -0
- package/dist/wire/grants.js.map +1 -0
- package/dist/wire/handshake-byte-bounds.d.ts +69 -0
- package/dist/wire/handshake-byte-bounds.d.ts.map +1 -0
- package/dist/wire/handshake-byte-bounds.js +173 -0
- package/dist/wire/handshake-byte-bounds.js.map +1 -0
- package/dist/wire/handshake.d.ts +146 -0
- package/dist/wire/handshake.d.ts.map +1 -0
- package/dist/wire/handshake.js +189 -0
- package/dist/wire/handshake.js.map +1 -0
- package/dist/wire/index.d.ts +35 -0
- package/dist/wire/index.d.ts.map +1 -0
- package/dist/wire/index.js +53 -0
- package/dist/wire/index.js.map +1 -0
- package/dist/wire/lifecycle-byte-bounds.d.ts +55 -0
- package/dist/wire/lifecycle-byte-bounds.d.ts.map +1 -0
- package/dist/wire/lifecycle-byte-bounds.js +209 -0
- package/dist/wire/lifecycle-byte-bounds.js.map +1 -0
- package/dist/wire/registry.d.ts +283 -0
- package/dist/wire/registry.d.ts.map +1 -0
- package/dist/wire/registry.js +258 -0
- package/dist/wire/registry.js.map +1 -0
- package/dist/wire/request-id.d.ts +34 -0
- package/dist/wire/request-id.d.ts.map +1 -0
- package/dist/wire/request-id.js +40 -0
- package/dist/wire/request-id.js.map +1 -0
- package/dist/wire/row-shapes.d.ts +212 -0
- package/dist/wire/row-shapes.d.ts.map +1 -0
- package/dist/wire/row-shapes.js +59 -0
- package/dist/wire/row-shapes.js.map +1 -0
- package/dist/wire/signal-byte-bounds.d.ts +97 -0
- package/dist/wire/signal-byte-bounds.d.ts.map +1 -0
- package/dist/wire/signal-byte-bounds.js +229 -0
- package/dist/wire/signal-byte-bounds.js.map +1 -0
- package/dist/wire/wire-uint53.d.ts +26 -0
- package/dist/wire/wire-uint53.d.ts.map +1 -0
- package/dist/wire/wire-uint53.js +32 -0
- package/dist/wire/wire-uint53.js.map +1 -0
- package/fixtures/behavior/messaging/adversarial-invariants.json +56 -5
- package/fixtures/manifest/invalid/duplicate-signal-type.json +33 -0
- package/fixtures/signals/invalid/destination-injection.json +15 -0
- package/fixtures/signals/invalid/dynamic-schema-url.json +10 -0
- package/fixtures/signals/invalid/forbidden-raw-privacy.json +10 -0
- package/fixtures/signals/invalid/non-utc-occurred-at.json +12 -0
- package/fixtures/signals/valid/feishu-meeting-artifact.json +18 -0
- package/fixtures/signals/valid/remote-service-declaration.json +10 -0
- package/package.json +13 -5
- package/src/schemas/manifest.schema.json +5 -2
- package/src/schemas/messaging.schema.json +1 -0
- package/src/schemas/physical-limb.schema.json +319 -0
- package/src/schemas/signal.schema.json +129 -0
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Wire protocol module barrel export.
|
|
3
|
+
*
|
|
4
|
+
* Re-exports all wire-protocol types, constants, validators, and registry
|
|
5
|
+
* entries mechanized from the #1165 frozen shape (rev11).
|
|
6
|
+
*
|
|
7
|
+
* This module defines nothing new — it is a pure re-export surface.
|
|
8
|
+
*/
|
|
9
|
+
// Framing constants
|
|
10
|
+
export { MAX_FRAME_BYTES, WIRE_VERSION, CONTRACT_VERSION, JSONRPC_VERSION, MAX_ELEMENT_PAYLOAD_BYTES, MAX_TOTAL_PAYLOAD_BYTES, MAX_ELEMENTS_PER_OPERATION, MAX_ELEMENTS_PER_MESSAGE, MAX_WHISPER_TARGETS, } from './constants.js';
|
|
11
|
+
export { REQUEST_ID_PATTERN, REQUEST_ID_MIN_LENGTH, REQUEST_ID_MAX_LENGTH, REQUEST_ID_MIN_ENCODED_BYTES, REQUEST_ID_MAX_ENCODED_BYTES, validateRequestId, isRequestIdShaped, } from './request-id.js';
|
|
12
|
+
// WireUInt53 — numeric profile
|
|
13
|
+
export { WIRE_UINT53_MAX, WIRE_UINT53_RAW_PATTERN, WIRE_UINT53_MAX_RAW_LENGTH, isWireUInt53, isCanonicalUInt53Token, } from './wire-uint53.js';
|
|
14
|
+
// Error codes, messages, reason taxonomies, and error variant types
|
|
15
|
+
export {
|
|
16
|
+
// Application error codes
|
|
17
|
+
HANDSHAKE_REJECTED_CODE, DELIVERY_REJECTED_CODE, DOMAIN_ERROR_CODE, DEADLINE_EXPIRED_CODE, SNAPSHOT_UNAVAILABLE_CODE,
|
|
18
|
+
// Application error messages
|
|
19
|
+
HANDSHAKE_REJECTED_MESSAGE, DELIVERY_REJECTED_MESSAGE, DOMAIN_ERROR_MESSAGE, DEADLINE_EXPIRED_MESSAGE, SNAPSHOT_UNAVAILABLE_MESSAGE,
|
|
20
|
+
// Standard error codes
|
|
21
|
+
PARSE_ERROR_CODE, INVALID_REQUEST_CODE, METHOD_NOT_FOUND_CODE, INVALID_PARAMS_CODE, INTERNAL_ERROR_CODE,
|
|
22
|
+
// Standard error messages
|
|
23
|
+
PARSE_ERROR_MESSAGE, INVALID_REQUEST_MESSAGE, METHOD_NOT_FOUND_MESSAGE, INVALID_PARAMS_MESSAGE, INTERNAL_ERROR_MESSAGE,
|
|
24
|
+
// Code-to-message mapping
|
|
25
|
+
ERROR_CODE_TO_MESSAGE,
|
|
26
|
+
// Reject-reason taxonomies
|
|
27
|
+
HANDSHAKE_REJECT_REASONS, DELIVERY_REJECT_REASONS, SNAPSHOT_UNAVAILABLE_REASONS,
|
|
28
|
+
// Collected code arrays
|
|
29
|
+
APPLICATION_ERROR_CODES, STANDARD_ERROR_CODES, ALL_ERROR_CODES, } from './errors.js';
|
|
30
|
+
// Pre-dispatch disposition table
|
|
31
|
+
export { DISPOSITION_CLASSES, DISPOSITION_TABLE, CLOSE_CLASSES, RESPOND_CLASSES, ACCEPT_CLASSES, } from './disposition.js';
|
|
32
|
+
// Machine-readable disposition/conformance vectors
|
|
33
|
+
export { DISPOSITION_FIXTURE_VECTORS, BETA8_HANDSHAKE_VECTOR_IDS, BETA9_EVENTS_PUBLISH_VECTOR_IDS, BETA10_LIFECYCLE_VECTOR_IDS, CLOSED_ERROR_ARM_NAMES, RESPONSE_CANDIDATE_CASES, NOTIFICATION_PARTITION_CASES, } from './disposition-fixtures.js';
|
|
34
|
+
// Handshake types + validators
|
|
35
|
+
export { PACKAGE_DIGEST_LENGTH, PACKAGE_DIGEST_PATTERN, PACKAGE_DIGEST_ENCODED_BYTES, PLUGIN_ID_MIN_LENGTH, PLUGIN_ID_MAX_LENGTH, PLUGIN_ID_MAX_ENCODED_BYTES, HANDSHAKE_VERSION_MAX_LENGTH, HANDSHAKE_VERSION_MAX_ENCODED_BYTES, HANDSHAKE_SEMVER_PATTERN, HOST_IDENTIFIER_MIN_LENGTH, HOST_IDENTIFIER_MAX_LENGTH, HOST_IDENTIFIER_MAX_ENCODED_BYTES, BINDING_NONCE_MIN_LENGTH, BINDING_NONCE_MAX_LENGTH, BINDING_NONCE_MAX_ENCODED_BYTES, validatePackageDigest, validatePluginId, validateContractVersion, validateWireVersion, validatePluginInstanceId, validateBrokerSessionId, validateBindingNonce, hasHandshakeAuthorityInjection, validateCandidateHello, validateSessionBinding, validateBrokerReadyParams, } from './handshake.js';
|
|
36
|
+
// Derived beta.8 handshake byte-bound evidence
|
|
37
|
+
export { HANDSHAKE_BYTE_PROOF_ENCODING_FAMILIES, BROKER_HELLO_REQUEST_BYTE_PROOF, BROKER_HELLO_RESULT_BYTE_PROOF, BROKER_READY_REQUEST_BYTE_PROOF, HANDSHAKE_REJECTED_ERROR_BYTE_PROOF, BROKER_HELLO_MAX_ENCODED_REQUEST_BYTES, BROKER_HELLO_MAX_ENCODED_RESULT_BYTES, BROKER_HELLO_MAX_ENCODED_ERROR_BYTES, BROKER_READY_MAX_ENCODED_REQUEST_BYTES, BROKER_READY_MAX_ENCODED_RESULT_BYTES, BROKER_READY_MAX_ENCODED_ERROR_BYTES, HANDSHAKE_ROW_ENCODED_BYTE_BOUNDS, } from './handshake-byte-bounds.js';
|
|
38
|
+
// Derived beta.9 C-2 signal-publish byte-bound evidence
|
|
39
|
+
export { EVENTS_PUBLISH_BYTE_PROOF_ENCODING_FAMILIES, SIGNAL_TYPE_MAX_LENGTH, SIGNAL_EVENT_ID_MAX_LENGTH, SIGNAL_IDEMPOTENCY_KEY_MAX_LENGTH, SIGNAL_OCCURRED_AT_MAX_LENGTH, SIGNAL_SOURCE_HANDLE_MAX_LENGTH, EVENTS_PUBLISH_REQUEST_BYTE_PROOF, EVENTS_PUBLISH_RESULT_BYTE_PROOF, EVENTS_PUBLISH_ERROR_BYTE_PROOF, EVENTS_PUBLISH_ROW_ENCODED_BYTE_BOUNDS, } from './signal-byte-bounds.js';
|
|
40
|
+
// Derived beta.10 M0-B lifecycle byte-bound evidence
|
|
41
|
+
export { LIFECYCLE_BYTE_PROOF_ENCODING_FAMILIES, HOST_GRANTS_CHANGED_NOTIFICATION_BYTE_PROOF, HOST_LIFECYCLE_PING_REQUEST_BYTE_PROOF, HOST_LIFECYCLE_PING_RESULT_BYTE_PROOF, HOST_LIFECYCLE_PING_ERROR_BYTE_PROOF, HOST_LIFECYCLE_DRAIN_REQUEST_BYTE_PROOF, HOST_LIFECYCLE_DRAIN_RESULT_BYTE_PROOF, HOST_LIFECYCLE_DRAIN_ERROR_BYTE_PROOF, LIFECYCLE_ROW_ENCODED_BYTE_BOUNDS, } from './lifecycle-byte-bounds.js';
|
|
42
|
+
// Grant snapshot
|
|
43
|
+
export { MAX_GRANT_ITEMS, validateEffectiveGrants, VALID_CAPABILITIES, } from './grants.js';
|
|
44
|
+
// 13-row method registry (frozen original 12 + C-2 publish)
|
|
45
|
+
export { WIRE_METHOD_NAMES, WIRE_METHOD_REGISTRY, WIRE_METHOD_COUNT, PLUGIN_TO_HOST_METHODS, HOST_TO_PLUGIN_METHODS, NOTIFICATION_METHODS, CLOSED_LEAF_ROWS, RESERVED_LEAF_ROWS, READY_ROWS, getRegistryRow, isWireMethod, getMethodGrant, } from './registry.js';
|
|
46
|
+
export {
|
|
47
|
+
// Row 5 bounds
|
|
48
|
+
SUBSCRIBE_HANDLE_MIN_LENGTH, SUBSCRIBE_HANDLE_MAX_LENGTH, SUBSCRIBE_HANDLE_MAX_ENCODED_BYTES, SUBSCRIBE_SUBSCRIPTION_ID_MIN_LENGTH, SUBSCRIBE_SUBSCRIPTION_ID_MAX_LENGTH, SUBSCRIBE_SUBSCRIPTION_ID_MAX_ENCODED_BYTES,
|
|
49
|
+
// Row 7 bounds
|
|
50
|
+
ACK_SUBSCRIPTION_ID_MIN_LENGTH, ACK_SUBSCRIPTION_ID_MAX_LENGTH, ACK_SUBSCRIPTION_ID_MAX_ENCODED_BYTES, ACK_TOKEN_MIN_LENGTH, ACK_TOKEN_MAX_LENGTH, ACK_TOKEN_MAX_ENCODED_BYTES,
|
|
51
|
+
// Row 11 bounds
|
|
52
|
+
PING_NONCE_MIN_LENGTH, PING_NONCE_MAX_LENGTH, PING_NONCE_MAX_ENCODED_BYTES, } from './row-shapes.js';
|
|
53
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/wire/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,oBAAoB;AACpB,OAAO,EACL,eAAe,EACf,YAAY,EACZ,gBAAgB,EAChB,eAAe,EACf,yBAAyB,EACzB,uBAAuB,EACvB,0BAA0B,EAC1B,wBAAwB,EACxB,mBAAmB,GACpB,MAAM,gBAAgB,CAAC;AAIxB,OAAO,EACL,kBAAkB,EAClB,qBAAqB,EACrB,qBAAqB,EACrB,4BAA4B,EAC5B,4BAA4B,EAC5B,iBAAiB,EACjB,iBAAiB,GAClB,MAAM,iBAAiB,CAAC;AAEzB,+BAA+B;AAC/B,OAAO,EACL,eAAe,EACf,uBAAuB,EACvB,0BAA0B,EAC1B,YAAY,EACZ,sBAAsB,GACvB,MAAM,kBAAkB,CAAC;AAE1B,oEAAoE;AACpE,OAAO;AACL,0BAA0B;AAC1B,uBAAuB,EACvB,sBAAsB,EACtB,iBAAiB,EACjB,qBAAqB,EACrB,yBAAyB;AACzB,6BAA6B;AAC7B,0BAA0B,EAC1B,yBAAyB,EACzB,oBAAoB,EACpB,wBAAwB,EACxB,4BAA4B;AAC5B,uBAAuB;AACvB,gBAAgB,EAChB,oBAAoB,EACpB,qBAAqB,EACrB,mBAAmB,EACnB,mBAAmB;AACnB,0BAA0B;AAC1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,sBAAsB,EACtB,0BAA0B,EAC1B,iCAAiC,EACjC,6BAA6B,EAC7B,+BAA+B,EAC/B,iCAAiC,EACjC,gCAAgC,EAChC,+BAA+B,EAC/B,sCAAsC,GACvC,MAAM,yBAAyB,CAAC;AAEjC,qDAAqD;AACrD,OAAO,EACL,sCAAsC,EACtC,2CAA2C,EAC3C,sCAAsC,EACtC,qCAAqC,EACrC,oCAAoC,EACpC,uCAAuC,EACvC,sCAAsC,EACtC,qCAAqC,EACrC,iCAAiC,GAClC,MAAM,4BAA4B,CAAC;AA2BpC,iBAAiB;AACjB,OAAO,EACL,eAAe,EACf,uBAAuB,EACvB,kBAAkB,GACnB,MAAM,aAAa,CAAC;AAkCrB,4DAA4D;AAC5D,OAAO,EACL,iBAAiB,EACjB,oBAAoB,EACpB,iBAAiB,EACjB,sBAAsB,EACtB,sBAAsB,EACtB,oBAAoB,EACpB,gBAAgB,EAChB,kBAAkB,EAClB,UAAU,EACV,cAAc,EACd,YAAY,EACZ,cAAc,GACf,MAAM,eAAe,CAAC;AA+CvB,OAAO;AACL,eAAe;AACf,2BAA2B,EAC3B,2BAA2B,EAC3B,kCAAkC,EAClC,oCAAoC,EACpC,oCAAoC,EACpC,2CAA2C;AAC3C,eAAe;AACf,8BAA8B,EAC9B,8BAA8B,EAC9B,qCAAqC,EACrC,oBAAoB,EACpB,oBAAoB,EACpB,2BAA2B;AAC3B,gBAAgB;AAChB,qBAAqB,EACrB,qBAAqB,EACrB,4BAA4B,GAC7B,MAAM,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Derived compact-JSON byte bounds for the beta.10 M0-B lifecycle rows.
|
|
3
|
+
*
|
|
4
|
+
* This production module constructs maximum legal frames directly from the
|
|
5
|
+
* closed public grammar. The generic byte-proof kernel remains test-only;
|
|
6
|
+
* tests independently recompute these maxima to prevent registry drift.
|
|
7
|
+
*/
|
|
8
|
+
export declare const LIFECYCLE_BYTE_PROOF_ENCODING_FAMILIES: readonly ["ascii", "multibyte", "escaping"];
|
|
9
|
+
export type LifecycleByteProofEncodingFamily = (typeof LIFECYCLE_BYTE_PROOF_ENCODING_FAMILIES)[number];
|
|
10
|
+
export interface LifecycleNPlusOneByteProof {
|
|
11
|
+
readonly leaf: string;
|
|
12
|
+
readonly encodedBytes: number;
|
|
13
|
+
readonly fitsFrame: boolean;
|
|
14
|
+
}
|
|
15
|
+
export interface LifecycleEncodedByteProofCase {
|
|
16
|
+
readonly family: LifecycleByteProofEncodingFamily;
|
|
17
|
+
readonly encodedBytes: number;
|
|
18
|
+
readonly fitsFrame: boolean;
|
|
19
|
+
readonly nPlusOne: readonly LifecycleNPlusOneByteProof[];
|
|
20
|
+
}
|
|
21
|
+
export interface LifecycleEncodedByteProof {
|
|
22
|
+
readonly maxEncodedBytes: number;
|
|
23
|
+
readonly cases: readonly LifecycleEncodedByteProofCase[];
|
|
24
|
+
}
|
|
25
|
+
export interface LifecycleRequestRowEncodedByteBounds {
|
|
26
|
+
readonly maxEncodedRequestBytes: number;
|
|
27
|
+
readonly maxEncodedResultBytes: number;
|
|
28
|
+
readonly maxEncodedErrorBytes: number;
|
|
29
|
+
}
|
|
30
|
+
export interface LifecycleNotificationRowEncodedByteBounds {
|
|
31
|
+
readonly maxEncodedRequestBytes: number;
|
|
32
|
+
}
|
|
33
|
+
export declare const HOST_GRANTS_CHANGED_NOTIFICATION_BYTE_PROOF: LifecycleEncodedByteProof;
|
|
34
|
+
export declare const HOST_LIFECYCLE_PING_REQUEST_BYTE_PROOF: LifecycleEncodedByteProof;
|
|
35
|
+
export declare const HOST_LIFECYCLE_PING_RESULT_BYTE_PROOF: LifecycleEncodedByteProof;
|
|
36
|
+
export declare const HOST_LIFECYCLE_DRAIN_REQUEST_BYTE_PROOF: LifecycleEncodedByteProof;
|
|
37
|
+
export declare const HOST_LIFECYCLE_DRAIN_RESULT_BYTE_PROOF: LifecycleEncodedByteProof;
|
|
38
|
+
export declare const HOST_LIFECYCLE_PING_ERROR_BYTE_PROOF: LifecycleEncodedByteProof;
|
|
39
|
+
export declare const HOST_LIFECYCLE_DRAIN_ERROR_BYTE_PROOF: LifecycleEncodedByteProof;
|
|
40
|
+
export declare const LIFECYCLE_ROW_ENCODED_BYTE_BOUNDS: {
|
|
41
|
+
readonly 'host.grants.changed': {
|
|
42
|
+
readonly maxEncodedRequestBytes: number;
|
|
43
|
+
};
|
|
44
|
+
readonly 'host.lifecycle.ping': {
|
|
45
|
+
readonly maxEncodedRequestBytes: number;
|
|
46
|
+
readonly maxEncodedResultBytes: number;
|
|
47
|
+
readonly maxEncodedErrorBytes: number;
|
|
48
|
+
};
|
|
49
|
+
readonly 'host.lifecycle.drain': {
|
|
50
|
+
readonly maxEncodedRequestBytes: number;
|
|
51
|
+
readonly maxEncodedResultBytes: number;
|
|
52
|
+
readonly maxEncodedErrorBytes: number;
|
|
53
|
+
};
|
|
54
|
+
};
|
|
55
|
+
//# sourceMappingURL=lifecycle-byte-bounds.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lifecycle-byte-bounds.d.ts","sourceRoot":"","sources":["../../src/wire/lifecycle-byte-bounds.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAgBH,eAAO,MAAM,sCAAsC,6CAIzC,CAAC;AAEX,MAAM,MAAM,gCAAgC,GAC1C,CAAC,OAAO,sCAAsC,CAAC,CAAC,MAAM,CAAC,CAAC;AAE1D,MAAM,WAAW,0BAA0B;IACzC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAC;CAC7B;AAED,MAAM,WAAW,6BAA6B;IAC5C,QAAQ,CAAC,MAAM,EAAE,gCAAgC,CAAC;IAClD,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAC;IAC5B,QAAQ,CAAC,QAAQ,EAAE,SAAS,0BAA0B,EAAE,CAAC;CAC1D;AAED,MAAM,WAAW,yBAAyB;IACxC,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC;IACjC,QAAQ,CAAC,KAAK,EAAE,SAAS,6BAA6B,EAAE,CAAC;CAC1D;AAED,MAAM,WAAW,oCAAoC;IACnD,QAAQ,CAAC,sBAAsB,EAAE,MAAM,CAAC;IACxC,QAAQ,CAAC,qBAAqB,EAAE,MAAM,CAAC;IACvC,QAAQ,CAAC,oBAAoB,EAAE,MAAM,CAAC;CACvC;AAED,MAAM,WAAW,yCAAyC;IACxD,QAAQ,CAAC,sBAAsB,EAAE,MAAM,CAAC;CACzC;AA8ED,eAAO,MAAM,2CAA2C,2BAMvD,CAAC;AA8BF,eAAO,MAAM,sCAAsC,2BAYlD,CAAC;AAEF,eAAO,MAAM,qCAAqC,2BAYjD,CAAC;AAqBF,eAAO,MAAM,uCAAuC,2BAYnD,CAAC;AAEF,eAAO,MAAM,sCAAsC,2BAMlD,CAAC;AA6DF,eAAO,MAAM,oCAAoC,2BAEhD,CAAC;AAEF,eAAO,MAAM,qCAAqC,2BAGhD,CAAC;AAEH,eAAO,MAAM,iCAAiC;;;;;;;;;;;;;;CAkB7C,CAAC"}
|
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Derived compact-JSON byte bounds for the beta.10 M0-B lifecycle rows.
|
|
3
|
+
*
|
|
4
|
+
* This production module constructs maximum legal frames directly from the
|
|
5
|
+
* closed public grammar. The generic byte-proof kernel remains test-only;
|
|
6
|
+
* tests independently recompute these maxima to prevent registry drift.
|
|
7
|
+
*/
|
|
8
|
+
import { MAX_FRAME_BYTES } from './constants.js';
|
|
9
|
+
import { DEADLINE_EXPIRED_CODE, DEADLINE_EXPIRED_MESSAGE, ERROR_CODE_TO_MESSAGE, INVALID_REQUEST_CODE, PARSE_ERROR_CODE, STANDARD_ERROR_CODES, } from './errors.js';
|
|
10
|
+
import { MAX_GRANT_ITEMS, VALID_CAPABILITIES } from './grants.js';
|
|
11
|
+
import { REQUEST_ID_MAX_LENGTH } from './request-id.js';
|
|
12
|
+
import { PING_NONCE_MAX_LENGTH } from './row-shapes.js';
|
|
13
|
+
import { WIRE_UINT53_MAX } from './wire-uint53.js';
|
|
14
|
+
export const LIFECYCLE_BYTE_PROOF_ENCODING_FAMILIES = [
|
|
15
|
+
'ascii',
|
|
16
|
+
'multibyte',
|
|
17
|
+
'escaping',
|
|
18
|
+
];
|
|
19
|
+
const MAX_REQUEST_ID = 'a'.repeat(REQUEST_ID_MAX_LENGTH);
|
|
20
|
+
const ALL_CAPABILITY_VALUES = [...VALID_CAPABILITIES];
|
|
21
|
+
function byteLength(value) {
|
|
22
|
+
return Buffer.byteLength(JSON.stringify(value), 'utf8');
|
|
23
|
+
}
|
|
24
|
+
function familyCharacter(family) {
|
|
25
|
+
switch (family) {
|
|
26
|
+
case 'ascii':
|
|
27
|
+
return 'a';
|
|
28
|
+
case 'multibyte':
|
|
29
|
+
return '😀';
|
|
30
|
+
case 'escaping':
|
|
31
|
+
return '\u0000';
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
function proof(maximumFrame, nPlusOneFrames) {
|
|
35
|
+
const cases = LIFECYCLE_BYTE_PROOF_ENCODING_FAMILIES.map((family) => {
|
|
36
|
+
const encodedBytes = byteLength(maximumFrame(family));
|
|
37
|
+
return {
|
|
38
|
+
family,
|
|
39
|
+
encodedBytes,
|
|
40
|
+
fitsFrame: encodedBytes <= MAX_FRAME_BYTES,
|
|
41
|
+
nPlusOne: nPlusOneFrames(family).map(({ leaf, frame }) => {
|
|
42
|
+
const witnessBytes = byteLength(frame);
|
|
43
|
+
return {
|
|
44
|
+
leaf,
|
|
45
|
+
encodedBytes: witnessBytes,
|
|
46
|
+
fitsFrame: witnessBytes <= MAX_FRAME_BYTES,
|
|
47
|
+
};
|
|
48
|
+
}),
|
|
49
|
+
};
|
|
50
|
+
});
|
|
51
|
+
return {
|
|
52
|
+
maxEncodedBytes: Math.max(...cases.map(proofCase => proofCase.encodedBytes)),
|
|
53
|
+
cases,
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
function repeatedProof(maximumFrame, nPlusOneFrames) {
|
|
57
|
+
return proof(() => maximumFrame, () => nPlusOneFrames);
|
|
58
|
+
}
|
|
59
|
+
function grantsChangedFrame(effectiveGrants) {
|
|
60
|
+
return {
|
|
61
|
+
jsonrpc: '2.0',
|
|
62
|
+
method: 'host.grants.changed',
|
|
63
|
+
params: {
|
|
64
|
+
meta: { deadlineUnixMs: WIRE_UINT53_MAX },
|
|
65
|
+
input: {
|
|
66
|
+
grantRevision: WIRE_UINT53_MAX,
|
|
67
|
+
effectiveGrants,
|
|
68
|
+
},
|
|
69
|
+
},
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
const longestCapability = ALL_CAPABILITY_VALUES.reduce((longest, capability) => capability.length > longest.length ? capability : longest);
|
|
73
|
+
if (ALL_CAPABILITY_VALUES.length !== MAX_GRANT_ITEMS) {
|
|
74
|
+
throw new Error('capability cardinality must equal MAX_GRANT_ITEMS for lifecycle proof');
|
|
75
|
+
}
|
|
76
|
+
export const HOST_GRANTS_CHANGED_NOTIFICATION_BYTE_PROOF = repeatedProof(grantsChangedFrame(ALL_CAPABILITY_VALUES), [{
|
|
77
|
+
leaf: 'effectiveGrants',
|
|
78
|
+
frame: grantsChangedFrame([...ALL_CAPABILITY_VALUES, longestCapability]),
|
|
79
|
+
}]);
|
|
80
|
+
function pingRequestFrame(family, requestId = MAX_REQUEST_ID, nonceLength = PING_NONCE_MAX_LENGTH) {
|
|
81
|
+
return {
|
|
82
|
+
jsonrpc: '2.0',
|
|
83
|
+
id: requestId,
|
|
84
|
+
method: 'host.lifecycle.ping',
|
|
85
|
+
params: {
|
|
86
|
+
meta: { deadlineUnixMs: WIRE_UINT53_MAX },
|
|
87
|
+
input: { nonce: familyCharacter(family).repeat(nonceLength) },
|
|
88
|
+
},
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
function pingResultFrame(family, requestId = MAX_REQUEST_ID, nonceLength = PING_NONCE_MAX_LENGTH) {
|
|
92
|
+
return {
|
|
93
|
+
jsonrpc: '2.0',
|
|
94
|
+
id: requestId,
|
|
95
|
+
result: { nonce: familyCharacter(family).repeat(nonceLength) },
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
export const HOST_LIFECYCLE_PING_REQUEST_BYTE_PROOF = proof(family => pingRequestFrame(family), family => [
|
|
99
|
+
{
|
|
100
|
+
leaf: 'requestId',
|
|
101
|
+
frame: pingRequestFrame(family, 'a'.repeat(REQUEST_ID_MAX_LENGTH + 1)),
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
leaf: 'nonce',
|
|
105
|
+
frame: pingRequestFrame(family, MAX_REQUEST_ID, PING_NONCE_MAX_LENGTH + 1),
|
|
106
|
+
},
|
|
107
|
+
]);
|
|
108
|
+
export const HOST_LIFECYCLE_PING_RESULT_BYTE_PROOF = proof(family => pingResultFrame(family), family => [
|
|
109
|
+
{
|
|
110
|
+
leaf: 'requestId',
|
|
111
|
+
frame: pingResultFrame(family, 'a'.repeat(REQUEST_ID_MAX_LENGTH + 1)),
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
leaf: 'nonce',
|
|
115
|
+
frame: pingResultFrame(family, MAX_REQUEST_ID, PING_NONCE_MAX_LENGTH + 1),
|
|
116
|
+
},
|
|
117
|
+
]);
|
|
118
|
+
function drainRequestFrame(requestId = MAX_REQUEST_ID, deadlineUnixMs = WIRE_UINT53_MAX) {
|
|
119
|
+
return {
|
|
120
|
+
jsonrpc: '2.0',
|
|
121
|
+
id: requestId,
|
|
122
|
+
method: 'host.lifecycle.drain',
|
|
123
|
+
params: {
|
|
124
|
+
meta: { deadlineUnixMs: WIRE_UINT53_MAX },
|
|
125
|
+
input: { deadlineUnixMs },
|
|
126
|
+
},
|
|
127
|
+
};
|
|
128
|
+
}
|
|
129
|
+
function drainResultFrame(requestId = MAX_REQUEST_ID) {
|
|
130
|
+
return { jsonrpc: '2.0', id: requestId, result: null };
|
|
131
|
+
}
|
|
132
|
+
export const HOST_LIFECYCLE_DRAIN_REQUEST_BYTE_PROOF = repeatedProof(drainRequestFrame(), [
|
|
133
|
+
{
|
|
134
|
+
leaf: 'requestId',
|
|
135
|
+
frame: drainRequestFrame('a'.repeat(REQUEST_ID_MAX_LENGTH + 1)),
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
leaf: 'deadlineUnixMs',
|
|
139
|
+
frame: drainRequestFrame(MAX_REQUEST_ID, WIRE_UINT53_MAX + 1),
|
|
140
|
+
},
|
|
141
|
+
]);
|
|
142
|
+
export const HOST_LIFECYCLE_DRAIN_RESULT_BYTE_PROOF = repeatedProof(drainResultFrame(), [{
|
|
143
|
+
leaf: 'requestId',
|
|
144
|
+
frame: drainResultFrame('a'.repeat(REQUEST_ID_MAX_LENGTH + 1)),
|
|
145
|
+
}]);
|
|
146
|
+
function standardErrorEnvelopes() {
|
|
147
|
+
return STANDARD_ERROR_CODES.flatMap((code) => {
|
|
148
|
+
const error = { code, message: ERROR_CODE_TO_MESSAGE[code] };
|
|
149
|
+
const arm = `standard:${code}`;
|
|
150
|
+
if (code === PARSE_ERROR_CODE)
|
|
151
|
+
return [{ arm, id: null, error }];
|
|
152
|
+
if (code === INVALID_REQUEST_CODE) {
|
|
153
|
+
return [
|
|
154
|
+
{ arm: `${arm}:null`, id: null, error },
|
|
155
|
+
{ arm, id: MAX_REQUEST_ID, error },
|
|
156
|
+
];
|
|
157
|
+
}
|
|
158
|
+
return [{ arm, id: MAX_REQUEST_ID, error }];
|
|
159
|
+
});
|
|
160
|
+
}
|
|
161
|
+
function deadlineExpiredEnvelope(requestId = MAX_REQUEST_ID) {
|
|
162
|
+
return {
|
|
163
|
+
arm: 'application:DEADLINE_EXPIRED',
|
|
164
|
+
id: requestId,
|
|
165
|
+
error: {
|
|
166
|
+
code: DEADLINE_EXPIRED_CODE,
|
|
167
|
+
message: DEADLINE_EXPIRED_MESSAGE,
|
|
168
|
+
data: {},
|
|
169
|
+
},
|
|
170
|
+
};
|
|
171
|
+
}
|
|
172
|
+
function errorProof(envelopes) {
|
|
173
|
+
const maximumEnvelope = envelopes.reduce((maximum, envelope) => byteLength({ jsonrpc: '2.0', id: envelope.id, error: envelope.error }) >
|
|
174
|
+
byteLength({ jsonrpc: '2.0', id: maximum.id, error: maximum.error })
|
|
175
|
+
? envelope
|
|
176
|
+
: maximum);
|
|
177
|
+
const witnesses = envelopes
|
|
178
|
+
.filter((envelope) => envelope.id !== null)
|
|
179
|
+
.map(envelope => ({
|
|
180
|
+
leaf: `${envelope.arm}.requestId`,
|
|
181
|
+
frame: {
|
|
182
|
+
jsonrpc: '2.0',
|
|
183
|
+
id: 'a'.repeat(REQUEST_ID_MAX_LENGTH + 1),
|
|
184
|
+
error: envelope.error,
|
|
185
|
+
},
|
|
186
|
+
}));
|
|
187
|
+
return repeatedProof({ jsonrpc: '2.0', id: maximumEnvelope.id, error: maximumEnvelope.error }, witnesses);
|
|
188
|
+
}
|
|
189
|
+
export const HOST_LIFECYCLE_PING_ERROR_BYTE_PROOF = errorProof(standardErrorEnvelopes());
|
|
190
|
+
export const HOST_LIFECYCLE_DRAIN_ERROR_BYTE_PROOF = errorProof([
|
|
191
|
+
...standardErrorEnvelopes(),
|
|
192
|
+
deadlineExpiredEnvelope(),
|
|
193
|
+
]);
|
|
194
|
+
export const LIFECYCLE_ROW_ENCODED_BYTE_BOUNDS = {
|
|
195
|
+
'host.grants.changed': {
|
|
196
|
+
maxEncodedRequestBytes: HOST_GRANTS_CHANGED_NOTIFICATION_BYTE_PROOF.maxEncodedBytes,
|
|
197
|
+
},
|
|
198
|
+
'host.lifecycle.ping': {
|
|
199
|
+
maxEncodedRequestBytes: HOST_LIFECYCLE_PING_REQUEST_BYTE_PROOF.maxEncodedBytes,
|
|
200
|
+
maxEncodedResultBytes: HOST_LIFECYCLE_PING_RESULT_BYTE_PROOF.maxEncodedBytes,
|
|
201
|
+
maxEncodedErrorBytes: HOST_LIFECYCLE_PING_ERROR_BYTE_PROOF.maxEncodedBytes,
|
|
202
|
+
},
|
|
203
|
+
'host.lifecycle.drain': {
|
|
204
|
+
maxEncodedRequestBytes: HOST_LIFECYCLE_DRAIN_REQUEST_BYTE_PROOF.maxEncodedBytes,
|
|
205
|
+
maxEncodedResultBytes: HOST_LIFECYCLE_DRAIN_RESULT_BYTE_PROOF.maxEncodedBytes,
|
|
206
|
+
maxEncodedErrorBytes: HOST_LIFECYCLE_DRAIN_ERROR_BYTE_PROOF.maxEncodedBytes,
|
|
207
|
+
},
|
|
208
|
+
};
|
|
209
|
+
//# sourceMappingURL=lifecycle-byte-bounds.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lifecycle-byte-bounds.js","sourceRoot":"","sources":["../../src/wire/lifecycle-byte-bounds.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,EACL,qBAAqB,EACrB,wBAAwB,EACxB,qBAAqB,EACrB,oBAAoB,EACpB,gBAAgB,EAChB,oBAAoB,GACrB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,eAAe,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAClE,OAAO,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AACxD,OAAO,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AACxD,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAEnD,MAAM,CAAC,MAAM,sCAAsC,GAAG;IACpD,OAAO;IACP,WAAW;IACX,UAAU;CACF,CAAC;AAiCX,MAAM,cAAc,GAAG,GAAG,CAAC,MAAM,CAAC,qBAAqB,CAAC,CAAC;AACzD,MAAM,qBAAqB,GAAG,CAAC,GAAG,kBAAkB,CAAC,CAAC;AAEtD,SAAS,U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AAE,KAAK,EAAE,EAAE,EAAE,eAAe,CAAC,EAAE,EAAE,KAAK,EAAE,eAAe,CAAC,KAAK,EAAE,EACxE,SAAS,CACV,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,oCAAoC,GAAG,UAAU,CAC5D,sBAAsB,EAAE,CACzB,CAAC;AAEF,MAAM,CAAC,MAAM,qCAAqC,GAAG,UAAU,CAAC;IAC9D,GAAG,sBAAsB,EAAE;IAC3B,uBAAuB,EAAE;CAC1B,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,iCAAiC,GAAG;IAC/C,qBAAqB,EAAE;QACrB,sBAAsB,EAAE,2CAA2C,CAAC,eAAe;KACpF;IACD,qBAAqB,EAAE;QACrB,sBAAsB,EAAE,sCAAsC,CAAC,eAAe;QAC9E,qBAAqB,EAAE,qCAAqC,CAAC,eAAe;QAC5E,oBAAoB,EAAE,oCAAoC,CAAC,eAAe;KAC3E;IACD,sBAAsB,EAAE;QACtB,sBAAsB,EAAE,uCAAuC,CAAC,eAAe;QAC/E,qBAAqB,EAAE,sCAAsC,CAAC,eAAe;QAC7E,oBAAoB,EAAE,qCAAqC,CAAC,eAAe;KAC5E;CAKF,CAAC"}
|
|
@@ -0,0 +1,283 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 13-row production method registry: the frozen original 12 plus C-2 row 13.
|
|
3
|
+
* Mechanized verbatim from the #1165 frozen shape (rev11).
|
|
4
|
+
*
|
|
5
|
+
* Every row carries machine-readable metadata:
|
|
6
|
+
* - method name, direction, grant requirement
|
|
7
|
+
* - notification flag (only row 10)
|
|
8
|
+
* - ready status (rows 1–2 in beta.8, row 13 in beta.9, rows 10–12 in beta.10)
|
|
9
|
+
* - leaf closure status and which matrix entries cause reservation
|
|
10
|
+
* - settlement key source
|
|
11
|
+
*
|
|
12
|
+
* A row may be marked `ready` only when its matrix entries all reach
|
|
13
|
+
* CLOSED + generated byte proofs + N/N+1 conformance pass.
|
|
14
|
+
* This module defines nothing new.
|
|
15
|
+
*
|
|
16
|
+
* ## Reserved matrix entry in-flight coordinates
|
|
17
|
+
*
|
|
18
|
+
* M7 — future-write admission half in review at clowder-ai#1185
|
|
19
|
+
* (exact 05ad80c6, gate PASS, Fable APPROVE current HEAD);
|
|
20
|
+
* stored-data attestation/migration half outstanding.
|
|
21
|
+
* Affects rows 6, 8, 9. M7 remains RESERVED.
|
|
22
|
+
*/
|
|
23
|
+
import type { Capability } from '../generated/contract.generated.js';
|
|
24
|
+
/** Message direction on the wire. */
|
|
25
|
+
export type MethodDirection = 'plugin-to-host' | 'host-to-plugin';
|
|
26
|
+
/** Grant required to invoke a method, or protocol-intrinsic for handshake/lifecycle. */
|
|
27
|
+
export type GrantRequirement = Capability | 'protocol-intrinsic';
|
|
28
|
+
/** Leaf closure status from the variable-width leaf matrix. */
|
|
29
|
+
export type LeafClosureStatus = 'CLOSED' | 'RESERVED';
|
|
30
|
+
/** A schema field that must exist before or with a method's leaf closure. */
|
|
31
|
+
export interface SchemaClosurePrerequisite {
|
|
32
|
+
readonly schemaPath: string;
|
|
33
|
+
readonly timing: 'before-or-with-closure';
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* A single row of the production method registry.
|
|
37
|
+
* Most rows remain unpublished and unadvertised. beta.8 closes the two
|
|
38
|
+
* handshake rows; beta.9 appends the C-2 events.publish row.
|
|
39
|
+
*/
|
|
40
|
+
export interface RegistryRow {
|
|
41
|
+
readonly rowNumber: number;
|
|
42
|
+
readonly method: string;
|
|
43
|
+
readonly direction: MethodDirection;
|
|
44
|
+
readonly grant: GrantRequirement;
|
|
45
|
+
readonly isNotification: boolean;
|
|
46
|
+
readonly ready: boolean;
|
|
47
|
+
readonly leafClosure: LeafClosureStatus;
|
|
48
|
+
readonly reservedEntries: readonly string[];
|
|
49
|
+
readonly settlementKeySource: string;
|
|
50
|
+
/** Derived compact-frame maxima, present only for rows with closed wire shapes. */
|
|
51
|
+
readonly maxEncodedRequestBytes?: number;
|
|
52
|
+
readonly maxEncodedResultBytes?: number;
|
|
53
|
+
readonly maxEncodedErrorBytes?: number;
|
|
54
|
+
/** Schema fields required before this row may change from RESERVED to CLOSED. */
|
|
55
|
+
readonly schemaClosurePrerequisites?: readonly SchemaClosurePrerequisite[];
|
|
56
|
+
}
|
|
57
|
+
/** A registry row whose input is publicly ready for dispatch. */
|
|
58
|
+
export interface ReadyRegistryRow extends RegistryRow {
|
|
59
|
+
readonly ready: true;
|
|
60
|
+
}
|
|
61
|
+
/** A registry row that remains unready, whether its leaves are CLOSED or RESERVED. */
|
|
62
|
+
export interface UnreadyRegistryRow extends RegistryRow {
|
|
63
|
+
readonly ready: false;
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* The exact 13 production method names, in registry order.
|
|
67
|
+
* No production method exists for fixture setup/observe, grant presets,
|
|
68
|
+
* revocation, permission-matrix inspection, or replay deletion.
|
|
69
|
+
*/
|
|
70
|
+
export declare const WIRE_METHOD_NAMES: readonly ["broker.hello", "broker.ready", "messaging.send", "messaging.appendElements", "messaging.subscribe", "messaging.read", "messaging.ack", "messaging.snapshot", "host.messaging.deliver", "host.grants.changed", "host.lifecycle.ping", "host.lifecycle.drain", "events.publish"];
|
|
71
|
+
/** Union of all 13 production method names. */
|
|
72
|
+
export type WireMethodName = (typeof WIRE_METHOD_NAMES)[number];
|
|
73
|
+
/**
|
|
74
|
+
* Literal readiness partition. This prevents a registry edit from widening a
|
|
75
|
+
* newly closed row back to `boolean` or accidentally advertising another row.
|
|
76
|
+
*/
|
|
77
|
+
export type WireMethodRegistry = {
|
|
78
|
+
readonly [Method in WireMethodName]: Method extends 'broker.hello' | 'broker.ready' | 'host.grants.changed' | 'host.lifecycle.ping' | 'host.lifecycle.drain' | 'events.publish' ? ReadyRegistryRow : UnreadyRegistryRow;
|
|
79
|
+
};
|
|
80
|
+
/**
|
|
81
|
+
* Machine-readable registry of all 13 production methods.
|
|
82
|
+
*
|
|
83
|
+
* Every value traces to the #1165 frozen shape. Row metadata includes
|
|
84
|
+
* the exact matrix entry IDs that block leaf closure. Settlement key
|
|
85
|
+
* sources follow the canonical per-row specification.
|
|
86
|
+
*
|
|
87
|
+
* Rows 1–2 are ready after beta.8; row 13 after beta.9; rows 10–12
|
|
88
|
+
* after beta.10.
|
|
89
|
+
*/
|
|
90
|
+
export declare const WIRE_METHOD_REGISTRY: {
|
|
91
|
+
readonly 'broker.hello': {
|
|
92
|
+
readonly maxEncodedRequestBytes: number;
|
|
93
|
+
readonly maxEncodedResultBytes: number;
|
|
94
|
+
readonly maxEncodedErrorBytes: number;
|
|
95
|
+
readonly rowNumber: 1;
|
|
96
|
+
readonly method: "broker.hello";
|
|
97
|
+
readonly direction: "plugin-to-host";
|
|
98
|
+
readonly grant: "protocol-intrinsic";
|
|
99
|
+
readonly isNotification: false;
|
|
100
|
+
readonly ready: true;
|
|
101
|
+
readonly leafClosure: "CLOSED";
|
|
102
|
+
readonly reservedEntries: readonly [];
|
|
103
|
+
readonly settlementKeySource: "—";
|
|
104
|
+
};
|
|
105
|
+
readonly 'broker.ready': {
|
|
106
|
+
readonly maxEncodedRequestBytes: number;
|
|
107
|
+
readonly maxEncodedResultBytes: number;
|
|
108
|
+
readonly maxEncodedErrorBytes: number;
|
|
109
|
+
readonly rowNumber: 2;
|
|
110
|
+
readonly method: "broker.ready";
|
|
111
|
+
readonly direction: "plugin-to-host";
|
|
112
|
+
readonly grant: "protocol-intrinsic";
|
|
113
|
+
readonly isNotification: false;
|
|
114
|
+
readonly ready: true;
|
|
115
|
+
readonly leafClosure: "CLOSED";
|
|
116
|
+
readonly reservedEntries: readonly [];
|
|
117
|
+
readonly settlementKeySource: "—";
|
|
118
|
+
};
|
|
119
|
+
readonly 'messaging.send': {
|
|
120
|
+
readonly rowNumber: 3;
|
|
121
|
+
readonly method: "messaging.send";
|
|
122
|
+
readonly direction: "plugin-to-host";
|
|
123
|
+
readonly grant: "messaging.send";
|
|
124
|
+
readonly isNotification: false;
|
|
125
|
+
readonly ready: false;
|
|
126
|
+
readonly leafClosure: "RESERVED";
|
|
127
|
+
readonly reservedEntries: readonly ["M1", "M2", "M5", "I1"];
|
|
128
|
+
readonly settlementKeySource: "input.idempotencyKey";
|
|
129
|
+
readonly schemaClosurePrerequisites: readonly [{
|
|
130
|
+
readonly schemaPath: "SendReceipt.handle";
|
|
131
|
+
readonly timing: "before-or-with-closure";
|
|
132
|
+
}];
|
|
133
|
+
};
|
|
134
|
+
readonly 'messaging.appendElements': {
|
|
135
|
+
readonly rowNumber: 4;
|
|
136
|
+
readonly method: "messaging.appendElements";
|
|
137
|
+
readonly direction: "plugin-to-host";
|
|
138
|
+
readonly grant: "messaging.appendElements";
|
|
139
|
+
readonly isNotification: false;
|
|
140
|
+
readonly ready: false;
|
|
141
|
+
readonly leafClosure: "RESERVED";
|
|
142
|
+
readonly reservedEntries: readonly ["M1", "M2", "M5", "I1"];
|
|
143
|
+
readonly settlementKeySource: "(Host-resolved messageId from input.handle, input.operationId)";
|
|
144
|
+
};
|
|
145
|
+
readonly 'messaging.subscribe': {
|
|
146
|
+
readonly rowNumber: 5;
|
|
147
|
+
readonly method: "messaging.subscribe";
|
|
148
|
+
readonly direction: "plugin-to-host";
|
|
149
|
+
readonly grant: "message.event.subscribe";
|
|
150
|
+
readonly isNotification: false;
|
|
151
|
+
readonly ready: false;
|
|
152
|
+
readonly leafClosure: "CLOSED";
|
|
153
|
+
readonly reservedEntries: readonly [];
|
|
154
|
+
readonly settlementKeySource: "Host-resolved input.handle identity (K-1 create-or-get authoritative)";
|
|
155
|
+
};
|
|
156
|
+
readonly 'messaging.read': {
|
|
157
|
+
readonly rowNumber: 6;
|
|
158
|
+
readonly method: "messaging.read";
|
|
159
|
+
readonly direction: "plugin-to-host";
|
|
160
|
+
readonly grant: "message.event.subscribe";
|
|
161
|
+
readonly isNotification: false;
|
|
162
|
+
readonly ready: false;
|
|
163
|
+
readonly leafClosure: "RESERVED";
|
|
164
|
+
readonly reservedEntries: readonly ["M1", "M2", "M5", "M6", "M7", "I1"];
|
|
165
|
+
readonly settlementKeySource: "none (at-least-once; bounded page assembly)";
|
|
166
|
+
};
|
|
167
|
+
readonly 'messaging.ack': {
|
|
168
|
+
readonly rowNumber: 7;
|
|
169
|
+
readonly method: "messaging.ack";
|
|
170
|
+
readonly direction: "plugin-to-host";
|
|
171
|
+
readonly grant: "message.event.subscribe";
|
|
172
|
+
readonly isNotification: false;
|
|
173
|
+
readonly ready: false;
|
|
174
|
+
readonly leafClosure: "CLOSED";
|
|
175
|
+
readonly reservedEntries: readonly [];
|
|
176
|
+
readonly settlementKeySource: "(input.subscriptionId, input.ackToken)";
|
|
177
|
+
};
|
|
178
|
+
readonly 'messaging.snapshot': {
|
|
179
|
+
readonly rowNumber: 8;
|
|
180
|
+
readonly method: "messaging.snapshot";
|
|
181
|
+
readonly direction: "plugin-to-host";
|
|
182
|
+
readonly grant: "message.event.subscribe";
|
|
183
|
+
readonly isNotification: false;
|
|
184
|
+
readonly ready: false;
|
|
185
|
+
readonly leafClosure: "RESERVED";
|
|
186
|
+
readonly reservedEntries: readonly ["M1", "M2", "M5", "M7", "I1"];
|
|
187
|
+
readonly settlementKeySource: "none for traversal; completion = D1b Host entitlement through messaging.ack";
|
|
188
|
+
};
|
|
189
|
+
readonly 'host.messaging.deliver': {
|
|
190
|
+
readonly rowNumber: 9;
|
|
191
|
+
readonly method: "host.messaging.deliver";
|
|
192
|
+
readonly direction: "host-to-plugin";
|
|
193
|
+
readonly grant: "onMessage";
|
|
194
|
+
readonly isNotification: false;
|
|
195
|
+
readonly ready: false;
|
|
196
|
+
readonly leafClosure: "RESERVED";
|
|
197
|
+
readonly reservedEntries: readonly ["M1", "M2", "M5", "M7", "I1"];
|
|
198
|
+
readonly settlementKeySource: "input.deliveryId (Host-side authoritative)";
|
|
199
|
+
};
|
|
200
|
+
readonly 'host.grants.changed': {
|
|
201
|
+
readonly maxEncodedRequestBytes: number;
|
|
202
|
+
readonly rowNumber: 10;
|
|
203
|
+
readonly method: "host.grants.changed";
|
|
204
|
+
readonly direction: "host-to-plugin";
|
|
205
|
+
readonly grant: "protocol-intrinsic";
|
|
206
|
+
readonly isNotification: true;
|
|
207
|
+
readonly ready: true;
|
|
208
|
+
readonly leafClosure: "CLOSED";
|
|
209
|
+
readonly reservedEntries: readonly [];
|
|
210
|
+
readonly settlementKeySource: "(grantRevision monotonic)";
|
|
211
|
+
};
|
|
212
|
+
readonly 'host.lifecycle.ping': {
|
|
213
|
+
readonly maxEncodedRequestBytes: number;
|
|
214
|
+
readonly maxEncodedResultBytes: number;
|
|
215
|
+
readonly maxEncodedErrorBytes: number;
|
|
216
|
+
readonly rowNumber: 11;
|
|
217
|
+
readonly method: "host.lifecycle.ping";
|
|
218
|
+
readonly direction: "host-to-plugin";
|
|
219
|
+
readonly grant: "protocol-intrinsic";
|
|
220
|
+
readonly isNotification: false;
|
|
221
|
+
readonly ready: true;
|
|
222
|
+
readonly leafClosure: "CLOSED";
|
|
223
|
+
readonly reservedEntries: readonly [];
|
|
224
|
+
readonly settlementKeySource: "—";
|
|
225
|
+
};
|
|
226
|
+
readonly 'host.lifecycle.drain': {
|
|
227
|
+
readonly maxEncodedRequestBytes: number;
|
|
228
|
+
readonly maxEncodedResultBytes: number;
|
|
229
|
+
readonly maxEncodedErrorBytes: number;
|
|
230
|
+
readonly rowNumber: 12;
|
|
231
|
+
readonly method: "host.lifecycle.drain";
|
|
232
|
+
readonly direction: "host-to-plugin";
|
|
233
|
+
readonly grant: "protocol-intrinsic";
|
|
234
|
+
readonly isNotification: false;
|
|
235
|
+
readonly ready: true;
|
|
236
|
+
readonly leafClosure: "CLOSED";
|
|
237
|
+
readonly reservedEntries: readonly [];
|
|
238
|
+
readonly settlementKeySource: "—";
|
|
239
|
+
};
|
|
240
|
+
readonly 'events.publish': {
|
|
241
|
+
readonly maxEncodedRequestBytes: number;
|
|
242
|
+
readonly maxEncodedResultBytes: number;
|
|
243
|
+
readonly maxEncodedErrorBytes: number;
|
|
244
|
+
readonly rowNumber: 13;
|
|
245
|
+
readonly method: "events.publish";
|
|
246
|
+
readonly direction: "plugin-to-host";
|
|
247
|
+
readonly grant: "events.publish";
|
|
248
|
+
readonly isNotification: false;
|
|
249
|
+
readonly ready: true;
|
|
250
|
+
readonly leafClosure: "CLOSED";
|
|
251
|
+
readonly reservedEntries: readonly [];
|
|
252
|
+
readonly settlementKeySource: "(Host-bound producer instance, input.signalType, input.idempotencyKey)";
|
|
253
|
+
};
|
|
254
|
+
};
|
|
255
|
+
/** Plugin-to-host method names. */
|
|
256
|
+
export declare const PLUGIN_TO_HOST_METHODS: readonly WireMethodName[];
|
|
257
|
+
/** Host-to-plugin method names. */
|
|
258
|
+
export declare const HOST_TO_PLUGIN_METHODS: readonly WireMethodName[];
|
|
259
|
+
/** Notification method names (only row 10 in v0). */
|
|
260
|
+
export declare const NOTIFICATION_METHODS: readonly WireMethodName[];
|
|
261
|
+
/** Method names with CLOSED leaf shapes (frozen). */
|
|
262
|
+
export declare const CLOSED_LEAF_ROWS: readonly WireMethodName[];
|
|
263
|
+
/** Method names with RESERVED leaf shapes (may change). */
|
|
264
|
+
export declare const RESERVED_LEAF_ROWS: readonly WireMethodName[];
|
|
265
|
+
/** Method names that are legal for wire advertisement in beta.10. */
|
|
266
|
+
export declare const READY_ROWS: readonly WireMethodName[];
|
|
267
|
+
/** Total number of production methods. */
|
|
268
|
+
export declare const WIRE_METHOD_COUNT: 13;
|
|
269
|
+
/**
|
|
270
|
+
* Look up a registry row by method name.
|
|
271
|
+
* Returns undefined for unknown method names.
|
|
272
|
+
*/
|
|
273
|
+
export declare function getRegistryRow(method: string): RegistryRow | undefined;
|
|
274
|
+
/**
|
|
275
|
+
* Check whether a method name is a valid wire method.
|
|
276
|
+
*/
|
|
277
|
+
export declare function isWireMethod(method: string): method is WireMethodName;
|
|
278
|
+
/**
|
|
279
|
+
* Get the grant requirement for a method.
|
|
280
|
+
* Returns undefined for unknown method names.
|
|
281
|
+
*/
|
|
282
|
+
export declare function getMethodGrant(method: string): Gr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