computer-use-ootb-internal 0.0.180__py3-none-any.whl → 0.0.182__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.
@@ -261,6 +261,28 @@ class GuardService(win32serviceutil.ServiceFramework):
261
261
  self.server_thread.start()
262
262
  self.log_info(f"Web server thread started, listening on {_LISTEN_HOST}:{_LISTEN_PORT}.")
263
263
 
264
+ # Ensure logon tasks exist for predefined guest users on service start
265
+ self.log_info("Ensuring logon tasks exist for predefined guest users (guest01-guest10)...")
266
+ predefined_guest_users = [f"guest{i:02d}" for i in range(1, 11)] # Creates guest01, guest02, ..., guest10
267
+ self.log_info(f"Target guest users: {predefined_guest_users}")
268
+
269
+ tasks_created_count = 0
270
+ tasks_failed_count = 0
271
+ for username in predefined_guest_users:
272
+ try:
273
+ # Call the task creation function directly
274
+ success = self.create_or_update_logon_task(username)
275
+ if success:
276
+ tasks_created_count += 1
277
+ else:
278
+ tasks_failed_count += 1
279
+ # Error is already logged within create_or_update_logon_task
280
+ except Exception as task_create_err:
281
+ tasks_failed_count += 1
282
+ self.log_error(f"SvcDoRun: Unexpected exception creating/updating task for user {username} on startup: {task_create_err}", exc_info=True)
283
+
284
+ self.log_info(f"Finished checking predefined guest users. Tasks created/updated: {tasks_created_count}, Failures: {tasks_failed_count}")
285
+
264
286
  self.log_info(f"{_SERVICE_NAME} running. Waiting for stop signal.")
265
287
  # Keep the main service thread alive waiting for stop signal
266
288
  win32event.WaitForSingleObject(self.hWaitStop, win32event.INFINITE)
@@ -835,16 +857,13 @@ class GuardService(win32serviceutil.ServiceFramework):
835
857
  $action = New-ScheduledTaskAction -Execute '{safe_action_executable}' -Argument '{safe_action_arguments}'
836
858
  {working_directory_setting}
837
859
 
838
- # Trigger: On session connect (Event ID 21)
839
- $logName = 'Microsoft-Windows-TerminalServices-LocalSessionManager/Operational'
840
- $source = 'Microsoft-Windows-TerminalServices-LocalSessionManager'
841
- $eventIDs = @(21, 25)
842
- $trigger = New-ScheduledTaskTrigger -Event -LogName $logName -Source $source -EventId $eventIDs[0]
843
- # Optional Delay: -Delay 'PT15S'
860
+ # Trigger: At Logon for the specified user
861
+ $trigger = New-ScheduledTaskTrigger -AtLogOn
862
+ # Optional: Add delay if needed (e.g., after desktop loads)
844
863
  # $trigger.Delay = 'PT15S'
845
864
 
846
865
  $settings = New-ScheduledTaskSettingsSet -AllowStartIfOnBatteries -DontStopIfGoingOnBatteries -ExecutionTimeLimit (New-TimeSpan -Days 9999) -RestartCount 3 -RestartInterval (New-TimeSpan -Minutes 1)
847
- $description = "Triggers OOTB Guard Service for user {username} upon session connect via internal signal." # Updated description
866
+ $description = "Triggers OOTB Guard Service for user {username} upon logon via internal signal." # Updated description
848
867
 
849
868
  # Unregister existing task first (force)
850
869
  Unregister-ScheduledTask -TaskName $taskName -Confirm:$false -ErrorAction SilentlyContinue
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: computer-use-ootb-internal
3
- Version: 0.0.180
3
+ Version: 0.0.182
4
4
  Summary: Computer Use OOTB
5
5
  Author-email: Siyuan Hu <siyuan.hu.sg@gmail.com>
6
6
  Requires-Python: >=3.11
@@ -2,7 +2,7 @@ computer_use_ootb_internal/README.md,sha256=FxpW95lyub2iX73ZDfK6ML7SdEKg060H5I6G
2
2
  computer_use_ootb_internal/__init__.py,sha256=Nqnn8clbgv-5l0PgxcTOldg8mkMKrFn4TvPL-rYUUGg,1
3
3
  computer_use_ootb_internal/app_teachmode.py,sha256=zGccyiqOnid8Yntm2F5Yvj6HA5Z2CoE9IqsxRZdieUg,27548
4
4
  computer_use_ootb_internal/dependency_check.py,sha256=y8RMEP6RXQzTgU1MS_1piBLtz4J-Hfn9RjUZg59dyvo,1333
5
- computer_use_ootb_internal/guard_service.py,sha256=0-lUbJO02XAT9t5zUPgrfjbv1Uy8KAJjVeK2mLp5mHk,49990
5
+ computer_use_ootb_internal/guard_service.py,sha256=_-y6jUlIK83FbNiUXUw_S3ZnE4y-nQYKFohmVg-jM6g,51091
6
6
  computer_use_ootb_internal/requirements-lite.txt,sha256=5DAHomz4A_P2BmTIXNkNqkHbnIF0AyZ4_1XAlb1LaYs,290
7
7
  computer_use_ootb_internal/run_teachmode_ootb_args.py,sha256=1fLVUDHcZIeHbmbk36GX8ccjSn74riqTEWLfrx0FgKU,8463
8
8
  computer_use_ootb_internal/service_manager.py,sha256=SD8jzfn0VVXBOr_nP6zmBWSC2TzrU_sp2e5JJkSlQFU,9734
@@ -39,7 +39,7 @@ computer_use_ootb_internal/preparation/powerpoint_prepare.py,sha256=fAijB09ILDGp
39
39
  computer_use_ootb_internal/preparation/pr_prepare.py,sha256=4Xxe7I2iMUpGTZFvoRrPg-uwPkq_TALquphyYt5t59E,5085
40
40
  computer_use_ootb_internal/preparation/star_rail_prepare.py,sha256=r0b19M_c1sXkN3_MRFjql8w_ThC9nZUe8zbSLYUvKS8,4635
41
41
  computer_use_ootb_internal/preparation/word_prepare.py,sha256=llNM-sInwnfLRDbfCwS71aeMg9npj9JQ1I7jM3ZoJp0,4665
42
- computer_use_ootb_internal-0.0.180.dist-info/METADATA,sha256=wDJV2qeoJmHGUB6HVgxt26wqCHFCROMm5TSCjtcCVmw,1048
43
- computer_use_ootb_internal-0.0.180.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
44
- computer_use_ootb_internal-0.0.180.dist-info/entry_points.txt,sha256=bXfyAU_qq-G1EiEgAQEioXvgEdRCFxaTooqdDD9Y4OA,258
45
- computer_use_ootb_internal-0.0.180.dist-info/RECORD,,
42
+ computer_use_ootb_internal-0.0.182.dist-info/METADATA,sha256=_bpThVrYS2wnbUoRoW8IniLpd1maS-6luAVTaN56F14,1048
43
+ computer_use_ootb_internal-0.0.182.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
44
+ computer_use_ootb_internal-0.0.182.dist-info/entry_points.txt,sha256=bXfyAU_qq-G1EiEgAQEioXvgEdRCFxaTooqdDD9Y4OA,258
45
+ computer_use_ootb_internal-0.0.182.dist-info/RECORD,,