pygpt-net 2.7.4__py3-none-any.whl → 2.7.6__py3-none-any.whl

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 (159) hide show
  1. pygpt_net/CHANGELOG.txt +15 -0
  2. pygpt_net/__init__.py +4 -4
  3. pygpt_net/app_core.py +4 -2
  4. pygpt_net/controller/__init__.py +5 -1
  5. pygpt_net/controller/assistant/assistant.py +1 -4
  6. pygpt_net/controller/assistant/batch.py +5 -504
  7. pygpt_net/controller/assistant/editor.py +5 -5
  8. pygpt_net/controller/assistant/files.py +16 -16
  9. pygpt_net/controller/chat/handler/google_stream.py +307 -1
  10. pygpt_net/controller/chat/handler/worker.py +10 -25
  11. pygpt_net/controller/chat/handler/xai_stream.py +621 -52
  12. pygpt_net/controller/chat/image.py +2 -2
  13. pygpt_net/controller/debug/fixtures.py +3 -2
  14. pygpt_net/controller/dialogs/confirm.py +73 -101
  15. pygpt_net/controller/files/files.py +65 -4
  16. pygpt_net/controller/lang/mapping.py +9 -9
  17. pygpt_net/controller/painter/capture.py +50 -1
  18. pygpt_net/controller/presets/presets.py +2 -1
  19. pygpt_net/controller/remote_store/__init__.py +12 -0
  20. pygpt_net/{provider/core/assistant_file/db_sqlite → controller/remote_store/google}/__init__.py +2 -2
  21. pygpt_net/controller/remote_store/google/batch.py +402 -0
  22. pygpt_net/controller/remote_store/google/store.py +615 -0
  23. pygpt_net/controller/remote_store/openai/__init__.py +12 -0
  24. pygpt_net/controller/remote_store/openai/batch.py +524 -0
  25. pygpt_net/controller/{assistant → remote_store/openai}/store.py +63 -60
  26. pygpt_net/controller/remote_store/remote_store.py +35 -0
  27. pygpt_net/controller/ui/ui.py +20 -1
  28. pygpt_net/core/assistants/assistants.py +3 -15
  29. pygpt_net/core/db/database.py +5 -3
  30. pygpt_net/core/filesystem/url.py +4 -1
  31. pygpt_net/core/locale/placeholder.py +35 -0
  32. pygpt_net/core/remote_store/__init__.py +12 -0
  33. pygpt_net/core/remote_store/google/__init__.py +11 -0
  34. pygpt_net/core/remote_store/google/files.py +224 -0
  35. pygpt_net/core/remote_store/google/store.py +248 -0
  36. pygpt_net/core/remote_store/openai/__init__.py +11 -0
  37. pygpt_net/core/{assistants → remote_store/openai}/files.py +26 -19
  38. pygpt_net/core/{assistants → remote_store/openai}/store.py +32 -15
  39. pygpt_net/core/remote_store/remote_store.py +24 -0
  40. pygpt_net/core/render/web/body.py +3 -2
  41. pygpt_net/core/types/chunk.py +27 -0
  42. pygpt_net/data/config/config.json +8 -4
  43. pygpt_net/data/config/models.json +77 -3
  44. pygpt_net/data/config/settings.json +45 -0
  45. pygpt_net/data/js/app/template.js +1 -1
  46. pygpt_net/data/js/app.min.js +2 -2
  47. pygpt_net/data/locale/locale.de.ini +44 -41
  48. pygpt_net/data/locale/locale.en.ini +56 -43
  49. pygpt_net/data/locale/locale.es.ini +44 -41
  50. pygpt_net/data/locale/locale.fr.ini +44 -41
  51. pygpt_net/data/locale/locale.it.ini +44 -41
  52. pygpt_net/data/locale/locale.pl.ini +45 -42
  53. pygpt_net/data/locale/locale.uk.ini +44 -41
  54. pygpt_net/data/locale/locale.zh.ini +44 -41
  55. pygpt_net/data/locale/plugin.cmd_history.de.ini +1 -1
  56. pygpt_net/data/locale/plugin.cmd_history.en.ini +1 -1
  57. pygpt_net/data/locale/plugin.cmd_history.es.ini +1 -1
  58. pygpt_net/data/locale/plugin.cmd_history.fr.ini +1 -1
  59. pygpt_net/data/locale/plugin.cmd_history.it.ini +1 -1
  60. pygpt_net/data/locale/plugin.cmd_history.pl.ini +1 -1
  61. pygpt_net/data/locale/plugin.cmd_history.uk.ini +1 -1
  62. pygpt_net/data/locale/plugin.cmd_history.zh.ini +1 -1
  63. pygpt_net/data/locale/plugin.cmd_mouse_control.en.ini +14 -0
  64. pygpt_net/data/locale/plugin.cmd_web.de.ini +1 -1
  65. pygpt_net/data/locale/plugin.cmd_web.en.ini +1 -1
  66. pygpt_net/data/locale/plugin.cmd_web.es.ini +1 -1
  67. pygpt_net/data/locale/plugin.cmd_web.fr.ini +1 -1
  68. pygpt_net/data/locale/plugin.cmd_web.it.ini +1 -1
  69. pygpt_net/data/locale/plugin.cmd_web.pl.ini +1 -1
  70. pygpt_net/data/locale/plugin.cmd_web.uk.ini +1 -1
  71. pygpt_net/data/locale/plugin.cmd_web.zh.ini +1 -1
  72. pygpt_net/data/locale/plugin.idx_llama_index.de.ini +2 -2
  73. pygpt_net/data/locale/plugin.idx_llama_index.en.ini +2 -2
  74. pygpt_net/data/locale/plugin.idx_llama_index.es.ini +2 -2
  75. pygpt_net/data/locale/plugin.idx_llama_index.fr.ini +2 -2
  76. pygpt_net/data/locale/plugin.idx_llama_index.it.ini +2 -2
  77. pygpt_net/data/locale/plugin.idx_llama_index.pl.ini +2 -2
  78. pygpt_net/data/locale/plugin.idx_llama_index.uk.ini +2 -2
  79. pygpt_net/data/locale/plugin.idx_llama_index.zh.ini +2 -2
  80. pygpt_net/item/assistant.py +1 -211
  81. pygpt_net/item/ctx.py +3 -3
  82. pygpt_net/item/store.py +238 -0
  83. pygpt_net/js_rc.py +2449 -2447
  84. pygpt_net/migrations/Version20260102190000.py +35 -0
  85. pygpt_net/migrations/__init__.py +3 -1
  86. pygpt_net/plugin/cmd_mouse_control/config.py +471 -1
  87. pygpt_net/plugin/cmd_mouse_control/plugin.py +487 -22
  88. pygpt_net/plugin/cmd_mouse_control/worker.py +464 -87
  89. pygpt_net/plugin/cmd_mouse_control/worker_sandbox.py +729 -0
  90. pygpt_net/plugin/idx_llama_index/config.py +2 -2
  91. pygpt_net/provider/api/anthropic/__init__.py +10 -8
  92. pygpt_net/provider/api/google/__init__.py +21 -58
  93. pygpt_net/provider/api/google/chat.py +545 -129
  94. pygpt_net/provider/api/google/computer.py +190 -0
  95. pygpt_net/provider/api/google/realtime/realtime.py +2 -2
  96. pygpt_net/provider/api/google/remote_tools.py +93 -0
  97. pygpt_net/provider/api/google/store.py +546 -0
  98. pygpt_net/provider/api/google/worker/__init__.py +0 -0
  99. pygpt_net/provider/api/google/worker/importer.py +392 -0
  100. pygpt_net/provider/api/openai/__init__.py +7 -3
  101. pygpt_net/provider/api/openai/computer.py +10 -1
  102. pygpt_net/provider/api/openai/responses.py +0 -0
  103. pygpt_net/provider/api/openai/store.py +6 -6
  104. pygpt_net/provider/api/openai/worker/importer.py +24 -24
  105. pygpt_net/provider/api/x_ai/__init__.py +10 -9
  106. pygpt_net/provider/api/x_ai/chat.py +272 -102
  107. pygpt_net/provider/core/config/patch.py +16 -1
  108. pygpt_net/provider/core/config/patches/patch_before_2_6_42.py +3 -3
  109. pygpt_net/provider/core/model/patch.py +17 -3
  110. pygpt_net/provider/core/preset/json_file.py +13 -7
  111. pygpt_net/provider/core/{assistant_file → remote_file}/__init__.py +1 -1
  112. pygpt_net/provider/core/{assistant_file → remote_file}/base.py +9 -9
  113. pygpt_net/provider/core/remote_file/db_sqlite/__init__.py +12 -0
  114. pygpt_net/provider/core/{assistant_file → remote_file}/db_sqlite/patch.py +1 -1
  115. pygpt_net/provider/core/{assistant_file → remote_file}/db_sqlite/provider.py +23 -20
  116. pygpt_net/provider/core/{assistant_file → remote_file}/db_sqlite/storage.py +35 -27
  117. pygpt_net/provider/core/{assistant_file → remote_file}/db_sqlite/utils.py +5 -4
  118. pygpt_net/provider/core/{assistant_store → remote_store}/__init__.py +1 -1
  119. pygpt_net/provider/core/{assistant_store → remote_store}/base.py +10 -10
  120. pygpt_net/provider/core/{assistant_store → remote_store}/db_sqlite/__init__.py +1 -1
  121. pygpt_net/provider/core/{assistant_store → remote_store}/db_sqlite/patch.py +1 -1
  122. pygpt_net/provider/core/{assistant_store → remote_store}/db_sqlite/provider.py +16 -15
  123. pygpt_net/provider/core/{assistant_store → remote_store}/db_sqlite/storage.py +30 -23
  124. pygpt_net/provider/core/{assistant_store → remote_store}/db_sqlite/utils.py +5 -4
  125. pygpt_net/provider/core/{assistant_store → remote_store}/json_file.py +9 -9
  126. pygpt_net/provider/llms/google.py +2 -2
  127. pygpt_net/tools/image_viewer/ui/dialogs.py +298 -12
  128. pygpt_net/tools/text_editor/ui/widgets.py +5 -1
  129. pygpt_net/ui/base/config_dialog.py +3 -2
  130. pygpt_net/ui/base/context_menu.py +44 -1
  131. pygpt_net/ui/dialog/assistant.py +3 -3
  132. pygpt_net/ui/dialog/plugins.py +3 -1
  133. pygpt_net/ui/dialog/remote_store_google.py +539 -0
  134. pygpt_net/ui/dialog/{assistant_store.py → remote_store_openai.py} +95 -95
  135. pygpt_net/ui/dialogs.py +5 -3
  136. pygpt_net/ui/layout/chat/attachments_uploaded.py +3 -3
  137. pygpt_net/ui/layout/toolbox/computer_env.py +26 -8
  138. pygpt_net/ui/layout/toolbox/indexes.py +22 -19
  139. pygpt_net/ui/layout/toolbox/model.py +28 -5
  140. pygpt_net/ui/menu/tools.py +13 -5
  141. pygpt_net/ui/widget/dialog/remote_store_google.py +56 -0
  142. pygpt_net/ui/widget/dialog/{assistant_store.py → remote_store_openai.py} +9 -9
  143. pygpt_net/ui/widget/element/button.py +4 -4
  144. pygpt_net/ui/widget/image/display.py +25 -8
  145. pygpt_net/ui/widget/lists/remote_store_google.py +248 -0
  146. pygpt_net/ui/widget/lists/{assistant_store.py → remote_store_openai.py} +21 -21
  147. pygpt_net/ui/widget/option/checkbox_list.py +47 -9
  148. pygpt_net/ui/widget/option/combo.py +39 -3
  149. pygpt_net/ui/widget/tabs/output.py +9 -1
  150. pygpt_net/ui/widget/textarea/editor.py +14 -1
  151. pygpt_net/ui/widget/textarea/input.py +20 -7
  152. pygpt_net/ui/widget/textarea/notepad.py +24 -1
  153. pygpt_net/ui/widget/textarea/output.py +23 -1
  154. pygpt_net/ui/widget/textarea/web.py +16 -1
  155. {pygpt_net-2.7.4.dist-info → pygpt_net-2.7.6.dist-info}/METADATA +41 -2
  156. {pygpt_net-2.7.4.dist-info → pygpt_net-2.7.6.dist-info}/RECORD +158 -132
  157. {pygpt_net-2.7.4.dist-info → pygpt_net-2.7.6.dist-info}/LICENSE +0 -0
  158. {pygpt_net-2.7.4.dist-info → pygpt_net-2.7.6.dist-info}/WHEEL +0 -0
  159. {pygpt_net-2.7.4.dist-info → pygpt_net-2.7.6.dist-info}/entry_points.txt +0 -0
