Neutrome SDK reference
    Preparing search index...

    Module lilsdk-ts/src

    Runtime contracts and combinators for building executors.

    The root entry point carries only contracts — Executor, Tool, ProgramTransform, ExecutorContext and friends. Everything that does work lives on a subpath, and each symbol has exactly one import path:

    • @neutrome/lilsdk/loopsretry, fallback, goal loops
    • @neutrome/lilsdk/tools — tool loops
    • @neutrome/lilsdk/managed — capability and attachment executors
    • @neutrome/lilsdk/stream — stream observation and output helpers
    • @neutrome/lilsdk/primitives — functional helpers over instruction lists

    Programs themselves are built with @neutrome/lil-engine, which owns the protocol; this package owns everything that runs.

    Executor factories are named create*Executor, except retry and fallback, which read better as bare verbs.

    import type { Executor } from "@neutrome/lilsdk";
    import { fallback, retry } from "@neutrome/lilsdk/loops";
    import { prependSystemPrompt } from "@neutrome/lil-engine";

    const upstream = fallback([retry("default/glm-5.2", { attempts: 3 }), "fast/gemma-4-31b"]);

    const executor: Executor = {
    async execute(request, ctx) {
    return ctx.invoke(upstream, prependSystemPrompt(request, "Be concise."));
    },
    async *stream(request, ctx) {
    yield* ctx.invokeStream(upstream, prependSystemPrompt(request, "Be concise."));
    },
    };
    Cache

    Key-value store handed to executors through RuntimeContext.cache.

    CachePutOptions

    Expiry options accepted by Cache.put.

    ExecutionEvent

    One audit record emitted while a request is being served.

    ExecutionEventInput

    ExecutionEvent before a timestamp is stamped on it.

    Executor

    The unit of composition: something that answers a program.

    ExecutorContext

    RuntimeContext plus the identity of the running execution.

    ExecutorInput

    An executor, or the id of a model to run.

    OutputSink

    Where streamed chunks are written.

    ProgramTransform

    A named, capability-scoped edit applied to every program passing through.

    RuntimeContext

    The runtime services available while a request is being served.

    Tool

    A tool the model may call during a tool loop.

    TransformCapability

    A capability a ProgramTransform declares before it may be applied.

    createExecutionEvent

    Stamps an audit event with the current time.