@dudko.dev/agent 0.0.55 → 0.0.56

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.cts CHANGED
@@ -220,10 +220,29 @@ interface ISearchOptions {
220
220
  signal?: AbortSignal;
221
221
  }
222
222
  /**
223
- * A search engine of the host's own: any function that answers a query with results. What it
224
- * returns is treated like a built-in adapter's answer - cleaned, capped and filtered.
223
+ * What a search engine function may answer in place of a bare list, when the search ran through a
224
+ * model - a provider's server-side search tool, one model call: the results, what the call spent,
225
+ * the model's own answer and a line on what the results are. Every field is checked as the rest of
226
+ * an engine's answer is (`searchEngineAnswer`).
225
227
  */
226
- type SearchEngine = (query: string, options: ISearchOptions) => Promise<ISearchResult[]>;
228
+ interface ISearchEngineAnswer {
229
+ results: ISearchResult[];
230
+ /**
231
+ * The model tokens the search spent, as its API reported them: charged to the run like the
232
+ * google provider's (a `usage` event of phase 'search', in every total and against the limits).
233
+ */
234
+ usage?: ISearchUsage;
235
+ /** The model's answer from its sources: the model sees it, cut, when no result has a snippet. */
236
+ summary?: string;
237
+ /** One line on what the results are - whose search, what the snippets are - for the model. */
238
+ note?: string;
239
+ }
240
+ /**
241
+ * A search engine of the host's own: any function that answers a query with results - a bare
242
+ * list, or an `ISearchEngineAnswer` with what the search spent. What it returns is treated like a
243
+ * built-in adapter's answer - cleaned, capped and filtered.
244
+ */
245
+ type SearchEngine = (query: string, options: ISearchOptions) => Promise<ISearchResult[] | ISearchEngineAnswer>;
227
246
  /**
228
247
  * The built-in provider. One: Google Search through the Gemini API's grounding (`google_search`),
229
248
  * which needs a Gemini (Google AI Studio) key and nothing else. Any other search API is the
@@ -240,6 +259,8 @@ declare const SEARCH_API_BASE_URL: Record<SearchProvider, string>;
240
259
  declare const SEARCH_GOOGLE_DEFAULT_MODEL = "gemini-2.5-flash-lite";
241
260
  /** The most of the grounding model's answer a model sees as `summary`. */
242
261
  declare const SEARCH_MAX_SUMMARY_CHARS = 1000;
262
+ /** The most of a result list's `note` (what the results are) a model sees. */
263
+ declare const SEARCH_MAX_NOTE_CHARS = 300;
243
264
  /** Said in every result of the google provider: what its URLs and its text are. */
244
265
  declare const SEARCH_GOOGLE_NOTE: string;
245
266
  /** One HTTP call to a search API. The key, if any, is in `headers` only - never in the URL. */
@@ -275,6 +296,8 @@ interface ISearchAnswer {
275
296
  summary?: unknown;
276
297
  /** Absent when the API reported none. */
277
298
  usage?: ISearchUsage;
299
+ /** What the results are (the google provider's `SEARCH_GOOGLE_NOTE`, an engine's own line). */
300
+ note?: string;
278
301
  }
279
302
  /**
280
303
  * The request for one query, per the Gemini API's public documentation:
@@ -292,6 +315,18 @@ declare const buildSearchRequest: (input: ISearchRequestInput) => ISearchRequest
292
315
  * what makes them safe to show.
293
316
  */
294
317
  declare const parseSearchResponse: (provider: SearchProvider, json: unknown) => ISearchAnswer;
318
+ /**
319
+ * What a search spent, as an engine reported it: whole non-negative token counts (anything else
320
+ * is 0), the total their sum, reasoning never more than the output. Undefined when it spent none.
321
+ */
322
+ declare const searchUsageOf: (raw: unknown) => ISearchUsage | undefined;
323
+ /**
324
+ * An engine's answer as the tool reads it. A bare list is the results and nothing else (no usage,
325
+ * no summary, no note); an `ISearchEngineAnswer` gives its `results` and - checked - its usage
326
+ * (`searchUsageOf`), its summary (a string; cleaned and cut when it is shown) and its note (cleaned
327
+ * and cut here). Anything else is no results. Still raw until `sanitizeSearchResults`.
328
+ */
329
+ declare const searchEngineAnswer: (raw: unknown) => ISearchAnswer;
295
330
  /**
296
331
  * What a failed call says to the model: the provider, the model, the status, the API's own error
297
332
  * code word and what it usually means. Never the error's text: that is third-party text, and may
@@ -319,18 +354,19 @@ declare const sanitizeSearchResults: (raw: unknown, options?: {
319
354
  interface ISearchToolResult {
320
355
  query: string;
321
356
  results: ISearchResult[];
322
- /** The google provider, when no source came with a snippet: the grounding model's answer, cut. */
357
+ /** When no source came with a snippet: the grounding (or engine's) model's answer, cut. */
323
358
  summary?: string;
324
- /** The google provider: what its URLs and its text are. */
359
+ /** What the URLs and the text are: the google provider's note, or an engine's own line. */
325
360
  note?: string;
326
361
  filtered?: number;
327
362
  truncated?: true;
328
363
  untrusted: true;
329
364
  }
330
365
  /**
331
- * The tool's result, from the cleaned list and - for the google provider - the parsed answer.
332
- * The model's `summary` is attached only when there are sources, none of them carries a snippet
333
- * and none was filtered out: a summary cannot be cut to the sources that remain.
366
+ * The tool's result, from the cleaned list and the parsed answer (the google provider's, or an
367
+ * engine's `searchEngineAnswer`). The model's `summary` is attached only when there are sources,
368
+ * none of them carries a snippet and none was filtered out: a summary cannot be cut to the sources
369
+ * that remain. The answer's `note` goes with every result list, cleaned and cut.
334
370
  */
335
371
  declare const searchToolResult: (query: string, clean: ISanitizedSearch, answer?: ISearchAnswer) => ISearchToolResult;
336
372
 