@@ -0,0 +1,35 @@
1
+ #!/usr/bin/env python3
2
+ # -*- coding: utf-8 -*-
3
+ # ================================================== #
4
+ # This file is a part of PYGPT package #
5
+ # Website: https://pygpt.net #
6
+ # GitHub: https://github.com/szczyglis-dev/py-gpt #
7
+ # MIT License #
8
+ # Created By : Marcin Szczygliński #
9
+ # Updated Date: 2026.01.02 20:00:00 #
10
+ # ================================================== #
11
+
12
+ from sqlalchemy import text
13
+
14
+ from .base import BaseMigration
15
+
16
+
17
+ class Version20260102190000(BaseMigration):
18
+ def __init__(self, window=None):
19
+ super(Version20260102190000, self).__init__(window)
20
+ self.window = window
21
+
22
+ def up(self, conn):
23
+ conn.execute(text("""
24
+ ALTER TABLE remote_store ADD COLUMN provider TEXT;
25
+ """))
26
+ conn.execute(text("""
27
+ ALTER TABLE remote_file ADD COLUMN provider TEXT;
28
+ """))
29
+ # set all to OpenAI by default
30
+ conn.execute(text("""
31
+ UPDATE remote_store SET provider = 'openai' WHERE provider IS NULL;
32
+ """))
33
+ conn.execute(text("""
34
+ UPDATE remote_file SET provider = 'openai' WHERE provider IS NULL;
35
+ """))
@@ -6,7 +6,7 @@
6
6
  # GitHub: https://github.com/szczyglis-dev/py-gpt #
