SEIF Docs

TypeScript client

IMPLEMENTED thin client: sdk/typescript/context-client.ts, included in Runtime and control-plane distributions. It uses fetch and crypto, with no vendor SDK dependency. The bundled Node 24 can run TypeScript directly; normal applications can compile it with their TypeScript toolchain.

Methods: resolve(), expand(), reportConsumption(), reportOutcome(), health(), build() and trace(). Use a Runtime URL, or ContextClient.forEnvironment(registry, project, environment, appToken) for the Registry's stable environment endpoint with an application credential (0.4.0). Reports pass deploymentId and an auto-generated reportId and are retried on transport failure without duplication; resolve is never retried. ContextError preserves runtime error codes; timeouts are RUNTIME_TIMEOUT.

sendContext(resolved, sender, {name, model}) passes an independent copy of the exact context message array to the application-owned asynchronous sender. Only successful unchanged dispatch is reported. It neither intercepts other requests nor claims provider internal consumption. Unknown dispatch stays UNKNOWN; explicit observed consumption can MATCH, DIFFER or be UNKNOWN relative to rendered digest. Outcome feedback is separate supplied observation.

Run examples/sdk/agent.ts against a live Runtime for resolve, expand, consumption, outcome, trace and error examples. The acceptance harness copies this application and the SDK outside the repository and runs it using the delivered Node executable. No global Node/npm/seif-cli is required.

await client.runTurn(request, sender, evaluate?, provider?) provides one integration entry point. It returns {result, context, traceRef, reportingErrors}. An optional application-owned evaluator returns an Outcome with numeric metrics and explicit Evaluation identifiers (Reliability Impact). A successful application response survives report/evaluation failures; inspect the safe error codes to detect missing telemetry. Resolve/sender failures propagate; success is never inferred without evaluation. Redirects are refused. The caller still owns model execution and all application messages beyond the context supplied to the sender.

For an existing application with a canonical system-prompt composer, ContextDeliveryGateway and PendingContextSource deliver that contribution through an authenticated, bounded Runtime Context Provider. The gateway checks full canonical text preservation before model dispatch and propagates cancellation to resolve. The Estuda AI integration exercises the actual application tutor, not a replacement demo. The application's domain rules and outcome evaluator remain independent.

Versioned tools

Context and tool delivery documents tool declarations and profile rules, v2 tool Builds, executor bindings, synthetic tests, operator approval, SDK integration and effect-free replay. Tool-free Builds preserve the v1 contract.