Skip to content

Commit 5a4c174

Browse files
authored
docs(macos): point the permission guidance at the drag guide (#2493)
The openlogi-macos-permissions skill told users to add the agent through Go to Folder. Releases after 0.9.0 offer the gpui-tcc drag guide from the Open button instead, so the skill now gives the steps by release and keeps Go to Folder for 0.9.0 and earlier or when no panel appears. objc-ffi.md lists gpui-tcc among the external crates that carry the macOS FFI behind a desktop platform module, and notes that the guide only deep-links to System Settings and never prompts.
1 parent 214c9cf commit 5a4c174

2 files changed

Lines changed: 36 additions & 17 deletions

File tree

‎.agents/rules/objc-ffi.md‎

Lines changed: 21 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -69,12 +69,19 @@ notifications — the `com.apple.accessibility.api` distributed notification and
6969
tccd's `com.apple.tcc.access.changed` Darwin notification — are observed by the
7070
external [`axwatch`](https://crates.io/crates/axwatch) crate
7171
(`CFNotificationCenter` there, not here); `openlogi-hook`'s `grant::ProbeCue`
72-
and `openlogi-agent-core`'s grant watchers only consume its wakes.
73-
74-
The rest of `openlogi-desktop/src/platform/` (`updater.rs`, on `gpui_updater`)
75-
carries **no** ObjC FFI — don't add any. Neither do `openlogi-core`'s
76-
`single_instance.rs` (fs4 lock) or `openlogi-agent`'s `autostart/macos.rs`
77-
(legacy-plist cleanup via `std::fs`).
72+
and `openlogi-agent-core`'s grant watchers only consume its wakes. The System
73+
Settings drag guide for the agent's Accessibility and Input Monitoring grants
74+
lives in the external [`gpui-tcc`](https://github.com/AprilNEA/gpui-tcc) crate
75+
(the `NSWorkspace` icon and frontmost-app reads, the
76+
`CGWindowListCopyWindowInfo` lookup of the System Settings window, and the
77+
overlay `NSWindow` level and `NSVisualEffectView` material are there, not
78+
here); `openlogi-desktop/src/platform/permission_guide.rs` only decides when
79+
to present it and which agent bundle it holds.
80+
81+
The rest of `openlogi-desktop/src/platform/` (`updater.rs`, on `gpui_updater`,
82+
and `permission_guide.rs`, on `gpui_tcc`) carries **no** ObjC FFI — don't add
83+
any. Neither do `openlogi-core`'s `single_instance.rs` (fs4 lock) or
84+
`openlogi-agent`'s `autostart/macos.rs` (legacy-plist cleanup via `std::fs`).
7885

7986
## Ownership: `Retained<T>`, never raw `id`
8087

@@ -157,13 +164,14 @@ Rules:
157164
- **Checking never prompts; prompting belongs to whoever owns the resource.**
158165
The agent raises the Accessibility prompt (it owns the tap) and calls
159166
`IOHIDRequestAccess` before opening HID; the GUI only reads status and
160-
deep-links to System Settings (`open_pane`). Never call the prompting half from
161-
the GUI — the grant would land on the wrong code-signing identity (issue #214,
162-
see `disclaim`). This split is also why the ready-made permission crates don't
163-
fit: they model one app asking for itself. `permission-flow` additionally
164-
brings its own onboarding UI and links the Swift runtime into every downstream
165-
binary; `macos-accessibility-client` is a raw-`extern` wrapper where this file
166-
requires typed bindings.
167+
deep-links to System Settings (`open_pane`, or the `gpui-tcc` drag guide,
168+
which opens the same pane and prompts nothing). Never call the prompting
169+
half from the GUI — the grant would land on the wrong code-signing identity
170+
(issue #214, see `disclaim`). This split is also why the ready-made
171+
permission crates don't fit: they model one app asking for itself.
172+
`permission-flow` additionally brings its own onboarding UI and links the
173+
Swift runtime into every downstream binary; `macos-accessibility-client` is
174+
a raw-`extern` wrapper where this file requires typed bindings.
167175
- **TCC matches the full Designated Requirement, not the bundle ID** ([TN3127]).
168176
Re-signing one bundle ID with a different *kind* of certificate leaves a record
169177
that can never match again, and toggling the checkbox does not rewrite the

‎.claude/skills/openlogi-macos-permissions/SKILL.md‎

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,18 @@ Rules that drive most reports:
5858
app bundle. Bundles built before the rename spell that directory
5959
`OpenLogiAgent.app`; both are the same identity (`org.openlogi.agent`), and
6060
the grant survived the rename because the path is not part of the designated
61-
requirement. The System Settings `+` picker will not browse into a bundle, so
62-
they have to use Go-to-Folder. Say this explicitly; do not tell someone to
63-
"grant OpenLogi permission".
61+
requirement. Say this explicitly; do not tell someone to "grant OpenLogi
62+
permission".
63+
- The System Settings `+` picker cannot browse into a bundle. To add the agent
64+
to the Accessibility or Input Monitoring list, give the steps for the
65+
reporter's release:
66+
- After 0.9.0: click **Open** on that permission in OpenLogi's Settings →
67+
Permissions, then drag **OpenLogi Agent** from the panel over System
68+
Settings into the list. The panel appears unless the agent already reports
69+
the grant, and it closes when the agent reports the grant.
70+
- 0.9.0 and earlier, or when no panel appears: click `+`, press ⇧⌘G (Go to
71+
Folder), enter `/Applications/OpenLogi.app/Contents/Library/LoginItems`,
72+
and choose the agent bundle there.
6473
- A grant to the GUI does nothing for the agent, and vice versa. There is no
6574
bundle-wide grant.
6675
- **Every copy is its own identity.** A dev build (`org.openlogi.agent-dev`), a
@@ -185,7 +194,9 @@ Re-check linked upstream transport issues before attributing a probe timeout to
185194

186195
Say so plainly rather than promising a fix:
187196

188-
- Apple's `+` picker not browsing into bundles.
197+
- Apple's `+` picker not browsing into bundles. The drag guide (§2) avoids the
198+
picker only when the user starts from OpenLogi's **Open** button. A user who
199+
opens System Settings another way still needs Go to Folder.
189200
- `IOHIDDeviceOpen`'s silent denial — we can only infer it by checking access
190201
separately.
191202
- A stale `tccd` decision that needs a full logout, or an MDM policy.

0 commit comments

Comments
 (0)