gclm-code 1.0.0 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/README.md +1 -1
  2. package/bin/gc.js +53 -25
  3. package/bin/install-runtime.js +253 -0
  4. package/package.json +10 -5
  5. package/vendor/manifest.json +92 -0
  6. package/vendor/modules/node_modules/@ant/claude-for-chrome-mcp/package.json +9 -0
  7. package/vendor/modules/node_modules/@ant/claude-for-chrome-mcp/src/bridgeClient.ts +1126 -0
  8. package/vendor/modules/node_modules/@ant/claude-for-chrome-mcp/src/browserTools.ts +546 -0
  9. package/vendor/modules/node_modules/@ant/claude-for-chrome-mcp/src/index.ts +15 -0
  10. package/vendor/modules/node_modules/@ant/claude-for-chrome-mcp/src/mcpServer.ts +96 -0
  11. package/vendor/modules/node_modules/@ant/claude-for-chrome-mcp/src/mcpSocketClient.ts +493 -0
  12. package/vendor/modules/node_modules/@ant/claude-for-chrome-mcp/src/mcpSocketPool.ts +327 -0
  13. package/vendor/modules/node_modules/@ant/claude-for-chrome-mcp/src/toolCalls.ts +301 -0
  14. package/vendor/modules/node_modules/@ant/claude-for-chrome-mcp/src/types.ts +134 -0
  15. package/vendor/modules/node_modules/@ant/computer-use-input/package.json +9 -0
  16. package/vendor/modules/node_modules/@ant/computer-use-input/src/driver-jxa.js +341 -0
  17. package/vendor/modules/node_modules/@ant/computer-use-input/src/driver-swift.swift +417 -0
  18. package/vendor/modules/node_modules/@ant/computer-use-input/src/implementation.js +204 -0
  19. package/vendor/modules/node_modules/@ant/computer-use-input/src/index.js +5 -0
  20. package/vendor/modules/node_modules/@ant/computer-use-mcp/package.json +11 -0
  21. package/vendor/modules/node_modules/@ant/computer-use-mcp/src/deniedApps.ts +553 -0
  22. package/vendor/modules/node_modules/@ant/computer-use-mcp/src/imageResize.ts +108 -0
  23. package/vendor/modules/node_modules/@ant/computer-use-mcp/src/index.ts +69 -0
  24. package/vendor/modules/node_modules/@ant/computer-use-mcp/src/keyBlocklist.ts +153 -0
  25. package/vendor/modules/node_modules/@ant/computer-use-mcp/src/mcpServer.ts +313 -0
  26. package/vendor/modules/node_modules/@ant/computer-use-mcp/src/pixelCompare.ts +171 -0
  27. package/vendor/modules/node_modules/@ant/computer-use-mcp/src/sentinelApps.ts +43 -0
  28. package/vendor/modules/node_modules/@ant/computer-use-mcp/src/subGates.ts +19 -0
  29. package/vendor/modules/node_modules/@ant/computer-use-mcp/src/toolCalls.ts +3872 -0
  30. package/vendor/modules/node_modules/@ant/computer-use-mcp/src/tools.ts +706 -0
  31. package/vendor/modules/node_modules/@ant/computer-use-mcp/src/types.ts +635 -0
  32. package/vendor/modules/node_modules/@ant/computer-use-swift/package.json +9 -0
  33. package/vendor/modules/node_modules/@ant/computer-use-swift/src/driver-jxa.js +108 -0
  34. package/vendor/modules/node_modules/@ant/computer-use-swift/src/implementation.js +706 -0
  35. package/vendor/modules/node_modules/@ant/computer-use-swift/src/index.js +7 -0
  36. package/vendor/modules/node_modules/audio-capture-napi/package.json +8 -0
  37. package/vendor/modules/node_modules/audio-capture-napi/src/index.ts +226 -0
  38. package/vendor/modules/node_modules/image-processor-napi/package.json +11 -0
  39. package/vendor/modules/node_modules/image-processor-napi/src/index.ts +396 -0
  40. package/vendor/modules/node_modules/modifiers-napi/package.json +8 -0
  41. package/vendor/modules/node_modules/modifiers-napi/src/index.ts +79 -0
  42. package/vendor/modules/node_modules/url-handler-napi/package.json +8 -0
  43. package/vendor/modules/node_modules/url-handler-napi/src/index.ts +62 -0
