first commit
This commit is contained in:
25
shims/ant-claude-for-chrome-mcp/index.ts
Normal file
25
shims/ant-claude-for-chrome-mcp/index.ts
Normal file
@@ -0,0 +1,25 @@
|
||||
export type PermissionMode =
|
||||
| 'ask'
|
||||
| 'skip_all_permission_checks'
|
||||
| 'follow_a_plan'
|
||||
|
||||
export type Logger = {
|
||||
info(message: string): void
|
||||
warn(message: string): void
|
||||
error(message: string): void
|
||||
}
|
||||
|
||||
export type ClaudeForChromeContext = {
|
||||
serverName?: string
|
||||
logger?: Logger
|
||||
}
|
||||
|
||||
export const BROWSER_TOOLS: Array<{ name: string }> = []
|
||||
|
||||
export function createClaudeForChromeMcpServer(_context: ClaudeForChromeContext) {
|
||||
return {
|
||||
async connect() {},
|
||||
setRequestHandler() {},
|
||||
async close() {},
|
||||
}
|
||||
}
|
||||
6
shims/ant-claude-for-chrome-mcp/package.json
Normal file
6
shims/ant-claude-for-chrome-mcp/package.json
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"name": "@ant/claude-for-chrome-mcp",
|
||||
"version": "0.0.0-restored",
|
||||
"type": "module",
|
||||
"main": "./index.ts"
|
||||
}
|
||||
23
shims/ant-computer-use-input/index.ts
Normal file
23
shims/ant-computer-use-input/index.ts
Normal file
@@ -0,0 +1,23 @@
|
||||
export type ComputerUseInputAPI = {
|
||||
moveMouse(x: number, y: number, smooth?: boolean): Promise<void>
|
||||
mouseLocation(): Promise<{ x: number; y: number }>
|
||||
key(key: string, action?: 'press' | 'release' | 'click'): Promise<void>
|
||||
keys(keys: string[]): Promise<void>
|
||||
leftClick(): Promise<void>
|
||||
rightClick(): Promise<void>
|
||||
doubleClick(): Promise<void>
|
||||
middleClick(): Promise<void>
|
||||
dragMouse(x: number, y: number): Promise<void>
|
||||
scroll(x: number, y: number): Promise<void>
|
||||
type(text: string): Promise<void>
|
||||
}
|
||||
|
||||
export type ComputerUseInput =
|
||||
| ({ isSupported: false } & Partial<ComputerUseInputAPI>)
|
||||
| ({ isSupported: true } & ComputerUseInputAPI)
|
||||
|
||||
const unsupported: ComputerUseInput = {
|
||||
isSupported: false,
|
||||
}
|
||||
|
||||
export default unsupported
|
||||
6
shims/ant-computer-use-input/package.json
Normal file
6
shims/ant-computer-use-input/package.json
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"name": "@ant/computer-use-input",
|
||||
"version": "0.0.0-restored",
|
||||
"type": "module",
|
||||
"main": "./index.ts"
|
||||
}
|
||||
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>
|
||||
27
shims/ant-computer-use-swift/index.ts
Normal file
27
shims/ant-computer-use-swift/index.ts
Normal file
@@ -0,0 +1,27 @@
|
||||
export type ComputerUseAPI = {
|
||||
screens?: {
|
||||
list(): Promise<unknown[]>
|
||||
}
|
||||
apps?: {
|
||||
listInstalled(): Promise<unknown[]>
|
||||
listRunning(): Promise<unknown[]>
|
||||
}
|
||||
}
|
||||
|
||||
const stub: ComputerUseAPI = {
|
||||
screens: {
|
||||
async list() {
|
||||
return []
|
||||
},
|
||||
},
|
||||
apps: {
|
||||
async listInstalled() {
|
||||
return []
|
||||
},
|
||||
async listRunning() {
|
||||
return []
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
export default stub
|
||||
6
shims/ant-computer-use-swift/package.json
Normal file
6
shims/ant-computer-use-swift/package.json
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"name": "@ant/computer-use-swift",
|
||||
"version": "0.0.0-restored",
|
||||
"type": "module",
|
||||
"main": "./index.ts"
|
||||
}
|
||||
12
shims/color-diff-napi/index.ts
Normal file
12
shims/color-diff-napi/index.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
export {
|
||||
ColorDiff,
|
||||
ColorFile,
|
||||
getSyntaxTheme,
|
||||
getNativeModule,
|
||||
} from '../../src/native-ts/color-diff/index.ts'
|
||||
export type {
|
||||
ColorDiffClass,
|
||||
ColorFileClass,
|
||||
Hunk,
|
||||
SyntaxTheme,
|
||||
} from '../../src/native-ts/color-diff/index.ts'
|
||||
6
shims/color-diff-napi/package.json
Normal file
6
shims/color-diff-napi/package.json
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"name": "color-diff-napi",
|
||||
"version": "0.0.0-restored",
|
||||
"type": "module",
|
||||
"main": "./index.ts"
|
||||
}
|
||||
5
shims/modifiers-napi/index.ts
Normal file
5
shims/modifiers-napi/index.ts
Normal file
@@ -0,0 +1,5 @@
|
||||
export {
|
||||
getModifiers,
|
||||
isModifierPressed,
|
||||
prewarm,
|
||||
} from '../../vendor/modifiers-napi-src/index.ts'
|
||||
6
shims/modifiers-napi/package.json
Normal file
6
shims/modifiers-napi/package.json
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"name": "modifiers-napi",
|
||||
"version": "0.0.0-restored",
|
||||
"type": "module",
|
||||
"main": "./index.ts"
|
||||
}
|
||||
1
shims/url-handler-napi/index.ts
Normal file
1
shims/url-handler-napi/index.ts
Normal file
@@ -0,0 +1 @@
|
||||
export { waitForUrlEvent } from '../../vendor/url-handler-src/index.ts'
|
||||
6
shims/url-handler-napi/package.json
Normal file
6
shims/url-handler-napi/package.json
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"name": "url-handler-napi",
|
||||
"version": "0.0.0-restored",
|
||||
"type": "module",
|
||||
"main": "./index.ts"
|
||||
}
|
||||
Reference in New Issue
Block a user