@receiz/mcp-server
Version:
MCP server for agents building and verifying Receiz proof-native applications through the canonical Receiz SDK rails.
265 lines • 12.2 kB
TypeScript
import { type ReceizMcpToolAnnotations } from "./toolAnnotations.js";
export * from "./marketplaceExecutionPolicy.js";
export * from "./marketplaceNonfinancialPolicy.js";
export { createReceizMcpDeviceAiSubject } from "./deviceAiSubject.js";
export { bindReceizMcpDeviceAiSubjectCreation } from "./deviceAiSubjectTool.js";
import type { ReceizV127SubjectRuntimeAdapter } from "@receiz/sdk";
export { bootstrapReceizMcpDeviceRuntime } from "./deviceBootstrap.js";
export { openReceizMcpDeviceRuntime } from "./deviceRuntime.js";
export { runReceizMcpDeviceRelay } from "./deviceRelay.js";
import { callReceizOfflineSealTool, type ReceizMcpLocalCustody } from "./offlineSealing.js";
export { appendReceizOfflineCrystal, openReceizOfflineCrystal, openReceizOfflineCrystalReference, readVerifiedReceizOfflineCrystalSources } from "./offlineCrystal.js";
export type { ReceizMcpLocalCustody } from "./offlineSealing.js";
export { sealReceizSourceBytes, sealUploadedArtifact, sealSuppliedText } from "./offlineSealing.js";
import { RECEIZ_V125_HIGHEST_CASH_OUT_FRAME, type JsonObject } from "@receiz/sdk";
import { createReceizConstitutionalRuntime, type ReceizConstitutionalContext, type ReceizConstitutionalOperation } from "./constitutional.js";
import { createReceizMcpOperations, type ReceizMcpOperationsClient, type ReceizMcpArtifactTransitionAuthorityResolvers } from "./operations.js";
import { type ReceizMcpV124CallOptions } from "./v124Operations.js";
import { type ReceizV125McpProofReferenceResolver } from "./v125Operations.js";
import { type ReceizV125TrustMcpHost } from "./v125TrustOperations.js";
export * from "./constitutional.js";
export * from "./operations.js";
export * from "./globalReconciliationOperations.js";
export * from "./livingSubjectOperations.js";
export * from "./v122Operations.js";
export * from "./v122PlanCustody.js";
export * from "./v123Operations.js";
export * from "./v124Operations.js";
export * from "./v125Operations.js";
export * from "./v125TrustOperations.js";
export * from "./v125TrustHost.js";
import { createReceizV125TrustMcpOperations } from "./v125TrustHost.js";
export type JsonRpcId = string | number | null;
export type JsonRpcRequest = {
jsonrpc: "2.0";
id?: JsonRpcId;
method: string;
params?: unknown;
};
export type JsonRpcResponse = {
jsonrpc: "2.0";
id: JsonRpcId;
result?: unknown;
error?: {
code: number;
message: string;
data?: unknown;
};
};
export type McpTool = {
_meta?: JsonObject;
annotations?: ReceizMcpToolAnnotations;
name: string;
description: string;
inputSchema: JsonObject;
outputSchema?: JsonObject;
};
export type McpResourceTemplate = {
uriTemplate: string;
name: string;
description: string;
mimeType: "application/json";
};
export type McpToolResult = {
content: Array<{
type: "text";
text: string;
}>;
isError?: boolean;
structuredContent?: JsonObject;
_meta?: JsonObject;
};
export type ReceizMcpAuthorityBoundary = {
mcpAuthority: false;
sourceOfTruth: string;
strongerTruth: string[];
weakerToolingLayer: string;
highestCashOutFrame: typeof RECEIZ_V125_HIGHEST_CASH_OUT_FRAME;
};
export declare const RECEIZ_MCP_AUTHORITY_BOUNDARY: ReceizMcpAuthorityBoundary;
type ReceizSdkClientLike = {
baseUrl?: string;
doctor: (options?: JsonObject) => Promise<unknown>;
capabilities: (options?: JsonObject) => Promise<unknown>;
appState: {
publish: (input: unknown, options?: JsonObject) => Promise<unknown>;
resolve: (input: JsonObject) => Promise<unknown>;
byUrl: (url: string) => Promise<unknown>;
byCreator: (receizId: string) => Promise<unknown>;
byNamespace: (namespace: string) => Promise<unknown>;
byId: (id: string) => Promise<unknown>;
};
publicStore: {
publish: (input: JsonObject, options?: JsonObject) => Promise<unknown>;
resolve: (input: JsonObject) => Promise<unknown>;
};
publicProof: {
byUrl: (url: string) => Promise<unknown>;
byId: (id: string) => Promise<unknown>;
byCreator: (receizId: string) => Promise<unknown>;
};
verification: ReceizMcpOperationsClient["verification"];
identity: {
authorizeUrl: (options: JsonObject) => string;
ensureTenantSession: (input: JsonObject) => unknown;
};
profile: ReceizMcpOperationsClient["profile"];
assets: ReceizMcpOperationsClient["assets"];
artifacts: ReceizMcpOperationsClient["artifacts"];
ownership: ReceizMcpOperationsClient["ownership"];
wallet: {
publicLedger: (query?: JsonObject) => Promise<unknown>;
actionLedger: (query?: JsonObject) => Promise<unknown>;
};
sports: {
conformance: () => Promise<unknown>;
resolveCardMemory: (input: unknown) => Promise<unknown>;
resolvePitchDayProof: (input: unknown) => Promise<unknown>;
};
subjects: ReceizMcpOperationsClient["subjects"];
bearer: ReceizMcpOperationsClient["bearer"];
world: ReceizMcpOperationsClient["world"] & {
publicSnapshot: () => Promise<unknown>;
};
proof: {
query: (query: JsonObject) => Promise<unknown>;
};
webhooks: {
verifySignature: (input: JsonObject) => Promise<boolean>;
};
webhookEndpoints: {
list: () => Promise<unknown>;
create: (input: JsonObject) => Promise<unknown>;
update: (endpointId: string, input: JsonObject) => Promise<unknown>;
delete: (endpointId: string) => Promise<unknown>;
rotateSecret: (endpointId: string) => Promise<unknown>;
sendTest: (endpointId: string, input: JsonObject) => Promise<unknown>;
};
sandbox: {
seedStore: (input: JsonObject) => unknown;
checkout: (input: JsonObject) => unknown;
wallet: (input?: JsonObject) => unknown;
};
};
export type ReceizMcpRuntime = {
localCustody?: ReceizMcpLocalCustody;
offlineSealer?: NonNullable<Parameters<typeof callReceizOfflineSealTool>[2]>["sealer"];
subjectRuntime?: ReceizV127SubjectRuntimeAdapter;
client: ReceizSdkClientLike;
baseUrl: string;
applicationId?: string;
accessToken?: string;
resolveV124Material?: ReceizMcpV124CallOptions["resolveMaterial"];
persistV124Material?: ReceizMcpV124CallOptions["persistMaterial"];
resolveV125ProofReference?: ReceizV125McpProofReferenceResolver;
executeV125TrustOperation?: ReceizV125TrustMcpHost;
fetch?: typeof globalThis.fetch;
oidcScopesByRail: Partial<Record<string, readonly string[]>>;
webhookReplayIds: Set<string>;
constitutional: ReturnType<typeof createReceizConstitutionalRuntime>;
operations: ReturnType<typeof createReceizMcpOperations>;
};
export type ReceizV124McpMaterialHost = Readonly<{
resolveMaterial?: NonNullable<ReceizMcpV124CallOptions["resolveMaterial"]>;
persistMaterial?: NonNullable<ReceizMcpV124CallOptions["persistMaterial"]>;
}>;
export type ReceizV125McpProofHost = Readonly<{
resolveProofReference?: ReceizV125McpProofReferenceResolver;
}>;
/**
* Loads the trusted host seam used by the stdio server. The module receives
* exact materials outside model arguments and must export
* `resolveReceizV124Material`; `persistReceizV124Material` is optional.
*/
export declare function loadReceizV124McpMaterialHost(moduleSpecifier?: string | undefined): Promise<ReceizV124McpMaterialHost>;
/**
* Loads the trusted host seam used by the stdio server for v125 lawful-action
* proof objects. The model receives only an opaque reference; the host resolves
* exact sealed bytes after confirmation and beneath artifact verification.
*/
export declare function loadReceizV125McpProofHost(moduleSpecifier?: string | undefined): Promise<ReceizV125McpProofHost>;
/** Host modules supply private custody/mechanics; only the canonical factory dispatches tools. */
export type ReceizV125TrustHostConfiguration = Omit<Parameters<typeof createReceizV125TrustMcpOperations>[0], "client" | "applicationAudience">;
export declare function loadReceizV125McpTrustHost(scope: Pick<Parameters<typeof createReceizV125TrustMcpOperations>[0], "client" | "applicationAudience">, moduleSpecifier?: string | undefined): Promise<ReceizV125TrustMcpHost | undefined>;
export declare const RECEIZ_MCP_RESOURCE_TEMPLATES: McpResourceTemplate[];
export declare const RECEIZ_MCP_TOOLS: McpTool[];
export declare function describeReceizMcpCapabilityParity(): Readonly<{
schema: "receiz.mcp.sdk-ai-capability-parity.v125";
releaseVersion: "129.0.0";
sdkClientCapabilityInventory: Readonly<{
schema: "receiz.sdk.client-capability-inventory.v125";
releaseVersion: typeof import("@receiz/sdk").RECEIZ_RELEASE_VERSION;
operations: readonly string[];
authority: Readonly<{
inventoryIsProofAuthority: false;
mcpIsProofAuthority: false;
strongerTruth: "sealed-receiz-proof-object";
}>;
}>;
sdkPublicFunctionInventory: Readonly<{
schema: "receiz.sdk.public-functions.v1";
releaseVersion: "129.0.0";
digest: "af61e23d857fa1fa54fd2a09d5b0f02afadd55b6a02936dcacbae300f124cb94";
functions: {
entryPoint: string;
name: string;
signatures: string[];
}[];
authority: {
inventoryIsProofAuthority: boolean;
directMcpExecutionRequiresAdapter: boolean;
sdkRuntimeCustodyMustBePreserved: boolean;
};
}>;
mcpToolInventory: readonly string[];
v125CapabilityInventory: readonly Readonly<{
id: string;
primitive: string;
outcome: string;
sdkExports: readonly string[];
sdkClientMethods: readonly string[];
mcpTools: readonly string[];
aiSkills: readonly string[];
authorityBoundary: string;
}>[];
authority: Readonly<{
inventoryIsProofAuthority: false;
mcpIsProofAuthority: false;
directToolRequiresExplicitAdapter: true;
sameRuntimeCustodyMustNotBeSerialized: true;
strongerTruth: "sealed-receiz-proof-object";
}>;
}>;
/** Host-owned exposure boundary; this never grants proof or signing authority. */
export declare const RECEIZ_PHI_EXECUTION_TOOL_NAMES: readonly string[];
export declare function createReceizMcpRuntime(options?: {
executionProfile?: "phi-only" | "marketplace-phi" | "marketplace-nonfinancial";
localCustody?: ReceizMcpLocalCustody;
offlineSealer?: NonNullable<Parameters<typeof callReceizOfflineSealTool>[2]>["sealer"];
subjectRuntime?: ReceizV127SubjectRuntimeAdapter;
legacyConnectTransport?: "http";
client?: ReceizSdkClientLike;
baseUrl?: string;
applicationId?: string;
accessToken?: string;
resolveV124Material?: ReceizMcpV124CallOptions["resolveMaterial"];
persistV124Material?: ReceizMcpV124CallOptions["persistMaterial"];
resolveV125ProofReference?: ReceizV125McpProofReferenceResolver;
executeV125TrustOperation?: ReceizV125TrustMcpHost;
fetch?: typeof globalThis.fetch;
oidcScopesByRail?: Partial<Record<string, readonly string[]>>;
constitutionalContext?: ReceizConstitutionalContext;
constitutionalExecutor?: (operation: ReceizConstitutionalOperation) => Promise<unknown>;
} & Partial<ReceizMcpArtifactTransitionAuthorityResolvers>): ReceizMcpRuntime;
export declare function callReceizTool(runtime: ReceizMcpRuntime, name: string, args?: unknown): Promise<McpToolResult>;
export declare function handleReceizMcpMessage(message: JsonRpcRequest, runtime?: ReceizMcpRuntime): Promise<JsonRpcResponse | null>;
export declare function parseReceizMcpToolResult(result: McpToolResult): JsonObject;
export declare function isCliEntrypoint(options?: {
argvPath?: string;
moduleUrl?: string;
realpath?: (path: string) => string;
}): boolean;
/** Standard local subject host. Configuration is process-owned, never MCP arguments. */
export declare function loadReceizV127LocalSubjectRuntime(): Promise<ReceizV127SubjectRuntimeAdapter | undefined>;
//# sourceMappingURL=index.d.ts.map