@@ -0,0 +1,108 @@
1
+ ObjC.import('AppKit')
2
+ ObjC.import('CoreGraphics')
3
+ ObjC.import('ApplicationServices')
4
+ ObjC.import('stdlib')
5
+
6
+ function main() {
7
+ const argv = $.NSProcessInfo.processInfo.arguments
8
+ if (argv.count < 5) {
9
+ throw new Error('Expected JSON payload argument')
10
+ }
11
+
12
+ const payload = JSON.parse(ObjC.unwrap(argv.objectAtIndex(argv.count - 1)))
13
+ const result = dispatch(payload)
14
+ if (result !== undefined) {
15
+ $.NSFileHandle.fileHandleWithStandardOutput.writeData(
16
+ $(JSON.stringify(result)).dataUsingEncoding($.NSUTF8StringEncoding),
17
+ )
18
+ }
19
+ }
20
+
21
+ function dispatch(payload) {
22
+ switch (payload.op) {
23
+ case 'listDisplays':
24
+ return listDisplays()
25
+ case 'listWindows':
26
+ return listWindows()
27
+ case 'listRunningApps':
28
+ return listRunningApps()
29
+ default:
30
+ throw new Error(`Unsupported operation: ${payload.op}`)
31
+ }
32
+ }
33
+
34
+ function listDisplays() {
35
+ const screens = $.NSScreen.screens.js
36
+ const mainScreen = $.NSScreen.mainScreen
37
+ const mainDescription = mainScreen ? mainScreen.deviceDescription : null
38
+ const mainScreenNumber = mainDescription
39
+ ? mainDescription.objectForKey('NSScreenNumber')
40
+ : null
41
+ const primaryDisplayId = mainScreenNumber
42
+ ? Number(ObjC.unwrap(mainScreenNumber))
43
+ : null
44
+ return screens.map(screen => {
45
+ const frame = screen.frame
46
+ const description = screen.deviceDescription
47
+ const screenNumber = description.objectForKey('NSScreenNumber')
48
+ const displayId = Number(ObjC.unwrap(screenNumber))
49
+ return {
50
+ displayId,
51
+ originX: Math.round(frame.origin.x),
52
+ originY: Math.round(frame.origin.y),
53
+ width: Math.round(frame.size.width),
54
+ height: Math.round(frame.size.height),
55
+ scaleFactor: Number(screen.backingScaleFactor) || 1,
56
+ label: ObjC.unwrap(screen.localizedName) || null,
57
+ isPrimary: primaryDisplayId === displayId,
58
+ }
59
+ })
60
+ }
61
+
62
+ function bundleIdForPid(pid) {
63
+ if (!pid) {
64
+ return null
65
+ }
66
+ const app = $.NSRunningApplication.runningApplicationWithProcessIdentifier(pid)
67
+ if (!app) {
68
+ return null
69
+ }
70
+ const bundleIdentifier = app.bundleIdentifier
71
+ return bundleIdentifier ? ObjC.unwrap(bundleIdentifier) : null
72
+ }
73
+
74
+ function listWindows() {
75
+ const options =
76
+ $.kCGWindowListOptionOnScreenOnly | $.kCGWindowListExcludeDesktopElements
77
+ const windowInfo = $.CGWindowListCopyWindowInfo(options, $.kCGNullWindowID)
78
+ const windows = ObjC.deepUnwrap(windowInfo) || []
79
+ $.CFRelease(windowInfo)
80
+
81
+ return windows
82
+ .filter(window => Number(window.kCGWindowLayer || 0) === 0)
83
+ .map(window => {
84
+ const bounds = window.kCGWindowBounds || {}
85
+ const bundleId = bundleIdForPid(Number(window.kCGWindowOwnerPID || 0))
86
+ return {
87
+ bundleId,
88
+ displayName: window.kCGWindowOwnerName || window.kCGWindowName || bundleId || null,
89
+ x: Math.round(bounds.X || 0),
90
+ y: Math.round(bounds.Y || 0),
91
+ width: Math.round(bounds.Width || 0),
92
+ height: Math.round(bounds.Height || 0),
93
+ }
94
+ })
95
+ }
96
+
97
+ function listRunningApps() {
98
+ const workspace = $.NSWorkspace.sharedWorkspace
99
+ const apps = workspace.runningApplications.js
100
+ return apps
101
+ .filter(app => ObjC.unwrap(app.bundleIdentifier))
102
+ .map(app => ({
103
+ bundleId: ObjC.unwrap(app.bundleIdentifier),
104
+ displayName: ObjC.unwrap(app.localizedName) || ObjC.unwrap(app.bundleIdentifier),
105
+ }))
106
+ }
107
+
108
+ main()