KEDDEH
Developer systems / SDK 1.1

Connect with
clear contracts.

Use the official MCP transport for public discovery or an authorised Agentics workflow. Inspect registered capabilities, prepare scoped task operations, preserve namespace versions and reconcile durable execution records.

One protocol. Explicit authority.
01 / Your SDK client
02 / Streamable HTTP transport
03 / published_public_catalogue

Operational BRAINK and private VFS capabilities retain their separate owner boundary.

01 / Choose a connection

Authenticate where it is required.

Managed MCP connection

Use the KEDDEH.COM connection in ChatGPT or Codex. Sites manages OAuth and exposes this exact resource:

https://www.keddeh.com/mcp

A 401 with a Bearer challenge means authentication is required. Configure an OAuth provider or supply a valid token for this resource. Never paste credentials into source files.

Public catalogue transport

For a Node client reading only the public route catalogue, use the same SDK protocol at:

https://www.keddeh.com/api/mcp

This endpoint supplies public catalogue data only. It does not grant administration, signing or filesystem access.

02 / Build and reuse

A working client, yours to extend.

Download these three files into one directory, run npm install, then choose your endpoint. Node.js 22 or later is required.

npm install
# Public catalogue; no private credentials needed:
KEDDEH_MCP_URL=https://www.keddeh.com/api/mcp npm start
import {Client} from '@modelcontextprotocol/sdk/client/index.js';
import {StreamableHTTPClientTransport} from '@modelcontextprotocol/sdk/client/streamableHttp.js';
export async function createKeddehClient({url='https://www.keddeh.com/mcp',token,authProvider}={}) {
  const client=new Client({name:'keddeh-sdk-client',version:'1.0.0'});
  const transport=new StreamableHTTPClientTransport(new URL(url),{
    ...(authProvider?{authProvider}:{}),
    ...(token?{requestInit:{headers:{Authorization:'Bearer '+token}}}:{})
  });
  try {await client.connect(transport);}catch(error){await client.close();throw error;}
  return {
    listTools:()=>client.listTools(),
    catalogue:()=>client.callTool({name:'published_public_catalogue',arguments:{}}),
    close:()=>client.close()
  };
}
03 / Know the boundary

Observe the response. Handle the failure.

Published catalogue

published_public_catalogue returns public route paths, titles, purposes and families from the deployed route contracts. It is read-only and does not fabricate runtime health.

Initialize → list tools → call the published tool → close the client. The client propagates errors so your application can report and retry them deliberately.

Routing and diagnostics

/mcp is the platform-managed OAuth route. On custom domains, use /api/mcp until the hosting provider supports the managed route there. The bare domain’s forwarding must preserve paths before keddeh.com/SDK and keddeh.com/mcp can reach this Site.

400: malformed protocol request. 401: authenticate. 403: insufficient authority. 404: check the exact host and path. No automatic fallback to owner services.

04 / Runtime and native file workflow

Carry the original record through.

Owner runtime client

The separate client discovers agent_registry, agent_dispatch and agent_receipt on the owner runtime. Use its supported managed OAuth connection or your authorised OAuth provider for that exact resource. Authentication failures propagate; catalogue access never supplies owner authority.

Runtime client ↗

Read the namespace before each dependent mutation. Retain the original command identity, expectedVersion and server-issued lease. Resolve an interrupted request through its durable execution record before choosing a retry.

Use native Storage

Export the original record with exportRuntimeExecutionRecord(record), save the returned JSON to a file, then use Upload in Keddeh Storage. Native upload stores and reads back the full bytes; valid SDK exports retain their command identity and content digest.

Storage is VFS software with local and optional Drive sources. Importing a file does not execute a command, publish it, or produce an independent assessment. An actor record remains an actor record; assessment uses the existing separate report document number.

Large text files keep their full stored bytes without duplicating them in the upload metadata cache. Preview and download use the retained file.

Agentics / BRAINK execution contract

One authorised workflow, from identity to retained evidence.

This guide documents the existing native runtime. The public catalogue describes routes; the owner/scoped runtime coordinates authorised work. Choose the resource first, then use its discovered tools and server-owned permissions.

1. Identity and authority

A credential authenticates a server-configured principal. It does not prove which software model is acting: the native host records model: UNATTESTED. A namespace partitions state within the owner estate. A task scope is an eligibility label. Neither a namespace name, a declared foundry nor an actor description creates permission.

ConnectionActual authorityCaller action
Public cataloguePublished public route data onlyUse /api/mcp; no owner token is needed.
Managed owner connectionTrusted owner identity supplied by the hosting platformUse the supported managed sign-in. Never forge oai-authenticated-* headers.
Existing dedicated agent beareragent_registry, agent_dispatch and agent_receipt onlyUse only the exact runtime resource and assigned work.
Existing scoped team bearerExact server-granted tools, namespaces, capabilities and foundries; enabled and unexpiredUse command IDs prefixed with the configured principal ID plus “:”, expectedVersion and a structured rationale.
Dedicated runtime MCP bearerExisting owner operational resource authorityUse only when explicitly assigned. Catalogue access cannot supply it.

