Fix Screen Recording hint and skip usage reads for missing CLIs
This commit is contained in:
@@ -6,6 +6,7 @@ import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"log/slog"
|
||||
"os/exec"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
@@ -173,6 +174,10 @@ func (m *Manager) agyTurnEnded(ctx context.Context, l *live, p antigravityProces
|
||||
var agyWindowMins = map[string]int{"5h": 300, "weekly": 7 * 24 * 60}
|
||||
|
||||
func (m *Manager) readAgyRateLimit() {
|
||||
_, err := exec.LookPath("agy")
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
ctx, cancel := context.WithTimeout(context.Background(), 30*time.Second)
|
||||
defer cancel()
|
||||
groups, err := antigravity.ReadUsage(ctx)
|
||||
|
||||
@@ -6,6 +6,7 @@ import (
|
||||
"fmt"
|
||||
"log/slog"
|
||||
"os"
|
||||
"os/exec"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
@@ -275,7 +276,11 @@ func imageBlock(mime, data string) map[string]any {
|
||||
}
|
||||
|
||||
func (m *Manager) readCodexRateLimit() {
|
||||
err := os.MkdirAll(m.codexHome, 0o700)
|
||||
_, err := exec.LookPath("codex")
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
err = os.MkdirAll(m.codexHome, 0o700)
|
||||
if err != nil {
|
||||
slog.Error("read codex rate limits", "err", err)
|
||||
return
|
||||
|
||||
@@ -37,7 +37,7 @@ d=$(mktemp -d) && cp /Applications/Byre.app/Contents/Helpers/byre-hands "$d/" &&
|
||||
It prints a JSON array, one entry per grant: `name`, `status` (`granted`, `missing`, or `unchecked` when the test couldn't run, such as Automation of Orion while Orion isn't running), `detail` (what to switch on) and `settings`, the `x-apple.systempreferences` URL of its System Settings pane.
|
||||
|
||||
- A missing folder grant makes macOS show a prompt on that Mac's screen during the check, and the check waits until it is answered, so tell the human to be at that Mac before you run it, and give the call a timeout of a few minutes.
|
||||
- For Screen Recording, Device Control and Data Access (what macOS 27 calls Accessibility) and Automation, open the pane for the human with `open '<settings>'` and tell them which switch to turn on. On a Mac that runs a server, the panes list two entries: `byre` with a black terminal icon is the server, whose grants agents on that Mac use, and `Byre` with byre's app icon is the app, whose grants client tools on that Mac use. The check's `detail` names the one it checked. Device Control and Data Access can list byre switched off; only the switch being on counts.
|
||||
- For Screen Recording, Device Control and Data Access (what macOS 27 calls Accessibility) and Automation, open the pane for the human with `open '<settings>'` and tell them which switch to turn on. On a Mac that runs a server, Device Control and Data Access and Automation list two entries: `byre` with a black terminal icon is the server, whose grants agents on that Mac use, and `Byre` with byre's app icon is the app, whose grants client tools on that Mac use. Screen Recording lists only `Byre` with byre's app icon, and switching it on grants both. The check's `detail` names the switch to turn on. Device Control and Data Access can list byre switched off; only the switch being on counts.
|
||||
- Check again after the human says they've done it.
|
||||
|
||||
## Client Macs
|
||||
|
||||
Reference in New Issue
Block a user