repositories
loading repo index
repositories
loading repo index
repository
loading code, commits, and activity
public Clawd ADK gateway launch mirror
stars
latest
clone command
git clone gitlawb://did:key:z6Mkq5mY...iFZ5/my-project-publ...git clone gitlawb://did:key:z6Mkq5mY.../my-project-publ...2fa351d6docs: add automaton and perps launch sources16d ago| #1 | /** |
| #2 | * Context Window Management |
| #3 | * |
| #4 | * Manages the conversation history for the agent loop. |
| #5 | * Handles summarization to keep within token limits. |
| #6 | */ |
| #7 | import type { ChatMessage, AgentTurn, InferenceClient } from "../types.js"; |
| #8 | /** |
| #9 | * Build the message array for the next inference call. |
| #10 | * Includes system prompt + recent conversation history. |
| #11 | */ |
| #12 | export declare function buildContextMessages(systemPrompt: string, recentTurns: AgentTurn[], pendingInput?: { |
| #13 | content: string; |
| #14 | source: string; |
| #15 | }): ChatMessage[]; |
| #16 | /** |
| #17 | * Trim context to fit within limits. |
| #18 | * Keeps the system prompt and most recent turns. |
| #19 | */ |
| #20 | export declare function trimContext(turns: AgentTurn[], maxTurns?: number): AgentTurn[]; |
| #21 | /** |
| #22 | * Summarize old turns into a compact context entry. |
| #23 | * Used when context grows too large. |
| #24 | */ |
| #25 | export declare function summarizeTurns(turns: AgentTurn[], inference: InferenceClient): Promise<string>; |
| #26 | //# sourceMappingURL=context.d.ts.map |