Remove the dead contract types that contradicted the live wire

Grant, Credential and an Interface type lived in contracts, exported and imported
by nothing, describing a grant with fields — resource, consumer — the live wire
does not use. The wire is the contributions file, whose shape (as, secret, node,
at, values) agrees between Go and TypeScript.

These dead types are how ADR 0074 came to claim a drift that inspection does not
find: they read as the contract and were not. A type is only as good as its being
the wire, and one that has drifted from it while still being exported is worse
than no type. Removed.

Claude-Session: https://claude.ai/code/session_01D6qtiYU3P9jk3pnAXyAFyx
This commit is contained in:
2026-09-16 00:06:37 +02:00
parent 77ebcb3904
commit 49c825f5ba
+9 -35
View File
@@ -1,39 +1,13 @@
// The runtime shapes a module's own code touches — NOT the manifest schema, which the control
// plane owns and parses (in Go). These are what a running module receives and returns: a grant
// and its credentials, the mesh interface a provider and consumer both conform to, and the tool
// and event types. They change rarely and deliberately (novox/hq ADR 0039).
/** A request for one instance of a provided resource, addressed to a provider. */
export interface Grant {
/** The mesh interface being provisioned, e.g. "analytics", "postgres-database". */
readonly resource: string;
/** Who asked — the consumer module, on which node. */
readonly consumer: string;
readonly node: string;
/** What the consumer contributed (per the interface's spec keys), e.g. `{ name: "umami" }`. */
readonly values: Readonly<Record<string, string>>;
}
/** What a provider hands back for a grant. Sealed by the harness before it leaves the machine. */
export interface Credential {
/** The fields the interface promises a consumer, e.g. `{ host, port, as, password }`. */
readonly fields: Readonly<Record<string, string>>;
}
/**
* A mesh interface: the provider-neutral contract for a capability (novox/hq ADR 0040). Both a
* provider (which adapts its software to it) and a consumer (which depends on it, never on a
* provider) conform. `spec` names what a consumer may contribute; `credential` names what it
* receives. The interface is drawn at the consumer's real coupling: neutral where thin
* (`analytics`), the protocol where the consumer speaks one (`postgres-database`).
*/
export interface Interface {
readonly name: string;
/** Keys a consumer may contribute when requesting it. */
readonly spec: readonly string[];
/** Fields a consumer receives in its credential. */
readonly credential: readonly string[];
}
// plane owns and parses (in Go). What is here is what actually crosses the wire: the tool
// definition and the event envelope. They change rarely and deliberately (novox/hq ADR 0039).
//
// **The provisioning shapes are NOT here, and used to be — wrongly.** Grant, Credential and an
// Interface type lived here, exported and imported by nothing, and they described a grant with
// fields (`resource`, `consumer`) the live wire does not use: the wire is the contributions file,
// whose shape is in `provisioner/index.ts` and agrees with the Go side. Dead types that
// contradict the live wire are worse than none — they read as the contract and are not, which is
// exactly how ADR 0074 came to claim a drift that was not there. Removed.
/** A tool a module exposes through the mesh's command surface. */
export interface ToolDefinition {