@cognipeer/agent-sdk 0.8.9 → 0.8.11
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 +297 -16
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +81 -6
- package/dist/index.d.ts +81 -6
- package/dist/index.mjs +296 -17
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -719,7 +719,8 @@ type ReflectionConfig = {
|
|
|
719
719
|
onReflection?: (record: ReflectionRecord, ctx: ReflectionHookContext) => void;
|
|
720
720
|
};
|
|
721
721
|
type NativeReasoningConfig = {
|
|
722
|
-
|
|
722
|
+
/** `none` is OFF — a value that gets SENT. See ReasoningEffort in providers/types.ts. */
|
|
723
|
+
effort?: "none" | "minimal" | "low" | "medium" | "high";
|
|
723
724
|
budgetTokens?: number;
|
|
724
725
|
includeThoughts?: boolean;
|
|
725
726
|
providerExtras?: Record<string, any>;
|
|
@@ -2760,6 +2761,40 @@ declare function digestToolInputArguments(argumentsJson: string, options?: ToolI
|
|
|
2760
2761
|
digestedPaths: string[];
|
|
2761
2762
|
reclaimedChars: number;
|
|
2762
2763
|
};
|
|
2764
|
+
/**
|
|
2765
|
+
* Parse tool arguments against the tool's schema.
|
|
2766
|
+
*
|
|
2767
|
+
* Two passes, and the order is the contract: the raw arguments are validated
|
|
2768
|
+
* FIRST, so a model that emits well-typed arguments is unaffected and the schema
|
|
2769
|
+
* stays a real constraint. Only when that fails are the arguments run through
|
|
2770
|
+
* `coerceToolArgs` and re-validated — repairing the type artifacts smaller and
|
|
2771
|
+
* grammar-constrained backends produce (a nested object sent as a JSON string, a
|
|
2772
|
+
* number sent as `"60"`, `""` standing in for an omitted optional) instead of
|
|
2773
|
+
* spending a turn telling the model something it did not get wrong.
|
|
2774
|
+
*
|
|
2775
|
+
* Coercion never fabricates a value, so a genuinely missing required argument
|
|
2776
|
+
* still fails — and it fails with the ORIGINAL issues plus the shape the tool
|
|
2777
|
+
* actually wants, because "expected object, received string" on its own does not
|
|
2778
|
+
* tell a weaker model which key to fix.
|
|
2779
|
+
*/
|
|
2780
|
+
declare function validateToolArgs(tool: ToolInterface<any, any, any>, args: unknown): {
|
|
2781
|
+
ok: true;
|
|
2782
|
+
value: any;
|
|
2783
|
+
coerced?: boolean;
|
|
2784
|
+
} | {
|
|
2785
|
+
ok: false;
|
|
2786
|
+
message: string;
|
|
2787
|
+
};
|
|
2788
|
+
|
|
2789
|
+
/**
|
|
2790
|
+
* Re-type `value` so it satisfies `schema`, walking both together.
|
|
2791
|
+
*
|
|
2792
|
+
* Returns the original value untouched whenever nothing needs repairing or
|
|
2793
|
+
* nothing sensible can be done — this must never throw, because it runs on the
|
|
2794
|
+
* error path and a throw here would replace a useful validation message with a
|
|
2795
|
+
* crash.
|
|
2796
|
+
*/
|
|
2797
|
+
declare function coerceToolArgs(schema: unknown, value: unknown): unknown;
|
|
2763
2798
|
|
|
2764
2799
|
declare function fileSink(path?: string): TraceSinkConfig;
|
|
2765
2800
|
type CustomSinkArg = ((event: TraceEventRecord) => void | Promise<void>) | {
|
|
@@ -2918,7 +2953,18 @@ type ChatCompletionRequest = {
|
|
|
2918
2953
|
*/
|
|
2919
2954
|
reasoning?: ReasoningRequestConfig;
|
|
2920
2955
|
};
|
|
2921
|
-
|
|
2956
|
+
/**
|
|
2957
|
+
* `none` is OFF, and it is a value rather than the absence of one.
|
|
2958
|
+
*
|
|
2959
|
+
* On a thinking-by-default model — every Qwen3 under vLLM, gpt-5.1 and newer on
|
|
2960
|
+
* OpenAI — sending no reasoning field leaves the model thinking. So "do not
|
|
2961
|
+
* think" is an instruction that has to travel: `reasoning_effort:"none"` on
|
|
2962
|
+
* OpenAI, `thinkingBudget:0` on Gemini, and no thinking block at all on
|
|
2963
|
+
* Anthropic (where thinking is opt-in and the absence IS off). Omitting
|
|
2964
|
+
* `effort` still means "say nothing about reasoning", which is the different
|
|
2965
|
+
* and equally necessary state.
|
|
2966
|
+
*/
|
|
2967
|
+
type ReasoningEffort = "none" | "minimal" | "low" | "medium" | "high";
|
|
2922
2968
|
type ReasoningRequestConfig = {
|
|
2923
2969
|
/** Qualitative effort hint (mapped per-provider). */
|
|
2924
2970
|
effort?: ReasoningEffort;
|
|
@@ -2981,6 +3027,28 @@ type OpenAIProviderConfig = {
|
|
|
2981
3027
|
defaultModel?: string;
|
|
2982
3028
|
defaultHeaders?: Record<string, string>;
|
|
2983
3029
|
retry?: ProviderRetryConfig;
|
|
3030
|
+
/**
|
|
3031
|
+
* WHICH API a reasoning-carrying request is addressed to.
|
|
3032
|
+
*
|
|
3033
|
+
* auto (default, and today's behaviour) route to the Responses API when
|
|
3034
|
+
* the request carries `reasoning` AND the model name looks like an
|
|
3035
|
+
* o-series/gpt-5 reasoning model.
|
|
3036
|
+
* never always Chat Completions. `reasoning` is still mapped, as
|
|
3037
|
+
* `reasoning_effort` plus any `providerExtras`.
|
|
3038
|
+
* always always Responses, whatever the model is called.
|
|
3039
|
+
*
|
|
3040
|
+
* `auto` is a name-based guess, and it decides far more than where reasoning
|
|
3041
|
+
* goes: Responses is a different request shape (`input` not `messages`,
|
|
3042
|
+
* `text.format` not `response_format`, flat tool objects) and a different
|
|
3043
|
+
* response parse. A caller with its own measurements of the Chat Completions
|
|
3044
|
+
* body — a gateway, a proxy, an on-prem server that serves one and not the
|
|
3045
|
+
* other, or anything that has tuned `extra` — must be able to say so, rather
|
|
3046
|
+
* than discover that asking for less thinking silently changed the transport.
|
|
3047
|
+
*
|
|
3048
|
+
* Applies to any OpenAI-shaped endpoint, which is also why the guess is weak
|
|
3049
|
+
* where it matters most: a self-hosted model is named by whoever served it.
|
|
3050
|
+
*/
|
|
3051
|
+
responsesApi?: "auto" | "never" | "always";
|
|
2984
3052
|
};
|
|
2985
3053
|
type AnthropicProviderConfig = {
|
|
2986
3054
|
provider: "anthropic";
|
|
@@ -3085,10 +3153,17 @@ declare class OpenAIProvider extends BaseProvider {
|
|
|
3085
3153
|
protected readonly baseURL: string;
|
|
3086
3154
|
protected readonly defaultModel: string;
|
|
3087
3155
|
protected readonly defaultHeaders: Record<string, string>;
|
|
3156
|
+
protected readonly responsesApi: "auto" | "never" | "always";
|
|
3088
3157
|
constructor(config: OpenAIProviderConfig);
|
|
3089
|
-
/** True when
|
|
3090
|
-
*
|
|
3091
|
-
*
|
|
3158
|
+
/** True when this request should go to the Responses API rather than Chat
|
|
3159
|
+
* Completions — which exposes `reasoning.effort` and reasoning summaries that
|
|
3160
|
+
* Chat Completions silently drops.
|
|
3161
|
+
*
|
|
3162
|
+
* `auto` (the default) keeps the historical rule: only when the request
|
|
3163
|
+
* carries a reasoning config AND the model name looks like an o-series/gpt-5
|
|
3164
|
+
* model. `never`/`always` let a caller state the answer instead, because the
|
|
3165
|
+
* name check is a guess and the two APIs differ in far more than reasoning —
|
|
3166
|
+
* see `responsesApi` in OpenAIProviderConfig. */
|
|
3092
3167
|
protected useResponsesApi(request: ChatCompletionRequest): boolean;
|
|
3093
3168
|
complete(request: ChatCompletionRequest): Promise<ChatCompletionResponse>;
|
|
3094
3169
|
completeStream(request: ChatCompletionRequest): AsyncGenerator<ChatCompletionChunk, void, unknown>;
|
|
@@ -3260,4 +3335,4 @@ declare function fromNativeProvider(provider: BaseProvider, options?: NativeMode
|
|
|
3260
3335
|
*/
|
|
3261
3336
|
declare function createProvider(config: ProviderConfig): BaseProvider;
|
|
3262
3337
|
|
|
3263
|
-
export { type AIMessage, ASK_USER_TOOL_NAME, type AgentInstance, type AgentInvokeResult, type AgentLimits, type AgentOptions, type AgentRuleOptions, type AgentRuntimeConfig, type AgentSnapshot, type AgentSnapshotMetadata, type AgentState, AnthropicProvider, type AnthropicProviderConfig, type AudioContent, AzureProvider, type AzureProviderConfig, type BaseChatMessage, type BaseChatMessagePart, type BaseChatModel, type BaseMessage, BaseProvider, BedrockProvider, type BedrockProviderConfig, type BuildChildConfig, type BuiltInRuntimeProfile, CCRStore, CONTEXT_PILOT_JSON_MARKER_KEY, CONTROL_PLANE_TOOL_NAMES, type CancellationTokenLike, type CancelledEvent, type ChatCompletionChunk, type ChatCompletionRequest, type ChatCompletionResponse, type ChildContextPolicy, type CodeDetectionRuleOptions, type CodeGuardrailOptions, type CompressToolOutputParams, type ContextPilotCCRConfig, type ContextPilotCacheAlignmentConfig, type ContextPilotCompressionConfig, type ContextPilotCompressionStats, type ContextPilotCompressorKind, type ContextPilotConfig, type ContextPilotDedupConfig, type ContextPilotDiffCompressionConfig, type ContextPilotJsonCompressionConfig, type ContextPilotLogCompressionConfig, type ContextPilotResult, type ContextPilotRuntime, type ContextPilotSearchCompressionConfig, type ContextPilotTextCompressionConfig, type ContextPolicy, type ContextToolsStateRef, type ConversationGuardrail, type CustomRuleCallback, type CustomRuleOptions, DEFAULT_MAX_TOOL_INPUT_FIELD_CHARS, DEFAULT_PROFILE_CONFIGS, DEFAULT_SKILL_POLICY, DEFAULT_SUBAGENT_POLICY, DEFAULT_SUBAGENT_TOOL_NAMES, DEFAULT_TOOL_INPUT_DIGEST_HEAD_CHARS, DELEGATION_TOOL_NAMES, DedupTracker, type DelegationEventStamp, type DelegationMode, type EvalCase, type EvalCaseResult, type EvalFamily, type EvalHarnessMetrics, type EvalHarnessParams, type EvalHarnessResult, type EvalProfileDescriptor, type EvalProfileTarget, type FileContent, 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, type ImageContent, InMemoryMemoryStore, type InvokeConfig, type JsonGuardrailOptions, type JsonSchemaRuleOptions, type LoadSkillsOptions, 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 PromptHooks, 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 ResolvedContextPilotConfig, type ResolvedSmartAgentConfig, type ResolvedTraceConfig, type ResolvedTraceSink, type RestoreSnapshotOptions, type RuntimeProfile, SMALL_TIER_SKILL_POLICY, type SerializableSmartState, type Skill, type SkillDisclosure, type SkillExecutionContext, type SkillFrontmatter, type SkillFs, type SkillModelTier, type SkillPolicy, type SkillRegistryRef, type SkillToolDeps, type SkillToolHeader, 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 SubagentDef, type SubagentEvent, type SubagentMode, type SubagentPendingRecord, type SubagentPolicy, type SubagentRegistryRef, type SubagentResult, type SubagentToolDeps, type SubagentToolNames, type SummarizationEvent, type SummarizationMode, type SummaryFactItem, type SummaryIntegrityCheck, TOOL_INPUT_DIGEST_KEY, type TextContent, type TokenCounter, type TokenUsage, type ToolApprovalEvent, type ToolApprovalResolution, type ToolApprovalStatus, ToolBasedStrategy, type ToolCachePolicy, type ToolCallEvent, type ToolInputDigestOptions, type ToolInputDigestResult, type ToolInputRetentionPolicy, type ToolInterface, type ToolResponseClassification, type ToolResponseRetentionPolicy, type ToolRetentionDeclarations, type ToolRetentionSpec, 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, type VolatileContentFinding, type VolatileContentPattern, agentVerdictRule, appendBoundTools, buildSkillHeaderBlock, buildSubagentCatalogBlock, buildSystemPrompt, canOpenSkill, canSpawn, captureSnapshot, codePresenceRule, cognipeerSink, collectToolRetentionDeclarations, composeToolSets, compressDiffOutput, compressJsonOutput, compressLogOutput, compressSearchOutput, compressTextOutput, compressToolOutput, countApproxTokens, countMessagesTokens, createAgent, createAgentNode, createAskUserQuestionTool, createBindSkillToolsTool, createCodeGuardrail, createContextPilotRuntime, createContextSummarizeNode, createContextTools, createDelegateTool, createGetToolResponseTool, createGuardrail, createJsonGuardrail, createManageTodoTool, createOpenSkillTool, createParallelTool, createProvider, createRegexGuardrail, createResolverNode, createSearchSkillsTool, createSkillRegistryRef, createSkillTools, createSmartAgent, createSpawnTool, createSubagentRegistryRef, createSubagentTools, createTool, createToolLimitFinalizeNode, createToolsNode, customCallbackRule, customSink, dedupeToolsByName, defaultTokenCounter, detectTextFormat, detectVolatileContent, digestToolInputArguments, digestToolInputValue, emptyUsage, evaluateGuardrails, extractLatestUserQuery, fileSink, findSubagent, formatZodError, fromLangchainModel, fromLangchainTools, fromNativeProvider, generateSpanId, generateTraceId, getModelCapabilities, getNestedValue, getResolvedSmartConfig, getTokenCounter, hasToolResponseRecoveryReference, httpSink, isSmartModel, jsonSchemaRule, loadSkillsFromDisk, normalizeSmartAgentOptions, otlpSink, parseSkillFrontmatter, readMemoryFacts, regexRule, resolveAvailableSkills, resolveAvailableSubagents, resolveInputRetention, resolveMemoryStore, resolveReasoning, resolveStrategy, resolveSubagentTools, resolveSummarizationRetention, resolveToolApprovalState, resolveUserQuestionState, restoreSnapshot, runSmartAgentEvalHarness, scoreItemsByRelevance, searchSkills, seedChildMessages, selectTopIndicesInOrder, setTokenCounter, startStreamingSession, summarizeObject, tokenize, traceSessionToOtlp, validateReasoningConfig, withTools, withinDepth, writeSummaryFactsToMemory };
|
|
3338
|
+
export { type AIMessage, ASK_USER_TOOL_NAME, type AgentInstance, type AgentInvokeResult, type AgentLimits, type AgentOptions, type AgentRuleOptions, type AgentRuntimeConfig, type AgentSnapshot, type AgentSnapshotMetadata, type AgentState, AnthropicProvider, type AnthropicProviderConfig, type AudioContent, AzureProvider, type AzureProviderConfig, type BaseChatMessage, type BaseChatMessagePart, type BaseChatModel, type BaseMessage, BaseProvider, BedrockProvider, type BedrockProviderConfig, type BuildChildConfig, type BuiltInRuntimeProfile, CCRStore, CONTEXT_PILOT_JSON_MARKER_KEY, CONTROL_PLANE_TOOL_NAMES, type CancellationTokenLike, type CancelledEvent, type ChatCompletionChunk, type ChatCompletionRequest, type ChatCompletionResponse, type ChildContextPolicy, type CodeDetectionRuleOptions, type CodeGuardrailOptions, type CompressToolOutputParams, type ContextPilotCCRConfig, type ContextPilotCacheAlignmentConfig, type ContextPilotCompressionConfig, type ContextPilotCompressionStats, type ContextPilotCompressorKind, type ContextPilotConfig, type ContextPilotDedupConfig, type ContextPilotDiffCompressionConfig, type ContextPilotJsonCompressionConfig, type ContextPilotLogCompressionConfig, type ContextPilotResult, type ContextPilotRuntime, type ContextPilotSearchCompressionConfig, type ContextPilotTextCompressionConfig, type ContextPolicy, type ContextToolsStateRef, type ConversationGuardrail, type CustomRuleCallback, type CustomRuleOptions, DEFAULT_MAX_TOOL_INPUT_FIELD_CHARS, DEFAULT_PROFILE_CONFIGS, DEFAULT_SKILL_POLICY, DEFAULT_SUBAGENT_POLICY, DEFAULT_SUBAGENT_TOOL_NAMES, DEFAULT_TOOL_INPUT_DIGEST_HEAD_CHARS, DELEGATION_TOOL_NAMES, DedupTracker, type DelegationEventStamp, type DelegationMode, type EvalCase, type EvalCaseResult, type EvalFamily, type EvalHarnessMetrics, type EvalHarnessParams, type EvalHarnessResult, type EvalProfileDescriptor, type EvalProfileTarget, type FileContent, 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, type ImageContent, InMemoryMemoryStore, type InvokeConfig, type JsonGuardrailOptions, type JsonSchemaRuleOptions, type LoadSkillsOptions, 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 PromptHooks, 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 ResolvedContextPilotConfig, type ResolvedSmartAgentConfig, type ResolvedTraceConfig, type ResolvedTraceSink, type RestoreSnapshotOptions, type RuntimeProfile, SMALL_TIER_SKILL_POLICY, type SerializableSmartState, type Skill, type SkillDisclosure, type SkillExecutionContext, type SkillFrontmatter, type SkillFs, type SkillModelTier, type SkillPolicy, type SkillRegistryRef, type SkillToolDeps, type SkillToolHeader, 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 SubagentDef, type SubagentEvent, type SubagentMode, type SubagentPendingRecord, type SubagentPolicy, type SubagentRegistryRef, type SubagentResult, type SubagentToolDeps, type SubagentToolNames, type SummarizationEvent, type SummarizationMode, type SummaryFactItem, type SummaryIntegrityCheck, TOOL_INPUT_DIGEST_KEY, type TextContent, type TokenCounter, type TokenUsage, type ToolApprovalEvent, type ToolApprovalResolution, type ToolApprovalStatus, ToolBasedStrategy, type ToolCachePolicy, type ToolCallEvent, type ToolInputDigestOptions, type ToolInputDigestResult, type ToolInputRetentionPolicy, type ToolInterface, type ToolResponseClassification, type ToolResponseRetentionPolicy, type ToolRetentionDeclarations, type ToolRetentionSpec, 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, type VolatileContentFinding, type VolatileContentPattern, agentVerdictRule, appendBoundTools, buildSkillHeaderBlock, buildSubagentCatalogBlock, buildSystemPrompt, canOpenSkill, canSpawn, captureSnapshot, codePresenceRule, coerceToolArgs, cognipeerSink, collectToolRetentionDeclarations, composeToolSets, compressDiffOutput, compressJsonOutput, compressLogOutput, compressSearchOutput, compressTextOutput, compressToolOutput, countApproxTokens, countMessagesTokens, createAgent, createAgentNode, createAskUserQuestionTool, createBindSkillToolsTool, createCodeGuardrail, createContextPilotRuntime, createContextSummarizeNode, createContextTools, createDelegateTool, createGetToolResponseTool, createGuardrail, createJsonGuardrail, createManageTodoTool, createOpenSkillTool, createParallelTool, createProvider, createRegexGuardrail, createResolverNode, createSearchSkillsTool, createSkillRegistryRef, createSkillTools, createSmartAgent, createSpawnTool, createSubagentRegistryRef, createSubagentTools, createTool, createToolLimitFinalizeNode, createToolsNode, customCallbackRule, customSink, dedupeToolsByName, defaultTokenCounter, detectTextFormat, detectVolatileContent, digestToolInputArguments, digestToolInputValue, emptyUsage, evaluateGuardrails, extractLatestUserQuery, fileSink, findSubagent, formatZodError, fromLangchainModel, fromLangchainTools, fromNativeProvider, generateSpanId, generateTraceId, getModelCapabilities, getNestedValue, getResolvedSmartConfig, getTokenCounter, hasToolResponseRecoveryReference, httpSink, isSmartModel, jsonSchemaRule, loadSkillsFromDisk, normalizeSmartAgentOptions, otlpSink, parseSkillFrontmatter, readMemoryFacts, regexRule, resolveAvailableSkills, resolveAvailableSubagents, resolveInputRetention, resolveMemoryStore, resolveReasoning, resolveStrategy, resolveSubagentTools, resolveSummarizationRetention, resolveToolApprovalState, resolveUserQuestionState, restoreSnapshot, runSmartAgentEvalHarness, scoreItemsByRelevance, searchSkills, seedChildMessages, selectTopIndicesInOrder, setTokenCounter, startStreamingSession, summarizeObject, tokenize, traceSessionToOtlp, validateReasoningConfig, validateToolArgs, withTools, withinDepth, writeSummaryFactsToMemory };
|
package/dist/index.d.ts
CHANGED
|
@@ -719,7 +719,8 @@ type ReflectionConfig = {
|
|
|
719
719
|
onReflection?: (record: ReflectionRecord, ctx: ReflectionHookContext) => void;
|
|
720
720
|
};
|
|
721
721
|
type NativeReasoningConfig = {
|
|
722
|
-
|
|
722
|
+
/** `none` is OFF — a value that gets SENT. See ReasoningEffort in providers/types.ts. */
|
|
723
|
+
effort?: "none" | "minimal" | "low" | "medium" | "high";
|
|
723
724
|
budgetTokens?: number;
|
|
724
725
|
includeThoughts?: boolean;
|
|
725
726
|
providerExtras?: Record<string, any>;
|
|
@@ -2760,6 +2761,40 @@ declare function digestToolInputArguments(argumentsJson: string, options?: ToolI
|
|
|
2760
2761
|
digestedPaths: string[];
|
|
2761
2762
|
reclaimedChars: number;
|
|
2762
2763
|
};
|
|
2764
|
+
/**
|
|
2765
|
+
* Parse tool arguments against the tool's schema.
|
|
2766
|
+
*
|
|
2767
|
+
* Two passes, and the order is the contract: the raw arguments are validated
|
|
2768
|
+
* FIRST, so a model that emits well-typed arguments is unaffected and the schema
|
|
2769
|
+
* stays a real constraint. Only when that fails are the arguments run through
|
|
2770
|
+
* `coerceToolArgs` and re-validated — repairing the type artifacts smaller and
|
|
2771
|
+
* grammar-constrained backends produce (a nested object sent as a JSON string, a
|
|
2772
|
+
* number sent as `"60"`, `""` standing in for an omitted optional) instead of
|
|
2773
|
+
* spending a turn telling the model something it did not get wrong.
|
|
2774
|
+
*
|
|
2775
|
+
* Coercion never fabricates a value, so a genuinely missing required argument
|
|
2776
|
+
* still fails — and it fails with the ORIGINAL issues plus the shape the tool
|
|
2777
|
+
* actually wants, because "expected object, received string" on its own does not
|
|
2778
|
+
* tell a weaker model which key to fix.
|
|
2779
|
+
*/
|
|
2780
|
+
declare function validateToolArgs(tool: ToolInterface<any, any, any>, args: unknown): {
|
|
2781
|
+
ok: true;
|
|
2782
|
+
value: any;
|
|
2783
|
+
coerced?: boolean;
|
|
2784
|
+
} | {
|
|
2785
|
+
ok: false;
|
|
2786
|
+
message: string;
|
|
2787
|
+
};
|
|
2788
|
+
|
|
2789
|
+
/**
|
|
2790
|
+
* Re-type `value` so it satisfies `schema`, walking both together.
|
|
2791
|
+
*
|
|
2792
|
+
* Returns the original value untouched whenever nothing needs repairing or
|
|
2793
|
+
* nothing sensible can be done — this must never throw, because it runs on the
|
|
2794
|
+
* error path and a throw here would replace a useful validation message with a
|
|
2795
|
+
* crash.
|
|
2796
|
+
*/
|
|
2797
|
+
declare function coerceToolArgs(schema: unknown, value: unknown): unknown;
|
|
2763
2798
|
|
|
2764
2799
|
declare function fileSink(path?: string): TraceSinkConfig;
|
|
2765
2800
|
type CustomSinkArg = ((event: TraceEventRecord) => void | Promise<void>) | {
|
|
@@ -2918,7 +2953,18 @@ type ChatCompletionRequest = {
|
|
|
2918
2953
|
*/
|
|
2919
2954
|
reasoning?: ReasoningRequestConfig;
|
|
2920
2955
|
};
|
|
2921
|
-
|
|
2956
|
+
/**
|
|
2957
|
+
* `none` is OFF, and it is a value rather than the absence of one.
|
|
2958
|
+
*
|
|
2959
|
+
* On a thinking-by-default model — every Qwen3 under vLLM, gpt-5.1 and newer on
|
|
2960
|
+
* OpenAI — sending no reasoning field leaves the model thinking. So "do not
|
|
2961
|
+
* think" is an instruction that has to travel: `reasoning_effort:"none"` on
|
|
2962
|
+
* OpenAI, `thinkingBudget:0` on Gemini, and no thinking block at all on
|
|
2963
|
+
* Anthropic (where thinking is opt-in and the absence IS off). Omitting
|
|
2964
|
+
* `effort` still means "say nothing about reasoning", which is the different
|
|
2965
|
+
* and equally necessary state.
|
|
2966
|
+
*/
|
|
2967
|
+
type ReasoningEffort = "none" | "minimal" | "low" | "medium" | "high";
|
|
2922
2968
|
type ReasoningRequestConfig = {
|
|
2923
2969
|
/** Qualitative effort hint (mapped per-provider). */
|
|
2924
2970
|
effort?: ReasoningEffort;
|
|
@@ -2981,6 +3027,28 @@ type OpenAIProviderConfig = {
|
|
|
2981
3027
|
defaultModel?: string;
|
|
2982
3028
|
defaultHeaders?: Record<string, string>;
|
|
2983
3029
|
retry?: ProviderRetryConfig;
|
|
3030
|
+
/**
|
|
3031
|
+
* WHICH API a reasoning-carrying request is addressed to.
|
|
3032
|
+
*
|
|
3033
|
+
* auto (default, and today's behaviour) route to the Responses API when
|
|
3034
|
+
* the request carries `reasoning` AND the model name looks like an
|
|
3035
|
+
* o-series/gpt-5 reasoning model.
|
|
3036
|
+
* never always Chat Completions. `reasoning` is still mapped, as
|
|
3037
|
+
* `reasoning_effort` plus any `providerExtras`.
|
|
3038
|
+
* always always Responses, whatever the model is called.
|
|
3039
|
+
*
|
|
3040
|
+
* `auto` is a name-based guess, and it decides far more than where reasoning
|
|
3041
|
+
* goes: Responses is a different request shape (`input` not `messages`,
|
|
3042
|
+
* `text.format` not `response_format`, flat tool objects) and a different
|
|
3043
|
+
* response parse. A caller with its own measurements of the Chat Completions
|
|
3044
|
+
* body — a gateway, a proxy, an on-prem server that serves one and not the
|
|
3045
|
+
* other, or anything that has tuned `extra` — must be able to say so, rather
|
|
3046
|
+
* than discover that asking for less thinking silently changed the transport.
|
|
3047
|
+
*
|
|
3048
|
+
* Applies to any OpenAI-shaped endpoint, which is also why the guess is weak
|
|
3049
|
+
* where it matters most: a self-hosted model is named by whoever served it.
|
|
3050
|
+
*/
|
|
3051
|
+
responsesApi?: "auto" | "never" | "always";
|
|
2984
3052
|
};
|
|
2985
3053
|
type AnthropicProviderConfig = {
|
|
2986
3054
|
provider: "anthropic";
|
|
@@ -3085,10 +3153,17 @@ declare class OpenAIProvider extends BaseProvider {
|
|
|
3085
3153
|
protected readonly baseURL: string;
|
|
3086
3154
|
protected readonly defaultModel: string;
|
|
3087
3155
|
protected readonly defaultHeaders: Record<string, string>;
|
|
3156
|
+
protected readonly responsesApi: "auto" | "never" | "always";
|
|
3088
3157
|
constructor(config: OpenAIProviderConfig);
|
|
3089
|
-
/** True when
|
|
3090
|
-
*
|
|
3091
|
-
*
|
|
3158
|
+
/** True when this request should go to the Responses API rather than Chat
|
|
3159
|
+
* Completions — which exposes `reasoning.effort` and reasoning summaries that
|
|
3160
|
+
* Chat Completions silently drops.
|
|
3161
|
+
*
|
|
3162
|
+
* `auto` (the default) keeps the historical rule: only when the request
|
|
3163
|
+
* carries a reasoning config AND the model name looks like an o-series/gpt-5
|
|
3164
|
+
* model. `never`/`always` let a caller state the answer instead, because the
|
|
3165
|
+
* name check is a guess and the two APIs differ in far more than reasoning —
|
|
3166
|
+
* see `responsesApi` in OpenAIProviderConfig. */
|
|
3092
3167
|
protected useResponsesApi(request: ChatCompletionRequest): boolean;
|
|
3093
3168
|
complete(request: ChatCompletionRequest): Promise<ChatCompletionResponse>;
|
|
3094
3169
|
completeStream(request: ChatCompletionRequest): AsyncGenerator<ChatCompletionChunk, void, unknown>;
|
|
@@ -3260,4 +3335,4 @@ declare function fromNativeProvider(provider: BaseProvider, options?: NativeMode
|
|
|
3260
3335
|
*/
|
|
3261
3336
|
declare function createProvider(config: ProviderConfig): BaseProvider;
|
|
3262
3337
|
|
|
3263
|
-
export { type AIMessage, ASK_USER_TOOL_NAME, type AgentInstance, type AgentInvokeResult, type AgentLimits, type AgentOptions, type AgentRuleOptions, type AgentRuntimeConfig, type AgentSnapshot, type AgentSnapshotMetadata, type AgentState, AnthropicProvider, type AnthropicProviderConfig, type AudioContent, AzureProvider, type AzureProviderConfig, type BaseChatMessage, type BaseChatMessagePart, type BaseChatModel, type BaseMessage, BaseProvider, BedrockProvider, type BedrockProviderConfig, type BuildChildConfig, type BuiltInRuntimeProfile, CCRStore, CONTEXT_PILOT_JSON_MARKER_KEY, CONTROL_PLANE_TOOL_NAMES, type CancellationTokenLike, type CancelledEvent, type ChatCompletionChunk, type ChatCompletionRequest, type ChatCompletionResponse, type ChildContextPolicy, type CodeDetectionRuleOptions, type CodeGuardrailOptions, type CompressToolOutputParams, type ContextPilotCCRConfig, type ContextPilotCacheAlignmentConfig, type ContextPilotCompressionConfig, type ContextPilotCompressionStats, type ContextPilotCompressorKind, type ContextPilotConfig, type ContextPilotDedupConfig, type ContextPilotDiffCompressionConfig, type ContextPilotJsonCompressionConfig, type ContextPilotLogCompressionConfig, type ContextPilotResult, type ContextPilotRuntime, type ContextPilotSearchCompressionConfig, type ContextPilotTextCompressionConfig, type ContextPolicy, type ContextToolsStateRef, type ConversationGuardrail, type CustomRuleCallback, type CustomRuleOptions, DEFAULT_MAX_TOOL_INPUT_FIELD_CHARS, DEFAULT_PROFILE_CONFIGS, DEFAULT_SKILL_POLICY, DEFAULT_SUBAGENT_POLICY, DEFAULT_SUBAGENT_TOOL_NAMES, DEFAULT_TOOL_INPUT_DIGEST_HEAD_CHARS, DELEGATION_TOOL_NAMES, DedupTracker, type DelegationEventStamp, type DelegationMode, type EvalCase, type EvalCaseResult, type EvalFamily, type EvalHarnessMetrics, type EvalHarnessParams, type EvalHarnessResult, type EvalProfileDescriptor, type EvalProfileTarget, type FileContent, 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, type ImageContent, InMemoryMemoryStore, type InvokeConfig, type JsonGuardrailOptions, type JsonSchemaRuleOptions, type LoadSkillsOptions, 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 PromptHooks, 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 ResolvedContextPilotConfig, type ResolvedSmartAgentConfig, type ResolvedTraceConfig, type ResolvedTraceSink, type RestoreSnapshotOptions, type RuntimeProfile, SMALL_TIER_SKILL_POLICY, type SerializableSmartState, type Skill, type SkillDisclosure, type SkillExecutionContext, type SkillFrontmatter, type SkillFs, type SkillModelTier, type SkillPolicy, type SkillRegistryRef, type SkillToolDeps, type SkillToolHeader, 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 SubagentDef, type SubagentEvent, type SubagentMode, type SubagentPendingRecord, type SubagentPolicy, type SubagentRegistryRef, type SubagentResult, type SubagentToolDeps, type SubagentToolNames, type SummarizationEvent, type SummarizationMode, type SummaryFactItem, type SummaryIntegrityCheck, TOOL_INPUT_DIGEST_KEY, type TextContent, type TokenCounter, type TokenUsage, type ToolApprovalEvent, type ToolApprovalResolution, type ToolApprovalStatus, ToolBasedStrategy, type ToolCachePolicy, type ToolCallEvent, type ToolInputDigestOptions, type ToolInputDigestResult, type ToolInputRetentionPolicy, type ToolInterface, type ToolResponseClassification, type ToolResponseRetentionPolicy, type ToolRetentionDeclarations, type ToolRetentionSpec, 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, type VolatileContentFinding, type VolatileContentPattern, agentVerdictRule, appendBoundTools, buildSkillHeaderBlock, buildSubagentCatalogBlock, buildSystemPrompt, canOpenSkill, canSpawn, captureSnapshot, codePresenceRule, cognipeerSink, collectToolRetentionDeclarations, composeToolSets, compressDiffOutput, compressJsonOutput, compressLogOutput, compressSearchOutput, compressTextOutput, compressToolOutput, countApproxTokens, countMessagesTokens, createAgent, createAgentNode, createAskUserQuestionTool, createBindSkillToolsTool, createCodeGuardrail, createContextPilotRuntime, createContextSummarizeNode, createContextTools, createDelegateTool, createGetToolResponseTool, createGuardrail, createJsonGuardrail, createManageTodoTool, createOpenSkillTool, createParallelTool, createProvider, createRegexGuardrail, createResolverNode, createSearchSkillsTool, createSkillRegistryRef, createSkillTools, createSmartAgent, createSpawnTool, createSubagentRegistryRef, createSubagentTools, createTool, createToolLimitFinalizeNode, createToolsNode, customCallbackRule, customSink, dedupeToolsByName, defaultTokenCounter, detectTextFormat, detectVolatileContent, digestToolInputArguments, digestToolInputValue, emptyUsage, evaluateGuardrails, extractLatestUserQuery, fileSink, findSubagent, formatZodError, fromLangchainModel, fromLangchainTools, fromNativeProvider, generateSpanId, generateTraceId, getModelCapabilities, getNestedValue, getResolvedSmartConfig, getTokenCounter, hasToolResponseRecoveryReference, httpSink, isSmartModel, jsonSchemaRule, loadSkillsFromDisk, normalizeSmartAgentOptions, otlpSink, parseSkillFrontmatter, readMemoryFacts, regexRule, resolveAvailableSkills, resolveAvailableSubagents, resolveInputRetention, resolveMemoryStore, resolveReasoning, resolveStrategy, resolveSubagentTools, resolveSummarizationRetention, resolveToolApprovalState, resolveUserQuestionState, restoreSnapshot, runSmartAgentEvalHarness, scoreItemsByRelevance, searchSkills, seedChildMessages, selectTopIndicesInOrder, setTokenCounter, startStreamingSession, summarizeObject, tokenize, traceSessionToOtlp, validateReasoningConfig, withTools, withinDepth, writeSummaryFactsToMemory };
|
|
3338
|
+
export { type AIMessage, ASK_USER_TOOL_NAME, type AgentInstance, type AgentInvokeResult, type AgentLimits, type AgentOptions, type AgentRuleOptions, type AgentRuntimeConfig, type AgentSnapshot, type AgentSnapshotMetadata, type AgentState, AnthropicProvider, type AnthropicProviderConfig, type AudioContent, AzureProvider, type AzureProviderConfig, type BaseChatMessage, type BaseChatMessagePart, type BaseChatModel, type BaseMessage, BaseProvider, BedrockProvider, type BedrockProviderConfig, type BuildChildConfig, type BuiltInRuntimeProfile, CCRStore, CONTEXT_PILOT_JSON_MARKER_KEY, CONTROL_PLANE_TOOL_NAMES, type CancellationTokenLike, type CancelledEvent, type ChatCompletionChunk, type ChatCompletionRequest, type ChatCompletionResponse, type ChildContextPolicy, type CodeDetectionRuleOptions, type CodeGuardrailOptions, type CompressToolOutputParams, type ContextPilotCCRConfig, type ContextPilotCacheAlignmentConfig, type ContextPilotCompressionConfig, type ContextPilotCompressionStats, type ContextPilotCompressorKind, type ContextPilotConfig, type ContextPilotDedupConfig, type ContextPilotDiffCompressionConfig, type ContextPilotJsonCompressionConfig, type ContextPilotLogCompressionConfig, type ContextPilotResult, type ContextPilotRuntime, type ContextPilotSearchCompressionConfig, type ContextPilotTextCompressionConfig, type ContextPolicy, type ContextToolsStateRef, type ConversationGuardrail, type CustomRuleCallback, type CustomRuleOptions, DEFAULT_MAX_TOOL_INPUT_FIELD_CHARS, DEFAULT_PROFILE_CONFIGS, DEFAULT_SKILL_POLICY, DEFAULT_SUBAGENT_POLICY, DEFAULT_SUBAGENT_TOOL_NAMES, DEFAULT_TOOL_INPUT_DIGEST_HEAD_CHARS, DELEGATION_TOOL_NAMES, DedupTracker, type DelegationEventStamp, type DelegationMode, type EvalCase, type EvalCaseResult, type EvalFamily, type EvalHarnessMetrics, type EvalHarnessParams, type EvalHarnessResult, type EvalProfileDescriptor, type EvalProfileTarget, type FileContent, 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, type ImageContent, InMemoryMemoryStore, type InvokeConfig, type JsonGuardrailOptions, type JsonSchemaRuleOptions, type LoadSkillsOptions, 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 PromptHooks, 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 ResolvedContextPilotConfig, type ResolvedSmartAgentConfig, type ResolvedTraceConfig, type ResolvedTraceSink, type RestoreSnapshotOptions, type RuntimeProfile, SMALL_TIER_SKILL_POLICY, type SerializableSmartState, type Skill, type SkillDisclosure, type SkillExecutionContext, type SkillFrontmatter, type SkillFs, type SkillModelTier, type SkillPolicy, type SkillRegistryRef, type SkillToolDeps, type SkillToolHeader, 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 SubagentDef, type SubagentEvent, type SubagentMode, type SubagentPendingRecord, type SubagentPolicy, type SubagentRegistryRef, type SubagentResult, type SubagentToolDeps, type SubagentToolNames, type SummarizationEvent, type SummarizationMode, type SummaryFactItem, type SummaryIntegrityCheck, TOOL_INPUT_DIGEST_KEY, type TextContent, type TokenCounter, type TokenUsage, type ToolApprovalEvent, type ToolApprovalResolution, type ToolApprovalStatus, ToolBasedStrategy, type ToolCachePolicy, type ToolCallEvent, type ToolInputDigestOptions, type ToolInputDigestResult, type ToolInputRetentionPolicy, type ToolInterface, type ToolResponseClassification, type ToolResponseRetentionPolicy, type ToolRetentionDeclarations, type ToolRetentionSpec, 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, type VolatileContentFinding, type VolatileContentPattern, agentVerdictRule, appendBoundTools, buildSkillHeaderBlock, buildSubagentCatalogBlock, buildSystemPrompt, canOpenSkill, canSpawn, captureSnapshot, codePresenceRule, coerceToolArgs, cognipeerSink, collectToolRetentionDeclarations, composeToolSets, compressDiffOutput, compressJsonOutput, compressLogOutput, compressSearchOutput, compressTextOutput, compressToolOutput, countApproxTokens, countMessagesTokens, createAgent, createAgentNode, createAskUserQuestionTool, createBindSkillToolsTool, createCodeGuardrail, createContextPilotRuntime, createContextSummarizeNode, createContextTools, createDelegateTool, createGetToolResponseTool, createGuardrail, createJsonGuardrail, createManageTodoTool, createOpenSkillTool, createParallelTool, createProvider, createRegexGuardrail, createResolverNode, createSearchSkillsTool, createSkillRegistryRef, createSkillTools, createSmartAgent, createSpawnTool, createSubagentRegistryRef, createSubagentTools, createTool, createToolLimitFinalizeNode, createToolsNode, customCallbackRule, customSink, dedupeToolsByName, defaultTokenCounter, detectTextFormat, detectVolatileContent, digestToolInputArguments, digestToolInputValue, emptyUsage, evaluateGuardrails, extractLatestUserQuery, fileSink, findSubagent, formatZodError, fromLangchainModel, fromLangchainTools, fromNativeProvider, generateSpanId, generateTraceId, getModelCapabilities, getNestedValue, getResolvedSmartConfig, getTokenCounter, hasToolResponseRecoveryReference, httpSink, isSmartModel, jsonSchemaRule, loadSkillsFromDisk, normalizeSmartAgentOptions, otlpSink, parseSkillFrontmatter, readMemoryFacts, regexRule, resolveAvailableSkills, resolveAvailableSubagents, resolveInputRetention, resolveMemoryStore, resolveReasoning, resolveStrategy, resolveSubagentTools, resolveSummarizationRetention, resolveToolApprovalState, resolveUserQuestionState, restoreSnapshot, runSmartAgentEvalHarness, scoreItemsByRelevance, searchSkills, seedChildMessages, selectTopIndicesInOrder, setTokenCounter, startStreamingSession, summarizeObject, tokenize, traceSessionToOtlp, validateReasoningConfig, validateToolArgs, withTools, withinDepth, writeSummaryFactsToMemory };
|