All files / src/lib dsp-protocol.ts

100% Statements 1/1
100% Branches 2/2
100% Functions 0/0
100% Lines 1/1

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29                                                      26x  
/**
 * The DSP protocol identifier, in one place.
 *
 * Issue #180. Every DSP call in this repository sent
 * `dataspace-protocol-http:2025-1`, and the connector does not register a
 * dispatcher under that name. Measured against the local stack, same request,
 * only this field differing:
 *
 *   dataspace-protocol-http:2025-1   502  No provider dispatcher registered
 *   dataspace-protocol-http          502  same
 *   dataspace-protocol-http:2024-1   502  same
 *   http-dsp-profile-2025-1          gets past the dispatcher lookup
 *
 * `DspHttpDispatcherV2025Extension` registers one dispatcher per
 * `DataspaceProfileContext`, and `DspVirtualApiConfigurationV2025Extension`
 * registers that profile as `http-dsp-profile-2025-1`. The key is the profile
 * id, not the DSP version string — a consequence of the connector running in
 * virtual / multi-participant mode, which arrived with the EDC 0.18 launchers
 * (#97 Phase B, #102). The old key silently stopped working at that upgrade,
 * which is why catalog discovery returned nothing and every negotiation
 * seeded since went TERMINATED.
 *
 * Its own module, with no imports, so a client component can use it without
 * pulling the server-side EDC client into the bundle. The shell half is
 * `scripts/lib/dsp-protocol.sh` — keep the two in step.
 */
export const DSP_PROTOCOL =
  process.env.DSP_PROTOCOL || "http-dsp-profile-2025-1";