mirror of
https://github.com/morluto/rea.git
synced 2026-11-18 20:53:00 +00:00
* refactor(contracts): move the CLI command name owner into src/contracts * refactor(contracts): own catalog identity in contracts and server identity in process (#11435) * refactor(contracts): move catalog identity into contracts and server identity into process * refactor(contracts): own the advertised MCP schema presentation in contracts * test(mcp): import the advertised presentation from contracts in toolSchemaValidity * test(release): expect the catalog identity at its contracts path in the canary * test(mcp): import the catalog identity from contracts in syntheticContractSurfaces * refactor(contracts): import CLI command names from contracts in the capability conformance test
44 lines
1.5 KiB
TypeScript
44 lines
1.5 KiB
TypeScript
import { DEFAULT_CATALOG_IDENTITY } from "../contracts/catalog/catalogIdentity.js";
|
|
import { PRODUCT_IDENTITY } from "../identity.js";
|
|
import { ok } from "../domain/result.js";
|
|
import type { DoctorHost } from "./Doctor.js";
|
|
|
|
/** Healthy recording host for focused doctor and projection tests. */
|
|
export const createDoctorHostFixture = (
|
|
overrides: Partial<DoctorHost> = {},
|
|
): DoctorHost => ({
|
|
platform: "darwin",
|
|
homeDirectory: "/fixture/home",
|
|
architecture: "x64",
|
|
runtime: { id: "node", version: "24.22.1" },
|
|
macosVersion: () => Promise.resolve("14.0"),
|
|
linuxDistribution: () => Promise.resolve(undefined),
|
|
validTarget: (path) => Promise.resolve(path.includes("Hopper")),
|
|
executable: (path) => Promise.resolve(path.includes("Hopper")),
|
|
inspectLinuxHopper: () =>
|
|
Promise.resolve(
|
|
ok({
|
|
sha256: "0".repeat(64),
|
|
version: "fixture",
|
|
primaryFingerprint: "0".repeat(40),
|
|
signingFingerprint: "1".repeat(40),
|
|
source: "signed_package_cache" as const,
|
|
}),
|
|
),
|
|
linuxDemoRuntimeCheck: () =>
|
|
Promise.resolve({
|
|
name: "hopper-demo-runtime",
|
|
ok: true,
|
|
classification: "healthy",
|
|
}),
|
|
brewHopperPath: () => Promise.resolve(undefined),
|
|
manualHopperPaths: () => Promise.resolve([]),
|
|
installedSkillIdentity: () =>
|
|
Promise.resolve({
|
|
version: PRODUCT_IDENTITY.skillVersion,
|
|
toolCount: DEFAULT_CATALOG_IDENTITY.counts.mcp_tools,
|
|
canonical: true,
|
|
}),
|
|
...overrides,
|
|
});
|