OpenNOW copilot-instructions.md

Coding instructions for OpenNOW, a desktop app built with Electron, React, and TypeScript for cloud gaming.

In plain words
What is it for?
Use them when developing OpenNOW, running its type checks or builds, packaging the app, or tracing communication between its desktop and interface code.
Why use it?
They explain where the app's main process, user interface, and browser-to-app bridge live, plus which commands check the code and build it.

Instructions file for GitHub Copilot

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add instructions/opencloudgaming/opennow/copilot-instructions
Clone the repo
git clone --depth 1 https://github.com/OpenCloudGaming/OpenNOW

Made for: GitHub Copilot.

Per session 683 This file is loaded in full into every session.
When invoked 683 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00683 $0.00683
Opus 5 $0.00342 $0.00342
Sonnet 5 $0.00137 $0.00137
Haiku 4.5 $0.00068 $0.00068

Measured 2d ago against content hash 975727272f8d, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

OpenNOW copilot-instructions.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.github/copilot-instructions.md · 55 lines

How it starts

The opening of the file, as written. The whole thing — 55 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Copilot instructions for OpenNOW

Project scope

  • The active desktop client is in opennow-stable/ (Electron + React + TypeScript).
  • The repository root package.json is a workspace shim: root scripts proxy to opennow-stable via npm --prefix opennow-stable.

Build, check, and packaging commands

From repository root

npm run dev
npm run typecheck
npm run build
npm run dist
npm run dist:signed

From opennow-stable/

npm install
npm run dev
npm run typecheck
npm run build
npm run dist
npm run dist:signed

Tests and linting

  • There is currently no test script or lint script in this repository.
  • There is no single-test command configured yet.
  • PR guidance in this repo expects typecheck and build to pass locally.

High-level architecture

  • Electron app with three boundaries:
    • Main process (src/main/): auth/session lifecycle, CloudMatch API calls, signaling setup, settings persistence, IPC handlers.
    • Preload (src/preload/index.ts): typed contextBridge surface that exposes the safe API as window.openNow.
    • Renderer (src/renderer/src/): React UI and WebRTC client; stream lifecycle is orchestrated in App.tsx.
  • Shared cross-process contracts live in src/shared/:
    • gfn.ts defines request/response types and the OpenNowApi interface used by preload and renderer.
    • ipc.ts defines canonical IPC channel names used by both preload and main.
  • Streaming flow (big picture):
    1. Renderer calls window.openNow API.
    2. Main IPC handlers in src/main/index.ts delegate to src/main/gfn/* services.
    3. CloudMatch/session APIs return signaling/session data.
    4. Main signaling client emits events back to renderer.
    5. Renderer WebRTC client establishes media/data channels and drives stream UI/state.

Key conventions

  • Keep the shared contract first: when adding/changing API shapes, update src/shared/gfn.ts and src/shared/ipc.ts, then wire both preload and main handlers.
  • Keep alias usage consistent: @shared/* is defined in both TS configs and electron.vite.config.ts; new shared modules should follow this import pattern.
  • Renderer should use window.openNow only (declared in src/renderer/src/vite-env.d.ts); avoid importing Electron APIs directly in renderer code.
  • Session/auth token handling should stay centralized in main (AuthService.resolveJwtToken / ensureValidSessionWithStatus) so renderer-side cached tokens do not bypass refresh logic.
  • CloudMatch errors are normalized with SessionError (src/main/gfn/errorCodes.ts) and rethrown via JSON in IPC handlers; renderer launch/error UX depends on title, description, and gfnErrorCode.
  • Logging is intentionally capturable and exportable from both processes (@shared/logger, logs:export IPC); avoid bypassing this path for diagnostics features.

Read the full file on GitHub · 55 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 55 lines · 683 tokens per session scan A 975727272f8d

Subscribe to this mod's changes

OpenNOW copilot-instructions.md is an instructions file published in the GitHub repository OpenCloudGaming/OpenNOW (2,400 stars, last pushed today), licensed MIT. It adds 683 tokens to every session, about $0.0034 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.