Grants are checked on requests. This documentation and SDK create no credentials, OAuth grants, memberships or persistent access. If the required scope is absent, stop and have the owner review access through the established process; do not switch credentials to evade denial.

2. Discover registration before scheduling

Initialize the MCP connection, call tools/list, then agent_registry({}). Select the exact capability ID and require cloud_state: BOUND, a nonempty runtime_binding and its actual input_constraints. The registered coordinator is skill://engineering/translation-ledger. Finding-specific knowledge projections without an executable contract remain BLOCKED.

Capability registration lives in source-bound registry/dispatcher contracts. There is no self-service MCP tool that turns a client-declared agent or arbitrary code into a registered executor. TASK_ENQUEUE registers a task in the queue, not a new capability. CONSTRUCTION_MAP records a provenance graph, not execution permission. New handlers and access grants require the separate authorised source/deployment and security workflows.

3. Read a coherent namespace

Call agent_registry({namespaceId, taskOffset: 0, taskLimit: 100}) with the exact assigned namespace. Follow nextOffset until null; verify that version and snapshotDigest remain unchanged across pages. If either changes, discard the partial view and start a new read. Retain id, foundryId, version, snapshotDigest, task state and lease identity. A missing namespace is not permission to create one.

import {createKeddehRuntimeClient} from './runtime-client.mjs';
import {inspectNamespace} from './agentics-workflow.mjs';
const runtime = await createKeddehRuntimeClient({
  // Supply an existing authorised OAuth provider or resource token.
  token: process.env.KEDDEH_RUNTIME_TOKEN
});
try {
  const namespace = await inspectNamespace(runtime, process.env.KEDDEH_NAMESPACE);
  console.log({id: namespace.id, version: namespace.version, tasks: namespace.tasks});
} finally { await runtime.close(); }

The downloaded read-only example runs with Node.js 22+, the existing package manifest and runtime client. Set KEDDEH_NAMESPACE to an assigned existing namespace and use an already-authorised KEDDEH_RUNTIME_TOKEN or adapt the client to your supported OAuth provider. Keep tokens out of source control and logs.

4. Queue, claim, execute, heartbeat, submit

  1. Queue the bounded task: dispatch the translation-ledger capability with input.kind: TASK_ENQUEUE and data fields id, foundry, capabilityId, scope, dependencies, maxAttempts, retryPolicy. Use an explicit retry policy, NEVER or IDEMPOTENT. Set dependencies to [] for the currently supported independent-task path.
  2. Claim eligible work: TASK_CLAIM supplies scopes, capabilityIds and leaseMs. The coordinator chooses an eligible task using foundry rotation and attempt ordering. Inspect its returned taskId, leaseId and leaseUntil; a prepared packet is not a lock.
  3. Execute the task body separately: invoke the specific authorised handler or worker appropriate to that task. The coordinator does not run a task merely because it is queued or leased. Do not invent a generic code-execution or publishing capability.
  4. Maintain the live lease: TASK_HEARTBEAT uses the returned taskId and original leaseId, plus a bounded leaseMs. Refresh namespace version before dispatch. The server enforces principal ownership and expiry.
  5. Submit real evidence: retain the actual artifact, identify its digest scope, then TASK_SUBMIT with artifactId and a lowercase 64-hex SHA-256. TASK_SUBMITTED is pending independent assessment, not completed research approval or a deployed release.
import {prepareTaskCommand, inspectExecutionRecord} from './agentics-workflow.mjs';
// Preparation is local. Only runtime.dispatch(packet) requests a mutation.
const namespace = await inspectNamespace(runtime, assignedNamespace);
const packet = prepareTaskCommand({
  namespace,
  commandId: stableCommandId, // Team: exact configured principal ID + ':' + unique suffix.
  foundryId: namespace.foundryId, // Retain existing context; omit when null.
  kind: 'TASK_CLAIM',
  data: {scopes: [assignedTaskScope], capabilityIds: [assignedTaskCapability], leaseMs: 300000},
  rationale: {
    objective: 'Claim eligible work in the assigned namespace',
    reason: 'The authorised worker is ready to process matching work',
    evidence: [namespace.snapshotDigest, originalTaskReference],
    expectedEffect: 'One eligible task lease, or IDLE with blockers',
    rollback: 'Read this command record before any retry; reconcile uncertain work',
    impact: {users: 'Assigned operator workflow', systems: 'Existing namespace only', services: 'Native coordinator'}
  }
});
// Inspect packet and confirm authority for this specific operation before dispatching.
const actorRecord = await runtime.dispatch(packet);
const result = inspectExecutionRecord(actorRecord);
// The server chooses the task. Never assume the highlighted task was claimed.
if (result.semanticState === 'TASK_CLAIMED') {
  console.log(result.output.taskId, result.output.leaseId, result.output.leaseUntil);
} else { console.log(result); }
// The worker separately executes the assigned task through its authorised handler.
// Retain the REAL artifact first; calculate SHA-256 over the documented artifact bytes.
const latest = await inspectNamespace(runtime, assignedNamespace);
const submit = prepareTaskCommand({
  namespace: latest, foundryId: latest.foundryId, commandId: newSubmissionCommandId,
  kind: 'TASK_SUBMIT',
  data: {taskId: claimedTaskId, leaseId: originalLeaseId,
    submission: {artifactId: retainedArtifactId, sha256: retainedArtifactSha256}},
  rationale: submissionRationale
});
const submitted = await runtime.dispatch(submit);
console.log(inspectExecutionRecord(submitted));
// TASK_SUBMITTED retains actor evidence. It is not independent approval or publication.

