agentfootprint
Version:
The explainable agent framework — backtrack a wrong answer to the exact context that caused it (evidence, not guesses). Built on footprintjs.
40 lines • 2.07 kB
TypeScript
/**
* hosting/memorySessions — conversations in a Map.
*
* The smallest thing that satisfies `SessionLifecycle`, for tests and for local
* development where a Redis is ceremony you have not earned yet. It is exactly
* as durable as the process: restart and every conversation is gone.
*
* That is not a shortcoming to apologise for, it is the point of the port. Swap
* this for a store that survives a restart and the standing agent is unchanged
* — which is also how the "a crashed process resumes the conversation" test is
* written: keep the store, throw away everything else, and watch the
* conversation come back through the envelope alone.
*
* The next step up ships beside this one: `sqliteSessions({ file })` is the same
* port in a file, with nothing to install.
*
* ── The owner index (9.26.0) ────────────────────────────────────────────────
* It also implements the two OPTIONAL members `listByUser` / `ownerOf`, which
* is what lets a host answer `{ op: 'session-list' }` for a verified caller.
* The owner is DERIVED at persist time from the stored conversation's own
* `identity.principal` (`envelopeOwner`) — never declared by a caller, because
* a store that let you state an owner is a store where owning somebody's
* session is a matter of asking. A conversation that ran anonymously has no
* owner and appears in nobody's list.
*
* Since 9.36.1 the owner rule is not written out here at all: it is
* `resolveSessionOwner`, shared with every other store, because four stores
* each spelling the same rule in their own dialect is how all four came to be
* missing the same half of it.
*/
import type { SessionLifecycle } from './types.js';
/**
* An in-process session store.
*
* @example
* const sessions = memorySessions();
* await standingAgent({ agent, sessions, host: nodeHost({ port: 8080 }) });
*/
export declare function memorySessions(): SessionLifecycle;
//# sourceMappingURL=memorySessions.d.ts.map