refactor: point agent sdk imports at ts source
This commit is contained in:
@@ -13,7 +13,7 @@ import type {
|
||||
SDKPermissionDenial,
|
||||
SDKStatus,
|
||||
SDKUserMessageReplay,
|
||||
} from 'src/entrypoints/agentSdkTypes.js'
|
||||
} from 'src/entrypoints/agentSdkTypes.ts'
|
||||
import { accumulateUsage, updateUsage } from 'src/services/api/claude.js'
|
||||
import type { NonNullableUsage } from 'src/services/api/logging.js'
|
||||
import { EMPTY_USAGE } from 'src/services/api/logging.js'
|
||||
|
||||
@@ -74,7 +74,7 @@ export type {
|
||||
|
||||
import type { SpinnerMode } from './components/Spinner.js'
|
||||
import type { QuerySource } from './constants/querySource.js'
|
||||
import type { SDKStatus } from './entrypoints/agentSdkTypes.js'
|
||||
import type { SDKStatus } from './entrypoints/agentSdkTypes.ts'
|
||||
import type { AppState } from './state/AppState.js'
|
||||
import type {
|
||||
HookProgress,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import axios from 'axios'
|
||||
import { getOauthConfig } from '../constants/oauth.js'
|
||||
import type { SDKMessage } from '../entrypoints/agentSdkTypes.js'
|
||||
import type { SDKMessage } from '../entrypoints/agentSdkTypes.ts'
|
||||
import { logForDebugging } from '../utils/debug.js'
|
||||
import { getOAuthHeaders, prepareApiRequest } from '../utils/teleport/api.js'
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ import type { BasicTracerProvider } from '@opentelemetry/sdk-trace-base'
|
||||
import { realpathSync } from 'fs'
|
||||
import sumBy from 'lodash-es/sumBy.js'
|
||||
import { cwd } from 'process'
|
||||
import type { HookEvent, ModelUsage } from 'src/entrypoints/agentSdkTypes.js'
|
||||
import type { HookEvent, ModelUsage } from 'src/entrypoints/agentSdkTypes.ts'
|
||||
import type { AgentColorName } from 'src/tools/AgentTool/agentColorManager.js'
|
||||
import type { HookCallbackMatcher } from 'src/types/hooks.js'
|
||||
// Indirection for browser-sdk build (package.json "browser" field swaps
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
*/
|
||||
|
||||
import { randomUUID } from 'crypto'
|
||||
import type { SDKMessage } from '../entrypoints/agentSdkTypes.js'
|
||||
import type { SDKMessage } from '../entrypoints/agentSdkTypes.ts'
|
||||
import type {
|
||||
SDKControlRequest,
|
||||
SDKControlResponse,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { SDKMessage } from '../entrypoints/agentSdkTypes.js'
|
||||
import type { SDKMessage } from '../entrypoints/agentSdkTypes.ts'
|
||||
import { logForDebugging } from '../utils/debug.js'
|
||||
import { errorMessage } from '../utils/errors.js'
|
||||
import { extractErrorDetail } from './debugUtils.js'
|
||||
|
||||
@@ -4,7 +4,7 @@ import type {
|
||||
ImageBlockParam,
|
||||
} from '@anthropic-ai/sdk/resources/messages.mjs'
|
||||
import type { UUID } from 'crypto'
|
||||
import type { SDKMessage } from '../entrypoints/agentSdkTypes.js'
|
||||
import type { SDKMessage } from '../entrypoints/agentSdkTypes.ts'
|
||||
import { detectImageFormatFromBase64 } from '../utils/imageResizer.js'
|
||||
|
||||
/**
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
import { feature } from 'bun:bundle'
|
||||
import { hostname } from 'os'
|
||||
import { getOriginalCwd, getSessionId } from '../bootstrap/state.js'
|
||||
import type { SDKMessage } from '../entrypoints/agentSdkTypes.js'
|
||||
import type { SDKMessage } from '../entrypoints/agentSdkTypes.ts'
|
||||
import type { SDKControlResponse } from '../entrypoints/sdk/controlTypes.ts'
|
||||
import { getFeatureValue_CACHED_WITH_REFRESH } from '../services/analytics/growthbook.js'
|
||||
import { getOrganizationUUID } from '../services/oauth/client.js'
|
||||
|
||||
@@ -64,7 +64,7 @@ import {
|
||||
} from '../services/analytics/index.js'
|
||||
import type { ReplBridgeHandle, BridgeState } from './replBridge.js'
|
||||
import type { Message } from '../types/message.js'
|
||||
import type { SDKMessage } from '../entrypoints/agentSdkTypes.js'
|
||||
import type { SDKMessage } from '../entrypoints/agentSdkTypes.ts'
|
||||
import type {
|
||||
SDKControlRequest,
|
||||
SDKControlResponse,
|
||||
|
||||
@@ -46,7 +46,7 @@ import {
|
||||
logBridgeSkip,
|
||||
} from './debugUtils.js'
|
||||
import type { Message } from '../types/message.js'
|
||||
import type { SDKMessage } from '../entrypoints/agentSdkTypes.js'
|
||||
import type { SDKMessage } from '../entrypoints/agentSdkTypes.ts'
|
||||
import type { PermissionMode } from '../utils/permissions/PermissionMode.js'
|
||||
import type {
|
||||
SDKControlRequest,
|
||||
|
||||
@@ -13,7 +13,7 @@ import { c as _c } from "react/compiler-runtime";
|
||||
*/
|
||||
import * as React from 'react';
|
||||
import { useCallback, useMemo, useState } from 'react';
|
||||
import type { HookEvent } from 'src/entrypoints/agentSdkTypes.js';
|
||||
import type { HookEvent } from 'src/entrypoints/agentSdkTypes.ts';
|
||||
import { useAppState, useAppStateStore } from 'src/state/AppState.js';
|
||||
import type { CommandResultDisplay } from '../../commands.js';
|
||||
import { useSettingsChange } from '../../hooks/useSettingsChange.js';
|
||||
|
||||
@@ -10,7 +10,7 @@ import { c as _c } from "react/compiler-runtime";
|
||||
|
||||
import figures from 'figures';
|
||||
import * as React from 'react';
|
||||
import type { HookEvent } from 'src/entrypoints/agentSdkTypes.js';
|
||||
import type { HookEvent } from 'src/entrypoints/agentSdkTypes.ts';
|
||||
import type { HookEventMetadata } from 'src/utils/hooks/hooksConfigManager.js';
|
||||
import { Box, Link, Text } from '../../ink.js';
|
||||
import { plural } from '../../utils/stringUtils.js';
|
||||
|
||||
@@ -7,7 +7,7 @@ import { c as _c } from "react/compiler-runtime";
|
||||
* confirmation.
|
||||
*/
|
||||
import * as React from 'react';
|
||||
import type { HookEvent } from 'src/entrypoints/agentSdkTypes.js';
|
||||
import type { HookEvent } from 'src/entrypoints/agentSdkTypes.ts';
|
||||
import type { HookEventMetadata } from 'src/utils/hooks/hooksConfigManager.js';
|
||||
import { Box, Text } from '../../ink.js';
|
||||
import { getHookDisplayText, hookSourceHeaderDisplayString, type IndividualHookConfig } from '../../utils/hooks/hooksSettings.js';
|
||||
|
||||
@@ -6,7 +6,7 @@ import { c as _c } from "react/compiler-runtime";
|
||||
* and simply lets the user drill into each matcher to see its hooks.
|
||||
*/
|
||||
import * as React from 'react';
|
||||
import type { HookEvent } from 'src/entrypoints/agentSdkTypes.js';
|
||||
import type { HookEvent } from 'src/entrypoints/agentSdkTypes.ts';
|
||||
import { Box, Text } from '../../ink.js';
|
||||
import { type HookSource, hookSourceInlineDisplayString, type IndividualHookConfig } from '../../utils/hooks/hooksSettings.js';
|
||||
import { plural } from '../../utils/stringUtils.js';
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { c as _c } from "react/compiler-runtime";
|
||||
import * as React from 'react';
|
||||
import type { HookEvent } from 'src/entrypoints/agentSdkTypes.js';
|
||||
import type { HookEvent } from 'src/entrypoints/agentSdkTypes.ts';
|
||||
import type { buildMessageLookups } from 'src/utils/messages.js';
|
||||
import { Box, Text } from '../../ink.js';
|
||||
import { MessageResponse } from '../MessageResponse.js';
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { c as _c } from "react/compiler-runtime";
|
||||
import figures from 'figures';
|
||||
import React, { useMemo, useState } from 'react';
|
||||
import type { SDKMessage } from 'src/entrypoints/agentSdkTypes.js';
|
||||
import type { SDKMessage } from 'src/entrypoints/agentSdkTypes.ts';
|
||||
import type { ToolUseContext } from 'src/Tool.js';
|
||||
import type { DeepImmutable } from 'src/types/utils.js';
|
||||
import type { CommandResultDisplay } from '../../commands.js';
|
||||
|
||||
@@ -27,7 +27,7 @@ import {
|
||||
setCostStateForRestore,
|
||||
setHasUnknownModelCost,
|
||||
} from './bootstrap/state.js'
|
||||
import type { ModelUsage } from './entrypoints/agentSdkTypes.js'
|
||||
import type { ModelUsage } from './entrypoints/agentSdkTypes.ts'
|
||||
import {
|
||||
type AnalyticsMetadata_I_VERIFIED_THIS_IS_NOT_CODE_OR_FILEPATHS,
|
||||
logEvent,
|
||||
|
||||
@@ -10,7 +10,7 @@ import type { Command } from '../commands.js';
|
||||
import { getSlashCommandToolSkills, isBridgeSafeCommand } from '../commands.js';
|
||||
import { getRemoteSessionUrl } from '../constants/product.js';
|
||||
import { useNotifications } from '../context/notifications.js';
|
||||
import type { PermissionMode, SDKMessage } from '../entrypoints/agentSdkTypes.js';
|
||||
import type { PermissionMode, SDKMessage } from '../entrypoints/agentSdkTypes.ts';
|
||||
import type { SDKControlResponse } from '../entrypoints/sdk/controlTypes.ts';
|
||||
import { Text } from '../ink.js';
|
||||
import { getFeatureValue_CACHED_MAY_BE_STALE } from '../services/analytics/growthbook.js';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { SDKMessage } from '../entrypoints/agentSdkTypes.js'
|
||||
import type { SDKMessage } from '../entrypoints/agentSdkTypes.ts'
|
||||
import type {
|
||||
SDKControlCancelRequest,
|
||||
SDKControlPermissionRequest,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { randomUUID } from 'crypto'
|
||||
import { getOauthConfig } from '../constants/oauth.js'
|
||||
import type { SDKMessage } from '../entrypoints/agentSdkTypes.js'
|
||||
import type { SDKMessage } from '../entrypoints/agentSdkTypes.ts'
|
||||
import type {
|
||||
SDKControlCancelRequest,
|
||||
SDKControlRequest,
|
||||
|
||||
@@ -7,7 +7,7 @@ import type {
|
||||
SDKStatusMessage,
|
||||
SDKSystemMessage,
|
||||
SDKToolProgressMessage,
|
||||
} from '../entrypoints/agentSdkTypes.js'
|
||||
} from '../entrypoints/agentSdkTypes.ts'
|
||||
import type {
|
||||
AssistantMessage,
|
||||
Message,
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
* Both files now import from this shared location instead of each other.
|
||||
*/
|
||||
|
||||
import { HOOK_EVENTS, type HookEvent } from 'src/entrypoints/agentSdkTypes.js'
|
||||
import { HOOK_EVENTS, type HookEvent } from 'src/entrypoints/agentSdkTypes.ts'
|
||||
import { z } from 'zod/v4'
|
||||
import { lazySchema } from '../utils/lazySchema.js'
|
||||
import { SHELL_TYPES } from '../utils/shell/shellProvider.js'
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* eslint-disable eslint-plugin-n/no-unsupported-features/node-builtins */
|
||||
|
||||
import type { SDKMessage } from '../entrypoints/agentSdkTypes.js'
|
||||
import type { SDKMessage } from '../entrypoints/agentSdkTypes.ts'
|
||||
import type {
|
||||
SDKControlPermissionRequest,
|
||||
StdoutMessage,
|
||||
|
||||
@@ -8,7 +8,7 @@ import type {
|
||||
BetaStopReason,
|
||||
} from '@anthropic-ai/sdk/resources/beta/messages/messages.mjs'
|
||||
import { AFK_MODE_BETA_HEADER } from 'src/constants/betas.js'
|
||||
import type { SDKAssistantMessageError } from 'src/entrypoints/agentSdkTypes.js'
|
||||
import type { SDKAssistantMessageError } from 'src/entrypoints/agentSdkTypes.ts'
|
||||
import type {
|
||||
AssistantMessage,
|
||||
Message,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import type { ToolUseBlock } from '@anthropic-ai/sdk/resources';
|
||||
import { getRemoteSessionUrl } from '../../constants/product.js';
|
||||
import { OUTPUT_FILE_TAG, REMOTE_REVIEW_PROGRESS_TAG, REMOTE_REVIEW_TAG, STATUS_TAG, SUMMARY_TAG, TASK_ID_TAG, TASK_NOTIFICATION_TAG, TASK_TYPE_TAG, TOOL_USE_ID_TAG, ULTRAPLAN_TAG } from '../../constants/xml.js';
|
||||
import type { SDKAssistantMessage, SDKMessage } from '../../entrypoints/agentSdkTypes.js';
|
||||
import type { SDKAssistantMessage, SDKMessage } from '../../entrypoints/agentSdkTypes.ts';
|
||||
import type { SetAppState, Task, TaskContext, TaskStateBase } from '../../Task.js';
|
||||
import { createTaskStateBase, generateTaskId } from '../../Task.js';
|
||||
import { TodoWriteTool } from '../../tools/TodoWriteTool/TodoWriteTool.js';
|
||||
|
||||
@@ -6,12 +6,12 @@ import {
|
||||
HOOK_EVENTS,
|
||||
type HookInput,
|
||||
type PermissionUpdate,
|
||||
} from 'src/entrypoints/agentSdkTypes.js'
|
||||
} from 'src/entrypoints/agentSdkTypes.ts'
|
||||
import type {
|
||||
HookJSONOutput,
|
||||
AsyncHookJSONOutput,
|
||||
SyncHookJSONOutput,
|
||||
} from 'src/entrypoints/agentSdkTypes.js'
|
||||
} from 'src/entrypoints/agentSdkTypes.ts'
|
||||
import type { Message } from 'src/types/message.js'
|
||||
import type { PermissionResult } from 'src/utils/permissions/PermissionResult.js'
|
||||
import { permissionBehaviorSchema } from 'src/utils/permissions/PermissionRule.js'
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import type { ContentBlockParam } from '@anthropic-ai/sdk/resources/messages.mjs'
|
||||
import type { UUID } from 'crypto'
|
||||
import type React from 'react'
|
||||
import type { PermissionResult } from '../entrypoints/agentSdkTypes.js'
|
||||
import type { PermissionResult } from '../entrypoints/agentSdkTypes.ts'
|
||||
import type { Key } from '../ink.js'
|
||||
import type { PastedContent } from '../utils/config.js'
|
||||
import type { ImageDimensions } from '../utils/imageResizer.js'
|
||||
|
||||
@@ -178,7 +178,7 @@ import type { MCPServerConnection } from '../services/mcp/types.js'
|
||||
import type {
|
||||
HookEvent,
|
||||
SyncHookJSONOutput,
|
||||
} from 'src/entrypoints/agentSdkTypes.js'
|
||||
} from 'src/entrypoints/agentSdkTypes.ts'
|
||||
import {
|
||||
checkForAsyncHookResponses,
|
||||
removeDeliveredAsyncHooks,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { SDKMessage } from 'src/entrypoints/agentSdkTypes.js'
|
||||
import type { SDKMessage } from 'src/entrypoints/agentSdkTypes.ts'
|
||||
import { checkGate_CACHED_OR_BLOCKING } from '../../../services/analytics/growthbook.js'
|
||||
import { isPolicyAllowed } from '../../../services/policyLimits/index.js'
|
||||
import { detectCurrentRepositoryWithHost } from '../../detectRepository.js'
|
||||
|
||||
@@ -2,7 +2,7 @@ import chalk from 'chalk'
|
||||
import { writeSync } from 'fs'
|
||||
import memoize from 'lodash-es/memoize.js'
|
||||
import { onExit } from 'signal-exit'
|
||||
import type { ExitReason } from 'src/entrypoints/agentSdkTypes.js'
|
||||
import type { ExitReason } from 'src/entrypoints/agentSdkTypes.ts'
|
||||
import {
|
||||
getIsInteractive,
|
||||
getIsScrollDraining,
|
||||
|
||||
@@ -106,7 +106,7 @@ import type {
|
||||
ExitReason,
|
||||
SyncHookJSONOutput,
|
||||
AsyncHookJSONOutput,
|
||||
} from 'src/entrypoints/agentSdkTypes.js'
|
||||
} from 'src/entrypoints/agentSdkTypes.ts'
|
||||
import type { StatusLineCommandInput } from '../types/statusLine.js'
|
||||
import type { ElicitResult } from '@modelcontextprotocol/sdk/types.js'
|
||||
import type { FileSuggestionCommandInput } from '../types/fileSuggestion.js'
|
||||
|
||||
@@ -2,7 +2,7 @@ import type {
|
||||
AsyncHookJSONOutput,
|
||||
HookEvent,
|
||||
SyncHookJSONOutput,
|
||||
} from 'src/entrypoints/agentSdkTypes.js'
|
||||
} from 'src/entrypoints/agentSdkTypes.ts'
|
||||
import { logForDebugging } from '../debug.js'
|
||||
import type { ShellCommand } from '../ShellCommand.js'
|
||||
import { invalidateSessionEnvCache } from '../sessionEnvironment.js'
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { randomUUID } from 'crypto'
|
||||
import type { HookEvent } from 'src/entrypoints/agentSdkTypes.js'
|
||||
import type { HookEvent } from 'src/entrypoints/agentSdkTypes.ts'
|
||||
import { query } from '../../query.js'
|
||||
import { logEvent } from '../../services/analytics/index.js'
|
||||
import type { AnalyticsMetadata_I_VERIFIED_THIS_IS_NOT_CODE_OR_FILEPATHS } from '../../services/analytics/metadata.js'
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import axios from 'axios'
|
||||
import type { HookEvent } from 'src/entrypoints/agentSdkTypes.js'
|
||||
import type { HookEvent } from 'src/entrypoints/agentSdkTypes.ts'
|
||||
import { createCombinedAbortSignal } from '../combinedAbortSignal.js'
|
||||
import { logForDebugging } from '../debug.js'
|
||||
import { errorMessage } from '../errors.js'
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { randomUUID } from 'crypto'
|
||||
import type { HookEvent } from 'src/entrypoints/agentSdkTypes.js'
|
||||
import type { HookEvent } from 'src/entrypoints/agentSdkTypes.ts'
|
||||
import { queryModelWithoutStreaming } from '../../services/api/claude.js'
|
||||
import type { ToolUseContext } from '../../Tool.js'
|
||||
import type { Message } from '../../types/message.js'
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import memoize from 'lodash-es/memoize.js'
|
||||
import type { HookEvent } from 'src/entrypoints/agentSdkTypes.js'
|
||||
import type { HookEvent } from 'src/entrypoints/agentSdkTypes.ts'
|
||||
import { getRegisteredHooks } from '../../bootstrap/state.js'
|
||||
import type { AppState } from '../../state/AppState.js'
|
||||
import {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { resolve } from 'path'
|
||||
import type { HookEvent } from 'src/entrypoints/agentSdkTypes.js'
|
||||
import type { HookEvent } from 'src/entrypoints/agentSdkTypes.ts'
|
||||
import { getSessionId } from '../../bootstrap/state.js'
|
||||
import type { AppState } from '../../state/AppState.js'
|
||||
import type { EditableSettingSource } from '../settings/constants.js'
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { HOOK_EVENTS, type HookEvent } from 'src/entrypoints/agentSdkTypes.js'
|
||||
import { HOOK_EVENTS, type HookEvent } from 'src/entrypoints/agentSdkTypes.ts'
|
||||
import type { AppState } from 'src/state/AppState.js'
|
||||
import { logForDebugging } from '../debug.js'
|
||||
import type { HooksSettings } from '../settings/types.js'
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { HOOK_EVENTS } from 'src/entrypoints/agentSdkTypes.js'
|
||||
import { HOOK_EVENTS } from 'src/entrypoints/agentSdkTypes.ts'
|
||||
import type { AppState } from 'src/state/AppState.js'
|
||||
import { logForDebugging } from '../debug.js'
|
||||
import type { HooksSettings } from '../settings/types.js'
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { HOOK_EVENTS, type HookEvent } from 'src/entrypoints/agentSdkTypes.js'
|
||||
import { HOOK_EVENTS, type HookEvent } from 'src/entrypoints/agentSdkTypes.ts'
|
||||
import type { AppState } from 'src/state/AppState.js'
|
||||
import type { Message } from 'src/types/message.js'
|
||||
import { logForDebugging } from '../debug.js'
|
||||
|
||||
@@ -102,7 +102,7 @@ import type {
|
||||
import type {
|
||||
HookEvent,
|
||||
SDKAssistantMessageError,
|
||||
} from 'src/entrypoints/agentSdkTypes.js'
|
||||
} from 'src/entrypoints/agentSdkTypes.ts'
|
||||
import { EXPLORE_AGENT } from 'src/tools/AgentTool/built-in/exploreAgent.js'
|
||||
import { PLAN_AGENT } from 'src/tools/AgentTool/built-in/planAgent.js'
|
||||
import { areExplorePlanAgentsEnabled } from 'src/tools/AgentTool/builtInAgents.js'
|
||||
|
||||
@@ -10,7 +10,7 @@ import type {
|
||||
SDKCompactBoundaryMessage,
|
||||
SDKMessage,
|
||||
SDKRateLimitInfo,
|
||||
} from 'src/entrypoints/agentSdkTypes.js'
|
||||
} from 'src/entrypoints/agentSdkTypes.ts'
|
||||
import type { ClaudeAILimits } from 'src/services/claudeAiLimits.js'
|
||||
import { EXIT_PLAN_MODE_V2_TOOL_NAME } from 'src/tools/ExitPlanModeTool/constants.js'
|
||||
import type {
|
||||
|
||||
@@ -6,7 +6,7 @@ import type {
|
||||
ApiKeySource,
|
||||
PermissionMode,
|
||||
SDKMessage,
|
||||
} from 'src/entrypoints/agentSdkTypes.js'
|
||||
} from 'src/entrypoints/agentSdkTypes.ts'
|
||||
import {
|
||||
AGENT_TOOL_NAME,
|
||||
LEGACY_AGENT_TOOL_NAME,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import memoize from 'lodash-es/memoize.js'
|
||||
import type { HookEvent } from 'src/entrypoints/agentSdkTypes.js'
|
||||
import type { HookEvent } from 'src/entrypoints/agentSdkTypes.ts'
|
||||
import {
|
||||
clearRegisteredPluginHooks,
|
||||
getRegisteredHooks,
|
||||
|
||||
@@ -4,7 +4,7 @@ import {
|
||||
getSessionId,
|
||||
isSessionPersistenceDisabled,
|
||||
} from 'src/bootstrap/state.js'
|
||||
import type { SDKMessage } from 'src/entrypoints/agentSdkTypes.js'
|
||||
import type { SDKMessage } from 'src/entrypoints/agentSdkTypes.ts'
|
||||
import type { CanUseToolFn } from '../hooks/useCanUseTool.js'
|
||||
import { runTools } from '../services/tools/toolOrchestration.js'
|
||||
import { findToolByName, type Tool, type Tools } from '../Tool.js'
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
*/
|
||||
import { feature } from 'bun:bundle'
|
||||
import { registerHookCallbacks } from '../bootstrap/state.js'
|
||||
import type { HookInput, HookJSONOutput } from '../entrypoints/agentSdkTypes.js'
|
||||
import type { HookInput, HookJSONOutput } from '../entrypoints/agentSdkTypes.ts'
|
||||
import {
|
||||
type AnalyticsMetadata_I_VERIFIED_THIS_IS_NOT_CODE_OR_FILEPATHS,
|
||||
logEvent,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { feature } from 'bun:bundle'
|
||||
import { open } from 'fs/promises'
|
||||
import { basename, dirname, join, sep } from 'path'
|
||||
import type { ModelUsage } from 'src/entrypoints/agentSdkTypes.js'
|
||||
import type { ModelUsage } from 'src/entrypoints/agentSdkTypes.ts'
|
||||
import type { Entry, TranscriptMessage } from '../types/logs.js'
|
||||
import { logForDebugging } from './debug.js'
|
||||
import { errorMessage, isENOENT } from './errors.js'
|
||||
|
||||
@@ -2,7 +2,7 @@ import { feature } from 'bun:bundle'
|
||||
import { randomBytes } from 'crypto'
|
||||
import { open } from 'fs/promises'
|
||||
import { join } from 'path'
|
||||
import type { ModelUsage } from '../entrypoints/agentSdkTypes.js'
|
||||
import type { ModelUsage } from '../entrypoints/agentSdkTypes.ts'
|
||||
import { logForDebugging } from './debug.js'
|
||||
import { getClaudeConfigHomeDir } from './envUtils.js'
|
||||
import { errorMessage } from './errors.js'
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
* - Strips tool list and model info from init messages
|
||||
*/
|
||||
|
||||
import type { SDKAssistantMessage } from 'src/entrypoints/agentSdkTypes.js'
|
||||
import type { SDKAssistantMessage } from 'src/entrypoints/agentSdkTypes.ts'
|
||||
import type { StdoutMessage } from 'src/entrypoints/sdk/controlTypes.ts'
|
||||
import { FILE_EDIT_TOOL_NAME } from 'src/tools/FileEditTool/constants.js'
|
||||
import { FILE_READ_TOOL_NAME } from 'src/tools/FileReadTool/prompt.js'
|
||||
|
||||
@@ -9,7 +9,7 @@ import { isPolicyAllowed } from 'src/services/policyLimits/index.js';
|
||||
import { z } from 'zod/v4';
|
||||
import { getTeleportErrors, TeleportError, type TeleportLocalErrorType } from '../components/TeleportError.js';
|
||||
import { getOauthConfig } from '../constants/oauth.js';
|
||||
import type { SDKMessage } from '../entrypoints/agentSdkTypes.js';
|
||||
import type { SDKMessage } from '../entrypoints/agentSdkTypes.ts';
|
||||
import type { Root } from '../ink.js';
|
||||
import { KeybindingSetup } from '../keybindings/KeybindingProviderSetup.js';
|
||||
import { queryHaiku } from '../services/api/claude.js';
|
||||
|
||||
@@ -8,7 +8,7 @@ import type {
|
||||
ToolResultBlockParam,
|
||||
ToolUseBlock,
|
||||
} from '@anthropic-ai/sdk/resources'
|
||||
import type { SDKMessage } from '../../entrypoints/agentSdkTypes.js'
|
||||
import type { SDKMessage } from '../../entrypoints/agentSdkTypes.ts'
|
||||
import { EXIT_PLAN_MODE_V2_TOOL_NAME } from '../../tools/ExitPlanModeTool/constants.js'
|
||||
import { logForDebugging } from '../debug.js'
|
||||
import { sleep } from '../sleep.js'
|
||||
|
||||
Reference in New Issue
Block a user