5. Compare-and-swap and command identity

Each mutation carries the current expectedVersion. The host restores the digest-checked namespace snapshot, executes the registered handler, stores the next snapshot and execution record, then commits the version through compare-and-swap (CAS). Concurrent changes return a conflict rather than silently overwrite state. Keep the existing namespace foundryId unchanged; omit a null foundry context. Scoped team calls additionally require an explicit matching foundry grant.

A stable command ID binds to a fingerprint containing capability, input, namespace, foundry and expectedVersion. Exact retries retain the original ID and payload. Changed payload or version is a new request and requires a new ID after the original outcome has been reconciled. Never rebase expectedVersion automatically under the old command ID. The downloadable client performs preflight reads but the server’s CAS remains authoritative. Its expectedVersion preflight can reject an exact retry even when the original command already committed, because that commit advanced the namespace. Query the original command with runtime.receipt(originalCommandId) before any manual retry; a stale client preflight is not evidence that the original command failed.

6. Read what actually happened

Use agent_receipt({commandId}) for the original durable record. Check its command identity, namespace version/digest, handler state and semantic result. AGENT_EXECUTED only says the handler ran; its semantic output may be IDLE or a rejected task transition. The record classification is ACTOR_EXECUTION_RECORD_NOT_INDEPENDENT_ASSESSMENT; the compatibility field “receipt” is not an assessment report number.

const saved = await runtime.receipt(originalCommandId);
const observed = inspectExecutionRecord(saved);
console.log(observed.transportState, observed.handlerState, observed.semanticState);
// Preserve the original record with exportRuntimeExecutionRecord(saved).
// Read back retained bytes; use the existing independent report store for assessment.

7. Recover without replaying uncertain work

ObservationRequired next step
Lost response, AGENT_DISPATCHING or AGENT_UNCERTAINRead the original command record and namespace. Determine whether an effect committed before any retry.
AGENT_CONFLICT / EXPECTED_VERSION_CONFLICT / CONCURRENT_NAMESPACE_CHANGERetain the conflict record, reread the namespace, and prepare a new authorised command with a new ID if the action is still needed.
COMMAND_ID_PAYLOAD_CONFLICTDo not overwrite identity. Inspect the original command; use a new ID only for a genuinely new request.
Expired lease with retryPolicy NEVERAutomatic reclaim is blocked. Owner-authorised TASK_RECOVER_EXPIRED_LEASE requires the exact prior lease, foundry, reason, evidence and bounded attempts. Recovery does not replay the prior task body.
Expired lease with retryPolicy IDEMPOTENTThe coordinator may make it eligible within maxAttempts. The separately executed task must really be idempotent; the label alone cannot make an external side effect safe.
401 / 403 or scope-denied errorStop. Check the exact resource and existing grant with the owner. Do not fall back to a broader identity.
SUBMITTED, dependency still blockedSubmission is not assessment. The current dispatcher supplies no verified-dependency binding, so nonempty dependencies remain blocked.

8. Keep the SDK families distinct

The hosted /api/agentics/developer-kit is authenticated preparation and readback. GET projects a namespace; POST prepares claim, heartbeat or submission packets, or classifies an existing record. It does not dispatch those packets. Its workspace helper binds the KEDDEH_OWNER_WORKBOOK foundry; do not reuse it for an arbitrary null-foundry namespace.

The separately supplied local node-package/sdk.mjs exports KeddehNode. It targets a running local node (default http://127.0.0.1:8080), not the hosted owner MCP resource. Its methods include packages, runPackage, capabilities, volume, execute, receipts and mcp. Local execution uses {volume, capability, input, expectedGeneration}; read the volume first. The node binds the volume namespace and authenticated principal server-side. Its MCP tools include runtime_execute, volume_read and foundry_run, not hosted agent_dispatch. Do not swap method names, credentials, namespace versions or volume generations between these APIs.

Ordinary translation-ledger events can retain a release proposal as data. A label such as RELEASE_PROPOSAL is not a registered publication validator or deploy operation. This contract has no method for a Site project/version/commit publication with deployment-ID reconciliation.

9. Availability and limits

Checked against owner runtime source v93 and authenticated discovery on 14 October 2026. The translation-ledger coordinator was registered and bound. Always rediscover under your actual principal; a source registration is not a promise that every proposed skill or deployment target is operational.

Source basis: owner commit 37834cbe0c94b79375674c939a7df0322841ced6, lib/mcp-controls.ts, lib/cloud-agent-controls.ts, lib/team-access.ts, braink/dispatcher.cjs, braink/cloud-dispatch.cjs and braink/round-robin.cjs. The machine-readable contract includes source and derived digests. This page exposes no private task records, tokens or source-body data.