junis 0.4.1 → 0.4.2

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.
package/dist/cli/index.js CHANGED
@@ -570,9 +570,9 @@ var FilesystemTools = class {
570
570
  "- For reading files prefer read_file, for editing prefer edit_block, for searching prefer search_code.",
571
571
  "- NOT for macOS app GUI interaction. Use desktop_* tools instead: desktop_open_app, desktop_see, desktop_click, desktop_type, desktop_paste, desktop_hotkey, desktop_scroll, desktop_move, desktop_menu, desktop_screenshot.",
572
572
  "- Exception: permission fix commands (swift -e, peekaboo permissions, open 'x-apple.systempreferences:...').",
573
- "- Exception: osascript coordinate queries \u2014 Use osascript via this tool to query exact UI element position and size before any click/move/drag operation.",
573
+ "- Exception: osascript coordinate queries \u2014 Use osascript via this tool to query exact UI element position and size for click/move/drag.",
574
574
  " Pattern: osascript + System Events \u2192 position + size \u2192 center = (x + w/2, y + h/2) \u2192 desktop_click(coords).",
575
- " This is the ONLY reliable way to get pixel-accurate coordinates on macOS. NEVER estimate coords from screenshots.",
575
+ " This is the most reliable way to get pixel-accurate coordinates on macOS.",
576
576
  "",
577
577
  "BEHAVIOR:",
578
578
  "- Execute commands directly when the user requests them. Do not ask for confirmation \u2014 the user has already decided.",
@@ -2310,10 +2310,9 @@ var DesktopTools = class {
2310
2310
  server.tool(
2311
2311
  "desktop_screenshot",
2312
2312
  [
2313
- "Take a screenshot. Returns base64 image at logical resolution (matches click coordinate system 1:1).",
2314
- "Use for visual context or to verify UI state ONLY.",
2315
- "WARNING: NEVER estimate click coordinates from screenshot images \u2014 visual estimation causes misclicks. Use desktop_click(query, app) for auto-resolution, or execute_command + osascript for exact coords.",
2316
- "Do not use visual coordinates from this screenshot directly. Use execute_command + osascript to verify exact element position first."
2313
+ "Take a screenshot. Returns base64 image at logical resolution (1:1 with click coordinate system).",
2314
+ "Use for visual context, verify UI state, or locate elements when query-based methods fail.",
2315
+ "For clicking, prefer desktop_click(query, app) which auto-resolves coords. If that fails, use osascript or visual estimation from this image as fallback."
2317
2316
  ].join("\n"),
2318
2317
  {
2319
2318
  app: z5.string().optional().describe("Capture specific app window"),
@@ -2353,7 +2352,7 @@ var DesktopTools = class {
2353
2352
  "Click a UI element by text label (query), AX role (role), coordinates (coords), or element ID (on).",
2354
2353
  "BEST: Use query with app \u2014 auto-resolves coords via accessibility API (L1-L3 depth), then falls back to full tree search for deeply nested elements. No desktop_see needed.",
2355
2354
  "ROLE: Use role (e.g. 'AXTextArea', 'AXTextField') to find elements without visible text labels (input fields, text areas). Searches L1-L3 depth.",
2356
- "GOOD: Use coords 'x,y' \u2014 MUST be from osascript center calculation (position + size/2). NEVER estimate from screenshots.",
2355
+ "GOOD: Use coords 'x,y' \u2014 best from osascript center calculation (position + size/2), or from screenshot if osascript is unavailable.",
2357
2356
  "CAUTION: 'on' (element ID) has known offset bug \u2014 use query, role, or coords instead.",
2358
2357
  "If not found: try desktop_menu for menu items, desktop_hotkey for shortcuts.",
2359
2358
  "NOTE: Web page elements (inside browser) are invisible \u2014 use browser_* tools instead."
@@ -2363,7 +2362,7 @@ var DesktopTools = class {
2363
2362
  role: z5.string().optional().describe("AX role to find (e.g. 'AXTextArea', 'AXTextField', 'AXButton'). Use when element has no text label."),
2364
2363
  on: z5.string().optional().describe("Element ID from desktop_see (e.g. 'B1', 'T2')"),
2365
2364
  coords: z5.string().optional().describe("Screen coordinates 'x,y' (e.g. '500,300')"),
2366
- app: z5.string().optional().describe("App name"),
2365
+ app: z5.string().optional().describe("App name (always specify for faster resolution)"),
2367
2366
  snapshot: z5.string().optional().describe("Snapshot ID from desktop_see"),
2368
2367
  doubleClick: z5.boolean().optional().default(false).describe("Double-click"),
2369
2368
  rightClick: z5.boolean().optional().default(false).describe("Right-click (context menu)"),
@@ -2514,7 +2513,7 @@ var DesktopTools = class {
2514
2513
  "desktop_move",
2515
2514
  [
2516
2515
  "Move mouse cursor without clicking. Use before scroll or to hover.",
2517
- "Before using coords, always query exact position via execute_command + osascript. Calculate center = position + size/2. Never estimate from screenshots."
2516
+ "For coords, prefer osascript (position + size/2) or use 'to' with text label for auto-resolution."
2518
2517
  ].join("\n"),
2519
2518
  {
2520
2519
  coords: z5.string().optional().describe("Screen coordinates 'x,y'"),
@@ -2551,7 +2550,7 @@ var DesktopTools = class {
2551
2550
  [
2552
2551
  "Drag and drop between elements or coordinates. Supports cross-app drag (e.g. file to Trash).",
2553
2552
  "Prefer fromCoords/toCoords for accuracy. Element IDs (from/to) have known offset bug.",
2554
- "Before using fromCoords/toCoords, always query exact position via execute_command + osascript. Calculate center = position + size/2. Never estimate from screenshots."
2553
+ "For coords, prefer osascript (position + size/2). If unavailable, screenshot-based estimation is acceptable."
2555
2554
  ].join("\n"),
2556
2555
  {
2557
2556
  from: z5.string().optional().describe("Source element ID from desktop_see"),
@@ -86,9 +86,9 @@ var FilesystemTools = class {
86
86
  "- For reading files prefer read_file, for editing prefer edit_block, for searching prefer search_code.",
87
87
  "- NOT for macOS app GUI interaction. Use desktop_* tools instead: desktop_open_app, desktop_see, desktop_click, desktop_type, desktop_paste, desktop_hotkey, desktop_scroll, desktop_move, desktop_menu, desktop_screenshot.",
88
88
  "- Exception: permission fix commands (swift -e, peekaboo permissions, open 'x-apple.systempreferences:...').",
89
- "- Exception: osascript coordinate queries \u2014 Use osascript via this tool to query exact UI element position and size before any click/move/drag operation.",
89
+ "- Exception: osascript coordinate queries \u2014 Use osascript via this tool to query exact UI element position and size for click/move/drag.",
90
90
  " Pattern: osascript + System Events \u2192 position + size \u2192 center = (x + w/2, y + h/2) \u2192 desktop_click(coords).",
91
- " This is the ONLY reliable way to get pixel-accurate coordinates on macOS. NEVER estimate coords from screenshots.",
91
+ " This is the most reliable way to get pixel-accurate coordinates on macOS.",
92
92
  "",
93
93
  "BEHAVIOR:",
94
94
  "- Execute commands directly when the user requests them. Do not ask for confirmation \u2014 the user has already decided.",
@@ -1826,10 +1826,9 @@ var DesktopTools = class {
1826
1826
  server.tool(
1827
1827
  "desktop_screenshot",
1828
1828
  [
1829
- "Take a screenshot. Returns base64 image at logical resolution (matches click coordinate system 1:1).",
1830
- "Use for visual context or to verify UI state ONLY.",
1831
- "WARNING: NEVER estimate click coordinates from screenshot images \u2014 visual estimation causes misclicks. Use desktop_click(query, app) for auto-resolution, or execute_command + osascript for exact coords.",
1832
- "Do not use visual coordinates from this screenshot directly. Use execute_command + osascript to verify exact element position first."
1829
+ "Take a screenshot. Returns base64 image at logical resolution (1:1 with click coordinate system).",
1830
+ "Use for visual context, verify UI state, or locate elements when query-based methods fail.",
1831
+ "For clicking, prefer desktop_click(query, app) which auto-resolves coords. If that fails, use osascript or visual estimation from this image as fallback."
1833
1832
  ].join("\n"),
1834
1833
  {
1835
1834
  app: z5.string().optional().describe("Capture specific app window"),
@@ -1869,7 +1868,7 @@ var DesktopTools = class {
1869
1868
  "Click a UI element by text label (query), AX role (role), coordinates (coords), or element ID (on).",
1870
1869
  "BEST: Use query with app \u2014 auto-resolves coords via accessibility API (L1-L3 depth), then falls back to full tree search for deeply nested elements. No desktop_see needed.",
1871
1870
  "ROLE: Use role (e.g. 'AXTextArea', 'AXTextField') to find elements without visible text labels (input fields, text areas). Searches L1-L3 depth.",
1872
- "GOOD: Use coords 'x,y' \u2014 MUST be from osascript center calculation (position + size/2). NEVER estimate from screenshots.",
1871
+ "GOOD: Use coords 'x,y' \u2014 best from osascript center calculation (position + size/2), or from screenshot if osascript is unavailable.",
1873
1872
  "CAUTION: 'on' (element ID) has known offset bug \u2014 use query, role, or coords instead.",
1874
1873
  "If not found: try desktop_menu for menu items, desktop_hotkey for shortcuts.",
1875
1874
  "NOTE: Web page elements (inside browser) are invisible \u2014 use browser_* tools instead."
@@ -1879,7 +1878,7 @@ var DesktopTools = class {
1879
1878
  role: z5.string().optional().describe("AX role to find (e.g. 'AXTextArea', 'AXTextField', 'AXButton'). Use when element has no text label."),
1880
1879
  on: z5.string().optional().describe("Element ID from desktop_see (e.g. 'B1', 'T2')"),
1881
1880
  coords: z5.string().optional().describe("Screen coordinates 'x,y' (e.g. '500,300')"),
1882
- app: z5.string().optional().describe("App name"),
1881
+ app: z5.string().optional().describe("App name (always specify for faster resolution)"),
1883
1882
  snapshot: z5.string().optional().describe("Snapshot ID from desktop_see"),
1884
1883
  doubleClick: z5.boolean().optional().default(false).describe("Double-click"),
1885
1884
  rightClick: z5.boolean().optional().default(false).describe("Right-click (context menu)"),
@@ -2030,7 +2029,7 @@ var DesktopTools = class {
2030
2029
  "desktop_move",
2031
2030
  [
2032
2031
  "Move mouse cursor without clicking. Use before scroll or to hover.",
2033
- "Before using coords, always query exact position via execute_command + osascript. Calculate center = position + size/2. Never estimate from screenshots."
2032
+ "For coords, prefer osascript (position + size/2) or use 'to' with text label for auto-resolution."
2034
2033
  ].join("\n"),
2035
2034
  {
2036
2035
  coords: z5.string().optional().describe("Screen coordinates 'x,y'"),
@@ -2067,7 +2066,7 @@ var DesktopTools = class {
2067
2066
  [
2068
2067
  "Drag and drop between elements or coordinates. Supports cross-app drag (e.g. file to Trash).",
2069
2068
  "Prefer fromCoords/toCoords for accuracy. Element IDs (from/to) have known offset bug.",
2070
- "Before using fromCoords/toCoords, always query exact position via execute_command + osascript. Calculate center = position + size/2. Never estimate from screenshots."
2069
+ "For coords, prefer osascript (position + size/2). If unavailable, screenshot-based estimation is acceptable."
2071
2070
  ].join("\n"),
2072
2071
  {
2073
2072
  from: z5.string().optional().describe("Source element ID from desktop_see"),
@@ -87,9 +87,9 @@ var FilesystemTools = class {
87
87
  "- For reading files prefer read_file, for editing prefer edit_block, for searching prefer search_code.",
88
88
  "- NOT for macOS app GUI interaction. Use desktop_* tools instead: desktop_open_app, desktop_see, desktop_click, desktop_type, desktop_paste, desktop_hotkey, desktop_scroll, desktop_move, desktop_menu, desktop_screenshot.",
89
89
  "- Exception: permission fix commands (swift -e, peekaboo permissions, open 'x-apple.systempreferences:...').",
90
- "- Exception: osascript coordinate queries \u2014 Use osascript via this tool to query exact UI element position and size before any click/move/drag operation.",
90
+ "- Exception: osascript coordinate queries \u2014 Use osascript via this tool to query exact UI element position and size for click/move/drag.",
91
91
  " Pattern: osascript + System Events \u2192 position + size \u2192 center = (x + w/2, y + h/2) \u2192 desktop_click(coords).",
92
- " This is the ONLY reliable way to get pixel-accurate coordinates on macOS. NEVER estimate coords from screenshots.",
92
+ " This is the most reliable way to get pixel-accurate coordinates on macOS.",
93
93
  "",
94
94
  "BEHAVIOR:",
95
95
  "- Execute commands directly when the user requests them. Do not ask for confirmation \u2014 the user has already decided.",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "junis",
3
- "version": "0.4.1",
3
+ "version": "0.4.2",
4
4
  "description": "One-line device control for AI agents",
5
5
  "type": "module",
6
6
  "bin": {