first commit
This commit is contained in:
59
shims/ant-computer-use-mcp/index.ts
Normal file
59
shims/ant-computer-use-mcp/index.ts
Normal file
@@ -0,0 +1,59 @@
|
||||
export const DEFAULT_GRANT_FLAGS = {
|
||||
accessibility: false,
|
||||
screenRecording: false,
|
||||
}
|
||||
|
||||
export const API_RESIZE_PARAMS = {}
|
||||
|
||||
export function targetImageSize(width: number, height: number) {
|
||||
return [width, height] as const
|
||||
}
|
||||
|
||||
export function buildComputerUseTools() {
|
||||
return [] as Array<{ name: string }>
|
||||
}
|
||||
|
||||
export function createComputerUseMcpServer() {
|
||||
return {
|
||||
async connect() {},
|
||||
setRequestHandler() {},
|
||||
async close() {},
|
||||
}
|
||||
}
|
||||
|
||||
export function bindSessionContext() {
|
||||
return async () => ({
|
||||
is_error: true,
|
||||
content: [
|
||||
{
|
||||
type: 'text',
|
||||
text: 'Computer use is unavailable in the restored development build.',
|
||||
},
|
||||
],
|
||||
})
|
||||
}
|
||||
|
||||
export type DisplayGeometry = Record<string, unknown>
|
||||
export type FrontmostApp = Record<string, unknown>
|
||||
export type InstalledApp = { name?: string; bundleId?: string }
|
||||
export type ResolvePrepareCaptureResult = Record<string, unknown>
|
||||
export type RunningApp = Record<string, unknown>
|
||||
export type ScreenshotResult = Record<string, unknown>
|
||||
export type ScreenshotDims = {
|
||||
width: number
|
||||
height: number
|
||||
displayWidth?: number
|
||||
displayHeight?: number
|
||||
displayId?: number
|
||||
originX?: number
|
||||
originY?: number
|
||||
}
|
||||
export type CuPermissionRequest = Record<string, unknown>
|
||||
export type CuPermissionResponse = Record<string, unknown>
|
||||
export type CuCallToolResult = {
|
||||
is_error?: boolean
|
||||
content?: Array<{ type: string; text?: string }>
|
||||
telemetry?: Record<string, unknown>
|
||||
}
|
||||
export type ComputerUseSessionContext = Record<string, unknown>
|
||||
export type ComputerExecutor = Record<string, unknown>
|
||||
11
shims/ant-computer-use-mcp/package.json
Normal file
11
shims/ant-computer-use-mcp/package.json
Normal file
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"name": "@ant/computer-use-mcp",
|
||||
"version": "0.0.0-restored",
|
||||
"type": "module",
|
||||
"main": "./index.ts",
|
||||
"exports": {
|
||||
".": "./index.ts",
|
||||
"./types": "./types.ts",
|
||||
"./sentinelApps": "./sentinelApps.ts"
|
||||
}
|
||||
}
|
||||
3
shims/ant-computer-use-mcp/sentinelApps.ts
Normal file
3
shims/ant-computer-use-mcp/sentinelApps.ts
Normal file
@@ -0,0 +1,3 @@
|
||||
export function getSentinelCategory() {
|
||||
return null
|
||||
}
|
||||
15
shims/ant-computer-use-mcp/types.ts
Normal file
15
shims/ant-computer-use-mcp/types.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
export const DEFAULT_GRANT_FLAGS = {
|
||||
accessibility: false,
|
||||
screenRecording: false,
|
||||
}
|
||||
|
||||
export type CoordinateMode = 'screen' | 'viewport'
|
||||
export type CuSubGates = Record<string, boolean>
|
||||
export type Logger = {
|
||||
info(message: string): void
|
||||
warn(message: string): void
|
||||
error(message: string): void
|
||||
}
|
||||
export type ComputerUseHostAdapter = Record<string, unknown>
|
||||
export type CuPermissionRequest = Record<string, unknown>
|
||||
export type CuPermissionResponse = Record<string, unknown>
|
||||
Reference in New Issue
Block a user