tart icon indicating copy to clipboard operation
tart copied to clipboard

Add NoGraphics field to tart get command

Open webcoyote opened this issue 7 months ago • 3 comments

I want to detect whether a VM is running with a window or without for ClodPod, a VM sandbox for AI agents, so I added a feature to tart:

  • Added NoGraphics field to the tart get command output
  • Returns false when window is present, true when window not present, and null when VM is not running
  • Includes integration tests to verify the functionality

Glad to make changes; I agonized over whether the field should be NoGraphics: true/false or Graphics: false/true.

NOTE: this is an awkward feature to test because in CI mode (like GitHub actions), the CI environment never creates windows, so I can only test for "--no-graphics" and "not running".

webcoyote avatar Sep 27 '25 20:09 webcoyote

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Sep 27 '25 20:09 CLAassistant

I want to detect whether a VM is running with a window or without for ClodPod, a VM sandbox for AI agents

Have you considered storing this state in your software instead?

As far as I understand, it is ClodPod that invokes tart run with --no-graphics conditionally in the first place.

Since you also use SQLite, you can just store an additional no_graphics boolean column and set it at the time VM creation to achieve the same result.

edigaryev avatar Sep 29 '25 09:09 edigaryev

That's a reasonable solution, though whatever cached state ClodPod has might not accurately reflect the actual state of the virtual machine.

webcoyote avatar Sep 29 '25 15:09 webcoyote