Skip to content

Python SDK Changelog

[Unreleased]

Changed

  • License metadata moves from extensions (_license_status, _license_tenant_id, _license_plan, _quarantine, …) to the signed provenance.license block (status, tenant_id, plan, quarantine, …), so a customer's extensions come back exactly as they set them (#249).
  • Events carry udm_version: "0.0.5", the PhyUDM version the SDK implements; phytrace.__udm_version__ is the same constant and a test keeps it equal to the Rust SDK's (#249).

Added

  • The ROS 2 bridge records an iRobot Create 3 base's safety state (e-stop, hazards, wheels, dock) in the UDM safety domain, and sends a signed event on each change (#566).

Changed

  • The agent numbers, signs and sends events one at a time, so they reach PhyCloud in sequence order; a heartbeat no longer overtakes a telemetry batch numbered before it (#549).
  • The ROS 2 bridge's AgentCloudSink queues events instead of waiting for delivery, so a slow or hanging connection to PhyCloud no longer stops the bridge from recording (#544). drain() waits for queued events.
  • The ROS 2 graph observer waits for discovery to settle, reports a change once it holds for two polls, and no longer takes a publisher with an unresolved node name for a restart of another one (#545).
  • Events whose send raises an unexpected transport exception are now kept in the edge buffer instead of being dropped, and the buffer retry interval is configurable (AgentConfig.buffer_flush_interval_sec, YAML reliability.buffer.flush_interval_sec; default 60 s) (#394).
  • The ROS 2 bridge sends through the agent (AgentCloudSink), so its events are signed, buffered and retried (#394).
  • ProvenanceMetadata.signature_algorithm holds the wire name ("hmac-sha256", "es256") instead of "HMAC-SHA256".
  • The Python agent now sends the signed PhyUDM provenance block with each event, and adds license metadata before signing (#387).
  • The signing payload is canonical JSON (sorted keys, compact, ASCII-escaped), byte-identical to the Rust SDK's (#388).
  • The signature now also covers the provenance block (signed_at, agent id, key id, device attestation); only provenance.signature is left out. The attestation is collected before signing instead of after (#389).

Added

  • TPM attestation (#393): TpmSigner creates a restricted attestation key and can quote(nonce, pcrs); phytrace.attestation.Attestor refreshes a PhyCloud-registered quote per interval and events reference its quote_id; enrollment.register_attestation_key; agent settings attestation_enabled / _interval_sec / _pcrs (YAML provenance.attestation). Without a TPM the attestation block is {"mode": "software", ...} instead of host metadata.
  • phytrace.enrollment: enroll_device / rotate_device_key register a TPM signer's ES256 key with PhyCloud's device registry, with proof of possession (#397).
  • signing_payload_from_dict and canonical_json for verifying events in JSON form.
  • ProvenanceTagger(key_id=...) and AgentConfig.signing_key_id, sent as provenance.key_id.
  • Signed provenance.sequence_num and provenance.boot_epoch (random per start). AgentConfig.sequence_path / ProvenanceTagger(sequence_path=...) keeps sequence numbers increasing across restarts; reset_sequence() raises when it is set (#390).
  • Pluggable signers (phytrace.core.signers): HmacSigner and TpmSigner (ES256 with a non-exportable TPM 2.0 key; tpm extra), selected with AgentConfig.signer / YAML provenance.signer. Events record the signer class as provenance.signer. verify_es256 checks TPM signatures (#391).
  • TpmSigner increments a TPM NV counter once per start and sends it, signed, as provenance.boot_counter; configure the NV index with AgentConfig.tpm_counter_index / YAML provenance.tpm.counter_index (#436).

[0.1.0] - 2026-02-16

Added

  • Initial release
  • UDM models for all 23 domains (Pydantic v2)
  • UDMEventBuilder with fluent API
  • ValidationEngine for schema validation
  • ProvenanceTagger for cryptographic signing
  • HTTP transport with retry logic
  • MockTransport for testing
  • Edge buffer for offline operation
  • Circuit breaker and backpressure handling
  • Batching and compression
  • PhyTraceAgent with YAML configuration
  • ROS2 adapter (planned)
  • Tesla Fleet API adapter (planned)
  • Simulation adapter