7
7
  # MIT License #
8
8
  # Created By : Marcin Szczygliński #
9
- # Updated Date: 2024.12.15 11:00:00 #
9
+ # Updated Date: 2026.01.02 20:00:00 #
10
10
  # ================================================== #
11
11
 
12
12
  from .Version20231227152900 import Version20231227152900 # 2.0.59
@@ -23,6 +23,7 @@ from .Version20240501030000 import Version20240501030000 # 2.2.7
23
23
  from .Version20241122130000 import Version20241122130000 # 2.4.21
24
24
  from .Version20241126170000 import Version20241126170000 # 2.4.34
25
25
  from .Version20241215110000 import Version20241215110000 # 2.4.43
26
+ from .Version20260102190000 import Version20260102190000 # 2.7.5
26
27
 
27
28
  class Migrations:
28
29
  def __init__(self):
@@ -50,4 +51,5 @@ class Migrations:
50
51
  Version20241122130000(), # 2.4.21
51
52
  Version20241126170000(), # 2.4.34
52
53
  Version20241215110000(), # 2.4.43
54
+ Version20260102190000(), # 2.7.5
53
55
  ]
@@ -6,7 +6,7 @@
6
6
  # GitHub: https://github.com/szczyglis-dev/py-gpt #
7
7
  # MIT License #
