@code-yeongyu/senpi
Version:
Coding agent CLI with read, bash, edit, write tools and session management
22 lines • 1.65 kB
TypeScript
import type { AgentMessage, ThinkingLevel } from "@earendil-works/pi-agent-core";
import type { SessionEntry } from "./session-manager.ts";
/**
* The request-level effort of every request while a session holds a `configuration_update`: the baseline
* the model's prompt cache was built with, so effort changes travel only as `configuration_update` items
* (senpi#2094, senpi#4116). Without a valid baseline it is the live level.
*/
export declare function requestThinkingLevel(baseline: string | undefined, thinkingLevel: ThinkingLevel): ThinkingLevel;
/**
* The request context with the live level in force. On a flagged model the newest `configuration_update` is the
* effort a request carries, and a level that arrived without one (a fallback rung's, a favourite cycle's) would
* leave an older update in force. The live level rides the request only, never the session file, so a resumed
* session keeps the user's level (senpi#6655). It goes before the turn's user message, like a recorded update.
*/
export declare function withLiveConfigurationUpdate(messages: AgentMessage[], thinkingLevel: ThinkingLevel, timestamp: number): AgentMessage[];
/**
* The baseline a resumed session restores, replaying the rules `AgentSession` applies live: an in-model effort
* change (a `thinking_level_change` immediately followed by its `configuration_update`) pins the level that was
* active before it, and a switch to another model clears it, because the new model's cache starts empty.
*/
export declare function resumeReasoningBaseline(branch: readonly SessionEntry[]): string | undefined;
//# sourceMappingURL=reasoning-baseline.d.ts.map