refactor: re-export js shims from ts sources

This commit is contained in:
2026-04-03 11:07:00 +08:00
parent e8da02f5bc
commit fa9c74e7b7
6 changed files with 11 additions and 96 deletions

View File

@@ -1 +1 @@
export {};
export * from './coreTypes.generated.ts'

View File

@@ -1,22 +1 @@
export class McpSdkServerConfigWithInstance {}
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 {}
export * from './runtimeTypes.ts'

View File

@@ -1 +1 @@
export class SdkMcpToolDefinition {}
export * from './toolTypes.ts'

View File

@@ -1,42 +1,6 @@
import { buildTool } from '../../Tool.js'
import { z } from 'zod/v4'
const inputSchema = z.strictObject({})
const outputSchema = z.strictObject({})
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() {}
export {
TUNGSTEN_TOOL_NAME,
TungstenTool,
clearSessionsWithTungstenUsage,
resetInitializationState,
} from './TungstenTool.ts'

View File

@@ -1 +1 @@
export const WORKFLOW_TOOL_NAME = 'workflow';
export { WORKFLOW_TOOL_NAME } from './constants.ts'

View File

@@ -1,29 +1 @@
/** @typedef {import('../services/api/claude.js').BetaContentBlock} BetaContentBlock */
/** @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 { }
export { isConnectorTextBlock } from './connectorText.ts'