@cognipeer/agent-sdk 0.15.0 → 0.17.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -971,23 +971,57 @@ type SubagentPolicy = {
971
971
  childContextPolicy: ChildContextPolicy;
972
972
  /** Whether ad-hoc spawns may reference the parent's tools by name. */
973
973
  allowAdhocTools: boolean;
974
+ /**
975
+ * Forward the children's streamed text to the parent's `onStream` / `stream`
976
+ * events. Off by default: a host that appends `chunk.text` would print every
977
+ * child's words as if they were the parent's answer. When on, each forwarded
978
+ * chunk carries `subagentName` / `subagentId`.
979
+ */
980
+ streamChildren?: boolean;
974
981
  };
975
982
  declare const DEFAULT_SUBAGENT_POLICY: SubagentPolicy;
976
- /** Result of a single sub-agent run (returned to the model as the tool result). */
983
+ /**
984
+ * How a child run ended.
985
+ * - `ok` — finished and produced an answer.
986
+ * - `incomplete` — stopped early (a limit, the tool-call cap, no answer): `content` is partial.
987
+ * - `blocked` — refused by policy (a `subagentStart` gate or an output guardrail).
988
+ * - `needs_input` — wanted a human (parallel fan-out cannot ask).
989
+ * - `cancelled` — the run was cancelled while the child was working.
990
+ * - `error` — threw, or its structured output failed.
991
+ */
992
+ type SubagentStatus = "ok" | "incomplete" | "blocked" | "needs_input" | "cancelled" | "error";
993
+ /** Model calls a child made, in the parent's `state.usage` shape. */
994
+ type SubagentUsage = {
995
+ perRequest: NonNullable<AgentState["usage"]>["perRequest"];
996
+ totals: NonNullable<AgentState["usage"]>["totals"];
997
+ };
998
+ /**
999
+ * Result of a single sub-agent run. The model sees a projection of it
1000
+ * (`toModelResult`: no `input`, `usage` or `durationMs`); hosts get the whole
1001
+ * thing on `subagent` events, `subagentStop` observers and the registry.
1002
+ */
977
1003
  type SubagentResult = {
978
1004
  /** Sub-agent name (registry) or role (ad-hoc). */
979
1005
  name: string;
980
1006
  mode: "registry" | "adhoc";
981
- /** The input the sub-agent was tasked with. */
982
- input: string;
983
- /** Final assistant content from the child. */
1007
+ status: SubagentStatus;
1008
+ /** The input the sub-agent was tasked with. Not echoed to the model. */
1009
+ input?: string;
1010
+ /** Final assistant content from the child (partial unless `status` is `ok`). */
984
1011
  content?: string;
985
1012
  /** Parsed structured output, when the child had an `outputSchema`. */
986
1013
  output?: any;
987
1014
  /** Latest child summary, when summarization fired. */
988
1015
  summary?: string;
989
- /** Populated when the child failed or was refused by a guard. */
1016
+ /** Set when the child produced no usable result (`error`, `blocked`, `needs_input`). */
990
1017
  error?: string;
1018
+ /** Why a result is partial or cancelled. */
1019
+ note?: string;
1020
+ /**
1021
+ * The model calls this run made. Already merged into the parent's
1022
+ * `state.usage` (each entry tagged `subagent`), so a parent budget sees them.
1023
+ */
1024
+ usage?: SubagentUsage;
991
1025
  durationMs?: number;
992
1026
  };
993
1027
  /**
@@ -1029,6 +1063,10 @@ type SubagentPendingRecord = {
1029
1063
  /** Maps the child's pending approval/question id -> parent-surfaced id. */
1030
1064
  pendingKind: "approval" | "user_question";
1031
1065
  pendingId: string;
1066
+ /** The run's id on `subagent` events and in its trace; the resumed run keeps it. */
1067
+ spawnId?: string;
1068
+ /** Iterations the child had opened when it paused; the resumed run numbers on from there. */
1069
+ iterations?: number;
1032
1070
  };
1033
1071
  type SubagentToolNames = {
1034
1072
  delegate: string;
@@ -2107,6 +2145,12 @@ type TraceSessionSummary = {
2107
2145
  totalBytesIn: number;
2108
2146
  totalBytesOut: number;
2109
2147
  eventCounts: Record<string, number>;
2148
+ /**
2149
+ * Iterations run by sub-agents recording into this session. They count in
2150
+ * `eventCounts.agent_iteration` too; the root agent subtracts them to number
2151
+ * its own iterations.
2152
+ */
2153
+ subagentIterations?: number;
2110
2154
  };
2111
2155
  /**
2112
2156
  * `paused`: the run stopped to wait for a tool approval or an answer from the
@@ -2299,6 +2343,12 @@ type AgentState = {
2299
2343
  timestamp: string;
2300
2344
  turn: number;
2301
2345
  cachedInput?: number;
2346
+ /** Present when a sub-agent made this call; it was merged in from the child's run. */
2347
+ subagent?: {
2348
+ name: string;
2349
+ id: string;
2350
+ mode: "registry" | "adhoc";
2351
+ };
2302
2352
  }>;
