Skip to content

DCP-AI v2.8.0 — canonicalization profile dcp-jcs-v1 (spec)

Choose a tag to compare

@dcp-ai-protocol dcp-ai-protocol released this 27 Apr 02:10
· 5 commits to main since this release

What shipped

  • New normative document spec/CANONICALIZATION_PROFILE.md — formalises profile dcp-jcs-v1 with eight numbered rules, an edge-case acceptance table, an undefined-handling contract documenting the TypeScript-only asymmetry (omit in objects, serialize as null in arrays), and a versioning policy for future profiles.
  • Schema field declared in schemas/v2/bundle_manifest.schema.json: optional canonicalization_profile: "dcp-jcs-v1" on bundle manifests. Per the spec, verifiers that encounter a bundle without the field MUST assume dcp-jcs-v1. Future profiles will make the field required.
  • Spec § 15 rewritten to reference the full profile document.
  • 14 interop edge-case vectors added to tests/interop/v2/interop_vectors.json under canonicalization.edge_cases. Each SDK's interop test loads the same block and asserts byte-identical output (or matching error) for every vector.

SDK changes

  • Python dcp-ai 2.7.1 → 2.8.0assert_no_floats now accepts floats whose value is a finite integer (1.0, 1e2, 1.00); they are normalised to integer form before json.dumps. Non-integer floats (0.1), NaN, and infinities remain rejected.
  • Rust dcp-ai 2.7.0 → 2.8.0assert_no_floats now accepts Number(f64) whose fract() is zero. New format_number helper emits integer-valued floats without decimal point or exponent, matching the other SDKs byte-for-byte.
  • Go sdks/go/v2.7.0v2.8.0 — behaviour already aligned (v != math.Trunc(v) check). Version-bump only.
  • TypeScript @dcp-ai/sdk stays 2.1.0 — behaviour already aligned. Docstring in sdks/typescript/src/core/canonicalize.ts formalises the undefined-vs-null asymmetry.

What is NOT in this release

The schema field is declared but the typed BundleManifest structures in the four SDKs do not expose it, the BundleBuilder types do not emit it by default, and verifiers do not route on it. Code-side wiring of the field across the four SDKs lands in v2.8.1 (see release notes there).

Behavioural compatibility

Bundles produced by previous releases remain valid. The change is additive for SDKs that previously rejected 1.0 / 1.00 / 1e2: inputs that used to throw TypeError / Err now succeed and produce the same canonical output the other SDKs were already producing. No input that previously canonicalised successfully canonicalises differently in 2.8.0.

Registries