8
8
  # Created By : Marcin Szczygliński #
9
- # Updated Date: 2025.07.26 18:00:00 #
9
+ # Updated Date: 2026.01.02 02:00:00 #
10
10
  # ================================================== #
11
11
 
12
12
  from pygpt_net.plugin.base.config import BaseConfig, BasePlugin
@@ -131,6 +131,64 @@ class Config(BaseConfig):
131
131
  tooltip="Prompt used to instruct how to control the mouse and keyboard",
132
132
  )
133
133
 
134
+ # Playwright sandbox options
135
+ plugin.add_option(
136
+ "sandbox_path",
137
+ type="text",
138
+ value="",
139
+ label="Browsers directory",
140
+ description="Path to Playwright browsers installation - leave empty to use default",
141
+ tab="Sandbox (Playwright)"
142
+ )
143
+ plugin.add_option(
144
+ "sandbox_engine",
145
+ type="text",
146
+ value="chromium",
147
+ label="Engine",
148
+ description="Playwright browser engine to use (chromium, firefox, webkit) - must be installed",
149
+ tab="Sandbox (Playwright)"
150
+ )
151
+ plugin.add_option(
152
+ "sandbox_headless",
153
+ type="bool",
154
+ value=False,
155
+ label="Headless mode",
156
+ description="Run Playwright browser in headless mode (default: False)",
157
+ tab="Sandbox (Playwright)"
158
+ )
159
+ plugin.add_option(
160
+ "sandbox_args",
161
+ type="textarea",
162
+ value="--disable-extensions,\n--disable-file-system",
163
+ label="Browser args",
164
+ description="Additional Playwright browser arguments (comma-separated)",
165
+ tab="Sandbox (Playwright)"
166
+ )
167
+ plugin.add_option(
168
+ "sandbox_home",
169
+ type="text",
170
+ value="https://duckduckgo.com",
171
+ label="Home URL",
172
+ description="Playwright browser home URL",
173
+ tab="Sandbox (Playwright)"
174
+ )
175
+ plugin.add_option(
176
+ "sandbox_viewport_w",
177
+ type="int",
178
+ value=1440,
179
+ label="Viewport width",
180
+ description="Playwright viewport width in pixels",
181
+ tab="Sandbox (Playwright)"
182
+ )
183
+ plugin.add_option(
184
+ "sandbox_viewport_h",
185
+ type="int",
186
+ value=900,
187
+ label="Viewport height",
188
+ description="Playwright viewport height in pixels",
189
+ tab="Sandbox (Playwright)"
190
+ )
191
+
134
192
  # commands
