@code-yeongyu/senpi
Version:
Coding agent CLI with read, bash, edit, write tools and session management
17 lines • 1.45 kB
TypeScript
import type { AnthropicSubscriptionSessionEntry, SessionBranchInfo } from "./session-registry.ts";
export type AnnotatableRegistry = {
get(senpiSessionId: string): AnthropicSubscriptionSessionEntry | undefined;
touch(entry: AnthropicSubscriptionSessionEntry): void;
};
/**
* Starts the live model switch without waiting for it: the claude CLI confirms the model with the API on every
* `setModel` (80-280 ms, 15 s when unreachable), and `model_select` must not hold `set_model` for it (senpi#6411).
* Switches chain on `entry.pendingModelSwitch` so they apply in order; the next turn admission awaits the chain.
* A failed switch is logged and leaves `modelId` on the last confirmed model, so that admission sees the drift and
* reattaches the same lineage on a fresh process with the selected model (`model_changed`), keeping the binding.
*/
export declare function switchEntryModel(registry: AnnotatableRegistry, senpiSessionId: string, modelId: string, sdkModel?: string): boolean;
export declare function annotatePendingFork(registry: AnnotatableRegistry, senpiSessionId: string, reason: string, divergedPath?: string): void;
export declare function annotateTainted(registry: AnnotatableRegistry, senpiSessionId: string, reason: string): void;
export declare function annotateBranchInfo(registry: AnnotatableRegistry, senpiSessionId: string, info: SessionBranchInfo): void;
//# sourceMappingURL=session-entry-annotations.d.ts.map