Interoperability profile 0.1

Shared contracts. Independent applications.

Applications can publish events and invoke actions without adopting one universal runtime. JSON Schema proves compatibility; a separate bridge grant supplies authority.

The mental model

Contracts define meaning

Every record, event, and action is an ordinary first-class mdbase.contract. Its discriminated shape names the relevant JSON Schemas: record_schema, data_schema, or action input and outcome schemas.

Applications declare one role at a time

An application may be an event source, event consumer, action caller, or action provider. A type file uses implements only for record contracts; application declarations provide event sources and action handlers.

The bridge validates and routes

Events multicast to every authorized compatible consumer. Actions resolve to exactly one authorized provider before any side effect. Multiple eligible providers produce ambiguous_provider until the caller or policy selects one.

Events are CloudEvents 1.0

The profile uses CloudEvents structured JSON and adds exact contract version, digest, application, and implementation attributes. The event ID survives redelivery. Correlation and causation are explicit. Event data always validates against the exact contract artifact.

tasknotes-event.ts
const tasknotes = bridge.connect({
  application: "tasknotes",
  implementation: "tasknotes.obsidian",
  version: "5.0.0"
});

await tasknotes.registerEventSource({
  declaration_id: "tasknotes.events",
  contracts: [{ contract: taskCompletedContract }]
});

await tasknotes.publishEvent({
  contract: { id: "tasknotes.task.completed", version: "1.0.0" },
  subject: "Tasks/Ship%20contracts.md",
  correlation_id: "workflow-42",
  data: {
    task_id: "task-42",
    task_path: "Tasks/Ship contracts.md",
    title: "Ship contracts",
    status: "done",
    completed_at: "2026-07-28T10:15:00Z"
  }
});

Actions produce evidence, not a delivery fiction

A logical request is admitted as an exact invocation with a selected provider and concrete attempt. Its terminal outcome is succeeded, rejected, failed, cancelled, or outcome_indeterminate. Accepting a message for delivery is never reported as successful execution.

workflow-action.ts
const outcome = await workflows.invokeAction({
  request_id: "workflow:run-42:add-card",
  contract: { id: "canvas.card.create", version: "^1.0.0" },
  requested_provider: { application: "canvas-bases" },
  correlation_id: "workflow-42",
  causation_id: "evt-42",
  idempotency_key: "run-42:add-card",
  input: {
    canvas_path: "TaskNotes/Canvases/Completed tasks.canvas",
    card: { kind: "file", file: "Tasks/Ship contracts.md" }
  }
});

if (outcome.status !== "succeeded") {
  throw new Error(`${outcome.error.message} [${outcome.error.code}]`);
}

What stays outside the profile

In the profileOwned elsewhere
Contract identity, exact digests, envelopes, validation, resolutionWorkflow languages, scheduling, retries, and application behavior
Correlation, causation, cancellation, duplicate and indeterminate semanticsPersistence, journals, leases, recovery, and offline queues
Identity and authorization context carried to a bridgeThe user grant or transport-specific policy engine