@@ -2852,5 +2888,5 @@ declare const REMOTE_SUBAGENT_LIMITS: {
2852
2888
  */
2853
2889
  declare const createSubagentTool: (opts: ISubagentToolOptions) => Tool;
2854
2890
 
2855
- export { ASK_USER_DESCRIPTION_MAX_CHARS, ASK_USER_LABEL_MAX_CHARS, ASK_USER_MAX_OPTIONS, ASK_USER_MAX_PER_RUN, ASK_USER_MIN_OPTIONS, ASK_USER_OTHER_MAX_CHARS, ASK_USER_QUESTION_MAX_CHARS, ASK_USER_TIMEOUT_MAX_MS, ASK_USER_TIMEOUT_MS, ASK_USER_TOOL, AskUserInputError, DEFAULT_COMPACTION_THRESHOLD_RATIO, DEFAULT_DECISION_CONFIDENCE_THRESHOLD, DEFAULT_DECISION_TIMEOUT_MS, DirSkillStore, ENTERPRISE_MANAGED_AUTHORIZATION_EXTENSION, EgressError, EnterpriseOAuthError, FORGET_SKILL_TOOL, FileOAuthStore, GENERATE_IMAGE_TOOL, GENERATE_SPEECH_TOOL, JOURNAL_LIMITS, JournalError, MCP_ELICITATION_MAX_PER_RUN, MCP_ELICITATION_MAX_PER_TOOL_CALL, MCP_ELICITATION_TIMEOUT_MS, MCP_INSTRUCTIONS_MAX_CHARS_PER_SERVER, MCP_INSTRUCTIONS_MAX_CHARS_TOTAL, MCP_MODERN_PROTOCOL_VERSION, MCP_SKILLS_EXTENSION, MCP_SKILLS_MAX_PER_SERVER, MCP_SKILLS_MAX_TOTAL, MCP_SKILL_BODY_MAX_CHARS, MCP_SKILL_CONSENTS, MCP_SKILL_CONSENT_DEFAULT, MCP_SKILL_DESCRIPTION_MAX_CHARS, MCP_SKILL_DIRECTORY_ENTRIES_MAX, MCP_SKILL_FILE_MAX_CHARS, MCP_SKILL_MAX_RESOURCES, MCP_SKILL_MAX_TOTAL_BYTES, MCP_SKILL_SNAPSHOTS_MAX_BYTES, MCP_SKILL_SNAPSHOT_MAX_DEPTH, MCP_SKILL_SNAPSHOT_MAX_DIRECTORIES, MCP_SKILL_URI_MAX_CHARS, MEDIA_AUDIO_TYPES, MEDIA_DEFAULT_MAX_CALLS, MEDIA_FOLDER, MEDIA_IMAGE_TYPES, MEDIA_MAX_ATTACHED_AUDIO, MEDIA_MAX_AUDIO_INPUT_BYTES, MEDIA_MAX_IMAGE_BYTES, MEDIA_MAX_PROMPT_CHARS, MEDIA_MAX_SPEECH_BYTES, MEDIA_MAX_SPEECH_CHARS, MEDIA_MAX_TRANSCRIPT_CHARS, MEDIA_TIMEOUT_MS, MediaBudgetError, MediaError, MemoryOAuthStore, MemorySkillStore, ModelCallRefusedError, NodeEnterpriseOAuthProvider, NodeOAuthProvider, PipelineDefinition, PipelineEvent, PipelineNode, PipelineNodeRunner, PipelineResult, REMOTE_SUBAGENT_LIMITS, REPLAY_NOTE, RUN_JS_TOOL, RUN_LEASE_DEFAULT_TTL_MS, RunLeaseError, SAVE_SKILL_TOOL, SEARCH_API_BASE_URL, SEARCH_DEFAULT_MAX_RESULTS, SEARCH_GOOGLE_DEFAULT_MODEL, SEARCH_GOOGLE_NOTE, SEARCH_MAX_QUERY_CHARS, SEARCH_MAX_RESULTS, SEARCH_MAX_SNIPPET_CHARS, SEARCH_MAX_SUMMARY_CHARS, SEARCH_MAX_TITLE_CHARS, SEARCH_MAX_TOTAL_CHARS, SEARCH_MAX_URL_CHARS, SEARCH_PROVIDERS, SPAWN_INPUT_SCHEMA, SPAWN_SUBAGENT_TOOL, SUBAGENT_DEFAULTS, SUBAGENT_MAX_DEPTH_LIMIT, SUMMARY_PREFIX, SandboxUnavailableError, SubagentSpawnError, TOOL_APPROVAL_TIMEOUT_MS, TRANSCRIBE_AUDIO_TOOL, ToolBudgetError, ToolDeniedError, WEB_FETCH_TOOL, WEB_SEARCH_TOOL, acceptMedia, addUsage, adoptSubagentEvent, askDecisionModel, beginMcpOAuth, buildInstructions, buildMediaModelFromStage, buildSearchRequest, checkAskUserAnswer, checkAskUserInput, checkAuthorizationResponseIssuer, checkEgressUrl, checkLimits, checkRedirect, classifyAddress, cleanAskUserText, compactHistory, createAgent, createEgressTools, createEnterpriseOAuthProvider, createLearning, createMedia, createNodeOAuthProvider, createPipeline, createRunControl, createSafeFetch, createSandboxTool, createSandboxTools, createSearchTools, createSubagentTool, createToolResultClearer, createWebFetchTool, createWebSearchTool, decideToolPermission, decisionModelFromAiSdk, deferResult, defineSkill, estimateTokens, findSecret, finishMcpOAuth, getCurrentRunId, getCurrentRunSandbox, hostMatches, htmlToText, isAuthError, isCodeExecutionTool, isDeferredResult, isModelCallRefused, isReadOnlyTool, isReplayedToolOutput, loadSkillsFromDir, markCodeExecution, markReadOnly, matchToolRule, mcpSkillEntryRefusal, mcpSkillPreamble, mcpSkillUriRefusal, mediaUsageOf, mergeProviderOptions, nodeResolver, normalizeMcpElicitationSchema, normalizeSkillName, normalizeUsage, parseSearchResponse, parseSkillMarkdown, pickPipelineRoute, redactHeaders, renderMcpInstructions, resolveCompaction, resolveDynamicSubagents, resolveEgressPolicy, resolveLimits, resolvePromptCaching, resolveSandboxLimits, resolveThinking, sanitizeSearchResults, searchEgressPolicy, searchStatusMessage, searchToolResult, searchTools, sniffMediaType, truncateToolModelOutput, validateMcpElicitationContent, withRollingBreakpoint, withToolOutputLimit, wrapTranscript };
2856
- export type { AgentEvent, AgentModel, AgentStage, AskUserAction, AskUserAnswer, AskUserCheckedAnswer, AskUserContext, AskUserDecision, AskUserHandler, AskUserOption, AskUserQuestion, AskUserReason, BudgetKind, DecisionFallbackReason, DecisionPoint, EgressErrorCode, EnterpriseAssertionAlgorithm, EnterpriseAssertionAudience, EnterpriseAssertionType, EnterpriseOAuthHop, EnterpriseOAuthLog, EnterprisePrivateKey, EscalationReason, EventHandler, IAgent, IAgentConfig, IAgentRunOptions, IAgentRunResult, IAgentStageOverride, IAiSdkDecisionOptions, IAskUserConfig, IAskUserRequest, IClearedInfo, ICloseOptions, ICompactHistoryOptions, ICompactHistoryResult, ICompactOptions, ICompactResult, ICompactionConfig, IConversationTurn, IDecisionAnswer, IDecisionCallOptions, IDecisionConfig, IDecisionEvent, IDecisionModel, IDecisionOption, IDecisionOutcome, IDecisionQuestion, IDeferredResult, IDynamicSubagentsConfig, IEgressPolicy, IEnterpriseIdpOptions, IEnterpriseOAuthProviderOptions, IEscalationConfig, IJournalAnswerEntry, IJournalEntry, IJournalModelEntry, IJournalPendingEntry, IJournalToolEntry, ILearning, ILearningConfig, ILimitBreach, ILocalSubagentToolOptions, IMcpHttpServerConfig, IMcpServerConfig, IMcpSkillOrigin, IMcpStdioServerConfig, IMedia, IMediaConfig, IMediaFile, IMediaModelSpec, IMediaUsage, IModelCall, INodeOAuthProviderOptions, IOAuthRequestOptions, IOAuthStore, IParkedRun, IPersistence, IPlan, IPlanStep, IRemoteSubagentContext, IRemoteSubagentResult, IRemoteSubagentTask, IRemoteSubagentToolOptions, IResolvedAddress, IResolvedDynamicSubagents, IResolvedThinking, IRunFile, IRunJournal, IRunLease, IRunLeaseOptions, IRunSnapshot, ISandboxConfig, ISandboxError, ISandboxLimits, ISandboxResult, ISanitizedSearch, ISaveSkillInput, ISearchAnswer, ISearchConfig, ISearchOptions, ISearchRequest, ISearchResult, ISearchToolResult, ISearchToolsOptions, ISearchUsage, ISharedLimits, ISkill, ISkillOrigin, ISkillStore, IStepEscalation, IStepResult, IStepStartInfo, ISubagentProfile, ISubagentToolOptions, ISubagentsConfig, IThinkingConfig, ITokenLimits, IToolApprovalConfig, IToolApprovalContext, IToolApprovalRequest, IToolCatalogEntry, IToolDecision, IToolDecisionInput, IToolResultClearing, ITranscription, IUsage, IWebSearchOptions, LogLevel, McpElicitationContent, McpElicitationContext, McpElicitationFieldSchema, McpElicitationHandler, McpElicitationOptions, McpElicitationReason, McpElicitationRequest, McpElicitationResult, McpElicitationSchema, McpOAuthRegistration, McpOAuthRegistrationKind, McpProtocolMode, McpServerInstructions, McpServerProtocol, McpSkillConsent, McpSkillConsentView, McpSkillsOptions, McpSkillsSetting, MediaImageModel, MediaKind, MediaModelKind, MediaSpeechModel, MediaTranscriptionModel, ModelCallStage, ModelTier, NodeResolverOptions, ParkAnswer, ParkedItem, Pipeline, PipelineModelConfig, PipelineOptions, PipelineRouteOptions, PipelineRouteResult, PipelineRunOptions, PromptCachingSetting, ProviderType, RemoteSubagentDispatch, ReplanCause, ReplanTrigger, RunControl, RunLeaseLostReason, SafeFetch, SearchEngine, SearchFreshness, SearchProvider, SkillDirectoryListing, StepComplexity, SubagentDefaultTools, SubagentInfo, SubagentIsolation, ThinkingLevel, ThinkingSetting, TierReason, TokenLimitKind, ToolApprovalAnswer, ToolApprovalDecision, ToolApprovalMode, ToolPermission, ToolResultAnswer, ToolSelectionStrategy, UsagePhase };
2891
+ export { ASK_USER_DESCRIPTION_MAX_CHARS, ASK_USER_LABEL_MAX_CHARS, ASK_USER_MAX_OPTIONS, ASK_USER_MAX_PER_RUN, ASK_USER_MIN_OPTIONS, ASK_USER_OTHER_MAX_CHARS, ASK_USER_QUESTION_MAX_CHARS, ASK_USER_TIMEOUT_MAX_MS, ASK_USER_TIMEOUT_MS, ASK_USER_TOOL, AskUserInputError, DEFAULT_COMPACTION_THRESHOLD_RATIO, DEFAULT_DECISION_CONFIDENCE_THRESHOLD, DEFAULT_DECISION_TIMEOUT_MS, DirSkillStore, ENTERPRISE_MANAGED_AUTHORIZATION_EXTENSION, EgressError, EnterpriseOAuthError, FORGET_SKILL_TOOL, FileOAuthStore, GENERATE_IMAGE_TOOL, GENERATE_SPEECH_TOOL, JOURNAL_LIMITS, JournalError, MCP_ELICITATION_MAX_PER_RUN, MCP_ELICITATION_MAX_PER_TOOL_CALL, MCP_ELICITATION_TIMEOUT_MS, MCP_INSTRUCTIONS_MAX_CHARS_PER_SERVER, MCP_INSTRUCTIONS_MAX_CHARS_TOTAL, MCP_MODERN_PROTOCOL_VERSION, MCP_SKILLS_EXTENSION, MCP_SKILLS_MAX_PER_SERVER, MCP_SKILLS_MAX_TOTAL, MCP_SKILL_BODY_MAX_CHARS, MCP_SKILL_CONSENTS, MCP_SKILL_CONSENT_DEFAULT, MCP_SKILL_DESCRIPTION_MAX_CHARS, MCP_SKILL_DIRECTORY_ENTRIES_MAX, MCP_SKILL_FILE_MAX_CHARS, MCP_SKILL_MAX_RESOURCES, MCP_SKILL_MAX_TOTAL_BYTES, MCP_SKILL_SNAPSHOTS_MAX_BYTES, MCP_SKILL_SNAPSHOT_MAX_DEPTH, MCP_SKILL_SNAPSHOT_MAX_DIRECTORIES, MCP_SKILL_URI_MAX_CHARS, MEDIA_AUDIO_TYPES, MEDIA_DEFAULT_MAX_CALLS, MEDIA_FOLDER, MEDIA_IMAGE_TYPES, MEDIA_MAX_ATTACHED_AUDIO, MEDIA_MAX_AUDIO_INPUT_BYTES, MEDIA_MAX_IMAGE_BYTES, MEDIA_MAX_PROMPT_CHARS, MEDIA_MAX_SPEECH_BYTES, MEDIA_MAX_SPEECH_CHARS, MEDIA_MAX_TRANSCRIPT_CHARS, MEDIA_TIMEOUT_MS, MediaBudgetError, MediaError, MemoryOAuthStore, MemorySkillStore, ModelCallRefusedError, NodeEnterpriseOAuthProvider, NodeOAuthProvider, PipelineDefinition, PipelineEvent, PipelineNode, PipelineNodeRunner, PipelineResult, REMOTE_SUBAGENT_LIMITS, REPLAY_NOTE, RUN_JS_TOOL, RUN_LEASE_DEFAULT_TTL_MS, RunLeaseError, SAVE_SKILL_TOOL, SEARCH_API_BASE_URL, SEARCH_DEFAULT_MAX_RESULTS, SEARCH_GOOGLE_DEFAULT_MODEL, SEARCH_GOOGLE_NOTE, SEARCH_MAX_NOTE_CHARS, SEARCH_MAX_QUERY_CHARS, SEARCH_MAX_RESULTS, SEARCH_MAX_SNIPPET_CHARS, SEARCH_MAX_SUMMARY_CHARS, SEARCH_MAX_TITLE_CHARS, SEARCH_MAX_TOTAL_CHARS, SEARCH_MAX_URL_CHARS, SEARCH_PROVIDERS, SPAWN_INPUT_SCHEMA, SPAWN_SUBAGENT_TOOL, SUBAGENT_DEFAULTS, SUBAGENT_MAX_DEPTH_LIMIT, SUMMARY_PREFIX, SandboxUnavailableError, SubagentSpawnError, TOOL_APPROVAL_TIMEOUT_MS, TRANSCRIBE_AUDIO_TOOL, ToolBudgetError, ToolDeniedError, WEB_FETCH_TOOL, WEB_SEARCH_TOOL, acceptMedia, addUsage, adoptSubagentEvent, askDecisionModel, beginMcpOAuth, buildInstructions, buildMediaModelFromStage, buildSearchRequest, checkAskUserAnswer, checkAskUserInput, checkAuthorizationResponseIssuer, checkEgressUrl, checkLimits, checkRedirect, classifyAddress, cleanAskUserText, compactHistory, createAgent, createEgressTools, createEnterpriseOAuthProvider, createLearning, createMedia, createNodeOAuthProvider, createPipeline, createRunControl, createSafeFetch, createSandboxTool, createSandboxTools, createSearchTools, createSubagentTool, createToolResultClearer, createWebFetchTool, createWebSearchTool, decideToolPermission, decisionModelFromAiSdk, deferResult, defineSkill, estimateTokens, findSecret, finishMcpOAuth, getCurrentRunId, getCurrentRunSandbox, hostMatches, htmlToText, isAuthError, isCodeExecutionTool, isDeferredResult, isModelCallRefused, isReadOnlyTool, isReplayedToolOutput, loadSkillsFromDir, markCodeExecution, markReadOnly, matchToolRule, mcpSkillEntryRefusal, mcpSkillPreamble, mcpSkillUriRefusal, mediaUsageOf, mergeProviderOptions, nodeResolver, normalizeMcpElicitationSchema, normalizeSkillName, normalizeUsage, parseSearchResponse, parseSkillMarkdown, pickPipelineRoute, redactHeaders, renderMcpInstructions, resolveCompaction, resolveDynamicSubagents, resolveEgressPolicy, resolveLimits, resolvePromptCaching, resolveSandboxLimits, resolveThinking, sanitizeSearchResults, searchEgressPolicy, searchEngineAnswer, searchStatusMessage, searchToolResult, searchTools, searchUsageOf, sniffMediaType, truncateToolModelOutput, validateMcpElicitationContent, withRollingBreakpoint, withToolOutputLimit, wrapTranscript };
2892
+ export type { AgentEvent, AgentModel, AgentStage, AskUserAction, AskUserAnswer, AskUserCheckedAnswer, AskUserContext, AskUserDecision, AskUserHandler, AskUserOption, AskUserQuestion, AskUserReason, BudgetKind, DecisionFallbackReason, DecisionPoint, EgressErrorCode, EnterpriseAssertionAlgorithm, EnterpriseAssertionAudience, EnterpriseAssertionType, EnterpriseOAuthHop, EnterpriseOAuthLog, EnterprisePrivateKey, EscalationReason, EventHandler, IAgent, IAgentConfig, IAgentRunOptions, IAgentRunResult, IAgentStageOverride, IAiSdkDecisionOptions, IAskUserConfig, IAskUserRequest, IClearedInfo, ICloseOptions, ICompactHistoryOptions, ICompactHistoryResult, ICompactOptions, ICompactResult, ICompactionConfig, IConversationTurn, IDecisionAnswer, IDecisionCallOptions, IDecisionConfig, IDecisionEvent, IDecisionModel, IDecisionOption, IDecisionOutcome, IDecisionQuestion, IDeferredResult, IDynamicSubagentsConfig, IEgressPolicy, IEnterpriseIdpOptions, IEnterpriseOAuthProviderOptions, IEscalationConfig, IJournalAnswerEntry, IJournalEntry, IJournalModelEntry, IJournalPendingEntry, IJournalToolEntry, ILearning, ILearningConfig, ILimitBreach, ILocalSubagentToolOptions, IMcpHttpServerConfig, IMcpServerConfig, IMcpSkillOrigin, IMcpStdioServerConfig, IMedia, IMediaConfig, IMediaFile, IMediaModelSpec, IMediaUsage, IModelCall, INodeOAuthProviderOptions, IOAuthRequestOptions, IOAuthStore, IParkedRun, IPersistence, IPlan, IPlanStep, IRemoteSubagentContext, IRemoteSubagentResult, IRemoteSubagentTask, IRemoteSubagentToolOptions, IResolvedAddress, IResolvedDynamicSubagents, IResolvedThinking, IRunFile, IRunJournal, IRunLease, IRunLeaseOptions, IRunSnapshot, ISandboxConfig, ISandboxError, ISandboxLimits, ISandboxResult, ISanitizedSearch, ISaveSkillInput, ISearchAnswer, ISearchConfig, ISearchEngineAnswer, ISearchOptions, ISearchRequest, ISearchResult, ISearchToolResult, ISearchToolsOptions, ISearchUsage, ISharedLimits, ISkill, ISkillOrigin, ISkillStore, IStepEscalation, IStepResult, IStepStartInfo, ISubagentProfile, ISubagentToolOptions, ISubagentsConfig, IThinkingConfig, ITokenLimits, IToolApprovalConfig, IToolApprovalContext, IToolApprovalRequest, IToolCatalogEntry, IToolDecision, IToolDecisionInput, IToolResultClearing, ITranscription, IUsage, IWebSearchOptions, LogLevel, McpElicitationContent, McpElicitationContext, McpElicitationFieldSchema, McpElicitationHandler, McpElicitationOptions, McpElicitationReason, McpElicitationRequest, McpElicitationResult, McpElicitationSchema, McpOAuthRegistration, McpOAuthRegistrationKind, McpProtocolMode, McpServerInstructions, McpServerProtocol, McpSkillConsent, McpSkillConsentView, McpSkillsOptions, McpSkillsSetting, MediaImageModel, MediaKind, MediaModelKind, MediaSpeechModel, MediaTranscriptionModel, ModelCallStage, ModelTier, NodeResolverOptions, ParkAnswer, ParkedItem, Pipeline, PipelineModelConfig, PipelineOptions, PipelineRouteOptions, PipelineRouteResult, PipelineRunOptions, PromptCachingSetting, ProviderType, RemoteSubagentDispatch, ReplanCause, ReplanTrigger, RunControl, RunLeaseLostReason, SafeFetch, SearchEngine, SearchFreshness, SearchProvider, SkillDirectoryListing, StepComplexity, SubagentDefaultTools, SubagentInfo, SubagentIsolation, ThinkingLevel, ThinkingSetting, TierReason, TokenLimitKind, ToolApprovalAnswer, ToolApprovalDecision, ToolApprovalMode, ToolPermission, ToolResultAnswer, ToolSelectionStrategy, UsagePhase };
package/dist/index.d.ts CHANGED
@@ -220,10 +220,29 @@ interface ISearchOptions {
220
220
  signal?: AbortSignal;
221
221
  }
222
222
  /**
223
- * A search engine of the host's own: any function that answers a query with results. What it
224
- * returns is treated like a built-in adapter's answer - cleaned, capped and filtered.
223
+ * What a search engine function may answer in place of a bare list, when the search ran through a
224
+ * model - a provider's server-side search tool, one model call: the results, what the call spent,
225
+ * the model's own answer and a line on what the results are. Every field is checked as the rest of
226
+ * an engine's answer is (`searchEngineAnswer`).
225
227
  */
226
- type SearchEngine = (query: string, options: ISearchOptions) => Promise<ISearchResult[]>;
228
+ interface ISearchEngineAnswer {
229
+ results: ISearchResult[];
230
+ /**
231
+ * The model tokens the search spent, as its API reported them: charged to the run like the
232
+ * google provider's (a `usage` event of phase 'search', in every total and against the limits).
233
+ */
234
+ usage?: ISearchUsage;
235
+ /** The model's answer from its sources: the model sees it, cut, when no result has a snippet. */
236
+ summary?: string;
237
+ /** One line on what the results are - whose search, what the snippets are - for the model. */
238
+ note?: string;
239
+ }
240
+ /**
241
+ * A search engine of the host's own: any function that answers a query with results - a bare
242
+ * list, or an `ISearchEngineAnswer` with what the search spent. What it returns is treated like a
243
+ * built-in adapter's answer - cleaned, capped and filtered.
244
+ */
245
+ type SearchEngine = (query: string, options: ISearchOptions) => Promise<ISearchResult[] | ISearchEngineAnswer>;
227
246
  /**
228
247
  * The built-in provider. One: Google Search through the Gemini API's grounding (`google_search`),
229
248
  * which needs a Gemini (Google AI Studio) key and nothing else. Any other search API is the
@@ -240,6 +259,8 @@ declare const SEARCH_API_BASE_URL: Record<SearchProvider, string>;
240
259
  declare const SEARCH_GOOGLE_DEFAULT_MODEL = "gemini-2.5-flash-lite";
241
260
  /** The most of the grounding model's answer a model sees as `summary`. */
242
261
  declare const SEARCH_MAX_SUMMARY_CHARS = 1000;
262
+ /** The most of a result list's `note` (what the results are) a model sees. */
263
+ declare const SEARCH_MAX_NOTE_CHARS = 300;
243
264
  /** Said in every result of the google provider: what its URLs and its text are. */
244
265
  declare const SEARCH_GOOGLE_NOTE: string;
245
266
  /** One HTTP call to a search API. The key, if any, is in `headers` only - never in the URL. */
@@ -275,6 +296,8 @@ interface ISearchAnswer {
275
296
  summary?: unknown;
276
297
  /** Absent when the API reported none. */
277
298
  usage?: ISearchUsage;
299
+ /** What the results are (the google provider's `SEARCH_GOOGLE_NOTE`, an engine's own line). */
300
+ note?: string;
278
301
  }
279
302
  /**
280
303
  * The request for one query, per the Gemini API's public documentation:
@@ -292,6 +315,18 @@ declare const buildSearchRequest: (input: ISearchRequestInput) => ISearchRequest
292
315
  * what makes them safe to show.
293
316
  */
294
317
  declare const parseSearchResponse: (provider: SearchProvider, json: unknown) => ISearchAnswer;
318
+ /**
319
+ * What a search spent, as an engine reported it: whole non-negative token counts (anything else
320
+ * is 0), the total their sum, reasoning never more than the output. Undefined when it spent none.
321
+ */
322
+ declare const searchUsageOf: (raw: unknown) => ISearchUsage | undefined;
323
+ /**
324
+ * An engine's answer as the tool reads it. A bare list is the results and nothing else (no usage,
325
+ * no summary, no note); an `ISearchEngineAnswer` gives its `results` and - checked - its usage
326
+ * (`searchUsageOf`), its summary (a string; cleaned and cut when it is shown) and its note (cleaned
327
+ * and cut here). Anything else is no results. Still raw until `sanitizeSearchResults`.
328
+ */
329
+ declare const searchEngineAnswer: (raw: unknown) => ISearchAnswer;
295
330
  /**
296
331
  * What a failed call says to the model: the provider, the model, the status, the API's own error
297
332
  * code word and what it usually means. Never the error's text: that is third-party text, and may
@@ -319,18 +354,19 @@ declare const sanitizeSearchResults: (raw: unknown, options?: {
319
354
  interface ISearchToolResult {
320
355
  query: string;
321
356
  results: ISearchResult[];
322
- /** The google provider, when no source came with a snippet: the grounding model's answer, cut. */
357
+ /** When no source came with a snippet: the grounding (or engine's) model's answer, cut. */
323
358
  summary?: string;
324
- /** The google provider: what its URLs and its text are. */
359
+ /** What the URLs and the text are: the google provider's note, or an engine's own line. */
325
360
  note?: string;
326
361
  filtered?: number;
327
362
  truncated?: true;
328
363
  untrusted: true;
329
364
  }
