@cognipeer/agent-sdk 0.6.6 → 0.7.1
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/index.cjs +868 -188
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +148 -3
- package/dist/index.d.ts +148 -3
- package/dist/index.mjs +867 -189
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -306,8 +306,16 @@ type AgentOptions = {
|
|
|
306
306
|
*/
|
|
307
307
|
humanInTheLoop?: HumanInTheLoopOptions;
|
|
308
308
|
};
|
|
309
|
-
type ReasoningLevel = "low" | "medium" | "high";
|
|
310
|
-
type ReflectionCadence = "off" | "every_turn" | "after_tool" | "on_branch";
|
|
309
|
+
type ReasoningLevel = "minimal" | "low" | "medium" | "high";
|
|
310
|
+
type ReflectionCadence = "off" | "every_turn" | "after_tool" | "on_branch" | "initial_then_after_tool";
|
|
311
|
+
/** Context passed to reflection lifecycle hooks. */
|
|
312
|
+
type ReflectionHookContext = {
|
|
313
|
+
state: SmartState;
|
|
314
|
+
/** The turn number (state.toolCallCount) at the time of the decision. */
|
|
315
|
+
turn: number;
|
|
316
|
+
trigger: ReflectionCadence;
|
|
317
|
+
ranToolsThisTurn: boolean;
|
|
318
|
+
};
|
|
311
319
|
type ReflectionConfig = {
|
|
312
320
|
enabled?: boolean;
|
|
313
321
|
cadence?: ReflectionCadence;
|
|
@@ -337,6 +345,29 @@ type ReflectionConfig = {
|
|
|
337
345
|
* turn, etc. Independent of `cadence`.
|
|
338
346
|
*/
|
|
339
347
|
everyNTurns?: number;
|
|
348
|
+
/**
|
|
349
|
+
* Where to route the reflection text in addition to the reflection record:
|
|
350
|
+
* - "memory" — store as a low-confidence agent-scoped `MemoryFact`.
|
|
351
|
+
* - "plan" — append the note to the active plan's `lastReflection` field.
|
|
352
|
+
* - "none" — record only (default).
|
|
353
|
+
*/
|
|
354
|
+
feedTo?: "memory" | "plan" | "none";
|
|
355
|
+
/**
|
|
356
|
+
* Custom predicate that overrides the built-in cadence decision. Return true
|
|
357
|
+
* to force a reflection on this turn, false to skip. `maxPerRun`/`everyNTurns`
|
|
358
|
+
* throttles still apply on top of this.
|
|
359
|
+
*/
|
|
360
|
+
shouldReflect?: (ctx: ReflectionHookContext) => boolean;
|
|
361
|
+
/**
|
|
362
|
+
* Build the reflection prompt body. Receives the resolved default prompt and
|
|
363
|
+
* the char budget; return the prompt text to send. Overrides `promptTemplate`.
|
|
364
|
+
*/
|
|
365
|
+
buildPrompt?: (ctx: ReflectionHookContext & {
|
|
366
|
+
defaultPrompt: string;
|
|
367
|
+
maxChars: number;
|
|
368
|
+
}) => string;
|
|
369
|
+
/** Side-effect hook invoked after a reflection record is produced. */
|
|
370
|
+
onReflection?: (record: ReflectionRecord, ctx: ReflectionHookContext) => void;
|
|
340
371
|
};
|
|
341
372
|
type NativeReasoningConfig = {
|
|
342
373
|
effort?: "minimal" | "low" | "medium" | "high";
|
|
@@ -578,6 +609,34 @@ type TraceToolCallSection = {
|
|
|
578
609
|
label: string;
|
|
579
610
|
tool: string;
|
|
580
611
|
arguments?: any;
|
|
612
|
+
toolDetails?: TraceToolDetails;
|
|
613
|
+
};
|
|
614
|
+
type TraceToolDetails = {
|
|
615
|
+
name: string;
|
|
616
|
+
description?: string;
|
|
617
|
+
inputSchema?: any;
|
|
618
|
+
approval?: {
|
|
619
|
+
required?: boolean;
|
|
620
|
+
prompt?: string;
|
|
621
|
+
defaults?: any;
|
|
622
|
+
};
|
|
623
|
+
cache?: {
|
|
624
|
+
enabled: boolean;
|
|
625
|
+
scope?: string;
|
|
626
|
+
ttlMs?: number;
|
|
627
|
+
hasKeyFn?: boolean;
|
|
628
|
+
};
|
|
629
|
+
retry?: {
|
|
630
|
+
maxRetries?: number;
|
|
631
|
+
backoffMs?: number;
|
|
632
|
+
circuitBreakerThreshold?: number;
|
|
633
|
+
hasShouldRetry?: boolean;
|
|
634
|
+
};
|
|
635
|
+
limits?: {
|
|
636
|
+
maxExecutionsPerRun?: number | null;
|
|
637
|
+
};
|
|
638
|
+
source?: string;
|
|
639
|
+
metadata?: Record<string, any>;
|
|
581
640
|
};
|
|
582
641
|
type TraceToolResultItem = {
|
|
583
642
|
title?: string;
|
|
@@ -593,6 +652,15 @@ type TraceToolResultSection = {
|
|
|
593
652
|
summary?: string;
|
|
594
653
|
items?: TraceToolResultItem[];
|
|
595
654
|
output?: any;
|
|
655
|
+
toolDetails?: TraceToolDetails;
|
|
656
|
+
execution?: {
|
|
657
|
+
id?: string;
|
|
658
|
+
status?: "success" | "error" | "skipped" | "cached" | string;
|
|
659
|
+
durationMs?: number;
|
|
660
|
+
fromCache?: boolean;
|
|
661
|
+
};
|
|
662
|
+
classification?: ToolResponseClassification;
|
|
663
|
+
retentionPolicy?: ToolResponseRetentionPolicy;
|
|
596
664
|
};
|
|
597
665
|
type TraceToolResponseSection = {
|
|
598
666
|
id?: string;
|
|
@@ -602,6 +670,7 @@ type TraceToolResponseSection = {
|
|
|
602
670
|
summary?: string;
|
|
603
671
|
items?: TraceToolResultItem[];
|
|
604
672
|
output?: any;
|
|
673
|
+
toolDetails?: TraceToolDetails;
|
|
605
674
|
classification?: ToolResponseClassification;
|
|
606
675
|
retentionPolicy?: ToolResponseRetentionPolicy;
|
|
607
676
|
};
|
|
@@ -644,6 +713,7 @@ type TraceEventRecord = {
|
|
|
644
713
|
responseBytes?: number;
|
|
645
714
|
model?: string;
|
|
646
715
|
provider?: string;
|
|
716
|
+
toolDetails?: TraceToolDetails;
|
|
647
717
|
toolExecutionId?: string;
|
|
648
718
|
retryOf?: string;
|
|
649
719
|
error?: {
|
|
@@ -844,6 +914,7 @@ type SmartState = AgentState & {
|
|
|
844
914
|
steps: PlanStepRecord[];
|
|
845
915
|
lastUpdated?: string;
|
|
846
916
|
adherenceScore?: number;
|
|
917
|
+
lastReflection?: string;
|
|
847
918
|
} | null;
|
|
848
919
|
planVersion?: number;
|
|
849
920
|
/**
|
|
@@ -1690,6 +1761,39 @@ declare function createAskUserQuestionTool(stateRef: AskUserStateRef, config: Hu
|
|
|
1690
1761
|
|
|
1691
1762
|
declare function fromLangchainTools<T extends ToolInterface = ToolInterface>(tools: any[]): T[];
|
|
1692
1763
|
|
|
1764
|
+
type ResolvedReflectionConfig = {
|
|
1765
|
+
enabled: boolean;
|
|
1766
|
+
cadence: ReflectionCadence;
|
|
1767
|
+
mode: "piggyback" | "separate";
|
|
1768
|
+
maxTokens: number;
|
|
1769
|
+
maxChars: number;
|
|
1770
|
+
keepLast: number;
|
|
1771
|
+
summarize: boolean;
|
|
1772
|
+
promptTemplate?: string;
|
|
1773
|
+
emitEvents: boolean;
|
|
1774
|
+
maxPerRun?: number;
|
|
1775
|
+
everyNTurns: number;
|
|
1776
|
+
feedTo: "memory" | "plan" | "none";
|
|
1777
|
+
shouldReflect?: (ctx: ReflectionHookContext) => boolean;
|
|
1778
|
+
buildPrompt?: (ctx: ReflectionHookContext & {
|
|
1779
|
+
defaultPrompt: string;
|
|
1780
|
+
maxChars: number;
|
|
1781
|
+
}) => string;
|
|
1782
|
+
onReflection?: (record: ReflectionRecord, ctx: ReflectionHookContext) => void;
|
|
1783
|
+
};
|
|
1784
|
+
type ResolvedReasoning = {
|
|
1785
|
+
enabled: boolean;
|
|
1786
|
+
level: ReasoningLevel;
|
|
1787
|
+
native?: NativeReasoningConfig;
|
|
1788
|
+
reflection: ResolvedReflectionConfig;
|
|
1789
|
+
};
|
|
1790
|
+
/**
|
|
1791
|
+
* Validates a user-supplied ReasoningConfig and throws a descriptive error for
|
|
1792
|
+
* obviously-wrong values. Pure; safe to call before resolveReasoning.
|
|
1793
|
+
*/
|
|
1794
|
+
declare function validateReasoningConfig(input: ReasoningConfig | undefined): void;
|
|
1795
|
+
declare function resolveReasoning(input: ReasoningConfig | undefined): ResolvedReasoning | undefined;
|
|
1796
|
+
|
|
1693
1797
|
declare function fileSink(path?: string): TraceSinkConfig;
|
|
1694
1798
|
type CustomSinkArg = ((event: TraceEventRecord) => void | Promise<void>) | {
|
|
1695
1799
|
onEvent?: (event: TraceEventRecord) => void | Promise<void>;
|
|
@@ -1742,12 +1846,35 @@ type ToolCall = {
|
|
|
1742
1846
|
name: string;
|
|
1743
1847
|
arguments: string;
|
|
1744
1848
|
};
|
|
1849
|
+
/**
|
|
1850
|
+
* A provider-native reasoning/thinking block. Captured from the model response
|
|
1851
|
+
* and replayed verbatim on subsequent turns (required by Anthropic extended
|
|
1852
|
+
* thinking when tools are involved — the `signature` must round-trip intact).
|
|
1853
|
+
*/
|
|
1854
|
+
type ReasoningBlock = {
|
|
1855
|
+
type: "thinking" | "redacted_thinking";
|
|
1856
|
+
/** Plain-text thinking content (absent for redacted blocks). */
|
|
1857
|
+
text?: string;
|
|
1858
|
+
/** Cryptographic signature Anthropic requires to be echoed back verbatim. */
|
|
1859
|
+
signature?: string;
|
|
1860
|
+
/** Opaque payload for redacted_thinking blocks. */
|
|
1861
|
+
data?: string;
|
|
1862
|
+
};
|
|
1863
|
+
/** Captured reasoning payload attached to assistant turns / responses. */
|
|
1864
|
+
type ReasoningPayload = {
|
|
1865
|
+
/** Verbatim provider blocks to replay on the next turn. */
|
|
1866
|
+
blocks?: ReasoningBlock[];
|
|
1867
|
+
/** Human-readable reasoning summary, when the provider exposes one. */
|
|
1868
|
+
summary?: string;
|
|
1869
|
+
};
|
|
1745
1870
|
type UnifiedMessage = {
|
|
1746
1871
|
role: MessageRole;
|
|
1747
1872
|
content: string | ContentPart[];
|
|
1748
1873
|
name?: string;
|
|
1749
1874
|
toolCalls?: ToolCall[];
|
|
1750
1875
|
toolCallId?: string;
|
|
1876
|
+
/** Native reasoning blocks to replay verbatim (Anthropic/Bedrock thinking). */
|
|
1877
|
+
reasoning?: ReasoningPayload;
|
|
1751
1878
|
};
|
|
1752
1879
|
type ToolDefinition = {
|
|
1753
1880
|
name: string;
|
|
@@ -1814,6 +1941,8 @@ type ChatCompletionResponse = {
|
|
|
1814
1941
|
toolCalls: ToolCall[];
|
|
1815
1942
|
usage: TokenUsage;
|
|
1816
1943
|
finishReason: FinishReason;
|
|
1944
|
+
/** Native reasoning blocks + summary captured from the response, if any. */
|
|
1945
|
+
reasoning?: ReasoningPayload;
|
|
1817
1946
|
raw: any;
|
|
1818
1947
|
};
|
|
1819
1948
|
type ChatCompletionChunk = {
|
|
@@ -1822,6 +1951,8 @@ type ChatCompletionChunk = {
|
|
|
1822
1951
|
delta: {
|
|
1823
1952
|
content?: string;
|
|
1824
1953
|
toolCalls?: Partial<ToolCall>[];
|
|
1954
|
+
/** Incremental reasoning text / signature deltas (Anthropic thinking). */
|
|
1955
|
+
reasoning?: ReasoningPayload;
|
|
1825
1956
|
};
|
|
1826
1957
|
usage?: TokenUsage;
|
|
1827
1958
|
finishReason?: FinishReason;
|
|
@@ -1949,9 +2080,19 @@ declare class OpenAIProvider extends BaseProvider {
|
|
|
1949
2080
|
protected readonly defaultModel: string;
|
|
1950
2081
|
protected readonly defaultHeaders: Record<string, string>;
|
|
1951
2082
|
constructor(config: OpenAIProviderConfig);
|
|
2083
|
+
/** True when the request targets a reasoning model (o-series / gpt-5) so we
|
|
2084
|
+
* should route through the Responses API, which exposes `reasoning.effort`
|
|
2085
|
+
* and reasoning summaries. Chat Completions silently drops these. */
|
|
2086
|
+
protected useResponsesApi(request: ChatCompletionRequest): boolean;
|
|
1952
2087
|
complete(request: ChatCompletionRequest): Promise<ChatCompletionResponse>;
|
|
1953
2088
|
completeStream(request: ChatCompletionRequest): AsyncGenerator<ChatCompletionChunk, void, unknown>;
|
|
1954
2089
|
protected buildRequestBody(request: ChatCompletionRequest, stream: boolean): Record<string, any>;
|
|
2090
|
+
protected completeResponses(request: ChatCompletionRequest): Promise<ChatCompletionResponse>;
|
|
2091
|
+
protected buildResponsesBody(request: ChatCompletionRequest): Record<string, any>;
|
|
2092
|
+
/** Maps a unified message to a Responses API `input` item. */
|
|
2093
|
+
protected toResponsesInput(m: UnifiedMessage): Record<string, any>;
|
|
2094
|
+
protected responsesFetch(body: Record<string, any>): Promise<Response>;
|
|
2095
|
+
protected parseResponsesResponse(json: any, modelId: string): ChatCompletionResponse;
|
|
1955
2096
|
protected toOpenAIMessage(m: UnifiedMessage): Record<string, any>;
|
|
1956
2097
|
protected toOpenAITool(t: ToolDefinition): Record<string, any>;
|
|
1957
2098
|
protected doFetch(body: Record<string, any>): Promise<Response>;
|
|
@@ -1986,6 +2127,10 @@ declare class AzureProvider extends OpenAIProvider {
|
|
|
1986
2127
|
private readonly azureApiKey;
|
|
1987
2128
|
constructor(config: AzureProviderConfig);
|
|
1988
2129
|
protected doFetch(body: Record<string, any>): Promise<Response>;
|
|
2130
|
+
/** Azure exposes the Responses API at /openai/responses with api-key auth.
|
|
2131
|
+
* Reasoning summaries require a preview api-version; callers can override via
|
|
2132
|
+
* the `apiVersion` config. */
|
|
2133
|
+
protected responsesFetch(body: Record<string, any>): Promise<Response>;
|
|
1989
2134
|
}
|
|
1990
2135
|
|
|
1991
2136
|
declare class OpenAICompatibleProvider extends OpenAIProvider {
|
|
@@ -2083,4 +2228,4 @@ declare function fromNativeProvider(provider: BaseProvider, options?: NativeMode
|
|
|
2083
2228
|
*/
|
|
2084
2229
|
declare function createProvider(config: ProviderConfig): BaseProvider;
|
|
2085
2230
|
|
|
2086
|
-
export { type AIMessage, type AgentInstance, type AgentInvokeResult, type AgentLimits, type AgentOptions, type AgentRuleOptions, type AgentRuntimeConfig, type AgentSnapshot, type AgentSnapshotMetadata, type AgentState, AnthropicProvider, type AnthropicProviderConfig, AzureProvider, type AzureProviderConfig, type BaseChatMessage, type BaseChatMessagePart, type BaseChatModel, type BaseMessage, BaseProvider, BedrockProvider, type BedrockProviderConfig, type BuiltInRuntimeProfile, type CancellationTokenLike, type CancelledEvent, type ChatCompletionChunk, type ChatCompletionRequest, type ChatCompletionResponse, type ChildContextPolicy, type CodeDetectionRuleOptions, type CodeGuardrailOptions, type ContextPolicy, type ContextToolsStateRef, type ConversationGuardrail, type CustomRuleCallback, type CustomRuleOptions, DEFAULT_PROFILE_CONFIGS, type DelegationMode, type EvalCase, type EvalCaseResult, type EvalFamily, type EvalHarnessMetrics, type EvalHarnessParams, type EvalHarnessResult, type EvalProfileDescriptor, type EvalProfileTarget, type FinalAnswerEvent, type FinishReason, type GuardrailContext, type GuardrailDisposition, type GuardrailEvent, type GuardrailIncident, type GuardrailOutcome, GuardrailPhase, type GuardrailRule, type HandoffDescriptor, type HandoffEvent, type HumanInTheLoopAskUserConfig, type HumanInTheLoopOptions, type HumanInTheLoopRuntimeConfig, InMemoryMemoryStore, type InvokeConfig, type JsonGuardrailOptions, type JsonSchemaRuleOptions, type MemoryFact, type MemoryProviderKind, type MemoryReadPolicy, type MemoryScope, type MemoryStore, type MemoryWritePolicy, type Message, type MetadataEvent, type ModelCapabilities, NativeJsonSchemaStrategy, type NativeModelOptions, type NativeReasoningConfig, OpenAICompatibleProvider, type OpenAICompatibleProviderConfig, OpenAIProvider, type OpenAIProviderConfig, type PendingToolApproval, type PendingUserQuestion, type PlanEvent, type PlanStepRecord, type PlanningMode, type ProfileConfig, type ProgressEvent, type ProgressUpdate, type ProviderConfig, ProviderError, type ToolCall as ProviderToolCall, type ToolDefinition as ProviderToolDefinition, type ProviderType, type ReasoningConfig, type ReasoningLevel, type ReflectionCadence, type ReflectionConfig, type ReflectionEvent, type ReflectionRecord, type RegexGuardrailOptions, type RegexRuleOptions, type ReplanPolicy, type ResolvedSmartAgentConfig, type ResolvedTraceConfig, type ResolvedTraceSink, type RestoreSnapshotOptions, type RuntimeProfile, type SerializableSmartState, type SmartAgentBudgetConfig, type SmartAgentContextConfig, type SmartAgentCustomProfileConfig, type SmartAgentDelegationConfig, type SmartAgentEvent, type SmartAgentInstance, type SmartAgentLimits, type SmartAgentMemoryConfig, type SmartAgentOptions, type SmartAgentPlanningConfig, type SmartAgentSummarizationConfig, type SmartAgentToolResponseConfig, type SmartAgentTracingConfig, type SmartModel, type SmartState, type SmartToolFn, type SnapshotOptions, type SnapshotRuntimeHint, type StreamChunk, type StreamEvent, type StructuredOutputError, type StructuredOutputFieldError, StructuredOutputManager, type StructuredOutputManagerConfig, type StructuredOutputResult, type StructuredOutputStrategy, type StructuredSummary, type SummarizationEvent, type SummarizationMode, type SummaryFactItem, type SummaryIntegrityCheck, type TokenCounter, type TokenUsage, type ToolApprovalEvent, type ToolApprovalResolution, type ToolApprovalStatus, ToolBasedStrategy, type ToolCachePolicy, type ToolCallEvent, type ToolInterface, type ToolResponseClassification, type ToolResponseRetentionPolicy, type ToolRetryPolicy, type TraceDataSection, type TraceErrorRecord, type TraceEventRecord, type TraceMessageSection, type TraceMetadataSection, type TraceSessionConfigSnapshot, type TraceSessionFile, type TraceSessionStatus, type TraceSessionSummary, type TraceSinkCognipeerConfig, type TraceSinkConfig, type TraceSinkCustomConfig, type TraceSinkFileConfig, type TraceSinkHttpConfig, type TraceSinkOtlpConfig, type TraceSinkSnapshot, type TraceSummarySection, type TraceToolCallSection, type TraceToolResultSection, type TracingConfig, type TracingMode, type UnifiedMessage, type UserQuestionAnswer, type UserQuestionAnswerSet, type UserQuestionEvent, type UserQuestionItem, type UserQuestionOption, type UserQuestionResolution, type UserQuestionStatus, VertexProvider, type VertexProviderConfig, agentVerdictRule, buildSystemPrompt, captureSnapshot, codePresenceRule, cognipeerSink, countApproxTokens, countMessagesTokens, createAgent, createAgentNode, createAskUserQuestionTool, createCodeGuardrail, createContextSummarizeNode, createContextTools, createGetToolResponseTool, createGuardrail, createJsonGuardrail, createManageTodoTool, createProvider, createRegexGuardrail, createResolverNode, createSmartAgent, createTool, createToolLimitFinalizeNode, createToolsNode, customCallbackRule, customSink, defaultTokenCounter, emptyUsage, evaluateGuardrails, fileSink, formatZodError, fromLangchainModel, fromLangchainTools, fromNativeProvider, generateSpanId, generateTraceId, getModelCapabilities, getNestedValue, getResolvedSmartConfig, getTokenCounter, hasToolResponseRecoveryReference, httpSink, isSmartModel, jsonSchemaRule, normalizeSmartAgentOptions, otlpSink, readMemoryFacts, regexRule, resolveMemoryStore, resolveStrategy, resolveToolApprovalState, resolveUserQuestionState, restoreSnapshot, runSmartAgentEvalHarness, setTokenCounter, startStreamingSession, traceSessionToOtlp, withTools, writeSummaryFactsToMemory };
|
|
2231
|
+
export { type AIMessage, type AgentInstance, type AgentInvokeResult, type AgentLimits, type AgentOptions, type AgentRuleOptions, type AgentRuntimeConfig, type AgentSnapshot, type AgentSnapshotMetadata, type AgentState, AnthropicProvider, type AnthropicProviderConfig, AzureProvider, type AzureProviderConfig, type BaseChatMessage, type BaseChatMessagePart, type BaseChatModel, type BaseMessage, BaseProvider, BedrockProvider, type BedrockProviderConfig, type BuiltInRuntimeProfile, type CancellationTokenLike, type CancelledEvent, type ChatCompletionChunk, type ChatCompletionRequest, type ChatCompletionResponse, type ChildContextPolicy, type CodeDetectionRuleOptions, type CodeGuardrailOptions, type ContextPolicy, type ContextToolsStateRef, type ConversationGuardrail, type CustomRuleCallback, type CustomRuleOptions, DEFAULT_PROFILE_CONFIGS, type DelegationMode, type EvalCase, type EvalCaseResult, type EvalFamily, type EvalHarnessMetrics, type EvalHarnessParams, type EvalHarnessResult, type EvalProfileDescriptor, type EvalProfileTarget, type FinalAnswerEvent, type FinishReason, type GuardrailContext, type GuardrailDisposition, type GuardrailEvent, type GuardrailIncident, type GuardrailOutcome, GuardrailPhase, type GuardrailRule, type HandoffDescriptor, type HandoffEvent, type HumanInTheLoopAskUserConfig, type HumanInTheLoopOptions, type HumanInTheLoopRuntimeConfig, InMemoryMemoryStore, type InvokeConfig, type JsonGuardrailOptions, type JsonSchemaRuleOptions, type MemoryFact, type MemoryProviderKind, type MemoryReadPolicy, type MemoryScope, type MemoryStore, type MemoryWritePolicy, type Message, type MetadataEvent, type ModelCapabilities, NativeJsonSchemaStrategy, type NativeModelOptions, type NativeReasoningConfig, OpenAICompatibleProvider, type OpenAICompatibleProviderConfig, OpenAIProvider, type OpenAIProviderConfig, type PendingToolApproval, type PendingUserQuestion, type PlanEvent, type PlanStepRecord, type PlanningMode, type ProfileConfig, type ProgressEvent, type ProgressUpdate, type ProviderConfig, ProviderError, type ToolCall as ProviderToolCall, type ToolDefinition as ProviderToolDefinition, type ProviderType, type ReasoningConfig, type ReasoningLevel, type ReflectionCadence, type ReflectionConfig, type ReflectionEvent, type ReflectionHookContext, type ReflectionRecord, type RegexGuardrailOptions, type RegexRuleOptions, type ReplanPolicy, type ResolvedSmartAgentConfig, type ResolvedTraceConfig, type ResolvedTraceSink, type RestoreSnapshotOptions, type RuntimeProfile, type SerializableSmartState, type SmartAgentBudgetConfig, type SmartAgentContextConfig, type SmartAgentCustomProfileConfig, type SmartAgentDelegationConfig, type SmartAgentEvent, type SmartAgentInstance, type SmartAgentLimits, type SmartAgentMemoryConfig, type SmartAgentOptions, type SmartAgentPlanningConfig, type SmartAgentSummarizationConfig, type SmartAgentToolResponseConfig, type SmartAgentTracingConfig, type SmartModel, type SmartState, type SmartToolFn, type SnapshotOptions, type SnapshotRuntimeHint, type StreamChunk, type StreamEvent, type StructuredOutputError, type StructuredOutputFieldError, StructuredOutputManager, type StructuredOutputManagerConfig, type StructuredOutputResult, type StructuredOutputStrategy, type StructuredSummary, type SummarizationEvent, type SummarizationMode, type SummaryFactItem, type SummaryIntegrityCheck, type TokenCounter, type TokenUsage, type ToolApprovalEvent, type ToolApprovalResolution, type ToolApprovalStatus, ToolBasedStrategy, type ToolCachePolicy, type ToolCallEvent, type ToolInterface, type ToolResponseClassification, type ToolResponseRetentionPolicy, type ToolRetryPolicy, type TraceDataSection, type TraceErrorRecord, type TraceEventRecord, type TraceMessageSection, type TraceMetadataSection, type TraceSessionConfigSnapshot, type TraceSessionFile, type TraceSessionStatus, type TraceSessionSummary, type TraceSinkCognipeerConfig, type TraceSinkConfig, type TraceSinkCustomConfig, type TraceSinkFileConfig, type TraceSinkHttpConfig, type TraceSinkOtlpConfig, type TraceSinkSnapshot, type TraceSummarySection, type TraceToolCallSection, type TraceToolDetails, type TraceToolResponseSection, type TraceToolResultSection, type TracingConfig, type TracingMode, type UnifiedMessage, type UserQuestionAnswer, type UserQuestionAnswerSet, type UserQuestionEvent, type UserQuestionItem, type UserQuestionOption, type UserQuestionResolution, type UserQuestionStatus, VertexProvider, type VertexProviderConfig, agentVerdictRule, buildSystemPrompt, captureSnapshot, codePresenceRule, cognipeerSink, countApproxTokens, countMessagesTokens, createAgent, createAgentNode, createAskUserQuestionTool, createCodeGuardrail, createContextSummarizeNode, createContextTools, createGetToolResponseTool, createGuardrail, createJsonGuardrail, createManageTodoTool, createProvider, createRegexGuardrail, createResolverNode, createSmartAgent, createTool, createToolLimitFinalizeNode, createToolsNode, customCallbackRule, customSink, defaultTokenCounter, emptyUsage, evaluateGuardrails, fileSink, formatZodError, fromLangchainModel, fromLangchainTools, fromNativeProvider, generateSpanId, generateTraceId, getModelCapabilities, getNestedValue, getResolvedSmartConfig, getTokenCounter, hasToolResponseRecoveryReference, httpSink, isSmartModel, jsonSchemaRule, normalizeSmartAgentOptions, otlpSink, readMemoryFacts, regexRule, resolveMemoryStore, resolveReasoning, resolveStrategy, resolveToolApprovalState, resolveUserQuestionState, restoreSnapshot, runSmartAgentEvalHarness, setTokenCounter, startStreamingSession, traceSessionToOtlp, validateReasoningConfig, withTools, writeSummaryFactsToMemory };
|
package/dist/index.d.ts
CHANGED
|
@@ -306,8 +306,16 @@ type AgentOptions = {
|
|
|
306
306
|
*/
|
|
307
307
|
humanInTheLoop?: HumanInTheLoopOptions;
|
|
308
308
|
};
|
|
309
|
-
type ReasoningLevel = "low" | "medium" | "high";
|
|
310
|
-
type ReflectionCadence = "off" | "every_turn" | "after_tool" | "on_branch";
|
|
309
|
+
type ReasoningLevel = "minimal" | "low" | "medium" | "high";
|
|
310
|
+
type ReflectionCadence = "off" | "every_turn" | "after_tool" | "on_branch" | "initial_then_after_tool";
|
|
311
|
+
/** Context passed to reflection lifecycle hooks. */
|
|
312
|
+
type ReflectionHookContext = {
|
|
313
|
+
state: SmartState;
|
|
314
|
+
/** The turn number (state.toolCallCount) at the time of the decision. */
|
|
315
|
+
turn: number;
|
|
316
|
+
trigger: ReflectionCadence;
|
|
317
|
+
ranToolsThisTurn: boolean;
|
|
318
|
+
};
|
|
311
319
|
type ReflectionConfig = {
|
|
312
320
|
enabled?: boolean;
|
|
313
321
|
cadence?: ReflectionCadence;
|
|
@@ -337,6 +345,29 @@ type ReflectionConfig = {
|
|
|
337
345
|
* turn, etc. Independent of `cadence`.
|
|
338
346
|
*/
|
|
339
347
|
everyNTurns?: number;
|
|
348
|
+
/**
|
|
349
|
+
* Where to route the reflection text in addition to the reflection record:
|
|
350
|
+
* - "memory" — store as a low-confidence agent-scoped `MemoryFact`.
|
|
351
|
+
* - "plan" — append the note to the active plan's `lastReflection` field.
|
|
352
|
+
* - "none" — record only (default).
|
|
353
|
+
*/
|
|
354
|
+
feedTo?: "memory" | "plan" | "none";
|
|
355
|
+
/**
|
|
356
|
+
* Custom predicate that overrides the built-in cadence decision. Return true
|
|
357
|
+
* to force a reflection on this turn, false to skip. `maxPerRun`/`everyNTurns`
|
|
358
|
+
* throttles still apply on top of this.
|
|
359
|
+
*/
|
|
360
|
+
shouldReflect?: (ctx: ReflectionHookContext) => boolean;
|
|
361
|
+
/**
|
|
362
|
+
* Build the reflection prompt body. Receives the resolved default prompt and
|
|
363
|
+
* the char budget; return the prompt text to send. Overrides `promptTemplate`.
|
|
364
|
+
*/
|
|
365
|
+
buildPrompt?: (ctx: ReflectionHookContext & {
|
|
366
|
+
defaultPrompt: string;
|
|
367
|
+
maxChars: number;
|
|
368
|
+
}) => string;
|
|
369
|
+
/** Side-effect hook invoked after a reflection record is produced. */
|
|
370
|
+
onReflection?: (record: ReflectionRecord, ctx: ReflectionHookContext) => void;
|
|
340
371
|
};
|
|
341
372
|
type NativeReasoningConfig = {
|
|
342
373
|
effort?: "minimal" | "low" | "medium" | "high";
|
|
@@ -578,6 +609,34 @@ type TraceToolCallSection = {
|
|
|
578
609
|
label: string;
|
|
579
610
|
tool: string;
|
|
580
611
|
arguments?: any;
|
|
612
|
+
toolDetails?: TraceToolDetails;
|
|
613
|
+
};
|
|
614
|
+
type TraceToolDetails = {
|
|
615
|
+
name: string;
|
|
616
|
+
description?: string;
|
|
617
|
+
inputSchema?: any;
|
|
618
|
+
approval?: {
|
|
619
|
+
required?: boolean;
|
|
620
|
+
prompt?: string;
|
|
621
|
+
defaults?: any;
|
|
622
|
+
};
|
|
623
|
+
cache?: {
|
|
624
|
+
enabled: boolean;
|
|
625
|
+
scope?: string;
|
|
626
|
+
ttlMs?: number;
|
|
627
|
+
hasKeyFn?: boolean;
|
|
628
|
+
};
|
|
629
|
+
retry?: {
|
|
630
|
+
maxRetries?: number;
|
|
631
|
+
backoffMs?: number;
|
|
632
|
+
circuitBreakerThreshold?: number;
|
|
633
|
+
hasShouldRetry?: boolean;
|
|
634
|
+
};
|
|
635
|
+
limits?: {
|
|
636
|
+
maxExecutionsPerRun?: number | null;
|
|
637
|
+
};
|
|
638
|
+
source?: string;
|
|
639
|
+
metadata?: Record<string, any>;
|
|
581
640
|
};
|
|
582
641
|
type TraceToolResultItem = {
|
|
583
642
|
title?: string;
|
|
@@ -593,6 +652,15 @@ type TraceToolResultSection = {
|
|
|
593
652
|
summary?: string;
|
|
594
653
|
items?: TraceToolResultItem[];
|
|
595
654
|
output?: any;
|
|
655
|
+
toolDetails?: TraceToolDetails;
|
|
656
|
+
execution?: {
|
|
657
|
+
id?: string;
|
|
658
|
+
status?: "success" | "error" | "skipped" | "cached" | string;
|
|
659
|
+
durationMs?: number;
|
|
660
|
+
fromCache?: boolean;
|
|
661
|
+
};
|
|
662
|
+
classification?: ToolResponseClassification;
|
|
663
|
+
retentionPolicy?: ToolResponseRetentionPolicy;
|
|
596
664
|
};
|
|
597
665
|
type TraceToolResponseSection = {
|
|
598
666
|
id?: string;
|
|
@@ -602,6 +670,7 @@ type TraceToolResponseSection = {
|
|
|
602
670
|
summary?: string;
|
|
603
671
|
items?: TraceToolResultItem[];
|
|
604
672
|
output?: any;
|
|
673
|
+
toolDetails?: TraceToolDetails;
|
|
605
674
|
classification?: ToolResponseClassification;
|
|
606
675
|
retentionPolicy?: ToolResponseRetentionPolicy;
|
|
607
676
|
};
|
|
@@ -644,6 +713,7 @@ type TraceEventRecord = {
|
|
|
644
713
|
responseBytes?: number;
|
|
645
714
|
model?: string;
|
|
646
715
|
provider?: string;
|
|
716
|
+
toolDetails?: TraceToolDetails;
|
|
647
717
|
toolExecutionId?: string;
|
|
648
718
|
retryOf?: string;
|
|
649
719
|
error?: {
|
|
@@ -844,6 +914,7 @@ type SmartState = AgentState & {
|
|
|
844
914
|
steps: PlanStepRecord[];
|
|
845
915
|
lastUpdated?: string;
|
|
846
916
|
adherenceScore?: number;
|
|
917
|
+
lastReflection?: string;
|
|
847
918
|
} | null;
|
|
848
919
|
planVersion?: number;
|
|
849
920
|
/**
|
|
@@ -1690,6 +1761,39 @@ declare function createAskUserQuestionTool(stateRef: AskUserStateRef, config: Hu
|
|
|
1690
1761
|
|
|
1691
1762
|
declare function fromLangchainTools<T extends ToolInterface = ToolInterface>(tools: any[]): T[];
|
|
1692
1763
|
|
|
1764
|
+
type ResolvedReflectionConfig = {
|
|
1765
|
+
enabled: boolean;
|
|
1766
|
+
cadence: ReflectionCadence;
|
|
1767
|
+
mode: "piggyback" | "separate";
|
|
1768
|
+
maxTokens: number;
|
|
1769
|
+
maxChars: number;
|
|
1770
|
+
keepLast: number;
|
|
1771
|
+
summarize: boolean;
|
|
1772
|
+
promptTemplate?: string;
|
|
1773
|
+
emitEvents: boolean;
|
|
1774
|
+
maxPerRun?: number;
|
|
1775
|
+
everyNTurns: number;
|
|
1776
|
+
feedTo: "memory" | "plan" | "none";
|
|
1777
|
+
shouldReflect?: (ctx: ReflectionHookContext) => boolean;
|
|
1778
|
+
buildPrompt?: (ctx: ReflectionHookContext & {
|
|
1779
|
+
defaultPrompt: string;
|
|
1780
|
+
maxChars: number;
|
|
1781
|
+
}) => string;
|
|
1782
|
+
onReflection?: (record: ReflectionRecord, ctx: ReflectionHookContext) => void;
|
|
1783
|
+
};
|
|
1784
|
+
type ResolvedReasoning = {
|
|
1785
|
+
enabled: boolean;
|
|
1786
|
+
level: ReasoningLevel;
|
|
1787
|
+
native?: NativeReasoningConfig;
|
|
1788
|
+
reflection: ResolvedReflectionConfig;
|
|
1789
|
+
};
|
|
1790
|
+
/**
|
|
1791
|
+
* Validates a user-supplied ReasoningConfig and throws a descriptive error for
|
|
1792
|
+
* obviously-wrong values. Pure; safe to call before resolveReasoning.
|
|
1793
|
+
*/
|
|
1794
|
+
declare function validateReasoningConfig(input: ReasoningConfig | undefined): void;
|
|
1795
|
+
declare function resolveReasoning(input: ReasoningConfig | undefined): ResolvedReasoning | undefined;
|
|
1796
|
+
|
|
1693
1797
|
declare function fileSink(path?: string): TraceSinkConfig;
|
|
1694
1798
|
type CustomSinkArg = ((event: TraceEventRecord) => void | Promise<void>) | {
|
|
1695
1799
|
onEvent?: (event: TraceEventRecord) => void | Promise<void>;
|
|
@@ -1742,12 +1846,35 @@ type ToolCall = {
|
|
|
1742
1846
|
name: string;
|
|
1743
1847
|
arguments: string;
|
|
1744
1848
|
};
|
|
1849
|
+
/**
|
|
1850
|
+
* A provider-native reasoning/thinking block. Captured from the model response
|
|
1851
|
+
* and replayed verbatim on subsequent turns (required by Anthropic extended
|
|
1852
|
+
* thinking when tools are involved — the `signature` must round-trip intact).
|
|
1853
|
+
*/
|
|
1854
|
+
type ReasoningBlock = {
|
|
1855
|
+
type: "thinking" | "redacted_thinking";
|
|
1856
|
+
/** Plain-text thinking content (absent for redacted blocks). */
|
|
1857
|
+
text?: string;
|
|
1858
|
+
/** Cryptographic signature Anthropic requires to be echoed back verbatim. */
|
|
1859
|
+
signature?: string;
|
|
1860
|
+
/** Opaque payload for redacted_thinking blocks. */
|
|
1861
|
+
data?: string;
|
|
1862
|
+
};
|
|
1863
|
+
/** Captured reasoning payload attached to assistant turns / responses. */
|
|
1864
|
+
type ReasoningPayload = {
|
|
1865
|
+
/** Verbatim provider blocks to replay on the next turn. */
|
|
1866
|
+
blocks?: ReasoningBlock[];
|
|
1867
|
+
/** Human-readable reasoning summary, when the provider exposes one. */
|
|
1868
|
+
summary?: string;
|
|
1869
|
+
};
|
|
1745
1870
|
type UnifiedMessage = {
|
|
1746
1871
|
role: MessageRole;
|
|
1747
1872
|
content: string | ContentPart[];
|
|
1748
1873
|
name?: string;
|
|
1749
1874
|
toolCalls?: ToolCall[];
|
|
1750
1875
|
toolCallId?: string;
|
|
1876
|
+
/** Native reasoning blocks to replay verbatim (Anthropic/Bedrock thinking). */
|
|
1877
|
+
reasoning?: ReasoningPayload;
|
|
1751
1878
|
};
|
|
1752
1879
|
type ToolDefinition = {
|
|
1753
1880
|
name: string;
|
|
@@ -1814,6 +1941,8 @@ type ChatCompletionResponse = {
|
|
|
1814
1941
|
toolCalls: ToolCall[];
|
|
1815
1942
|
usage: TokenUsage;
|
|
1816
1943
|
finishReason: FinishReason;
|
|
1944
|
+
/** Native reasoning blocks + summary captured from the response, if any. */
|
|
1945
|
+
reasoning?: ReasoningPayload;
|
|
1817
1946
|
raw: any;
|
|
1818
1947
|
};
|
|
1819
1948
|
type ChatCompletionChunk = {
|
|
@@ -1822,6 +1951,8 @@ type ChatCompletionChunk = {
|
|
|
1822
1951
|
delta: {
|
|
1823
1952
|
content?: string;
|
|
1824
1953
|
toolCalls?: Partial<ToolCall>[];
|
|
1954
|
+
/** Incremental reasoning text / signature deltas (Anthropic thinking). */
|
|
1955
|
+
reasoning?: ReasoningPayload;
|
|
1825
1956
|
};
|
|
1826
1957
|
usage?: TokenUsage;
|
|
1827
1958
|
finishReason?: FinishReason;
|
|
@@ -1949,9 +2080,19 @@ declare class OpenAIProvider extends BaseProvider {
|
|
|
1949
2080
|
protected readonly defaultModel: string;
|
|
1950
2081
|
protected readonly defaultHeaders: Record<string, string>;
|
|
1951
2082
|
constructor(config: OpenAIProviderConfig);
|
|
2083
|
+
/** True when the request targets a reasoning model (o-series / gpt-5) so we
|
|
2084
|
+
* should route through the Responses API, which exposes `reasoning.effort`
|
|
2085
|
+
* and reasoning summaries. Chat Completions silently drops these. */
|
|
2086
|
+
protected useResponsesApi(request: ChatCompletionRequest): boolean;
|
|
1952
2087
|
complete(request: ChatCompletionRequest): Promise<ChatCompletionResponse>;
|
|
1953
2088
|
completeStream(request: ChatCompletionRequest): AsyncGenerator<ChatCompletionChunk, void, unknown>;
|
|
1954
2089
|
protected buildRequestBody(request: ChatCompletionRequest, stream: boolean): Record<string, any>;
|
|
2090
|
+
protected completeResponses(request: ChatCompletionRequest): Promise<ChatCompletionResponse>;
|
|
2091
|
+
protected buildResponsesBody(request: ChatCompletionRequest): Record<string, any>;
|
|
2092
|
+
/** Maps a unified message to a Responses API `input` item. */
|
|
2093
|
+
protected toResponsesInput(m: UnifiedMessage): Record<string, any>;
|
|
2094
|
+
protected responsesFetch(body: Record<string, any>): Promise<Response>;
|
|
2095
|
+
protected parseResponsesResponse(json: any, modelId: string): ChatCompletionResponse;
|
|
1955
2096
|
protected toOpenAIMessage(m: UnifiedMessage): Record<string, any>;
|
|
1956
2097
|
protected toOpenAITool(t: ToolDefinition): Record<string, any>;
|
|
1957
2098
|
protected doFetch(body: Record<string, any>): Promise<Response>;
|
|
@@ -1986,6 +2127,10 @@ declare class AzureProvider extends OpenAIProvider {
|
|
|
1986
2127
|
private readonly azureApiKey;
|
|
1987
2128
|
constructor(config: AzureProviderConfig);
|
|
1988
2129
|
protected doFetch(body: Record<string, any>): Promise<Response>;
|
|
2130
|
+
/** Azure exposes the Responses API at /openai/responses with api-key auth.
|
|
2131
|
+
* Reasoning summaries require a preview api-version; callers can override via
|
|
2132
|
+
* the `apiVersion` config. */
|
|
2133
|
+
protected responsesFetch(body: Record<string, any>): Promise<Response>;
|
|
1989
2134
|
}
|
|
1990
2135
|
|
|
1991
2136
|
declare class OpenAICompatibleProvider extends OpenAIProvider {
|
|
@@ -2083,4 +2228,4 @@ declare function fromNativeProvider(provider: BaseProvider, options?: NativeMode
|
|
|
2083
2228
|
*/
|
|
2084
2229
|
declare function createProvider(config: ProviderConfig): BaseProvider;
|
|
2085
2230
|
|
|
2086
|
-
export { type AIMessage, type AgentInstance, type AgentInvokeResult, type AgentLimits, type AgentOptions, type AgentRuleOptions, type AgentRuntimeConfig, type AgentSnapshot, type AgentSnapshotMetadata, type AgentState, AnthropicProvider, type AnthropicProviderConfig, AzureProvider, type AzureProviderConfig, type BaseChatMessage, type BaseChatMessagePart, type BaseChatModel, type BaseMessage, BaseProvider, BedrockProvider, type BedrockProviderConfig, type BuiltInRuntimeProfile, type CancellationTokenLike, type CancelledEvent, type ChatCompletionChunk, type ChatCompletionRequest, type ChatCompletionResponse, type ChildContextPolicy, type CodeDetectionRuleOptions, type CodeGuardrailOptions, type ContextPolicy, type ContextToolsStateRef, type ConversationGuardrail, type CustomRuleCallback, type CustomRuleOptions, DEFAULT_PROFILE_CONFIGS, type DelegationMode, type EvalCase, type EvalCaseResult, type EvalFamily, type EvalHarnessMetrics, type EvalHarnessParams, type EvalHarnessResult, type EvalProfileDescriptor, type EvalProfileTarget, type FinalAnswerEvent, type FinishReason, type GuardrailContext, type GuardrailDisposition, type GuardrailEvent, type GuardrailIncident, type GuardrailOutcome, GuardrailPhase, type GuardrailRule, type HandoffDescriptor, type HandoffEvent, type HumanInTheLoopAskUserConfig, type HumanInTheLoopOptions, type HumanInTheLoopRuntimeConfig, InMemoryMemoryStore, type InvokeConfig, type JsonGuardrailOptions, type JsonSchemaRuleOptions, type MemoryFact, type MemoryProviderKind, type MemoryReadPolicy, type MemoryScope, type MemoryStore, type MemoryWritePolicy, type Message, type MetadataEvent, type ModelCapabilities, NativeJsonSchemaStrategy, type NativeModelOptions, type NativeReasoningConfig, OpenAICompatibleProvider, type OpenAICompatibleProviderConfig, OpenAIProvider, type OpenAIProviderConfig, type PendingToolApproval, type PendingUserQuestion, type PlanEvent, type PlanStepRecord, type PlanningMode, type ProfileConfig, type ProgressEvent, type ProgressUpdate, type ProviderConfig, ProviderError, type ToolCall as ProviderToolCall, type ToolDefinition as ProviderToolDefinition, type ProviderType, type ReasoningConfig, type ReasoningLevel, type ReflectionCadence, type ReflectionConfig, type ReflectionEvent, type ReflectionRecord, type RegexGuardrailOptions, type RegexRuleOptions, type ReplanPolicy, type ResolvedSmartAgentConfig, type ResolvedTraceConfig, type ResolvedTraceSink, type RestoreSnapshotOptions, type RuntimeProfile, type SerializableSmartState, type SmartAgentBudgetConfig, type SmartAgentContextConfig, type SmartAgentCustomProfileConfig, type SmartAgentDelegationConfig, type SmartAgentEvent, type SmartAgentInstance, type SmartAgentLimits, type SmartAgentMemoryConfig, type SmartAgentOptions, type SmartAgentPlanningConfig, type SmartAgentSummarizationConfig, type SmartAgentToolResponseConfig, type SmartAgentTracingConfig, type SmartModel, type SmartState, type SmartToolFn, type SnapshotOptions, type SnapshotRuntimeHint, type StreamChunk, type StreamEvent, type StructuredOutputError, type StructuredOutputFieldError, StructuredOutputManager, type StructuredOutputManagerConfig, type StructuredOutputResult, type StructuredOutputStrategy, type StructuredSummary, type SummarizationEvent, type SummarizationMode, type SummaryFactItem, type SummaryIntegrityCheck, type TokenCounter, type TokenUsage, type ToolApprovalEvent, type ToolApprovalResolution, type ToolApprovalStatus, ToolBasedStrategy, type ToolCachePolicy, type ToolCallEvent, type ToolInterface, type ToolResponseClassification, type ToolResponseRetentionPolicy, type ToolRetryPolicy, type TraceDataSection, type TraceErrorRecord, type TraceEventRecord, type TraceMessageSection, type TraceMetadataSection, type TraceSessionConfigSnapshot, type TraceSessionFile, type TraceSessionStatus, type TraceSessionSummary, type TraceSinkCognipeerConfig, type TraceSinkConfig, type TraceSinkCustomConfig, type TraceSinkFileConfig, type TraceSinkHttpConfig, type TraceSinkOtlpConfig, type TraceSinkSnapshot, type TraceSummarySection, type TraceToolCallSection, type TraceToolResultSection, type TracingConfig, type TracingMode, type UnifiedMessage, type UserQuestionAnswer, type UserQuestionAnswerSet, type UserQuestionEvent, type UserQuestionItem, type UserQuestionOption, type UserQuestionResolution, type UserQuestionStatus, VertexProvider, type VertexProviderConfig, agentVerdictRule, buildSystemPrompt, captureSnapshot, codePresenceRule, cognipeerSink, countApproxTokens, countMessagesTokens, createAgent, createAgentNode, createAskUserQuestionTool, createCodeGuardrail, createContextSummarizeNode, createContextTools, createGetToolResponseTool, createGuardrail, createJsonGuardrail, createManageTodoTool, createProvider, createRegexGuardrail, createResolverNode, createSmartAgent, createTool, createToolLimitFinalizeNode, createToolsNode, customCallbackRule, customSink, defaultTokenCounter, emptyUsage, evaluateGuardrails, fileSink, formatZodError, fromLangchainModel, fromLangchainTools, fromNativeProvider, generateSpanId, generateTraceId, getModelCapabilities, getNestedValue, getResolvedSmartConfig, getTokenCounter, hasToolResponseRecoveryReference, httpSink, isSmartModel, jsonSchemaRule, normalizeSmartAgentOptions, otlpSink, readMemoryFacts, regexRule, resolveMemoryStore, resolveStrategy, resolveToolApprovalState, resolveUserQuestionState, restoreSnapshot, runSmartAgentEvalHarness, setTokenCounter, startStreamingSession, traceSessionToOtlp, withTools, writeSummaryFactsToMemory };
|
|
2231
|
+
export { type AIMessage, type AgentInstance, type AgentInvokeResult, type AgentLimits, type AgentOptions, type AgentRuleOptions, type AgentRuntimeConfig, type AgentSnapshot, type AgentSnapshotMetadata, type AgentState, AnthropicProvider, type AnthropicProviderConfig, AzureProvider, type AzureProviderConfig, type BaseChatMessage, type BaseChatMessagePart, type BaseChatModel, type BaseMessage, BaseProvider, BedrockProvider, type BedrockProviderConfig, type BuiltInRuntimeProfile, type CancellationTokenLike, type CancelledEvent, type ChatCompletionChunk, type ChatCompletionRequest, type ChatCompletionResponse, type ChildContextPolicy, type CodeDetectionRuleOptions, type CodeGuardrailOptions, type ContextPolicy, type ContextToolsStateRef, type ConversationGuardrail, type CustomRuleCallback, type CustomRuleOptions, DEFAULT_PROFILE_CONFIGS, type DelegationMode, type EvalCase, type EvalCaseResult, type EvalFamily, type EvalHarnessMetrics, type EvalHarnessParams, type EvalHarnessResult, type EvalProfileDescriptor, type EvalProfileTarget, type FinalAnswerEvent, type FinishReason, type GuardrailContext, type GuardrailDisposition, type GuardrailEvent, type GuardrailIncident, type GuardrailOutcome, GuardrailPhase, type GuardrailRule, type HandoffDescriptor, type HandoffEvent, type HumanInTheLoopAskUserConfig, type HumanInTheLoopOptions, type HumanInTheLoopRuntimeConfig, InMemoryMemoryStore, type InvokeConfig, type JsonGuardrailOptions, type JsonSchemaRuleOptions, type MemoryFact, type MemoryProviderKind, type MemoryReadPolicy, type MemoryScope, type MemoryStore, type MemoryWritePolicy, type Message, type MetadataEvent, type ModelCapabilities, NativeJsonSchemaStrategy, type NativeModelOptions, type NativeReasoningConfig, OpenAICompatibleProvider, type OpenAICompatibleProviderConfig, OpenAIProvider, type OpenAIProviderConfig, type PendingToolApproval, type PendingUserQuestion, type PlanEvent, type PlanStepRecord, type PlanningMode, type ProfileConfig, type ProgressEvent, type ProgressUpdate, type ProviderConfig, ProviderError, type ToolCall as ProviderToolCall, type ToolDefinition as ProviderToolDefinition, type ProviderType, type ReasoningConfig, type ReasoningLevel, type ReflectionCadence, type ReflectionConfig, type ReflectionEvent, type ReflectionHookContext, type ReflectionRecord, type RegexGuardrailOptions, type RegexRuleOptions, type ReplanPolicy, type ResolvedSmartAgentConfig, type ResolvedTraceConfig, type ResolvedTraceSink, type RestoreSnapshotOptions, type RuntimeProfile, type SerializableSmartState, type SmartAgentBudgetConfig, type SmartAgentContextConfig, type SmartAgentCustomProfileConfig, type SmartAgentDelegationConfig, type SmartAgentEvent, type SmartAgentInstance, type SmartAgentLimits, type SmartAgentMemoryConfig, type SmartAgentOptions, type SmartAgentPlanningConfig, type SmartAgentSummarizationConfig, type SmartAgentToolResponseConfig, type SmartAgentTracingConfig, type SmartModel, type SmartState, type SmartToolFn, type SnapshotOptions, type SnapshotRuntimeHint, type StreamChunk, type StreamEvent, type StructuredOutputError, type StructuredOutputFieldError, StructuredOutputManager, type StructuredOutputManagerConfig, type StructuredOutputResult, type StructuredOutputStrategy, type StructuredSummary, type SummarizationEvent, type SummarizationMode, type SummaryFactItem, type SummaryIntegrityCheck, type TokenCounter, type TokenUsage, type ToolApprovalEvent, type ToolApprovalResolution, type ToolApprovalStatus, ToolBasedStrategy, type ToolCachePolicy, type ToolCallEvent, type ToolInterface, type ToolResponseClassification, type ToolResponseRetentionPolicy, type ToolRetryPolicy, type TraceDataSection, type TraceErrorRecord, type TraceEventRecord, type TraceMessageSection, type TraceMetadataSection, type TraceSessionConfigSnapshot, type TraceSessionFile, type TraceSessionStatus, type TraceSessionSummary, type TraceSinkCognipeerConfig, type TraceSinkConfig, type TraceSinkCustomConfig, type TraceSinkFileConfig, type TraceSinkHttpConfig, type TraceSinkOtlpConfig, type TraceSinkSnapshot, type TraceSummarySection, type TraceToolCallSection, type TraceToolDetails, type TraceToolResponseSection, type TraceToolResultSection, type TracingConfig, type TracingMode, type UnifiedMessage, type UserQuestionAnswer, type UserQuestionAnswerSet, type UserQuestionEvent, type UserQuestionItem, type UserQuestionOption, type UserQuestionResolution, type UserQuestionStatus, VertexProvider, type VertexProviderConfig, agentVerdictRule, buildSystemPrompt, captureSnapshot, codePresenceRule, cognipeerSink, countApproxTokens, countMessagesTokens, createAgent, createAgentNode, createAskUserQuestionTool, createCodeGuardrail, createContextSummarizeNode, createContextTools, createGetToolResponseTool, createGuardrail, createJsonGuardrail, createManageTodoTool, createProvider, createRegexGuardrail, createResolverNode, createSmartAgent, createTool, createToolLimitFinalizeNode, createToolsNode, customCallbackRule, customSink, defaultTokenCounter, emptyUsage, evaluateGuardrails, fileSink, formatZodError, fromLangchainModel, fromLangchainTools, fromNativeProvider, generateSpanId, generateTraceId, getModelCapabilities, getNestedValue, getResolvedSmartConfig, getTokenCounter, hasToolResponseRecoveryReference, httpSink, isSmartModel, jsonSchemaRule, normalizeSmartAgentOptions, otlpSink, readMemoryFacts, regexRule, resolveMemoryStore, resolveReasoning, resolveStrategy, resolveToolApprovalState, resolveUserQuestionState, restoreSnapshot, runSmartAgentEvalHarness, setTokenCounter, startStreamingSession, traceSessionToOtlp, validateReasoningConfig, withTools, writeSummaryFactsToMemory };
|