@ui-tars/shared
Version:
Shared types for UI-TARS
47 lines (43 loc) • 1.32 kB
TypeScript
import { Message, PredictionParsed, StatusEnum } from './agent.js';
export { ActionInputs, ScreenshotResult, Status, VlmResponse } from './agent.js';
import { ShareVersion } from './share.js';
import { VlmModeEnum } from '../constants/vlm.js';
/**
* Copyright (c) 2025 Bytedance, Inc. and its affiliates.
* SPDX-License-Identifier: Apache-2.0
*/
interface Conversation extends Message {
timing?: {
start: number;
end: number;
cost: number;
};
/** exists when <image> exists */
screenshotBase64?: string;
screenshotContext?: {
size: {
width: number;
height: number;
};
};
predictionParsed?: PredictionParsed[];
/** exists when predictionParsed exists */
screenshotBase64WithElementMarker?: string;
reflections?: string[];
}
/**
* Computer Use data structure, can be used for recording and sharing
*/
interface ComputerUseUserData {
version: ShareVersion;
/** Share operation instructions */
instruction: string;
systemPrompt: string;
modelName: string;
mode: VlmModeEnum;
logTime: number;
status: StatusEnum;
errMsg?: string;
conversations: Conversation[];
}
export { type ComputerUseUserData, type Conversation, Message, PredictionParsed, ShareVersion, StatusEnum };