diff --git a/bun.lock b/bun.lock index 114f0a5..266fdd3 100644 --- a/bun.lock +++ b/bun.lock @@ -6,6 +6,10 @@ "name": "claude-code", "dependencies": { "@alcalzone/ansi-tokenize": "^0.3.0", + "@ant/claude-for-chrome-mcp": "workspace:*", + "@ant/computer-use-input": "workspace:*", + "@ant/computer-use-mcp": "workspace:*", + "@ant/computer-use-swift": "workspace:*", "@anthropic-ai/bedrock-sdk": "^0.26.4", "@anthropic-ai/claude-agent-sdk": "latest", "@anthropic-ai/foundry-sdk": "^0.2.3", @@ -16,6 +20,7 @@ "@aws-sdk/client-bedrock": "latest", "@aws-sdk/client-bedrock-runtime": "latest", "@aws-sdk/client-sts": "^3.1020.0", + "@aws-sdk/credential-provider-node": "^3.972.28", "@aws-sdk/credential-providers": "latest", "@azure/identity": "^4.13.1", "@commander-js/extra-typings": "latest", @@ -38,10 +43,12 @@ "@opentelemetry/sdk-logs": "latest", "@opentelemetry/sdk-metrics": "latest", "@opentelemetry/sdk-trace-base": "latest", + "@opentelemetry/semantic-conventions": "latest", "@smithy/core": "latest", "@smithy/node-http-handler": "latest", "ajv": "latest", "asciichart": "latest", + "audio-capture-napi": "workspace:*", "auto-bind": "latest", "axios": "latest", "bidi-js": "latest", @@ -51,10 +58,12 @@ "cli-boxes": "latest", "cli-highlight": "^2.1.11", "code-excerpt": "latest", + "color-diff-napi": "workspace:*", "diff": "latest", "emoji-regex": "latest", "env-paths": "latest", "execa": "latest", + "fflate": "latest", "figures": "latest", "fuse.js": "latest", "get-east-asian-width": "latest", @@ -62,11 +71,13 @@ "highlight.js": "latest", "https-proxy-agent": "latest", "ignore": "latest", + "image-processor-napi": "workspace:*", "indent-string": "latest", "jsonc-parser": "^3.3.1", "lodash-es": "latest", "lru-cache": "latest", "marked": "latest", + "modifiers-napi": "workspace:*", "p-map": "latest", "picomatch": "latest", "plist": "^3.1.0", @@ -86,7 +97,9 @@ "turndown": "^7.2.2", "type-fest": "latest", "undici": "latest", + "url-handler-napi": "workspace:*", "usehooks-ts": "latest", + "vscode-jsonrpc": "latest", "vscode-languageserver-protocol": "latest", "vscode-languageserver-types": "latest", "wrap-ansi": "latest", @@ -106,10 +119,57 @@ "typescript": "latest", }, }, + "packages/@ant/claude-for-chrome-mcp": { + "name": "@ant/claude-for-chrome-mcp", + "version": "1.0.0", + }, + "packages/@ant/computer-use-input": { + "name": "@ant/computer-use-input", + "version": "1.0.0", + }, + "packages/@ant/computer-use-mcp": { + "name": "@ant/computer-use-mcp", + "version": "1.0.0", + }, + "packages/@ant/computer-use-swift": { + "name": "@ant/computer-use-swift", + "version": "1.0.0", + }, + "packages/audio-capture-napi": { + "name": "audio-capture-napi", + "version": "1.0.0", + }, + "packages/color-diff-napi": { + "name": "color-diff-napi", + "version": "1.0.0", + "dependencies": { + "highlight.js": "latest", + }, + }, + "packages/image-processor-napi": { + "name": "image-processor-napi", + "version": "1.0.0", + }, + "packages/modifiers-napi": { + "name": "modifiers-napi", + "version": "1.0.0", + }, + "packages/url-handler-napi": { + "name": "url-handler-napi", + "version": "1.0.0", + }, }, "packages": { "@alcalzone/ansi-tokenize": ["@alcalzone/ansi-tokenize@0.3.0", "https://registry.npmmirror.com/@alcalzone/ansi-tokenize/-/ansi-tokenize-0.3.0.tgz", { "dependencies": { "ansi-styles": "^6.2.1", "is-fullwidth-code-point": "^5.0.0" } }, "sha512-p+CMKJ93HFmLkjXKlXiVGlMQEuRb6H0MokBSwUsX+S6BRX8eV5naFZpQJFfJHjRZY0Hmnqy1/r6UWl3x+19zYA=="], + "@ant/claude-for-chrome-mcp": ["@ant/claude-for-chrome-mcp@workspace:packages/@ant/claude-for-chrome-mcp"], + + "@ant/computer-use-input": ["@ant/computer-use-input@workspace:packages/@ant/computer-use-input"], + + "@ant/computer-use-mcp": ["@ant/computer-use-mcp@workspace:packages/@ant/computer-use-mcp"], + + "@ant/computer-use-swift": ["@ant/computer-use-swift@workspace:packages/@ant/computer-use-swift"], + "@anthropic-ai/bedrock-sdk": ["@anthropic-ai/bedrock-sdk@0.26.4", "https://registry.npmmirror.com/@anthropic-ai/bedrock-sdk/-/bedrock-sdk-0.26.4.tgz", { "dependencies": { "@anthropic-ai/sdk": ">=0.50.3 <1", "@aws-crypto/sha256-js": "^4.0.0", "@aws-sdk/client-bedrock-runtime": "^3.797.0", "@aws-sdk/credential-providers": "^3.796.0", "@smithy/eventstream-serde-node": "^2.0.10", "@smithy/fetch-http-handler": "^5.0.4", "@smithy/protocol-http": "^3.0.6", "@smithy/signature-v4": "^3.1.1", "@smithy/smithy-client": "^2.1.9", "@smithy/types": "^2.3.4", "@smithy/util-base64": "^2.0.0" } }, "sha512-0Z2NY3T2wnzT9esRit6BiWpQXvL+F2b3z3Z9in3mXh7MDf122rVi2bcPowQHmo9ITXAPJmv/3H3t0V1z3Fugfw=="], "@anthropic-ai/claude-agent-sdk": ["@anthropic-ai/claude-agent-sdk@0.2.87", "https://registry.npmmirror.com/@anthropic-ai/claude-agent-sdk/-/claude-agent-sdk-0.2.87.tgz", { "dependencies": { "@anthropic-ai/sdk": "^0.74.0", "@modelcontextprotocol/sdk": "^1.27.1" }, "optionalDependencies": { "@img/sharp-darwin-arm64": "^0.34.2", "@img/sharp-darwin-x64": "^0.34.2", "@img/sharp-linux-arm": "^0.34.2", "@img/sharp-linux-arm64": "^0.34.2", "@img/sharp-linux-x64": "^0.34.2", "@img/sharp-linuxmusl-arm64": "^0.34.2", "@img/sharp-linuxmusl-x64": "^0.34.2", "@img/sharp-win32-arm64": "^0.34.2", "@img/sharp-win32-x64": "^0.34.2" }, "peerDependencies": { "zod": "^4.0.0" } }, "sha512-WWmgBPxPhBOvNT0ujI8vPTI2lK+w5YEkEZ/y1mH0EDkK/0kBnxVJNhCtG5vnueiAViwLoUOFn66pbkDiivijdA=="], @@ -530,6 +590,8 @@ "asynckit": ["asynckit@0.4.0", "https://registry.npmmirror.com/asynckit/-/asynckit-0.4.0.tgz", {}, "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q=="], + "audio-capture-napi": ["audio-capture-napi@workspace:packages/audio-capture-napi"], + "auto-bind": ["auto-bind@5.0.1", "https://registry.npmmirror.com/auto-bind/-/auto-bind-5.0.1.tgz", {}, "sha512-ooviqdwwgfIfNmDwo94wlshcdzfO64XV0Cg6oDsDYBJfITDz1EngD2z7DkbvCWn+XIMsIqW27sEVF6qcpJrRcg=="], "axios": ["axios@1.14.0", "https://registry.npmmirror.com/axios/-/axios-1.14.0.tgz", { "dependencies": { "follow-redirects": "^1.15.11", "form-data": "^4.0.5", "proxy-from-env": "^2.1.0" } }, "sha512-3Y8yrqLSwjuzpXuZ0oIYZ/XGgLwUIBU3uLvbcpb0pidD9ctpShJd43KSlEEkVQg6DS0G9NKyzOvBfUtDKEyHvQ=="], @@ -582,6 +644,8 @@ "color-convert": ["color-convert@2.0.1", "https://registry.npmmirror.com/color-convert/-/color-convert-2.0.1.tgz", { "dependencies": { "color-name": "~1.1.4" } }, "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ=="], + "color-diff-napi": ["color-diff-napi@workspace:packages/color-diff-napi"], + "color-name": ["color-name@1.1.4", "https://registry.npmmirror.com/color-name/-/color-name-1.1.4.tgz", {}, "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA=="], "combined-stream": ["combined-stream@1.0.8", "https://registry.npmmirror.com/combined-stream/-/combined-stream-1.0.8.tgz", { "dependencies": { "delayed-stream": "~1.0.0" } }, "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg=="], @@ -762,6 +826,8 @@ "ignore": ["ignore@7.0.5", "https://registry.npmmirror.com/ignore/-/ignore-7.0.5.tgz", {}, "sha512-Hs59xBNfUIunMFgWAbGX5cq6893IbWg4KnrjbYwX3tx0ztorVgTDA6B2sxf8ejHJ4wz8BqGUMYlnzNBer5NvGg=="], + "image-processor-napi": ["image-processor-napi@workspace:packages/image-processor-napi"], + "indent-string": ["indent-string@5.0.0", "https://registry.npmmirror.com/indent-string/-/indent-string-5.0.0.tgz", {}, "sha512-m6FAo/spmsW2Ab2fU35JTYwtOKa2yAwXSwgjSv1TJzh4Mh7mC3lzAOVLBprb72XsTrgkEIsl7YrFNAiDiRhIGg=="], "inherits": ["inherits@2.0.4", "https://registry.npmmirror.com/inherits/-/inherits-2.0.4.tgz", {}, "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="], @@ -858,6 +924,8 @@ "minipass-pipeline": ["minipass-pipeline@1.2.4", "https://registry.npmmirror.com/minipass-pipeline/-/minipass-pipeline-1.2.4.tgz", { "dependencies": { "minipass": "^3.0.0" } }, "sha512-xuIq7cIOt09RPRJ19gdi4b+RiNvDFYe5JH+ggNvBqGqpQXcru3PcRmOZuHBKWK1Txf9+cQ+HMVN4d6z46LZP7A=="], + "modifiers-napi": ["modifiers-napi@workspace:packages/modifiers-napi"], + "ms": ["ms@2.1.3", "https://registry.npmmirror.com/ms/-/ms-2.1.3.tgz", {}, "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA=="], "mute-stream": ["mute-stream@1.0.0", "https://registry.npmmirror.com/mute-stream/-/mute-stream-1.0.0.tgz", {}, "sha512-avsJQhyd+680gKXyG/sQc0nXaC6rBkPOfyHYcFb9+hdkqQkR9bdnkJ0AMZhke0oesPqIO+mFFJ+IdBc7mst4IA=="], @@ -1048,13 +1116,15 @@ "unpipe": ["unpipe@1.0.0", "https://registry.npmmirror.com/unpipe/-/unpipe-1.0.0.tgz", {}, "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ=="], + "url-handler-napi": ["url-handler-napi@workspace:packages/url-handler-napi"], + "usehooks-ts": ["usehooks-ts@3.1.1", "https://registry.npmmirror.com/usehooks-ts/-/usehooks-ts-3.1.1.tgz", { "dependencies": { "lodash.debounce": "^4.0.8" }, "peerDependencies": { "react": "^16.8.0 || ^17 || ^18 || ^19 || ^19.0.0-rc" } }, "sha512-I4diPp9Cq6ieSUH2wu+fDAVQO43xwtulo+fKEidHUwZPnYImbtkTjzIJYcDcJqxgmX31GVqNFURodvcgHcW0pA=="], "uuid": ["uuid@8.3.2", "https://registry.npmmirror.com/uuid/-/uuid-8.3.2.tgz", { "bin": { "uuid": "dist/bin/uuid" } }, "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg=="], "vary": ["vary@1.1.2", "https://registry.npmmirror.com/vary/-/vary-1.1.2.tgz", {}, "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg=="], - "vscode-jsonrpc": ["vscode-jsonrpc@8.2.0", "https://registry.npmmirror.com/vscode-jsonrpc/-/vscode-jsonrpc-8.2.0.tgz", {}, "sha512-C+r0eKJUIfiDIfwJhria30+TYWPtuHJXHtI7J0YlOmKAo7ogxP20T0zxB7HZQIFhIyvoBPwWskjxrvAtfjyZfA=="], + "vscode-jsonrpc": ["vscode-jsonrpc@8.2.1", "https://registry.npmmirror.com/vscode-jsonrpc/-/vscode-jsonrpc-8.2.1.tgz", {}, "sha512-kdjOSJ2lLIn7r1rtrMbbNCHjyMPfRnowdKjBQ+mGq6NAW5QY2bEZC/khaC5OR8svbbjvLEaIXkOq45e2X9BIbQ=="], "vscode-languageserver-protocol": ["vscode-languageserver-protocol@3.17.5", "https://registry.npmmirror.com/vscode-languageserver-protocol/-/vscode-languageserver-protocol-3.17.5.tgz", { "dependencies": { "vscode-jsonrpc": "8.2.0", "vscode-languageserver-types": "3.17.5" } }, "sha512-mb1bvRJN8SVznADSGWM9u/b07H7Ecg0I3OgXDuLdn307rl/J3A9YD6/eYOssqhecL27hK1IPZAsaqh00i/Jljg=="], @@ -1412,6 +1482,8 @@ "qrcode/yargs": ["yargs@15.4.1", "https://registry.npmmirror.com/yargs/-/yargs-15.4.1.tgz", { "dependencies": { "cliui": "^6.0.0", "decamelize": "^1.2.0", "find-up": "^4.1.0", "get-caller-file": "^2.0.1", "require-directory": "^2.1.1", "require-main-filename": "^2.0.0", "set-blocking": "^2.0.0", "string-width": "^4.2.0", "which-module": "^2.0.0", "y18n": "^4.0.0", "yargs-parser": "^18.1.2" } }, "sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A=="], + "vscode-languageserver-protocol/vscode-jsonrpc": ["vscode-jsonrpc@8.2.0", "https://registry.npmmirror.com/vscode-jsonrpc/-/vscode-jsonrpc-8.2.0.tgz", {}, "sha512-C+r0eKJUIfiDIfwJhria30+TYWPtuHJXHtI7J0YlOmKAo7ogxP20T0zxB7HZQIFhIyvoBPwWskjxrvAtfjyZfA=="], + "xss/commander": ["commander@2.20.3", "https://registry.npmmirror.com/commander/-/commander-2.20.3.tgz", {}, "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ=="], "yargs/string-width": ["string-width@4.2.3", "https://registry.npmmirror.com/string-width/-/string-width-4.2.3.tgz", { "dependencies": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", "strip-ansi": "^6.0.1" } }, "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g=="], diff --git a/package.json b/package.json index 2c4c621..e1023ee 100644 --- a/package.json +++ b/package.json @@ -3,12 +3,20 @@ "version": "1.0.0", "private": true, "type": "module", + "workspaces": [ + "packages/*", + "packages/@ant/*" + ], "scripts": { "build": "bun build src/entrypoints/cli.tsx --outdir dist --target bun", "dev": "bun run --watch src/entrypoints/cli.tsx" }, "dependencies": { "@alcalzone/ansi-tokenize": "^0.3.0", + "@ant/claude-for-chrome-mcp": "workspace:*", + "@ant/computer-use-input": "workspace:*", + "@ant/computer-use-mcp": "workspace:*", + "@ant/computer-use-swift": "workspace:*", "@anthropic-ai/bedrock-sdk": "^0.26.4", "@anthropic-ai/claude-agent-sdk": "latest", "@anthropic-ai/foundry-sdk": "^0.2.3", @@ -19,6 +27,7 @@ "@aws-sdk/client-bedrock": "latest", "@aws-sdk/client-bedrock-runtime": "latest", "@aws-sdk/client-sts": "^3.1020.0", + "@aws-sdk/credential-provider-node": "^3.972.28", "@aws-sdk/credential-providers": "latest", "@azure/identity": "^4.13.1", "@commander-js/extra-typings": "latest", @@ -41,10 +50,12 @@ "@opentelemetry/sdk-logs": "latest", "@opentelemetry/sdk-metrics": "latest", "@opentelemetry/sdk-trace-base": "latest", + "@opentelemetry/semantic-conventions": "latest", "@smithy/core": "latest", "@smithy/node-http-handler": "latest", "ajv": "latest", "asciichart": "latest", + "audio-capture-napi": "workspace:*", "auto-bind": "latest", "axios": "latest", "bidi-js": "latest", @@ -54,10 +65,12 @@ "cli-boxes": "latest", "cli-highlight": "^2.1.11", "code-excerpt": "latest", + "color-diff-napi": "workspace:*", "diff": "latest", "emoji-regex": "latest", "env-paths": "latest", "execa": "latest", + "fflate": "latest", "figures": "latest", "fuse.js": "latest", "get-east-asian-width": "latest", @@ -65,11 +78,13 @@ "highlight.js": "latest", "https-proxy-agent": "latest", "ignore": "latest", + "image-processor-napi": "workspace:*", "indent-string": "latest", "jsonc-parser": "^3.3.1", "lodash-es": "latest", "lru-cache": "latest", "marked": "latest", + "modifiers-napi": "workspace:*", "p-map": "latest", "picomatch": "latest", "plist": "^3.1.0", @@ -89,7 +104,9 @@ "turndown": "^7.2.2", "type-fest": "latest", "undici": "latest", + "url-handler-napi": "workspace:*", "usehooks-ts": "latest", + "vscode-jsonrpc": "latest", "vscode-languageserver-protocol": "latest", "vscode-languageserver-types": "latest", "wrap-ansi": "latest", diff --git a/packages/@ant/claude-for-chrome-mcp/package.json b/packages/@ant/claude-for-chrome-mcp/package.json new file mode 100644 index 0000000..deefa08 --- /dev/null +++ b/packages/@ant/claude-for-chrome-mcp/package.json @@ -0,0 +1,8 @@ +{ + "name": "@ant/claude-for-chrome-mcp", + "version": "1.0.0", + "private": true, + "type": "module", + "main": "./src/index.ts", + "types": "./src/index.ts" +} diff --git a/packages/@ant/claude-for-chrome-mcp/src/index.ts b/packages/@ant/claude-for-chrome-mcp/src/index.ts new file mode 100644 index 0000000..d7d76b1 --- /dev/null +++ b/packages/@ant/claude-for-chrome-mcp/src/index.ts @@ -0,0 +1,11 @@ +export const BROWSER_TOOLS: any[] = [] + +export class ClaudeForChromeContext {} + +export class Logger {} + +export type PermissionMode = any + +export function createClaudeForChromeMcpServer(..._args: any[]): any { + return null +} diff --git a/packages/@ant/computer-use-input/package.json b/packages/@ant/computer-use-input/package.json new file mode 100644 index 0000000..6e93f06 --- /dev/null +++ b/packages/@ant/computer-use-input/package.json @@ -0,0 +1,8 @@ +{ + "name": "@ant/computer-use-input", + "version": "1.0.0", + "private": true, + "type": "module", + "main": "./src/index.ts", + "types": "./src/index.ts" +} diff --git a/packages/@ant/computer-use-input/src/index.ts b/packages/@ant/computer-use-input/src/index.ts new file mode 100644 index 0000000..e0c61b1 --- /dev/null +++ b/packages/@ant/computer-use-input/src/index.ts @@ -0,0 +1,2 @@ +export class ComputerUseInput {} +export class ComputerUseInputAPI {} diff --git a/packages/@ant/computer-use-mcp/package.json b/packages/@ant/computer-use-mcp/package.json new file mode 100644 index 0000000..00c8f92 --- /dev/null +++ b/packages/@ant/computer-use-mcp/package.json @@ -0,0 +1,13 @@ +{ + "name": "@ant/computer-use-mcp", + "version": "1.0.0", + "private": true, + "type": "module", + "main": "./src/index.ts", + "types": "./src/index.ts", + "exports": { + ".": "./src/index.ts", + "./sentinelApps": "./src/sentinelApps.ts", + "./types": "./src/types.ts" + } +} diff --git a/packages/@ant/computer-use-mcp/src/index.ts b/packages/@ant/computer-use-mcp/src/index.ts new file mode 100644 index 0000000..25028da --- /dev/null +++ b/packages/@ant/computer-use-mcp/src/index.ts @@ -0,0 +1,30 @@ +export const API_RESIZE_PARAMS: any = {} + +export class ComputerExecutor {} + +export type ComputerUseSessionContext = any +export type CuCallToolResult = any +export type CuPermissionRequest = any +export type CuPermissionResponse = any +export const DEFAULT_GRANT_FLAGS: any = {} +export type DisplayGeometry = any +export type FrontmostApp = any +export type InstalledApp = any +export type ResolvePrepareCaptureResult = any +export type RunningApp = any +export type ScreenshotDims = any +export type ScreenshotResult = any + +export function bindSessionContext(..._args: any[]): any { + return null +} + +export function buildComputerUseTools(..._args: any[]): any[] { + return [] +} + +export function createComputerUseMcpServer(..._args: any[]): any { + return null +} + +export const targetImageSize: any = null diff --git a/packages/@ant/computer-use-mcp/src/sentinelApps.ts b/packages/@ant/computer-use-mcp/src/sentinelApps.ts new file mode 100644 index 0000000..de150b3 --- /dev/null +++ b/packages/@ant/computer-use-mcp/src/sentinelApps.ts @@ -0,0 +1,5 @@ +export const sentinelApps: string[] = [] + +export function getSentinelCategory(_appName: string): string | null { + return null +} diff --git a/packages/@ant/computer-use-mcp/src/types.ts b/packages/@ant/computer-use-mcp/src/types.ts new file mode 100644 index 0000000..4fc112c --- /dev/null +++ b/packages/@ant/computer-use-mcp/src/types.ts @@ -0,0 +1,8 @@ +export type ComputerUseConfig = any +export type ComputerUseHostAdapter = any +export type CoordinateMode = any +export type CuPermissionRequest = any +export type CuPermissionResponse = any +export type CuSubGates = any +export const DEFAULT_GRANT_FLAGS: any = {} +export type Logger = any diff --git a/packages/@ant/computer-use-swift/package.json b/packages/@ant/computer-use-swift/package.json new file mode 100644 index 0000000..3c4a83b --- /dev/null +++ b/packages/@ant/computer-use-swift/package.json @@ -0,0 +1,8 @@ +{ + "name": "@ant/computer-use-swift", + "version": "1.0.0", + "private": true, + "type": "module", + "main": "./src/index.ts", + "types": "./src/index.ts" +} diff --git a/packages/@ant/computer-use-swift/src/index.ts b/packages/@ant/computer-use-swift/src/index.ts new file mode 100644 index 0000000..4bdfff9 --- /dev/null +++ b/packages/@ant/computer-use-swift/src/index.ts @@ -0,0 +1 @@ +export class ComputerUseAPI {} diff --git a/packages/audio-capture-napi/package.json b/packages/audio-capture-napi/package.json new file mode 100644 index 0000000..dbc43a2 --- /dev/null +++ b/packages/audio-capture-napi/package.json @@ -0,0 +1,8 @@ +{ + "name": "audio-capture-napi", + "version": "1.0.0", + "private": true, + "type": "module", + "main": "./src/index.ts", + "types": "./src/index.ts" +} diff --git a/packages/audio-capture-napi/src/index.ts b/packages/audio-capture-napi/src/index.ts new file mode 100644 index 0000000..70aedb7 --- /dev/null +++ b/packages/audio-capture-napi/src/index.ts @@ -0,0 +1,2 @@ +const stub: any = {} +export default stub diff --git a/packages/color-diff-napi/package.json b/packages/color-diff-napi/package.json new file mode 100644 index 0000000..9648d50 --- /dev/null +++ b/packages/color-diff-napi/package.json @@ -0,0 +1,11 @@ +{ + "name": "color-diff-napi", + "version": "1.0.0", + "private": true, + "type": "module", + "main": "./src/index.ts", + "types": "./src/index.ts", + "dependencies": { + "highlight.js": "latest" + } +} diff --git a/src/native-ts/color-diff/index.ts b/packages/color-diff-napi/src/index.ts similarity index 98% rename from src/native-ts/color-diff/index.ts rename to packages/color-diff-napi/src/index.ts index d2757d3..0f9a808 100644 --- a/src/native-ts/color-diff/index.ts +++ b/packages/color-diff-napi/src/index.ts @@ -42,8 +42,15 @@ function hljs(): HLJSApi { return cachedHljs! } -import { stringWidth } from '../../ink/stringWidth.js' -import { logError } from '../../utils/log.js' +// Use Bun.stringWidth when available, otherwise fall back to simple .length +const stringWidth: (str: string) => number = + typeof Bun !== 'undefined' && typeof Bun.stringWidth === 'function' + ? Bun.stringWidth + : (str: string) => str.length + +function logError(error: unknown): void { + console.error(error instanceof Error ? error.message : String(error)) +} // --------------------------------------------------------------------------- // Public API types (match vendor/color-diff-src/index.d.ts) diff --git a/packages/image-processor-napi/package.json b/packages/image-processor-napi/package.json new file mode 100644 index 0000000..7c937ff --- /dev/null +++ b/packages/image-processor-napi/package.json @@ -0,0 +1,8 @@ +{ + "name": "image-processor-napi", + "version": "1.0.0", + "private": true, + "type": "module", + "main": "./src/index.ts", + "types": "./src/index.ts" +} diff --git a/packages/image-processor-napi/src/index.ts b/packages/image-processor-napi/src/index.ts new file mode 100644 index 0000000..ae94f74 --- /dev/null +++ b/packages/image-processor-napi/src/index.ts @@ -0,0 +1,6 @@ +export function getNativeModule(): null { + return null +} + +const stub: any = {} +export default stub diff --git a/packages/modifiers-napi/package.json b/packages/modifiers-napi/package.json new file mode 100644 index 0000000..fb6aa54 --- /dev/null +++ b/packages/modifiers-napi/package.json @@ -0,0 +1,8 @@ +{ + "name": "modifiers-napi", + "version": "1.0.0", + "private": true, + "type": "module", + "main": "./src/index.ts", + "types": "./src/index.ts" +} diff --git a/packages/modifiers-napi/src/index.ts b/packages/modifiers-napi/src/index.ts new file mode 100644 index 0000000..2c862ba --- /dev/null +++ b/packages/modifiers-napi/src/index.ts @@ -0,0 +1,5 @@ +export function prewarm(): void {} + +export function isModifierPressed(_modifier: string): boolean { + return false +} diff --git a/packages/url-handler-napi/package.json b/packages/url-handler-napi/package.json new file mode 100644 index 0000000..92d9874 --- /dev/null +++ b/packages/url-handler-napi/package.json @@ -0,0 +1,8 @@ +{ + "name": "url-handler-napi", + "version": "1.0.0", + "private": true, + "type": "module", + "main": "./src/index.ts", + "types": "./src/index.ts" +} diff --git a/packages/url-handler-napi/src/index.ts b/packages/url-handler-napi/src/index.ts new file mode 100644 index 0000000..0497d63 --- /dev/null +++ b/packages/url-handler-napi/src/index.ts @@ -0,0 +1,3 @@ +export async function waitForUrlEvent(): Promise { + return null +} diff --git a/src/entrypoints/cli.tsx b/src/entrypoints/cli.tsx index f506dbc..16c5e45 100644 --- a/src/entrypoints/cli.tsx +++ b/src/entrypoints/cli.tsx @@ -2,7 +2,7 @@ const feature = (_name: string) => false; if (typeof globalThis.MACRO === "undefined") { (globalThis as any).MACRO = { - VERSION: "2.1.87", + VERSION: "2.1.888", BUILD_TIME: new Date().toISOString(), FEEDBACK_CHANNEL: "", ISSUES_EXPLAINER: "", diff --git a/src/types/internal-modules.d.ts b/src/types/internal-modules.d.ts index d9aba9a..03f4708 100644 --- a/src/types/internal-modules.d.ts +++ b/src/types/internal-modules.d.ts @@ -8,115 +8,12 @@ // bun:bundle — compile-time macros // ============================================================================ declare module "bun:bundle" { - export function feature(name: string): boolean - export function MACRO(fn: () => T): T + export function feature(name: string): boolean; + export function MACRO(fn: () => T): T; } declare module "bun:ffi" { - export function dlopen(path: string, symbols: Record): any + export function dlopen(path: string, symbols: Record): any; } -// ============================================================================ -// @ant/claude-for-chrome-mcp -// ============================================================================ -declare module "@ant/claude-for-chrome-mcp" { - export const BROWSER_TOOLS: any[] - export class ClaudeForChromeContext { } - export class Logger { } - export type PermissionMode = any - export function createClaudeForChromeMcpServer(...args: any[]): any -} - -// ============================================================================ -// @ant/computer-use-mcp -// ============================================================================ -declare module "@ant/computer-use-mcp" { - export const API_RESIZE_PARAMS: any - export class ComputerExecutor { } - export type ComputerUseSessionContext = any - export type CuCallToolResult = any - export type CuPermissionRequest = any - export type CuPermissionResponse = any - export type DEFAULT_GRANT_FLAGS = any - export type DisplayGeometry = any - export type FrontmostApp = any - export type InstalledApp = any - export type ResolvePrepareCaptureResult = any - export type RunningApp = any - export type ScreenshotDims = any - export type ScreenshotResult = any - export function bindSessionContext(...args: any[]): any - export function buildComputerUseTools(...args: any[]): any[] - export function createComputerUseMcpServer(...args: any[]): any - export const targetImageSize: any -} - -declare module "@ant/computer-use-mcp/sentinelApps" { - export const sentinelApps: string[] - export function getSentinelCategory(appName: string): string | null -} - -declare module "@ant/computer-use-mcp/types" { - export type ComputerUseConfig = any - export type ComputerUseHostAdapter = any - export type CoordinateMode = any - export type CuPermissionRequest = any - export type CuPermissionResponse = any - export type CuSubGates = any - export type DEFAULT_GRANT_FLAGS = any - export type Logger = any -} - -// ============================================================================ -// @ant/computer-use-input -// ============================================================================ -declare module "@ant/computer-use-input" { - export class ComputerUseInput { } - export class ComputerUseInputAPI { } -} - -// ============================================================================ -// @ant/computer-use-swift -// ============================================================================ -declare module "@ant/computer-use-swift" { - export class ComputerUseAPI { } -} - -// ============================================================================ -// @anthropic-ai/mcpb — McpbManifest was renamed -// ============================================================================ -declare module "@anthropic-ai/mcpb" { - export type McpbManifest = any - export type McpbUserConfigurationOption = any - // Re-export whatever is actually available - export * from "@anthropic-ai/mcpb" -} - -// ============================================================================ -// color-diff-napi -// ============================================================================ -declare module "color-diff-napi" { - export function diff(a: [number, number, number], b: [number, number, number]): number - export type ColorDiff = any - export type ColorFile = any - export type SyntaxTheme = any - export function getSyntaxTheme(): SyntaxTheme -} - -// ============================================================================ -// Internal Anthropic native modules -// ============================================================================ -declare module "audio-capture-napi" { - const _: any - export default _ -} - -declare module "image-processor-napi" { - const _: any - export default _ -} - -declare module "url-handler-napi" { - const _: any - export default _ -} +//