feat(core-runner-protocol): scaffold protocol package

Hand-scaffolded from the packages/core-events shape: the core-package
turbo generator only covers its eight pre-curated snapshot names
(analytics, audit, consent, dsr, events, realtime, trpc, ui) and
rejects 'runner-protocol' at the name prompt. Flagged in the package
AGENTS.md as a future generator snapshot candidate.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016j8z4VHjedXDTjEDNg7qHK
This commit is contained in:
2026-07-12 21:39:22 +02:00
parent 240075d95b
commit 15dc6b9128
12 changed files with 130 additions and 19 deletions

View File

@@ -0,0 +1 @@
export { PROTOCOL_VERSION, type ProtocolVersion } from "./protocol-version";

View File

@@ -0,0 +1,8 @@
import { describe, it, expect } from "vitest";
import { PROTOCOL_VERSION } from "@/protocol-version";
describe("PROTOCOL_VERSION", () => {
it('is pinned to "0"', () => {
expect(PROTOCOL_VERSION).toBe("0");
});
});

View File

@@ -0,0 +1,10 @@
/**
* The pinned runner-protocol version (ADR-027).
*
* Every envelope is validated against this exact literal. Version
* negotiation beyond the pinned "0" is deliberately out of scope for the
* walking skeleton (later PRDs).
*/
export const PROTOCOL_VERSION = "0" as const;
export type ProtocolVersion = typeof PROTOCOL_VERSION;