2303
2353
  totals: Record<string, {
2304
2354
  input: number;
@@ -2667,8 +2717,14 @@ type SubagentEvent = {
2667
2717
  parallel?: boolean;
2668
2718
  /** Task input (on `start`). */
2669
2719
  input?: string;
2670
- /** Final content (on `result`). */
2720
+ /** Final content (on `result` / `error`; partial unless `status` is `ok`). */
2671
2721
  content?: string;
2722
+ /** How the child ended (on `result` and `error`). */
2723
+ status?: SubagentStatus;
2724
+ /** Why the outcome is partial or cancelled. */
2725
+ note?: string;
2726
+ /** The child's model calls (on `result` and `error`); already merged into the parent's usage. */
2727
+ usage?: SubagentUsage;
2672
2728
  error?: {
2673
2729
  message: string;
2674
2730
  };
@@ -2723,6 +2779,12 @@ type ProgressUpdate = {
2723
2779
  type StreamChunk = {
2724
2780
  text: string;
2725
2781
  isFinal?: boolean;
2782
+ /**
2783
+ * Set only on a sub-agent's chunk, and only when `subagentPolicy.streamChildren`
2784
+ * is on. A chunk without it is the top-level agent's own text.
2785
+ */
2786
+ subagentName?: string;
2787
+ subagentId?: string;
2726
2788
  };
2727
2789
  type InvokeConfig = RunnableConfig & {
2728
2790
  onEvent?: (event: SmartAgentEvent) => void;
@@ -2831,7 +2893,24 @@ type AgentInstance<TOutput = unknown> = {
2831
2893
  };
2832
2894
  type SmartAgentInstance<TOutput = unknown> = AgentInstance<TOutput>;
2833
2895
 
2834
- type SmartToolFn = (args: any) => Promise<any> | any;
2896
+ /**
2897
+ * Per-call context the tools node hands to a tool's `func` as its second
2898
+ * argument. Anything that must be true of THIS call (rather than of the tool
2899
+ * object, which sibling calls in the same turn share) belongs here.
2900
+ */
2901
+ type ToolCallContext = {
2902
+ /** The model's tool_call id for this exact call. */
2903
+ toolCallId?: string;
2904
+ cancellationToken?: any;
2905
+ signal?: AbortSignal;
2906
+ /**
2907
+ * Span id the tools node will give this call's `tool_call` trace event. Known
2908
+ * before the tool runs so that whatever it records (a sub-agent's spans) can
2909
+ * nest under it. Absent when the run is not traced.
2910
+ */
2911
+ traceSpanId?: string;
2912
+ };
2913
+ type SmartToolFn = (args: any, context?: ToolCallContext) => Promise<any> | any;
2835
2914
  type ToolCachePolicy = {
2836
2915
  /** Cache scope. "run" persists for the current invoke only. */
2837
2916
  scope?: "run";
@@ -3200,13 +3279,15 @@ declare function withinDepth(currentDepth: number, policy: SubagentPolicy): {
3200
3279
  * context policy. Extracted so both `asTool` delegation and the sub-agent tools
3201
3280
  * share ONE implementation.
3202
3281
  *
3203
- * - `full` — entire parent transcript (minus its system prompt) + the input.
3204
- * - `scoped` — last user turn + the task input.
3205
- * - `minimal` — only the task input (default).
3282
+ * - `minimal` — only the task input.
3283
+ * - `scoped` — last user turn + the task input (default).
3284
+ * - `full` — entire parent transcript (minus its system prompt and the
3285
+ * current turn's unresolved tool_calls) + the task input.
3206
3286
  *
3207
- * The parent's system message is intentionally NOT carried over: the child agent
3208
- * composes its own system prompt from its `SubagentDef.systemPrompt` (or role),
3209
- * and leaking the parent's system message would suppress it.
3287
+ * `scoped` and `full` mark the transcript as background and the input as the
3288
+ * job. The parent's system message is intentionally NOT carried over: the child
3289
+ * agent composes its own system prompt from its `SubagentDef.systemPrompt` (or
3290
+ * role), and leaking the parent's system message would suppress it.
3210
3291
  */
3211
3292
  declare function seedChildMessages(policy: ChildContextPolicy, parentMessages: Message[], input: string): Message[];
3212
3293
  /**
@@ -3215,11 +3296,17 @@ declare function seedChildMessages(policy: ChildContextPolicy, parentMessages: M
3215
3296
  * or registry sub-agent can borrow a subset of the parent's capabilities.
3216
3297
  */
3217
3298
  declare function resolveSubagentTools(declared: SubagentDef["tools"] | string[] | undefined, parentTools: ToolInterface[]): Promise<ToolInterface[]>;
3218
- /** The cheap catalog block the model always sees in its system prompt. */
3299
+ /**
3300
+ * The cheap catalog block the model always sees in its system prompt: what it
3301
+ * can delegate to, how to write a task, and how to read what comes back.
3302
+ */
3219
3303
  declare function buildSubagentCatalogBlock(subagents: SubagentDef[], policy: SubagentPolicy, toolNames: {
3220
3304
  delegate: string;
3221
3305
  spawn: string;
3222
3306
  parallel: string;
3307
+ }, opts?: {
3308
+ parentToolNames?: string[];
3309
+ askUser?: boolean;
3223
3310
  }): string;
3224
3311
 
3225
3312
  /**
@@ -3230,6 +3317,10 @@ declare function buildSubagentCatalogBlock(subagents: SubagentDef[], policy: Sub
3230
3317
  * with createSmartAgent), and forward events/streaming/cancellation into each
3231
3318
  * child. Human-in-the-loop pauses inside a sequential child are surfaced to the
3232
3319
  * parent and resumed via `state.ctx.__subagentPending`.
3320
+ *
3321
+ * The `_stateRef` is shared by every call of a tool in a turn, so a call's own
3322
+ * identity (its tool_call id) comes from the per-call context the tools node
3323
+ * passes to `func`, never from the ref.
3233
3324
  */
3234
3325
  /** Config a child agent is built from. The factory lives in createSmartAgent. */
3235
3326
  type BuildChildConfig = {
@@ -3239,6 +3330,13 @@ type BuildChildConfig = {
3239
3330
  tools: ToolInterface[];
3240
3331
  outputSchema?: any;
3241
3332
  limits?: any;
3333
+ /**
3334
+ * Whether a question the child asks reaches a human: true under `delegate_to` /
3335
+ * `spawn_subagent` (the pause is surfaced and resumed), false in a parallel
3336
+ * fan-out (it ends the task as `needs_input`). Decides how the child is told
3337
+ * about asking.
3338
+ */
3339
+ interactive: boolean;
3242
3340
  };
3243
3341
  type SubagentToolDeps = {
3244
3342
  registryRef: SubagentRegistryRef;
@@ -3252,7 +3350,16 @@ type SubagentToolDeps = {
3252
3350
  spawn?: string;
3253
3351
  parallel?: string;
3254
3352
  };
3353
+ /** Names of the parent's tools an ad-hoc child may borrow, listed to the model. */
3354
+ parentToolNames?: string[];
3355
+ /** True when the parent has `humanInTheLoop.askUser`, which its children inherit. */
3356
+ canAskUser?: boolean;
3255
3357
  };
3358
+ /**
3359
+ * What the model is shown of a result: no `input` (it wrote it), no `usage` or
3360
+ * `durationMs` (bookkeeping for the host, tokens for the model to spend).
3361
+ */
3362
+ declare function toModelResult(result: SubagentResult): Omit<SubagentResult, "input" | "usage" | "durationMs">;
3256
3363
  declare function createDelegateTool(deps: SubagentToolDeps): ToolInterface;
3257
3364
  declare function createSpawnTool(deps: SubagentToolDeps): ToolInterface;
3258
3365
  declare function createParallelTool(deps: SubagentToolDeps): ToolInterface;
@@ -4382,6 +4489,18 @@ type SessionMetrics = {
4382
4489
  totalTokens: number;
4383
4490
  /** Present only when a `costEstimator` was configured. */
4384
4491
  estimatedCostUsd?: number;
4492
+ /**
4493
+ * What sub-agents spent during this run, kept apart from the figures above:
4494
+ * each child opens its own session and reports its own record, so folding
4495
+ * them in would count every child token twice in a pipeline that sums runs.
4496
+ * Present only when the run delegated.
4497
+ */
4498
+ subagentCalls?: number;
4499
+ subagentInputTokens?: number;
4500
+ subagentOutputTokens?: number;
4501
+ subagentTotalTokens?: number;
4502
+ /** Present only with a `costEstimator` and sub-agent calls. */
4503
+ subagentEstimatedCostUsd?: number;
4385
4504
  /** Executions per tool name. Opt-in — a wide tool menu makes this unbounded. */
4386
4505
  toolBreakdown?: Record<string, number>;
4387
4506
  };
@@ -5492,7 +5611,11 @@ declare function recordTraceEvent(session: TraceSessionRuntime | undefined, even
5492
5611
  status?: TraceEventRecord["status"];
5493
5612
  /** Explicit parent span ID. Falls back to session.currentIterationSpanId when omitted. */
5494
5613
  parentSpanId?: string;
5614
+ /** Pre-allocated span ID, for an event whose children are recorded before it is. */
5615
+ spanId?: string;
5495
5616
  durationMs?: number;
5617
+ /** False for a span that wraps events already counted, so the totals do not take the time twice. */
5618
+ countDuration?: boolean;
5496
5619
  inputTokens?: number;
5497
5620
  outputTokens?: number;
5498
5621
  totalTokens?: number;
@@ -5515,6 +5638,8 @@ declare function recordTraceEvent(session: TraceSessionRuntime | undefined, even
5515
5638
  messageList?: any[];
5516
5639
  /** Pre-built sections to use instead of auto-converting messageList */
5517
5640
  sections?: TraceDataSection[];
5641
+ /** Identity sections kept even when logData is off; the caller vouches they carry no payload. */
5642
+ alwaysSections?: TraceDataSection[];
5518
5643
  /**
5519
5644
  * Tool MENU bound to this model call (`ai_call` events). Appended as a
5520
5645
  * `tool_definitions` section AFTER messageList/sections resolution, so it
@@ -5881,4 +6006,4 @@ declare class ModelRequestError extends ProviderError {
5881
6006
  constructor(init: ModelRequestErrorInit);
5882
6007
  }
5883
6008
 
5884
- export { type AIMessage, ASK_USER_TOOL_NAME, type AgentInstance, type AgentInvokeResult, type AgentLimits, type AgentOptions, type AgentPlugin, type AgentRuleOptions, type AgentRuntimeConfig, type AgentSnapshot, type AgentSnapshotMetadata, type AgentState, AnthropicProvider, AnthropicProviderConfig, type ApprovalTransport, type AuditEntry, type AuditLogConfig, type AzureContentSafetyConfig, AzureProvider, AzureProviderConfig, type BaseChatMessage, type BaseChatMessagePart, type BaseChatModel, type BaseMessage, BaseProvider, type BedrockGuardrailConfig, BedrockProvider, BedrockProviderConfig, type BudgetGuardConfig, type BuildChildConfig, type BuiltInRuntimeProfile, CCRStore, CONSOLE_HOOK_MAP, CONTEXT_PILOT_JSON_MARKER_KEY, CONTROL_PLANE_TOOL_NAMES, type CancellationTokenLike, type CancelledEvent, type CapabilityStatus, ChatCompletionChunk, ChatCompletionRequest, ChatCompletionResponse, type CheckpointPluginConfig, type CheckpointStore, type ChildContextPolicy, type CodeDetectionRuleOptions, type CodeGuardrailOptions, type CognipeerGuardrailConfig, type CompressToolOutputParams, type ContextBuilder, 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 ConversationPluginConfig, type ConversationStore, type CostEstimator, 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 DeferredTraceEvent, type DelegationEventStamp, type DelegationMode, type DroppedDirective, EmbeddingRequest, EmbeddingResponse, type EvalCase, type EvalCaseResult, type EvalFamily, type EvalHarnessMetrics, type EvalHarnessParams, type EvalHarnessResult, type EvalProfileDescriptor, type EvalProfileTarget, type FinalAnswerEvent, type GateResult, type GuardrailCallContext, type GuardrailContext, type GuardrailDisposition, type GuardrailEvent, type GuardrailIncident, type GuardrailJudgeEngine, type GuardrailOutcome, GuardrailPhase, type GuardrailPhaseName, type GuardrailPluginOptions, type GuardrailRequest, type GuardrailRule, type GuardrailRuleResult, type GuardrailTransport, type GuardrailVerdict, type GuardrailViolation, HOOK_CONTRACT_VERSION, HOOK_NAMES, type HandoffDescriptor, type HandoffEvent, type HookContext, type HookDecision, type HookHandler, type HookMap, type HookName, type HookRegistrations, HookTimeoutError, type HttpGuardrailOptions, type HumanInTheLoopAskUserConfig, type HumanInTheLoopOptions, type HumanInTheLoopRuntimeConfig, InMemoryMemoryStore, type InjectionScan, type InvokeConfig, type JevClientLike, type JevEngineOptions, type JevNoulAnswer, JevProvider, JevProviderConfig, type JevQuestion, type JevSystemOneRequest, type JevSystemOneResult, type JsonGuardrailOptions, type JsonSchemaRuleOptions, LAST_SUMMARIZATION_CALL_KEY, type LangfuseBuildContext, type LangfuseEvent, type LangfuseEventKind, type LangfuseTracingConfig, type LanguageGuardConfig, type LoadSkillsOptions, type MaybePromise, type McpConfig, type McpConnection, type MediaAttachment, type MediaKind$1 as MediaKind, type MediaPolicyConfig, type MemoryFact, type MemoryProviderKind, type MemoryReadPolicy, type MemoryScope, type MemoryStore, type MemoryWritePolicy, type Message, type MessageUsage, type MetadataEvent, type ModelCapabilities, ModelRequestError, type ModelRequestErrorCode, type ModelRequestErrorInit, ModelRuleLearnedEvent, NativeJsonSchemaStrategy, type NativeModelOptions, type NativeReasoningConfig, OpenAICompatibleProvider, OpenAICompatibleProviderConfig, type OpenAIModerationConfig, OpenAIProvider, OpenAIProviderConfig, type OtelTracingConfig, type OutputGuardConfig, PREOPEN_TOOL_CALL_PREFIX, type PendingToolApproval, type PendingUserQuestion, type PiiDetector, type PiiEntity, type PiiRedactionConfig, type PlanEvent, type PlanStepRecord, type PlanningMode, type PluginContributions, type PluginEvent, type PluginFailureMode, type PluginHost, type PluginHostOptions, type PluginLogger, type PluginProvides, type PluginRunHost, type PluginSetupContext, type PortkeyGatewayConfig, type PortkeyGuardrailConfig, type PreopenSkillsResult, type ProfileConfig, type ProgressEvent, type ProgressUpdate, type PromptHooks, type PromptInjectionFamily, type PromptInjectionGuardConfig, type PromptSource, ProviderConfig, ProviderError, ToolDefinition as ProviderToolDefinition, ProviderType, type RateLimitConfig, type ReasoningConfig, type ReasoningLevel, type RedactionResult, type ReflectionCadence, type ReflectionConfig, type ReflectionEvent, type ReflectionHookContext, type ReflectionRecord, type RegexGuardrailConfig, type RegexGuardrailOptions, type RegexRuleOptions, type ReplanPolicy, type ResolvedContextPilotConfig, type ResolvedSmartAgentConfig, type ResolvedTraceConfig, type ResolvedTraceSink, type ResponseCacheConfig, type RestoreSnapshotOptions, RulePatch, type RuntimeProfile, SMALL_TIER_SKILL_POLICY, type SdkCapabilities, type SerializableSmartState, type SessionMetrics, type SessionMetricsConfig, type Skill, type SkillDisclosure, type SkillExecutionContext, type SkillFrontmatter, type SkillFs, type SkillModelTier, type SkillPolicy, type SkillRegistryRef, type SkillSource, type SkillToolDeps, type SkillToolHeader, type SlotName, 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 StrictRestorers, type StrictTransform, 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 SummarizerInput, type SummarizerResult, type SummarizerStrategy, type SummaryFactItem, type SummaryIntegrityCheck, TOOL_INPUT_DIGEST_KEY, type TokenCounter, TokenUsage, type ToolApprovalEvent, type ToolApprovalResolution, type ToolApprovalStatus, ToolBasedStrategy, type ToolCachePolicy, type ToolCallEvent, type ToolInputDigestOptions, type ToolInputDigestResult, type ToolInputRetentionPolicy, type ToolInterface, type ToolPolicyConfig, type ToolResponseClassification, type ToolResponseRetentionPolicy, type ToolRetentionDeclarations, type ToolRetentionSpec, type ToolRetryPolicy, type ToolRule, type TraceContinuation, type TraceDataSection, type TraceErrorRecord, type TraceEventRecord, type TraceMessagePart, 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 TraceToolDefinition, type TraceToolDefinitionsSection, type TraceToolDetails, type TraceToolResponseSection, type TraceToolResultSection, type TracingConfig, type TracingMode, UnifiedMessage, type UserQuestionAnswer, type UserQuestionAnswerSet, type UserQuestionEvent, type UserQuestionItem, type UserQuestionOption, type UserQuestionResolution, type UserQuestionStatus, VertexProvider, VertexProviderConfig, type VolatileContentFinding, type VolatileContentPattern, type WebhookApprovalConfig, agentVerdictRule, appendBoundTools, auditLog, azureContentSafety, bedrockGuardrail, budgetGuard, buildHandoffTools, buildResponseFormatSection, buildSkillHeaderBlock, buildSubagentCatalogBlock, buildSystemPrompt, buildToolDefinitionsSection, canOpenSkill, canSpawn, captureSnapshot, checkpointing, codePresenceRule, coerceToolArgs, cognipeerGuardrail, cognipeerSink, collectAttachments, collectToolRetentionDeclarations, composeToolSets, compressDiffOutput, compressJsonOutput, compressLogOutput, compressSearchOutput, compressTextOutput, compressToolOutput, contentPartToText, contentToString, conversationHistory, countApproxTokens, countMessagesTokens, createAgent, createAgentNode, createAskUserQuestionTool, createBindSkillToolsTool, createCodeGuardrail, createContextPilotRuntime, createContextSummarizeNode, createContextTools, createDelegateTool, createGetToolResponseTool, createGuardrail, createGuardrailPlugin, createJsonGuardrail, createManageTodoListAliasTool, createManageTodoTool, createOpenSkillTool, createParallelTool, createPluginHost, createProvider, createRegexGuardrail, createResolverNode, createSearchSkillsTool, createSkillRegistryRef, createSkillTools, createSmartAgent, createSpawnTool, createSubagentRegistryRef, createSubagentTools, createTool, createToolLimitFinalizeNode, createToolsNode, customCallbackRule, customGuardrail, customSink, dedupeToolsByName, defaultTokenCounter, defineHook, definePlugin, describeContentPart, detectLanguage, detectTextFormat, detectVolatileContent, digestToolInputArguments, digestToolInputValue, evaluateGuardrails, extractLatestUserQuery, extractMessageText, fileCheckpointStore, fileSink, findSubagent, formatZodError, fromLangchainModel, fromLangchainTools, fromNativeProvider, generateSpanId, generateTraceId, getModelCapabilities, getNestedValue, getResolvedSmartConfig, getTokenCounter, hasMediaPart, hasToolResponseRecoveryReference, httpGuardrail, httpSink, inMemoryCheckpointStore, inMemoryConversationStore, isHookImplemented, isOpenAIHostedEndpoint, isSmartModel, isTraceSessionOpen, isValidIban, isValidLuhn, isValidTckn, jsonSchemaRule, defaultBuildPayload as langfuseDefaultPayload, langfuseTracing, languageGuard, loadSkillsFromDisk, mapConsoleHookVerdict, mapTextParts, mcp, mediaKindOf, mediaPolicy, normalizeSmartAgentOptions, normalizeVerdicts, openAIModeration, otelTracing, otlpSink, outputGuard, parseApprovalDecision, parseSkillFrontmatter, pathSandbox, piiRedaction, pluginCapabilities, portkeyGateway, portkeyGuardrail, preopenSkills, preopenToolCallId, prepareStrictToolMenu, promptInjectionGuard, rateLimit, readMemoryFacts, readTraceContinuation, recordOrDeferTraceEvent, redactText, regexGuardrail, regexRule, replaceTextContent, replayDeferredTraceEvents, resolveAvailableSkills, resolveAvailableSubagents, resolveInputRetention, resolveMemoryStore, resolveReasoning, resolveStrategy, resolveSubagentTools, resolveSummarizationRetention, resolveToolApprovalState, resolveUserQuestionState, responseCache, restoreSnapshot, restoreToolCalls, runSmartAgentEvalHarness, scoreItemsByRelevance, searchSkills, seedChildMessages, selectTopIndicesInOrder, sessionMetrics, setTokenCounter, startStreamingSession, summarizeObject, supportsAdaptiveThinking, textFromContent, toMessageUsage, toStrictCompatible, toStrictToolSchema, tokenize, toolPolicy, traceContinuationOf, traceSectionsFromMessages, traceSessionToOtlp, validateReasoningConfig, validateToolArgs, webhookApproval, withTools, withinDepth, writeSummaryFactsToMemory };
6009
+ export { type AIMessage, ASK_USER_TOOL_NAME, type AgentInstance, type AgentInvokeResult, type AgentLimits, type AgentOptions, type AgentPlugin, type AgentRuleOptions, type AgentRuntimeConfig, type AgentSnapshot, type AgentSnapshotMetadata, type AgentState, AnthropicProvider, AnthropicProviderConfig, type ApprovalTransport, type AuditEntry, type AuditLogConfig, type AzureContentSafetyConfig, AzureProvider, AzureProviderConfig, type BaseChatMessage, type BaseChatMessagePart, type BaseChatModel, type BaseMessage, BaseProvider, type BedrockGuardrailConfig, BedrockProvider, BedrockProviderConfig, type BudgetGuardConfig, type BuildChildConfig, type BuiltInRuntimeProfile, CCRStore, CONSOLE_HOOK_MAP, CONTEXT_PILOT_JSON_MARKER_KEY, CONTROL_PLANE_TOOL_NAMES, type CancellationTokenLike, type CancelledEvent, type CapabilityStatus, ChatCompletionChunk, ChatCompletionRequest, ChatCompletionResponse, type CheckpointPluginConfig, type CheckpointStore, type ChildContextPolicy, type CodeDetectionRuleOptions, type CodeGuardrailOptions, type CognipeerGuardrailConfig, type CompressToolOutputParams, type ContextBuilder, 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 ConversationPluginConfig, type ConversationStore, type CostEstimator, 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 DeferredTraceEvent, type DelegationEventStamp, type DelegationMode, type DroppedDirective, EmbeddingRequest, EmbeddingResponse, type EvalCase, type EvalCaseResult, type EvalFamily, type EvalHarnessMetrics, type EvalHarnessParams, type EvalHarnessResult, type EvalProfileDescriptor, type EvalProfileTarget, type FinalAnswerEvent, type GateResult, type GuardrailCallContext, type GuardrailContext, type GuardrailDisposition, type GuardrailEvent, type GuardrailIncident, type GuardrailJudgeEngine, type GuardrailOutcome, GuardrailPhase, type GuardrailPhaseName, type GuardrailPluginOptions, type GuardrailRequest, type GuardrailRule, type GuardrailRuleResult, type GuardrailTransport, type GuardrailVerdict, type GuardrailViolation, HOOK_CONTRACT_VERSION, HOOK_NAMES, type HandoffDescriptor, type HandoffEvent, type HookContext, type HookDecision, type HookHandler, type HookMap, type HookName, type HookRegistrations, HookTimeoutError, type HttpGuardrailOptions, type HumanInTheLoopAskUserConfig, type HumanInTheLoopOptions, type HumanInTheLoopRuntimeConfig, InMemoryMemoryStore, type InjectionScan, type InvokeConfig, type JevClientLike, type JevEngineOptions, type JevNoulAnswer, JevProvider, JevProviderConfig, type JevQuestion, type JevSystemOneRequest, type JevSystemOneResult, type JsonGuardrailOptions, type JsonSchemaRuleOptions, LAST_SUMMARIZATION_CALL_KEY, type LangfuseBuildContext, type LangfuseEvent, type LangfuseEventKind, type LangfuseTracingConfig, type LanguageGuardConfig, type LoadSkillsOptions, type MaybePromise, type McpConfig, type McpConnection, type MediaAttachment, type MediaKind$1 as MediaKind, type MediaPolicyConfig, type MemoryFact, type MemoryProviderKind, type MemoryReadPolicy, type MemoryScope, type MemoryStore, type MemoryWritePolicy, type Message, type MessageUsage, type MetadataEvent, type ModelCapabilities, ModelRequestError, type ModelRequestErrorCode, type ModelRequestErrorInit, ModelRuleLearnedEvent, NativeJsonSchemaStrategy, type NativeModelOptions, type NativeReasoningConfig, OpenAICompatibleProvider, OpenAICompatibleProviderConfig, type OpenAIModerationConfig, OpenAIProvider, OpenAIProviderConfig, type OtelTracingConfig, type OutputGuardConfig, PREOPEN_TOOL_CALL_PREFIX, type PendingToolApproval, type PendingUserQuestion, type PiiDetector, type PiiEntity, type PiiRedactionConfig, type PlanEvent, type PlanStepRecord, type PlanningMode, type PluginContributions, type PluginEvent, type PluginFailureMode, type PluginHost, type PluginHostOptions, type PluginLogger, type PluginProvides, type PluginRunHost, type PluginSetupContext, type PortkeyGatewayConfig, type PortkeyGuardrailConfig, type PreopenSkillsResult, type ProfileConfig, type ProgressEvent, type ProgressUpdate, type PromptHooks, type PromptInjectionFamily, type PromptInjectionGuardConfig, type PromptSource, ProviderConfig, ProviderError, ToolDefinition as ProviderToolDefinition, ProviderType, type RateLimitConfig, type ReasoningConfig, type ReasoningLevel, type RedactionResult, type ReflectionCadence, type ReflectionConfig, type ReflectionEvent, type ReflectionHookContext, type ReflectionRecord, type RegexGuardrailConfig, type RegexGuardrailOptions, type RegexRuleOptions, type ReplanPolicy, type ResolvedContextPilotConfig, type ResolvedSmartAgentConfig, type ResolvedTraceConfig, type ResolvedTraceSink, type ResponseCacheConfig, type RestoreSnapshotOptions, RulePatch, type RuntimeProfile, SMALL_TIER_SKILL_POLICY, type SdkCapabilities, type SerializableSmartState, type SessionMetrics, type SessionMetricsConfig, type Skill, type SkillDisclosure, type SkillExecutionContext, type SkillFrontmatter, type SkillFs, type SkillModelTier, type SkillPolicy, type SkillRegistryRef, type SkillSource, type SkillToolDeps, type SkillToolHeader, type SlotName, 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 StrictRestorers, type StrictTransform, 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 SubagentStatus, type SubagentToolDeps, type SubagentToolNames, type SubagentUsage, type SummarizationEvent, type SummarizationMode, type SummarizerInput, type SummarizerResult, type SummarizerStrategy, type SummaryFactItem, type SummaryIntegrityCheck, TOOL_INPUT_DIGEST_KEY, type TokenCounter, TokenUsage, type ToolApprovalEvent, type ToolApprovalResolution, type ToolApprovalStatus, ToolBasedStrategy, type ToolCachePolicy, type ToolCallContext, type ToolCallEvent, type ToolInputDigestOptions, type ToolInputDigestResult, type ToolInputRetentionPolicy, type ToolInterface, type ToolPolicyConfig, type ToolResponseClassification, type ToolResponseRetentionPolicy, type ToolRetentionDeclarations, type ToolRetentionSpec, type ToolRetryPolicy, type ToolRule, type TraceContinuation, type TraceDataSection, type TraceErrorRecord, type TraceEventRecord, type TraceMessagePart, 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 TraceToolDefinition, type TraceToolDefinitionsSection, type TraceToolDetails, type TraceToolResponseSection, type TraceToolResultSection, type TracingConfig, type TracingMode, UnifiedMessage, type UserQuestionAnswer, type UserQuestionAnswerSet, type UserQuestionEvent, type UserQuestionItem, type UserQuestionOption, type UserQuestionResolution, type UserQuestionStatus, VertexProvider, VertexProviderConfig, type VolatileContentFinding, type VolatileContentPattern, type WebhookApprovalConfig, agentVerdictRule, appendBoundTools, auditLog, azureContentSafety, bedrockGuardrail, budgetGuard, buildHandoffTools, buildResponseFormatSection, buildSkillHeaderBlock, buildSubagentCatalogBlock, buildSystemPrompt, buildToolDefinitionsSection, canOpenSkill, canSpawn, captureSnapshot, checkpointing, codePresenceRule, coerceToolArgs, cognipeerGuardrail, cognipeerSink, collectAttachments, collectToolRetentionDeclarations, composeToolSets, compressDiffOutput, compressJsonOutput, compressLogOutput, compressSearchOutput, compressTextOutput, compressToolOutput, contentPartToText, contentToString, conversationHistory, countApproxTokens, countMessagesTokens, createAgent, createAgentNode, createAskUserQuestionTool, createBindSkillToolsTool, createCodeGuardrail, createContextPilotRuntime, createContextSummarizeNode, createContextTools, createDelegateTool, createGetToolResponseTool, createGuardrail, createGuardrailPlugin, createJsonGuardrail, createManageTodoListAliasTool, createManageTodoTool, createOpenSkillTool, createParallelTool, createPluginHost, createProvider, createRegexGuardrail, createResolverNode, createSearchSkillsTool, createSkillRegistryRef, createSkillTools, createSmartAgent, createSpawnTool, createSubagentRegistryRef, createSubagentTools, createTool, createToolLimitFinalizeNode, createToolsNode, customCallbackRule, customGuardrail, customSink, dedupeToolsByName, defaultTokenCounter, defineHook, definePlugin, describeContentPart, detectLanguage, detectTextFormat, detectVolatileContent, digestToolInputArguments, digestToolInputValue, evaluateGuardrails, extractLatestUserQuery, extractMessageText, fileCheckpointStore, fileSink, findSubagent, formatZodError, fromLangchainModel, fromLangchainTools, fromNativeProvider, generateSpanId, generateTraceId, getModelCapabilities, getNestedValue, getResolvedSmartConfig, getTokenCounter, hasMediaPart, hasToolResponseRecoveryReference, httpGuardrail, httpSink, inMemoryCheckpointStore, inMemoryConversationStore, isHookImplemented, isOpenAIHostedEndpoint, isSmartModel, isTraceSessionOpen, isValidIban, isValidLuhn, isValidTckn, jsonSchemaRule, defaultBuildPayload as langfuseDefaultPayload, langfuseTracing, languageGuard, loadSkillsFromDisk, mapConsoleHookVerdict, mapTextParts, mcp, mediaKindOf, mediaPolicy, normalizeSmartAgentOptions, normalizeVerdicts, openAIModeration, otelTracing, otlpSink, outputGuard, parseApprovalDecision, parseSkillFrontmatter, pathSandbox, piiRedaction, pluginCapabilities, portkeyGateway, portkeyGuardrail, preopenSkills, preopenToolCallId, prepareStrictToolMenu, promptInjectionGuard, rateLimit, readMemoryFacts, readTraceContinuation, recordOrDeferTraceEvent, redactText, regexGuardrail, regexRule, replaceTextContent, replayDeferredTraceEvents, resolveAvailableSkills, resolveAvailableSubagents, resolveInputRetention, resolveMemoryStore, resolveReasoning, resolveStrategy, resolveSubagentTools, resolveSummarizationRetention, resolveToolApprovalState, resolveUserQuestionState, responseCache, restoreSnapshot, restoreToolCalls, runSmartAgentEvalHarness, scoreItemsByRelevance, searchSkills, seedChildMessages, selectTopIndicesInOrder, sessionMetrics, setTokenCounter, startStreamingSession, summarizeObject, supportsAdaptiveThinking, textFromContent, toMessageUsage, toModelResult, toStrictCompatible, toStrictToolSchema, tokenize, toolPolicy, traceContinuationOf, traceSectionsFromMessages, traceSessionToOtlp, validateReasoningConfig, validateToolArgs, webhookApproval, withTools, withinDepth, writeSummaryFactsToMemory };