KEDDEH SYSTEMS / MCP
Discover the contract.
Act within its scope.
Connect an authorised principal to a registered capability, carry task ownership through a live lease, and read back the retained result. This guide describes the actual implemented boundary at each step.
Choose the correct resource
Public catalogue: https://www.keddeh.com/api/mcp
Owner or explicitly scoped runtime: https://keddeh-systems-runtime.aboudy65097.chatgpt.site/mcp
The uppercase /MCP page is documentation. Lowercase /mcp and /api/mcp are protocol endpoints; GET is not an HTML guide. Use the official SDK’s Streamable HTTP transport: initialize → tools/list → tools/call → close. The public and owner runtime have distinct resources and authority.
const result = await client.callTool({name: 'agent_registry', arguments: {}});
if (result.isError) throw Error('Runtime rejected discovery');
const registry = result.structuredContent ?? JSON.parse(
result.content.find(item => item.type === 'text').text
);
// Only use discovered BOUND capabilities and their actual input constraints.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.
| Connection | Actual authority | Caller action |
|---|---|---|
| Public catalogue | Published public route data only | Use /api/mcp; no owner token is needed. |
| Managed owner connection | Trusted owner identity supplied by the hosting platform | Use the supported managed sign-in. Never forge oai-authenticated-* headers. |
| Existing dedicated agent bearer | agent_registry, agent_dispatch and agent_receipt only | Use only the exact runtime resource and assigned work. |
| Existing scoped team bearer | Exact server-granted tools, namespaces, capabilities and foundries; enabled and unexpired | Use command IDs prefixed with the configured principal ID plus “:”, expectedVersion and a structured rationale. |
| Dedicated runtime MCP bearer | Existing owner operational resource authority | Use 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
- Queue the bounded task: dispatch the translation-ledger capability with
input.kind: TASK_ENQUEUEand data fieldsid, foundry, capabilityId, scope, dependencies, maxAttempts, retryPolicy. Use an explicit retry policy, NEVER or IDEMPOTENT. Set dependencies to [] for the currently supported independent-task path. - 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.
- 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.
- 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.
- 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
| Observation | Required next step |
|---|---|
| Lost response, AGENT_DISPATCHING or AGENT_UNCERTAIN | Read the original command record and namespace. Determine whether an effect committed before any retry. |
| AGENT_CONFLICT / EXPECTED_VERSION_CONFLICT / CONCURRENT_NAMESPACE_CHANGE | Retain 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_CONFLICT | Do not overwrite identity. Inspect the original command; use a new ID only for a genuinely new request. |
| Expired lease with retryPolicy NEVER | Automatic 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 IDEMPOTENT | The 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 error | Stop. Check the exact resource and existing grant with the owner. Do not fall back to a broader identity. |
| SUBMITTED, dependency still blocked | Submission 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.
- Namespace: up to 512 tasks; registry pages: 1–100 tasks; enqueue batch: 1–72.
- Lease duration: 1,000–300,000 milliseconds; attempts: 1–5; declared dependencies: up to 32, but their assessment binding is not currently supplied.
- Serialized capability input: 65,536 bytes maximum. Server-side bounds remain authoritative.
- Independent-model verification reported not ready: DIFFERENT_MODEL_ADAPTER_NOT_CONFIGURED. No independent assessment is implied by actor tests or record exports.
- No native Sites publishing capability is registered by this workflow. The development queue stages candidates. Its CARRIER_PUBLISHED marker with deploymentExecuted:false does not deploy a Site.
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.