From 622b25914526fc7acd08a0b909e96b87c33403bf Mon Sep 17 00:00:00 2001 From: jochen Date: Thu, 12 Nov 2026 15:39:53 +0100 Subject: [PATCH] Join 11: gitea names the pipeline runner's contracts and takes a revision answer whole gitea imports @novox/mesh-delivery-contracts-mesh-pipeline-runner, so its package.json names it and the Node fetch places the group's (design 47 G A-285); the catalog view's revision answer is typed with its revision and entries, which revisionAnswer already refuses loudly when the holder leaves them out. Builds: design 47 G A-285 Claude-Session: https://claude.ai/code/session_01NcbgfGKaxw984XyAPfLm4h --- modules/gitea/catalog.ts | 12 +++++++++--- modules/gitea/package.json | 3 ++- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/modules/gitea/catalog.ts b/modules/gitea/catalog.ts index a45517c5e..b02664536 100644 --- a/modules/gitea/catalog.ts +++ b/modules/gitea/catalog.ts @@ -30,8 +30,14 @@ export type Ask = (verb: string, input: RevisionInput) => Promise; /** The hooks a part hands the view: everything of mesh-sdk's FollowerOptions but what the view sets itself. */ export type CatalogHooks = Omit; -/** The revision's answer, or the holder's refusal as an error: never an empty view taken for the trunk. */ -export function revisionAnswer(raw: unknown): RevisionAnswer { +/** A revision's answer as the view takes it: the contract leaves its revision and entries optional, the view needs both. */ +export type HeldAnswer = RevisionAnswer & Required>; + +/** + * The revision's answer, or the holder's refusal as an error: never an empty view taken for the trunk. An answer without + * its revision or its entries is an error the caller sees (principle 3), never a default. + */ +export function revisionAnswer(raw: unknown): HeldAnswer { let a: unknown = raw; if (typeof raw === "string") { try { @@ -45,7 +51,7 @@ export function revisionAnswer(raw: unknown): RevisionAnswer { const said = r && typeof r === "object" && typeof r.error === "string" ? r.error : JSON.stringify(a ?? null).slice(0, 200); throw new Error(`${REVISION_VERB} answered no revision: ${said}`); } - return r as RevisionAnswer; + return r as HeldAnswer; } export class CatalogView { diff --git a/modules/gitea/package.json b/modules/gitea/package.json index e5bdab04d..8ca41df32 100644 --- a/modules/gitea/package.json +++ b/modules/gitea/package.json @@ -1,7 +1,7 @@ { "name": "@novox/module-gitea", "version": "0.1.0", - "description": "gitea — git hosting. Its API client, tools and events live here (novox/hq ADR 0039).", + "description": "gitea \u2014 git hosting. Its API client, tools and events live here (novox/hq ADR 0039).", "type": "module", "private": true, "scripts": { @@ -11,6 +11,7 @@ "dependencies": { "@novox/mesh-delivery-contracts-git": "^0.1.0", "@novox/mesh-delivery-contracts-mesh-catalog": "^0.1.0", + "@novox/mesh-delivery-contracts-mesh-pipeline-runner": "^0.1.0", "@novox/mesh-sdk": "^0.1.19" }, "devDependencies": {