UNPKG

agentfootprint

Version:

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

291 lines • 30.4 kB
"use strict"; /** * agentfootprint/hosting — the ports between an agent and the place it runs. * * An agent that answers one call in a script and an agent that has been up for * a month differ in a few things: something has to carry requests to it, * something sometimes has to hold a channel OPEN to it, and the conversation * has to outlive the request. This subpath is those things as **ports**, plus * local adapters that prove the ports work, plus the composer that wires the * request half together. * * `AgentHost` — something can call me. * `ConversationHost` — something can talk to me, both ways, until one of us * ends it. `HostRequest → HostReply` is one exchange; * some doors are not. * `SessionLifecycle` — the conversation outlives the request. * `standingAgent` — hydrate → resume-or-fresh → persist → reply. * * ── Why the ports look like nothing in particular ──────────────────────────── * Deliberately. Not one field, name or assumption here comes from any hosting * product, cloud or protocol. A port shaped around one provider's request * envelope stops being a port and becomes that provider's SDK with extra steps, * and every adapter after the first pays for the shortcut. So the ports carry * an input, a reply, an optional session id, headers, a signal — the vocabulary * every transport already has — and everything specific to one place you might * deploy lives in the adapter for that place. `nodeHost` gets no special * treatment: its paths, status codes and JSON body shape are all in * `nodeHost.ts` and the port types do not know they exist. A test greps these * source files for vendor names, crudely and on purpose. * * ── What ships here ────────────────────────────────────────────────────────── * • `nodeHost({ port?, hostname?, invokePath?, healthPath? })` — plain * `node:http`, zero dependencies. `POST /invoke`, `GET /health`, and * Server-Sent Events when the caller asks for them. * • `httpHost({ name, wire, invokePath, healthPath, ... })` — the HTTP work * itself, parameterised by the JSON dialect it speaks. `nodeHost` is one * configuration of it; an adapter for someone's container runtime is * another. Two paths and five body shapes are all a second HTTP adapter * re-decides. Pass `server` and it attaches to a `node:http` server YOU * own instead of binding one — for the container that gets a single port * and must serve a WebSocket upgrade (or anything else) beside the agent. * • `host.serveConversations(handler)` — the conversation door, on every * adapter built on `httpHost` that was given a `conversationPath`. * `nodeHost` serves it on `/conversation` with a real WebSocket * implementation and **no dependency to install**, sharing the socket with * `/invoke`. Frames are STRINGS at the port; what they mean is your * protocol's business, not this port's. * • `ConversationLimits` — the ceilings a door DECLARES * (`maxFrameBytes`, `idleMs`, `maxPendingBytes`) so the layer above can * chunk or heartbeat on its own protocol. The port does neither, on * purpose: hiding a cap inside auto-chunking decides a protocol question * for every consumer at once. * • `memorySessions()` — conversations in a Map, for tests and local dev. * • `sqliteSessions({ file })` — the same port, in a file, so a restart is not * an amnesia event. Conversations AND runs paused waiting on a person, in * one table, on Node's built-in `node:sqlite` — nothing to install and no * peer dependency. One machine, one file, one writer at a time is the * stated ceiling; it is not a distributed store. Refuses BY NAME on a Node * without `node:sqlite` rather than falling back to memory, because a store * that silently forgot everything looks exactly like a new user. * • `standingAgent({ agent, sessions, host, durability? })` — the composer. * `{ agentFactory }` instead of `{ agent }` gives every ACTIVE SESSION its * own agent, so sessions run in parallel while each session's turns still * serialize on its own instance — bounded by `maxActiveSessions`, evicted * least-recently-used, and invisible when it evicts because the * conversation lives in the store rather than in the instance. * • `toEnvelope` / `readEnvelope` — pack a conversation, and refuse by name to * unpack a format this runtime does not know. * • `toPausedEnvelope` / `readPausedRun` — the same for a run that stopped to * ask a person something (`'flowchart-v1'`). `checkEnvelope` validates * either without committing to which half you wanted — what a STORE wants. * • `UnreadableEnvelopeError` — the refusal every reader and every store * adapter inherits when a stored session is PRESENT but cannot be read. An * unreadable stored conversation and an absent one are different facts, and * only one of them is safe to answer with a fresh start. * • `sessionRetention(sessions)` — how long a store keeps a conversation. * The port's optional `retention()` member, feature-detected once: a store * that deletes its own bytes hands back a sweep your cron calls, one whose * backend expires rows hands back the policy and the step that arms it, and * a store that can do neither is REFUSED BY NAME rather than sweeping * nothing. Nothing here runs on a timer of its own, and no wire op deletes * a conversation. * • `requireCapability` — feature-detection with teeth. * * @example An agent that stays up and remembers * import { Agent } from 'agentfootprint'; * import { standingAgent, nodeHost, memorySessions } from 'agentfootprint/hosting'; * * const handle = await standingAgent({ * agent: Agent.create({ provider, model }).system('You help customers.').build(), * sessions: memorySessions(), * host: nodeHost({ port: 8080 }), * }); * process.on('SIGTERM', () => void handle.close()); */ Object.defineProperty(exports, "__esModule", { value: true }); exports.SessionOpNeedsIdentityError = exports.AdmissionRefusedError = exports.VerifierUnavailableError = exports.IdentityNotVerifiedError = exports.RequestArtifactsRevokedError = exports.TurnArtifactsExpiredError = exports.RecordingTooLargeForAccountError = exports.ArtifactOpsBusyError = exports.ArtifactNotCarriedError = exports.ArtifactNotFoundError = exports.NoArtifactStoreError = exports.ArtifactSessionRequiredError = exports.InvalidWireOpError = exports.FrameTooLargeError = exports.ConversationClosedError = exports.UnreadableEnvelopeError = exports.NoPendingAskError = exports.AwaitingDecisionError = exports.PauseNotCarriedError = exports.ConcurrentRunError = exports.HostClosedError = exports.requireCapability = exports.TURN_ARTIFACTS_TIMEOUT_MS = exports.DEFAULT_SWEEP_LIMIT = exports.DEFAULT_MAX_ACTIVE_SESSIONS = exports.DEFAULT_ARTIFACT_OPS_PER_SESSION = exports.standingAgent = exports.listedFormatOf = exports.checkEnvelope = exports.readPausedRun = exports.readEnvelope = exports.toPausedEnvelope = exports.envelopeTranscript = exports.envelopeOwner = exports.toEnvelope = exports.UnreadableSessionFileError = exports.SqliteUnavailableError = exports.sqliteSessions = exports.memorySessions = exports.verifiedThreads = exports.DEFAULT_STREAM_MAX_BODY_BYTES = exports.DEFAULT_STREAM_HEARTBEAT_MS = exports.streamHandler = exports.headerValue = exports.httpHost = exports.DEFAULT_NODE_MAX_BODY_BYTES = exports.DEFAULT_SESSION_HEADER = exports.jsonWireWith = exports.jsonWire = exports.nodeHost = void 0; exports.sessionWireBody = exports.readSessionWireOp = exports.turnsPerHour = exports.spendLedger = exports.spendKeyFor = exports.RedirectSignInError = exports.SIGN_IN_COOKIE_LOCALHOST = exports.SIGN_IN_COOKIE = exports.sealKeyFrom = exports.randomSealKey = exports.safeReturnTo = exports.signInAuditLine = exports.SIGN_IN_AUDIT_PREFIX = exports.SignInStoreFullError = exports.SignInDoorConfigError = exports.PasswordCheckUnreachableError = exports.MemorySignInsConfigError = exports.memorySignIns = exports.DEFAULT_SIGN_INS_PER_ACCOUNT = exports.DEFAULT_SIGN_IN_MAX = exports.WRONG_CREDENTIAL_SENTENCE = exports.signInDoor = exports.accountKeyOf = exports.signInSource = exports.withoutCredentials = exports.signInKeyOf = exports.readSignIn = exports.CREDENTIAL_HEADERS = exports.verifyRequestIdentity = exports.bearerToken = exports.sessionLifecycleConformance = exports.runSessionLifecycleConformance = exports.runSessionLifecycleCase = exports.formatConformanceReport = exports.resolveSessionOwner = exports.sessionRetention = exports.MAX_SESSION_ID_LENGTH = exports.doorGuard = exports.checkSessionId = exports.InvalidSessionIdError = exports.HostNotAllowedError = exports.OriginNotAllowedError = exports.UnsupportedMediaTypeError = exports.WireRequestRefusal = exports.RequestTooLargeError = exports.SessionsNotCarriedError = exports.SessionOwnershipConflictError = exports.SessionNotFoundError = exports.SessionRetentionUnavailableError = exports.SessionIndexUnavailableError = void 0; exports.ARTIFACT_GET_OP = exports.ARTIFACT_HEAD_OP = exports.artifactWireBody = exports.readArtifactWireOp = exports.WIRE_OPS = exports.refuseUnknownWireOp = exports.isWireOp = exports.ALL_WIRE_OPS = exports.SESSION_PENDING_OP = exports.SESSION_TRANSCRIPT_OP = exports.SESSION_LIST_OP = void 0; var nodeHost_js_1 = require("./nodeHost.js"); Object.defineProperty(exports, "nodeHost", { enumerable: true, get: function () { return nodeHost_js_1.nodeHost; } }); Object.defineProperty(exports, "jsonWire", { enumerable: true, get: function () { return nodeHost_js_1.jsonWire; } }); Object.defineProperty(exports, "jsonWireWith", { enumerable: true, get: function () { return nodeHost_js_1.jsonWireWith; } }); Object.defineProperty(exports, "DEFAULT_SESSION_HEADER", { enumerable: true, get: function () { return nodeHost_js_1.DEFAULT_SESSION_HEADER; } }); Object.defineProperty(exports, "DEFAULT_NODE_MAX_BODY_BYTES", { enumerable: true, get: function () { return nodeHost_js_1.DEFAULT_NODE_MAX_BODY_BYTES; } }); // `browserSessionId` — the CLIENT half of a session — is deliberately NOT on // this barrel. It lives in `./browserSession.ts` beside the server half it // pairs with, and is exported from the MAIN barrel instead: everything else in // this folder is Node (`node:http` behind a dynamic import, `node:sqlite` // behind `createRequire`), and a browser bundle must not have to reach through // a Node door to mint a session id. var httpHost_js_1 = require("./httpHost.js"); Object.defineProperty(exports, "httpHost", { enumerable: true, get: function () { return httpHost_js_1.httpHost; } }); Object.defineProperty(exports, "headerValue", { enumerable: true, get: function () { return httpHost_js_1.headerValue; } }); var streamHandler_js_1 = require("./streamHandler.js"); Object.defineProperty(exports, "streamHandler", { enumerable: true, get: function () { return streamHandler_js_1.streamHandler; } }); Object.defineProperty(exports, "DEFAULT_STREAM_HEARTBEAT_MS", { enumerable: true, get: function () { return streamHandler_js_1.DEFAULT_STREAM_HEARTBEAT_MS; } }); Object.defineProperty(exports, "DEFAULT_STREAM_MAX_BODY_BYTES", { enumerable: true, get: function () { return streamHandler_js_1.DEFAULT_STREAM_MAX_BODY_BYTES; } }); var verifiedThreads_js_1 = require("./verifiedThreads.js"); Object.defineProperty(exports, "verifiedThreads", { enumerable: true, get: function () { return verifiedThreads_js_1.verifiedThreads; } }); var memorySessions_js_1 = require("./memorySessions.js"); Object.defineProperty(exports, "memorySessions", { enumerable: true, get: function () { return memorySessions_js_1.memorySessions; } }); var sqliteSessions_js_1 = require("./sqliteSessions.js"); Object.defineProperty(exports, "sqliteSessions", { enumerable: true, get: function () { return sqliteSessions_js_1.sqliteSessions; } }); Object.defineProperty(exports, "SqliteUnavailableError", { enumerable: true, get: function () { return sqliteSessions_js_1.SqliteUnavailableError; } }); Object.defineProperty(exports, "UnreadableSessionFileError", { enumerable: true, get: function () { return sqliteSessions_js_1.UnreadableSessionFileError; } }); var envelope_js_1 = require("./envelope.js"); Object.defineProperty(exports, "toEnvelope", { enumerable: true, get: function () { return envelope_js_1.toEnvelope; } }); Object.defineProperty(exports, "envelopeOwner", { enumerable: true, get: function () { return envelope_js_1.envelopeOwner; } }); Object.defineProperty(exports, "envelopeTranscript", { enumerable: true, get: function () { return envelope_js_1.envelopeTranscript; } }); Object.defineProperty(exports, "toPausedEnvelope", { enumerable: true, get: function () { return envelope_js_1.toPausedEnvelope; } }); Object.defineProperty(exports, "readEnvelope", { enumerable: true, get: function () { return envelope_js_1.readEnvelope; } }); Object.defineProperty(exports, "readPausedRun", { enumerable: true, get: function () { return envelope_js_1.readPausedRun; } }); Object.defineProperty(exports, "checkEnvelope", { enumerable: true, get: function () { return envelope_js_1.checkEnvelope; } }); // What a session listing reports for a stored envelope — every store that // lists calls it, in-tree and out (the conformance battery checks it). var answeredPause_js_1 = require("./answeredPause.js"); Object.defineProperty(exports, "listedFormatOf", { enumerable: true, get: function () { return answeredPause_js_1.listedFormatOf; } }); var standingAgent_js_1 = require("./standingAgent.js"); Object.defineProperty(exports, "standingAgent", { enumerable: true, get: function () { return standingAgent_js_1.standingAgent; } }); var types_js_1 = require("./types.js"); Object.defineProperty(exports, "DEFAULT_ARTIFACT_OPS_PER_SESSION", { enumerable: true, get: function () { return types_js_1.DEFAULT_ARTIFACT_OPS_PER_SESSION; } }); Object.defineProperty(exports, "DEFAULT_MAX_ACTIVE_SESSIONS", { enumerable: true, get: function () { return types_js_1.DEFAULT_MAX_ACTIVE_SESSIONS; } }); Object.defineProperty(exports, "DEFAULT_SWEEP_LIMIT", { enumerable: true, get: function () { return types_js_1.DEFAULT_SWEEP_LIMIT; } }); Object.defineProperty(exports, "TURN_ARTIFACTS_TIMEOUT_MS", { enumerable: true, get: function () { return types_js_1.TURN_ARTIFACTS_TIMEOUT_MS; } }); var errors_js_1 = require("./errors.js"); Object.defineProperty(exports, "requireCapability", { enumerable: true, get: function () { return errors_js_1.requireCapability; } }); Object.defineProperty(exports, "HostClosedError", { enumerable: true, get: function () { return errors_js_1.HostClosedError; } }); Object.defineProperty(exports, "ConcurrentRunError", { enumerable: true, get: function () { return errors_js_1.ConcurrentRunError; } }); Object.defineProperty(exports, "PauseNotCarriedError", { enumerable: true, get: function () { return errors_js_1.PauseNotCarriedError; } }); Object.defineProperty(exports, "AwaitingDecisionError", { enumerable: true, get: function () { return errors_js_1.AwaitingDecisionError; } }); Object.defineProperty(exports, "NoPendingAskError", { enumerable: true, get: function () { return errors_js_1.NoPendingAskError; } }); Object.defineProperty(exports, "UnreadableEnvelopeError", { enumerable: true, get: function () { return errors_js_1.UnreadableEnvelopeError; } }); Object.defineProperty(exports, "ConversationClosedError", { enumerable: true, get: function () { return errors_js_1.ConversationClosedError; } }); Object.defineProperty(exports, "FrameTooLargeError", { enumerable: true, get: function () { return errors_js_1.FrameTooLargeError; } }); Object.defineProperty(exports, "InvalidWireOpError", { enumerable: true, get: function () { return errors_js_1.InvalidWireOpError; } }); Object.defineProperty(exports, "ArtifactSessionRequiredError", { enumerable: true, get: function () { return errors_js_1.ArtifactSessionRequiredError; } }); Object.defineProperty(exports, "NoArtifactStoreError", { enumerable: true, get: function () { return errors_js_1.NoArtifactStoreError; } }); Object.defineProperty(exports, "ArtifactNotFoundError", { enumerable: true, get: function () { return errors_js_1.ArtifactNotFoundError; } }); Object.defineProperty(exports, "ArtifactNotCarriedError", { enumerable: true, get: function () { return errors_js_1.ArtifactNotCarriedError; } }); Object.defineProperty(exports, "ArtifactOpsBusyError", { enumerable: true, get: function () { return errors_js_1.ArtifactOpsBusyError; } }); Object.defineProperty(exports, "RecordingTooLargeForAccountError", { enumerable: true, get: function () { return errors_js_1.RecordingTooLargeForAccountError; } }); Object.defineProperty(exports, "TurnArtifactsExpiredError", { enumerable: true, get: function () { return errors_js_1.TurnArtifactsExpiredError; } }); Object.defineProperty(exports, "RequestArtifactsRevokedError", { enumerable: true, get: function () { return errors_js_1.RequestArtifactsRevokedError; } }); Object.defineProperty(exports, "IdentityNotVerifiedError", { enumerable: true, get: function () { return errors_js_1.IdentityNotVerifiedError; } }); Object.defineProperty(exports, "VerifierUnavailableError", { enumerable: true, get: function () { return errors_js_1.VerifierUnavailableError; } }); Object.defineProperty(exports, "AdmissionRefusedError", { enumerable: true, get: function () { return errors_js_1.AdmissionRefusedError; } }); Object.defineProperty(exports, "SessionOpNeedsIdentityError", { enumerable: true, get: function () { return errors_js_1.SessionOpNeedsIdentityError; } }); Object.defineProperty(exports, "SessionIndexUnavailableError", { enumerable: true, get: function () { return errors_js_1.SessionIndexUnavailableError; } }); Object.defineProperty(exports, "SessionRetentionUnavailableError", { enumerable: true, get: function () { return errors_js_1.SessionRetentionUnavailableError; } }); Object.defineProperty(exports, "SessionNotFoundError", { enumerable: true, get: function () { return errors_js_1.SessionNotFoundError; } }); Object.defineProperty(exports, "SessionOwnershipConflictError", { enumerable: true, get: function () { return errors_js_1.SessionOwnershipConflictError; } }); Object.defineProperty(exports, "SessionsNotCarriedError", { enumerable: true, get: function () { return errors_js_1.SessionsNotCarriedError; } }); Object.defineProperty(exports, "RequestTooLargeError", { enumerable: true, get: function () { return errors_js_1.RequestTooLargeError; } }); Object.defineProperty(exports, "WireRequestRefusal", { enumerable: true, get: function () { return errors_js_1.WireRequestRefusal; } }); Object.defineProperty(exports, "UnsupportedMediaTypeError", { enumerable: true, get: function () { return errors_js_1.UnsupportedMediaTypeError; } }); Object.defineProperty(exports, "OriginNotAllowedError", { enumerable: true, get: function () { return errors_js_1.OriginNotAllowedError; } }); Object.defineProperty(exports, "HostNotAllowedError", { enumerable: true, get: function () { return errors_js_1.HostNotAllowedError; } }); Object.defineProperty(exports, "InvalidSessionIdError", { enumerable: true, get: function () { return errors_js_1.InvalidSessionIdError; } }); // The door guard — what a request has to be before any handler sees it: a // request that changes something says it is JSON, a browser drives the door // only from an allowed origin, a Host is one the door was configured for, and // a session id is bounded. `httpHost` enforces it on both of its doors; it is // exported so an application's OWN routes beside the door (a sign-in route on // `onUnhandled`) keep the same rule in the same spelling. var doorGuard_js_1 = require("./doorGuard.js"); Object.defineProperty(exports, "checkSessionId", { enumerable: true, get: function () { return doorGuard_js_1.checkSessionId; } }); Object.defineProperty(exports, "doorGuard", { enumerable: true, get: function () { return doorGuard_js_1.doorGuard; } }); Object.defineProperty(exports, "MAX_SESSION_ID_LENGTH", { enumerable: true, get: function () { return doorGuard_js_1.MAX_SESSION_ID_LENGTH; } }); // Retention (9.42.0) — the ONE feature detection for the port's optional // `retention()` member, and the refusal a store without one produces. A door // rather than `sessions.retention?.()`, because `undefined` there reads as // "fine" and a retention job that quietly deletes nothing is the failure this // whole member exists to prevent. var sessionRetention_js_1 = require("./sessionRetention.js"); Object.defineProperty(exports, "sessionRetention", { enumerable: true, get: function () { return sessionRetention_js_1.sessionRetention; } }); // The one owner-transition rule (9.36.1) — shared by every store here, and // available to any store anybody else writes. Four adapters each spelling this // rule out in their own dialect is how all four came to be missing the same // half of it. var sessionOwnership_js_1 = require("./sessionOwnership.js"); Object.defineProperty(exports, "resolveSessionOwner", { enumerable: true, get: function () { return sessionOwnership_js_1.resolveSessionOwner; } }); // The battery a store must pass to CLAIM the port (9.36.1), exported beside // the port itself so an out-of-tree store imports the check the same way it // imports the interface it is implementing. // See src/hosting/conformance/README.md. var index_js_1 = require("./conformance/index.js"); Object.defineProperty(exports, "formatConformanceReport", { enumerable: true, get: function () { return index_js_1.formatConformanceReport; } }); Object.defineProperty(exports, "runSessionLifecycleCase", { enumerable: true, get: function () { return index_js_1.runSessionLifecycleCase; } }); Object.defineProperty(exports, "runSessionLifecycleConformance", { enumerable: true, get: function () { return index_js_1.runSessionLifecycleConformance; } }); Object.defineProperty(exports, "sessionLifecycleConformance", { enumerable: true, get: function () { return index_js_1.sessionLifecycleConformance; } }); // Verified identity at the door (9.26.0) — the badge is CHECKED instead of // read off. `IdentityVerifier` is the port; `jwksIdentity` (from // `agentfootprint/security`) is the shipped adapter; `bearerToken` is the one // extraction every dialect's credential arrives through. var identityVerification_js_1 = require("./identityVerification.js"); Object.defineProperty(exports, "bearerToken", { enumerable: true, get: function () { return identityVerification_js_1.bearerToken; } }); Object.defineProperty(exports, "verifyRequestIdentity", { enumerable: true, get: function () { return identityVerification_js_1.verifyRequestIdentity; } }); // The credential seam (identity strategies, step 3) — the sign-in cookie comes // off the headers at the transport and only its KEY goes on; one credential per // request; a socket's sign-in is checked before the 101, re-checked per frame, // and closed when it ends. See src/hosting/signin/README.md. var cookie_js_1 = require("./signin/cookie.js"); Object.defineProperty(exports, "CREDENTIAL_HEADERS", { enumerable: true, get: function () { return cookie_js_1.CREDENTIAL_HEADERS; } }); Object.defineProperty(exports, "readSignIn", { enumerable: true, get: function () { return cookie_js_1.readSignIn; } }); Object.defineProperty(exports, "signInKeyOf", { enumerable: true, get: function () { return cookie_js_1.signInKeyOf; } }); Object.defineProperty(exports, "withoutCredentials", { enumerable: true, get: function () { return cookie_js_1.withoutCredentials; } }); var source_js_1 = require("./signin/source.js"); Object.defineProperty(exports, "signInSource", { enumerable: true, get: function () { return source_js_1.signInSource; } }); // The sign-in door (identity strategies, step 4) — `/auth/config`, `/auth/me`, // `/auth/login` (password), `/auth/logout`; a bounded in-memory store. var door_js_1 = require("./signin/door.js"); Object.defineProperty(exports, "accountKeyOf", { enumerable: true, get: function () { return door_js_1.accountKeyOf; } }); Object.defineProperty(exports, "signInDoor", { enumerable: true, get: function () { return door_js_1.signInDoor; } }); Object.defineProperty(exports, "WRONG_CREDENTIAL_SENTENCE", { enumerable: true, get: function () { return door_js_1.WRONG_CREDENTIAL_SENTENCE; } }); var memorySignIns_js_1 = require("./signin/memorySignIns.js"); Object.defineProperty(exports, "DEFAULT_SIGN_IN_MAX", { enumerable: true, get: function () { return memorySignIns_js_1.DEFAULT_SIGN_IN_MAX; } }); Object.defineProperty(exports, "DEFAULT_SIGN_INS_PER_ACCOUNT", { enumerable: true, get: function () { return memorySignIns_js_1.DEFAULT_SIGN_INS_PER_ACCOUNT; } }); Object.defineProperty(exports, "memorySignIns", { enumerable: true, get: function () { return memorySignIns_js_1.memorySignIns; } }); var errors_js_2 = require("./signin/errors.js"); Object.defineProperty(exports, "MemorySignInsConfigError", { enumerable: true, get: function () { return errors_js_2.MemorySignInsConfigError; } }); Object.defineProperty(exports, "PasswordCheckUnreachableError", { enumerable: true, get: function () { return errors_js_2.PasswordCheckUnreachableError; } }); Object.defineProperty(exports, "SignInDoorConfigError", { enumerable: true, get: function () { return errors_js_2.SignInDoorConfigError; } }); Object.defineProperty(exports, "SignInStoreFullError", { enumerable: true, get: function () { return errors_js_2.SignInStoreFullError; } }); // The sign-in door's audit trail — `signInDoor({ onAudit, log })`: one record // per sign-in outcome, never a password, cookie or token. var audit_js_1 = require("./signin/audit.js"); Object.defineProperty(exports, "SIGN_IN_AUDIT_PREFIX", { enumerable: true, get: function () { return audit_js_1.SIGN_IN_AUDIT_PREFIX; } }); Object.defineProperty(exports, "signInAuditLine", { enumerable: true, get: function () { return audit_js_1.signInAuditLine; } }); var returnTo_js_1 = require("./signin/returnTo.js"); Object.defineProperty(exports, "safeReturnTo", { enumerable: true, get: function () { return returnTo_js_1.safeReturnTo; } }); var seal_js_1 = require("./signin/seal.js"); Object.defineProperty(exports, "randomSealKey", { enumerable: true, get: function () { return seal_js_1.randomSealKey; } }); Object.defineProperty(exports, "sealKeyFrom", { enumerable: true, get: function () { return seal_js_1.sealKeyFrom; } }); var types_js_2 = require("./signin/types.js"); Object.defineProperty(exports, "SIGN_IN_COOKIE", { enumerable: true, get: function () { return types_js_2.SIGN_IN_COOKIE; } }); Object.defineProperty(exports, "SIGN_IN_COOKIE_LOCALHOST", { enumerable: true, get: function () { return types_js_2.SIGN_IN_COOKIE_LOCALHOST; } }); Object.defineProperty(exports, "RedirectSignInError", { enumerable: true, get: function () { return types_js_2.RedirectSignInError; } }); // Admission (9.26.0) — decide whether a request runs before it costs anything. // `turnsPerHour` is the shipped reference policy; `spendLedger` is the // in-process rolling-window accountant the composer feeds. var admission_js_1 = require("./admission.js"); Object.defineProperty(exports, "spendKeyFor", { enumerable: true, get: function () { return admission_js_1.spendKeyFor; } }); Object.defineProperty(exports, "spendLedger", { enumerable: true, get: function () { return admission_js_1.spendLedger; } }); Object.defineProperty(exports, "turnsPerHour", { enumerable: true, get: function () { return admission_js_1.turnsPerHour; } }); // The session-history wire operations (9.26.0) — a person's own conversations, // answered only for a VERIFIED caller. One grammar owner, exactly as the // artifact ops have. var sessionWire_js_1 = require("./sessionWire.js"); Object.defineProperty(exports, "readSessionWireOp", { enumerable: true, get: function () { return sessionWire_js_1.readSessionWireOp; } }); Object.defineProperty(exports, "sessionWireBody", { enumerable: true, get: function () { return sessionWire_js_1.sessionWireBody; } }); Object.defineProperty(exports, "SESSION_LIST_OP", { enumerable: true, get: function () { return sessionWire_js_1.SESSION_LIST_OP; } }); Object.defineProperty(exports, "SESSION_TRANSCRIPT_OP", { enumerable: true, get: function () { return sessionWire_js_1.SESSION_TRANSCRIPT_OP; } }); Object.defineProperty(exports, "SESSION_PENDING_OP", { enumerable: true, get: function () { return sessionWire_js_1.SESSION_PENDING_OP; } }); var wireOps_js_1 = require("./wireOps.js"); Object.defineProperty(exports, "ALL_WIRE_OPS", { enumerable: true, get: function () { return wireOps_js_1.ALL_WIRE_OPS; } }); Object.defineProperty(exports, "isWireOp", { enumerable: true, get: function () { return wireOps_js_1.isWireOp; } }); Object.defineProperty(exports, "refuseUnknownWireOp", { enumerable: true, get: function () { return wireOps_js_1.refuseUnknownWireOp; } }); Object.defineProperty(exports, "WIRE_OPS", { enumerable: true, get: function () { return wireOps_js_1.WIRE_OPS; } }); // The artifact wire operations (9.23.0) — the screen's half of render-by-ref: // `{ op: 'artifact-head' | 'artifact-get', ref }` on the invoke path redeems // a claim ticket under the requesting session's identity-composed scope. // The grammar has ONE owner; a custom HttpWire dialect reads the ops with // `readArtifactWireOp` and answers with `artifactWireBody`, exactly as the // two shipped dialects do. var artifactWire_js_1 = require("./artifactWire.js"); Object.defineProperty(exports, "readArtifactWireOp", { enumerable: true, get: function () { return artifactWire_js_1.readArtifactWireOp; } }); Object.defineProperty(exports, "artifactWireBody", { enumerable: true, get: function () { return artifactWire_js_1.artifactWireBody; } }); Object.defineProperty(exports, "ARTIFACT_HEAD_OP", { enumerable: true, get: function () { return artifactWire_js_1.ARTIFACT_HEAD_OP; } }); Object.defineProperty(exports, "ARTIFACT_GET_OP", { enumerable: true, get: function () { return artifactWire_js_1.ARTIFACT_GET_OP; } }); //# sourceMappingURL=index.js.map