UNPKG

agentfootprint

Version:

The explainable agent framework — backtrack a wrong answer to the exact context that caused it (evidence, not guesses). Built on footprintjs.

28 lines • 1.16 kB
"use strict"; /** * requestOfRun — the ONE reader of a runner's `options.request`. * * Every runner's `run()` / `resume()` reads the incoming request here, at its * door and before anything moves: a value `requestContext()` did not build is * refused by name. What it returns goes to exactly two places — the agent's * own run (`Agent.runRequest`) or the run a composition opens for its members * (`memberRun.ts · openParentRun`). It is never written to state, and the * engine is handed the options without it (`RunnerBase · runSignalOf`). * * Pattern: guard + accessor. Role: core, run input. */ Object.defineProperty(exports, "__esModule", { value: true }); exports.requestOf = void 0; const requestContext_js_1 = require("../identity/requestContext.js"); /** * The sealed request a runner's options carry, or `undefined`. * * @throws TypeError (naming `door`) when `request` is not a sealed request. */ function requestOf(options, door) { const request = options?.request; (0, requestContext_js_1.assertRequestContext)(request, door); return request; } exports.requestOf = requestOf; //# sourceMappingURL=requestOfRun.js.map