UNPKG

@sema-agent/core

Version:

Stateless, task-oriented AI agent core

12 lines (11 loc) • 794 B
/** * The memory of one walk up a session log's parent chain, shared by `getPathToRoot`, the resume-at ancestry scan and the fork-point judge `settledForkOptions` (the import validator still keeps its own loop — #2253). An entry the * walk stands on twice means the parent links loop, which no ancestry can contain: the stored log does not hold together, so the walk is refused * `corrupt_session` naming that entry instead of being followed again, and saying what a person can do (start a new session, or fork from an entry the * loop does not touch). One guard per walk. */ export declare class ParentChainGuard { private readonly stepped; /** Records that the walk now stands on `id`; throws `corrupt_session` when it already stood there. */ stepOnto(id: string): void; }