@osyra/ome/mcp-contract
Pre-release — offline verification only: Offline verification from an authorized source checkout is usable. The memory/network RPC surface and any
api.osyra.aiexamples below describe protocol/interface shape only. The public Edge bridge, package publication, and release acceptance are still pending; do not treat this page as proof that customer network read/write is available.
Import: import { … } from "@osyra/ome/mcp-contract";
Interfaces
OmeMcpBundleManifest
interface OmeMcpBundleManifestFirst chunk of AP00011 ExportBundle plus stream-completion accounting. The COSE_Sign1 envelope and Form-B preimage are separate by wire design.
Properties
| Name | Type | Description |
| --- | --- | --- |
| bundleBytes | number | Number of raw bundle bytes drained after the manifest chunk. |
| claimCount | number | |
| contentType | string | |
| coseSign1 | Uint8Array | |
| createdMs | number | |
| epoch | number | |
| issuerPubKeys | Uint8Array<ArrayBufferLike>[] | |
| preimage | Uint8Array | |
| rootHex | string | |
| tombstoneCount | number | |
| version | number | |
OmeMcpCallContext
interface OmeMcpCallContextPer-call controls that AP00015 must be able to enforce end-to-end.
Properties
| Name | Type | Description |
| --- | --- | --- |
| deadlineMs? | number | Per-call deadline override in milliseconds. |
| idempotencyKey? | string | Stable SignAndInsert idempotency key (write calls only). |
| requestId? | string | End-to-end correlation identifier. |
| signal? | AbortSignal | Abort the in-flight Connect-RPC when the MCP deadline/caller is cancelled. |
OmeMcpClaimBody
interface OmeMcpClaimBodyTruthful GetClaimBody projection.
AP00011 intentionally excludes signature and signer_pub from this read RPC.
contentHash is the server commitment that AP00014 verifies against
SHA-256(body) before returning.
Properties
| Name | Type | Description |
| --- | --- | --- |
| contentHash | Uint8Array | |
| encodedCbor | Uint8Array | |
| handle | string | |
OmeMcpClientV1
interface OmeMcpClientV1The exact SDK surface AP00015 consumes.
OmeClient implements OmeMcpClientV1 is the compile-time drift gate. The
interface deliberately models AP00011's real semantics: workspace is pinned
on the client, list pages are sanitized, claim reads prove body/hash binding,
and bundle verification requires an external trust anchor.
Properties
| Name | Type | Description |
| --- | --- | --- |
| readonly mcpContractVersion | "1.0.0" | |
| readonly memory | { exportBundleManifest(ctx?: OmeMcpCallContext): Promise<OmeMcpBundleManifest>; getClaimBody(claimId: string, ctx?: OmeMcpCallContext): Promise<OmeMcpClaimBody>; list(filter?: OmeMcpListFilter, ctx?: OmeMcpCallContext): Promise<OmeMcpListResult>; tombstone(args: TombstoneArgs, ctx?: OmeMcpCallContext): Promise<TombstoneResult>; writeClaim(claim: Claim, ctx?: OmeMcpCallContext): Promise<string> } | |
| readonly verify | { bundleManifest(coseSign1Bytes: Uint8Array, preimageBytes: Uint8Array, trustAnchors: Uint8Array<ArrayBufferLike>[]): Promise<boolean> } | |
Methods
checkPolicy(action: string, resource?: string, context?: Record<string, string>, ctx?: OmeMcpCallContext): Promise<CheckPolicyResult>close(): Promise<void>getServerSpec(ctx?: OmeMcpCallContext): Promise<ServerSpec>OmeMcpListFilter
interface OmeMcpListFilterServer-authoritative ListClaims filters used by memory.list.
Properties
| Name | Type | Description |
| --- | --- | --- |
| cursor? | string | Opaque AP00011 keyset-pagination cursor. |
| kind? | OmeMcpClaimKind | Reserved for the governed AP00011 claim-kind index. The current SDK fails fast when supplied; it never sends or silently ignores this filter. |
| limit? | number | AP00011 hard-caps pages at 200. The SDK transparently halves this value for the exact OSY-MEM-5324 aggregate-envelope byte guard, down to one row; generic RESOURCE_EXHAUSTED rate/quota failures are never retried here. |
OmeMcpListResult
interface OmeMcpListResultSanitized ListClaims result. No body/signature/signer key bytes are present.
Properties
| Name | Type | Description |
| --- | --- | --- |
| handles | string[] | |
| nextCursor? | string | |
| totalCount | number | |
OmeSignerOptions
interface OmeSignerOptionsServer-side signer configuration for SignAndInsert.
The private key is never accepted by the SDK contract. AP00011 resolves the
structured reference inside the workspace trust boundary and verifies that
it belongs to issuerDid before signing.
Properties
| Name | Type | Description |
| --- | --- | --- |
| issuerDid | string | |
| keySource | OmeSignerKeySource | |
Type aliases
OmeMcpClaimKind
type OmeMcpClaimKind = Extract<ClaimKind, "IngestClaim" | "DerivationClaim" | "AttestationClaim">The claim kinds exposed by the AP00015 memory tools.
OmeMcpClientContractVersion
type OmeMcpClientContractVersion = typeof OME_MCP_CLIENT_CONTRACT_VERSIONOmeSignerKeySource
type OmeSignerKeySource = { kmsKeyId: string; secretsManagerSecretArn?: never } | { kmsKeyId?: never; secretsManagerSecretArn: string }Non-exporting signer reference resolved by AP00011 (ADR-035).
Variables
OME_MCP_CLIENT_CONTRACT_VERSION
const OME_MCP_CLIENT_CONTRACT_VERSION: "1.0.0"Semver for the shared client contract, independent of package release tags.