agent-afk 5.265.3 → 5.266.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agent/_lib/dir-newest-mtime.d.ts +5 -0
- package/dist/agent/dag-subagent.d.ts +2 -1
- package/dist/agent/journal/append-queue.d.ts +17 -0
- package/dist/agent/journal/blobs.d.ts +14 -0
- package/dist/agent/journal/fork.d.ts +1 -0
- package/dist/agent/journal/hydrate.d.ts +4 -0
- package/dist/agent/journal/index.d.ts +5 -0
- package/dist/agent/journal/journal-file.d.ts +37 -0
- package/dist/agent/journal/noop.d.ts +3 -0
- package/dist/agent/journal/reader.d.ts +24 -0
- package/dist/agent/journal/records.d.ts +13 -0
- package/dist/agent/journal/spill.d.ts +9 -0
- package/dist/agent/journal/sync.d.ts +18 -0
- package/dist/agent/journal/types.d.ts +121 -0
- package/dist/agent/journal/writer.d.ts +11 -0
- package/dist/agent/provider.d.ts +2 -0
- package/dist/agent/providers/anthropic-direct/journal-adapter.d.ts +3 -0
- package/dist/agent/providers/anthropic-direct/query/session-state.d.ts +4 -0
- package/dist/agent/providers/anthropic-direct/query/turn-request.d.ts +1 -0
- package/dist/agent/providers/anthropic-direct/query-options.d.ts +1 -0
- package/dist/agent/providers/anthropic-direct/query-runtime.d.ts +2 -0
- package/dist/agent/providers/anthropic-direct/request-types.d.ts +1 -0
- package/dist/agent/providers/openai-compatible/journal-adapter.d.ts +4 -0
- package/dist/agent/providers/openai-compatible/query/journal-wiring.d.ts +18 -0
- package/dist/agent/providers/openai-compatible/query.d.ts +3 -0
- package/dist/agent/providers/router/provider-router.d.ts +2 -0
- package/dist/agent/providers/shared/compaction.d.ts +2 -0
- package/dist/agent/providers/shared/resume-usage-seed.d.ts +8 -0
- package/dist/agent/session/agent-session.d.ts +3 -0
- package/dist/agent/session/journal-lifecycle.d.ts +22 -0
- package/dist/agent/session/session-config.d.ts +2 -0
- package/dist/agent/session/session-reset.d.ts +2 -0
- package/dist/agent/session/session-setup.d.ts +1 -0
- package/dist/agent/session-sidecar-sweep.d.ts +2 -0
- package/dist/agent/session-sidecar-sweep.dirs.d.ts +9 -0
- package/dist/agent/subagent/fork-types.d.ts +6 -1
- package/dist/agent/tools/compose-executor.d.ts +1 -1
- package/dist/agent/tools/nesting.d.ts +2 -1
- package/dist/agent/tools/skill-executor/fork-child-config.d.ts +5 -1
- package/dist/agent/tools/skill-executor/fork-dispatch.d.ts +2 -0
- package/dist/agent/tools/skill-executor/types.d.ts +3 -2
- package/dist/agent/tools/subagent/child-config.d.ts +4 -1
- package/dist/agent/tools/subagent-executor/types.d.ts +3 -2
- package/dist/agent/types/config-types.d.ts +3 -0
- package/dist/agent/types/session-types.d.ts +2 -0
- package/dist/cli/commands/interactive/turn-handler.completion.d.ts +0 -5
- package/dist/cli/commands/interactive/turn-handler.d.ts +0 -1
- package/dist/cli/commands/trace-format.d.ts +6 -0
- package/dist/cli/commands/trace-results.d.ts +13 -0
- package/dist/cli/commands/trace.d.ts +2 -0
- package/dist/cli/slash/session-stats.d.ts +1 -2
- package/dist/cli.mjs +465 -443
- package/dist/config/env.d.ts +7 -0
- package/dist/config/env.session-storage.d.ts +15 -0
- package/dist/index.mjs +175 -160
- package/dist/paths.d.ts +1 -0
- package/dist/paths.journal.d.ts +4 -0
- package/dist/telegram.mjs +226 -211
- package/dist/web-server/routes.tool-results.d.ts +12 -0
- package/dist/web-server/shared/ledger-adapter.d.ts +4 -0
- package/dist/web-server/tool-result-text.d.ts +5 -0
- package/dist/web-ui-assets/assets/{index-yyhuSaHa.js → index-CpbGrtNj.js} +75 -75
- package/dist/web-ui-assets/assets/{index-DA-_KrIR.js → index-MIgeDul2.js} +1 -1
- package/dist/web-ui-assets/assets/index-PzcVW5-O.css +1 -0
- package/dist/web-ui-assets/index.html +2 -2
- package/package.json +1 -1
- package/dist/web-ui-assets/assets/index-BMUkERO1.css +0 -1
|
@@ -3,6 +3,7 @@ import type { ModelProvider } from '../provider.js';
|
|
|
3
3
|
import type { AgentModelInput } from '../types.js';
|
|
4
4
|
import type { Surface } from '../awareness/types.js';
|
|
5
5
|
import type { ReadScopeInputs } from '../subagent-read-scope.js';
|
|
6
|
+
import type { JournalParent } from '../subagent/fork-types.js';
|
|
6
7
|
import type { WorkspaceStore } from '../workspace/workspace-store.js';
|
|
7
8
|
import { SkillExecutor } from './skill-executor.js';
|
|
8
9
|
import type { SubagentExecutor } from './subagent-executor.js';
|
|
@@ -33,7 +34,7 @@ export interface CreateChildProviderFactoryOptions {
|
|
|
33
34
|
export declare function createChildProviderFactory(opts?: CreateChildProviderFactoryOptions): (args: ChildProviderFactoryArgs) => ModelProvider;
|
|
34
35
|
export declare function buildReadOnlyReconProvider(model: AgentModelInput | undefined, openaiBaseUrl?: string, allowedTools?: readonly string[]): ModelProvider;
|
|
35
36
|
export declare function buildComposeNodeProvider(model: AgentModelInput | undefined, workspaceStore: WorkspaceStore, openaiBaseUrl?: string, readOnlyBash?: boolean): ModelProvider;
|
|
36
|
-
export declare function createChildSkillExecutorFactory(defaultModel: AgentModelInput, apiKey: string | undefined, childProviderFactory: (args: ChildProviderFactoryArgs) => ModelProvider, baseUrl?: string, traceWriter?: TraceSink, backgroundRegistry?: BackgroundAgentRegistry, cwd?: string, resolveApiKeyForModel?: (model: string) => string | undefined, surface?: Surface, defaultSubagentModel?: AgentModelInput, agentRegistry?: AgentRegistry, openaiBaseUrl?: string, xaiBaseUrl?: string, workspaceStore?: WorkspaceStore, delegationBudget?: import('./delegation-budget.js').DelegationBudget): (depth: number, maxDepth: number, signal: AbortSignal, inheritedCwd?: string, inheritedReadScope?: ReadScopeInputs, skillDispatchName?: string) => SkillExecutor;
|
|
37
|
+
export declare function createChildSkillExecutorFactory(defaultModel: AgentModelInput, apiKey: string | undefined, childProviderFactory: (args: ChildProviderFactoryArgs) => ModelProvider, baseUrl?: string, traceWriter?: TraceSink, backgroundRegistry?: BackgroundAgentRegistry, cwd?: string, resolveApiKeyForModel?: (model: string) => string | undefined, surface?: Surface, defaultSubagentModel?: AgentModelInput, agentRegistry?: AgentRegistry, openaiBaseUrl?: string, xaiBaseUrl?: string, workspaceStore?: WorkspaceStore, delegationBudget?: import('./delegation-budget.js').DelegationBudget): (depth: number, maxDepth: number, signal: AbortSignal, inheritedCwd?: string, inheritedReadScope?: ReadScopeInputs, skillDispatchName?: string, journalParent?: JournalParent) => SkillExecutor;
|
|
37
38
|
export type PhaseRole = 'read-only' | 'read-write';
|
|
38
39
|
export declare function buildSkillRestrictedProvider(allowedTools: string[], model: AgentModelInput | undefined, readOnlyBash?: boolean, openaiBaseUrl?: string, workspaceStore?: WorkspaceStore): ModelProvider;
|
|
39
40
|
export declare function buildPhaseRestrictedProvider(_role: 'read-only', model: AgentModelInput | undefined): ModelProvider;
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import { SubagentManager } from '../../subagent.js';
|
|
2
2
|
import type { AgentConfig } from '../../types/config-types.js';
|
|
3
3
|
import type { SkillExecutorInternals } from './types.js';
|
|
4
|
-
|
|
4
|
+
import type { MessageJournal } from '../../journal/types.js';
|
|
5
|
+
export interface JournalParentHolder {
|
|
6
|
+
messageJournal?: MessageJournal;
|
|
7
|
+
}
|
|
8
|
+
export declare function buildForkedChildConfig(internals: SkillExecutorInternals, baseConfig: AgentConfig, signal: AbortSignal, readOnly?: boolean, allowedTools?: string[], journalView?: JournalParentHolder): {
|
|
5
9
|
childConfig: AgentConfig;
|
|
6
10
|
childManager: SubagentManager | undefined;
|
|
7
11
|
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { SubagentManager } from '../../subagent.js';
|
|
2
2
|
import type { ToolCall, ToolResult } from '../types.js';
|
|
3
3
|
import type { AgentConfig } from '../../types/config-types.js';
|
|
4
|
+
import { type JournalParentHolder } from './fork-child-config.js';
|
|
4
5
|
import type { SkillExecutorInternals } from './types.js';
|
|
5
6
|
export declare function executeForkedRegistrySkill(internals: SkillExecutorInternals, skill: {
|
|
6
7
|
name: string;
|
|
@@ -13,6 +14,7 @@ export declare function runForkedSkillToResult(internals: SkillExecutorInternals
|
|
|
13
14
|
manager: SubagentManager;
|
|
14
15
|
childManager: SubagentManager | undefined;
|
|
15
16
|
childConfig: AgentConfig;
|
|
17
|
+
journalView?: JournalParentHolder;
|
|
16
18
|
label: string;
|
|
17
19
|
idPrefix: string;
|
|
18
20
|
parentId: string;
|
|
@@ -7,8 +7,9 @@ import type { ChildProviderFactoryArgs } from '../nesting.js';
|
|
|
7
7
|
import type { Surface } from '../../awareness/types.js';
|
|
8
8
|
import type { ReadScopeInputs } from '../../subagent-read-scope.js';
|
|
9
9
|
import type { SkillExecutor } from '../skill-executor.js';
|
|
10
|
+
import type { JournalParent } from '../../subagent/fork-types.js';
|
|
10
11
|
export interface SkillExecutorContext {
|
|
11
|
-
parentSession: Pick<IAgentSession, 'sessionId' | 'getInputStreamRef' | 'abortSignal'> & Partial<Pick<IAgentSession, 'hookRegistry'
|
|
12
|
+
parentSession: Pick<IAgentSession, 'sessionId' | 'getInputStreamRef' | 'abortSignal'> & Partial<Pick<IAgentSession, 'hookRegistry'>> & JournalParent;
|
|
12
13
|
defaultModel?: string;
|
|
13
14
|
surface?: Surface;
|
|
14
15
|
defaultSubagentModel: AgentModelInput;
|
|
@@ -21,7 +22,7 @@ export interface SkillExecutorContext {
|
|
|
21
22
|
depth?: number;
|
|
22
23
|
maxDepth?: number;
|
|
23
24
|
childProviderFactory?: (args: ChildProviderFactoryArgs) => ModelProvider;
|
|
24
|
-
childSkillExecutorFactory?: (depth: number, maxDepth: number, signal: AbortSignal, inheritedCwd?: string, inheritedReadScope?: ReadScopeInputs, skillDispatchName?: string) => SkillExecutor;
|
|
25
|
+
childSkillExecutorFactory?: (depth: number, maxDepth: number, signal: AbortSignal, inheritedCwd?: string, inheritedReadScope?: ReadScopeInputs, skillDispatchName?: string, journalParent?: JournalParent) => SkillExecutor;
|
|
25
26
|
traceWriter?: TraceSink;
|
|
26
27
|
backgroundRegistry?: BackgroundAgentRegistry;
|
|
27
28
|
cwd?: string;
|
|
@@ -3,6 +3,8 @@ import type { ReadScopeInputs } from '../../subagent-read-scope.js';
|
|
|
3
3
|
import type { ModelProvider } from '../../provider.js';
|
|
4
4
|
import type { AgentModelInput } from '../../types.js';
|
|
5
5
|
import type { AgentConfig } from '../../types/config-types.js';
|
|
6
|
+
import type { MessageJournal } from '../../journal/types.js';
|
|
7
|
+
import type { JournalParent } from '../../subagent/fork-types.js';
|
|
6
8
|
import { createStubParentSession, type ChildProviderFactoryArgs } from '../nesting.js';
|
|
7
9
|
import type { RegisteredAgent } from '../../agents/index.js';
|
|
8
10
|
import type { AgentRegistry } from '../../agents/index.js';
|
|
@@ -13,6 +15,7 @@ import type { SubagentExecutor, SubagentExecutorContext } from '../subagent-exec
|
|
|
13
15
|
import type { AgentInput } from './input-parse.js';
|
|
14
16
|
export type ChildParentSession = ReturnType<typeof createStubParentSession> & {
|
|
15
17
|
sessionId: string | undefined;
|
|
18
|
+
messageJournal?: MessageJournal;
|
|
16
19
|
};
|
|
17
20
|
export interface BuildChildConfigArgs {
|
|
18
21
|
parsed: AgentInput;
|
|
@@ -26,7 +29,7 @@ export interface BuildChildConfigArgs {
|
|
|
26
29
|
resolveApiKeyForModel?: (model: string) => string | undefined;
|
|
27
30
|
defaultSubagentModel: AgentModelInput;
|
|
28
31
|
childProviderFactory?: (args: ChildProviderFactoryArgs) => ModelProvider;
|
|
29
|
-
childSkillExecutorFactory?: (depth: number, maxDepth: number, signal: AbortSignal, inheritedCwd?: string, inheritedReadScope?: ReadScopeInputs, skillDispatchName?: string) => SkillExecutor;
|
|
32
|
+
childSkillExecutorFactory?: (depth: number, maxDepth: number, signal: AbortSignal, inheritedCwd?: string, inheritedReadScope?: ReadScopeInputs, skillDispatchName?: string, journalParent?: JournalParent) => SkillExecutor;
|
|
30
33
|
surface?: Surface;
|
|
31
34
|
allowedTools?: string[];
|
|
32
35
|
readOnlyBash?: boolean;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { SubagentManager } from '../../subagent.js';
|
|
2
|
+
import type { JournalParent } from '../../subagent/fork-types.js';
|
|
2
3
|
import type { ReadScopeInputs } from '../../subagent-read-scope.js';
|
|
3
4
|
import type { BackgroundAgentRegistry } from '../../background-registry.js';
|
|
4
5
|
import type { ModelProvider } from '../../provider.js';
|
|
@@ -16,13 +17,13 @@ import type { PromotedSubagentInfo } from '../subagent/foreground-promotion.js';
|
|
|
16
17
|
export type { PromotedSubagentInfo, QueuedNoteClaim };
|
|
17
18
|
export interface SubagentExecutorContext {
|
|
18
19
|
subagentManager: SubagentManager;
|
|
19
|
-
parentSession: Pick<IAgentSession, 'sessionId' | 'getInputStreamRef' | 'abortSignal'> & Partial<Pick<IAgentSession, 'hookRegistry'
|
|
20
|
+
parentSession: Pick<IAgentSession, 'sessionId' | 'getInputStreamRef' | 'abortSignal'> & Partial<Pick<IAgentSession, 'hookRegistry'>> & JournalParent;
|
|
20
21
|
defaultConfig: Pick<AgentConfig, 'apiKey' | 'systemPrompt' | 'baseUrl' | 'openaiBaseUrl' | 'xaiBaseUrl' | 'skillDispatchName'>;
|
|
21
22
|
surface?: Surface;
|
|
22
23
|
resolveApiKeyForModel?: (model: string) => string | undefined;
|
|
23
24
|
defaultSubagentModel: AgentModelInput;
|
|
24
25
|
childProviderFactory?: (args: ChildProviderFactoryArgs) => ModelProvider;
|
|
25
|
-
childSkillExecutorFactory?: (depth: number, maxDepth: number, signal: AbortSignal, inheritedCwd?: string, inheritedReadScope?: ReadScopeInputs, skillDispatchName?: string) => SkillExecutor;
|
|
26
|
+
childSkillExecutorFactory?: (depth: number, maxDepth: number, signal: AbortSignal, inheritedCwd?: string, inheritedReadScope?: ReadScopeInputs, skillDispatchName?: string, journalParent?: JournalParent) => SkillExecutor;
|
|
26
27
|
depth: number;
|
|
27
28
|
maxDepth?: number;
|
|
28
29
|
backgroundRegistry?: BackgroundAgentRegistry;
|
|
@@ -2,6 +2,7 @@ import type { AgentDefinition, EffortLevel, HookCallbackMatcher, HookEvent, OnEl
|
|
|
2
2
|
import type { HookRegistry } from '../hooks.js';
|
|
3
3
|
import type { ModelProvider } from '../provider.js';
|
|
4
4
|
import type { TraceSink } from '../trace/index.js';
|
|
5
|
+
import type { JournalMessage, MessageJournal } from '../journal/types.js';
|
|
5
6
|
import type { AgentModelInput } from './model-types.js';
|
|
6
7
|
import type { ModelSlots } from '../session/model-slots.js';
|
|
7
8
|
import type { CanUseTool, PermissionBubbler } from './permission-types.js';
|
|
@@ -69,6 +70,8 @@ export interface AgentConfig {
|
|
|
69
70
|
continue?: boolean;
|
|
70
71
|
resume?: string;
|
|
71
72
|
resumeHistory?: ResumeHistoryTurn[];
|
|
73
|
+
resumeMessages?: JournalMessage[];
|
|
74
|
+
messageJournal?: MessageJournal;
|
|
72
75
|
sessionId?: string;
|
|
73
76
|
resumeSessionAt?: string;
|
|
74
77
|
forkSession?: boolean;
|
|
@@ -5,6 +5,7 @@ import type { InputStreamRef } from './permission-types.js';
|
|
|
5
5
|
import type { Message, MessageChunk, ResponseMetadata, SendMessageOptions, StructuredMessageOptions } from './message-types.js';
|
|
6
6
|
import type { ProviderCommandInfo, ProviderCompactResult, ProviderContextUsage, ProviderMcpServerStatus, ProviderQuery, ProviderRewindConversationResult, RewindTarget } from '../provider.js';
|
|
7
7
|
import type { HookRegistry } from '../hooks.js';
|
|
8
|
+
import type { MessageJournal } from '../journal/types.js';
|
|
8
9
|
import type { ZodType } from 'zod';
|
|
9
10
|
export type SessionState = 'idle' | 'processing' | 'streaming' | 'compacting' | 'closed';
|
|
10
11
|
export interface SessionIdentity {
|
|
@@ -138,6 +139,7 @@ export interface IAgentSession {
|
|
|
138
139
|
readonly sessionId?: string;
|
|
139
140
|
readonly cwd?: string;
|
|
140
141
|
readonly hookRegistry?: HookRegistry;
|
|
142
|
+
readonly messageJournal?: MessageJournal;
|
|
141
143
|
sendMessage(content: string, options?: SendMessageOptions): Promise<Message>;
|
|
142
144
|
sendMessageStream(content: string | ContentBlockParam[]): AsyncIterable<OutputEvent>;
|
|
143
145
|
sendMessageStructured?<T>(content: string, schema: ZodType<T>, options?: StructuredMessageOptions): Promise<T>;
|
|
@@ -1,19 +1,14 @@
|
|
|
1
1
|
import type { SessionStats, ToolEvent } from '../../slash/types.js';
|
|
2
|
-
import type { ContentBlockParam } from '@anthropic-ai/sdk/resources';
|
|
3
2
|
import type { CompletionWriter, TurnHandles } from './shared.js';
|
|
4
3
|
import type { StreamEventState } from './turn-handler.stream-events.js';
|
|
5
4
|
import type { TerminalCompositor } from '../../terminal-compositor.js';
|
|
6
5
|
import type { StreamRenderer } from '../../_lib/stream-renderer.js';
|
|
7
|
-
export declare function buildAssistantContentBlocks(responseText: string, toolEvents: ToolEvent[]): ContentBlockParam[] | undefined;
|
|
8
|
-
export declare function buildUserContentBlocks(userText: string, toolEvents: ToolEvent[]): ContentBlockParam[] | undefined;
|
|
9
6
|
export interface TurnCompletionContext {
|
|
10
7
|
state: StreamEventState;
|
|
11
8
|
stats: SessionStats;
|
|
12
9
|
h: TurnHandles;
|
|
13
10
|
toolEvents: ToolEvent[];
|
|
14
11
|
historyText: string;
|
|
15
|
-
assistantBlocks: ContentBlockParam[] | undefined;
|
|
16
|
-
userBlocks: ContentBlockParam[] | undefined;
|
|
17
12
|
completionWriter: CompletionWriter | undefined;
|
|
18
13
|
borrowedCompositor: TerminalCompositor | null;
|
|
19
14
|
renderer: StreamRenderer;
|
|
@@ -4,7 +4,6 @@ import { type ImageAttachment } from '../../input/attachments.js';
|
|
|
4
4
|
import type { InputSurfaceRefs } from '../../input/input-surface.js';
|
|
5
5
|
import { type CompletionWriter, type ThinkingUiMode, type TurnHandles } from './shared.js';
|
|
6
6
|
export { formatToolLine, formatToolResultLine, ToolLane } from './tool-lane.js';
|
|
7
|
-
export { buildAssistantContentBlocks, buildUserContentBlocks } from './turn-handler.completion.js';
|
|
8
7
|
export type { InputSurfaceRefs } from '../../input/input-surface.js';
|
|
9
8
|
export declare function runTurn(input: {
|
|
10
9
|
text: string;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare function fmtDuration(ms: number): string;
|
|
2
|
+
export declare function fmtBytes(n: number): string;
|
|
3
|
+
export declare function fmtUsd(n: number): string;
|
|
4
|
+
export declare function fmtTime(ts: string): string;
|
|
5
|
+
export declare function truncate(s: string, n: number): string;
|
|
6
|
+
export declare function label(s: string): string;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { TraceEvent } from '../../agent/trace/index.js';
|
|
2
|
+
export declare const DEFAULT_RESULT_LINES = 40;
|
|
3
|
+
export interface TraceResultsContext {
|
|
4
|
+
resultFor: (toolUseId: string) => string | null;
|
|
5
|
+
note: string;
|
|
6
|
+
}
|
|
7
|
+
export declare function journalSessionCandidates(traceSessionId: string, events: readonly TraceEvent[]): string[];
|
|
8
|
+
export declare function renderResultBlock(text: string, maxLines: number, opts?: {
|
|
9
|
+
isError?: boolean;
|
|
10
|
+
subagentId?: string;
|
|
11
|
+
}): string;
|
|
12
|
+
export declare function buildTraceResults(traceSessionId: string, events: readonly TraceEvent[], maxLines?: number): TraceResultsContext;
|
|
13
|
+
export declare function withToolResult(line: string, event: TraceEvent, resultFor: ((toolUseId: string) => string | null) | undefined): string;
|
|
@@ -15,6 +15,8 @@ export declare function loadTrace(session: string): Promise<{
|
|
|
15
15
|
export interface FormatTraceOptions {
|
|
16
16
|
showAll?: boolean;
|
|
17
17
|
limit?: number;
|
|
18
|
+
resultFor?: (toolUseId: string) => string | null;
|
|
19
|
+
resultsNote?: string;
|
|
18
20
|
}
|
|
19
21
|
export declare function formatTrace(sessionId: string, tracePath: string, parsed: ParsedTrace, options?: FormatTraceOptions): string;
|
|
20
22
|
export declare function registerTraceCommand(program: Command): void;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import type { ResponseMetadata } from '../../agent/types/message-types.js';
|
|
2
2
|
import type { AgentModelInput } from '../../agent/types.js';
|
|
3
|
-
import type { ContentBlockParam } from '@anthropic-ai/sdk/resources';
|
|
4
3
|
import type { SessionStats, ToolEvent, TurnRecord } from './types.js';
|
|
5
4
|
export declare function createSessionStats(model: AgentModelInput): SessionStats;
|
|
6
5
|
export declare function resetStats(stats: SessionStats): void;
|
|
7
|
-
export declare function recordTurn(stats: SessionStats, userInput: string, assistantText: string, metadata: ResponseMetadata | undefined, toolEvents?: ToolEvent[]
|
|
6
|
+
export declare function recordTurn(stats: SessionStats, userInput: string, assistantText: string, metadata: ResponseMetadata | undefined, toolEvents?: ToolEvent[]): TurnRecord;
|