@sema-agent/core
Version:
Stateless, task-oriented AI agent core
23 lines (22 loc) • 2.17 kB
TypeScript
/**
* The deployment's plain-http admission list — minted ONCE, at `new Runner`, from `RunnerDeps.plaintextOrigins` (declared) and the
* posture the deployment already carries (`RunnerDeps.crossBoundaryPosture`), by the one reading (`resolvePlaintextOrigins`): nothing
* written ⇒ the four private ranges and the same-machine names under a single-user (or undeclared) posture, none under `multi_tenant`;
* written ⇒ as written.
* The value rides the Runner's retained bag under a symbol (a bag spread or copied from it keeps it; a bag a host builds itself has
* none), and the one read of the Brain seat (`modelLaneBrainOf`) writes it on every call and every pre-flight it carries, over
* whatever the call brought. A bag without it reads no default: its calls are judged as the brains judge a call with no list (only
* this machine). The default's first real admission is told once (`plaintext-origins-watch.ts`).
*/
import { type PlaintextOrigins } from "@sema-agent/primitives";
import type { EngineNotice } from "./engine-notice.js";
/** The construction door: the posture word first (outside the set ⇒ `config.cross_boundary_posture` — the list's default is read
* by it, so it is judged here, never read as either word), then the list (`config.plaintext_origins_invalid`, every bad entry named). */
export declare function receivePlaintextOrigins(declared: unknown, posture: unknown): PlaintextOrigins;
/** Keep the minted value on the Runner's retained bag. */
export declare function keepPlaintextOrigins<D extends object>(bag: D, origins: PlaintextOrigins): D;
/** The deployment's value a bag carries: the Runner's bag and every bag spread or copied from it; `undefined` for a host's own bag. */
export declare function plaintextOriginsOf(deps: object): PlaintextOrigins | undefined;
/** The one mint of `config.plaintext_origins_admitted`: the default list admitted, for the first time on its Runner, a credential-carrying
* plain-http send to `origin` (the origin only — no path, no credential). */
export declare function plaintextOriginsAdmittedNotice(origins: PlaintextOrigins, posture: unknown, origin: string): EngineNotice;