@jrkropp/codex-js 0.1.1 → 0.1.3
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/CHANGELOG.md +8 -0
- package/dist/ClientNotification-B6-FhXQf.d.ts +5 -0
- package/dist/{DynamicToolCallResponse-D2OVpa4p.d.ts → DynamicToolCallResponse-82DFjES2.d.ts} +1 -1
- package/dist/DynamicToolSpec-CfnhqAYK.d.ts +29 -0
- package/dist/PermissionsRequestApprovalResponse-DxzPPDRb.d.ts +55 -0
- package/dist/ProviderStatusBanner-BlP6lzwE.d.ts +441 -0
- package/dist/ServerRequest-B5cKVJjr.d.ts +2181 -0
- package/dist/{session-BO6EZNK7.d.ts → ThreadResumeResponse-DvmE1juU.d.ts} +3 -290
- package/dist/ToolRequestUserInputQuestion-CeZa5X1J.d.ts +23 -0
- package/dist/{ToolRequestUserInputResponse-Bxjlpgho.d.ts → ToolRequestUserInputResponse-zcPLwbiK.d.ts} +1 -1
- package/dist/TurnSteerResponse-0kBCfplh.d.ts +209 -0
- package/dist/WebSearchToolConfig-D3ep0625.d.ts +18 -0
- package/dist/chat-runtime-B6azJyKo.d.ts +381 -0
- package/dist/chunk-2DZRMCI2.js +1258 -0
- package/dist/chunk-2DZRMCI2.js.map +1 -0
- package/dist/chunk-4DPLJPB5.js +396 -0
- package/dist/chunk-4DPLJPB5.js.map +1 -0
- package/dist/chunk-5JMJ6OI5.js +3 -0
- package/dist/chunk-5JMJ6OI5.js.map +1 -0
- package/dist/chunk-6ZMJ34KE.js +1153 -0
- package/dist/chunk-6ZMJ34KE.js.map +1 -0
- package/dist/chunk-CGBS37IU.js +128 -0
- package/dist/chunk-CGBS37IU.js.map +1 -0
- package/dist/chunk-DCMKA2A6.js +18 -0
- package/dist/chunk-DCMKA2A6.js.map +1 -0
- package/dist/chunk-DYLHN3HG.js +937 -0
- package/dist/chunk-DYLHN3HG.js.map +1 -0
- package/dist/chunk-ILXA6HLX.js +1973 -0
- package/dist/chunk-ILXA6HLX.js.map +1 -0
- package/dist/{chunk-TZBLUZ2X.js → chunk-LWQNX4LI.js} +7811 -12696
- package/dist/chunk-LWQNX4LI.js.map +1 -0
- package/dist/{chunk-FFASNDXU.js → chunk-NCI4MAWZ.js} +317 -1967
- package/dist/chunk-NCI4MAWZ.js.map +1 -0
- package/dist/chunk-O44XP7LH.js +214 -0
- package/dist/chunk-O44XP7LH.js.map +1 -0
- package/dist/chunk-PST3ZWX2.js +555 -0
- package/dist/chunk-PST3ZWX2.js.map +1 -0
- package/dist/chunk-SYPHCDRD.js +1133 -0
- package/dist/chunk-SYPHCDRD.js.map +1 -0
- package/dist/chunk-V4BMZWBM.js +2401 -0
- package/dist/chunk-V4BMZWBM.js.map +1 -0
- package/dist/chunk-YHVCFD2D.js +117 -0
- package/dist/chunk-YHVCFD2D.js.map +1 -0
- package/dist/chunk-Z63UPBS3.js +152 -0
- package/dist/chunk-Z63UPBS3.js.map +1 -0
- package/dist/client/index.d.ts +16 -111
- package/dist/client/index.js +13 -1
- package/dist/codex-rs/app-server/index.d.ts +161 -0
- package/dist/codex-rs/app-server/index.js +13 -0
- package/dist/codex-rs/app-server/index.js.map +1 -0
- package/dist/codex-rs/app-server-protocol/index.d.ts +1722 -0
- package/dist/codex-rs/app-server-protocol/index.js +6 -0
- package/dist/codex-rs/app-server-protocol/index.js.map +1 -0
- package/dist/codex-rs/app-server-protocol/protocol.d.ts +19 -0
- package/dist/codex-rs/app-server-protocol/protocol.js +4 -0
- package/dist/codex-rs/app-server-protocol/protocol.js.map +1 -0
- package/dist/codex-rs/codex-api/index.d.ts +104 -0
- package/dist/codex-rs/codex-api/index.js +11 -0
- package/dist/codex-rs/codex-api/index.js.map +1 -0
- package/dist/codex-rs/config/index.d.ts +88 -0
- package/dist/codex-rs/config/index.js +4 -0
- package/dist/codex-rs/config/index.js.map +1 -0
- package/dist/codex-rs/core/config/index.d.ts +61 -0
- package/dist/codex-rs/core/config/index.js +5 -0
- package/dist/codex-rs/core/config/index.js.map +1 -0
- package/dist/codex-rs/core/index.d.ts +1393 -0
- package/dist/codex-rs/core/index.js +11 -0
- package/dist/codex-rs/core/index.js.map +1 -0
- package/dist/codex-rs/model-provider/index.d.ts +2 -0
- package/dist/codex-rs/model-provider/index.js +4 -0
- package/dist/codex-rs/model-provider/index.js.map +1 -0
- package/dist/codex-rs/models-manager/index.d.ts +2 -0
- package/dist/codex-rs/models-manager/index.js +4 -0
- package/dist/codex-rs/models-manager/index.js.map +1 -0
- package/dist/codex-rs/parity.d.ts +26 -0
- package/dist/codex-rs/parity.js +3 -0
- package/dist/codex-rs/parity.js.map +1 -0
- package/dist/codex-rs/thread-store/index.d.ts +5 -0
- package/dist/codex-rs/thread-store/index.js +4 -0
- package/dist/codex-rs/thread-store/index.js.map +1 -0
- package/dist/codex-rs/unsupported.d.ts +15 -0
- package/dist/codex-rs/unsupported.js +22 -0
- package/dist/codex-rs/unsupported.js.map +1 -0
- package/dist/codex-rs/utils/output-truncation.d.ts +21 -0
- package/dist/codex-rs/utils/output-truncation.js +4 -0
- package/dist/codex-rs/utils/output-truncation.js.map +1 -0
- package/dist/codex-rs/utils/string.d.ts +7 -0
- package/dist/codex-rs/utils/string.js +3 -0
- package/dist/codex-rs/utils/string.js.map +1 -0
- package/dist/common-CTyph5x8.d.ts +40 -0
- package/dist/event-mapping-CbISdQ1D.d.ts +43 -0
- package/dist/history-CfM-4V7b.d.ts +1654 -0
- package/dist/index-77U_Oc-a.d.ts +63 -0
- package/dist/index-CoDZosq0.d.ts +261 -0
- package/dist/index.d.ts +18 -8
- package/dist/index.js +16 -2
- package/dist/lib-nXlaKiS-.d.ts +48 -0
- package/dist/live-thread-BMvlflzM.d.ts +30 -0
- package/dist/merge-B_AWVmnI.d.ts +24 -0
- package/dist/mod-DYVLSWO4.d.ts +91 -0
- package/dist/plan-mode-Cv6KWb_S.d.ts +14 -0
- package/dist/proposed-plan-DpN1ma0Y.d.ts +53 -0
- package/dist/protocol-mpBcYHrm.d.ts +1655 -0
- package/dist/react/index.d.ts +20 -53
- package/dist/react/index.js +16 -2
- package/dist/{remote-DMPfepa9.d.ts → remote-ClZbq9KN.d.ts} +3 -1
- package/dist/rendered-thread-AOxw3V5b.d.ts +29 -0
- package/dist/responses_websocket-BhxSgCzK.d.ts +183 -0
- package/dist/runtime-Cm6ml53h.d.ts +528 -0
- package/dist/server/index.d.ts +29 -1999
- package/dist/server/index.js +13 -1
- package/dist/session-BRYzi8OT.d.ts +46 -0
- package/dist/shadcn/index.d.ts +1 -1
- package/dist/{sidebar-DT2XoitN.d.ts → sidebar-DMMij22z.d.ts} +1 -1
- package/dist/spec_plan_types-CmsJ-Tfn.d.ts +260 -0
- package/dist/{store-H2cQxdpe.d.ts → store-AGRxhgQ3.d.ts} +2 -1
- package/dist/t3code/apps/web/components/chat.d.ts +508 -0
- package/dist/t3code/apps/web/components/chat.js +12 -0
- package/dist/t3code/apps/web/components/chat.js.map +1 -0
- package/dist/t3code/apps/web/index.d.ts +12 -0
- package/dist/t3code/apps/web/index.js +13 -0
- package/dist/t3code/apps/web/index.js.map +1 -0
- package/dist/testing/index.d.ts +9 -91
- package/dist/testing/index.js +13 -1
- package/dist/thread-history-builder-zW0zeqcS.d.ts +58 -0
- package/dist/thread_event_store-C0zYzukG.d.ts +77 -0
- package/dist/types-BTeabLYr.d.ts +126 -0
- package/package.json +152 -88
- package/dist/chat-runtime-CMli5dzJ.d.ts +0 -748
- package/dist/chunk-FFASNDXU.js.map +0 -1
- package/dist/chunk-TZBLUZ2X.js.map +0 -1
- package/dist/thread_event_store-BIS0qzhi.d.ts +0 -3843
|
@@ -0,0 +1,1393 @@
|
|
|
1
|
+
import { l as ThreadId, af as ThreadGoal, A as ResponseItem, x as TokenUsageInfo, ah as HookEventName, aB as ResponseInputItem, F as FunctionCallOutputContentItem, y as TruncationPolicy, az as TurnContextItem, C as CollaborationMode, j as RolloutItem, B as BaseInstructions, aC as ContentItem, aD as AgentMessageTurnItem, t as TurnItem, a4 as UserMessageTurnItem, aE as HookPromptTurnItem, D as DynamicToolSpec, h as McpToolInfo, G as ToolSpec, a0 as ConfiguredToolSpec, k as Submission, I as RateLimitSnapshot, H as TokenUsage, aF as FileChange, i as ModeKind, aG as ExecToolCallOutput, ao as RequestPermissionsResponse, aq as RequestPermissionProfile, P as PermissionProfile } from '../../protocol-mpBcYHrm.js';
|
|
2
|
+
export { L as ActivePermissionProfile, aH as AgentMessageContent, aI as AgentMessageContentDeltaEvent, aJ as AgentMessageContentDeltaEventMsg, aK as AgentMessageEvent, aL as AgentMessageEventMsg, aM as AgentPathWire, aN as AgentStatusWire, Y as ApprovalsReviewer, X as AskForApproval, aO as BASE_INSTRUCTIONS_DEFAULT, aP as ByteRange, aQ as CodexBrand, aR as CollabAgentInteractionBeginEvent, aS as CollabAgentInteractionEndEvent, aT as CollabAgentRef, aU as CollabAgentSpawnBeginEvent, aV as CollabAgentSpawnEndEvent, aW as CollabCloseBeginEvent, aX as CollabCloseEndEvent, aY as CollabResumeBeginEvent, aZ as CollabResumeEndEvent, a_ as CollabWaitingBeginEvent, a$ as CollabWaitingEndEvent, a as CollaborationModeMask, b0 as CollaborationModeSettings, b1 as CommandApprovalRequestEvent, b2 as CommandApprovalRequestEventMsg, b3 as CommandExecutionStatus, b4 as CommandExecutionTurnItem, b5 as CompactOp, ay as CompactedItem, b6 as CompactedRolloutItem, b7 as ContextCompactedEvent, b8 as ContextCompactedEventMsg, b9 as ContextCompactionTurnItem, ba as ConversationAudioParams, bb as ConversationStartParams, bc as ConversationStartTransport, bd as ConversationTextParams, be as DynamicToolCallOutputContentItem, w as DynamicToolCallRequest, bf as DynamicToolCallRequestEventMsg, bg as DynamicToolCallResponseEvent, bh as DynamicToolCallResponseEventMsg, bi as DynamicToolCallStatus, bj as DynamicToolCallTurnItem, a5 as DynamicToolResponse, bk as DynamicToolResponseOp, b as DynamicToolSpecWire, bl as ErrorEvent, bm as ErrorEventMsg, E as EventMsg, bn as EventMsgRolloutItem, bo as ExecCommandBeginEvent, bp as ExecCommandBeginEventMsg, bq as ExecCommandEndEvent, br as ExecCommandEndEventMsg, bs as ExecCommandOutputDeltaEvent, bt as ExecCommandOutputDeltaEventMsg, bu as ExecCommandStatus, bv as FileChangeApprovalRequestEvent, bw as FileChangeApprovalRequestEventMsg, bx as FileChangeTurnItem, by as FileSystemPermissions, bz as FileSystemSandboxPolicy, bA as FreeformTool, bB as FunctionCallOutputBody, z as FunctionCallOutputPayload, bC as GitInfo, an as HookCompletedEvent, bD as HookCompletedEventMsg, bE as HookExecutionMode, bF as HookHandlerType, ak as HookOutputEntry, bG as HookOutputEntryKind, bH as HookPromptFragment, aj as HookRunStatus, al as HookRunSummary, am as HookScope, ai as HookSource, bI as HookStartedEvent, bJ as HookStartedEventMsg, bK as HookTrustStatus, bL as ImageGenerationBeginEvent, bM as ImageGenerationBeginEventMsg, bN as ImageGenerationEndEvent, bO as ImageGenerationEndEventMsg, bP as ImageGenerationTurnItem, bQ as ImageViewTurnItem, bR as InterAgentCommunicationWire, bS as InterruptOp, bT as ItemCompletedEvent, bU as ItemCompletedEventMsg, bV as ItemStartedEvent, bW as ItemStartedEventMsg, bX as JsonSchema, $ as LoadableToolSpec, bY as MAX_THREAD_GOAL_OBJECTIVE_CHARS, bZ as McpInvocation, ad as McpRequestId, M as McpResourceInfo, a6 as McpResourceListParams, a7 as McpResourceListResponse, a9 as McpResourceReadParams, aa as McpResourceReadResponse, c as McpResourceTemplateInfo, a8 as McpResourceTemplateListResponse, d as McpRuntimeEnvironment, b_ as McpServerElicitationAction, ax as McpServerElicitationRequest, b$ as McpServerElicitationRequestEvent, c0 as McpServerElicitationRequestEventMsg, ae as McpServerElicitationResponse, c1 as McpServerElicitationResponseOp, c2 as McpServerOauthLoginCompletedEvent, c3 as McpServerOauthLoginCompletedEventMsg, c4 as McpServerOauthLoginParams, c5 as McpServerOauthLoginResponse, e as McpServerRefreshConfig, c6 as McpServerRegistry, c7 as McpServerStartupState, f as McpServerStatus, c8 as McpServerStatusDetail, g as McpServerStatusListOptions, c9 as McpServerStatusUpdatedEvent, ca as McpServerStatusUpdatedEventMsg, ab as McpServerToolCallParams, ac as McpServerToolCallResponse, cb as McpToolCallBeginEvent, cc as McpToolCallEndEvent, cd as McpToolCallError, ce as McpToolCallProgressEvent, cf as McpToolCallProgressEventMsg, cg as McpToolCallStatus, ch as McpToolCallTurnItem, ci as MemoryCitation, cj as MemoryCitationEntry, ck as MentionInput, cl as MessagePhase, cm as NetworkPermissions, av as NormalizedRequestUserInputArgs, cn as NormalizedRequestUserInputQuestion, O as Op, ar as OverrideTurnContextOp, co as PatchApplyStatus, cp as PatchApplyUpdatedEvent, cq as PatchApplyUpdatedEventMsg, cr as PermissionGrantScope, a1 as PermissionProfileBuiltinName, W as Personality, cs as PlanDeltaEvent, ct as PlanDeltaEventMsg, cu as PlanTurnItem, cv as PlanUpdateEventMsg, cw as REQUEST_PERMISSIONS_TOOL_NAME, cx as REQUEST_USER_INPUT_TOOL_NAME, cy as RateLimitWindow, cz as RawResponseItemEvent, cA as RawResponseItemEventMsg, cB as RealtimeAudioFrame, cC as RealtimeConversationAudioOp, cD as RealtimeConversationCloseOp, cE as RealtimeConversationClosedEvent, cF as RealtimeConversationClosedEventMsg, cG as RealtimeConversationListVoicesOp, cH as RealtimeConversationListVoicesResponseEvent, cI as RealtimeConversationListVoicesResponseEventMsg, cJ as RealtimeConversationRealtimeEvent, cK as RealtimeConversationRealtimeEventMsg, cL as RealtimeConversationSdpEvent, cM as RealtimeConversationSdpEventMsg, cN as RealtimeConversationStartOp, cO as RealtimeConversationStartedEvent, cP as RealtimeConversationStartedEventMsg, cQ as RealtimeConversationTextOp, cR as RealtimeConversationVersion, R as RealtimeEvent, cS as RealtimeHandoffRequested, cT as RealtimeInputAudioSpeechStarted, cU as RealtimeNoopRequested, cV as RealtimeOutputModality, cW as RealtimeResponseLifecycle, cX as RealtimeTranscriptDelta, cY as RealtimeTranscriptDone, cZ as RealtimeTranscriptEntry, c_ as RealtimeVoice, c$ as RealtimeVoicesList, d0 as ReasoningEffort, Q as ReasoningEffortConfig, V as ReasoningSummaryConfig, d1 as ReasoningTurnItem, aw as RequestPermissionsArgs, v as RequestPermissionsEvent, d2 as RequestPermissionsEventMsg, d3 as RequestPermissionsResponseOp, d4 as RequestUserInputAnswer, d5 as RequestUserInputArgs, u as RequestUserInputEvent, d6 as RequestUserInputEventMsg, d7 as RequestUserInputQuestion, d8 as RequestUserInputQuestionOption, ap as RequestUserInputResponse, a2 as ResponseItemWire, d9 as ResponseRolloutItem, da as ResponsesApiFunctionTool, db as ResponsesApiNamespace, dc as ResponsesApiNamespaceTool, dd as ResponsesApiTool, de as ReviewDecision, S as SandboxPolicy, N as ServiceTier, df as SessionConfiguredEvent, dg as SessionConfiguredEventMsg, dh as SessionMeta, di as SessionMetaLine, dj as SessionMetaRolloutItem, J as SessionSource, dk as SetThreadMemoryModeOp, dl as SetThreadNameOp, dm as ShutdownOp, dn as StreamOutput, dp as SubAgentSource, T as TUI_VISIBLE_COLLABORATION_MODES, dq as TerminalInteractionEvent, dr as TerminalInteractionEventMsg, K as TextElement, ag as ThreadGoalStatus, ds as ThreadGoalUpdatedEvent, dt as ThreadGoalUpdatedEventMsg, m as ThreadMemoryMode, du as ThreadMemoryModeSessionMetaValue, dv as ThreadRealtimeAppendAudioParams, dw as ThreadRealtimeAppendAudioResponse, dx as ThreadRealtimeAppendTextParams, dy as ThreadRealtimeAppendTextResponse, dz as ThreadRealtimeListVoicesParams, dA as ThreadRealtimeListVoicesResponse, dB as ThreadRealtimeStartParams, dC as ThreadRealtimeStartResponse, dD as ThreadRealtimeStopParams, dE as ThreadRealtimeStopResponse, dF as ThreadRollbackOp, dG as ThreadRolledBackEvent, dH as ThreadRolledBackEventMsg, dI as TokenCountEvent, dJ as TokenCountEventMsg, dK as TurnAbortReason, dL as TurnAbortedEvent, dM as TurnAbortedEventMsg, dN as TurnCompleteEvent, dO as TurnCompleteEventMsg, dP as TurnContextNetworkItem, dQ as TurnContextRolloutItem, _ as TurnEnvironmentSelection, dR as TurnStartedEvent, dS as TurnStartedEventMsg, dT as UpdatePlanArgs, dU as UpdatePlanStep, dV as UpdatePlanStepStatus, U as UserInput, dW as UserInputAnswerOp, as as UserInputOp, at as UserInputWithTurnContextOp, dX as UserMessageEvent, dY as UserMessageEventMsg, au as UserTurnOp, aA as W3cTraceContext, dZ as WarningEvent, d_ as WarningEventMsg, d$ as WebSearchAction, e0 as WebSearchTurnItem, Z as WindowsSandboxLevel, n as allowsRequestUserInput, o as applyCollaborationModeMask, p as asThreadId, e1 as assertValidResponsesToolSpecs, e2 as cloneRequestPermissionProfile, e3 as coalesce_loadable_tool_specs, q as collaborationModeForModel, r as collaborationModeWithUpdates, e4 as createRequestPermissionsTool, e5 as createRequestUserInputTool, e6 as create_tools_json_for_responses_api, e7 as default_namespace_description, s as deniedRequestPermissionsResponse, e8 as dynamicToolSpecFromWire, e9 as dynamicToolSpecToWire, ea as dynamic_tool_to_loadable_tool_spec, eb as dynamic_tool_to_responses_api_tool, ec as emptyRequestPermissionsResponse, ed as execToolCallOutput, ee as functionCallOutputPayloadToWire, ef as isEmptyRequestPermissionProfile, eg as mcpToolCallableName, eh as mcpToolCallableNamespace, ei as mcpToolDisplayName, ej as modeDisplayName, ek as normalizeRequestPermissionsArgs, el as normalizeRequestUserInputArgs, em as requestPermissionsToolDescription, en as requestUserInputAvailableModes, eo as requestUserInputToolDescription, ep as requestUserInputUnavailableMessage, a3 as responseInputToResponseItem, eq as streamOutput, er as threadMemoryModeToSessionMetaValue, es as toolSpecName, et as validateThreadGoalObjective } from '../../protocol-mpBcYHrm.js';
|
|
3
|
+
import { A as AgentRegistry, j as AgentStatus, k as ThreadGoalStore, l as CreateGoalRequest, m as SetGoalRequest, G as GoalRuntimeEvent, n as GoalRuntimeApplyResult, o as GoalToolOutput, p as ConfiguredHookHandler, H as HookHandlerResult, h as Session, T as TurnContext, c as ModelClient, e as ModelClientSessionHandle, g as SessionConfiguration, q as ContextManager, r as TotalTokenUsageBreakdown, s as SessionTask, t as SessionTaskResult, u as TaskKind, v as SessionTaskRunInput } from '../../history-CfM-4V7b.js';
|
|
4
|
+
export { w as ActiveTurn, x as AgentControl, y as AgentControlExecutor, z as AgentMetadata, B as AgentPath, D as AgentRoleConfig, F as AsyncManagedClient, I as CHATGPT_CODEX_RESPONSES_URL, J as CODEX_APPS_MCP_SERVER_NAME, K as CODEX_APPS_TOOLS_CACHE_DIR, L as CODEX_APPS_TOOLS_CACHE_SCHEMA_VERSION, N as CODEX_USER_AGENT, O as CachedCodexAppsToolsLoad, O as CachedCodexAppsToolsLoadResult, P as CodexAppsToolsCacheContext, Q as CodexAppsToolsCacheKey, R as CodexAppsToolsCacheStorage, U as CodexAuthLike, V as CodexMcpAuthLike, W as CodexMcpConnectionManager, C as CodexMcpConnectionManagerAdapter, X as CodexMcpConnectionManagerAdapterOptions, Y as CompactHookRequest, Z as CreateElicitationRequestParams, a as CreateModelClientInput, _ as DEFAULT_ROLE_NAME, $ as DEFAULT_STARTUP_TIMEOUT, a0 as DEFAULT_TOOL_TIMEOUT, a1 as ElicitationAction, a2 as ElicitationEventSink, a3 as ElicitationRequestEvent, a4 as ElicitationRequestManager, a5 as ElicitationResponse, a6 as ElicitationReviewRequest, a7 as ElicitationReviewer, a8 as ElicitationReviewerHandle, E as EmptyMcpConnectionManager, b as Event, a9 as GoalSteeringItem, aa as GoalTurnAccountingSnapshot, ab as HOOK_EVENT_NAMES, ac as HOOK_EVENT_NAMES_WITH_MATCHERS, ad as HookRuntimeOutcome, ae as Hooks, af as InMemoryCodexAppsToolsCacheStorage, ag as InterAgentCommunication, ah as ListedAgent, ai as LiveAgent, aj as MCP_SANDBOX_STATE_META_CAPABILITY, ak as MCP_TOOLS_FETCH_UNCACHED_DURATION_METRIC, al as MCP_TOOLS_LIST_DURATION_METRIC, am as MCP_TOOL_NAME_DELIMITER, an as MCP_TOOL_NAME_PREFIX, ao as Mailbox, ap as MailboxDeliveryPhase, aq as MailboxReceiver, ar as ManagedClient, as as ManagedClientInput, at as McpAuthStatus, au as McpAuthStatusEntry, av as McpCancellationToken, aw as McpClientFactoryOptions, ax as McpClientRuntimeEnvironment, M as McpConnectionManager, ay as McpJsonRpcMessage, az as McpJsonRpcTransport, aA as McpOAuthLoginConfig, aB as McpOAuthLoginSupport, aB as McpOAuthLoginSupportResult, aC as McpOAuthScopesSource, aD as McpServerConfig, aE as McpServerTransportConfig, aF as McpStartupFailure, aG as McpTransportServerConfig, d as ModelClientSession, aH as OAuthProviderError, aI as OPENAI_BETA_HEADER, aJ as PendingDynamicTool, aK as PendingMcpElicitation, aL as PendingRequestPermissions, aM as PendingUserInput, aN as PermissionRequestDecision, aO as PermissionRequestOutcome, aP as PermissionRequestRequest, aQ as PostToolUseOutcome, aR as PostToolUseRequest, aS as PreToolUseOutcome, aT as PreToolUseRequest, aU as QualifiedToolInfo, aV as RESPONSES_WEBSOCKETS_V2_BETA_HEADER_VALUE, aW as RemovedTask, aX as ResolvedMcpOAuthScopes, aY as RmcpClientLike, aZ as RmcpJsonRpcClient, a_ as RmcpListToolsResult, a$ as RmcpRawTool, b0 as RunningTask, b1 as RunningTaskPlaceholder, b2 as SendElicitation, b3 as SessionConfigurationFromConfigOptions, b4 as SessionParams, b5 as SessionSettingsUpdate, b6 as SessionSettingsUpdateError, b7 as SessionStartRequest, b8 as SessionTaskContext, b9 as SpawnAgentForkMode, ba as SpawnAgentOptions, bb as SpawnReservation, bc as StartupOutcomeError, S as StaticMcpConnectionManager, bd as StaticMcpConnectionManagerOptions, be as StdioServerLauncher, bf as SteerInputError, i as SteerInputErrorKind, bg as StreamableHttpMcpTransport, bh as StreamableHttpOAuthDiscovery, bi as ThreadGoalAccountingMode, bj as ThreadGoalAccountingOutcome, bk as ThreadGoalUpdate, bl as ToolFilter, bm as ToolInfo, bn as ToolPluginProvenance, bo as TurnContextParams, bp as TurnState, bq as TurnTimingSnapshot, br as TurnTimingState, bs as UnsupportedStdioServerLauncher, bt as UserPromptSubmitRequest, bu as X_CODEX_INSTALLATION_ID_HEADER, bv as X_CODEX_PARENT_THREAD_ID_HEADER, bw as X_CODEX_TURN_METADATA_HEADER, bx as X_CODEX_TURN_STATE_HEADER, by as X_CODEX_WINDOW_ID_HEADER, bz as X_OPENAI_SUBAGENT_HEADER, bA as X_RESPONSESAPI_INCLUDE_TIMING_METRICS_HEADER, bB as applySessionSettingsUpdate, bC as builtin_agent_roles, bD as can_auto_accept_elicitation, bE as codex_apps_tools_cache_key, bF as completedHookRunSummary, bG as compute_auth_status, bH as compute_auth_statuses, f as createModelClient, bI as declared_openai_file_input_param_names, bJ as defaultSessionConfiguration, bK as default_agent_nickname_list, bL as discover_streamable_http_oauth, bM as discover_supported_scopes, bN as discovery_paths, bO as dropLastNUserTurns, bP as elicitation_capability_for_server, bQ as elicitation_is_rejected_by_policy, bR as emptyTokenUsage, bS as estimate_item_token_count, bT as estimate_response_item_model_visible_bytes, bU as exceeds_thread_spawn_depth_limit, bV as filter_disallowed_codex_apps_tools, bW as filter_non_codex_apps_mcp_tools_only, bX as filter_tools, bY as hookAdditionalContextResponseItem, bZ as hookRunId, b_ as isApiMessage, b$ as isUserTurnBoundary, c0 as is_connector_id_allowed, c1 as is_mcp_client_auth_required_error, c2 as is_mcp_client_startup_timeout_error, c3 as keep_forked_rollout_item, c4 as list_tools_for_client_uncached, c5 as load_cached_codex_apps_tools, c6 as load_startup_cached_codex_apps_tools_snapshot, c7 as make_rmcp_client, c8 as mcp_init_error_display, c9 as mcp_permission_prompt_is_auto_approved, ca as next_thread_spawn_depth, cb as normalize_codex_apps_callable_name, cc as normalize_codex_apps_callable_namespace, cd as normalize_codex_apps_tool_title, ce as normalize_mcp_server_config, cf as normalize_mcp_server_configs, cg as oauth_login_support, ch as processResponseItemForPrompt, ci as qualified_mcp_tool_name_prefix, cj as qualify_tool_infos, ck as qualify_tools, cl as read_cached_codex_apps_tools, cm as record_additional_contexts, cn as requestPermissionsResponseFromDecision, co as resolve_oauth_scopes, cp as resolve_role_config, cq as resolve_session_base_instructions, cr as run_permission_request_hooks, cs as run_post_compact_hooks, ct as run_post_tool_use_hooks, cu as run_pre_compact_hooks, cv as run_pre_tool_use_hooks, cw as run_session_start_hooks, cx as run_stop_hooks, cy as run_user_prompt_submit_hooks, cz as runningHookRunSummary, cA as sanitize_name, cB as sanitize_responses_api_tool_name, cC as scopeForHookEvent, cD as sessionConfigurationActivePermissionProfile, cE as sessionConfigurationPermissionProfile, cF as sessionConfigurationSandboxPolicy, cG as sessionSettingsUpdateFromOverrideTurnContext, cH as sessionSettingsUpdateFromUserInput, cI as sessionSettingsUpdateFromUserInputWithTurnContext, cJ as sessionSettingsUpdateFromUserTurn, cK as session_configuration_from_config, cL as should_retry_without_scopes, cM as start_server_task, cN as startup_outcome_error_message, cO as tool_with_model_visible_input_schema, cP as transport_origin, cQ as truncate_function_output_payload, cR as turn_context_from_config, cS as validate_mcp_server_name, cT as write_cached_codex_apps_tools, cU as write_cached_codex_apps_tools_if_needed } from '../../history-CfM-4V7b.js';
|
|
5
|
+
import { n as ProviderCapabilities } from '../../index-CoDZosq0.js';
|
|
6
|
+
export { A as AuthDotJson, a as AuthMode, o as CHATGPT_CODEX_BASE_URL, p as CHATGPT_CODEX_PROVIDER_ID, q as CHATGPT_CODEX_PROVIDER_NAME, C as CODEX_CHATGPT_OAUTH_CALLBACK_PATH, b as CODEX_CHATGPT_OAUTH_CLIENT_ID, c as CODEX_CHATGPT_OAUTH_FALLBACK_PORT, d as CODEX_CHATGPT_OAUTH_ISSUER, e as CODEX_CHATGPT_OAUTH_ORIGINATOR, f as CODEX_CHATGPT_OAUTH_PRIMARY_PORT, g as CODEX_CHATGPT_OAUTH_SCOPE, r as ChatgptOAuthTokenExchangeRequest, h as ChatgptOAuthTokenExchangeResponse, i as CodexAuth, s as ConfiguredModelProvider, G as GetAccountResponse, M as Model, l as ModelInfo, t as ModelInstructionsVariables, u as ModelListParams, v as ModelListResponse, w as ModelMessages, j as ModelPreset, m as ModelProvider, x as ModelProviderAuthInfo, y as ModelProviderAwsAuthInfo, z as ModelProviderInfo, B as ModelServiceTier, D as ModelsManager, O as OPENAI_PROVIDER_ID, E as OPENAI_PROVIDER_NAME, F as OPENAI_RESPONSES_BASE_URL, H as PlanType, I as ProviderAccount, P as ProviderAccountState, k as ProviderRuntimeConfig, R as ReasoningEffortOption, J as RefreshStrategy, S as StaticModelsManager, T as TokenData, W as WireApi, K as apiKeyProviderAccountState, L as authDotJsonToBearerToken, N as authDotJsonToOpenAiApiKey, Q as autoCompactTokenLimit, U as chatgptAuthFromAuthDotJson, V as codexAuthToAccountState, X as createChatgptCodexModelProviderInfo, Y as createModelProvider, Z as createOpenAiModelProviderInfo, _ as defaultCodexModelInfo, $ as defaultCodexModels, a0 as defaultModelProviderAccountState, a1 as defaultModelsManager, a2 as defaultProviderCapabilities, a3 as effectiveContextWindow, a4 as get_model_instructions, a5 as isReasoningEffortSupported, a6 as listDefaultCodexModels, a7 as modelInfoFromSlug, a8 as modelInfoToPreset, a9 as normalizePlanType, aa as openAiAuthClaims, ab as parseJwtPayload, ac as providerRuntimeConfig, ad as resolveReasoningEffortForModel, ae as resolvedAuthMode, af as resolvedContextWindow, ag as validateModelProviderInfo } from '../../index-CoDZosq0.js';
|
|
7
|
+
export { C as CODEX_PLAN_MODE_INSTRUCTIONS, b as builtinCollaborationModePresets, c as collaborationModePresetForMode, d as defaultModeInstructions, n as normalizeCollaborationMode } from '../../plan-mode-Cv6KWb_S.js';
|
|
8
|
+
export { AgentRole, AgentRoles, BUILT_IN_DANGER_NO_SANDBOX_PROFILE, BUILT_IN_READ_ONLY_PROFILE, BUILT_IN_WORKSPACE_PROFILE, ManagedFeature, ManagedFeatures, NetworkProxySpec, activePermissionProfileForBuiltin, active_permission_profile, builtinPermissionProfile, builtinPermissionProfileNameFromProfile, defaultBuiltinPermissionProfileName, defaultNetworkProxySpec, disabledPermissionProfile, effectivePermissionProfile, emptyManagedFeatures, legacySandboxPolicyFromPermissionProfile, permissionProfileFromLegacySandboxPolicy, readOnlyPermissionProfile, tools_config_from_config, validatePermissionProfile, workspaceWritePermissionProfile } from './config/index.js';
|
|
9
|
+
export { A as ApplyEventOptions, R as RenderedThreadConnectionStatus, a as RenderedThreadState, b as applyEventMsgToRenderedThread, d as applyRolloutItemToRenderedThread, c as createRenderedThreadState, f as fingerprintRolloutItems, r as renderThreadFromHistory, s as setRenderedThreadConnectionStatus } from '../../rendered-thread-AOxw3V5b.js';
|
|
10
|
+
import { l as ToolNameInput, m as ToolName, n as DiscoverableTool, k as ToolsConfig, o as ToolSearchEntry, p as ToolSearchSourceInfo, f as WebSearchMode, W as WebSearchConfig, q as WebSearchToolType, r as ToolRegistryPlanParams, s as ToolRegistryPlan } from '../../spec_plan_types-CmsJ-Tfn.js';
|
|
11
|
+
export { D as DefaultToolsConfigInput, t as TOOL_SEARCH_DEFAULT_LIMIT, u as TOOL_SEARCH_TOOL_NAME, v as ToolHandlerKind, w as ToolHandlerSpec, x as build_tool_search_entries, y as build_tool_search_entries_for_config, z as createToolRegistryPlan, A as defaultToolsConfig, B as dynamic_tool_to_tool_search_entry, E as mcp_tool_to_tool_search_entry, G as tool_search_outputs, H as tool_search_source_info_for_dynamic_tools, I as tool_search_source_info_for_mcp_tools } from '../../spec_plan_types-CmsJ-Tfn.js';
|
|
12
|
+
export { L as LiveThread, a as LiveThreadInitGuard } from '../../live-thread-BMvlflzM.js';
|
|
13
|
+
export { T as ThreadStore } from '../../store-AGRxhgQ3.js';
|
|
14
|
+
export { A as AppendThreadItemsParams, a as ArchiveThreadParams, C as CreateThreadParams, G as GitInfoPatch, L as ListThreadsParams, b as LoadThreadHistoryParams, O as OptionalStringPatch, R as ReadThreadByRolloutPathParams, c as ReadThreadParams, d as ResumeThreadParams, S as SortDirection, e as StoredThread, f as StoredThreadHistory, T as ThreadEventPersistenceMode, g as ThreadMetadataPatch, h as ThreadPage, i as ThreadPersistenceMetadata, j as ThreadSortKey, U as UpdateThreadMetadataParams } from '../../types-BTeabLYr.js';
|
|
15
|
+
export { P as PendingTurn, T as ThreadHistoryBuilder, a as Turn, b as TurnError, c as TurnItemsView, d as TurnStatus, e as appendCompactionTurnToTurns, f as applyEventToThreadHistoryBuilder, g as applyEventToTurns, h as applyResponseItemToTurns, i as buildTurnsFromRolloutItems, j as flattenTurnsToTurnItems } from '../../thread-history-builder-zW0zeqcS.js';
|
|
16
|
+
export { P as Prompt, R as ResponseCreateWsRequest, a as ResponseEvent, b as ResponseProcessedWsRequest, c as ResponseStream, d as ResponsesApiRequest, e as ResponsesClient, f as ResponsesClientInput, j as ResponsesOptions, g as ResponsesWebsocketClient, k as ResponsesWebsocketClientInput, h as ResponsesWebsocketConnection, i as ResponsesWsRequest } from '../../responses_websocket-BhxSgCzK.js';
|
|
17
|
+
export { l as resolve_web_search_mode_for_turn } from '../../merge-B_AWVmnI.js';
|
|
18
|
+
import '../../WebSearchToolConfig-D3ep0625.js';
|
|
19
|
+
|
|
20
|
+
declare const MCP_TOOL_CODEX_APPS_META_KEY = "_codex_apps";
|
|
21
|
+
declare const CONNECTOR_AUTH_FAILURE_META_KEY = "connector_auth_failure";
|
|
22
|
+
declare const CONNECTOR_AUTH_FAILURE_IS_AUTH_FAILURE_KEY = "is_auth_failure";
|
|
23
|
+
declare const CONNECTOR_AUTH_FAILURE_AUTH_REASON_KEY = "auth_reason";
|
|
24
|
+
declare const CONNECTOR_AUTH_FAILURE_CONNECTOR_ID_KEY = "connector_id";
|
|
25
|
+
declare const CONNECTOR_AUTH_FAILURE_LINK_ID_KEY = "link_id";
|
|
26
|
+
declare const CONNECTOR_AUTH_FAILURE_ERROR_CODE_KEY = "error_code";
|
|
27
|
+
declare const CONNECTOR_AUTH_FAILURE_ERROR_HTTP_STATUS_CODE_KEY = "error_http_status_code";
|
|
28
|
+
declare const CONNECTOR_AUTH_FAILURE_ERROR_ACTION_KEY = "error_action";
|
|
29
|
+
type CallToolResult = {
|
|
30
|
+
content?: unknown[];
|
|
31
|
+
structured_content?: unknown;
|
|
32
|
+
is_error?: boolean | null;
|
|
33
|
+
meta?: unknown;
|
|
34
|
+
};
|
|
35
|
+
type CodexAppsConnectorAuthFailure = {
|
|
36
|
+
connector_id: string;
|
|
37
|
+
connector_name: string;
|
|
38
|
+
install_url: string;
|
|
39
|
+
auth_reason?: string | null;
|
|
40
|
+
link_id?: string | null;
|
|
41
|
+
error_code?: string | null;
|
|
42
|
+
error_http_status_code?: number | null;
|
|
43
|
+
error_action?: string | null;
|
|
44
|
+
};
|
|
45
|
+
type CodexAppsAuthElicitation = {
|
|
46
|
+
meta: unknown;
|
|
47
|
+
message: string;
|
|
48
|
+
url: string;
|
|
49
|
+
elicitation_id: string;
|
|
50
|
+
};
|
|
51
|
+
type CodexAppsAuthElicitationPlan = {
|
|
52
|
+
auth_failure: CodexAppsConnectorAuthFailure;
|
|
53
|
+
elicitation: CodexAppsAuthElicitation;
|
|
54
|
+
};
|
|
55
|
+
declare function connector_auth_failure_from_tool_result(result: CallToolResult, connector_id?: string | null, connector_name?: string | null, install_url?: string | null): CodexAppsConnectorAuthFailure | null;
|
|
56
|
+
declare function build_auth_elicitation_plan(call_id: string, result: CallToolResult, connector_id?: string | null, connector_name?: string | null, install_url?: string | null): CodexAppsAuthElicitationPlan | null;
|
|
57
|
+
declare function build_auth_elicitation(call_id: string, auth_failure: CodexAppsConnectorAuthFailure): CodexAppsAuthElicitation;
|
|
58
|
+
declare function auth_elicitation_completed_result(auth_failure: CodexAppsConnectorAuthFailure, meta?: unknown): CallToolResult;
|
|
59
|
+
declare function auth_elicitation_id(call_id: string): string;
|
|
60
|
+
declare function auth_elicitation_message(auth_failure: CodexAppsConnectorAuthFailure): string;
|
|
61
|
+
|
|
62
|
+
declare function resolve_agent_target(registry: AgentRegistry, target: string): ThreadId | null;
|
|
63
|
+
|
|
64
|
+
declare function is_final(status: AgentStatus): boolean;
|
|
65
|
+
declare function agent_status_from_event(event: unknown): AgentStatus;
|
|
66
|
+
|
|
67
|
+
declare class GoalRuntimeState {
|
|
68
|
+
private readonly params;
|
|
69
|
+
private readonly turn_snapshots;
|
|
70
|
+
private budget_limit_reported_goal_id;
|
|
71
|
+
constructor(params: {
|
|
72
|
+
thread_id: ThreadId;
|
|
73
|
+
store?: ThreadGoalStore | null;
|
|
74
|
+
now?: () => number;
|
|
75
|
+
});
|
|
76
|
+
get_thread_goal(): Promise<ThreadGoal | null>;
|
|
77
|
+
create_thread_goal(request: CreateGoalRequest): Promise<ThreadGoal>;
|
|
78
|
+
set_thread_goal(request: SetGoalRequest): Promise<ThreadGoal>;
|
|
79
|
+
update_thread_goal_complete(): Promise<ThreadGoal>;
|
|
80
|
+
clear_thread_goal(): Promise<void>;
|
|
81
|
+
apply(event: GoalRuntimeEvent): Promise<GoalRuntimeApplyResult>;
|
|
82
|
+
budget_limit_steering_items(): Promise<ResponseItem[]>;
|
|
83
|
+
format_tool_output(goal: ThreadGoal | null): GoalToolOutput;
|
|
84
|
+
private mark_thread_goal_turn_started;
|
|
85
|
+
private finish_thread_goal_turn;
|
|
86
|
+
private handle_thread_goal_task_abort;
|
|
87
|
+
private account_thread_goal_progress;
|
|
88
|
+
private require_store;
|
|
89
|
+
private now;
|
|
90
|
+
}
|
|
91
|
+
declare function totalTokensFromTokenUsageInfo(info: TokenUsageInfo | null): number;
|
|
92
|
+
declare function goalToolOutput(goal: ThreadGoal | null): GoalToolOutput;
|
|
93
|
+
declare function remainingTokenBudget(goal: ThreadGoal | null): number | null;
|
|
94
|
+
declare function budget_limit_prompt(goal: ThreadGoal): string;
|
|
95
|
+
declare function budget_limit_steering_item(goal: ThreadGoal): ResponseItem;
|
|
96
|
+
|
|
97
|
+
declare function select_handlers(handlers: readonly ConfiguredHookHandler[], eventName: HookEventName, matcherInput?: string | null): ConfiguredHookHandler[];
|
|
98
|
+
declare function select_handlers_for_matcher_inputs(handlers: readonly ConfiguredHookHandler[], eventName: HookEventName, matcherInputs: readonly string[]): ConfiguredHookHandler[];
|
|
99
|
+
declare function matches_matcher(matcher: string | null | undefined, input: string | null): boolean;
|
|
100
|
+
declare function matcher_inputs(toolName: string, matcherAliases?: readonly string[]): string[];
|
|
101
|
+
|
|
102
|
+
type UniversalHookOutput = {
|
|
103
|
+
continue_processing?: boolean;
|
|
104
|
+
stop_reason?: string | null;
|
|
105
|
+
suppress_output?: boolean;
|
|
106
|
+
system_message?: string | null;
|
|
107
|
+
};
|
|
108
|
+
declare function looks_like_json(text: string): boolean;
|
|
109
|
+
declare function parse_hook_handler_json(stdout: string): HookHandlerResult | null;
|
|
110
|
+
|
|
111
|
+
declare const ToolKind: {
|
|
112
|
+
readonly Function: "Function";
|
|
113
|
+
readonly Mcp: "Mcp";
|
|
114
|
+
};
|
|
115
|
+
type ToolKind = (typeof ToolKind)[keyof typeof ToolKind];
|
|
116
|
+
type SearchToolCallParams = {
|
|
117
|
+
query?: string;
|
|
118
|
+
limit?: number;
|
|
119
|
+
[key: string]: unknown;
|
|
120
|
+
};
|
|
121
|
+
type ShellToolCallParams = {
|
|
122
|
+
command?: string[];
|
|
123
|
+
workdir?: string | null;
|
|
124
|
+
timeout_ms?: number | null;
|
|
125
|
+
sandbox_permissions?: unknown;
|
|
126
|
+
prefix_rule?: string[] | null;
|
|
127
|
+
justification?: string | null;
|
|
128
|
+
[key: string]: unknown;
|
|
129
|
+
};
|
|
130
|
+
type ToolPayload = {
|
|
131
|
+
type: "function";
|
|
132
|
+
arguments: string;
|
|
133
|
+
} | {
|
|
134
|
+
type: "tool_search";
|
|
135
|
+
arguments: SearchToolCallParams;
|
|
136
|
+
} | {
|
|
137
|
+
type: "custom";
|
|
138
|
+
input: string;
|
|
139
|
+
} | {
|
|
140
|
+
type: "local_shell";
|
|
141
|
+
params: ShellToolCallParams;
|
|
142
|
+
} | {
|
|
143
|
+
type: "mcp";
|
|
144
|
+
server: string;
|
|
145
|
+
tool: string;
|
|
146
|
+
raw_arguments: string;
|
|
147
|
+
};
|
|
148
|
+
declare function logPayload(payload: ToolPayload): string;
|
|
149
|
+
type ToolCallSource = {
|
|
150
|
+
type: "direct";
|
|
151
|
+
} | {
|
|
152
|
+
type: "code_mode";
|
|
153
|
+
cell_id: string;
|
|
154
|
+
runtime_tool_call_id: string;
|
|
155
|
+
};
|
|
156
|
+
type ToolInvocation = {
|
|
157
|
+
session: Session;
|
|
158
|
+
turn: TurnContext;
|
|
159
|
+
cancellation_token: CancellationToken;
|
|
160
|
+
call_id: string;
|
|
161
|
+
tool_name: ToolNameInput;
|
|
162
|
+
source: ToolCallSource;
|
|
163
|
+
payload: ToolPayload;
|
|
164
|
+
};
|
|
165
|
+
declare class CancellationToken {
|
|
166
|
+
readonly signal?: AbortSignal | undefined;
|
|
167
|
+
constructor(signal?: AbortSignal | undefined);
|
|
168
|
+
is_cancelled(): boolean;
|
|
169
|
+
cancelled(): Promise<void>;
|
|
170
|
+
}
|
|
171
|
+
type PreToolUsePayload = {
|
|
172
|
+
tool_name: string;
|
|
173
|
+
tool_input: unknown;
|
|
174
|
+
};
|
|
175
|
+
type PostToolUsePayload = {
|
|
176
|
+
tool_name: string;
|
|
177
|
+
tool_use_id: string;
|
|
178
|
+
tool_input: unknown;
|
|
179
|
+
tool_response: unknown;
|
|
180
|
+
};
|
|
181
|
+
interface ToolArgumentDiffConsumer {
|
|
182
|
+
consumeDiff(turn: TurnContext, callId: string, diff: string): unknown | null;
|
|
183
|
+
finish?(): unknown | null;
|
|
184
|
+
}
|
|
185
|
+
interface ToolOutput {
|
|
186
|
+
logPreview(): string;
|
|
187
|
+
successForLogging(): boolean;
|
|
188
|
+
toResponseItem(callId: string, payload: ToolPayload): ResponseInputItem;
|
|
189
|
+
postToolUseResponse(callId: string, payload: ToolPayload): unknown | null;
|
|
190
|
+
codeModeResult(payload: ToolPayload): unknown;
|
|
191
|
+
}
|
|
192
|
+
declare class FunctionToolOutput implements ToolOutput {
|
|
193
|
+
readonly body: FunctionCallOutputContentItem[];
|
|
194
|
+
readonly success?: boolean | null | undefined;
|
|
195
|
+
readonly post_tool_use_response: unknown | null;
|
|
196
|
+
constructor(body: FunctionCallOutputContentItem[], success?: boolean | null | undefined, post_tool_use_response?: unknown | null);
|
|
197
|
+
static fromText(text: string, success?: boolean | null): FunctionToolOutput;
|
|
198
|
+
static fromContent(content: FunctionCallOutputContentItem[], success?: boolean | null): FunctionToolOutput;
|
|
199
|
+
intoText(): string;
|
|
200
|
+
logPreview(): string;
|
|
201
|
+
successForLogging(): boolean;
|
|
202
|
+
toResponseItem(callId: string, payload: ToolPayload): ResponseInputItem;
|
|
203
|
+
postToolUseResponse(): unknown | null;
|
|
204
|
+
codeModeResult(): unknown;
|
|
205
|
+
}
|
|
206
|
+
declare class McpToolOutput implements ToolOutput {
|
|
207
|
+
readonly result: unknown;
|
|
208
|
+
readonly tool_input: unknown;
|
|
209
|
+
readonly wall_time_ms: number;
|
|
210
|
+
readonly original_image_detail_supported: boolean;
|
|
211
|
+
readonly truncation_policy?: (TruncationPolicy | null) | undefined;
|
|
212
|
+
constructor(result: unknown, tool_input: unknown, wall_time_ms: number, original_image_detail_supported: boolean, truncation_policy?: (TruncationPolicy | null) | undefined);
|
|
213
|
+
logPreview(): string;
|
|
214
|
+
successForLogging(): boolean;
|
|
215
|
+
toResponseItem(callId: string): ResponseInputItem;
|
|
216
|
+
postToolUseResponse(): unknown | null;
|
|
217
|
+
codeModeResult(): unknown;
|
|
218
|
+
private response_payload;
|
|
219
|
+
}
|
|
220
|
+
interface ToolHandler<TOutput extends ToolOutput = ToolOutput> {
|
|
221
|
+
toolName(): ToolNameInput;
|
|
222
|
+
kind(): ToolKind;
|
|
223
|
+
matchesKind?(payload: ToolPayload): boolean;
|
|
224
|
+
isMutating?(invocation: ToolInvocation): Promise<boolean>;
|
|
225
|
+
preToolUsePayload?(invocation: ToolInvocation): PreToolUsePayload | null;
|
|
226
|
+
postToolUsePayload?(invocation: ToolInvocation, result: TOutput): PostToolUsePayload | null;
|
|
227
|
+
createDiffConsumer?(): ToolArgumentDiffConsumer | null;
|
|
228
|
+
handle(invocation: ToolInvocation): Promise<TOutput>;
|
|
229
|
+
}
|
|
230
|
+
declare function matchesToolKind(kind: ToolKind, payload: ToolPayload): boolean;
|
|
231
|
+
declare class AnyToolResult {
|
|
232
|
+
readonly call_id: string;
|
|
233
|
+
readonly payload: ToolPayload;
|
|
234
|
+
readonly result: ToolOutput;
|
|
235
|
+
readonly post_tool_use_payload: PostToolUsePayload | null;
|
|
236
|
+
constructor(call_id: string, payload: ToolPayload, result: ToolOutput, post_tool_use_payload: PostToolUsePayload | null);
|
|
237
|
+
intoResponse(): ResponseInputItem;
|
|
238
|
+
codeModeResult(): unknown;
|
|
239
|
+
}
|
|
240
|
+
declare const FunctionCallErrorKind: {
|
|
241
|
+
readonly RespondToModel: "respond_to_model";
|
|
242
|
+
readonly Fatal: "fatal";
|
|
243
|
+
};
|
|
244
|
+
type FunctionCallErrorKind = (typeof FunctionCallErrorKind)[keyof typeof FunctionCallErrorKind];
|
|
245
|
+
declare class FunctionCallError extends Error {
|
|
246
|
+
readonly kind: FunctionCallErrorKind;
|
|
247
|
+
private constructor();
|
|
248
|
+
static respondToModel(message: string): FunctionCallError;
|
|
249
|
+
static fatal(message: string): FunctionCallError;
|
|
250
|
+
}
|
|
251
|
+
declare class ToolRegistry {
|
|
252
|
+
private readonly handlers;
|
|
253
|
+
private constructor();
|
|
254
|
+
static emptyForTest(): ToolRegistry;
|
|
255
|
+
static withHandlerForTest(handler: ToolHandler): ToolRegistry;
|
|
256
|
+
static fromHandlersForBuilder(handlers: Map<string, ToolHandler>): ToolRegistry;
|
|
257
|
+
hasHandler(name: ToolNameInput): boolean;
|
|
258
|
+
createDiffConsumer(name: ToolNameInput): ToolArgumentDiffConsumer | null;
|
|
259
|
+
dispatchAny(invocation: ToolInvocation): Promise<AnyToolResult>;
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
declare const SUMMARIZATION_PROMPT: string;
|
|
263
|
+
declare const SUMMARY_PREFIX: string;
|
|
264
|
+
declare function compactedThreadWarning(): string;
|
|
265
|
+
declare function contentItemsToText(content: readonly ResponseItemMessageContent[]): string | null;
|
|
266
|
+
declare function collectUserMessages(items: readonly ResponseItem[]): string[];
|
|
267
|
+
declare function isSummaryMessage(message: string): boolean;
|
|
268
|
+
declare function buildCompactedHistory(initialContext: ResponseItem[], userMessages: readonly string[], summaryText: string): ResponseItem[];
|
|
269
|
+
type ResponseItemMessageContent = Extract<ResponseItem, {
|
|
270
|
+
type: "message";
|
|
271
|
+
}>["content"][number];
|
|
272
|
+
|
|
273
|
+
type ContextualUserFragmentParams = {
|
|
274
|
+
role: string;
|
|
275
|
+
start_marker: string;
|
|
276
|
+
end_marker: string;
|
|
277
|
+
body: () => string;
|
|
278
|
+
};
|
|
279
|
+
declare class ContextualUserFragment {
|
|
280
|
+
readonly role: string;
|
|
281
|
+
readonly start_marker: string;
|
|
282
|
+
readonly end_marker: string;
|
|
283
|
+
private readonly bodyFn;
|
|
284
|
+
constructor(params: ContextualUserFragmentParams);
|
|
285
|
+
body(): string;
|
|
286
|
+
matchesText(text: string): boolean;
|
|
287
|
+
render(): string;
|
|
288
|
+
toResponseItem(): ResponseItem;
|
|
289
|
+
}
|
|
290
|
+
declare function contextualFragmentMatchesText(text: string, markers: {
|
|
291
|
+
start_marker: string;
|
|
292
|
+
end_marker: string;
|
|
293
|
+
}): boolean;
|
|
294
|
+
|
|
295
|
+
declare const ENVIRONMENT_CONTEXT_OPEN_TAG = "<environment_context>";
|
|
296
|
+
declare const ENVIRONMENT_CONTEXT_CLOSE_TAG = "</environment_context>";
|
|
297
|
+
type EnvironmentContextEnvironment = {
|
|
298
|
+
id?: string;
|
|
299
|
+
cwd: string;
|
|
300
|
+
shell: string;
|
|
301
|
+
};
|
|
302
|
+
type NetworkContext = {
|
|
303
|
+
allowed_domains: string[];
|
|
304
|
+
denied_domains: string[];
|
|
305
|
+
};
|
|
306
|
+
declare class EnvironmentContext extends ContextualUserFragment {
|
|
307
|
+
constructor(params: {
|
|
308
|
+
environments: EnvironmentContextEnvironment[];
|
|
309
|
+
current_date?: string | null;
|
|
310
|
+
timezone?: string | null;
|
|
311
|
+
network?: NetworkContext | null;
|
|
312
|
+
});
|
|
313
|
+
static fromTurnContext(turnContext: TurnContext): EnvironmentContext;
|
|
314
|
+
static fromTurnContextItem(item: TurnContextItem): EnvironmentContext;
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
declare class CollaborationModeInstructions {
|
|
318
|
+
private readonly instructions;
|
|
319
|
+
private constructor();
|
|
320
|
+
static fromCollaborationMode(collaborationMode: CollaborationMode | null): CollaborationModeInstructions | null;
|
|
321
|
+
toResponseItem(): ResponseItem;
|
|
322
|
+
toText(): string;
|
|
323
|
+
private toFragment;
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
type PreviousTurnSettings = {
|
|
327
|
+
model?: string | null;
|
|
328
|
+
realtime_active?: boolean | null;
|
|
329
|
+
};
|
|
330
|
+
type RolloutReconstruction = {
|
|
331
|
+
history: ResponseItem[];
|
|
332
|
+
previous_turn_settings: PreviousTurnSettings | null;
|
|
333
|
+
reference_context_item: TurnContextItem | null;
|
|
334
|
+
};
|
|
335
|
+
declare function reconstructHistoryFromRollout(rolloutItems: RolloutItem[]): RolloutReconstruction;
|
|
336
|
+
|
|
337
|
+
declare class ModelSwitchInstructions extends ContextualUserFragment {
|
|
338
|
+
constructor(text: string);
|
|
339
|
+
}
|
|
340
|
+
declare function buildInitialContextItems(turnContext: TurnContext): ResponseItem[];
|
|
341
|
+
declare function buildSettingsUpdateItems(previous: TurnContextItem | null | undefined, previousTurnSettings: PreviousTurnSettings | null | undefined, next: TurnContext): ResponseItem[];
|
|
342
|
+
declare function buildModelInstructionsUpdateItem(previousTurnSettings: PreviousTurnSettings | null | undefined, next: TurnContext): string | null;
|
|
343
|
+
|
|
344
|
+
declare class PermissionsInstructions extends ContextualUserFragment {
|
|
345
|
+
constructor(text: string);
|
|
346
|
+
static fromTurnContext(turnContext: TurnContext, options?: {
|
|
347
|
+
request_permissions_tool_enabled?: boolean;
|
|
348
|
+
}): PermissionsInstructions;
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
declare function buildPromptBaseInstructions(turnContext: TurnContext): BaseInstructions;
|
|
352
|
+
declare function buildPromptInputWithContext(input: ResponseItem[], turnContext: TurnContext): ResponseItem[];
|
|
353
|
+
declare function buildCollaborationModeInstructions(turnContext: TurnContext): ResponseItem | null;
|
|
354
|
+
|
|
355
|
+
declare const TURN_ABORTED_INTERRUPTED_GUIDANCE = "The user interrupted the previous turn on purpose. Any running unified exec processes may still be running in the background. If any tools/commands were aborted, they may have partially executed.";
|
|
356
|
+
declare function turnAbortedResponseItem(guidance?: string): ResponseItem;
|
|
357
|
+
|
|
358
|
+
declare class UserInstructions extends ContextualUserFragment {
|
|
359
|
+
constructor(params: {
|
|
360
|
+
directory: string;
|
|
361
|
+
text: string;
|
|
362
|
+
});
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
declare function ensureCallOutputsPresent(items: ResponseItem[]): ResponseItem[];
|
|
366
|
+
declare function removeOrphanOutputs(items: ResponseItem[]): ResponseItem[];
|
|
367
|
+
declare function removeCorrespondingFor(items: ResponseItem[], item: ResponseItem): ResponseItem[];
|
|
368
|
+
declare function normalizeResponseHistory(items: ResponseItem[]): ResponseItem[];
|
|
369
|
+
declare function stripImagesWhenUnsupported(inputModalities: readonly string[] | null | undefined, items: ResponseItem[]): ResponseItem[];
|
|
370
|
+
|
|
371
|
+
declare function isContextualUserMessageContent(message: readonly ContentItem[]): boolean;
|
|
372
|
+
declare function isContextualDevMessageContent(message: readonly ContentItem[]): boolean;
|
|
373
|
+
declare function hasNonContextualDevMessageContent(message: readonly ContentItem[]): boolean;
|
|
374
|
+
declare function parseUserMessage(id: string | null | undefined, message: readonly ContentItem[]): UserMessageTurnItem | null;
|
|
375
|
+
declare function parseAgentMessage(id: string | null | undefined, message: readonly ContentItem[], phase?: string | null): AgentMessageTurnItem;
|
|
376
|
+
declare function parseVisibleHookPromptMessage(id: string | null | undefined, message: readonly ContentItem[]): HookPromptTurnItem | null;
|
|
377
|
+
declare function parseTurnItem(item: ResponseItem): TurnItem | null;
|
|
378
|
+
|
|
379
|
+
type ToolRouterParams = {
|
|
380
|
+
dynamic_tools: readonly DynamicToolSpec[];
|
|
381
|
+
mcp_tools?: readonly McpToolInfo[];
|
|
382
|
+
deferred_mcp_tools?: readonly McpToolInfo[];
|
|
383
|
+
unavailable_called_tools?: readonly ToolName[];
|
|
384
|
+
parallel_mcp_server_names?: ReadonlySet<string>;
|
|
385
|
+
discoverable_tools?: readonly DiscoverableTool[];
|
|
386
|
+
provider_capabilities?: Partial<ProviderCapabilities>;
|
|
387
|
+
tools_config?: Partial<ToolsConfig>;
|
|
388
|
+
};
|
|
389
|
+
type ToolCall = {
|
|
390
|
+
call_id: string;
|
|
391
|
+
tool_name: ToolName;
|
|
392
|
+
payload: ToolPayload;
|
|
393
|
+
};
|
|
394
|
+
declare class ToolRouter {
|
|
395
|
+
private readonly tool_registry;
|
|
396
|
+
private readonly configured_specs;
|
|
397
|
+
private readonly visible_specs;
|
|
398
|
+
private readonly parallel_tool_names;
|
|
399
|
+
private readonly parallel_mcp_server_names;
|
|
400
|
+
private constructor();
|
|
401
|
+
static from_config(params: ToolRouterParams): ToolRouter;
|
|
402
|
+
specs(): ToolSpec[];
|
|
403
|
+
configured_tools(): ConfiguredToolSpec[];
|
|
404
|
+
model_visible_specs(): ToolSpec[];
|
|
405
|
+
registry_for_test(): ToolRegistry;
|
|
406
|
+
registry(): ToolRegistry;
|
|
407
|
+
find_spec(toolName: ToolNameInput): ToolSpec | null;
|
|
408
|
+
createDiffConsumer(toolName: ToolNameInput): ToolArgumentDiffConsumer | null;
|
|
409
|
+
tool_supports_parallel(call: ToolCall): boolean;
|
|
410
|
+
static build_tool_call(session: Session, item: ResponseItem): Promise<ToolCall | null>;
|
|
411
|
+
dispatch_tool_call_with_code_mode_result(params: {
|
|
412
|
+
session: Session;
|
|
413
|
+
turn: TurnContext;
|
|
414
|
+
call: ToolCall;
|
|
415
|
+
source?: ToolCallSource;
|
|
416
|
+
signal?: AbortSignal;
|
|
417
|
+
}): Promise<AnyToolResult>;
|
|
418
|
+
}
|
|
419
|
+
|
|
420
|
+
declare class ToolDispatchTrace {
|
|
421
|
+
readonly events: Array<{
|
|
422
|
+
type: "started" | "completed" | "failed";
|
|
423
|
+
call_id: string;
|
|
424
|
+
tool_name: string;
|
|
425
|
+
message?: string;
|
|
426
|
+
}>;
|
|
427
|
+
start(call: ToolCall): void;
|
|
428
|
+
record_completed(call: ToolCall): void;
|
|
429
|
+
record_failed(call: ToolCall, error: Error): void;
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
type ToolCallRuntimeParams = {
|
|
433
|
+
router: ToolRouter;
|
|
434
|
+
session: Session;
|
|
435
|
+
turn: TurnContext;
|
|
436
|
+
};
|
|
437
|
+
declare class AbortedToolOutput implements ToolOutput {
|
|
438
|
+
readonly message: string;
|
|
439
|
+
constructor(message: string);
|
|
440
|
+
logPreview(): string;
|
|
441
|
+
successForLogging(): boolean;
|
|
442
|
+
toResponseItem(callId: string, payload: ToolPayload): ResponseInputItem;
|
|
443
|
+
postToolUseResponse(): unknown | null;
|
|
444
|
+
codeModeResult(): unknown;
|
|
445
|
+
}
|
|
446
|
+
declare class ToolCallRuntime {
|
|
447
|
+
private readonly params;
|
|
448
|
+
private readonly parallelExecution;
|
|
449
|
+
constructor(params: ToolCallRuntimeParams);
|
|
450
|
+
find_spec(toolName: Parameters<ToolRouter["find_spec"]>[0]): ToolSpec | null;
|
|
451
|
+
create_diff_consumer(toolName: Parameters<ToolRouter["createDiffConsumer"]>[0]): ToolArgumentDiffConsumer | null;
|
|
452
|
+
handle_tool_call(call: ToolCall, signal?: AbortSignal): Promise<ResponseInputItem>;
|
|
453
|
+
handle_tool_call_with_source(call: ToolCall, source?: ToolCallSource, signal?: AbortSignal, trace?: ToolDispatchTrace): Promise<AnyToolResult>;
|
|
454
|
+
static failureResponse(call: ToolCall, error: FunctionCallError): ResponseInputItem;
|
|
455
|
+
static abortedResponse(call: ToolCall, secs: number): AnyToolResult;
|
|
456
|
+
private raceAbort;
|
|
457
|
+
private static abortMessage;
|
|
458
|
+
}
|
|
459
|
+
|
|
460
|
+
type RunTurnParams = {
|
|
461
|
+
modelClient: ModelClient;
|
|
462
|
+
session: Session;
|
|
463
|
+
turn: TurnContext;
|
|
464
|
+
history: RolloutItem[];
|
|
465
|
+
submission: Submission;
|
|
466
|
+
signal?: AbortSignal;
|
|
467
|
+
completeTurn?: boolean;
|
|
468
|
+
};
|
|
469
|
+
type SamplingRequestResult = {
|
|
470
|
+
turn: TurnContext;
|
|
471
|
+
modelInput: ResponseItem[];
|
|
472
|
+
lastAgentMessage: string | null;
|
|
473
|
+
steps: number;
|
|
474
|
+
};
|
|
475
|
+
declare function runTurn(params: RunTurnParams): Promise<SamplingRequestResult>;
|
|
476
|
+
declare function run_sampling_request(params: {
|
|
477
|
+
session: Session;
|
|
478
|
+
turn: TurnContext;
|
|
479
|
+
router: ToolRouter;
|
|
480
|
+
toolRuntime?: ToolCallRuntime;
|
|
481
|
+
clientSession: ModelClientSessionHandle;
|
|
482
|
+
input: ResponseItem[];
|
|
483
|
+
maxSteps?: number;
|
|
484
|
+
signal?: AbortSignal;
|
|
485
|
+
completeTurn?: boolean;
|
|
486
|
+
includePromptContext?: boolean;
|
|
487
|
+
}): Promise<SamplingRequestResult>;
|
|
488
|
+
|
|
489
|
+
type SessionStateParams = {
|
|
490
|
+
session_configuration: SessionConfiguration;
|
|
491
|
+
history?: ContextManager | null;
|
|
492
|
+
latest_rate_limits?: RateLimitSnapshot | null;
|
|
493
|
+
server_reasoning_included?: boolean;
|
|
494
|
+
previous_turn_settings?: PreviousTurnSettings | null;
|
|
495
|
+
reference_context_item?: TurnContextItem | null;
|
|
496
|
+
token_info?: TokenUsageInfo | null;
|
|
497
|
+
};
|
|
498
|
+
declare class SessionState {
|
|
499
|
+
readonly session_configuration: SessionConfiguration;
|
|
500
|
+
readonly history: ContextManager;
|
|
501
|
+
private latest_rate_limits_value;
|
|
502
|
+
private server_reasoning_included_value;
|
|
503
|
+
private previous_turn_settings_value;
|
|
504
|
+
constructor(params: SessionStateParams);
|
|
505
|
+
record_items(items: Iterable<ResponseItem>, policy?: TruncationPolicy | null): void;
|
|
506
|
+
previous_turn_settings(): PreviousTurnSettings | null;
|
|
507
|
+
set_previous_turn_settings(value: PreviousTurnSettings | null): void;
|
|
508
|
+
clone_history(): ContextManager;
|
|
509
|
+
replace_history(items: ResponseItem[], referenceContextItem: TurnContextItem | null): void;
|
|
510
|
+
set_token_info(info: TokenUsageInfo | null): void;
|
|
511
|
+
set_reference_context_item(item: TurnContextItem | null): void;
|
|
512
|
+
reference_context_item(): TurnContextItem | null;
|
|
513
|
+
update_token_info_from_usage(usage: TokenUsage, modelContextWindow?: number | null): void;
|
|
514
|
+
token_info(): TokenUsageInfo | null;
|
|
515
|
+
set_rate_limits(snapshot: RateLimitSnapshot): void;
|
|
516
|
+
set_latest_rate_limits(snapshot: RateLimitSnapshot | null): void;
|
|
517
|
+
latest_rate_limits(): RateLimitSnapshot | null;
|
|
518
|
+
token_info_and_rate_limits(): [TokenUsageInfo | null, RateLimitSnapshot | null];
|
|
519
|
+
set_token_usage_full(contextWindow: number): void;
|
|
520
|
+
get_total_token_usage(serverReasoningIncluded?: boolean): number;
|
|
521
|
+
get_total_token_usage_breakdown(): TotalTokenUsageBreakdown;
|
|
522
|
+
set_server_reasoning_included(included: boolean): void;
|
|
523
|
+
server_reasoning_included(): boolean;
|
|
524
|
+
}
|
|
525
|
+
|
|
526
|
+
type StreamTextChunk<TExtracted> = {
|
|
527
|
+
visible_text: string;
|
|
528
|
+
extracted: TExtracted[];
|
|
529
|
+
};
|
|
530
|
+
type ProposedPlanSegment = {
|
|
531
|
+
type: "Normal";
|
|
532
|
+
text: string;
|
|
533
|
+
} | {
|
|
534
|
+
type: "ProposedPlanStart";
|
|
535
|
+
} | {
|
|
536
|
+
type: "ProposedPlanDelta";
|
|
537
|
+
text: string;
|
|
538
|
+
} | {
|
|
539
|
+
type: "ProposedPlanEnd";
|
|
540
|
+
};
|
|
541
|
+
type AssistantTextChunk = {
|
|
542
|
+
visible_text: string;
|
|
543
|
+
citations: string[];
|
|
544
|
+
plan_segments: ProposedPlanSegment[];
|
|
545
|
+
};
|
|
546
|
+
declare class ProposedPlanParser {
|
|
547
|
+
private readonly parser;
|
|
548
|
+
push_str(chunk: string): StreamTextChunk<ProposedPlanSegment>;
|
|
549
|
+
finish(): StreamTextChunk<ProposedPlanSegment>;
|
|
550
|
+
}
|
|
551
|
+
declare function stripProposedPlanBlocks(text: string): string;
|
|
552
|
+
declare function extractProposedPlanText(text: string): string | null;
|
|
553
|
+
declare class AssistantTextStreamParser {
|
|
554
|
+
private readonly planMode;
|
|
555
|
+
private readonly citations;
|
|
556
|
+
private readonly plan;
|
|
557
|
+
constructor(planMode: boolean);
|
|
558
|
+
push_str(chunk: string): AssistantTextChunk;
|
|
559
|
+
finish(): AssistantTextChunk;
|
|
560
|
+
private parseVisibleText;
|
|
561
|
+
}
|
|
562
|
+
|
|
563
|
+
declare function record_completed_response_item(session: Session, turnContext: TurnContext, item: ResponseItem): Promise<void>;
|
|
564
|
+
type InFlightFuture = Promise<ResponseItem>;
|
|
565
|
+
type OutputItemResult = {
|
|
566
|
+
last_agent_message: string | null;
|
|
567
|
+
needs_follow_up: boolean;
|
|
568
|
+
tool_future: InFlightFuture | null;
|
|
569
|
+
streamed_item_id?: string | null;
|
|
570
|
+
};
|
|
571
|
+
type HandleOutputCtx = {
|
|
572
|
+
session: Session;
|
|
573
|
+
turn_context: TurnContext;
|
|
574
|
+
tool_runtime: ToolCallRuntime;
|
|
575
|
+
plan_mode_stream: PlanModeStreamState | null;
|
|
576
|
+
streamed_item_id: string | null;
|
|
577
|
+
signal?: AbortSignal;
|
|
578
|
+
};
|
|
579
|
+
declare function handle_output_item_done(ctx: HandleOutputCtx, item: ResponseItem): Promise<OutputItemResult>;
|
|
580
|
+
declare function handle_non_tool_response_item(ctx: HandleOutputCtx, item: ResponseItem): Promise<OutputItemResult>;
|
|
581
|
+
declare function last_assistant_message_from_item(item: ResponseItem, planMode: boolean): string | null;
|
|
582
|
+
declare class PlanModeStreamState {
|
|
583
|
+
private readonly params;
|
|
584
|
+
private readonly itemId;
|
|
585
|
+
private readonly parser;
|
|
586
|
+
private emittedPlanText;
|
|
587
|
+
private planItemStarted;
|
|
588
|
+
constructor(params: {
|
|
589
|
+
session: Session;
|
|
590
|
+
turn: TurnContext;
|
|
591
|
+
});
|
|
592
|
+
pushDelta(delta: string): Promise<string>;
|
|
593
|
+
completeFromFinalText(text: string): Promise<{
|
|
594
|
+
assistantText: string | null;
|
|
595
|
+
planText: string | null;
|
|
596
|
+
}>;
|
|
597
|
+
private emitPlanSegments;
|
|
598
|
+
private emitRemainingPlanDelta;
|
|
599
|
+
private emitPlanDelta;
|
|
600
|
+
private startPlanItem;
|
|
601
|
+
}
|
|
602
|
+
|
|
603
|
+
type RegularTaskRunner = (input: {
|
|
604
|
+
session: Session;
|
|
605
|
+
turn: TurnContext;
|
|
606
|
+
history: RolloutItem[];
|
|
607
|
+
submission: Submission;
|
|
608
|
+
signal?: AbortSignal;
|
|
609
|
+
}) => Promise<SessionTaskResult>;
|
|
610
|
+
type RegularTaskParams = {
|
|
611
|
+
history: RolloutItem[];
|
|
612
|
+
submission: Submission;
|
|
613
|
+
run_turn: RegularTaskRunner;
|
|
614
|
+
};
|
|
615
|
+
declare class RegularTask implements SessionTask {
|
|
616
|
+
private readonly history;
|
|
617
|
+
private readonly submission;
|
|
618
|
+
private readonly run_turn;
|
|
619
|
+
constructor(params: RegularTaskParams);
|
|
620
|
+
static new(params: RegularTaskParams): RegularTask;
|
|
621
|
+
kind(): TaskKind;
|
|
622
|
+
span_name(): string;
|
|
623
|
+
records_turn_token_usage_on_span(): boolean;
|
|
624
|
+
run(input: SessionTaskRunInput): Promise<SessionTaskResult>;
|
|
625
|
+
}
|
|
626
|
+
|
|
627
|
+
type CompactTaskRunner = (input: {
|
|
628
|
+
session: Session;
|
|
629
|
+
turn: TurnContext;
|
|
630
|
+
history: RolloutItem[];
|
|
631
|
+
submission: Submission;
|
|
632
|
+
signal?: AbortSignal;
|
|
633
|
+
}) => Promise<SessionTaskResult>;
|
|
634
|
+
type CompactTaskParams = {
|
|
635
|
+
history: RolloutItem[];
|
|
636
|
+
submission: Submission;
|
|
637
|
+
run_compact_task: CompactTaskRunner;
|
|
638
|
+
};
|
|
639
|
+
declare class CompactTask implements SessionTask {
|
|
640
|
+
private readonly history;
|
|
641
|
+
private readonly submission;
|
|
642
|
+
private readonly run_compact_task;
|
|
643
|
+
constructor(params: CompactTaskParams);
|
|
644
|
+
kind(): TaskKind;
|
|
645
|
+
span_name(): string;
|
|
646
|
+
records_turn_token_usage_on_span(): boolean;
|
|
647
|
+
run(input: SessionTaskRunInput): Promise<SessionTaskResult>;
|
|
648
|
+
}
|
|
649
|
+
|
|
650
|
+
declare const CORE_TEMPLATES: {
|
|
651
|
+
readonly "compact/prompt.md": "Your task is to create a concise summary of the conversation so far.\n\nPreserve user intent, important decisions, constraints, current task state, and any unresolved requests.\nDo not add new recommendations or solve the task.";
|
|
652
|
+
readonly "compact/summary_prefix.md": "Conversation summary:";
|
|
653
|
+
readonly "goals/budget_limit.md": "The active thread goal has reached its token budget.\n\n<untrusted_objective>\n{{objective}}\n</untrusted_objective>\n\nGoal status is now budgetLimited. Do not start substantive new work on the goal. Wrap up soon with concise progress, remaining work, and the next useful step. Do not call update_goal unless the objective is actually complete.\n\nTime spent: {{time_used_seconds}}s\nTokens used: {{tokens_used}}\nToken budget: {{token_budget}}\nRemaining budget: {{remaining_token_budget}}";
|
|
654
|
+
readonly "goals/continuation.md": "The active thread goal is still in progress. Continue working toward the objective while respecting the remaining budget.";
|
|
655
|
+
readonly "model_instructions/default_instructions_template.md": "";
|
|
656
|
+
readonly "personalities/default.md": "";
|
|
657
|
+
readonly "search_tool/tool_search.md": "Search available deferred tools and return the best matching tool definitions.";
|
|
658
|
+
};
|
|
659
|
+
type CoreTemplatePath = keyof typeof CORE_TEMPLATES;
|
|
660
|
+
declare function loadCoreTemplate(path: CoreTemplatePath): string;
|
|
661
|
+
declare function renderCoreTemplate(path: CoreTemplatePath, variables: Record<string, string | number | null | undefined>): string;
|
|
662
|
+
|
|
663
|
+
type CompactTaskResult = {
|
|
664
|
+
summary: string;
|
|
665
|
+
replacement_history: ResponseItem[];
|
|
666
|
+
};
|
|
667
|
+
declare function run_compact_task(params: {
|
|
668
|
+
modelClient: ModelClient;
|
|
669
|
+
session: Session;
|
|
670
|
+
history: RolloutItem[];
|
|
671
|
+
submission: Submission;
|
|
672
|
+
turn?: TurnContext;
|
|
673
|
+
signal?: AbortSignal;
|
|
674
|
+
completeTurn?: boolean;
|
|
675
|
+
}): Promise<CompactTaskResult>;
|
|
676
|
+
|
|
677
|
+
declare const HookToolEventName: {
|
|
678
|
+
readonly PreToolUse: "PreToolUse";
|
|
679
|
+
readonly PostToolUse: "PostToolUse";
|
|
680
|
+
readonly PermissionRequest: "PermissionRequest";
|
|
681
|
+
};
|
|
682
|
+
type HookToolEventName = (typeof HookToolEventName)[keyof typeof HookToolEventName];
|
|
683
|
+
|
|
684
|
+
type NetworkApprovalDecision = {
|
|
685
|
+
type: "approved";
|
|
686
|
+
} | {
|
|
687
|
+
type: "denied";
|
|
688
|
+
reason: string;
|
|
689
|
+
};
|
|
690
|
+
declare function request_network_approval(): Promise<NetworkApprovalDecision>;
|
|
691
|
+
declare function network_approval_denied_error(decision: Extract<NetworkApprovalDecision, {
|
|
692
|
+
type: "denied";
|
|
693
|
+
}>): FunctionCallError;
|
|
694
|
+
|
|
695
|
+
declare const APPLY_PATCH_TOOL_NAME = "apply_patch";
|
|
696
|
+
declare class ApplyPatchHandler implements ToolHandler<FunctionToolOutput> {
|
|
697
|
+
toolName(): ToolName;
|
|
698
|
+
kind(): ToolKind;
|
|
699
|
+
isMutating(): Promise<boolean>;
|
|
700
|
+
handle(invocation: ToolInvocation): Promise<FunctionToolOutput>;
|
|
701
|
+
}
|
|
702
|
+
type ApplyPatchArgs = {
|
|
703
|
+
patch?: string;
|
|
704
|
+
};
|
|
705
|
+
declare function parseApplyPatchChanges(patch: string): Record<string, FileChange>;
|
|
706
|
+
|
|
707
|
+
declare function create_apply_patch_tool(): {
|
|
708
|
+
type: "function";
|
|
709
|
+
name: string;
|
|
710
|
+
description: string;
|
|
711
|
+
strict: boolean;
|
|
712
|
+
parameters: {
|
|
713
|
+
type: string;
|
|
714
|
+
properties: {
|
|
715
|
+
patch: {
|
|
716
|
+
type: string;
|
|
717
|
+
};
|
|
718
|
+
};
|
|
719
|
+
required: string[];
|
|
720
|
+
additionalProperties: boolean;
|
|
721
|
+
};
|
|
722
|
+
};
|
|
723
|
+
|
|
724
|
+
declare const LIST_MCP_RESOURCES_TOOL_NAME = "list_mcp_resources";
|
|
725
|
+
declare const LIST_MCP_RESOURCE_TEMPLATES_TOOL_NAME = "list_mcp_resource_templates";
|
|
726
|
+
declare const READ_MCP_RESOURCE_TOOL_NAME = "read_mcp_resource";
|
|
727
|
+
declare abstract class McpResourceHandler implements ToolHandler<FunctionToolOutput> {
|
|
728
|
+
abstract toolName(): ToolName;
|
|
729
|
+
abstract handleFunctionCall(invocation: ToolInvocation): Promise<FunctionToolOutput>;
|
|
730
|
+
kind(): ToolKind;
|
|
731
|
+
handle(invocation: ToolInvocation): Promise<FunctionToolOutput>;
|
|
732
|
+
}
|
|
733
|
+
declare class ListMcpResourcesHandler extends McpResourceHandler {
|
|
734
|
+
toolName(): ToolName;
|
|
735
|
+
handleFunctionCall(invocation: ToolInvocation): Promise<FunctionToolOutput>;
|
|
736
|
+
}
|
|
737
|
+
declare class ListMcpResourceTemplatesHandler extends McpResourceHandler {
|
|
738
|
+
toolName(): ToolName;
|
|
739
|
+
handleFunctionCall(invocation: ToolInvocation): Promise<FunctionToolOutput>;
|
|
740
|
+
}
|
|
741
|
+
declare class ReadMcpResourceHandler extends McpResourceHandler {
|
|
742
|
+
toolName(): ToolName;
|
|
743
|
+
handleFunctionCall(invocation: ToolInvocation): Promise<FunctionToolOutput>;
|
|
744
|
+
}
|
|
745
|
+
|
|
746
|
+
declare function create_list_mcp_resources_tool(): {
|
|
747
|
+
parameters: {
|
|
748
|
+
type: string;
|
|
749
|
+
properties: {
|
|
750
|
+
server: {
|
|
751
|
+
type: string;
|
|
752
|
+
description: string;
|
|
753
|
+
};
|
|
754
|
+
cursor: {
|
|
755
|
+
type: string;
|
|
756
|
+
description: string;
|
|
757
|
+
};
|
|
758
|
+
};
|
|
759
|
+
additionalProperties: boolean;
|
|
760
|
+
};
|
|
761
|
+
type: "function";
|
|
762
|
+
name: string;
|
|
763
|
+
description: string;
|
|
764
|
+
strict: boolean;
|
|
765
|
+
};
|
|
766
|
+
declare function create_list_mcp_resource_templates_tool(): {
|
|
767
|
+
parameters: {
|
|
768
|
+
type: string;
|
|
769
|
+
properties: {
|
|
770
|
+
server: {
|
|
771
|
+
type: string;
|
|
772
|
+
description: string;
|
|
773
|
+
};
|
|
774
|
+
cursor: {
|
|
775
|
+
type: string;
|
|
776
|
+
description: string;
|
|
777
|
+
};
|
|
778
|
+
};
|
|
779
|
+
additionalProperties: boolean;
|
|
780
|
+
};
|
|
781
|
+
type: "function";
|
|
782
|
+
name: string;
|
|
783
|
+
description: string;
|
|
784
|
+
strict: boolean;
|
|
785
|
+
};
|
|
786
|
+
declare function create_read_mcp_resource_tool(): {
|
|
787
|
+
parameters: {
|
|
788
|
+
type: string;
|
|
789
|
+
properties: {
|
|
790
|
+
server: {
|
|
791
|
+
type: string;
|
|
792
|
+
description: string;
|
|
793
|
+
};
|
|
794
|
+
uri: {
|
|
795
|
+
type: string;
|
|
796
|
+
description: string;
|
|
797
|
+
};
|
|
798
|
+
};
|
|
799
|
+
required: string[];
|
|
800
|
+
additionalProperties: boolean;
|
|
801
|
+
};
|
|
802
|
+
type: "function";
|
|
803
|
+
name: string;
|
|
804
|
+
description: string;
|
|
805
|
+
strict: boolean;
|
|
806
|
+
};
|
|
807
|
+
|
|
808
|
+
type DynamicToolHandlerParams = {
|
|
809
|
+
tool_name: ToolNameInput;
|
|
810
|
+
};
|
|
811
|
+
declare class DynamicToolHandler implements ToolHandler<FunctionToolOutput> {
|
|
812
|
+
private readonly tool_name;
|
|
813
|
+
constructor(params: DynamicToolHandlerParams);
|
|
814
|
+
toolName(): ToolName;
|
|
815
|
+
kind(): ToolKind;
|
|
816
|
+
isMutating(): Promise<boolean>;
|
|
817
|
+
handle(invocation: ToolInvocation): Promise<FunctionToolOutput>;
|
|
818
|
+
}
|
|
819
|
+
declare function dynamicToolName(input: {
|
|
820
|
+
namespace?: string | null;
|
|
821
|
+
name: string;
|
|
822
|
+
}): string;
|
|
823
|
+
|
|
824
|
+
declare const GET_GOAL_TOOL_NAME = "get_goal";
|
|
825
|
+
declare const CREATE_GOAL_TOOL_NAME = "create_goal";
|
|
826
|
+
declare const UPDATE_GOAL_TOOL_NAME = "update_goal";
|
|
827
|
+
declare class GetGoalHandler implements ToolHandler<FunctionToolOutput> {
|
|
828
|
+
toolName(): ToolName;
|
|
829
|
+
kind(): ToolKind;
|
|
830
|
+
handle(invocation: ToolInvocation): Promise<FunctionToolOutput>;
|
|
831
|
+
}
|
|
832
|
+
declare class CreateGoalHandler implements ToolHandler<FunctionToolOutput> {
|
|
833
|
+
toolName(): ToolName;
|
|
834
|
+
kind(): ToolKind;
|
|
835
|
+
handle(invocation: ToolInvocation): Promise<FunctionToolOutput>;
|
|
836
|
+
}
|
|
837
|
+
declare class UpdateGoalHandler implements ToolHandler<FunctionToolOutput> {
|
|
838
|
+
toolName(): ToolName;
|
|
839
|
+
kind(): ToolKind;
|
|
840
|
+
handle(invocation: ToolInvocation): Promise<FunctionToolOutput>;
|
|
841
|
+
}
|
|
842
|
+
|
|
843
|
+
declare function create_get_goal_tool(): {
|
|
844
|
+
type: "function";
|
|
845
|
+
name: string;
|
|
846
|
+
description: string;
|
|
847
|
+
strict: boolean;
|
|
848
|
+
parameters: {
|
|
849
|
+
type: string;
|
|
850
|
+
properties: {};
|
|
851
|
+
required: never[];
|
|
852
|
+
additionalProperties: boolean;
|
|
853
|
+
};
|
|
854
|
+
};
|
|
855
|
+
declare function create_create_goal_tool(): {
|
|
856
|
+
type: "function";
|
|
857
|
+
name: string;
|
|
858
|
+
description: string;
|
|
859
|
+
strict: boolean;
|
|
860
|
+
parameters: {
|
|
861
|
+
type: string;
|
|
862
|
+
properties: {
|
|
863
|
+
objective: {
|
|
864
|
+
type: string;
|
|
865
|
+
description: string;
|
|
866
|
+
};
|
|
867
|
+
token_budget: {
|
|
868
|
+
type: string;
|
|
869
|
+
description: string;
|
|
870
|
+
};
|
|
871
|
+
};
|
|
872
|
+
required: string[];
|
|
873
|
+
additionalProperties: boolean;
|
|
874
|
+
};
|
|
875
|
+
};
|
|
876
|
+
declare function create_update_goal_tool(): {
|
|
877
|
+
type: "function";
|
|
878
|
+
name: string;
|
|
879
|
+
description: string;
|
|
880
|
+
strict: boolean;
|
|
881
|
+
parameters: {
|
|
882
|
+
type: string;
|
|
883
|
+
properties: {
|
|
884
|
+
status: {
|
|
885
|
+
type: string;
|
|
886
|
+
enum: "complete"[];
|
|
887
|
+
description: string;
|
|
888
|
+
};
|
|
889
|
+
};
|
|
890
|
+
required: string[];
|
|
891
|
+
additionalProperties: boolean;
|
|
892
|
+
};
|
|
893
|
+
};
|
|
894
|
+
|
|
895
|
+
declare class McpToolHandler implements ToolHandler<McpToolOutput> {
|
|
896
|
+
readonly tool: McpToolInfo;
|
|
897
|
+
private readonly name;
|
|
898
|
+
constructor(tool: McpToolInfo);
|
|
899
|
+
toolName(): ToolNameInput;
|
|
900
|
+
kind(): ToolKind;
|
|
901
|
+
matchesKind(payload: ToolPayload): boolean;
|
|
902
|
+
preToolUsePayload(invocation: ToolInvocation): {
|
|
903
|
+
tool_name: string;
|
|
904
|
+
tool_input: unknown;
|
|
905
|
+
};
|
|
906
|
+
postToolUsePayload(invocation: ToolInvocation, result: McpToolOutput): {
|
|
907
|
+
tool_name: string;
|
|
908
|
+
tool_use_id: string;
|
|
909
|
+
tool_input: unknown;
|
|
910
|
+
tool_response: unknown;
|
|
911
|
+
};
|
|
912
|
+
handle(invocation: ToolInvocation): Promise<McpToolOutput>;
|
|
913
|
+
}
|
|
914
|
+
declare function mcpArgumentsFromPayload(payload: ToolPayload): unknown;
|
|
915
|
+
|
|
916
|
+
declare const SPAWN_AGENT_TOOL_NAME = "spawn_agent";
|
|
917
|
+
declare const SEND_INPUT_TOOL_NAME = "send_input";
|
|
918
|
+
declare const WAIT_AGENT_TOOL_NAME = "wait_agent";
|
|
919
|
+
declare const CLOSE_AGENT_TOOL_NAME = "close_agent";
|
|
920
|
+
declare const RESUME_AGENT_TOOL_NAME = "resume_agent";
|
|
921
|
+
declare const LIST_AGENTS_TOOL_NAME = "list_agents";
|
|
922
|
+
declare const SEND_MESSAGE_TOOL_NAME = "send_message";
|
|
923
|
+
declare const FOLLOWUP_TASK_TOOL_NAME = "followup_task";
|
|
924
|
+
declare class SpawnAgentHandler implements ToolHandler<FunctionToolOutput> {
|
|
925
|
+
toolName(): ToolName;
|
|
926
|
+
kind(): ToolKind;
|
|
927
|
+
handle(invocation: ToolInvocation): Promise<FunctionToolOutput>;
|
|
928
|
+
}
|
|
929
|
+
declare class SendInputHandler implements ToolHandler<FunctionToolOutput> {
|
|
930
|
+
toolName(): ToolName;
|
|
931
|
+
kind(): ToolKind;
|
|
932
|
+
handle(invocation: ToolInvocation): Promise<FunctionToolOutput>;
|
|
933
|
+
}
|
|
934
|
+
declare class WaitAgentHandler implements ToolHandler<FunctionToolOutput> {
|
|
935
|
+
toolName(): ToolName;
|
|
936
|
+
kind(): ToolKind;
|
|
937
|
+
handle(invocation: ToolInvocation): Promise<FunctionToolOutput>;
|
|
938
|
+
}
|
|
939
|
+
declare class CloseAgentHandler implements ToolHandler<FunctionToolOutput> {
|
|
940
|
+
toolName(): ToolName;
|
|
941
|
+
kind(): ToolKind;
|
|
942
|
+
handle(invocation: ToolInvocation): Promise<FunctionToolOutput>;
|
|
943
|
+
}
|
|
944
|
+
declare class ResumeAgentHandler implements ToolHandler<FunctionToolOutput> {
|
|
945
|
+
toolName(): ToolName;
|
|
946
|
+
kind(): ToolKind;
|
|
947
|
+
handle(invocation: ToolInvocation): Promise<FunctionToolOutput>;
|
|
948
|
+
}
|
|
949
|
+
declare class ListAgentsHandler implements ToolHandler<FunctionToolOutput> {
|
|
950
|
+
toolName(): ToolName;
|
|
951
|
+
kind(): ToolKind;
|
|
952
|
+
handle(invocation: ToolInvocation): Promise<FunctionToolOutput>;
|
|
953
|
+
}
|
|
954
|
+
declare class SendMessageHandler implements ToolHandler<FunctionToolOutput> {
|
|
955
|
+
toolName(): ToolName;
|
|
956
|
+
kind(): ToolKind;
|
|
957
|
+
handle(invocation: ToolInvocation): Promise<FunctionToolOutput>;
|
|
958
|
+
}
|
|
959
|
+
declare class FollowupTaskHandler implements ToolHandler<FunctionToolOutput> {
|
|
960
|
+
toolName(): ToolName;
|
|
961
|
+
kind(): ToolKind;
|
|
962
|
+
handle(invocation: ToolInvocation): Promise<FunctionToolOutput>;
|
|
963
|
+
}
|
|
964
|
+
|
|
965
|
+
declare const MIN_WAIT_TIMEOUT_MS = 1000;
|
|
966
|
+
declare const DEFAULT_WAIT_TIMEOUT_MS = 30000;
|
|
967
|
+
declare const MAX_WAIT_TIMEOUT_MS = 3600000;
|
|
968
|
+
|
|
969
|
+
type WaitAgentTimeoutOptions = {
|
|
970
|
+
default_timeout_ms: number;
|
|
971
|
+
min_timeout_ms: number;
|
|
972
|
+
max_timeout_ms: number;
|
|
973
|
+
};
|
|
974
|
+
|
|
975
|
+
declare const PLAN_TOOL_NAME = "update_plan";
|
|
976
|
+
declare class PlanHandler implements ToolHandler<FunctionToolOutput> {
|
|
977
|
+
toolName(): ToolName;
|
|
978
|
+
kind(): ToolKind;
|
|
979
|
+
handle(invocation: ToolInvocation): Promise<FunctionToolOutput>;
|
|
980
|
+
}
|
|
981
|
+
|
|
982
|
+
declare function create_update_plan_tool(): {
|
|
983
|
+
type: "function";
|
|
984
|
+
name: string;
|
|
985
|
+
description: string;
|
|
986
|
+
strict: boolean;
|
|
987
|
+
parameters: {
|
|
988
|
+
type: string;
|
|
989
|
+
properties: {
|
|
990
|
+
explanation: {
|
|
991
|
+
type: string;
|
|
992
|
+
};
|
|
993
|
+
plan: {
|
|
994
|
+
type: string;
|
|
995
|
+
description: string;
|
|
996
|
+
items: {
|
|
997
|
+
type: string;
|
|
998
|
+
properties: {
|
|
999
|
+
step: {
|
|
1000
|
+
type: string;
|
|
1001
|
+
};
|
|
1002
|
+
status: {
|
|
1003
|
+
type: string;
|
|
1004
|
+
description: string;
|
|
1005
|
+
};
|
|
1006
|
+
};
|
|
1007
|
+
required: string[];
|
|
1008
|
+
additionalProperties: boolean;
|
|
1009
|
+
};
|
|
1010
|
+
};
|
|
1011
|
+
};
|
|
1012
|
+
required: string[];
|
|
1013
|
+
additionalProperties: boolean;
|
|
1014
|
+
};
|
|
1015
|
+
};
|
|
1016
|
+
declare const create_plan_tool: typeof create_update_plan_tool;
|
|
1017
|
+
|
|
1018
|
+
declare const REQUEST_PLUGIN_INSTALL_TOOL_NAME = "request_plugin_install";
|
|
1019
|
+
declare class RequestPluginInstallHandler implements ToolHandler<FunctionToolOutput> {
|
|
1020
|
+
toolName(): ToolName;
|
|
1021
|
+
kind(): ToolKind;
|
|
1022
|
+
handle(): Promise<FunctionToolOutput>;
|
|
1023
|
+
}
|
|
1024
|
+
|
|
1025
|
+
declare function create_request_plugin_install_tool(): {
|
|
1026
|
+
type: "function";
|
|
1027
|
+
name: string;
|
|
1028
|
+
description: string;
|
|
1029
|
+
strict: boolean;
|
|
1030
|
+
parameters: {
|
|
1031
|
+
type: string;
|
|
1032
|
+
properties: {};
|
|
1033
|
+
required: never[];
|
|
1034
|
+
additionalProperties: boolean;
|
|
1035
|
+
};
|
|
1036
|
+
};
|
|
1037
|
+
|
|
1038
|
+
declare class RequestPermissionsHandler implements ToolHandler<FunctionToolOutput> {
|
|
1039
|
+
toolName(): ToolName;
|
|
1040
|
+
kind(): ToolKind;
|
|
1041
|
+
handle(invocation: ToolInvocation): Promise<FunctionToolOutput>;
|
|
1042
|
+
}
|
|
1043
|
+
|
|
1044
|
+
type RequestUserInputHandlerParams = {
|
|
1045
|
+
available_modes: ModeKind[];
|
|
1046
|
+
};
|
|
1047
|
+
declare class RequestUserInputHandler implements ToolHandler<FunctionToolOutput> {
|
|
1048
|
+
private readonly params;
|
|
1049
|
+
constructor(params: RequestUserInputHandlerParams);
|
|
1050
|
+
toolName(): ToolName;
|
|
1051
|
+
kind(): ToolKind;
|
|
1052
|
+
handle(invocation: ToolInvocation): Promise<FunctionToolOutput>;
|
|
1053
|
+
}
|
|
1054
|
+
|
|
1055
|
+
declare function create_exec_command_tool(): {
|
|
1056
|
+
type: "function";
|
|
1057
|
+
name: string;
|
|
1058
|
+
description: string;
|
|
1059
|
+
strict: boolean;
|
|
1060
|
+
parameters: {
|
|
1061
|
+
type: string;
|
|
1062
|
+
properties: {
|
|
1063
|
+
cmd: {
|
|
1064
|
+
type: string;
|
|
1065
|
+
};
|
|
1066
|
+
workdir: {
|
|
1067
|
+
type: string;
|
|
1068
|
+
};
|
|
1069
|
+
yield_time_ms: {
|
|
1070
|
+
type: string;
|
|
1071
|
+
};
|
|
1072
|
+
max_output_tokens: {
|
|
1073
|
+
type: string;
|
|
1074
|
+
};
|
|
1075
|
+
sandbox_permissions: {};
|
|
1076
|
+
justification: {
|
|
1077
|
+
type: string;
|
|
1078
|
+
};
|
|
1079
|
+
prefix_rule: {
|
|
1080
|
+
type: string;
|
|
1081
|
+
items: {
|
|
1082
|
+
type: string;
|
|
1083
|
+
};
|
|
1084
|
+
};
|
|
1085
|
+
};
|
|
1086
|
+
required: string[];
|
|
1087
|
+
additionalProperties: boolean;
|
|
1088
|
+
};
|
|
1089
|
+
};
|
|
1090
|
+
declare function create_write_stdin_tool(): {
|
|
1091
|
+
type: "function";
|
|
1092
|
+
name: string;
|
|
1093
|
+
description: string;
|
|
1094
|
+
strict: boolean;
|
|
1095
|
+
parameters: {
|
|
1096
|
+
type: string;
|
|
1097
|
+
properties: {
|
|
1098
|
+
process_id: {
|
|
1099
|
+
type: string;
|
|
1100
|
+
};
|
|
1101
|
+
chars: {
|
|
1102
|
+
type: string;
|
|
1103
|
+
};
|
|
1104
|
+
yield_time_ms: {
|
|
1105
|
+
type: string;
|
|
1106
|
+
};
|
|
1107
|
+
max_output_tokens: {
|
|
1108
|
+
type: string;
|
|
1109
|
+
};
|
|
1110
|
+
};
|
|
1111
|
+
required: string[];
|
|
1112
|
+
additionalProperties: boolean;
|
|
1113
|
+
};
|
|
1114
|
+
};
|
|
1115
|
+
|
|
1116
|
+
declare const TEST_SYNC_TOOL_NAME = "test_sync";
|
|
1117
|
+
|
|
1118
|
+
declare function create_test_sync_tool(): {
|
|
1119
|
+
type: "function";
|
|
1120
|
+
name: string;
|
|
1121
|
+
description: string;
|
|
1122
|
+
strict: boolean;
|
|
1123
|
+
parameters: {
|
|
1124
|
+
type: string;
|
|
1125
|
+
properties: {};
|
|
1126
|
+
required: never[];
|
|
1127
|
+
additionalProperties: boolean;
|
|
1128
|
+
};
|
|
1129
|
+
};
|
|
1130
|
+
|
|
1131
|
+
declare class ToolSearchOutput {
|
|
1132
|
+
readonly tools: unknown[];
|
|
1133
|
+
constructor(tools: unknown[]);
|
|
1134
|
+
logPreview(): string;
|
|
1135
|
+
successForLogging(): boolean;
|
|
1136
|
+
toResponseItem(callId: string): {
|
|
1137
|
+
type: "tool_search_output";
|
|
1138
|
+
call_id: string;
|
|
1139
|
+
status: "completed";
|
|
1140
|
+
execution: "client";
|
|
1141
|
+
tools: unknown[];
|
|
1142
|
+
};
|
|
1143
|
+
postToolUseResponse(): unknown | null;
|
|
1144
|
+
codeModeResult(): unknown;
|
|
1145
|
+
}
|
|
1146
|
+
declare class ToolSearchHandler implements ToolHandler<ToolSearchOutput> {
|
|
1147
|
+
private readonly entries;
|
|
1148
|
+
private readonly searchEngine;
|
|
1149
|
+
constructor(entries: readonly ToolSearchEntry[]);
|
|
1150
|
+
toolName(): ToolNameInput;
|
|
1151
|
+
kind(): ToolKind;
|
|
1152
|
+
matchesKind(payload: ToolPayload): boolean;
|
|
1153
|
+
handle(invocation: ToolInvocation): Promise<ToolSearchOutput>;
|
|
1154
|
+
private search;
|
|
1155
|
+
}
|
|
1156
|
+
|
|
1157
|
+
declare function create_tool_search_tool(sources: readonly ToolSearchSourceInfo[], defaultLimit: number): {
|
|
1158
|
+
type: "tool_search";
|
|
1159
|
+
execution: string;
|
|
1160
|
+
description: string;
|
|
1161
|
+
parameters: {
|
|
1162
|
+
type: string;
|
|
1163
|
+
properties: {
|
|
1164
|
+
query: {
|
|
1165
|
+
type: string;
|
|
1166
|
+
description: string;
|
|
1167
|
+
};
|
|
1168
|
+
limit: {
|
|
1169
|
+
type: string;
|
|
1170
|
+
description: string;
|
|
1171
|
+
};
|
|
1172
|
+
};
|
|
1173
|
+
required: string[];
|
|
1174
|
+
additionalProperties: boolean;
|
|
1175
|
+
};
|
|
1176
|
+
};
|
|
1177
|
+
|
|
1178
|
+
declare function unavailable_tool_message(toolName: string, nextStep: string): string;
|
|
1179
|
+
declare class UnavailableToolHandler implements ToolHandler<FunctionToolOutput> {
|
|
1180
|
+
private readonly tool_name;
|
|
1181
|
+
constructor(toolName: ToolNameInput);
|
|
1182
|
+
toolName(): ToolName;
|
|
1183
|
+
kind(): ToolKind;
|
|
1184
|
+
handle(invocation: ToolInvocation): Promise<FunctionToolOutput>;
|
|
1185
|
+
}
|
|
1186
|
+
|
|
1187
|
+
declare const EXEC_COMMAND_TOOL_NAME = "exec_command";
|
|
1188
|
+
declare class ExecCommandHandler implements ToolHandler<FunctionToolOutput> {
|
|
1189
|
+
toolName(): ToolName;
|
|
1190
|
+
kind(): ToolKind;
|
|
1191
|
+
isMutating(): Promise<boolean>;
|
|
1192
|
+
handle(invocation: ToolInvocation): Promise<FunctionToolOutput>;
|
|
1193
|
+
}
|
|
1194
|
+
type ExecCommandArgs = {
|
|
1195
|
+
cmd?: string;
|
|
1196
|
+
workdir?: string | null;
|
|
1197
|
+
};
|
|
1198
|
+
|
|
1199
|
+
declare const WRITE_STDIN_TOOL_NAME = "write_stdin";
|
|
1200
|
+
declare class WriteStdinHandler implements ToolHandler<FunctionToolOutput> {
|
|
1201
|
+
toolName(): ToolName;
|
|
1202
|
+
kind(): ToolKind;
|
|
1203
|
+
handle(invocation: ToolInvocation): Promise<FunctionToolOutput>;
|
|
1204
|
+
}
|
|
1205
|
+
|
|
1206
|
+
declare class CodeModeExecuteHandler implements ToolHandler<FunctionToolOutput> {
|
|
1207
|
+
toolName(): ToolName;
|
|
1208
|
+
kind(): ToolKind;
|
|
1209
|
+
handle(): Promise<FunctionToolOutput>;
|
|
1210
|
+
}
|
|
1211
|
+
|
|
1212
|
+
declare const CODE_MODE_EXECUTE_TOOL_NAME = "code_mode_execute";
|
|
1213
|
+
declare function create_code_mode_execute_tool(): {
|
|
1214
|
+
type: "function";
|
|
1215
|
+
name: string;
|
|
1216
|
+
description: string;
|
|
1217
|
+
strict: boolean;
|
|
1218
|
+
parameters: {
|
|
1219
|
+
type: string;
|
|
1220
|
+
properties: {};
|
|
1221
|
+
required: never[];
|
|
1222
|
+
additionalProperties: boolean;
|
|
1223
|
+
};
|
|
1224
|
+
};
|
|
1225
|
+
|
|
1226
|
+
declare function code_mode_response_item(item: ResponseInputItem): ResponseInputItem;
|
|
1227
|
+
|
|
1228
|
+
declare class CodeModeWaitHandler implements ToolHandler<FunctionToolOutput> {
|
|
1229
|
+
toolName(): ToolName;
|
|
1230
|
+
kind(): ToolKind;
|
|
1231
|
+
handle(): Promise<FunctionToolOutput>;
|
|
1232
|
+
}
|
|
1233
|
+
|
|
1234
|
+
declare const CODE_MODE_WAIT_TOOL_NAME = "code_mode_wait";
|
|
1235
|
+
declare function create_code_mode_wait_tool(): {
|
|
1236
|
+
type: "function";
|
|
1237
|
+
name: string;
|
|
1238
|
+
description: string;
|
|
1239
|
+
strict: boolean;
|
|
1240
|
+
parameters: {
|
|
1241
|
+
type: string;
|
|
1242
|
+
properties: {};
|
|
1243
|
+
required: never[];
|
|
1244
|
+
additionalProperties: boolean;
|
|
1245
|
+
};
|
|
1246
|
+
};
|
|
1247
|
+
|
|
1248
|
+
type ToolEventCtx = {
|
|
1249
|
+
session: Session;
|
|
1250
|
+
turn: TurnContext;
|
|
1251
|
+
call_id: string;
|
|
1252
|
+
};
|
|
1253
|
+
type ToolEventFailure = {
|
|
1254
|
+
type: "output";
|
|
1255
|
+
output: ExecToolCallOutput;
|
|
1256
|
+
} | {
|
|
1257
|
+
type: "message";
|
|
1258
|
+
message: string;
|
|
1259
|
+
} | {
|
|
1260
|
+
type: "rejected";
|
|
1261
|
+
message: string;
|
|
1262
|
+
};
|
|
1263
|
+
type ToolEventStage = {
|
|
1264
|
+
type: "begin";
|
|
1265
|
+
} | {
|
|
1266
|
+
type: "success";
|
|
1267
|
+
output: ExecToolCallOutput;
|
|
1268
|
+
} | {
|
|
1269
|
+
type: "failure";
|
|
1270
|
+
failure: ToolEventFailure;
|
|
1271
|
+
};
|
|
1272
|
+
type ToolEmitter = {
|
|
1273
|
+
type: "unified_exec";
|
|
1274
|
+
command: string[];
|
|
1275
|
+
cwd: string;
|
|
1276
|
+
process_id?: string | null;
|
|
1277
|
+
} | {
|
|
1278
|
+
type: "apply_patch";
|
|
1279
|
+
changes: Record<string, FileChange>;
|
|
1280
|
+
auto_approved?: boolean;
|
|
1281
|
+
};
|
|
1282
|
+
declare const ToolEmitter: {
|
|
1283
|
+
unified_exec(input: {
|
|
1284
|
+
command: string[];
|
|
1285
|
+
cwd: string;
|
|
1286
|
+
process_id?: string | null;
|
|
1287
|
+
}): ToolEmitter;
|
|
1288
|
+
apply_patch(input: {
|
|
1289
|
+
changes: Record<string, FileChange>;
|
|
1290
|
+
auto_approved?: boolean;
|
|
1291
|
+
}): ToolEmitter;
|
|
1292
|
+
};
|
|
1293
|
+
declare function emitToolEvent(emitter: ToolEmitter, ctx: ToolEventCtx, stage: ToolEventStage): Promise<void>;
|
|
1294
|
+
|
|
1295
|
+
type WebSearchToolOptions = {
|
|
1296
|
+
web_search_mode?: WebSearchMode | null;
|
|
1297
|
+
web_search_config?: WebSearchConfig | null;
|
|
1298
|
+
web_search_tool_type?: WebSearchToolType;
|
|
1299
|
+
};
|
|
1300
|
+
declare function create_image_generation_tool(outputFormat: string): ToolSpec;
|
|
1301
|
+
declare function create_web_search_tool(options: WebSearchToolOptions): ToolSpec | null;
|
|
1302
|
+
|
|
1303
|
+
declare const ToolApprovalRequirement: {
|
|
1304
|
+
readonly Skip: "skip";
|
|
1305
|
+
readonly NeedsApproval: "needs_approval";
|
|
1306
|
+
readonly Forbidden: "forbidden";
|
|
1307
|
+
};
|
|
1308
|
+
type ToolApprovalRequirement = {
|
|
1309
|
+
type: typeof ToolApprovalRequirement.Skip;
|
|
1310
|
+
} | {
|
|
1311
|
+
type: typeof ToolApprovalRequirement.NeedsApproval;
|
|
1312
|
+
reason?: string | null;
|
|
1313
|
+
} | {
|
|
1314
|
+
type: typeof ToolApprovalRequirement.Forbidden;
|
|
1315
|
+
reason: string;
|
|
1316
|
+
};
|
|
1317
|
+
declare class PermissionGrantStore {
|
|
1318
|
+
private readonly grants;
|
|
1319
|
+
private strict_auto_review;
|
|
1320
|
+
record(response: RequestPermissionsResponse): void;
|
|
1321
|
+
all(): RequestPermissionProfile[];
|
|
1322
|
+
hasGrants(): boolean;
|
|
1323
|
+
strictAutoReviewEnabled(): boolean;
|
|
1324
|
+
clear(): void;
|
|
1325
|
+
}
|
|
1326
|
+
declare class ToolOrchestrator {
|
|
1327
|
+
static defaultApprovalRequirement(): ToolApprovalRequirement;
|
|
1328
|
+
}
|
|
1329
|
+
declare function normalizeRequestPermissionsResponseForCwd(response: RequestPermissionsResponse, cwd: string): RequestPermissionsResponse;
|
|
1330
|
+
|
|
1331
|
+
declare function run_apply_patch_runtime(): Promise<FunctionToolOutput>;
|
|
1332
|
+
|
|
1333
|
+
declare function run_shell_runtime(): Promise<FunctionToolOutput>;
|
|
1334
|
+
|
|
1335
|
+
declare function run_unified_exec_runtime(): Promise<FunctionToolOutput>;
|
|
1336
|
+
|
|
1337
|
+
declare const TOOL_RUNTIME_UNAVAILABLE = "tool execution is unavailable in this Codex assistant runtime; a desktop/local executor is required.";
|
|
1338
|
+
|
|
1339
|
+
declare const ToolErrorKind: {
|
|
1340
|
+
readonly Rejected: "rejected";
|
|
1341
|
+
readonly Unavailable: "unavailable";
|
|
1342
|
+
readonly Failed: "failed";
|
|
1343
|
+
};
|
|
1344
|
+
type ToolErrorKind = (typeof ToolErrorKind)[keyof typeof ToolErrorKind];
|
|
1345
|
+
declare class ToolError extends Error {
|
|
1346
|
+
readonly kind: ToolErrorKind;
|
|
1347
|
+
constructor(kind: ToolErrorKind, message: string);
|
|
1348
|
+
static rejected(message: string): ToolError;
|
|
1349
|
+
static unavailable(message: string): ToolError;
|
|
1350
|
+
static failed(message: string): ToolError;
|
|
1351
|
+
}
|
|
1352
|
+
type SandboxAttempt = {
|
|
1353
|
+
sandbox: "none" | "read-only" | "workspace-write";
|
|
1354
|
+
permissions?: PermissionProfile | null;
|
|
1355
|
+
};
|
|
1356
|
+
type ToolCtx = {
|
|
1357
|
+
session: Session;
|
|
1358
|
+
turn: TurnContext;
|
|
1359
|
+
call_id: string;
|
|
1360
|
+
signal?: AbortSignal;
|
|
1361
|
+
};
|
|
1362
|
+
interface Sandboxable {
|
|
1363
|
+
sandbox_preference(): "auto" | "none";
|
|
1364
|
+
escalate_on_failure?(): boolean;
|
|
1365
|
+
}
|
|
1366
|
+
interface Approvable<TRequest> {
|
|
1367
|
+
approval_keys(request: TRequest): unknown[];
|
|
1368
|
+
}
|
|
1369
|
+
interface ToolRuntime<TRequest, TOutput> {
|
|
1370
|
+
run(request: TRequest, attempt: SandboxAttempt, ctx: ToolCtx): Promise<TOutput>;
|
|
1371
|
+
}
|
|
1372
|
+
|
|
1373
|
+
declare function build_tool_registry_plan(config: ToolsConfig, params: ToolRegistryPlanParams): ToolRegistryPlan;
|
|
1374
|
+
|
|
1375
|
+
declare class ToolRegistryBuilder {
|
|
1376
|
+
private readonly handlers;
|
|
1377
|
+
private readonly specs;
|
|
1378
|
+
pushSpec(spec: ToolSpec): void;
|
|
1379
|
+
pushSpecWithParallelSupport(spec: ToolSpec, supportsParallelToolCalls: boolean): void;
|
|
1380
|
+
registerHandler(handler: ToolHandler): void;
|
|
1381
|
+
build(): {
|
|
1382
|
+
specs: ConfiguredToolSpec[];
|
|
1383
|
+
registry: ToolRegistry;
|
|
1384
|
+
};
|
|
1385
|
+
}
|
|
1386
|
+
|
|
1387
|
+
type BuildSpecsWithDiscoverableToolsParams = ToolRegistryPlanParams & {
|
|
1388
|
+
dynamic_tools: readonly DynamicToolSpec[];
|
|
1389
|
+
mcp_tools?: readonly McpToolInfo[];
|
|
1390
|
+
};
|
|
1391
|
+
declare function build_specs_with_discoverable_tools(config: ToolsConfig, params: BuildSpecsWithDiscoverableToolsParams): ToolRegistryBuilder;
|
|
1392
|
+
|
|
1393
|
+
export { APPLY_PATCH_TOOL_NAME, AbortedToolOutput, AgentMessageTurnItem, AgentRegistry, AgentStatus, AnyToolResult, type ApplyPatchArgs, ApplyPatchHandler, type Approvable, type AssistantTextChunk, AssistantTextStreamParser, BaseInstructions, type BuildSpecsWithDiscoverableToolsParams, CLOSE_AGENT_TOOL_NAME, CODE_MODE_EXECUTE_TOOL_NAME, CODE_MODE_WAIT_TOOL_NAME, CONNECTOR_AUTH_FAILURE_AUTH_REASON_KEY, CONNECTOR_AUTH_FAILURE_CONNECTOR_ID_KEY, CONNECTOR_AUTH_FAILURE_ERROR_ACTION_KEY, CONNECTOR_AUTH_FAILURE_ERROR_CODE_KEY, CONNECTOR_AUTH_FAILURE_ERROR_HTTP_STATUS_CODE_KEY, CONNECTOR_AUTH_FAILURE_IS_AUTH_FAILURE_KEY, CONNECTOR_AUTH_FAILURE_LINK_ID_KEY, CONNECTOR_AUTH_FAILURE_META_KEY, CORE_TEMPLATES, CREATE_GOAL_TOOL_NAME, type CallToolResult, CancellationToken, CloseAgentHandler, CodeModeExecuteHandler, CodeModeWaitHandler, type CodexAppsAuthElicitation, type CodexAppsAuthElicitationPlan, type CodexAppsConnectorAuthFailure, CollaborationMode, CollaborationModeInstructions, CompactTask, type CompactTaskParams, type CompactTaskResult, type CompactTaskRunner, ConfiguredHookHandler, ConfiguredToolSpec, ContentItem, ContextManager, ContextualUserFragment, type ContextualUserFragmentParams, type CoreTemplatePath, CreateGoalHandler, CreateGoalRequest, DEFAULT_WAIT_TIMEOUT_MS, DiscoverableTool, DynamicToolHandler, type DynamicToolHandlerParams, DynamicToolSpec, ENVIRONMENT_CONTEXT_CLOSE_TAG, ENVIRONMENT_CONTEXT_OPEN_TAG, EXEC_COMMAND_TOOL_NAME, EnvironmentContext, type EnvironmentContextEnvironment, type ExecCommandArgs, ExecCommandHandler, ExecToolCallOutput, FOLLOWUP_TASK_TOOL_NAME, FileChange, FollowupTaskHandler, FunctionCallError, FunctionCallErrorKind, FunctionCallOutputContentItem, FunctionToolOutput, GET_GOAL_TOOL_NAME, GetGoalHandler, GoalRuntimeApplyResult, GoalRuntimeEvent, GoalRuntimeState, GoalToolOutput, type HandleOutputCtx, HookEventName, HookHandlerResult, HookPromptTurnItem, HookToolEventName, type InFlightFuture, LIST_AGENTS_TOOL_NAME, LIST_MCP_RESOURCES_TOOL_NAME, LIST_MCP_RESOURCE_TEMPLATES_TOOL_NAME, ListAgentsHandler, ListMcpResourceTemplatesHandler, ListMcpResourcesHandler, MAX_WAIT_TIMEOUT_MS, MCP_TOOL_CODEX_APPS_META_KEY, MIN_WAIT_TIMEOUT_MS, McpToolHandler, McpToolInfo, McpToolOutput, ModeKind, ModelClient, ModelClientSessionHandle, ModelSwitchInstructions, type NetworkApprovalDecision, type NetworkContext, type OutputItemResult, PLAN_TOOL_NAME, PermissionGrantStore, PermissionProfile, PermissionsInstructions, PlanHandler, PlanModeStreamState, type PostToolUsePayload, type PreToolUsePayload, type PreviousTurnSettings, ProposedPlanParser, type ProposedPlanSegment, ProviderCapabilities, READ_MCP_RESOURCE_TOOL_NAME, REQUEST_PLUGIN_INSTALL_TOOL_NAME, RESUME_AGENT_TOOL_NAME, RateLimitSnapshot, ReadMcpResourceHandler, RegularTask, type RegularTaskParams, type RegularTaskRunner, RequestPermissionProfile, RequestPermissionsHandler, RequestPermissionsResponse, RequestPluginInstallHandler, RequestUserInputHandler, type RequestUserInputHandlerParams, ResponseInputItem, ResponseItem, ResumeAgentHandler, RolloutItem, type RolloutReconstruction, type RunTurnParams, SEND_INPUT_TOOL_NAME, SEND_MESSAGE_TOOL_NAME, SPAWN_AGENT_TOOL_NAME, SUMMARIZATION_PROMPT, SUMMARY_PREFIX, type SamplingRequestResult, type SandboxAttempt, type Sandboxable, type SearchToolCallParams, SendInputHandler, SendMessageHandler, Session, SessionConfiguration, SessionState, type SessionStateParams, SessionTask, SessionTaskResult, SessionTaskRunInput, SetGoalRequest, type ShellToolCallParams, SpawnAgentHandler, type StreamTextChunk, Submission, TEST_SYNC_TOOL_NAME, TOOL_RUNTIME_UNAVAILABLE, TURN_ABORTED_INTERRUPTED_GUIDANCE, TaskKind, ThreadGoal, ThreadGoalStore, ThreadId, TokenUsage, TokenUsageInfo, ToolApprovalRequirement, type ToolArgumentDiffConsumer, type ToolCall, ToolCallRuntime, type ToolCallRuntimeParams, type ToolCallSource, type ToolCtx, ToolDispatchTrace, ToolEmitter, ToolError, ToolErrorKind, type ToolEventCtx, type ToolEventFailure, type ToolEventStage, type ToolHandler, type ToolInvocation, ToolKind, ToolName, ToolNameInput, ToolOrchestrator, type ToolOutput, type ToolPayload, ToolRegistry, ToolRegistryBuilder, ToolRegistryPlan, ToolRegistryPlanParams, ToolRouter, type ToolRouterParams, type ToolRuntime, ToolSearchEntry, ToolSearchHandler, ToolSearchOutput, ToolSearchSourceInfo, ToolSpec, ToolsConfig, TotalTokenUsageBreakdown, TruncationPolicy, TurnContext, TurnContextItem, TurnItem, UPDATE_GOAL_TOOL_NAME, UnavailableToolHandler, type UniversalHookOutput, UpdateGoalHandler, UserInstructions, UserMessageTurnItem, WAIT_AGENT_TOOL_NAME, WRITE_STDIN_TOOL_NAME, WaitAgentHandler, type WaitAgentTimeoutOptions, WebSearchConfig, WebSearchMode, type WebSearchToolOptions, WebSearchToolType, WriteStdinHandler, agent_status_from_event, auth_elicitation_completed_result, auth_elicitation_id, auth_elicitation_message, budget_limit_prompt, budget_limit_steering_item, buildCollaborationModeInstructions, buildCompactedHistory, buildInitialContextItems, buildModelInstructionsUpdateItem, buildPromptBaseInstructions, buildPromptInputWithContext, buildSettingsUpdateItems, build_auth_elicitation, build_auth_elicitation_plan, build_specs_with_discoverable_tools, build_tool_registry_plan, code_mode_response_item, collectUserMessages, compactedThreadWarning, connector_auth_failure_from_tool_result, contentItemsToText, contextualFragmentMatchesText, create_apply_patch_tool, create_code_mode_execute_tool, create_code_mode_wait_tool, create_create_goal_tool, create_exec_command_tool, create_get_goal_tool, create_image_generation_tool, create_list_mcp_resource_templates_tool, create_list_mcp_resources_tool, create_plan_tool, create_read_mcp_resource_tool, create_request_plugin_install_tool, create_test_sync_tool, create_tool_search_tool, create_update_goal_tool, create_update_plan_tool, create_web_search_tool, create_write_stdin_tool, dynamicToolName, emitToolEvent, ensureCallOutputsPresent, extractProposedPlanText, goalToolOutput, handle_non_tool_response_item, handle_output_item_done, hasNonContextualDevMessageContent, isContextualDevMessageContent, isContextualUserMessageContent, isSummaryMessage, is_final, last_assistant_message_from_item, loadCoreTemplate, logPayload, looks_like_json, matcher_inputs, matchesToolKind, matches_matcher, mcpArgumentsFromPayload, network_approval_denied_error, normalizeRequestPermissionsResponseForCwd, normalizeResponseHistory, parseAgentMessage, parseApplyPatchChanges, parseTurnItem, parseUserMessage, parseVisibleHookPromptMessage, parse_hook_handler_json, reconstructHistoryFromRollout, record_completed_response_item, remainingTokenBudget, removeCorrespondingFor, removeOrphanOutputs, renderCoreTemplate, request_network_approval, resolve_agent_target, runTurn, run_apply_patch_runtime, run_compact_task, run_sampling_request, run_shell_runtime, run_unified_exec_runtime, select_handlers, select_handlers_for_matcher_inputs, stripImagesWhenUnsupported, stripProposedPlanBlocks, totalTokensFromTokenUsageInfo, turnAbortedResponseItem, unavailable_tool_message };
|