- Added window discovery, targeting, and frame validation for macOS, Windows, and Linux platforms. - Updated computer tool and protocol definitions to support listing and targeting specific application windows. - Refactored native computer tool exposure to function-only representation across models. - Updated documentation and test suites to reflect window-scoped computer control capabilities.
15 lines
516 B
TypeScript
15 lines
516 B
TypeScript
import type { Model } from "@oh-my-pi/pi-ai";
|
|
|
|
/** How the computer tool is represented to the active model. */
|
|
export type ComputerExposureMode = "function" | "unavailable";
|
|
|
|
/**
|
|
* Report the computer tool's callable representation.
|
|
*
|
|
* Window selection is part of the tool's JSON schema, so even models with
|
|
* provider-native Computer Use support receive it as a function.
|
|
*/
|
|
export function computerExposureMode(model: Model | undefined): ComputerExposureMode {
|
|
return model ? "function" : "unavailable";
|
|
}
|