330
365
  /**
331
- * The tool's result, from the cleaned list and - for the google provider - the parsed answer.
332
- * The model's `summary` is attached only when there are sources, none of them carries a snippet
333
- * and none was filtered out: a summary cannot be cut to the sources that remain.
366
+ * The tool's result, from the cleaned list and the parsed answer (the google provider's, or an
367
+ * engine's `searchEngineAnswer`). The model's `summary` is attached only when there are sources,
368
+ * none of them carries a snippet and none was filtered out: a summary cannot be cut to the sources
369
+ * that remain. The answer's `note` goes with every result list, cleaned and cut.
334
370
  */
335
371
  declare const searchToolResult: (query: string, clean: ISanitizedSearch, answer?: ISearchAnswer) => ISearchToolResult;
336
372
 
@@ -2852,5 +2888,5 @@ declare const REMOTE_SUBAGENT_LIMITS: {
2852
2888
  */
2853
2889
  declare const createSubagentTool: (opts: ISubagentToolOptions) => Tool;
2854
2890
 
2855
- export { ASK_USER_DESCRIPTION_MAX_CHARS, ASK_USER_LABEL_MAX_CHARS, ASK_USER_MAX_OPTIONS, ASK_USER_MAX_PER_RUN, ASK_USER_MIN_OPTIONS, ASK_USER_OTHER_MAX_CHARS, ASK_USER_QUESTION_MAX_CHARS, ASK_USER_TIMEOUT_MAX_MS, ASK_USER_TIMEOUT_MS, ASK_USER_TOOL, AskUserInputError, DEFAULT_COMPACTION_THRESHOLD_RATIO, DEFAULT_DECISION_CONFIDENCE_THRESHOLD, DEFAULT_DECISION_TIMEOUT_MS, DirSkillStore, ENTERPRISE_MANAGED_AUTHORIZATION_EXTENSION, EgressError, EnterpriseOAuthError, FORGET_SKILL_TOOL, FileOAuthStore, GENERATE_IMAGE_TOOL, GENERATE_SPEECH_TOOL, JOURNAL_LIMITS, JournalError, MCP_ELICITATION_MAX_PER_RUN, MCP_ELICITATION_MAX_PER_TOOL_CALL, MCP_ELICITATION_TIMEOUT_MS, MCP_INSTRUCTIONS_MAX_CHARS_PER_SERVER, MCP_INSTRUCTIONS_MAX_CHARS_TOTAL, MCP_MODERN_PROTOCOL_VERSION, MCP_SKILLS_EXTENSION, MCP_SKILLS_MAX_PER_SERVER, MCP_SKILLS_MAX_TOTAL, MCP_SKILL_BODY_MAX_CHARS, MCP_SKILL_CONSENTS, MCP_SKILL_CONSENT_DEFAULT, MCP_SKILL_DESCRIPTION_MAX_CHARS, MCP_SKILL_DIRECTORY_ENTRIES_MAX, MCP_SKILL_FILE_MAX_CHARS, MCP_SKILL_MAX_RESOURCES, MCP_SKILL_MAX_TOTAL_BYTES, MCP_SKILL_SNAPSHOTS_MAX_BYTES, MCP_SKILL_SNAPSHOT_MAX_DEPTH, MCP_SKILL_SNAPSHOT_MAX_DIRECTORIES, MCP_SKILL_URI_MAX_CHARS, MEDIA_AUDIO_TYPES, MEDIA_DEFAULT_MAX_CALLS, MEDIA_FOLDER, MEDIA_IMAGE_TYPES, MEDIA_MAX_ATTACHED_AUDIO, MEDIA_MAX_AUDIO_INPUT_BYTES, MEDIA_MAX_IMAGE_BYTES, MEDIA_MAX_PROMPT_CHARS, MEDIA_MAX_SPEECH_BYTES, MEDIA_MAX_SPEECH_CHARS, MEDIA_MAX_TRANSCRIPT_CHARS, MEDIA_TIMEOUT_MS, MediaBudgetError, MediaError, MemoryOAuthStore, MemorySkillStore, ModelCallRefusedError, NodeEnterpriseOAuthProvider, NodeOAuthProvider, PipelineDefinition, PipelineEvent, PipelineNode, PipelineNodeRunner, PipelineResult, REMOTE_SUBAGENT_LIMITS, REPLAY_NOTE, RUN_JS_TOOL, RUN_LEASE_DEFAULT_TTL_MS, RunLeaseError, SAVE_SKILL_TOOL, SEARCH_API_BASE_URL, SEARCH_DEFAULT_MAX_RESULTS, SEARCH_GOOGLE_DEFAULT_MODEL, SEARCH_GOOGLE_NOTE, SEARCH_MAX_QUERY_CHARS, SEARCH_MAX_RESULTS, SEARCH_MAX_SNIPPET_CHARS, SEARCH_MAX_SUMMARY_CHARS, SEARCH_MAX_TITLE_CHARS, SEARCH_MAX_TOTAL_CHARS, SEARCH_MAX_URL_CHARS, SEARCH_PROVIDERS, SPAWN_INPUT_SCHEMA, SPAWN_SUBAGENT_TOOL, SUBAGENT_DEFAULTS, SUBAGENT_MAX_DEPTH_LIMIT, SUMMARY_PREFIX, SandboxUnavailableError, SubagentSpawnError, TOOL_APPROVAL_TIMEOUT_MS, TRANSCRIBE_AUDIO_TOOL, ToolBudgetError, ToolDeniedError, WEB_FETCH_TOOL, WEB_SEARCH_TOOL, acceptMedia, addUsage, adoptSubagentEvent, askDecisionModel, beginMcpOAuth, buildInstructions, buildMediaModelFromStage, buildSearchRequest, checkAskUserAnswer, checkAskUserInput, checkAuthorizationResponseIssuer, checkEgressUrl, checkLimits, checkRedirect, classifyAddress, cleanAskUserText, compactHistory, createAgent, createEgressTools, createEnterpriseOAuthProvider, createLearning, createMedia, createNodeOAuthProvider, createPipeline, createRunControl, createSafeFetch, createSandboxTool, createSandboxTools, createSearchTools, createSubagentTool, createToolResultClearer, createWebFetchTool, createWebSearchTool, decideToolPermission, decisionModelFromAiSdk, deferResult, defineSkill, estimateTokens, findSecret, finishMcpOAuth, getCurrentRunId, getCurrentRunSandbox, hostMatches, htmlToText, isAuthError, isCodeExecutionTool, isDeferredResult, isModelCallRefused, isReadOnlyTool, isReplayedToolOutput, loadSkillsFromDir, markCodeExecution, markReadOnly, matchToolRule, mcpSkillEntryRefusal, mcpSkillPreamble, mcpSkillUriRefusal, mediaUsageOf, mergeProviderOptions, nodeResolver, normalizeMcpElicitationSchema, normalizeSkillName, normalizeUsage, parseSearchResponse, parseSkillMarkdown, pickPipelineRoute, redactHeaders, renderMcpInstructions, resolveCompaction, resolveDynamicSubagents, resolveEgressPolicy, resolveLimits, resolvePromptCaching, resolveSandboxLimits, resolveThinking, sanitizeSearchResults, searchEgressPolicy, searchStatusMessage, searchToolResult, searchTools, sniffMediaType, truncateToolModelOutput, validateMcpElicitationContent, withRollingBreakpoint, withToolOutputLimit, wrapTranscript };
2856
- export type { AgentEvent, AgentModel, AgentStage, AskUserAction, AskUserAnswer, AskUserCheckedAnswer, AskUserContext, AskUserDecision, AskUserHandler, AskUserOption, AskUserQuestion, AskUserReason, BudgetKind, DecisionFallbackReason, DecisionPoint, EgressErrorCode, EnterpriseAssertionAlgorithm, EnterpriseAssertionAudience, EnterpriseAssertionType, EnterpriseOAuthHop, EnterpriseOAuthLog, EnterprisePrivateKey, EscalationReason, EventHandler, IAgent, IAgentConfig, IAgentRunOptions, IAgentRunResult, IAgentStageOverride, IAiSdkDecisionOptions, IAskUserConfig, IAskUserRequest, IClearedInfo, ICloseOptions, ICompactHistoryOptions, ICompactHistoryResult, ICompactOptions, ICompactResult, ICompactionConfig, IConversationTurn, IDecisionAnswer, IDecisionCallOptions, IDecisionConfig, IDecisionEvent, IDecisionModel, IDecisionOption, IDecisionOutcome, IDecisionQuestion, IDeferredResult, IDynamicSubagentsConfig, IEgressPolicy, IEnterpriseIdpOptions, IEnterpriseOAuthProviderOptions, IEscalationConfig, IJournalAnswerEntry, IJournalEntry, IJournalModelEntry, IJournalPendingEntry, IJournalToolEntry, ILearning, ILearningConfig, ILimitBreach, ILocalSubagentToolOptions, IMcpHttpServerConfig, IMcpServerConfig, IMcpSkillOrigin, IMcpStdioServerConfig, IMedia, IMediaConfig, IMediaFile, IMediaModelSpec, IMediaUsage, IModelCall, INodeOAuthProviderOptions, IOAuthRequestOptions, IOAuthStore, IParkedRun, IPersistence, IPlan, IPlanStep, IRemoteSubagentContext, IRemoteSubagentResult, IRemoteSubagentTask, IRemoteSubagentToolOptions, IResolvedAddress, IResolvedDynamicSubagents, IResolvedThinking, IRunFile, IRunJournal, IRunLease, IRunLeaseOptions, IRunSnapshot, ISandboxConfig, ISandboxError, ISandboxLimits, ISandboxResult, ISanitizedSearch, ISaveSkillInput, ISearchAnswer, ISearchConfig, ISearchOptions, ISearchRequest, ISearchResult, ISearchToolResult, ISearchToolsOptions, ISearchUsage, ISharedLimits, ISkill, ISkillOrigin, ISkillStore, IStepEscalation, IStepResult, IStepStartInfo, ISubagentProfile, ISubagentToolOptions, ISubagentsConfig, IThinkingConfig, ITokenLimits, IToolApprovalConfig, IToolApprovalContext, IToolApprovalRequest, IToolCatalogEntry, IToolDecision, IToolDecisionInput, IToolResultClearing, ITranscription, IUsage, IWebSearchOptions, LogLevel, McpElicitationContent, McpElicitationContext, McpElicitationFieldSchema, McpElicitationHandler, McpElicitationOptions, McpElicitationReason, McpElicitationRequest, McpElicitationResult, McpElicitationSchema, McpOAuthRegistration, McpOAuthRegistrationKind, McpProtocolMode, McpServerInstructions, McpServerProtocol, McpSkillConsent, McpSkillConsentView, McpSkillsOptions, McpSkillsSetting, MediaImageModel, MediaKind, MediaModelKind, MediaSpeechModel, MediaTranscriptionModel, ModelCallStage, ModelTier, NodeResolverOptions, ParkAnswer, ParkedItem, Pipeline, PipelineModelConfig, PipelineOptions, PipelineRouteOptions, PipelineRouteResult, PipelineRunOptions, PromptCachingSetting, ProviderType, RemoteSubagentDispatch, ReplanCause, ReplanTrigger, RunControl, RunLeaseLostReason, SafeFetch, SearchEngine, SearchFreshness, SearchProvider, SkillDirectoryListing, StepComplexity, SubagentDefaultTools, SubagentInfo, SubagentIsolation, ThinkingLevel, ThinkingSetting, TierReason, TokenLimitKind, ToolApprovalAnswer, ToolApprovalDecision, ToolApprovalMode, ToolPermission, ToolResultAnswer, ToolSelectionStrategy, UsagePhase };
2891
+ export { ASK_USER_DESCRIPTION_MAX_CHARS, ASK_USER_LABEL_MAX_CHARS, ASK_USER_MAX_OPTIONS, ASK_USER_MAX_PER_RUN, ASK_USER_MIN_OPTIONS, ASK_USER_OTHER_MAX_CHARS, ASK_USER_QUESTION_MAX_CHARS, ASK_USER_TIMEOUT_MAX_MS, ASK_USER_TIMEOUT_MS, ASK_USER_TOOL, AskUserInputError, DEFAULT_COMPACTION_THRESHOLD_RATIO, DEFAULT_DECISION_CONFIDENCE_THRESHOLD, DEFAULT_DECISION_TIMEOUT_MS, DirSkillStore, ENTERPRISE_MANAGED_AUTHORIZATION_EXTENSION, EgressError, EnterpriseOAuthError, FORGET_SKILL_TOOL, FileOAuthStore, GENERATE_IMAGE_TOOL, GENERATE_SPEECH_TOOL, JOURNAL_LIMITS, JournalError, MCP_ELICITATION_MAX_PER_RUN, MCP_ELICITATION_MAX_PER_TOOL_CALL, MCP_ELICITATION_TIMEOUT_MS, MCP_INSTRUCTIONS_MAX_CHARS_PER_SERVER, MCP_INSTRUCTIONS_MAX_CHARS_TOTAL, MCP_MODERN_PROTOCOL_VERSION, MCP_SKILLS_EXTENSION, MCP_SKILLS_MAX_PER_SERVER, MCP_SKILLS_MAX_TOTAL, MCP_SKILL_BODY_MAX_CHARS, MCP_SKILL_CONSENTS, MCP_SKILL_CONSENT_DEFAULT, MCP_SKILL_DESCRIPTION_MAX_CHARS, MCP_SKILL_DIRECTORY_ENTRIES_MAX, MCP_SKILL_FILE_MAX_CHARS, MCP_SKILL_MAX_RESOURCES, MCP_SKILL_MAX_TOTAL_BYTES, MCP_SKILL_SNAPSHOTS_MAX_BYTES, MCP_SKILL_SNAPSHOT_MAX_DEPTH, MCP_SKILL_SNAPSHOT_MAX_DIRECTORIES, MCP_SKILL_URI_MAX_CHARS, MEDIA_AUDIO_TYPES, MEDIA_DEFAULT_MAX_CALLS, MEDIA_FOLDER, MEDIA_IMAGE_TYPES, MEDIA_MAX_ATTACHED_AUDIO, MEDIA_MAX_AUDIO_INPUT_BYTES, MEDIA_MAX_IMAGE_BYTES, MEDIA_MAX_PROMPT_CHARS, MEDIA_MAX_SPEECH_BYTES, MEDIA_MAX_SPEECH_CHARS, MEDIA_MAX_TRANSCRIPT_CHARS, MEDIA_TIMEOUT_MS, MediaBudgetError, MediaError, MemoryOAuthStore, MemorySkillStore, ModelCallRefusedError, NodeEnterpriseOAuthProvider, NodeOAuthProvider, PipelineDefinition, PipelineEvent, PipelineNode, PipelineNodeRunner, PipelineResult, REMOTE_SUBAGENT_LIMITS, REPLAY_NOTE, RUN_JS_TOOL, RUN_LEASE_DEFAULT_TTL_MS, RunLeaseError, SAVE_SKILL_TOOL, SEARCH_API_BASE_URL, SEARCH_DEFAULT_MAX_RESULTS, SEARCH_GOOGLE_DEFAULT_MODEL, SEARCH_GOOGLE_NOTE, SEARCH_MAX_NOTE_CHARS, SEARCH_MAX_QUERY_CHARS, SEARCH_MAX_RESULTS, SEARCH_MAX_SNIPPET_CHARS, SEARCH_MAX_SUMMARY_CHARS, SEARCH_MAX_TITLE_CHARS, SEARCH_MAX_TOTAL_CHARS, SEARCH_MAX_URL_CHARS, SEARCH_PROVIDERS, SPAWN_INPUT_SCHEMA, SPAWN_SUBAGENT_TOOL, SUBAGENT_DEFAULTS, SUBAGENT_MAX_DEPTH_LIMIT, SUMMARY_PREFIX, SandboxUnavailableError, SubagentSpawnError, TOOL_APPROVAL_TIMEOUT_MS, TRANSCRIBE_AUDIO_TOOL, ToolBudgetError, ToolDeniedError, WEB_FETCH_TOOL, WEB_SEARCH_TOOL, acceptMedia, addUsage, adoptSubagentEvent, askDecisionModel, beginMcpOAuth, buildInstructions, buildMediaModelFromStage, buildSearchRequest, checkAskUserAnswer, checkAskUserInput, checkAuthorizationResponseIssuer, checkEgressUrl, checkLimits, checkRedirect, classifyAddress, cleanAskUserText, compactHistory, createAgent, createEgressTools, createEnterpriseOAuthProvider, createLearning, createMedia, createNodeOAuthProvider, createPipeline, createRunControl, createSafeFetch, createSandboxTool, createSandboxTools, createSearchTools, createSubagentTool, createToolResultClearer, createWebFetchTool, createWebSearchTool, decideToolPermission, decisionModelFromAiSdk, deferResult, defineSkill, estimateTokens, findSecret, finishMcpOAuth, getCurrentRunId, getCurrentRunSandbox, hostMatches, htmlToText, isAuthError, isCodeExecutionTool, isDeferredResult, isModelCallRefused, isReadOnlyTool, isReplayedToolOutput, loadSkillsFromDir, markCodeExecution, markReadOnly, matchToolRule, mcpSkillEntryRefusal, mcpSkillPreamble, mcpSkillUriRefusal, mediaUsageOf, mergeProviderOptions, nodeResolver, normalizeMcpElicitationSchema, normalizeSkillName, normalizeUsage, parseSearchResponse, parseSkillMarkdown, pickPipelineRoute, redactHeaders, renderMcpInstructions, resolveCompaction, resolveDynamicSubagents, resolveEgressPolicy, resolveLimits, resolvePromptCaching, resolveSandboxLimits, resolveThinking, sanitizeSearchResults, searchEgressPolicy, searchEngineAnswer, searchStatusMessage, searchToolResult, searchTools, searchUsageOf, sniffMediaType, truncateToolModelOutput, validateMcpElicitationContent, withRollingBreakpoint, withToolOutputLimit, wrapTranscript };
2892
+ export type { AgentEvent, AgentModel, AgentStage, AskUserAction, AskUserAnswer, AskUserCheckedAnswer, AskUserContext, AskUserDecision, AskUserHandler, AskUserOption, AskUserQuestion, AskUserReason, BudgetKind, DecisionFallbackReason, DecisionPoint, EgressErrorCode, EnterpriseAssertionAlgorithm, EnterpriseAssertionAudience, EnterpriseAssertionType, EnterpriseOAuthHop, EnterpriseOAuthLog, EnterprisePrivateKey, EscalationReason, EventHandler, IAgent, IAgentConfig, IAgentRunOptions, IAgentRunResult, IAgentStageOverride, IAiSdkDecisionOptions, IAskUserConfig, IAskUserRequest, IClearedInfo, ICloseOptions, ICompactHistoryOptions, ICompactHistoryResult, ICompactOptions, ICompactResult, ICompactionConfig, IConversationTurn, IDecisionAnswer, IDecisionCallOptions, IDecisionConfig, IDecisionEvent, IDecisionModel, IDecisionOption, IDecisionOutcome, IDecisionQuestion, IDeferredResult, IDynamicSubagentsConfig, IEgressPolicy, IEnterpriseIdpOptions, IEnterpriseOAuthProviderOptions, IEscalationConfig, IJournalAnswerEntry, IJournalEntry, IJournalModelEntry, IJournalPendingEntry, IJournalToolEntry, ILearning, ILearningConfig, ILimitBreach, ILocalSubagentToolOptions, IMcpHttpServerConfig, IMcpServerConfig, IMcpSkillOrigin, IMcpStdioServerConfig, IMedia, IMediaConfig, IMediaFile, IMediaModelSpec, IMediaUsage, IModelCall, INodeOAuthProviderOptions, IOAuthRequestOptions, IOAuthStore, IParkedRun, IPersistence, IPlan, IPlanStep, IRemoteSubagentContext, IRemoteSubagentResult, IRemoteSubagentTask, IRemoteSubagentToolOptions, IResolvedAddress, IResolvedDynamicSubagents, IResolvedThinking, IRunFile, IRunJournal, IRunLease, IRunLeaseOptions, IRunSnapshot, ISandboxConfig, ISandboxError, ISandboxLimits, ISandboxResult, ISanitizedSearch, ISaveSkillInput, ISearchAnswer, ISearchConfig, ISearchEngineAnswer, ISearchOptions, ISearchRequest, ISearchResult, ISearchToolResult, ISearchToolsOptions, ISearchUsage, ISharedLimits, ISkill, ISkillOrigin, ISkillStore, IStepEscalation, IStepResult, IStepStartInfo, ISubagentProfile, ISubagentToolOptions, ISubagentsConfig, IThinkingConfig, ITokenLimits, IToolApprovalConfig, IToolApprovalContext, IToolApprovalRequest, IToolCatalogEntry, IToolDecision, IToolDecisionInput, IToolResultClearing, ITranscription, IUsage, IWebSearchOptions, LogLevel, McpElicitationContent, McpElicitationContext, McpElicitationFieldSchema, McpElicitationHandler, McpElicitationOptions, McpElicitationReason, McpElicitationRequest, McpElicitationResult, McpElicitationSchema, McpOAuthRegistration, McpOAuthRegistrationKind, McpProtocolMode, McpServerInstructions, McpServerProtocol, McpSkillConsent, McpSkillConsentView, McpSkillsOptions, McpSkillsSetting, MediaImageModel, MediaKind, MediaModelKind, MediaSpeechModel, MediaTranscriptionModel, ModelCallStage, ModelTier, NodeResolverOptions, ParkAnswer, ParkedItem, Pipeline, PipelineModelConfig, PipelineOptions, PipelineRouteOptions, PipelineRouteResult, PipelineRunOptions, PromptCachingSetting, ProviderType, RemoteSubagentDispatch, ReplanCause, ReplanTrigger, RunControl, RunLeaseLostReason, SafeFetch, SearchEngine, SearchFreshness, SearchProvider, SkillDirectoryListing, StepComplexity, SubagentDefaultTools, SubagentInfo, SubagentIsolation, ThinkingLevel, ThinkingSetting, TierReason, TokenLimitKind, ToolApprovalAnswer, ToolApprovalDecision, ToolApprovalMode, ToolPermission, ToolResultAnswer, ToolSelectionStrategy, UsagePhase };