Compare commits
4 Commits
e8da02f5bc
...
20523234e0
| Author | SHA1 | Date | |
|---|---|---|---|
| 20523234e0 | |||
| ecec8b6ba7 | |||
| 23a61be07b | |||
| fa9c74e7b7 |
@@ -15,8 +15,8 @@ import type { SDKMessage } from '../entrypoints/agentSdkTypes.js'
|
|||||||
import type {
|
import type {
|
||||||
SDKControlRequest,
|
SDKControlRequest,
|
||||||
SDKControlResponse,
|
SDKControlResponse,
|
||||||
} from '../entrypoints/sdk/controlTypes.js'
|
} from '../entrypoints/sdk/controlTypes.ts'
|
||||||
import type { SDKResultSuccess } from '../entrypoints/sdk/coreTypes.js'
|
import type { SDKResultSuccess } from '../entrypoints/sdk/coreTypes.ts'
|
||||||
import { logEvent } from '../services/analytics/index.js'
|
import { logEvent } from '../services/analytics/index.js'
|
||||||
import { EMPTY_USAGE } from '../services/api/emptyUsage.js'
|
import { EMPTY_USAGE } from '../services/api/emptyUsage.js'
|
||||||
import type { Message } from '../types/message.js'
|
import type { Message } from '../types/message.js'
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ import { feature } from 'bun:bundle'
|
|||||||
import { hostname } from 'os'
|
import { hostname } from 'os'
|
||||||
import { getOriginalCwd, getSessionId } from '../bootstrap/state.js'
|
import { getOriginalCwd, getSessionId } from '../bootstrap/state.js'
|
||||||
import type { SDKMessage } from '../entrypoints/agentSdkTypes.js'
|
import type { SDKMessage } from '../entrypoints/agentSdkTypes.js'
|
||||||
import type { SDKControlResponse } from '../entrypoints/sdk/controlTypes.js'
|
import type { SDKControlResponse } from '../entrypoints/sdk/controlTypes.ts'
|
||||||
import { getFeatureValue_CACHED_WITH_REFRESH } from '../services/analytics/growthbook.js'
|
import { getFeatureValue_CACHED_WITH_REFRESH } from '../services/analytics/growthbook.js'
|
||||||
import { getOrganizationUUID } from '../services/oauth/client.js'
|
import { getOrganizationUUID } from '../services/oauth/client.js'
|
||||||
import {
|
import {
|
||||||
|
|||||||
@@ -68,7 +68,7 @@ import type { SDKMessage } from '../entrypoints/agentSdkTypes.js'
|
|||||||
import type {
|
import type {
|
||||||
SDKControlRequest,
|
SDKControlRequest,
|
||||||
SDKControlResponse,
|
SDKControlResponse,
|
||||||
} from '../entrypoints/sdk/controlTypes.js'
|
} from '../entrypoints/sdk/controlTypes.ts'
|
||||||
import type { PermissionMode } from '../utils/permissions/PermissionMode.js'
|
import type { PermissionMode } from '../utils/permissions/PermissionMode.js'
|
||||||
|
|
||||||
const ANTHROPIC_VERSION = '2023-06-01'
|
const ANTHROPIC_VERSION = '2023-06-01'
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ import type { PermissionMode } from '../utils/permissions/PermissionMode.js'
|
|||||||
import type {
|
import type {
|
||||||
SDKControlRequest,
|
SDKControlRequest,
|
||||||
SDKControlResponse,
|
SDKControlResponse,
|
||||||
} from '../entrypoints/sdk/controlTypes.js'
|
} from '../entrypoints/sdk/controlTypes.ts'
|
||||||
import { createCapacityWake, type CapacitySignal } from './capacityWake.js'
|
import { createCapacityWake, type CapacitySignal } from './capacityWake.js'
|
||||||
import { FlushGate } from './flushGate.js'
|
import { FlushGate } from './flushGate.js'
|
||||||
import {
|
import {
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import type { StdoutMessage } from 'src/entrypoints/sdk/controlTypes.js'
|
import type { StdoutMessage } from 'src/entrypoints/sdk/controlTypes.ts'
|
||||||
import { CCRClient } from '../cli/transports/ccrClient.js'
|
import { CCRClient } from '../cli/transports/ccrClient.js'
|
||||||
import type { HybridTransport } from '../cli/transports/HybridTransport.js'
|
import type { HybridTransport } from '../cli/transports/HybridTransport.js'
|
||||||
import { SSETransport } from '../cli/transports/SSETransport.js'
|
import { SSETransport } from '../cli/transports/SSETransport.js'
|
||||||
|
|||||||
@@ -93,7 +93,7 @@ export function clearSessionCaches(
|
|||||||
|
|
||||||
// Clear tungsten session usage tracking
|
// Clear tungsten session usage tracking
|
||||||
if (process.env.USER_TYPE === 'ant') {
|
if (process.env.USER_TYPE === 'ant') {
|
||||||
void import('../../tools/TungstenTool/TungstenTool.js').then(
|
void import('../../tools/TungstenTool/TungstenTool.ts').then(
|
||||||
({ clearSessionsWithTungstenUsage, resetInitializationState }) => {
|
({ clearSessionsWithTungstenUsage, resetInitializationState }) => {
|
||||||
clearSessionsWithTungstenUsage()
|
clearSessionsWithTungstenUsage()
|
||||||
resetInitializationState()
|
resetInitializationState()
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import type { Command } from '../commands.js';
|
|||||||
import { useTerminalSize } from '../hooks/useTerminalSize.js';
|
import { useTerminalSize } from '../hooks/useTerminalSize.js';
|
||||||
import { Box } from '../ink.js';
|
import { Box } from '../ink.js';
|
||||||
import type { Tools } from '../Tool.js';
|
import type { Tools } from '../Tool.js';
|
||||||
import { type ConnectorTextBlock, isConnectorTextBlock } from '../types/connectorText.js';
|
import { type ConnectorTextBlock, isConnectorTextBlock } from '../types/connectorText.ts';
|
||||||
import type { AssistantMessage, AttachmentMessage as AttachmentMessageType, CollapsedReadSearchGroup as CollapsedReadSearchGroupType, GroupedToolUseMessage as GroupedToolUseMessageType, NormalizedUserMessage, ProgressMessage, SystemMessage } from '../types/message.js';
|
import type { AssistantMessage, AttachmentMessage as AttachmentMessageType, CollapsedReadSearchGroup as CollapsedReadSearchGroupType, GroupedToolUseMessage as GroupedToolUseMessageType, NormalizedUserMessage, ProgressMessage, SystemMessage } from '../types/message.js';
|
||||||
import { type AdvisorBlock, isAdvisorBlock } from '../utils/advisor.js';
|
import { type AdvisorBlock, isAdvisorBlock } from '../utils/advisor.js';
|
||||||
import { isFullscreenEnvEnabled } from '../utils/fullscreen.js';
|
import { isFullscreenEnvEnabled } from '../utils/fullscreen.js';
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ import { ReadMcpResourceTool } from 'src/tools/ReadMcpResourceTool/ReadMcpResour
|
|||||||
import { TaskOutputTool } from 'src/tools/TaskOutputTool/TaskOutputTool.js';
|
import { TaskOutputTool } from 'src/tools/TaskOutputTool/TaskOutputTool.js';
|
||||||
import { TaskStopTool } from 'src/tools/TaskStopTool/TaskStopTool.js';
|
import { TaskStopTool } from 'src/tools/TaskStopTool/TaskStopTool.js';
|
||||||
import { TodoWriteTool } from 'src/tools/TodoWriteTool/TodoWriteTool.js';
|
import { TodoWriteTool } from 'src/tools/TodoWriteTool/TodoWriteTool.js';
|
||||||
import { TungstenTool } from 'src/tools/TungstenTool/TungstenTool.js';
|
import { TungstenTool } from 'src/tools/TungstenTool/TungstenTool.ts';
|
||||||
import { WebFetchTool } from 'src/tools/WebFetchTool/WebFetchTool.js';
|
import { WebFetchTool } from 'src/tools/WebFetchTool/WebFetchTool.js';
|
||||||
import { WebSearchTool } from 'src/tools/WebSearchTool/WebSearchTool.js';
|
import { WebSearchTool } from 'src/tools/WebSearchTool/WebSearchTool.js';
|
||||||
import type { KeyboardEvent } from '../../ink/events/keyboard-event.js';
|
import type { KeyboardEvent } from '../../ink/events/keyboard-event.js';
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ import { TOOL_SEARCH_TOOL_NAME } from '../tools/ToolSearchTool/prompt.js'
|
|||||||
import { SYNTHETIC_OUTPUT_TOOL_NAME } from '../tools/SyntheticOutputTool/SyntheticOutputTool.js'
|
import { SYNTHETIC_OUTPUT_TOOL_NAME } from '../tools/SyntheticOutputTool/SyntheticOutputTool.js'
|
||||||
import { ENTER_WORKTREE_TOOL_NAME } from '../tools/EnterWorktreeTool/constants.js'
|
import { ENTER_WORKTREE_TOOL_NAME } from '../tools/EnterWorktreeTool/constants.js'
|
||||||
import { EXIT_WORKTREE_TOOL_NAME } from '../tools/ExitWorktreeTool/constants.js'
|
import { EXIT_WORKTREE_TOOL_NAME } from '../tools/ExitWorktreeTool/constants.js'
|
||||||
import { WORKFLOW_TOOL_NAME } from '../tools/WorkflowTool/constants.js'
|
import { WORKFLOW_TOOL_NAME } from '../tools/WorkflowTool/constants.ts'
|
||||||
import {
|
import {
|
||||||
CRON_CREATE_TOOL_NAME,
|
CRON_CREATE_TOOL_NAME,
|
||||||
CRON_DELETE_TOOL_NAME,
|
CRON_DELETE_TOOL_NAME,
|
||||||
|
|||||||
@@ -19,16 +19,16 @@ import type {
|
|||||||
export type {
|
export type {
|
||||||
SDKControlRequest,
|
SDKControlRequest,
|
||||||
SDKControlResponse,
|
SDKControlResponse,
|
||||||
} from './sdk/controlTypes.js'
|
} from './sdk/controlTypes.ts'
|
||||||
// Re-export core types (common serializable types)
|
// Re-export core types (common serializable types)
|
||||||
export * from './sdk/coreTypes.js'
|
export * from './sdk/coreTypes.ts'
|
||||||
// Re-export runtime types (callbacks, interfaces with methods)
|
// Re-export runtime types (callbacks, interfaces with methods)
|
||||||
export * from './sdk/runtimeTypes.js'
|
export * from './sdk/runtimeTypes.ts'
|
||||||
|
|
||||||
// Re-export settings types (generated from settings JSON schema)
|
// Re-export settings types (generated from settings JSON schema)
|
||||||
export type { Settings } from './sdk/settingsTypes.generated.js'
|
export type { Settings } from './sdk/settingsTypes.generated.ts'
|
||||||
// Re-export tool types (all marked @internal until SDK API stabilizes)
|
// Re-export tool types (all marked @internal until SDK API stabilizes)
|
||||||
export * from './sdk/toolTypes.js'
|
export * from './sdk/toolTypes.ts'
|
||||||
|
|
||||||
// ============================================================================
|
// ============================================================================
|
||||||
// Functions
|
// Functions
|
||||||
@@ -39,7 +39,7 @@ import type {
|
|||||||
SDKResultMessage,
|
SDKResultMessage,
|
||||||
SDKSessionInfo,
|
SDKSessionInfo,
|
||||||
SDKUserMessage,
|
SDKUserMessage,
|
||||||
} from './sdk/coreTypes.js'
|
} from './sdk/coreTypes.ts'
|
||||||
// Import types needed for function signatures
|
// Import types needed for function signatures
|
||||||
import type {
|
import type {
|
||||||
AnyZodRawShape,
|
AnyZodRawShape,
|
||||||
@@ -59,7 +59,7 @@ import type {
|
|||||||
SdkMcpToolDefinition,
|
SdkMcpToolDefinition,
|
||||||
SessionMessage,
|
SessionMessage,
|
||||||
SessionMutationOptions,
|
SessionMutationOptions,
|
||||||
} from './sdk/runtimeTypes.js'
|
} from './sdk/runtimeTypes.ts'
|
||||||
|
|
||||||
export type {
|
export type {
|
||||||
ListSessionsOptions,
|
ListSessionsOptions,
|
||||||
|
|||||||
@@ -1,2 +1,4 @@
|
|||||||
export class SDKControlRequest {}
|
export {
|
||||||
export class SDKControlResponse {}
|
SDKControlRequest,
|
||||||
|
SDKControlResponse,
|
||||||
|
} from './controlTypes.ts'
|
||||||
|
|||||||
14
src/entrypoints/sdk/controlTypes.ts
Normal file
14
src/entrypoints/sdk/controlTypes.ts
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
export type SDKControlRequest = Record<string, unknown> & {
|
||||||
|
subtype?: string
|
||||||
|
}
|
||||||
|
|
||||||
|
export type SDKControlResponse = Record<string, unknown> & {
|
||||||
|
type?: string
|
||||||
|
subtype?: string
|
||||||
|
}
|
||||||
|
|
||||||
|
export type StdoutMessage = SDKControlResponse
|
||||||
|
|
||||||
|
export class SDKControlRequest {}
|
||||||
|
|
||||||
|
export class SDKControlResponse {}
|
||||||
@@ -1 +1 @@
|
|||||||
export {};
|
export * from './coreTypes.generated.ts'
|
||||||
|
|||||||
@@ -1,22 +1 @@
|
|||||||
export class McpSdkServerConfigWithInstance {}
|
export * from './runtimeTypes.ts'
|
||||||
export class SdkMcpToolDefinition {}
|
|
||||||
export class Query {}
|
|
||||||
export class InternalQuery {}
|
|
||||||
export class SDKSession {}
|
|
||||||
export class SDKSessionOptions {}
|
|
||||||
export class InternalOptions {}
|
|
||||||
export class Options {}
|
|
||||||
|
|
||||||
export const AnyZodRawShape = {}
|
|
||||||
export const InferShape = (schema) => schema
|
|
||||||
|
|
||||||
export class ForkSessionOptions {}
|
|
||||||
export class ForkSessionResult {}
|
|
||||||
export class GetSessionInfoOptions {}
|
|
||||||
export class GetSessionMessagesOptions {}
|
|
||||||
export class ListSessionsOptions {}
|
|
||||||
export class SessionMessage {}
|
|
||||||
export class SDKSessionInfo {}
|
|
||||||
export class SDKUserMessage {}
|
|
||||||
export class SDKResultMessage {}
|
|
||||||
export class SessionMutationOptions {}
|
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
export {};
|
export * from './settingsTypes.generated.ts'
|
||||||
|
|||||||
1
src/entrypoints/sdk/settingsTypes.generated.ts
Normal file
1
src/entrypoints/sdk/settingsTypes.generated.ts
Normal file
@@ -0,0 +1 @@
|
|||||||
|
export type Settings = Record<string, unknown>
|
||||||
@@ -1 +1 @@
|
|||||||
export class SdkMcpToolDefinition {}
|
export * from './toolTypes.ts'
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import { getSlashCommandToolSkills, isBridgeSafeCommand } from '../commands.js';
|
|||||||
import { getRemoteSessionUrl } from '../constants/product.js';
|
import { getRemoteSessionUrl } from '../constants/product.js';
|
||||||
import { useNotifications } from '../context/notifications.js';
|
import { useNotifications } from '../context/notifications.js';
|
||||||
import type { PermissionMode, SDKMessage } from '../entrypoints/agentSdkTypes.js';
|
import type { PermissionMode, SDKMessage } from '../entrypoints/agentSdkTypes.js';
|
||||||
import type { SDKControlResponse } from '../entrypoints/sdk/controlTypes.js';
|
import type { SDKControlResponse } from '../entrypoints/sdk/controlTypes.ts';
|
||||||
import { Text } from '../ink.js';
|
import { Text } from '../ink.js';
|
||||||
import { getFeatureValue_CACHED_MAY_BE_STALE } from '../services/analytics/growthbook.js';
|
import { getFeatureValue_CACHED_MAY_BE_STALE } from '../services/analytics/growthbook.js';
|
||||||
import { useAppState, useAppStateStore, useSetAppState } from '../state/AppState.js';
|
import { useAppState, useAppStateStore, useSetAppState } from '../state/AppState.js';
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import type {
|
|||||||
SDKControlPermissionRequest,
|
SDKControlPermissionRequest,
|
||||||
SDKControlRequest,
|
SDKControlRequest,
|
||||||
SDKControlResponse,
|
SDKControlResponse,
|
||||||
} from '../entrypoints/sdk/controlTypes.js'
|
} from '../entrypoints/sdk/controlTypes.ts'
|
||||||
import { logForDebugging } from '../utils/debug.js'
|
import { logForDebugging } from '../utils/debug.js'
|
||||||
import { logError } from '../utils/log.js'
|
import { logError } from '../utils/log.js'
|
||||||
import {
|
import {
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import type {
|
|||||||
SDKControlRequest,
|
SDKControlRequest,
|
||||||
SDKControlRequestInner,
|
SDKControlRequestInner,
|
||||||
SDKControlResponse,
|
SDKControlResponse,
|
||||||
} from '../entrypoints/sdk/controlTypes.js'
|
} from '../entrypoints/sdk/controlTypes.ts'
|
||||||
import { logForDebugging } from '../utils/debug.js'
|
import { logForDebugging } from '../utils/debug.js'
|
||||||
import { errorMessage } from '../utils/errors.js'
|
import { errorMessage } from '../utils/errors.js'
|
||||||
import { logError } from '../utils/log.js'
|
import { logError } from '../utils/log.js'
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { randomUUID } from 'crypto'
|
import { randomUUID } from 'crypto'
|
||||||
import type { SDKControlPermissionRequest } from '../entrypoints/sdk/controlTypes.js'
|
import type { SDKControlPermissionRequest } from '../entrypoints/sdk/controlTypes.ts'
|
||||||
import type { Tool } from '../Tool.js'
|
import type { Tool } from '../Tool.js'
|
||||||
import type { AssistantMessage } from '../types/message.js'
|
import type { AssistantMessage } from '../types/message.js'
|
||||||
import { jsonStringify } from '../utils/slowOperations.js'
|
import { jsonStringify } from '../utils/slowOperations.js'
|
||||||
|
|||||||
@@ -267,7 +267,7 @@ import { useTeammateLifecycleNotification } from 'src/hooks/notifs/useTeammateSh
|
|||||||
import { useFastModeNotification } from 'src/hooks/notifs/useFastModeNotification.js';
|
import { useFastModeNotification } from 'src/hooks/notifs/useFastModeNotification.js';
|
||||||
import { AutoRunIssueNotification, shouldAutoRunIssue, getAutoRunIssueReasonText, getAutoRunCommand, type AutoRunIssueReason } from '../utils/autoRunIssue.js';
|
import { AutoRunIssueNotification, shouldAutoRunIssue, getAutoRunIssueReasonText, getAutoRunCommand, type AutoRunIssueReason } from '../utils/autoRunIssue.js';
|
||||||
import type { HookProgress } from '../types/hooks.js';
|
import type { HookProgress } from '../types/hooks.js';
|
||||||
import { TungstenLiveMonitor } from '../tools/TungstenTool/TungstenLiveMonitor.js';
|
import { TungstenLiveMonitor } from '../tools/TungstenTool/TungstenLiveMonitor.ts';
|
||||||
/* eslint-disable @typescript-eslint/no-require-imports */
|
/* eslint-disable @typescript-eslint/no-require-imports */
|
||||||
const WebBrowserPanelModule = feature('WEB_BROWSER_TOOL') ? require('../tools/WebBrowserTool/WebBrowserPanel.js') as typeof import('../tools/WebBrowserTool/WebBrowserPanel.js') : null;
|
const WebBrowserPanelModule = feature('WEB_BROWSER_TOOL') ? require('../tools/WebBrowserTool/WebBrowserPanel.js') as typeof import('../tools/WebBrowserTool/WebBrowserPanel.js') : null;
|
||||||
/* eslint-enable @typescript-eslint/no-require-imports */
|
/* eslint-enable @typescript-eslint/no-require-imports */
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import type { SDKMessage } from '../entrypoints/agentSdkTypes.js'
|
|||||||
import type {
|
import type {
|
||||||
SDKControlPermissionRequest,
|
SDKControlPermissionRequest,
|
||||||
StdoutMessage,
|
StdoutMessage,
|
||||||
} from '../entrypoints/sdk/controlTypes.js'
|
} from '../entrypoints/sdk/controlTypes.ts'
|
||||||
import type { RemotePermissionResponse } from '../remote/RemoteSessionManager.js'
|
import type { RemotePermissionResponse } from '../remote/RemoteSessionManager.js'
|
||||||
import { logForDebugging } from '../utils/debug.js'
|
import { logForDebugging } from '../utils/debug.js'
|
||||||
import { jsonParse, jsonStringify } from '../utils/slowOperations.js'
|
import { jsonParse, jsonStringify } from '../utils/slowOperations.js'
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ import {
|
|||||||
type ConnectorTextBlock,
|
type ConnectorTextBlock,
|
||||||
type ConnectorTextDelta,
|
type ConnectorTextDelta,
|
||||||
isConnectorTextBlock,
|
isConnectorTextBlock,
|
||||||
} from '../../types/connectorText.js'
|
} from '../../types/connectorText.ts'
|
||||||
import type {
|
import type {
|
||||||
AssistantMessage,
|
AssistantMessage,
|
||||||
Message,
|
Message,
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ import {
|
|||||||
setLastApiCompletionTimestamp,
|
setLastApiCompletionTimestamp,
|
||||||
} from 'src/bootstrap/state.js'
|
} from 'src/bootstrap/state.js'
|
||||||
import type { QueryChainTracking } from 'src/Tool.js'
|
import type { QueryChainTracking } from 'src/Tool.js'
|
||||||
import { isConnectorTextBlock } from 'src/types/connectorText.js'
|
import { isConnectorTextBlock } from 'src/types/connectorText.ts'
|
||||||
import type { AssistantMessage } from 'src/types/message.js'
|
import type { AssistantMessage } from 'src/types/message.js'
|
||||||
import { logForDebugging } from 'src/utils/debug.js'
|
import { logForDebugging } from 'src/utils/debug.js'
|
||||||
import type { EffortLevel } from 'src/utils/effort.js'
|
import type { EffortLevel } from 'src/utils/effort.js'
|
||||||
|
|||||||
@@ -1,3 +1 @@
|
|||||||
export function TungstenLiveMonitor() {
|
export { TungstenLiveMonitor } from './TungstenLiveMonitor.ts'
|
||||||
return null
|
|
||||||
}
|
|
||||||
|
|||||||
3
src/tools/TungstenTool/TungstenLiveMonitor.ts
Normal file
3
src/tools/TungstenTool/TungstenLiveMonitor.ts
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
export function TungstenLiveMonitor() {
|
||||||
|
return null
|
||||||
|
}
|
||||||
@@ -1,42 +1,6 @@
|
|||||||
import { buildTool } from '../../Tool.js'
|
export {
|
||||||
import { z } from 'zod/v4'
|
TUNGSTEN_TOOL_NAME,
|
||||||
|
TungstenTool,
|
||||||
const inputSchema = z.strictObject({})
|
clearSessionsWithTungstenUsage,
|
||||||
|
resetInitializationState,
|
||||||
const outputSchema = z.strictObject({})
|
} from './TungstenTool.ts'
|
||||||
|
|
||||||
export const TungstenTool = buildTool({
|
|
||||||
name: 'tungsten',
|
|
||||||
searchHint: 'manage tmux-based tasks',
|
|
||||||
maxResultSizeChars: 1024,
|
|
||||||
strict: true,
|
|
||||||
async description() {
|
|
||||||
return 'Tungsten integration is unavailable in this restored source snapshot.'
|
|
||||||
},
|
|
||||||
async prompt() {
|
|
||||||
return 'Tungsten is unavailable in this build environment.'
|
|
||||||
},
|
|
||||||
get inputSchema() {
|
|
||||||
return inputSchema
|
|
||||||
},
|
|
||||||
get outputSchema() {
|
|
||||||
return outputSchema
|
|
||||||
},
|
|
||||||
isEnabled() {
|
|
||||||
return false
|
|
||||||
},
|
|
||||||
userFacingName() {
|
|
||||||
return 'Tungsten'
|
|
||||||
},
|
|
||||||
async call() {
|
|
||||||
return {
|
|
||||||
data: {},
|
|
||||||
isError: true,
|
|
||||||
content: 'Tungsten tool is not available in this environment.',
|
|
||||||
}
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
export function clearSessionsWithTungstenUsage() {}
|
|
||||||
|
|
||||||
export function resetInitializationState() {}
|
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
export const WORKFLOW_TOOL_NAME = 'workflow';
|
export { WORKFLOW_TOOL_NAME } from './constants.ts'
|
||||||
|
|||||||
@@ -1,29 +1 @@
|
|||||||
/** @typedef {import('../services/api/claude.js').BetaContentBlock} BetaContentBlock */
|
export { isConnectorTextBlock } from './connectorText.ts'
|
||||||
/** @typedef {import('../services/api/claude.js').BetaContentBlockParam} BetaContentBlockParam */
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @typedef {object} ConnectorTextBlock
|
|
||||||
* @property {'connector_text'} type
|
|
||||||
* @property {string} connector_text
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @typedef {object} ConnectorTextDelta
|
|
||||||
* @property {'connector_text_delta'} type
|
|
||||||
* @property {string} connector_text
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param {unknown} block
|
|
||||||
* @returns {block is ConnectorTextBlock}
|
|
||||||
*/
|
|
||||||
export function isConnectorTextBlock(block) {
|
|
||||||
return (
|
|
||||||
Boolean(block) &&
|
|
||||||
typeof block === 'object' &&
|
|
||||||
block.type === 'connector_text' &&
|
|
||||||
typeof block.connector_text === 'string'
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
export { }
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import { getFeatureValue_CACHED_MAY_BE_STALE } from 'src/services/analytics/grow
|
|||||||
import { getAPIProvider } from './model/providers.js'
|
import { getAPIProvider } from './model/providers.js'
|
||||||
import { get3PModelCapabilityOverride } from './model/modelSupportOverrides.js'
|
import { get3PModelCapabilityOverride } from './model/modelSupportOverrides.js'
|
||||||
import { isEnvTruthy } from './envUtils.js'
|
import { isEnvTruthy } from './envUtils.js'
|
||||||
import type { EffortLevel } from 'src/entrypoints/sdk/runtimeTypes.js'
|
import type { EffortLevel } from 'src/entrypoints/sdk/runtimeTypes.ts'
|
||||||
|
|
||||||
export type { EffortLevel }
|
export type { EffortLevel }
|
||||||
|
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ import {
|
|||||||
getRequestTooLargeErrorMessage,
|
getRequestTooLargeErrorMessage,
|
||||||
} from '../services/api/errors.js'
|
} from '../services/api/errors.js'
|
||||||
import type { AnyObject, Progress } from '../Tool.js'
|
import type { AnyObject, Progress } from '../Tool.js'
|
||||||
import { isConnectorTextBlock } from '../types/connectorText.js'
|
import { isConnectorTextBlock } from '../types/connectorText.ts'
|
||||||
import type {
|
import type {
|
||||||
AssistantMessage,
|
AssistantMessage,
|
||||||
AttachmentMessage,
|
AttachmentMessage,
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ const VERIFY_PLAN_EXECUTION_TOOL_NAME =
|
|||||||
: null
|
: null
|
||||||
const WORKFLOW_TOOL_NAME = feature('WORKFLOW_SCRIPTS')
|
const WORKFLOW_TOOL_NAME = feature('WORKFLOW_SCRIPTS')
|
||||||
? (
|
? (
|
||||||
require('../../tools/WorkflowTool/constants.js') as typeof import('../../tools/WorkflowTool/constants.js')
|
require('../../tools/WorkflowTool/constants.ts') as typeof import('../../tools/WorkflowTool/constants.ts')
|
||||||
).WORKFLOW_TOOL_NAME
|
).WORKFLOW_TOOL_NAME
|
||||||
: null
|
: null
|
||||||
/* eslint-enable @typescript-eslint/no-require-imports */
|
/* eslint-enable @typescript-eslint/no-require-imports */
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import type { SDKAssistantMessage } from 'src/entrypoints/agentSdkTypes.js'
|
import type { SDKAssistantMessage } from 'src/entrypoints/agentSdkTypes.js'
|
||||||
import type { StdoutMessage } from 'src/entrypoints/sdk/controlTypes.js'
|
import type { StdoutMessage } from 'src/entrypoints/sdk/controlTypes.ts'
|
||||||
import { FILE_EDIT_TOOL_NAME } from 'src/tools/FileEditTool/constants.js'
|
import { FILE_EDIT_TOOL_NAME } from 'src/tools/FileEditTool/constants.js'
|
||||||
import { FILE_READ_TOOL_NAME } from 'src/tools/FileReadTool/prompt.js'
|
import { FILE_READ_TOOL_NAME } from 'src/tools/FileReadTool/prompt.js'
|
||||||
import { FILE_WRITE_TOOL_NAME } from 'src/tools/FileWriteTool/prompt.js'
|
import { FILE_WRITE_TOOL_NAME } from 'src/tools/FileWriteTool/prompt.js'
|
||||||
|
|||||||
Reference in New Issue
Block a user