This repository defines a shared wire contract for cross-language proxyables behavior.
All implementations in the submodules should read and write the same instruction and value
encodings so a proxy exported in one language can be consumed by another.
Use this as the canonical reference when adding new language support, changing on-wire structures, or debugging parity failures.
Most traffic is MessagePack-encoded ProxyInstruction objects with these fields:
id(optional): string, implementation-generated correlation id.kind(required): instruction kind.data(required): instruction payload.metadata(optional): reserved/extension data.
function0x9ed64249array0x8a58ad26string0x17c16538number0x1bd670a0boolean0x65f46ebfsymbol0xf3fb51d1object0xb8c60cbabigint0x8a67a5caunknown0x9b759fb9null0x77074ba4undefined0x9b61ad43reference0x5a1b3c4d
reference values carry a string reference id in data and represent remote/cached objects.
local0x9c436708get0x540ca757set0xc6270703(supported in implementation code; not required in parity matrix)apply0x24bc4a3bconstruct0x40c09172execute0xa01e3d98throw0x7a78762freturn0x85ee37bfnext0x5cb68de8release0x1a2b3c4d
Core semantics:
get: read a property from the current target; payload is["propertyName"].apply: invoke current target; payload is positional args.construct: construct current target with args.execute: batch execute a sequence of instructions.return/throw: terminal response instructions from the remote side.release: signal explicit reference release fordata = [refId].
Implementations maintain registries of local exported objects and reference IDs. A remote
proxy may send a reference value or release instruction to coordinate lifecycle.
- Exported object/function values should map to stable reference IDs.
- Consumers receive references as callable or property-bearing proxies.
releaseis expected to decrement remote reference counts when supported.
- Parity harness protocol label:
parity-json-v1. - Scenario coverage includes scalar access, method calls, construction, callbacks, error round-trips, reference consistency, and explicit release.
- Canonical scenario identifiers are PascalCase (for example:
GetScalars,CallAdd), and harness agents accept legacy aliases such asget_scalarsandgetScalarsfor compatibility. - The canonical tests check instruction/constant shape and these scenarios from each language pair.
- See
parity/run.pyandparity/scenarios.jsonfor the full matrix.
- Any change that touches instruction/value constants must be updated atomically in all language submodules plus parity tooling.
- New scenarios should be added to
parity/scenarios.json, then reflected in agent implementations and documentation.