diff --git a/libs/computer/typescript/src/computer/computer.ts b/libs/computer/typescript/src/computer/computer.ts index fea5cbb3..eea9e563 100644 --- a/libs/computer/typescript/src/computer/computer.ts +++ b/libs/computer/typescript/src/computer/computer.ts @@ -1,4 +1,4 @@ -import type { Display, ComputerConfig } from "../models"; +import type { Display, ComputerConfig } from "../types"; import type { BaseComputerInterface } from "../interface/base"; import { InterfaceFactory } from "../interface/factory"; import type { BaseVMProvider } from "../providers/base"; diff --git a/libs/computer/typescript/src/index.ts b/libs/computer/typescript/src/index.ts index 551181ca..79eec2b5 100644 --- a/libs/computer/typescript/src/index.ts +++ b/libs/computer/typescript/src/index.ts @@ -3,7 +3,7 @@ export { Computer } from "./computer"; export type { ComputerOptions, OSType } from "./computer"; // Models -export type { Display, ComputerConfig } from "./models"; +export type { Display, ComputerConfig } from "./types"; // Provider components export { VMProviderType, BaseVMProviderImpl } from "./providers"; @@ -16,13 +16,15 @@ export type { BaseComputerInterface } from "./interface"; export { InterfaceFactory } from "./interface"; export type { InterfaceOptions } from "./interface"; export { Key } from "./interface"; -export type { - KeyType, - MouseButton, - NavigationKey, - SpecialKey, - ModifierKey, +export type { + KeyType, + MouseButton, + NavigationKey, + SpecialKey, + ModifierKey, FunctionKey, AccessibilityWindow, - AccessibilityTree + AccessibilityTree, } from "./interface"; + +export * from "./helpers"; diff --git a/libs/computer/typescript/src/interface/base.ts b/libs/computer/typescript/src/interface/base.ts index ef4dfe6c..9ab3fd0e 100644 --- a/libs/computer/typescript/src/interface/base.ts +++ b/libs/computer/typescript/src/interface/base.ts @@ -1,4 +1,4 @@ -import type { KeyType, MouseButton, AccessibilityTree } from './models'; +import type { KeyType, MouseButton, AccessibilityTree } from "./types"; /** * Base interface for computer control implementations. @@ -8,32 +8,32 @@ export interface BaseComputerInterface { * Wait for the interface to be ready. */ waitForReady(): Promise; - + /** * Get a screenshot of the current screen. */ getScreenshot(): Promise; - + /** * Move the mouse to the specified coordinates. */ moveMouse(x: number, y: number): Promise; - + /** * Click the mouse at the current position. */ click(button?: MouseButton): Promise; - + /** * Type text at the current cursor position. */ typeText(text: string): Promise; - + /** * Press a key. */ pressKey(key: KeyType): Promise; - + /** * Get the accessibility tree. */ diff --git a/libs/computer/typescript/src/interface/index.ts b/libs/computer/typescript/src/interface/index.ts index ac96f84e..38e3fd04 100644 --- a/libs/computer/typescript/src/interface/index.ts +++ b/libs/computer/typescript/src/interface/index.ts @@ -1,5 +1,5 @@ export * from "./base"; export * from "./factory"; -export * from "./models"; +export * from "./types"; export * from "./macos"; export * from "./linux"; diff --git a/libs/computer/typescript/src/interface/linux.ts b/libs/computer/typescript/src/interface/linux.ts index 3713cb7b..12e67988 100644 --- a/libs/computer/typescript/src/interface/linux.ts +++ b/libs/computer/typescript/src/interface/linux.ts @@ -1,5 +1,5 @@ -import type { BaseComputerInterface } from './base'; -import type { KeyType, MouseButton, AccessibilityTree } from './models'; +import type { BaseComputerInterface } from "./base"; +import type { KeyType, MouseButton, AccessibilityTree } from "./types"; /** * Linux-specific implementation of the computer interface. @@ -24,7 +24,7 @@ export class LinuxComputerInterface implements BaseComputerInterface { // Implementation will go here } - async click(button: MouseButton = 'left'): Promise { + async click(button: MouseButton = "left"): Promise { // Implementation will go here } @@ -40,8 +40,8 @@ export class LinuxComputerInterface implements BaseComputerInterface { // Implementation will go here return { success: false, - frontmost_application: '', - windows: [] + frontmost_application: "", + windows: [], }; } } diff --git a/libs/computer/typescript/src/interface/macos.ts b/libs/computer/typescript/src/interface/macos.ts index a031fa49..93e2688d 100644 --- a/libs/computer/typescript/src/interface/macos.ts +++ b/libs/computer/typescript/src/interface/macos.ts @@ -1,5 +1,5 @@ -import type { BaseComputerInterface } from './base'; -import type { KeyType, MouseButton, AccessibilityTree } from './models'; +import type { BaseComputerInterface } from "./base"; +import type { KeyType, MouseButton, AccessibilityTree } from "./types"; /** * macOS-specific implementation of the computer interface. @@ -24,7 +24,7 @@ export class MacOSComputerInterface implements BaseComputerInterface { // Implementation will go here } - async click(button: MouseButton = 'left'): Promise { + async click(button: MouseButton = "left"): Promise { // Implementation will go here } @@ -40,8 +40,8 @@ export class MacOSComputerInterface implements BaseComputerInterface { // Implementation will go here return { success: false, - frontmost_application: '', - windows: [] + frontmost_application: "", + windows: [], }; } } diff --git a/libs/computer/typescript/src/interface/models.ts b/libs/computer/typescript/src/interface/types.ts similarity index 100% rename from libs/computer/typescript/src/interface/models.ts rename to libs/computer/typescript/src/interface/types.ts diff --git a/libs/computer/typescript/src/logger.ts b/libs/computer/typescript/src/logger.ts deleted file mode 100644 index e69de29b..00000000 diff --git a/libs/computer/typescript/src/telemetry.ts b/libs/computer/typescript/src/telemetry.ts index 7f598721..2cd193de 100644 --- a/libs/computer/typescript/src/telemetry.ts +++ b/libs/computer/typescript/src/telemetry.ts @@ -37,6 +37,8 @@ export class TelemetryManager { // For now, just log to debug if (process.env.NODE_ENV === "development") { console.debug("[Telemetry]", event, properties); + } else { + //todo: log telemetry to posthog } } diff --git a/libs/computer/typescript/src/models.ts b/libs/computer/typescript/src/types.ts similarity index 100% rename from libs/computer/typescript/src/models.ts rename to libs/computer/typescript/src/types.ts