135
193
  plugin.add_cmd(
136
194
  "get_mouse_position",
@@ -153,6 +211,13 @@ class Config(BaseConfig):
153
211
  enabled=True,
154
212
  description="Enable: make screenshot",
155
213
  )
214
+ plugin.add_cmd(
215
+ "open_web_browser",
216
+ instruction="open web browser",
217
+ params=[],
218
+ enabled=True,
219
+ description="Enable: open web browser",
220
+ )
156
221
  plugin.add_cmd(
157
222
  "mouse_move",
158
223
  instruction="move mouse cursor to position (x, y)",
@@ -357,4 +422,409 @@ class Config(BaseConfig):
357
422
  params=[],
358
423
  enabled=True,
359
424
  description="Enable: Wait for a moment",
425
+ )
426
+
427
+ # --------------------------------------------------------------------- #
428
+ # Google based additional commands
429
+ # --------------------------------------------------------------------- #
430
+
431
+ plugin.add_cmd(
432
+ "wait_5_seconds",
433
+ instruction="wait for 5 seconds",
434
+ params=[],
435
+ enabled=True,
436
+ description="Enable: Wait 5 seconds",
437
+ )
438
+ plugin.add_cmd(
439
+ "go_back",
440
+ instruction="go back in browser history",
441
+ params=[],
442
+ enabled=True,
443
+ description="Enable: Browser back",
444
+ )
445
+ plugin.add_cmd(
446
+ "go_forward",
447
+ instruction="go forward in browser history",
448
+ params=[],
449
+ enabled=True,
450
+ description="Enable: Browser forward",
451
+ )
452
+ plugin.add_cmd(
453
+ "search",
454
+ instruction="open the default search engine homepage",
455
+ params=[],
456
+ enabled=True,
457
+ description="Enable: Open default search engine",
458
+ )
459
+ plugin.add_cmd(
460
+ "navigate",
461
+ instruction="navigate to a specific URL",
462
+ params=[
463
+ {
464
+ "name": "url",
465
+ "type": "str",
466
+ "description": "destination URL",
467
+ "required": True,
468
+ },
469
+ ],
470
+ enabled=True,
471
+ description="Enable: Navigate to URL",
472
+ )
473
+ plugin.add_cmd(
474
+ "click_at",
475
+ instruction="click at normalized coordinates (0..999)",
476
+ params=[
477
+ {
478
+ "name": "x",
479
+ "type": "int",
480
+ "description": "normalized X (0..999)",
481
+ "required": True,
482
+ },
483
+ {
484
+ "name": "y",
485
+ "type": "int",
486
+ "description": "normalized Y (0..999)",
487
+ "required": True,
488
+ },
489
+ ],
490
+ enabled=True,
491
+ description="Enable: Click at normalized coordinates",
492
+ )
493
+ plugin.add_cmd(
494
+ "hover_at",
495
+ instruction="move cursor to normalized coordinates (0..999) without clicking",
496
+ params=[
497
+ {
498
+ "name": "x",
499
+ "type": "int",
500
+ "description": "normalized X (0..999)",
501
+ "required": True,
502
+ },
503
+ {
504
+ "name": "y",
505
+ "type": "int",
506
+ "description": "normalized Y (0..999)",
507
+ "required": True,
508
+ },
509
+ ],
510
+ enabled=True,
511
+ description="Enable: Hover at normalized coordinates",
512
+ )
513
+ plugin.add_cmd(
514
+ "type_text_at",
515
+ instruction="focus at normalized coordinates and type text; optionally press Enter and/or clear field first",
516
+ params=[
517
+ {
518
+ "name": "x",
519
+ "type": "int",
520
+ "description": "normalized X (0..999)",
521
+ "required": True,
522
+ },
523
+ {
524
+ "name": "y",
525
+ "type": "int",
526
+ "description": "normalized Y (0..999)",
527
+ "required": True,
528
+ },
529
+ {
530
+ "name": "text",
531
+ "type": "str",
532
+ "description": "text to type",
533
+ "required": True,
534
+ },
535
+ {
536
+ "name": "press_enter",
537
+ "type": "bool",
538
+ "description": "press Enter after typing (default: true)",
539
+ "required": False,
540
+ },
541
+ {
542
+ "name": "clear_before_typing",
543
+ "type": "bool",
544
+ "description": "clear input before typing (default: true)",
545
+ "required": False,
546
+ },
547
+ ],
548
+ enabled=True,
549
+ description="Enable: Type text at normalized coordinates",
550
+ )
551
+ plugin.add_cmd(
552
+ "key_combination",
553
+ instruction="press a key combination (e.g., control+shift+tab)",
554
+ params=[
555
+ {
556
+ "name": "keys",
557
+ "type": "list",
558
+ "description": "list of keys to press in a combination or sequence",
559
+ "required": True,
560
+ },
561
+ ],
562
+ enabled=True,
563
+ description="Enable: Press key combination",
564
+ )
565
+ plugin.add_cmd(
566
+ "scroll_document",
567
+ instruction="scroll the document in a direction by a magnitude in pixels",
568
+ params=[
569
+ {
570
+ "name": "direction",
571
+ "type": "str",
572
+ "description": "scroll direction, enum: up|down|left|right",
573
+ "required": False,
574
+ },
575
+ {
576
+ "name": "magnitude",
577
+ "type": "int",
578
+ "description": "pixels to scroll (default around 800)",
579
+ "required": False,
580
+ },
581
+ ],
582
+ enabled=True,
583
+ description="Enable: Scroll document",
584
+ )
585
+ plugin.add_cmd(
586
+ "scroll_at",
587
+ instruction="scroll at normalized coordinates (0..999) in a direction by a magnitude in pixels",
588
+ params=[
589
+ {
590
+ "name": "x",
591
+ "type": "int",
592
+ "description": "normalized X (0..999)",
593
+ "required": False,
594
+ },
595
+ {
596
+ "name": "y",
597
+ "type": "int",
598
+ "description": "normalized Y (0..999)",
599
+ "required": False,
600
+ },
601
+ {
602
+ "name": "direction",
603
+ "type": "str",
604
+ "description": "scroll direction, enum: up|down|left|right",
605
+ "required": False,
606
+ },
607
+ {
608
+ "name": "magnitude",
609
+ "type": "int",
610
+ "description": "pixels to scroll (default around 800)",
611
+ "required": False,
612
+ },
613
+ ],
614
+ enabled=True,
615
+ description="Enable: Scroll at normalized coordinates",
616
+ )
617
+ plugin.add_cmd(
618
+ "drag_and_drop",
619
+ instruction="drag from normalized (x,y) to (destination_x,destination_y)",
620
+ params=[
621
+ {
622
+ "name": "x",
623
+ "type": "int",
624
+ "description": "normalized start X (0..999)",
625
+ "required": True,
626
+ },
627
+ {
628
+ "name": "y",
629
+ "type": "int",
630
+ "description": "normalized start Y (0..999)",
631
+ "required": True,
632
+ },
633
+ {
634
+ "name": "destination_x",
635
+ "type": "int",
636
+ "description": "normalized destination X (0..999)",
637
+ "required": True,
638
+ },
639
+ {
640
+ "name": "destination_y",
641
+ "type": "int",
642
+ "description": "normalized destination Y (0..999)",
643
+ "required": True,
644
+ },
645
+ ],
646
+ enabled=True,
647
+ description="Enable: Drag and drop using normalized coordinates",
648
+ )
649
+ plugin.add_cmd(
650
+ "click",
651
+ instruction="click at optional coordinates; if provided as normalized (0..999) they will be converted",
652
+ params=[
653
+ {
654
+ "name": "x",
655
+ "type": "int",
656
+ "description": "X coordinate (pixel or normalized 0..999)",
657
+ "required": False,
658
+ },
659
+ {
660
+ "name": "y",
661
+ "type": "int",
662
+ "description": "Y coordinate (pixel or normalized 0..999)",
663
+ "required": False,
664
+ },
665
+ {
666
+ "name": "button",
667
+ "type": "str",
668
+ "description": "mouse button, enum: left|middle|right",
669
+ "required": False,
670
+ },
671
+ {
672
+ "name": "num_clicks",
673
+ "type": "int",
674
+ "description": "number of clicks, default 1",
675
+ "required": False,
676
+ },
677
+ ],
678
+ enabled=True,
679
+ description="Enable: Generic click",
680
+ )
681
+ plugin.add_cmd(
682
+ "double_click",
683
+ instruction="double-click at optional coordinates; if provided as normalized (0..999) they will be converted",
684
+ params=[
685
+ {
686
+ "name": "x",
687
+ "type": "int",
688
+ "description": "X coordinate (pixel or normalized 0..999)",
689
+ "required": False,
690
+ },
691
+ {
692
+ "name": "y",
693
+ "type": "int",
694
+ "description": "Y coordinate (pixel or normalized 0..999)",
695
+ "required": False,
696
+ },
697
+ {
698
+ "name": "button",
699
+ "type": "str",
700
+ "description": "mouse button, enum: left|middle|right",
701
+ "required": False,
702
+ },
703
+ ],
704
+ enabled=True,
705
+ description="Enable: Generic double click",
706
+ )
707
+ plugin.add_cmd(
708
+ "move",
709
+ instruction="move pointer to the given coordinates; normalized (0..999) will be converted",
710
+ params=[
711
+ {
712
+ "name": "x",
713
+ "type": "int",
714
+ "description": "X coordinate (pixel or normalized 0..999)",
715
+ "required": True,
716
+ },
717
+ {
718
+ "name": "y",
719
+ "type": "int",
720
+ "description": "Y coordinate (pixel or normalized 0..999)",
721
+ "required": True,
722
+ },
723
+ ],
724
+ enabled=True,
725
+ description="Enable: Generic move",
726
+ )
727
+ plugin.add_cmd(
728
+ "type",
729
+ instruction="type literal text into the focused element",
730
+ params=[
731
+ {
732
+ "name": "text",
733
+ "type": "str",
734
+ "description": "text to type",
735
+ "required": True,
736
+ },
737
+ ],
738
+ enabled=True,
739
+ description="Enable: Generic type text",
740
+ )
741
+ plugin.add_cmd(
742
+ "keypress",
743
+ instruction="press a sequence of keys",
744
+ params=[
745
+ {
746
+ "name": "keys",
747
+ "type": "list",
748
+ "description": "list of keys to press sequentially",
749
+ "required": True,
750
+ },
751
+ ],
752
+ enabled=True,
753
+ description="Enable: Generic keypress sequence",
754
+ )
755
+ plugin.add_cmd(
756
+ "scroll",
757
+ instruction="scroll by dx, dy in pixels at an optional (x,y) position",
758
+ params=[
759
+ {
760
+ "name": "x",
761
+ "type": "int",
762
+ "description": "X position to move before scrolling (pixel or normalized 0..999)",
763
+ "required": False,
764
+ },
765
+ {
766
+ "name": "y",
767
+ "type": "int",
768
+ "description": "Y position to move before scrolling (pixel or normalized 0..999)",
769
+ "required": False,
770
+ },
771
+ {
772
+ "name": "dx",
773
+ "type": "int",
774
+ "description": "horizontal delta in pixels (positive right, negative left)",
775
+ "required": True,
776
+ },
777
+ {
778
+ "name": "dy",
779
+ "type": "int",
780
+ "description": "vertical delta in pixels (positive down, negative up)",
781
+ "required": True,
782
+ },
783
+ {
784
+ "name": "unit",
785
+ "type": "str",
786
+ "description": "unit of scroll value, enum: px|step",
787
+ "required": False,
788
+ },
789
+ ],
790
+ enabled=True,
791
+ description="Enable: Generic scroll",
792
+ )
793
+ plugin.add_cmd(
794
+ "drag",
795
+ instruction="drag pointer along a path or from (x,y) to (dx,dy). Normalized coordinates (0..999) are supported.",
796
+ params=[
797
+ {
798
+ "name": "path",
799
+ "type": "list",
800
+ "description": "list of points with fields x,y (at least 2 points)",
801
+ "required": False,
802
+ },
803
+ {
804
+ "name": "x",
805
+ "type": "int",
806
+ "description": "start X (pixel or normalized 0..999)",
807
+ "required": False,
808
+ },
809
+ {
810
+ "name": "y",
811
+ "type": "int",
812
+ "description": "start Y (pixel or normalized 0..999)",
813
+ "required": False,
814
+ },
815
+ {
816
+ "name": "dx",
817
+ "type": "int",
818
+ "description": "destination X (pixel or normalized 0..999)",
819
+ "required": False,
820
+ },
821
+ {
822
+ "name": "dy",
823
+ "type": "int",
824
+ "description": "destination Y (pixel or normalized 0..999)",
825
+ "required": False,
826
+ },
827
+ ],
828
+ enabled=True,
829
+ description="Enable: Generic drag",
360
830
  )