first commit

This commit is contained in:
oboard
2026-03-31 19:37:23 +08:00
commit 727c2a0f1e
2066 changed files with 516141 additions and 0 deletions

View 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>

View 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"
}
}

View File

@@ -0,0 +1,3 @@
export function getSentinelCategory() {
return null
}

View 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>