@@ -37,6 +37,11 @@ The common signage path; each step has its section below.
3737
3838## Choose where commands run
3939
40+ For a screens, playlists or media viewing request, start with
41+ [ interactive cards] ( #interactive-cards-and-account-authorization ) . An authenticated
42+ MCP view does not require CLI setup, doctor or CLI reauthentication. The command
43+ preflight below applies when the task needs CLI operations.
44+
4045Use the bundled CLI in the current permitted execution environment. Codex on
4146desktop, ChatGPT Work, and a dot can each provide a CLI-capable environment;
4247verify the actual runtime before operating. Do not assume the user's computer
@@ -136,14 +141,15 @@ switch from an email address, another tool's visible data, or a browser login.
136141
137142## Interactive cards and account authorization
138143
139- The plugin declares the hosted screenRIG MCP connection for supported Codex
140- and Claude plugin hosts. The host discovers it from the package; do not ask
144+ The plugin declares the hosted screenRIG MCP connection for compatible plugin
145+ hosts. The host discovers it from the package; do not ask
141146the user to enter a server URL, paste a token, or install a credential helper.
142147The bundled connection targets production. An explicitly selected alternative
143148environment needs a matching host connection; never silently mix environments.
144149
145- 1 . Reuse the CLI's saved connection, or complete the first-run enrollment below.
146- Continue using the CLI for pairing, transcoding, uploads and management.
150+ 1 . For onboarding or management, reuse the CLI's saved connection or follow
151+ first-run enrollment below. For a view-only request, use the authenticated
152+ MCP connection directly; do not run CLI diagnostics or enrollment as a gate.
1471532 . Treat "show my screens", "show my playlists" and "show my media" as requests
148154 for the interactive view. Discover the plugin's MCP tools before choosing a
149155 CLI command. Call the matching screen, playlist or media list/get tool through
@@ -152,21 +158,23 @@ environment needs a matching host connection; never silently mix environments.
152158 connect/sign-in action. The user signs in to screenRIG and approves access
153159 to the same project. Finish dashboard invitation acceptance or account
154160 verification if required; do not enroll a second project to fix MCP login.
155- 4 . Confirm the returned project identity matches the CLI- selected project
156- before combining results or making changes. A matching email or screen name
161+ 4 . When a CLI project has already been selected for this task, confirm the
162+ returned project identity matches it before combining results or making changes. A matching email or screen name
157163 alone is insufficient. If the user selected another project, resolve that
158164 selection explicitly rather than claiming the two connections are shared.
1591655 . Reuse the saved CLI configuration and the host's OAuth session in later
160166 conversations. The host manages its own token storage and refresh. CLI API
161167 tokens cannot authenticate MCP; never copy them into headers or the widget.
162168
163- For Codex hosts with the ` codex ` executable, inspect ` codex mcp list --json `
164- and ` codex mcp get NAME --json ` to identify the matching registered endpoint.
165- When it reports that login is needed, run the host's supported OAuth command:
166-
167- ``` sh
168- codex mcp login NAME --oauth-client-registration cimd --scopes access:manage,screens,content,playlists,reports
169- ```
169+ Discover the current host's connection-management and OAuth capabilities. Use
170+ its supported sign-in action or login command for the registered connection;
171+ check available tools or command help before claiming the user must start it.
172+ See [ host authentication examples] ( references/installation.md#host-authentication-examples )
173+ when command discovery needs help. Do not assume a command installed on the
174+ machine manages the current host's connection or shares its credential store.
175+ If login needs a terminal, use a persistent interactive terminal/PTY and retain
176+ it while the user approves. Give manual sign-in instructions only when no
177+ supported agent-triggered path is available, using that host's actual controls.
170178
171179The requested ` access:manage ` scope is required to capture a fresh screenshot:
172180that sends a command to the Player. It also permits other writes within the
@@ -179,24 +187,24 @@ capture is requested, use the single native login flow below with the required
179187scope and wait for approval. If the host retains the old grant, explain that its
180188connection needs reauthorization; do not loop through login attempts.
181189
182- Replace ` NAME ` with the discovered connection name. Start at most one login
183- attempt and keep its process/session so you can wait for its result. This
184- command opens the approval browser itself: do not also open its URL in another
185- tab, run another login, or navigate plugin settings or the dashboard. Tell the
190+ Start at most one login attempt for the discovered connection and retain its
191+ process/session so you can wait for its result. If the host opens the approval
192+ browser, reuse that tab. Otherwise open the authorization URL it provides once.
193+ Do not start another login or navigate unrelated settings or dashboard pages . Tell the
186194user to finish sign-in and approval in that one tab, then wait. Do not operate
187195the consent form, alter its scopes, or inspect other signed-in browser sessions
188196unless the user explicitly asks for that browser assistance. If browser opening
189197fails, offer the existing login URL once; do not start another authorization.
190198
191- After successful login, rediscover tools once. If this conversation still has
192- only the old tools, stop and ask the user to start a fresh conversation. Do not
193- retry OAuth, log out, replace another connection, or open settings tabs to force
194- a tool refresh. A missing tool after login is not an authentication failure.
199+ After successful login, rediscover tools once. If still unavailable, use a
200+ documented native reconnect or tool reload once when supported, then retry
201+ discovery. Ask for a fresh conversation only if this host cannot reload or the
202+ bounded retry fails; do not claim every host loads connections only at startup.
203+ Do not retry OAuth, log out, replace another connection, or open settings tabs
204+ to force a tool refresh. A missing tool after login is not an authentication failure.
195205Only retry login after a confirmed failure and explain that failure first.
196- Do not request ` identity ` for this MCP connection. If the host has a native sign-in
197- action instead, use it. In Claude Code, use its MCP authentication flow for the
198- plugin-provided server. Do not claim a sign-in command succeeded before it
199- finishes, and do not treat a CLI enrollment as MCP authorization.
206+ Do not request ` identity ` for this MCP connection. Do not claim sign-in succeeded
207+ before the host reports completion, or treat CLI enrollment as MCP authorization.
200208
201209Use the host's discovered connection identifier. The packaged dependency is
202210` screenrig-views ` ; another connection simply named ` screenrig ` may belong to a
@@ -212,7 +220,13 @@ request cannot render a native card. Continue authorized CLI work and provide
212220text or screenshot results only after explaining why the interactive view
213221could not be opened and what user action, if any, is needed. Do not silently
214222skip discovery or OAuth and substitute a Markdown table for this request.
215- Do not promise card rendering on hosts that only expose MCP text tools.
223+ A successful tool response proves data access, not visual rendering. Do not say
224+ "the card is above" or "if supported it appeared" without host rendering evidence.
225+ When only text is exposed, say the data loaded but card rendering is unverified;
226+ use any available host UI/error evidence to distinguish a renderer limitation
227+ from a resource failure. Do not repeat login or CLI setup to fix rendering.
228+ Keep the response brief and omit internal IDs unless resolving an account
229+ mismatch. Do not promise card rendering on hosts that only expose MCP text tools.
216230
217231## First run: enroll a new project
218232
0 commit comments