Free, open-source screen sharing for private live streams with friends. Watch together in a browser or self-host Piik. 免费开源的私密屏幕共享,支持游戏直播、一起看电影与自部署。
chore(app): name the standalone application Piik App
AAA0dd9f57153cb
diff --git a/.github/workflows/repository-hygiene.yml b/.github/workflows/repository-hygiene.ymlindex 9d47e024..9b1cd4f7 100644--- a/.github/workflows/repository-hygiene.yml+++ b/.github/workflows/repository-hygiene.yml@@ -7,7 +7,7 @@ on:workflow_dispatch:inputs:client_checks:- description: Run the optional Piik Client checks+ description: Run the optional Piik App checksrequired: falsedefault: falsetype: boolean@@ -83,7 +83,7 @@ jobs:- name: Upload application releaseuses: actions/upload-artifact@v7with:- name: piik-app-${{ github.sha }}+ name: piik-server-${{ github.sha }}path: ${{ runner.temp }}/app-release/*if-no-files-found: errorretention-days: 14@@ -125,7 +125,7 @@ jobs:go-version: 1.26.6cache-dependency-path: go.sum# scripts/assemble-client.mjs runs `npm run build:client` for the Web- # assets the Client binary embeds, so Vite and the license inputs must be+ # assets the App binary embeds, so Vite and the license inputs must be# installed here too.- name: Install dependenciesrun: npm ci@@ -142,18 +142,18 @@ jobs:- name: Download application releaseuses: actions/download-artifact@v8with:- name: piik-app-${{ github.sha }}+ name: piik-server-${{ github.sha }}path: ${{ runner.temp }}/app-release- - name: Build and verify Client candidate+ - name: Build and verify App candidaterun: >-node scripts/package-client-candidate.mjs"${{ runner.temp }}/app-release""${{ matrix.target }}""${{ runner.temp }}/client-release"- - name: Upload Client release candidate+ - name: Upload App release candidateuses: actions/upload-artifact@v7with:- name: piik-client-${{ matrix.target }}-${{ github.sha }}+ name: piik-app-${{ matrix.target }}-${{ github.sha }}path: ${{ runner.temp }}/client-release/*if-no-files-found: errorcompression-level: 0diff --git a/CONTRIBUTING.md b/CONTRIBUTING.mdindex 4e67ffcd..883a3e72 100644--- a/CONTRIBUTING.md+++ b/CONTRIBUTING.md@@ -51,6 +51,10 @@ Clean up worktrees and branches only after semantic review and integration are c## Research Standard+Follow the [naming convention](./docs/reference/naming.md) for product copy,+commands, packages and code ownership. Keep display names separate from stable+protocol identifiers; use normal language-specific identifier conventions.+- Prefer specifications, official product documentation, primary source code, maintainers' design notes, and original papers.- Use current community issues and operational reports to identify real compatibility failures, but label anecdotal evidence as such.- Include a date and direct URLs. Separate verified facts, measurements, assumptions, and recommendations.diff --git a/README.md b/README.mdindex 36796842..ba6a51f2 100644--- a/README.md+++ b/README.md@@ -12,7 +12,7 @@ Friends watch in their browsers, with no installation.```mermaidflowchart LRBrowser[Browser] --> Host[Host a room]- Client[Piik Client] --> Host+ App[Piik App] --> HostHost -->|Invite link| Friends[Friends watch in browsers]```@@ -34,29 +34,29 @@ Capture needs HTTPS or `localhost`; available sources and sound depend on thebrowser and platform. English, Chinese and an illustrated visual mode share thesame controls, with light and dark themes.-## Start your own room with Client+## Start your own room with Piik App-With a Client package for your platform:+With the Piik App package for your platform:1. Extract the whole package, keeping `runtime` beside the executable.-2. Open `piik-client.exe` on Windows, `Piik Client.app` on macOS, or- `./piik-client` on Linux.-3. Choose a mode, pick what to share, and send the invitation. Keep Client running.+2. Open `piik-app.exe` on Windows, `Piik App.app` on macOS, or+ `./piik-app` on Linux.+3. Choose a mode, pick what to share, and send the invitation. Keep the app running.| Mode | Use it for || --- | --- || **Local room** | Friends on the same local network. An optional site password controls access. |-| **Public invite** | A temporary Internet invitation. The link lasts for this Client run; media remains P2P. |-| **Connect to Site** | An existing Piik site, with Client capture and media capabilities available in the same browser UI. |+| **Public invite** | A temporary Internet invitation. The link lasts for this App run; media remains P2P. |+| **Connect to Site** | An existing Piik site, with App capture and media capabilities available in the same browser UI. |-Client opens your system browser. Its package includes the Go application and+Piik App opens your system browser. Its package includes the Go application andcapture/link helpers; running it needs no Node.js, npm or Go installation.Linux native capture uses the system Portal, PipeWire and GStreamer stack.-See the [Client guide](./cmd/piik-client/README.md) for platform details.+See the [App guide](./cmd/piik-app/README.md) for platform details.Temporary public links use Cloudflare Quick Tunnel, which has no uptime guarantee.Media needs a working UDP path; restrictive networks or browser/OS suspension-can interrupt sharing. Windows Client and Browser are the current acceptance+can interrupt sharing. Windows App and Browser are the current acceptancefocus; macOS/Linux physical capture checks remain separate. See[current status](./docs/status.md) for candidate and release readiness.@@ -72,10 +72,10 @@ For source builds, tests and architecture, start with the## Something went wrong?Include your version, OS/browser, expected result and steps to reproduce.-For a local report, start Client with `--debug` and press `D`, or add `?debug=1`+For a local report, start Piik App with `--debug` and press `D`, or add `?debug=1`before any `#` in the Browser page URL and use its header download button. Review reports beforesharing; see [diagnostics and export](./docs/reference/configuration.md#diagnostics).-Connection trouble? Try the [Chromium WebRTC FAQ](./cmd/piik-client/README.md#chromium-webrtc-connections).+Connection trouble? Try the [Chromium WebRTC FAQ](./cmd/piik-app/README.md#chromium-webrtc-connections).## Licensediff --git a/README.zh-CN.md b/README.zh-CN.mdindex 4e463bd6..d47ee0d3 100644--- a/README.zh-CN.md+++ b/README.zh-CN.md@@ -12,7 +12,7 @@ Piik 是一个私密屏幕分享工具:一位房主,最多 20 位受邀好```mermaidflowchart LRBrowser[浏览器] --> Host[开房分享]- Client[Piik Client] --> Host+ App[Piik App] --> HostHost -->|邀请链接| Friends[好友用浏览器观看]```@@ -33,28 +33,28 @@ flowchart LR浏览器采集需要 HTTPS 或 `localhost`;可选来源和声音支持取决于浏览器与平台。界面提供中文、英文和图示模式,以及明暗主题。-## 用 Client 自己开房+## 用 App 自己开房-拿到对应平台的 Client 程序包后:+拿到对应平台的 App 程序包后:1. 完整解压,保留可执行文件旁的 `runtime` 目录。-2. Windows 打开 `piik-client.exe`,macOS 打开 `Piik Client.app`,- Linux 运行 `./piik-client`。-3. 选择模式和分享来源,发出邀请。分享期间保持 Client 运行。+2. Windows 打开 `piik-app.exe`,macOS 打开 `Piik App.app`,+ Linux 运行 `./piik-app`。+3. 选择模式和分享来源,发出邀请。分享期间保持 App 运行。| 模式 | 适合什么情况 || --- | --- || **本地房间** | 与同一局域网内的好友分享,可设置站点访问密码。 |-| **公网邀请** | 生成本次 Client 运行期间有效的临时邀请链接;媒体仍走 P2P。 |-| **连接站点** | 使用已有 Piik 站点,并在同一浏览器界面使用 Client 的采集与媒体能力。 |+| **公网邀请** | 生成本次 App 运行期间有效的临时邀请链接;媒体仍走 P2P。 |+| **连接站点** | 使用已有 Piik 站点,并在同一浏览器界面使用 App 的采集与媒体能力。 |-Client 会打开系统浏览器。程序包包含 Go 应用和采集、临时链接辅助程序,+App 会打开系统浏览器。程序包包含 Go 应用和采集、临时链接辅助程序,运行时无须安装 Node.js、npm 或 Go。Linux 原生采集使用系统的 Portal、PipeWire-和 GStreamer,平台细节见 [Client 指南](./cmd/piik-client/README.md)。+和 GStreamer,平台细节见 [App 指南](./cmd/piik-app/README.md)。临时公网链接使用 Cloudflare Quick Tunnel,不保证持续可用。媒体需要可用的 UDP 路径;网络限制、浏览器或系统挂起都可能中断分享。-当前以 Windows Client 和浏览器为验收重点,macOS/Linux 原生采集的实机验证另行进行。+当前以 Windows App 和浏览器为验收重点,macOS/Linux 原生采集的实机验证另行进行。候选版本与发布准备情况见 [当前状态](./docs/status.md)。## 自建站点或参与开发@@ -68,10 +68,10 @@ SFU 后备路径。搭建自己的站点,请看 [自托管指南](./docs/opera## 遇到问题?反馈时附上版本、系统与浏览器、预期结果和复现步骤。-Client 可用 `--debug` 启动后按 `D` 导出本地报告;浏览器网址加上 `?debug=1`+App 可用 `--debug` 启动后按 `D` 导出本地报告;浏览器网址加上 `?debug=1`后(放在 `#` 之前),可点击顶部下载按钮。分享前请检查报告内容,详见[诊断与导出](./docs/reference/configuration.md#diagnostics)。-连接不上时,也可以查看 [Chromium WebRTC 常见问题](./cmd/piik-client/README.md#chromium-webrtc-connections)。+连接不上时,也可以查看 [Chromium WebRTC 常见问题](./cmd/piik-app/README.md#chromium-webrtc-connections)。## 许可diff --git a/cmd/piik-client/README.md b/cmd/piik-app/README.mdsimilarity index 84%rename from cmd/piik-client/README.mdrename to cmd/piik-app/README.mdindex c2adab78..c37a393c 100644--- a/cmd/piik-client/README.md+++ b/cmd/piik-app/README.md@@ -1,38 +1,38 @@-# Piik Client+# Piik App-Piik Client is the self-contained and native-capability runtime for the same+Piik App is the self-contained and native-capability runtime for the sameBrowser application used by Hosted Piik. It does not implement another UI,room store, signaling protocol, or route controller.## Run A PackageExtract the matching platform bundle in full and keep `runtime` beside the-Client executable. Run `piik-client.exe` on Windows, `./piik-client` on-Linux, or `Piik Client.app` on macOS. The launcher opens in the system Browser;-the Client does not embed a browser UI. Packaged execution needs no Node.js, npm,+App executable. Run `piik-app.exe` on Windows, `./piik-app` on+Linux, or `Piik App.app` on macOS. The launcher opens in the system Browser;+the App does not embed a browser UI. Packaged execution needs no Node.js, npm,or Go installation. Linux native capture uses the system dependencies describedin the [Linux capture guide](../../native/capture/linux/README.md).-Windows Client and Browser are this phase's acceptance targets. Other platform+Windows App and Browser are this phase's acceptance targets. Other platformbuilds do not establish physical capture/audio acceptance; see[current status](../../docs/status.md). Package construction and public Releasepublication are separate steps in [deployment](../../docs/deployment.md).## Modes-- With no mode argument, the Client opens a small launcher in the system+- With no mode argument, the App opens a small launcher in the systemBrowser. It selects Local, a temporary public HTTPS invitation, or a savedSite, then enters the normal Host page.- The launcher remembers the Site address but keeps the per-run room source- separate. The Client RPC starts before this choice and accepts the saved Site+ separate. The App RPC starts before this choice and accepts the saved Sitealongside the Local Host origin, so Local or Public invite does not disable- Site enhancement. A Client-opened Site remembers the opt-in in that Browser- origin; later manually opened Host pages may reuse the running Client.+ Site enhancement. An App-opened Site remembers the opt-in in that Browser+ origin; later manually opened Host pages may reuse the running App.- `--site`, `--local`, and `--link` remain deterministic automation inputs forCI and development. They are not required for normal use.- The default launcher checks the official GitHub Releases metadata after itopens and shows a notice when a newer full-SHA release exists. The check is- best-effort and never installs or replaces the Client.+ best-effort and never installs or replaces the App.Local mode uses memory-only rooms, P2P relay, no SFU listener, and no publicdiscovery. Ordinary Local works on a reachable LAN. The **Public invite** mode@@ -42,10 +42,10 @@ uses one ordinary public STUN destination plus two bounded public surveydestinations. Browser and Native edges share the same prediction rule; NativeSTUN, ICE checks, and media use one Pion UDP mux. Media does nottravel through the HTTP tunnel, and a difficult media path still has no SFU or-TURN fallback. The Client chooses a sole private LAN IPv4 automatically. Use+TURN fallback. The App chooses a sole private LAN IPv4 automatically. Use`--lan-address <address>` only when multiple real LAN interfaces are active.-The system Browser remains the Host UI. A Client-launched Host offers the+The system Browser remains the Host UI. An App-launched Host offers theBrowser's standard capture picker and a list of exact platform capture targets;the user selects one explicitly. Windows offers the same VP8/Auto/H264 selector:VP8 uses the pinned WebRTC/libvpx encoder and H264 uses hardware Media Foundation@@ -61,10 +61,10 @@ live changes replace only the capture/encoder generation behind those stableconnections. A Native edge with public STUN also attempts one bounded PCP,UPnP, or NAT-PMP mapping for its Pion UDP socket; pure LAN does not. Routerswithout a mapping service continue with ordinary ICE/STUN. The mapping does not-create a relay or carry media through the Client control link. A configured Site+create a relay or carry media through the App control link. A configured Sitemay receive a direct Native publication from the shared encoded source;Local and one-link modes remain P2P-only. An ordinary Web Host keeps the-Browser capture path without probing the Client.+Browser capture path without probing the App.Native P2P edges and embedded SFU use one shared Pion/LiveKit media adapter forfeedback, forwarding allocation, bounded pacing and recovery. Native parents@@ -78,22 +78,22 @@ there is no room-wide score or periodic rebalance. See[media quality](../../docs/product/media-quality.md) for the implemented behaviorand [status](../../docs/status.md) for its acceptance limits.-The Client configuration keeps an optional Local site-access password. Leave it+The App configuration keeps an optional Local site-access password. Leave itblank for an open Local site, or set a visible-ASCII password (8 to 128 bytes)-in the launcher before starting. When present, the Client passes it to its own+in the launcher before starting. When present, the App passes it to its ownHost page in a URL fragment; the page uses the existing SiteAccess endpoint andremoves the fragment before continuing. Viewer invitations keep using theexisting room-scoped grant.The terminal shows the current mode, entry links and startup state; its language-follows the launcher and Client-enabled pages.+follows the launcher and App-enabled pages.Press `o` to reopen the Browser, or `q` / Ctrl+C to end Localrooms and stop the local server and temporary public link. Plain-text output-uses Ctrl+C. A Site-loaded Browser tab does not own the Client process.+uses Ctrl+C. A Site-loaded Browser tab does not own the App process.-For one-link Internet sharing, open the Client launcher, choose **Public invite**,+For one-link Internet sharing, open the App launcher, choose **Public invite**,create a room in the opened Browser, and send its normal invitation link. The-random `trycloudflare.com` origin lasts only for that Client run; a later launch+random `trycloudflare.com` origin lasts only for that App run; a later launchcreates a new temporary link. Cloudflare Quick Tunnels provide no uptime guarantee;use a configured Site when persistent control availability or SFU fallback matters.@@ -105,7 +105,7 @@ use a configured Site when persistent control availability or SFU fallback matteChromium-based Browsers can restrict WebRTC UDP through Browser settings,extensions or managed policies. Disabling non-proxied UDP can prevent even the-local Browser-to-Client media connection; successful capture or page loading+local Browser-to-App media connection; successful capture or page loadingdoes not prove that this separate connection is available. This is not specificto one Browser brand or to VPN use.@@ -139,7 +139,7 @@ The binary embeds the Browser assets, so build them before running it:npm run build:clientgo test ./...go vet ./...-go run ./cmd/piik-client+go run ./cmd/piik-app```The repository-level entry used locally and by CI is:@@ -148,13 +148,13 @@ The repository-level entry used locally and by CI is:npm run check:client```-On Windows, its generated Client, capture, and media-test executables are+On Windows, its generated App, capture, and media-test executables arewritten to the ignored repository `build/client-check` directory and reused onthe next run. This keeps the executable identity stable for the system firewall;the files are local build output and are never packaged or committed.It runs Go formatting, unit tests, vet, and Windows/Linux cgo-free cross-builds.-The Darwin Client and peer gate build only on macOS with cgo enabled and an+The Darwin App and peer gate build only on macOS with cgo enabled and aninstalled SDK; other hosts report that skipped platform explicitly. The pinnedmedia dependency's Darwin CPU statistics use Mach APIs through cgo, so a Windowsor Linux core check does not establish Darwin build acceptance.@@ -173,14 +173,14 @@ one session retires only its resources. Its public `instanceToken`distinguishes the discovered process but is not authentication; room authorityand remote signaling remain in the Browser. Viewer receive/relay remainsavailable even when this machine has no accepted native capture encoder.-Capture sidecars must match the Client's current probe/encoded-output contract;+Capture sidecars must match the App's current probe/encoded-output contract;the package-candidate wrapper validates that version before accepting its artifact.## PackagingFrom a clean revision, build the application release and run the platform'scandidate wrapper on its native operating system. The wrapper builds capture,-verifies the pinned public-link helper, and assembles and checks the Client:+verifies the pinned public-link helper, and assembles and checks the App:```shnode scripts/package-app-release.mjs /outside/repository/app-release@@ -200,11 +200,11 @@ explicit CI packaging, Release publication and updates are documented inThe extracted bundle contains:```text-piik-client[.exe]+piik-app[.exe]REVISIONLICENSETHIRD-PARTY-NOTICES.txt-runtime/native/piik-client-capture[.exe] # supported native-media packages+runtime/native/piik-capture[.exe] # supported native-media packagesruntime/tunnel/cloudflared[.exe] # packages that support --link```@@ -212,15 +212,15 @@ The executable embeds the Browser assets of the consumed application release andcarries that same full Git revision as the package `REVISION`. No compatibilityreader accepts a mismatched private build.-The Windows Client embeds the shared Piik mark through the-`cmd/piik-client/piik_windows_amd64.syso` resource; the platform+The Windows App embeds the shared Piik mark through the+`cmd/piik-app/piik_windows_amd64.syso` resource; the platformsuffix keeps that Windows resource out of Linux and macOS builds.Linux packages include the standard `share/applications` desktop entry and-hicolor icon. macOS packages include a thin `Piik Client.app` launcher+hicolor icon. macOS packages include a thin `Piik App.app` launcherwith an ICNS resource; the raw Go executable remains available beside it.-For a native Host smoke run, launch the Client and select a window in the Host-page. The Client never guesses among multiple targets. The page still creates+For a native Host smoke run, launch the App and select a window in the Host+page. The App never guesses among multiple targets. The page still createsthe room and sends the current SDP/ICE through the selected authority. Aconfigured Site supplies its normal Internet routing and SFU fallback. Withouta Site, the **Public invite** choice exposes the Local control surface while@@ -237,13 +237,13 @@ is POSIX; use equivalent variables on Windows.```shPIIK_CLIENT_LOCAL_GATE=true \CHROME_PATH=/path/to/chrome \-PIIK_CLIENT_EXE=/path/to/piik-client \+PIIK_CLIENT_EXE=/path/to/piik-app \PIIK_CLIENT_GATE_LAN_ADDRESS=192.168.1.10 \npm run gate:client-localPIIK_CLIENT_LOOPBACK_GATE=true \CHROME_PATH=/path/to/chrome \-PIIK_CLIENT_EXE=/path/to/piik-client \+PIIK_CLIENT_EXE=/path/to/piik-app \npm run probe:client-loopbackPIIK_CLIENT_MEDIA_GATE=true \@@ -293,7 +293,7 @@ delivery through the current route; native audio is included when the capabilityprobe and target OS support it. The cross-NAT variant uses a temporary reverseSSH path for signaling only and requires a selected `srflx` or `prflx` media pair;media never travels through SSH. The one-link media variant instead carries the-same signaling through the Client's temporary public origin and requires direct+same signaling through the App's temporary public origin and requires directmedia delivery to an independent Linux peer. Native P2P quality evidence andembedded SFU delivery have explicit gates. macOS and Linux capture stillrequire physical desktop/media gates; CI compilation and package smoke do notdiff --git a/cmd/piik-client/main.go b/cmd/piik-app/main.gosimilarity index 74%rename from cmd/piik-client/main.gorename to cmd/piik-app/main.goindex bee3ae6e..e55bca0b 100644--- a/cmd/piik-client/main.go+++ b/cmd/piik-app/main.go@@ -1,7 +1,7 @@-// Command piik-client is the self-contained Piik Client: it opens a+// Command piik-app is the self-contained Piik App: it opens a// configured Piik Site, or runs the Local room authority in-process// (--local / --link) together with the loopback capability service and the-// native media edge. Flags select the mode; clientapp owns every mode's+// native media edge. Flags select the mode; app owns every mode's// lifecycle.package main@@ -13,11 +13,11 @@ import ("os/signal""syscall"- "github.com/TNTcraftHIM/Piik/internal/client/clientapp"+ "github.com/TNTcraftHIM/Piik/internal/app")func main() {- var options clientapp.Options+ var options app.Optionsflag.Func("site", "save and open a Piik Site origin", func(value string) error {options.Site = valueoptions.SiteSet = true@@ -25,13 +25,13 @@ func main() {})flag.BoolVar(&options.Local, "local", false, "use the self-contained Local room authority")flag.BoolVar(&options.Link, "link", false, "create one public Viewer invitation link")- flag.BoolVar(&options.Debug, "debug", false, "save opt-in Client diagnostics to rotated files")+ flag.BoolVar(&options.Debug, "debug", false, "save opt-in App diagnostics to rotated files")flag.StringVar(&options.LogDir, "log-dir", "", "diagnostic directory (overrides PIIK_LOG_DIR)")flag.StringVar(&options.CaptureProcess, "capture-process", "", "path to the platform native capture process")flag.StringVar(&options.TunnelProcess, "tunnel-process", "", "path to the packaged public tunnel process")- flag.StringVar(&options.ConfigPath, "config", "", "path to the Client configuration file")+ flag.StringVar(&options.ConfigPath, "config", "", "path to the App configuration file")flag.StringVar(&options.LANAddress, "lan-address", "", "LAN IPv4 address used in Local invitations")- flag.IntVar(&options.Port, "port", clientapp.DefaultLocalPort, "Local Piik server port")+ flag.IntVar(&options.Port, "port", app.DefaultLocalPort, "Local Piik server port")flag.Parse()options.DisableBrowser = os.Getenv("PIIK_CLIENT_GATE_NO_BROWSER") == "true"@@ -45,7 +45,7 @@ func main() {}}()}- if err := clientapp.Run(ctx, options); err != nil {+ if err := app.Run(ctx, options); err != nil {if options.DisableBrowser {fmt.Fprintln(os.Stderr, err)}diff --git a/cmd/piik-client/piik.ico b/cmd/piik-app/piik.icosimilarity index 100%rename from cmd/piik-client/piik.icorename to cmd/piik-app/piik.icodiff --git a/cmd/piik-client/piik_windows_amd64.syso b/cmd/piik-app/piik_windows_amd64.sysosimilarity index 100%rename from cmd/piik-client/piik_windows_amd64.sysorename to cmd/piik-app/piik_windows_amd64.sysodiff --git a/docs/README.md b/docs/README.mdindex 5dbf74e8..c012a176 100644--- a/docs/README.md+++ b/docs/README.md@@ -7,7 +7,7 @@| What you need | Start here || --- | --- || Join a friend or share a screen | [Quick Start](../README.md) |-| Run Client, choose a mode, or fix capture trouble | [Client guide](../cmd/piik-client/README.md) |+| Run App, choose a mode, or fix capture trouble | [App guide](../cmd/piik-app/README.md) || Collect a useful bug report | [Diagnostics and export](./reference/configuration.md#diagnostics) || Host your own site | [Self-hosting](./operations/self-hosting.md) || Configure ports, access or persistence | [Configuration reference](./reference/configuration.md) |@@ -17,6 +17,9 @@The public entry points have English and Chinese versions. Technical referenceskeep one owner rather than duplicate the full documentation tree.+Contributors should follow the [naming convention](./reference/naming.md) for+display names, commands, packages and App/Server/Browser code boundaries.+## Run from sourceUse Node from [.node-version](../.node-version), npm fromdiff --git a/docs/adr/0002-memory-resident-protected-rooms.md b/docs/adr/0002-memory-resident-protected-rooms.mdindex a85fffd1..8e9e0f78 100644--- a/docs/adr/0002-memory-resident-protected-rooms.md+++ b/docs/adr/0002-memory-resident-protected-rooms.md@@ -43,7 +43,7 @@ Hosted Server uses SQLite by default:directory; service/container templates select a writable persistent directory;- an explicit absolute path selects that SQLite file;- `ROOM_DATABASE_PATH=:memory:` explicitly selects process-only rooms, whose- authority ends at process exit. Client Local uses this memory composition+ authority ends at process exit. App Local uses this memory compositiondirectly and does not inherit Hosted environment defaults.Stable mode stores only `roomId`, Host-token digest, Viewer-grant digest,diff --git a/docs/adr/0006-fixed-high-native-sender-canary.md b/docs/adr/0006-fixed-high-native-sender-canary.mdindex b3e6dd00..692db036 100644--- a/docs/adr/0006-fixed-high-native-sender-canary.md+++ b/docs/adr/0006-fixed-high-native-sender-canary.md@@ -14,7 +14,7 @@ current room, signaling, routing, audio, packaging, and Browser Viewer contract.## DecisionThe fixed-HIGH native sender candidate is not a product surface and its private-wire remains deleted. The current native Client boundary is defined by+wire remains deleted. The current native App boundary is defined by[ADR-0010](./0010-cross-platform-client-runtime.md).The deleted one-Viewer loopback proved that a fixed 1280x720@30 source coulddiff --git a/docs/adr/0007-path-isolated-representation-quality.md b/docs/adr/0007-path-isolated-representation-quality.mdindex 5f9ec984..bb55ac24 100644--- a/docs/adr/0007-path-isolated-representation-quality.md+++ b/docs/adr/0007-path-isolated-representation-quality.md@@ -77,7 +77,7 @@ it does not need a second bitrate, resolution, FPS, or layer-control system.from the exact sender and comparative delivery proof from the same Viewer overa real prepared candidate. It does not set bitrate, resolution, FPS, or layer,infer a physical bottleneck, or combine quality measurements into a score. A- native Client P2P edge obtains that category from Pion GCC: after real+ native App P2P edge obtains that category from Pion GCC: after realtransport feedback and encoded-frame progress, a target payload bitrate belowthe source's measured H.264 plus Opus payload is `bandwidth`; sufficienttarget payload is `none`; missing feedback or source progress is `unknown`.diff --git a/docs/adr/0008-window-scoped-audio-capture.md b/docs/adr/0008-window-scoped-audio-capture.mdindex 41d754c4..b8f0fd17 100644--- a/docs/adr/0008-window-scoped-audio-capture.md+++ b/docs/adr/0008-window-scoped-audio-capture.md@@ -1,6 +1,6 @@# ADR-0008: Browser Screen-Audio Scope-- Status: accepted for Browser capture and the Windows Client audio paths+- Status: accepted for Browser capture and the Windows App audio paths- Date: 2026-08-21- Last updated: 2026-08-27@@ -13,7 +13,7 @@ application. Sharing a system mix can unintentionally include calls ornotifications.Windows offers a narrower native primitive through WASAPI application loopback-for one selected process tree. The native Client owns that path for selected+for one selected process tree. The native App owns that path for selectedwindows; a selected display uses the default render-device loopback when theplatform probe and physical gate report it.@@ -34,10 +34,10 @@ platform probe and physical gate report it.5. Do not describe generic Browser system audio as application-isolated. UI anddocumentation must leave source scope to the Browser's actual result.6. Windows process-tree audio for a selected window, and default render-device- loopback for a selected display, are Client capabilities when the platform- probe and physical gate pass. WGC/MF video and the Client media boundary are owned by+ loopback for a selected display, are App capabilities when the platform+ probe and physical gate pass. WGC/MF video and the App media boundary are owned by[ADR-0010](./0010-cross-platform-client-runtime.md); measurements are in- [Native Client media](../research/native-client-media.md).+ [Native App media](../research/native-client-media.md).## Consequencesdiff --git a/docs/adr/0009-optional-nat-prediction.md b/docs/adr/0009-optional-nat-prediction.mdindex e90c2941..5f6ff429 100644--- a/docs/adr/0009-optional-nat-prediction.md+++ b/docs/adr/0009-optional-nat-prediction.md@@ -1,12 +1,12 @@# ADR-0009: Optional Connection-Local NAT Prediction-- Status: accepted as an optional Site and Client capability+- Status: accepted as an optional Site and App capability- Date: 2026-09-02## ContextThe self-hosted deployment has two auxiliary STUN-only listeners for controlled-NAT measurements, while a self-contained Client needs public discovery without+NAT measurements, while a self-contained App needs public discovery withoutdepending on that deployment. A disposable namespace lab showed that a sequential,endpoint-dependent mapping can sometimes be reached when the remote peerreceives a small set of adjacent server-reflexive candidates. The result is@@ -25,7 +25,7 @@ connection acquisition reuses the route controller's existing opportunity ledgerdefaults on, remains Host-controllable, locks while sharing, and is notpersisted beyond that share generation.2. An enabled Site derives ports 3479 and 3480 from its first ordinary STUN- authority on UDP 3478. Public-link Client mode instead supplies one ordinary+ authority on UDP 3478. Public-link App mode instead supplies one ordinarypublic STUN destination and two fixed public survey destinations; pure LANmode supplies none. The same share switch and ICE configuration cover everyBrowser or Native P2P edge. SFU PeerConnections remain unchanged.@@ -69,7 +69,7 @@ connection acquisition reuses the route controller's existing opportunity ledgerPositive:-- Sites with their own listeners and self-contained public-link Clients can use+- Sites with their own listeners and self-contained public-link Apps can usethe same bounded mechanism while pure Browser/LAN operation stays unchanged;- normal ICE remains immediately available, so an unavailable auxiliary STUNlistener or unsuccessful prediction cannot delay direct or SFU fallback;diff --git a/docs/adr/0010-cross-platform-client-runtime.md b/docs/adr/0010-cross-platform-client-runtime.mdindex 0af41bb1..a541a7d0 100644--- a/docs/adr/0010-cross-platform-client-runtime.md+++ b/docs/adr/0010-cross-platform-client-runtime.md@@ -1,4 +1,4 @@-# ADR-0010: Cross-Platform Client Runtime+# ADR-0010: Cross-Platform App Runtime- Status: accepted capability-provider architecture and native endpoint media boundary- Date: 2026-09-05@@ -26,8 +26,8 @@ Hosted and Local deployments diverge without improving the media path.Room authority and local media capability are independent choices. A room maycome from Local, a temporary public link, or a configured Site while each-participant independently uses Browser media or available Client capability.-Binding these choices into exclusive Client modes prevents mixed Browser/Native+participant independently uses Browser media or available App capability.+Binding these choices into exclusive App modes prevents mixed Browser/Nativetopologies and makes a saved Site unavailable while another room source runs.## Decision@@ -37,7 +37,7 @@ topologies and makes a saved Site unavailable while another room source runs.core and the same built Browser assets with local configuration; nodeployment gets a second product core. Its implementation is owned by[ADR-0012](./0012-shared-go-backend-core.md).-2. The packaged product is Piik Client. Its Go process is the cross-platform+2. The packaged product is Piik App. Its Go process is the cross-platformentry and native capability provider. It starts `/health` and one `/control`endpoint on IPv4 loopback within ports `39721` through `39730` before room-source selection and retains them until the process exits.@@ -49,7 +49,7 @@ topologies and makes a saved Site unavailable while another room source runs.4. Loopback v9 starts with a strict `hello` handshake. Up to two participantcontrol sessions may coexist; each retains its own share and media lifetime.This bounds concurrent Native work, not the shared server's room count.- Ending one control session cannot end another; Client exit waits for all+ Ending one control session cannot end another; App exit waits for allowned sessions to retire. Health discovery reportsonly separately probed native capture booleans. Native Viewer receive/NATremains available when capture or hardware encode is absent. An active control session may@@ -68,20 +68,20 @@ topologies and makes a saved Site unavailable while another room source runs.wrapper or UI.6. The system Browser remains the UI. Browser extensions, userscripts, Electron,Tauri, and resident services need new evidence before they can replace this- smaller boundary. A Client-opened Site stores a non-secret opt-in at that+ smaller boundary. An App-opened Site stores a non-secret opt-in at thatexact Browser origin, so later manually opened pages may discover the running- Client. Pages without that opt-in do not probe localhost or request local-+ App. Pages without that opt-in do not probe localhost or request local-network permission. Clearing Site data simply requires opening it from the- Client again.+ App again.7. A self-contained Local deployment serves reachable LAN peers without acentral Piik service. Its explicit `--link` mode starts one accountless- Cloudflare Quick Tunnel for the same HTTP/WebSocket surface. The Client+ Cloudflare Quick Tunnel for the same HTTP/WebSocket surface. The Appreserves the exact IPv4 listener before creating that tunnel, then appliesits HTTPS origin before the server starts serving that listener. It retains the samememory RoomStore, Browser UI, Viewer grant, signaling, and route controller.The Host sends the ordinary invitation link and the Viewer needs only aBrowser. Cloudflare terminates this temporary control path; WebRTC media stays- P2P and uses public STUN. The link ends with the Client and is not a persistent+ P2P and uses public STUN. The link ends with the App and is not a persistentSite, SFU, or TURN fallback.8. Browser and Native are local media adapters beneath the same authenticatedparticipant, connection identity, copy capacity, and committed route graph.@@ -108,10 +108,10 @@ topologies and makes a saved Site unavailable while another room source runs.edge supplies Host preview and the existing Browser LiveKit publisher. Itneither consumes route-copy capacity nor starts port mapping; an assigned SFUpublication still consumes its existing route copy. Native code does not- implement LiveKit or another representation policy. The Client discovers+ implement LiveKit or another representation policy. The App discoverspackaged capture capability at startup. Its Host page offers the Browser's- standard picker and each exact Client-owned screen/window; the user must select one- and the Client never guesses a target. The same room quality settings select+ standard picker and each exact App-owned screen/window; the user must select one+ and the App never guesses a target. The same room quality settings selectnative capture size, frame rate, video/audio bitrate, and the platformencoder's quality-versus-speed hint. A live quality or source change preparesa replacement capture/encoder generation and swaps it behind the existing@@ -125,11 +125,11 @@ topologies and makes a saved Site unavailable while another room source runs.stock Browser sender from the stable local bridge; existing evidence alonedecides commit or rollback, and a later operation may return to Native. Noextra threshold, timer, score, route operation, or representation ladder is- added. Only a consumed Client-launch marker travels in the URL fragment.+ added. Only a consumed App-launch marker travels in the URL fragment.Exact target identity travels over loopback.-9. The Client uses the system Browser as its only UI. On every launch, the current+9. The App uses the system Browser as its only UI. On every launch, the currentlightweight control center offers Local, public link, and Site. The Site value- is stored in Client configuration and remains one click on later launches;+ is stored in App configuration and remains one click on later launches;selecting Local or public link does not disable background RPC access for thesaved Site. Command-line modeselectors remain automation inputs rather than the normal interface. An@@ -142,28 +142,28 @@ topologies and makes a saved Site unavailable while another room source runs.and two bounded public survey destinations. Site mode consumes that Site'sconfigured STUN survey. Both feed the same connection-local predictionadapter; Native additionally owns its UDP socket and best-effort port mapping.-11. One Client configuration owns the optional Site origin and an optional,+11. One App configuration owns the optional Site origin and an optional,user-chosen Local access password. A blank value leaves the Local site open;a value gates that site through the existing SiteAccess authority. The- Client bootstraps a selected page through a fragment consumed before- authentication; the page retains only the non-secret Client opt-in at its- origin. Friends use the existing room invitation grant. No Client-specific+ App bootstraps a selected page through a fragment consumed before+ authentication; the page retains only the non-secret App opt-in at its+ origin. Friends use the existing room invitation grant. No App-specificroom authorization system is added.12. Local authority shutdown first ends every in-memory room through the current- `room-closed` path, then closes signaling and HTTP. The Client cancels the+ `room-closed` path, then closes signaling and HTTP. The App cancels theserver context, calls that end-then-close sequence under one boundedtimeout, and only then closes the public tunnel and the loopback service. Itdoes not restart a vanished authority.-13. Client assembly consumes the immutable application release from the same full+13. App assembly consumes the immutable application release from the same fullGit revision and an explicit supported target. The Go binary embeds thatrelease's built Browser assets and the package `REVISION` records the samerevision; a revision mismatch fails rather than loading a stale private- contract. Client-scoped pull requests build every+ contract. App-scoped pull requests build everytarget and must start the assembled Local authority, pass `/healthz`, andstop it cleanly before the candidate is accepted.14. The root package manifest is the single dependency contract for the Browserbundle and repository tooling. No host installs packages to run Piik, so- the manifest has no runtime half, and no second Client dependency list or+ the manifest has no runtime half, and no second App dependency list orpost-install package surgery is used.## Consequences@@ -188,12 +188,12 @@ received 30+ H.264 RTP packets over a selected directA Windows Browser gate also receives process-loopbackOpus on both native edges. A separate remote gate proves that `--link` generatesthe ordinary public invitation and carries the unchanged Viewer page and-WebSocket control path, then disappears when the Client exits. An isolated+WebSocket control path, then disappears when the App exits. An isolatedLiveKit gate also proves native capture through the loopback Browser bridge andthe existing SFU publisher, including a live 1080p-to-480p profile change andcomplete cleanup.A Browser-Host-to-Native-Viewer gate additionally proves that the Viewer claims-the v8 Client control session and Chrome decodes the 1280x720 source; the encoded+the v8 App control session and Chrome decodes the 1280x720 source; the encodeddownstream edge has a separate H.264/Opus RTP integration gate.One-link Browser media and physical non-Windows capture remain separate gates.GitHub runners compile all three platform adapters. The macOS arm64 sidecar also@@ -210,7 +210,7 @@ the existing route controller. Unknown feedback and stopped-source windows stayineligible.The local trust boundary is intentionally per-user: the instance token identifies-the running Client but is not authentication against another local process.+the running App but is not authentication against another local process.A physical home-router gate created and removed a UPnP mapping for an ephemeralUDP listener. The integrated native Host gate still passed capture, two-edge@@ -232,4 +232,4 @@ architectural claim.- [LocalSend protocol](https://github.com/localsend/protocol/blob/main/README.md)- [Sunshine local Web UI](https://docs.lizardbyte.dev/projects/sunshine/latest/)- [Syncthing local GUI/API](https://docs.syncthing.net/users/config.html)-- [Native Client media evidence](../research/native-client-media.md)+- [Native App media evidence](../research/native-client-media.md)diff --git a/docs/adr/0011-browser-assisted-native-fanout.md b/docs/adr/0011-browser-assisted-native-fanout.mdindex b5b63e28..ff5de5e0 100644--- a/docs/adr/0011-browser-assisted-native-fanout.md+++ b/docs/adr/0011-browser-assisted-native-fanout.md@@ -15,7 +15,7 @@ share one encoder.The later [Chromium legacy probe](../research/advanced-peer-distribution.md#chromium-legacy-fanout-probe)demonstrates a non-standard clean-path exception, with unresolved feedback and-statistics. It is not an accepted replacement for this Browser/Client boundary.+statistics. It is not an accepted replacement for this Browser/App boundary.The repository already has the required Native boundary: a Pion receiver canaccept H.264/Opus RTP and its encoded source can feed bounded downstream Pion@@ -24,7 +24,7 @@ UI and capture owner.## Decision-1. A Client-launched Browser Host whose current codec is H.264 and whose+1. An App-launched Browser Host whose current codec is H.264 and whosetopology optimization is enabled uses one local Browser-to-Native ingress.The existing `HostPeer` owns its sender, clone, quality settings and pause;the existing Native receiver owns encoded fanout. VP8 and disabled quality@@ -38,7 +38,7 @@ UI and capture owner.Browser sender candidate for one degraded edge; that candidate is anexception when sharing an encoding cannot sustain that path. Savings neverjustify worse delivery or disabling native Browser quality adaptation.-4. If the Client is absent or the local ingress fails, the Host keeps the+4. If the App is absent or the local ingress fails, the Host keeps theBrowser capture and recreates affected senders on their current assignedroutes. Capture and room authority survive loss of the optional fanout.Ordinary Browser pages retain their existing media path.@@ -49,7 +49,7 @@ UI and capture owner.## Consequences-- A Client-launched Browser Host can use one Browser encode plus Native encoded+- An App-launched Browser Host can use one Browser encode plus Native encodedfanout while preserving the existing UI and room behavior.- A pure Browser relay remains framework-owned and may encode per child becausethe standard Browser API has no cross-connection encoded-frame injection@@ -62,7 +62,7 @@ UI and capture owner.children; failure retains Browser capture through ordinary sender recovery.- A Windows/Chrome two-child gate proves one local encode, 1080p at about 30 fpson both Viewers, live quality changes, pause/resume, source audio changes, and- Client-exit recovery. Weak-path automatic adaptation and its cost remain+ App-exit recovery. Weak-path automatic adaptation and its cost remainphysical acceptance, not a consequence of the clean-path result.## Referencesdiff --git a/docs/adr/0012-shared-go-backend-core.md b/docs/adr/0012-shared-go-backend-core.mdindex bc644838..0bb496eb 100644--- a/docs/adr/0012-shared-go-backend-core.md+++ b/docs/adr/0012-shared-go-backend-core.md@@ -7,15 +7,15 @@One TypeScript/Node server owned HTTP, room authority, admission, signaling, androuting. Hosted and Local composed the same application from it, and the packaged-Client supervised it as a Node child beside a pinned runtime and an extracted+App supervised it as a Node child beside a pinned runtime and an extractedapplication tree. [ADR-0010](./0010-cross-platform-client-runtime.md) acceptedthat shape because a second implementation of rooms, signaling, or routing wouldmake the two deployments diverge without improving the media path.-That boundary is paid for in every deployment. The Client package carries a+That boundary is paid for in every deployment. The App package carries alanguage runtime and an installed dependency tree beside its Go entry, aproduction host needs Node and npm to install and validate a release, and one-user entry runs two processes whose lifetime a supervisor owns. The Client+user entry runs two processes whose lifetime a supervisor owns. The Appalready owns a Go process, Pion media, and its capture sidecars, so the secondruntime buys only the existing server code.@@ -26,11 +26,11 @@ the same Browser build.## Decision1. One Go module at the repository root owns the product core.- `cmd/piik-server` (Hosted) and `cmd/piik-client` (Client) are entry+ `cmd/piik-server` (Hosted) and `cmd/piik-app` (App) are entrypoints over the same `internal/server` packages and own only their defaults,reachability, and lifecycle policy. Neither reimplements rooms, admission,signaling, or routing. The TypeScript server, its bundled runtime, the process- supervisor, and the Client's runtime/application selection flags are deleted in+ supervisor, and the App's runtime/application selection flags are deleted inthe same boundary.2. The Browser UI stays React/TypeScript. Node, npm, Vite, vitest, and `tsx`remain build and gate tooling and stop being a runtime requirement on any@@ -65,19 +65,19 @@ the same Browser build.[ADR-0002](./0002-memory-resident-protected-rooms.md). Both storage modes,their validation, and their failure policy are unchanged, and no buildrequires a C toolchain.-8. The port changed no contract. Signaling stayed on its then-current v21 wire; the Client+8. The port changed no contract. Signaling stayed on its then-current v21 wire; the Apploopback stays v8, capture framing stays v4, and the HTTP API, cookies, errorcodes, and close codes keep their exact shapes. No compatibility alias, dualreader, or migration is added for a change of implementation language.## Consequences-- The Client is one process. Room authority, the loopback capability service, and+- The App is one process. Room authority, the loopback capability service, andnative media share it, so a panic in the server ends the Local session exactlyas a crashed Node child did, and the capability service no longer survives afailed room authority. Hosted exits non-zero and systemd restarts it; nothingrestarts a vanished authority in place.-- Package and runtime cost falls in three places: the Client package loses its+- Package and runtime cost falls in three places: the App package loses itsbundled runtime and dependency tree, the application release becomes the serverbinary with its notices and revision, and a production host installs nopackages during a release. One Windows 11 before/after run measured cold startdiff --git a/docs/deployment.md b/docs/deployment.mdindex 1c8ecf1f..cf157889 100644--- a/docs/deployment.md+++ b/docs/deployment.md@@ -45,36 +45,36 @@ extracts its own artifact to verify it. The archive contains exactly`piik-server`, `LICENSE`, `THIRD-PARTY-NOTICES.txt`, and `REVISION`. Uploadthe archive, manifest, and descriptor together to `/opt/piik/uploads`.-The same application descriptor is also the Client assembly input. On each+The same application descriptor is also the App assembly input. On eachtarget platform, provide that platform's Go toolchain:```shPIIK_GO=/path/to/go node scripts/assemble-client.mjs \/outside/repository/app-release/piik-<revision>.release.json \- /outside/repository/Piik-Client \+ /outside/repository/piik-app \--target windows-amd64 \--capture /path/to/platform-capture \--tunnel /path/to/cloudflared```Assembly refuses a dirty or different revision and emits one directory with the-Client executable, the Browser assets taken from that release and embedded in+App executable, the Browser assets taken from that release and embedded init, the selected sidecars, notices, and matching `REVISION`. Its required targetis one of `windows-amd64`, `linux-amd64`, or `darwin-arm64`; every suppliedbinary input must match it. It does not create an installer, auto-updater,release tag, or compatibility bundle.-Darwin Client assembly runs on macOS with its SDK and cgo enabled: the pinned+Darwin App assembly runs on macOS with its SDK and cgo enabled: the pinnedLiveKit dependency's [Darwin CPU statistics](https://github.com/mackerelio/go-osstat/blob/v0.2.8/cpu/cpu_darwin_cgo.go)call Mach APIs. Windows and Linux-Client builds keep cgo disabled. A core check on those hosts explicitly skips+App builds keep cgo disabled. A core check on those hosts explicitly skipsthe Darwin binaries; macOS build and package verification belong to the existingnative runner. This does not change the cgo-free linux/amd64 Server artifact.The platform package also carries its native presentation metadata: Windowsembeds the icon in the Go executable, Linux emits a freedesktop desktop entryunder `share/`, and macOS emits a thin `.app` launcher with an ICNS resource.-The latter two are packaging metadata only and do not duplicate the Client+The latter two are packaging metadata only and do not duplicate the Appexecutable.CI and local release-candidate builds use the same wrapper on the target's@@ -88,7 +88,7 @@ node scripts/package-client-candidate.mjs \```The wrapper downloads the pinned public-link sidecar, verifies its digest,-builds the target Client and available capture process, executes every packaged+builds the target App and available capture process, executes every packagedruntime, and emits one `tar.gz` plus its SHA-256 file.Retain the descriptor and successful deployment output as release metadata. Do@@ -97,7 +97,7 @@ or hashes.After `validate` succeeds on an explicit workflow dispatch with`client_checks=true`, CI packages the Server application release and the-three-platform Client candidates that consume it. The artifacts are retained+three-platform App candidates that consume it. The artifacts are retainedfor 14 days. Ordinary `main` pushes do not run these packaging jobs. Thisworkflow does not create a tag, public GitHub Release, or deployment.@@ -107,13 +107,13 @@ install.## Update Check-The application, Server deployment, and platform Client all use the full Git+The application, Server deployment, and platform App all use the full Gitrevision as their release identity. A formal GitHub Release must use that exact40-character revision as its tag and keep the corresponding release URL. Thecurrent CI workflow produces short-lived candidates but does not publish aGitHub Release; publication remains an explicit distribution decision.-The default Client launcher starts immediately, then performs one background+The default App launcher starts immediately, then performs one backgroundrequest to the official Piik GitHub Releases API. It shows a link only whenthe latest release has a valid full revision different from the packaged one.The request sends no current revision, credentials, room data, or media data;@@ -137,7 +137,7 @@ state. A different current-revision file may be supplied as its only argument.## Permanent-Room Schema Cutover-The schema 2 / signaling v23 cutover required matching Web/Client/Server builds+The schema 2 / signaling v23 cutover required matching Web/App/Server buildsand an accepted active-session interruption. Native control stayed v9; thatschema change preserved Browser credential keys. It was not an app-only release.The separate [brand cutover](./research/piik-rename-plan.md) must preserve this@@ -177,7 +177,7 @@ and [backup guidance](https://www.sqlite.org/backup.html) define this offline opThe first move from external services to embedded STUN/SFU is a coordinatedinfrastructure and protocol transaction, including Node-to-Go where stillneeded. Complete the [self-hosting cutover procedure](./operations/self-hosting.md#coordinated-embedded-media-cutover)-with matching Web/Server signaling and native protocol v9 Client builds,+with matching Web/Server signaling and native protocol v9 App builds,accepted active-session interruption, released UDP ports, and exactunit/environment/proxy/service recovery. The routine wrapper does not performthat transaction; it requires an already running packaged Go release and cannotdiff --git a/docs/design/piik-brand.html b/docs/design/piik-brand.htmlindex c1b88760..d7f10e20 100644--- a/docs/design/piik-brand.html+++ b/docs/design/piik-brand.html@@ -164,7 +164,7 @@<div><span class="number">03 / Hang out</span><p>A little room for your people.<span class="zh" lang="zh-CN">人到齐,就一起看。</span></p></div></div></section>- <div class="implementation"><span>Display / 显示名称 <strong>Piik</strong></span><span>Technical / 技术名称 <code>piik-client</code></span><span>Website / 官网 <code>piik.tv</code></span><span>Page title / 页签 <code>Piik | 6020 · 📺</code></span></div>+ <div class="implementation"><span>Display / 显示名称 <strong>Piik</strong></span><span>Technical / 技术名称 <code>piik-app</code></span><span>Website / 官网 <code>piik.tv</code></span><span>Page title / 页签 <code>Piik | 6020 · 📺</code></span></div><footer><span>Design study · 09 Sep 2026 · 待讨论,尚未替换产品</span><span>Layout references: <a href="https://localsend.org/">LocalSend</a> · <a href="https://rustdesk.com/">RustDesk</a></span></footer></main><script>diff --git a/docs/operations/self-hosting.md b/docs/operations/self-hosting.mdindex 4ad2dcd4..f6b2b8af 100644--- a/docs/operations/self-hosting.md+++ b/docs/operations/self-hosting.md@@ -11,7 +11,7 @@ The current source embeds STUN and SFU in the Piik process underadvertises ordinary discovery and enables the UDP 3478 listener on`STUN_LISTEN_HOST` (IPv4, default `0.0.0.0`). Enabling`NAT_PREDICTION_ENABLED` also binds UDP 3479/3480 on that address. Local and-public-link Client modes use discovery without creating media-service listeners.+public-link App modes use discovery without creating media-service listeners.Set `SFU_UDP_PORT=7882` to enable automatic embedded SFU fallback. Its IPv4 bindaddress is `SFU_LISTEN_HOST`, default `0.0.0.0`; `SFU_PUBLIC_IP` optionally@@ -151,8 +151,8 @@ needed, is one explicitly authorized infrastructure and protocol transaction.The routine application wrapper cannot perform or recover it.1. Prepare and verify matching Web/Server signaling and native protocol v9- Client artifacts. Check active sessions and obtain the owner's acceptance of- share interruption before cutover; old pages and Clients must reload or+ App artifacts. Check active sessions and obtain the owner's acceptance of+ share interruption before cutover; old pages and Apps must reload orupdate together.2. Retain the exact prior release path, Piik unit and drop-ins, environment,nginx configuration, and external media-service units, configuration, secrets,@@ -183,7 +183,7 @@ The routine application wrapper cannot perform or recover it.and changed infrastructure configuration; reload systemd and validate nginx.Restore the previous external service states before starting the previousapplication with its matching unit, then prove health and media. Restore- matching pages and Clients as part of protocol rollback. A symlink-only+ matching pages and Apps as part of protocol rollback. A symlink-onlyrollback cannot recover this transaction.Retain the recovery material through the agreed acceptance window. This is adiff --git a/docs/product/media-quality.md b/docs/product/media-quality.mdindex ee89f05e..f3b95e93 100644--- a/docs/product/media-quality.md+++ b/docs/product/media-quality.md@@ -1,6 +1,6 @@# Capture, Audio, And Media Quality-This file owns the current Browser and Client media contract. Detailed measurements and+This file owns the current Browser and App media contract. Detailed measurements andplatform limits live in [realtime quality research](../research/realtime-quality-adaptation.md)and [screen-audio research](../research/browser-screen-audio-quality.md).[ADR-0007](../adr/0007-path-isolated-representation-quality.md) owns Browser@@ -13,7 +13,7 @@ production behavior and remaining acceptance.- The Web Host may share a display, application window, or Browser tab and maystop, synchronously pause/resume audio and video, or switch source.-- A Client-launched Host explicitly chooses either that Browser capture path or+- An App-launched Host explicitly chooses either that Browser capture path orone native screen/window enumerated by the packaged platform capture boundary. Thelatter uses one supported native codec path and never infers a target froma title. An ordinary Web Host does not probe localhost.@@ -36,7 +36,7 @@ production behavior and remaining acceptance.- Live quality changes update the current capture and Host sender-trackconstraints plus sender ceilings without reopening source selection orreplacing a healthy route.-- Native quality changes use the same room settings. The Client prepares a new+- Native quality changes use the same room settings. The App prepares a newplatform capture/encoder generation, then replaces the old generation behindthe same encoded source and PeerConnections; audio-only changes update thecurrent Opus encoder directly. A live profile update may remain pending while@@ -49,7 +49,7 @@ production behavior and remaining acceptance.estimation, forwarding allocation, pacing and recovery.Windows VP8 uses libvpx's realtime mode; it does not claim the same hardwarequality-versus-speed control or per-edge Browser adaptation.-- With Client available, Browser H.264 capture can use one local sender and the+- With App available, Browser H.264 capture can use one local sender and theexisting Native encoded fanout while topology optimization is enabled. TheBrowser still owns preview, pause, capture settings, and source selection.Loss of that optional ingress retains capture and rebuilds the assigneddiff --git a/docs/product/presentation-lifecycle.md b/docs/product/presentation-lifecycle.mdindex c38da241..14ae661e 100644--- a/docs/product/presentation-lifecycle.md+++ b/docs/product/presentation-lifecycle.md@@ -17,19 +17,19 @@ room identity, current state, roster, and one manual media-reconnect action.Controls and text must remain usable without overlap or horizontal overflow ondesktop and mobile viewports.-Piik Client opens this same application in the system Browser. Its small+Piik App opens this same application in the system Browser. Its smallstartup surface selects Local, temporary public invitation, or a configuredSite before entering the Host workspace. Viewer links opened at that activated-origin may use the same running Client without changing the Viewer UI. Starting a share offers the-Browser picker and any exact Client-owned native windows. It never chooses a+origin may use the same running App without changing the Viewer UI. Starting a share offers the+Browser picker and any exact App-owned native windows. It never chooses awindow automatically. A reproduced Browser-window, capture, or backgroundfailure is required before introducing an embedded Web runtime.-A remembered Client activation permits discovery when choosing a source or-receiving media; it does not make Client a prerequisite for sharing. Idle Host-pages hold no Client control session. Ordinary Web entry opens the Browser picker+A remembered App activation permits discovery when choosing a source or+receiving media; it does not make App a prerequisite for sharing. Idle Host+pages hold no App control session. Ordinary Web entry opens the Browser pickerdirectly. Activated origins offer the shared source selector, initially on its-Browser tab unless Client is already connected. Discovery never blocks Browser+Browser tab unless App is already connected. Discovery never blocks Browserselection or changes the chosen tab. Native tabs and refresh remain reachableafter absence or disconnection; pending attempts are shared, completed failuresdo not suppress later discovery. Cancelling the selector or ending a share@@ -60,7 +60,7 @@ display stand identifies the capture target. A server in a media path meansactual SFU relay, not merely opening a configured Site.Motion explains entry, transition, progress, and control feedback. Operational-status stays still; ambient motion is limited to the Client brand mark's+status stays still; ambient motion is limited to the App brand mark'soccasional idle wink.All meaning remains available with reduced motion. Functionalcontrols remain native buttons or inputs with localized accessible names, and@@ -155,7 +155,7 @@ ordinary connection details do not collect or expose that report.Current scope includes Web Host, Web Viewer, Browser relay, and optional NativeHost/Viewer media beneath those same pages. Desktop and mobile Browsers are-Viewer targets; mobile Web capture, reliable background relay, Client-owned SFU,+Viewer targets; mobile Web capture, reliable background relay, App-owned SFU,and physical non-Windows native acceptance remain later platform work.## Primary Referencesdiff --git a/docs/product/rooms-access.md b/docs/product/rooms-access.mdindex fecac34f..92e168b4 100644--- a/docs/product/rooms-access.md+++ b/docs/product/rooms-access.md@@ -85,12 +85,12 @@ code-only attempts and does not silently revoke invitations.file path; absent or empty uses `rooms.sqlite` in the working directory.- **Lightweight mode:** explicit `ROOM_DATABASE_PATH=:memory:` keeps room authorityin process memory and all rooms disappear on restart.-- **Client Local mode:** the packaged Client composes the same memory RoomStore+- **App Local mode:** the packaged App composes the same memory RoomStoreand ends every room when its local authority exits. It persists only its Sitechoice and optional Local site-access password, not rooms or media state. Ablank password leaves that local site open.-The Client opens its own localhost Host page with the configured password, when+The App opens its own localhost Host page with the configured password, whenpresent, in a fragment. The page removes the fragment and uses the existingSiteAccess endpoint; this does not create a fourth admission authority. LAN andone-link Internet Viewers use the same room-scoped invitation grant; itsdiff --git a/docs/product/routing-transport.md b/docs/product/routing-transport.mdindex 5ba1c1ef..9d0f92e9 100644--- a/docs/product/routing-transport.md+++ b/docs/product/routing-transport.md@@ -190,7 +190,7 @@ encrypted hop-by-hop with DTLS-SRTP but terminates at the SFU; the product doesnot claim operator-blind media without a separately accepted application E2EEdesign. All-UDP-blocked networks currently end in bounded failure.-Client Local mode runs this graph without SFU, NAT prediction, or default STUN.+App Local mode runs this graph without SFU, NAT prediction, or default STUN.One-link mode tunnels only HTTP/WebSocket control and adds public STUN to thesame Browser/Native P2P edges. Reachable peers form one mixed relay tree; anunreachable path adds no route type or score. Site mode uses Site transport.diff --git a/docs/project-memory.md b/docs/project-memory.mdindex c8c42867..82207e74 100644--- a/docs/project-memory.md+++ b/docs/project-memory.md@@ -5,9 +5,9 @@ Last updated: 2026-09-10Piik is private, low-latency game screen sharing for one Host and up to 20authenticated friends. The current product surface is Web Host, Web Viewer, andBrowser relay; desktop and mobile Browsers are Viewer targets. It is not a-public broadcast service. Hosted and Client run one shared Go core+public broadcast service. Hosted and App run one shared Go core([ADR-0012](./adr/0012-shared-go-backend-core.md)); Node and Vite build the-Browser UI and are not a runtime. Source includes a cross-platform Client that+Browser UI and are not a runtime. Source includes a cross-platform App thatruns that same core in a self-contained Local deployment or opens one configuredSite through the system Browser. Its single Go process presents Local, temporarypublic-link, and saved-Site choices on every launch, starts one process-level@@ -18,7 +18,7 @@ Browser and Native peers without changing participant, signaling, capacity, orroute identity. Local is LAN-first; explicit one-link mode exposes that sameauthority through a temporary public control tunnel while media remains P2P.Host authority belongs to a tab, with one separate persistent origin resume-hint. The Client admits two independent native control sessions under its one+hint. The App admits two independent native control sessions under its oneloopback service.The current source embeds Binding-only STUN and optional SFU forwarding in@@ -59,7 +59,7 @@ implementation and routine UI detail.invitations and independent `open | private` code entry. Room authority endsthrough explicit replacement/deletion, with separate invitation rotation orrevocation. Hosted defaults to SQLite, with explicit process-memory opt-out;- Client Local remains process-only. Site access has a separate 24-hour idle+ App Local remains process-only. Site access has a separate 24-hour idlecookie lifetime. Production persists SQLite room authority; liveparticipants, routes, and media remain process-only.- Media is automatic and distributed. Ordinary peers are STUN-only and prefer@@ -100,7 +100,7 @@ authenticated room WebSocket, without an external room service or media token.Committed first-frame readiness, bounded candidate-relative progress, durableroom authority and the H.264/VP8 sender gate remain. [Status](./status.md)indexes source and deployment evidence; protocol rollback requires-matching Browser and Client artifacts, not only an application symlink.+matching Browser and App artifacts, not only an application symlink.Current work is owned by the [TODO ledger](./todo.md). Open physical evidence isowned by [verification status](./verification-status.md). Environment and initialdiff --git a/docs/reference/configuration.md b/docs/reference/configuration.mdindex ef271429..2fc5dff0 100644--- a/docs/reference/configuration.md+++ b/docs/reference/configuration.md@@ -14,11 +14,11 @@ service secret store or an untracked access-restricted environment file.| `PUBLIC_BASE_URL` | Exact public HTTP(S) origin; production requires HTTPS. || `ALLOWED_ORIGINS` | Comma-separated exact HTTP(S) origins; wildcard is invalid. || `SITE_ACCESS_PASSWORD` | Production-required independent 8-128 visible-ASCII byte secret. |-| `ROOM_DATABASE_PATH` | Hosted defaults to `rooms.sqlite` in its working directory when unset or blank. An explicit absolute file path selects another SQLite file; `:memory:` opts into process-memory room authority. Client Local remains in memory. |+| `ROOM_DATABASE_PATH` | Hosted defaults to `rooms.sqlite` in its working directory when unset or blank. An explicit absolute file path selects another SQLite file; `:memory:` opts into process-memory room authority. App Local remains in memory. || `MAX_VIEWERS_PER_ROOM` | `1..20`, default `8`. || `ENDPOINT_MEDIA_COPY_CAPACITY` | Shared endpoint steady-copy cap `1..3`, default `2`. || `STUN_URLS` | Comma-separated advertised `stun:` discovery URLs; at least one is required in production. These are not local bind addresses and may use an unproxied DNS name separate from the Web origin. |-| `STUN_LISTEN_HOST` | Hosted IPv4 STUN bind address, default `0.0.0.0` when `STUN_URLS` is configured; independent of HTTP `LISTEN_HOST`. Local Client construction creates no STUN listeners. |+| `STUN_LISTEN_HOST` | Hosted IPv4 STUN bind address, default `0.0.0.0` when `STUN_URLS` is configured; independent of HTTP `LISTEN_HOST`. Local App construction creates no STUN listeners. || `NAT_PREDICTION_ENABLED` | Optional bounded NAT prediction capability, default `false`; requires an ordinary `STUN_URLS` endpoint on UDP 3478. Hosted startup binds UDP 3479/3480 before advertising the capability. Firewall reachability remains an operator requirement. |Automatic SFU fallback runs inside the Hosted process when `SFU_UDP_PORT` is set:@@ -31,7 +31,7 @@ Automatic SFU fallback runs inside the Hosted process when `SFU_UDP_PORT` is setSFU control uses the application's authenticated signaling connection. Noseparate control origin or infrastructure credentials are configured. Local and-public-link Client construction create no SFU listener. The relay does not+public-link App construction create no SFU listener. The relay does notprovide application E2EE.The SQLite parent directory must exist and be writable. The systemd template@@ -53,21 +53,21 @@ Diagnostics are local and opt-in. Enable them **before** reproducing the problem| Surface | Enable | Export || --- | --- | --- |-| Client | Start with `--debug` or `PIIK_DEBUG=client` | Press `D` in the terminal for a ZIP |+| App | Start with `--debug` or `PIIK_DEBUG=client` | Press `D` in the terminal for a ZIP || Browser Host/Viewer | Add `?debug=1` to the page URL, before any invitation fragment | Use the download button beside language/theme controls || Hosted Server | Start with `--debug`, `PIIK_DEBUG=server` or `PIIK_DEBUG=route` | On Unix, `kill -USR1 <pid>`; also exported at orderly shutdown |-Client/Server ZIP and Browser JSON reports are separate: when investigating-Browser/Client cooperation, include both from the same reproduction. Neither+App/Server ZIP and Browser JSON reports are separate: when investigating+Browser/App cooperation, include both from the same reproduction. Neitheraction stops an active share or uploads anything. Browser export also remainsavailable as `await window.__PIIK_DEBUG__.export()` in DevTools.-Client logs go to `logs` beside the executable, falling back to `Piik/logs`+App logs go to `logs` beside the executable, falling back to `Piik/logs`in the OS user-cache directory when that default is unwritable. The TUI showsthe actual path and the exported ZIP. `--log-dir` overrides`PIIK_LOG_DIR`; an explicit directory must be writable. Choosing a-directory alone does not enable collection. Non-interactive Clients export at-orderly shutdown. On Client, `PIIK_DEBUG=route` alone retains console route+directory alone does not enable collection. Non-interactive Apps export at+orderly shutdown. On App, `PIIK_DEBUG=route` alone retains console routetracing; use `--debug` for file collection and the `D` action.Hosted logs use `PIIK_LOG_DIR`, otherwise systemd `LOGS_DIRECTORY`,diff --git a/docs/reference/naming.md b/docs/reference/naming.mdnew file mode 100644index 00000000..70954722--- /dev/null+++ b/docs/reference/naming.md@@ -0,0 +1,58 @@+# Naming++This is the naming convention for new and changed Piik code, UI and packaging.+Use the brand for people and predictable lowercase identifiers for tools.++| Surface | Convention | Example |+| --- | --- | --- |+| Product and repository | `Piik` | `TNTcraftHIM/Piik` |+| Standalone application | `Piik App` | Window title, documentation, shortcuts |+| Hosted service in prose | `Piik Server` | Deployment instructions |+| Executables and command directories | Lowercase, hyphen-separated | `piik-app[.exe]`, `piik-server[.exe]`, `cmd/piik-app` |+| Native capture executable | Lowercase component name | `piik-capture[.exe]` |+| Download archives | Lowercase, target and revision suffix | `piik-app-windows-amd64-<revision>.tar.gz` |+| Package/build directory names | Lowercase and target suffix | `piik-app-windows-amd64` |+| macOS application bundle | Display name, standard extension | `Piik App.app` |+| Linux desktop entry | Lowercase file/Exec, display Name | `piik-app.desktop`, `Exec=piik-app`, `Name=Piik App` |+| Package and service identifiers | Lowercase | npm `piik`, systemd `piik.service`, `tv.piik.app` |+| Environment variables | Uppercase snake case | `PIIK_DEBUG`, `PIIK_LOG_DIR` |+| Go module path | Exact repository spelling | `github.com/TNTcraftHIM/Piik` |++An `.exe` is lowercase on Windows too; `.app` is a user-facing bundle, not the+raw executable. There is no universal OS rule requiring lowercase binaries:+this project chooses one spelling across platforms for predictable commands.+Archive contents and directory layout are owned by the existing packager; a+name change does not change that layout.+Keep platform/standard spellings such as `Info.plist`, `LICENSE`, `README.md`+and `REVISION`. Do not change third-party names or notices to fit this table.+Immutable measurement records keep the paths and hashes of their measured+revision; they are evidence rather than current command examples.++## Code ownership and vocabulary++- `internal/app` owns the standalone application and its native/launcher+ components; `cmd/piik-app` is its thin command entry.+- `internal/server` owns the reusable room service and Hosted runtime;+ `cmd/piik-server` is its command entry. The App runs that same service for+ Local/public-link rooms, without a second backend implementation.+- `src/client` is the Browser frontend. HTTP/WebSocket clients, signaling+ `clientId`, protocol clients and similar connection roles remain `client`.+- Follow each language's semantics: lowercase Go packages, exported `PascalCase`+ and unexported `camelCase`; existing TypeScript component/type conventions.+ Brand casing must not change visibility or create unnecessary name prefixes.++Renaming the standalone product is not a protocol or persistence change.+Keep `piik-client-v9`, the discovery service name, Browser activation/storage+keys, the `Piik` configuration directory and diagnostic categories at their+current exact contracts. Change such identifiers only with a separate behavior+or contract decision; do not add aliases or dual readers for display renames.++## Basis++Reviewed 2026-09-10. Desktop standards explicitly separate display names from+executable identifiers; lowercase executable names are our portability convention.++- [freedesktop desktop entries](https://specifications.freedesktop.org/desktop-entry/latest/recognized-keys.html): `Name`, `Exec`, `TryExec` and `Icon` are distinct fields.+- [Apple bundle keys](https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html): `CFBundleDisplayName` and `CFBundleExecutable` have different responsibilities.+- [Syncthing desktop entry](https://github.com/syncthing/syncthing/blob/main/etc/linux-desktop/syncthing-start.desktop): a mature cross-platform example of display branding and lowercase commands.+- [Effective Go naming](https://go.dev/doc/effective_go#names): package and identifier casing carries language conventions and visibility semantics.diff --git a/docs/research/advanced-peer-distribution.md b/docs/research/advanced-peer-distribution.mdindex b552b07b..f91757f5 100644--- a/docs/research/advanced-peer-distribution.md+++ b/docs/research/advanced-peer-distribution.md@@ -121,7 +121,7 @@ is isolated behind a small adapter.On 2026-09-08, an isolated installed Chrome 152 session demonstrated one Browserencoder feeding two PeerConnections through legacy `createEncodedStreams()`.The [manual probe](../../scripts/browser-encoded-fanout-probe.mjs) serves only a-synthetic 640x360 canvas over loopback HTTP; it uses neither Client nor SFU.+synthetic 640x360 canvas over loopback HTTP; it uses neither App nor SFU.No browser feature flags were added to permit encoded-frame forwarding.The secondary sender has a non-updating canvas track to establish its RTP path.@@ -247,7 +247,7 @@ It does not reject an independent local producer. The later[node-local producer/carrier experiments](./browser-local-encoding-pool.md)establish a working standard-transform prototype with separate findings andremaining quality/accounting obligations. Product media still uses normal-Browser senders and the verified optional Client fanout pending that acceptance.+Browser senders and the verified optional App fanout pending that acceptance.A relevant future input API is Chromium's experimental[`RTCEncodedSource` implementation](https://chromium-review.googlesource.com/c/chromium/src/+/8097283),diff --git a/docs/research/backend-audit-1b01048.md b/docs/research/backend-audit-1b01048.mdindex c27c6ee0..f8b3861f 100644--- a/docs/research/backend-audit-1b01048.md+++ b/docs/research/backend-audit-1b01048.md@@ -58,7 +58,7 @@ first restarts ICE, then rebuilds the connection if needed. Uncommitted candidatreturn failure to their route operation; the unreachable extra local restartbranch was removed. Neither kind of restart guarantees a new NAT mapping.-The Client launch marker remains origin activation, not proof that the process+The App launch marker remains origin activation, not proof that the processis alive. One failed discovery can mean contention or a permission delay, soautomatically deleting the marker would break the accepted saved-Site workflow.Browser capture remains available in the existing picker.diff --git a/docs/research/cross-platform-client-runtime.md b/docs/research/cross-platform-client-runtime.mdindex 7fe9e2e0..5490c122 100644--- a/docs/research/cross-platform-client-runtime.md+++ b/docs/research/cross-platform-client-runtime.md@@ -1,8 +1,8 @@-# Cross-Platform Client Runtime Research+# Cross-Platform App Runtime Research- Reviewed: 2026-09-04- Scope: loopback control and self-contained packaging boundary-- Status: Client and Local composition implemented; Windows native Host video+- Status: App and Local composition implemented; Windows native Host videoand a cross-NAT media gate proved## Reusable Evidence@@ -31,7 +31,7 @@ application data was copied or inspected.## Current Control Boundary-The Client binds IPv4 loopback on a bounded range (`39721`-`39730`). `/health`+The App binds IPv4 loopback on a bounded range (`39721`-`39730`). `/health`returns the protocol version, service identity, selected port, and an`instanceToken`. `/control` admits one WebSocket session whose subprotocolcontains that same value. The first frame must be `hello`; subsequent requests@@ -47,12 +47,12 @@ The current protocol advertises only the native capabilities andgeneration-fenced media commands that have consumers. It carries no roomcredentials or route policy; those stay in the Browser/server protocol.-## Client Composition+## App Composition-The Client and Hosted Piik run the same server core, so the local package is+The App and Hosted Piik run the same server core, so the local package isone executable carrying the built Browser assets plus the optional capture and-tunnel sidecars; [the Client README](../../cmd/piik-client/README.md) owns-that layout. In Local mode the Client runs the server in its own process with+tunnel sidecars; [the App README](../../cmd/piik-app/README.md) owns+that layout. In Local mode the App runs the server in its own process withexplicit local configuration. In Site mode it starts no server, and the systemBrowser opens the saved Site while the same process remains its loopbacknative-media owner. The system Browser remains the UI.@@ -72,7 +72,7 @@ its `loopback-network` permission; without that permission the cross-originrequest was blocked. The gate checks both expected outcomes.A self-contained LAN room uses a localhost Host URL and a selected LAN IPv4-Viewer URL backed by the same local Client process. The Client persists an+Viewer URL backed by the same local App process. The App persists anoptional user-chosen access password and passes it only to its Host page in aconsumed fragment; a blank value leaves the Local site open. Explicit `--link`mode launches the packaged Cloudflare Quick@@ -85,9 +85,9 @@ public STUN and remains P2P-only.## UI Runtime Boundary-The current Client opens the system Browser rather than embedding another Web+The current App opens the system Browser rather than embedding another Webruntime. A lightweight launcher chooses the authority mode, then navigates to-the same Host page, where a Client-launched Host can select an exact native+the same Host page, where an App-launched Host can select an exact nativewindow. This keeps the existing UI, Site cookies, WebRTC behavior, Browserupdates, and permission model intact. Syncthing and Sunshine establish this as apractical native-process plus Browser-UI deployment shape.@@ -96,7 +96,7 @@ An embedded shell remains a decision gate rather than a rejected category.Current WebView2 exposes `getDisplayMedia` screen-capture events and itsEvergreen runtime updates independently; WebKitGTK exposes display capture anduses GStreamer for WebRTC. Electron instead bundles one Chromium and Node but-makes the Client responsible for shipping those updates and adds substantial+makes the App responsible for shipping those updates and adds substantialpackage size. These facts do not prove equivalent Piik media behavior.Only a reproduced Browser-launch failure should open a comparative physical@@ -110,40 +110,40 @@ result selects one UI runtime; it does not create parallel products.The runs below are pre-port evidence: they exercised the package that bundled aNode runtime and an extracted application tree. Their capture, discovery, media,and network results still apply; every package composition, startup, and-shutdown claim must be re-verified on the single-binary Client before that build+shutdown claim must be re-verified on the single-binary App before that buildis accepted.On Windows with Chrome for Testing 151.0.7922.138:-- the Local Client started its built static application and reached `/healthz`;+- the Local App started its built static application and reached `/healthz`;- the Host fragment was removed, existing SiteAccess became authenticated, andthe ordinary Host page loaded;- the room API generated an invitation from the selected LAN origin;- one synthetic Host and three Viewers formed a P2P-only tree with one relay,every Viewer advanced decoded frames, and no SFU publication appeared; and-- Enter-driven Client shutdown released the Browser, Client, Node, loopback and+- Enter-driven App shutdown released the Browser, App, Node, loopback andapplication ports, and disposable profile.-- the immutable App release was assembled with Node 24.19.0 and the Go Client+- the immutable App release was assembled with Node 24.19.0 and the Go Appfrom the same full revision; that packaged directory passed the Local and Sitegates, while a deliberately mismatched `app/REVISION` was rejected before alistener started.- the explicit target assembler produced Windows amd64, Linux amd64, and macOSarm64 outputs from one clean revision. The Linux package ran its bundled NodeLocal authority on Ubuntu, and its full package exposed and then closed a- public link reachable from another network. The macOS Client and Node inputs+ public link reachable from another network. The macOS App and Node inputsare both Mach-O arm64; execution there remains unproved.- the native Host path created a Local room and a remote Pion Viewer received30 packets over a selected `srflx`-to-`srflx` pair; the reverse SSH link inthat gate carried signaling only.-- a Windows Client created an accountless Quick Tunnel, generated its ordinary+- a Windows App created an accountless Quick Tunnel, generated its ordinaryinvitation on that origin, and served the Viewer page plus `/signal` WebSocketupgrade to an independent Linux host; a native Host then repeatedly delivered30+ H.264 RTP packets to a Linux Pion Viewer over selected direct paths using- a reflexive candidate. Stopping the Client closed the URL.+ a reflexive candidate. Stopping the App closed the URL.The one-link gate used the official Windows amd64 `cloudflared` 2026.8.3 assetwith SHA-256 `83e726ed18ea78c5ad5213c4c3a3a27051393950d2bc8ed4de69bec12d14eaae`.-The sidecar remains an explicit package input rather than a linked Client+The sidecar remains an explicit package input rather than a linked Appdependency.The peer topology gate now treats native `getStats()` RTP identity and framediff --git a/docs/research/nat-traversal.md b/docs/research/nat-traversal.mdindex b3cfd3ee..070a22a2 100644--- a/docs/research/nat-traversal.md+++ b/docs/research/nat-traversal.md@@ -57,7 +57,7 @@ supports an opt-in mechanism, not a default or a participant-wide classifier.## Current DecisionAn ordinary STUN endpoint remains the discovery service. A Site may enable-same-host STUN-only listeners on 3479 and 3480. Public-link Client mode supplies+same-host STUN-only listeners on 3479 and 3480. Public-link App mode suppliesone ordinary public endpoint plus two public survey destinations; pure LAN modesupplies none. Available authorities expose the same per-share Host switch,which defaults on and remains locked while sharing.diff --git a/docs/research/native-client-lifecycle.md b/docs/research/native-client-lifecycle.mdindex 5e58dfab..bac8b855 100644--- a/docs/research/native-client-lifecycle.md+++ b/docs/research/native-client-lifecycle.md@@ -1,9 +1,9 @@-# Native Client Lifecycle+# Native App Lifecycle- Reviewed: 2026-09-09- Scope: Windows capture idle semantics, native loopback input isolation, and- Browser visibility of an unexpected Client disconnect.-- Status: quiet-source, preview-queue and Client-crash checks pass. The owner+ Browser visibility of an unexpected App disconnect.+- Status: quiet-source, preview-queue and App-crash checks pass. The ownerconfirmed Windows 10 monitor sharing resolved; game-specific window replacementis not established by the quiet-source checks.@@ -18,7 +18,7 @@ virtual-time reproduction with three three-second previews made the real`NativeClient.startShare()` time out at eight seconds, before its handler ranat nine seconds. The picker now sends one preview at a time, cancels unsentwork when its source view is retired, and waits for the remaining preview before-starting native media. Refresh and Client replacement fence old results.+starting native media. Refresh and App replacement fence old results.## Scope Decisions@@ -53,7 +53,7 @@ runtime change for either is claimed here.exited cleanly. This validates the quiet-source and retained-frame path on thecurrent Windows host; it does not claim a cross-version Windows matrix.- The same day, the local Native Host gate started a real Host/Viewer share,- terminated the Client process, and observed the Host return to its start-share+ terminated the App process, and observed the Host return to its start-sharecontrol within the bounded gate. Browser, capture, server, ports, and profilecleanup all passed.- On 2026-09-05, a Windows 11 build 26200 display-source check produced 91@@ -208,7 +208,7 @@ extension forcibly disabled **Broadcast IP for Best WebRTC Performance**;correcting the setting/extension restored Native sharing. The confirmed causeis that extension's WebRTC policy, not unsupported Windows capture. VPNextensions may reapply the override; the-[Chromium WebRTC FAQ](../../cmd/piik-client/README.md#chromium-webrtc-connections)+[Chromium WebRTC FAQ](../../cmd/piik-app/README.md#chromium-webrtc-connections)owns the user steps. This does not authorize a Browser-specific transport fallback.An isolated Chrome 152.0.7977.82 data-channel A/B verifies the policy@@ -236,9 +236,9 @@ and [independent panel fitting/MPO](https://learn.microsoft.com/en-us/windows/wi- A malformed/stale ICE candidate or repeated per-edge answer does not close thecontrol session or terminate sibling edges; a real edge lifecycle failureremains observable.-- Killing the Client causes the active Host owner to leave the native share+- Killing the App causes the active Host owner to leave the native sharepath promptly, while ordinary user-initiated cleanup does not recurse.-- `npm run check` and the relevant Client checks pass; no credentials or raw+- `npm run check` and the relevant App checks pass; no credentials or rawmedia identifiers enter logs or documentation.Cross-version capture and browser matrices remain separate acceptance work. Theydiff --git a/docs/research/native-client-media.md b/docs/research/native-client-media.mdindex 37166de1..01aa2fa4 100644--- a/docs/research/native-client-media.md+++ b/docs/research/native-client-media.md@@ -1,4 +1,4 @@-# Native Client Media Evidence+# Native App Media Evidence- Reviewed: 2026-09-05- Scope: platform capture, one shared H.264/Opus source, Pion transport, Browser@@ -8,19 +8,19 @@## Result-Piik Client can own one process-isolated Windows capture and hardware H.264+Piik App can own one process-isolated Windows capture and hardware H.264encoder, feed its Annex-B access units into one Pion source, and deliver thatsource through independent WebRTC transports to unmodified Chrome receivers.The Browser remains the room, route, and signaling authority.-The same Client can run the Local authority, open the normal Host page, and+The same App can run the Local authority, open the normal Host page, andattach that native source to the current route. A remote Pion Viewer thenreceived 30 packets over a selected `srflx`-to-`srflx` pair. The validationsession carried signaling through a temporary reverse SSH path only; media wasnegotiated directly by ICE.On 2026-09-05, a separate Windows Local gate used a Browser Host with synthetic-1280x720 motion and a Client-activated Viewer. The Viewer exclusively claimed+1280x720 motion and an App-activated Viewer. The Viewer exclusively claimedthe v8 loopback control session and real Chrome decoded 621 frames at 1280x720.This proves the Browser-to-Native receive/local-bridge path rather than a silentBrowser fallback. A Pion integration gate separately forwards the same H.264@@ -37,14 +37,14 @@ An isolated LiveKit 1.13.6 gate carried the same native source through onereserved local Pion edge into the existing Browser `SfuPublisher`; an ordinaryLiveKit Viewer received the default 1080p source, then 15 consecutive 854x480frames after one live Native/SFU profile change. The direct native P2P path,-Browser, Client, LiveKit process, ports, and profiles all cleaned up.+Browser, App, LiveKit process, ports, and profiles all cleaned up.The opt-in `gate:client-media` run proved, in order:- WGC capture and adapter-bound Media Foundation H.264 became active;- 30+ encoded 1280x720 frames crossed the bounded process protocol;- a PLI caused a later recovery unit;-- the packaged Client exposed only separately probed video, process-audio,+- the packaged App exposed only separately probed video, process-audio,system-audio, and hardware-H.264 capability booleans before control connected;- two Pion ICE/DTLS/SRTP edges each delivered 30+ decoded 1280x720 framesto Chrome from that one encoded source;@@ -56,7 +56,7 @@ The opt-in `gate:client-media` run proved, in order:- closing the captured source ended its share, released the old media path, anda second capture generation in the same room delivered a different mediaobject plus 30 new frames to the existing Viewer;-- Client, capture, Browser, ports, and the isolated profile all closed.+- App, capture, Browser, ports, and the isolated profile all closed.Unit coverage separately enforces the supplied edge capacity, forwards PLI/FIRto the shared video source, validates the same PeerConnection's Opus section,@@ -70,7 +70,7 @@ The audio adapter uses `github.com/thesyncim/gopus` behind the private`nativeaudio` boundary. It accepts fixed 48 kHz stereo PCM16/20 ms frames,encodes into a caller-owned Opus buffer, and can be replaced without changingthe media edge or control wire. The dependency is BSD-3-Clause licensed and-requires Go 1.25; Client CI uses Go 1.26.6.+requires Go 1.25; App CI uses Go 1.26.6.## Current Boundary@@ -90,7 +90,7 @@ and resumes both Viewers. It proves the same Pion source survives two hardwarecapture/encoder generations; direct capture probes also produced every currentresolution/FPS extreme, and the same route survives an explicit native sourceswitch. The result does not yet prove macOS/Linux physical capture or endurance.-Native Host media is exposed only through an explicit Client-launched Host+Native Host media is exposed only through an explicit App-launched Hostselection; an ordinary Web Host retains Browser capture.Native code does not publish directly to LiveKit. One local Pion edge gives the@@ -133,7 +133,7 @@ Native shares use the same Pion UDP socket for all edges. Site and one-linkshares make one bounded, best-effort PCP, UPnP, or NAT-PMP mapping throughNetBird's standalone Go NAT package; pure LAN Local mode does not. A physicalrouter created and removed an ephemeral UPnP mapping; the Apache-2.0 dependency-added about 0.38 MiB to the stripped Windows Client. Mapping begins+added about 0.38 MiB to the stripped Windows App. Mapping beginswith the share, is awaited before the first PeerConnection, refreshes only whena later edge arrives after half the requested lease, and is removed with theengine. Failure is cached for that share and leaves ordinary ICE/STUN unchanged.@@ -171,7 +171,7 @@ Discarding padding kept the reader alive but introduced downstream sequencegaps, NACKs and reduced decoded cadence. Forwarding valid padding through Pion'sexisting `WriteRTP`, while excluding it from media-frame counts, restored two1080p Viewers to about 30 fps with zero packet loss. The same gate passed live-quality, pause/resume, audio-presence source changes and Client-exit fallback.+quality, pause/resume, audio-presence source changes and App-exit fallback.Native payload-capacity evidence does not require decoded dimensions; encodedreceivers can supply real transport evidence without opening a decoder.diff --git a/docs/research/node-local-adaptation.md b/docs/research/node-local-adaptation.mdindex 1e345309..1dd5c7ea 100644--- a/docs/research/node-local-adaptation.md+++ b/docs/research/node-local-adaptation.md@@ -19,7 +19,7 @@ alongside an identical `high` encoding.- Self-contained Piik Server: library-level STUN/media components inside theexecutable, not bundled external service processes or an automatic installer.- Adaptive reuse: local derivation, shared lower outputs, independent child- delivery and quality recovery, usable by Native Client and the server.+ delivery and quality recovery, usable by Native App and the server.These share media-source and lifetime concepts but need separate acceptance.A forwarding-only SFU library does not provide the second workstream by itself;diff --git a/docs/research/node-local-encoding-probe.md b/docs/research/node-local-encoding-probe.mdindex 3db8ca42..67beece1 100644--- a/docs/research/node-local-encoding-probe.md+++ b/docs/research/node-local-encoding-probe.md@@ -102,7 +102,7 @@ healthy forwarding relay would violate the one-encode reuse objective.## Reproduction-Use the existing pinned libvpx build produced by the Windows Client build. From+Use the existing pinned libvpx build produced by the Windows App build. Froma Visual Studio x64 developer shell, with `VPX_INCLUDE` and `VPX_LIBRARY` pointingto that build:diff --git a/docs/research/node-local-media-design.md b/docs/research/node-local-media-design.mdindex 2253ca1b..03a8d117 100644--- a/docs/research/node-local-media-design.md+++ b/docs/research/node-local-media-design.md@@ -138,7 +138,7 @@ an explicitly controlled input-frame boundary is required. In particular,inLive remains an embedded forwarding candidate, not the answer to derivationor a proved adaptation replacement. Its inspected layer sender is coupled to-Client, track, bitrate-controller and packet-map owners; don't copy it as an+App, track, bitrate-controller and packet-map owners; don't copy it as anindependent universal selector. No new dependency or upstream implementationsource was copied in this design pass. Preserve upstream licenses/notices whenan actual module is chosen; Piik's MIT does not replace them.@@ -332,7 +332,7 @@ wrap without another timer or packet queue.### Native Feedback Probe-The explicit [GCC/TWCC probe](../../internal/client/mediaedge/testdata/gcc_feedback_probe.go)+The explicit [GCC/TWCC probe](../../internal/app/mediaedge/testdata/gcc_feedback_probe.go)and [recorded traces](./data/node-local-feedback.json)use the pinned Pion interceptor v0.1.47, with its thresholds unchanged. Two40-second memory-transport traces use a 6 Mbps -> 500 kbps -> 6 Mbps link,@@ -363,8 +363,8 @@ or three on 3478/3479/3480 when prediction is enabled. `STUN_LISTEN_HOST`defaults to `0.0.0.0` and is separate from HTTP binding. Existing `STUN_URLS`remain advertised discovery addresses: their DNS may intentionally differfrom the Web origin, so they must not be resolved as local bind addresses.-The Local Client constructor supplies no listeners; using public discovery-does not turn a Client into a public STUN service.+The Local App constructor supplies no listeners; using public discovery+does not turn an App into a public STUN service.The application binds HTTP and every required UDP listener before opening theroom database or accepting signaling. Failed startup returns all sockets;diff --git a/docs/research/piik-rename-plan.md b/docs/research/piik-rename-plan.mdindex ee5dba79..243eada7 100644--- a/docs/research/piik-rename-plan.md+++ b/docs/research/piik-rename-plan.md@@ -7,7 +7,7 @@ Last reviewed: 2026-09-10.Display `Piik`; use `piik` for executable, package, environment and serviceidentifiers. GitHub is `TNTcraftHIM/Piik`; the Go module follows that exact case.-The native macOS bundle identifier is `tv.piik.client`.+The [naming convention](../reference/naming.md) owns current App display and package names.The product keeps its TV mascot. The wordmark and morph animation remain in the[brand study](../design/piik-brand.html) for the future public website.@@ -39,8 +39,8 @@ their corresponding path rules to be reviewed before network acceptance.`piik-v23` and `piik-client-v9` are new exact protocol labels. Their messageschemas retain versions 23 and 9; the full label, not only its numeric suffix,-is checked. Native capture remains v7. Release Web, Server, Client and capture-artifacts together; old pages and installed Clients cannot interoperate across+is checked. Native capture remains v7. Release Web, Server, App and capture+artifacts together; old pages and installed Apps cannot interoperate acrossthe renamed control boundary. No alternate protocol reader is introduced.SQLite schema 2, its application ID, room codes, token/grant digests and password@@ -50,12 +50,12 @@ stopped, verify integrity and retained columns, and preserve the original forrollback. Do not recreate rooms or repeat the earlier schema-1 cutover.The implementation renames Browser storage prefixes, the site-access cookie-and the Client configuration/cache directory. The owner accepts a clean break:+and the App configuration/cache directory. The owner accepts a clean break:copy directly compatible, accessible settings once during cutover; discardunavailable or incompatible settings. The product reads only Piik names, withno migration code, alternate reader or old-name alias.-The local Client configuration is unchanged JSON version 1 and can be copied+The local App configuration is unchanged JSON version 1 and can be copiedbyte-for-byte into the Piik directory without replacing an existing new config.Browser credentials and settings are origin/session-owned. Transfer them onlythrough an available original Browser session; do not modify a live Browser's@@ -63,7 +63,7 @@ storage database or introduce a product bridge to recover them. Otherwise thenew namespace starts empty, requiring login, room creation and preference setup.Old room authority remains in SQLite, but an unavailable Host credential cannotbe reconstructed from its stored digest. Site-access cookies and remembered-Client activation are renewed normally under the new contract.+App activation are renewed normally under the new contract.## Git history@@ -105,7 +105,7 @@ inputs, not as runtime aliases:| Environment file | `/etc/screener/screener.env` | `/etc/piik/piik.env` || Branded environment prefix | `SCREENER_` | `PIIK_` || Browser storage prefix | `screener:` | `piik:` |-| Client config directory | `Screener` | `Piik` |+| App config directory | `Screener` | `Piik` |Prepare the new immutable artifacts, service/environment/proxy configuration,permissions and database path before stopping the old service. Record original@@ -127,7 +127,7 @@ records describe earlier operations and are not rewritten as new releases.## Validation and referencesAcceptance covers the tracked-name inventory, Web type/build checks, relevant-contract/storage tests, native compilation, Client/Server packaging and a+contract/storage tests, native compilation, App/Server packaging and acontrolled local launch. Production release additionally requires the acceptedbest-effort settings transfer, configuration/database recovery and postflight.diff --git a/docs/research/server-consolidation.md b/docs/research/server-consolidation.mdindex 42917d89..a543c158 100644--- a/docs/research/server-consolidation.md+++ b/docs/research/server-consolidation.md@@ -3,11 +3,11 @@- Reviewed: 2026-09-06- Status: implemented in the candidate; the acceptance list below is theremaining boundary-- Scope: one shared Go backend for Hosted and self-contained Client operation+- Scope: one shared Go backend for Hosted and self-contained App operation## Current Ownership-`cmd/piik-server` (Hosted) and `cmd/piik-client` (Client) compose the+`cmd/piik-server` (Hosted) and `cmd/piik-app` (App) compose thesame application from `internal/server` and own only their defaults,reachability, and lifecycle policy. Within that scope `protocol` owns wire types,strict decoding, and shared scalars; `config` owns environment validation plus@@ -16,7 +16,7 @@ the SQLite database; `route` decides graph transitions without I/O; `signal`executes signaling and SFU effects under one lock; `sfu` owns admission, LiveKitroom control, and token issue; `app` owns HTTP composition, site access, staticassets, and lifecycle; and `webassets` carries the embedded Browser bundle.-`internal/client` keeps the native, launcher, and platform boundaries and+`internal/app` keeps the native, launcher, and platform boundaries andsupervises no server process. These are useful boundaries, not duplication toremove.@@ -47,9 +47,9 @@ share one route authority and LiveKit remains an optional fallback of that graph```textone Go modulecmd/piik-server -> shared server application-cmd/piik-client -> shared server application + launcher + native media+cmd/piik-app -> shared server application + launcher + native mediainternal/server -> rooms, routing, HTTP/signaling, persistence, SFU adapters-internal/client -> current native and platform boundaries+internal/app -> current native and platform boundariesone React/Vite static artifact -> embedded in both binaries```@@ -69,7 +69,7 @@ unrelated locks around each map.- Standard [`net/http`](https://pkg.go.dev/net/http) and[`embed`](https://pkg.go.dev/embed) serve HTTP and the built assets.-- Signaling reuses the Client's+- Signaling reuses the App's[`coder/websocket`](https://pkg.go.dev/github.com/coder/websocket).- LiveKit room control and tokens use the standard library only: HS256 JWTs andTwirp JSON requests. The official@@ -90,7 +90,7 @@ rollback, including stale asynchronous completions. Preserve short-lived SFUauthority and release resources only after physical drain confirmation.Use the same Browser contract scenarios against Hosted and Local, plus one-physical mixed Browser/Client media flow. Package size, startup and idle memory+physical mixed Browser/App media flow. Package size, startup and idle memoryare measured below. Keep one strict wire contract and one schema owner;avoid hand-maintained parallel TypeScript/Go validation rules. The Node server,bundled runtime, supervisor and old packaging paths retire in this same accepted@@ -119,8 +119,8 @@ The before total is the Node runtime (91,694,408 B), the productionand `dist/server` (856,898 B). The after total is the linux/amd64`piik-server` built with `-s -w` and embedded assets (13,983,906 B) plus itsnotices and `REVISION`. For reference, the windows/amd64 binaries are-14,276,608 B (`piik-server`) and 22,703,104 B (`piik-client`, which also-carries Pion and the terminal UI); the Client package additionally drops the+14,276,608 B (`piik-server`) and 22,703,104 B (`piik-app`, which also+carries Pion and the terminal UI); the App package additionally drops theNode runtime and dependency tree it used to ship beside its Go executable.The first two starts of a freshly built binary took 469 ms and 336 ms, which isdiff --git a/docs/research/webrtc-encoder-pool.md b/docs/research/webrtc-encoder-pool.mdindex bb042a08..7c7888aa 100644--- a/docs/research/webrtc-encoder-pool.md+++ b/docs/research/webrtc-encoder-pool.md@@ -402,7 +402,7 @@ bitstream validation, not a claim that both actual consumers received 180.[Structured results](./data/webrtc-h264-pipeline.json) retain that narrow scope.These initial checks do not establish independent weak-child adaptation,-overload, actual capture throughput, transport overhead or Client integration.+overload, actual capture throughput, transport overhead or App integration.The concrete product attachment is `OutputWorker::Run`, shared by WGC andencoded-input derivation. Its fixed-size/FPS/direct-rate block can become a@@ -499,7 +499,7 @@ budgets. All three platform producers implement that contract. Windows buildsand normal tests pass; Linux production compilation and CPU-only GStreamerslot retirement checks pass. The macOS change is source-reviewed, not SDK orphysical acceptance. No Browser/server signaling change is needed for private-encoder grouping; matched Client and capture artifacts are required.+encoder grouping; matched App and capture artifacts are required.Actual VP8 relay checks exercise two equal 300 kbps consumers sharing onederived output, splitting to 80/300 kbps and rejoining at 300/300 kbps. Both@@ -602,10 +602,10 @@ CPU controller.| LiveKit forwarding/BWE/projection and Pion transport | Keep for existing encoded forwarding. Replace a Native endpoint owner only if the new library actually assumes that responsibility; never run two controllers on one edge. || Native output construction, `Source.BeginFrame`, codec workers | Review together against the replacement's capabilities. Remove superseded activation, rate and switching policy in the same integration, not through a permanent legacy path. || Native profile handoff, source clock, bounded queues and retirement | Preserve their verified behavior even if their implementation moves. Do not lose the profile-install acknowledgement or reintroduce double FPS limiting. |-| Client sessions, Global Link, UI, diagnostics and packaging | Outside an encoder-policy replacement. Preserve the separately useful fixes/enhancements recorded in TODO and Git. |+| App sessions, Global Link, UI, diagnostics and packaging | Outside an encoder-policy replacement. Preserve the separately useful fixes/enhancements recorded in TODO and Git. |An engine migration must also retain direct Native SFU publication, independent-Native room sessions, native ICE improvements and mixed Browser/Client relay.+Native room sessions, native ICE improvements and mixed Browser/App relay.Changing transport libraries does not automatically preserve these APIs. Nounrelated page rewrite or platform-adapter deletion is justified by this review.diff --git a/docs/status.md b/docs/status.mdindex 7c6cc568..0dde926d 100644--- a/docs/status.md+++ b/docs/status.md@@ -9,13 +9,13 @@ and Git/PRs own completed history.## Accepted Release Contract- Browser/server v23, Native control v9 and capture v7 form one private contract.- The release requires matching Web/Client/Server artifacts and a reload of old+ The release requires matching Web/App/Server artifacts and a reload of oldactive pages at cutover.- Hosted Server defaults to SQLite schema 2. Room authority has no inactivityexpiry; explicit replacement/deletion or grant rotation/revocation ends the- corresponding authority. Explicit memory mode and Client Local end rooms at+ corresponding authority. Explicit memory mode and App Local end rooms atprocess exit. Site access retains its separate 24-hour idle lifetime.-- Browser/Client entry lifecycle and current-edge reconnect ownership repairs+- Browser/App entry lifecycle and current-edge reconnect ownership repairsare implemented. Browser node-local pooling and detailed local Debug exportremain part of the accepted media surface. Product modules own their behavior;[configuration](./reference/configuration.md#diagnostics) owns Debug activation,@@ -57,7 +57,7 @@ The public website is a later phase.confirmed Windows 10 whole-display capture resolved. Specific new game/devicefailures should be reopened from new evidence.- Native Host publication through embedded SFU retains video/audio; Browser to- Client fanout and Client-exit fallback have bounded physical checks. Two+ App fanout and App-exit fallback have bounded physical checks. Twoindependent Native sessions have simultaneous media/retirement evidence.- The Linux runtime container has non-root/read-only, memory/SQLite, diagnosticexport, STUN and listener-lifecycle evidence. This does not establish every@@ -74,5 +74,5 @@ The public website is a later phase.- Slow adaptation recovery, the extreme CPU-overload sampling limit and missingbroad device/network/endurance results remain explicit in[encoder research](./research/webrtc-encoder-pool.md) and verification status.- macOS/Linux physical capture is deferred by the owner; Windows Client and+ macOS/Linux physical capture is deferred by the owner; Windows App andBrowser are this phase's primary targets.diff --git a/docs/todo.md b/docs/todo.mdindex 77ada5e7..f11b4463 100644--- a/docs/todo.md+++ b/docs/todo.md@@ -7,15 +7,36 @@ and Git/PRs own completed history. A parked idea is not implementation authority## Now-No further product implementation is queued for the accepted Piik rename.-Its coordinated Web/Client/Server and Git-history cutover follows the-[rename plan](./research/piik-rename-plan.md); the immutable release descriptor-and deployment record own rollout identity. Preserve the original repository-backup and external-audit worktree. Website work starts on owner direction.+After the accepted App naming release, draft the English/Chinese README,+onboarding and GitHub Pages website as one coherent public introduction.+Use the [naming convention](./reference/naming.md), the existing mascot and+the accepted website-only brand animation. Preview locally before publication;+keep private deployment details out of the public site. Preserve the rename+recovery archive and external-audit worktree. Release metadata owns deployed identity.## Next — Awaiting Owner DirectionThe owner owns **piik.tv**.+Review deployment feature switches, starting with an explicit P2P-only mode:+the operator must be able to disable SFU in configuration while retaining STUN,+room authority/signaling and P2P viewing. Current `SFU_UDP_PORT` already controls+SFU availability; inspect that contract and the forced-private-mode UI before+adding a second boolean with potentially conflicting meaning. Review which+other options belong to deployment configuration, runtime parameters or fixed+implementation constants. Keep this separate from public-facing documentation drafting.++The owner proposes GitHub Pages for the public website and the dedicated US+test server for a separate P2P-only demonstration site. Plan this after naming+and configuration review; no public demo is deployed yet. The existing private+production site remains private. P2P-only has no SFU fallback when direct/peer+paths cannot connect; the demonstration must describe that actual capability.++Redesign the README, onboarding guides and Wiki/documentation navigation as one+coherent release-preparation task. The owner is dissatisfied with the current+structure; do not keep polishing it piecemeal. Until then, change only necessary+names, runnable commands and links. Keep the new public entry brief, visual and+easy to follow, with deeper technical detail in developer guides.+Design the GitHub Pages website around the accepted brand study. Keep onecurrent internal contract; third-party names/notices remain accurate. DNS/Pagesand public publication are separate from the repository rename. The private@@ -28,8 +49,8 @@ The primary goal is lower total complexity, not perfect performance: small gainsdo not justify permanent mechanisms or larger maintenance cost. Preserve viewingquality and product behavior; fewer lines alone do not justify a rewrite.-Use the Client discovery and settings-ownership findings as leads for a-repository-wide lifecycle audit across Web UI, shared Go server, Client and+Use the App discovery and settings-ownership findings as leads for a+repository-wide lifecycle audit across Web UI, shared Go server, App andmedia adapters. This is future work, not an expansion of the current entry fix.Look for these recurring patterns:diff --git a/docs/verification-status.md b/docs/verification-status.mdindex f4d34b52..7a009215 100644--- a/docs/verification-status.md+++ b/docs/verification-status.md@@ -9,10 +9,10 @@ implementation and obsolete package history.## Current Evidence-Windows Client and Browser are the owner's primary acceptance targets. Current+Windows App and Browser are the owner's primary acceptance targets. CurrentGo packages embed their Web assets and do not run a Node backend. The currentcontract is Browser/server v22, Native control v9 and capture v7; pre-port-Client/Node package checks do not prove this package.+App/Node package checks do not prove this package.Bounded current checks cover:@@ -21,7 +21,7 @@ Bounded current checks cover:- Windows live/paused/quiet-source settings, source replacement and subsequentsharing, including media-object continuity where required;- Native H264 SFU video and decoded Opus through a profile change and closure;-- Browser-to-Client fanout and Client-exit fallback;+- Browser-to-App fanout and App-exit fallback;- concurrent Native sessions with independent media and retirement;- complete large encoded access-unit transport and bounded queue/cache behavior;- Linux container startup as non-root with a read-only filesystem, memory/SQLitediff --git a/internal/client/clientapp/app.go b/internal/app/app.gosimilarity index 79%rename from internal/client/clientapp/app.gorename to internal/app/app.goindex 99517472..fc4ac3b3 100644--- a/internal/client/clientapp/app.go+++ b/internal/app/app.go@@ -1,4 +1,4 @@-package clientapp+package appimport ("context"@@ -16,14 +16,14 @@ import ("syscall""time"- "github.com/TNTcraftHIM/Piik/internal/client/browser"- "github.com/TNTcraftHIM/Piik/internal/client/clientconfig"- "github.com/TNTcraftHIM/Piik/internal/client/lan"- "github.com/TNTcraftHIM/Piik/internal/client/launcher"- "github.com/TNTcraftHIM/Piik/internal/client/loopback"- "github.com/TNTcraftHIM/Piik/internal/client/nativecapture"- "github.com/TNTcraftHIM/Piik/internal/client/nativecontrol"- "github.com/TNTcraftHIM/Piik/internal/client/publictunnel"+ "github.com/TNTcraftHIM/Piik/internal/app/browser"+ appconfig "github.com/TNTcraftHIM/Piik/internal/app/config"+ "github.com/TNTcraftHIM/Piik/internal/app/lan"+ "github.com/TNTcraftHIM/Piik/internal/app/launcher"+ "github.com/TNTcraftHIM/Piik/internal/app/loopback"+ "github.com/TNTcraftHIM/Piik/internal/app/nativecapture"+ "github.com/TNTcraftHIM/Piik/internal/app/nativecontrol"+ "github.com/TNTcraftHIM/Piik/internal/app/publictunnel""github.com/TNTcraftHIM/Piik/internal/diagnostics"serverapp "github.com/TNTcraftHIM/Piik/internal/server/app"serverconfig "github.com/TNTcraftHIM/Piik/internal/server/config"@@ -57,14 +57,14 @@ type Options struct {CaptureProcess stringTunnelProcess stringReady func(string)- console *clientConsole+ console *consolelogger *slog.Logger}func Run(ctx context.Context, options Options) (returnedErr error) {ctx, cancel := context.WithCancel(ctx)- options.Debug = options.Debug || clientDebugEnabled(os.Getenv("PIIK_DEBUG"))- options.console = newClientConsole(cancel, options.DisableBrowser)+ options.Debug = options.Debug || debugEnabled(os.Getenv("PIIK_DEBUG"))+ options.console = newConsole(cancel, options.DisableBrowser)var recorder *diagnostics.Recordervar restoreLogger func()defer func() {@@ -83,9 +83,9 @@ func Run(ctx context.Context, options Options) (returnedErr error) {}()if options.Debug {var err error- recorder, err = openClientDiagnostics(options.LogDir)+ recorder, err = openDiagnostics(options.LogDir)if err != nil {- return fmt.Errorf("Piik Client diagnostics are unavailable: %w", err)+ return fmt.Errorf("Piik App diagnostics are unavailable: %w", err)}previous, previousWriter, previousFlags := slog.Default(), log.Writer(), log.Flags()var dependencyLog *diagnostics.LineWriter@@ -113,14 +113,14 @@ func Run(ctx context.Context, options Options) (returnedErr error) {configPath := strings.TrimSpace(options.ConfigPath)if configPath == "" {var err error- configPath, err = clientconfig.DefaultPath()+ configPath, err = appconfig.DefaultPath()if err != nil {- return errors.New("Piik Client configuration is unavailable")+ return errors.New("Piik App configuration is unavailable")}}- config, err := clientconfig.LoadOrCreate(configPath)+ config, err := appconfig.LoadOrCreate(configPath)if err != nil {- return errors.New("Piik Client configuration is unavailable")+ return errors.New("Piik App configuration is unavailable")}config, err = applyMode(config, options)if err != nil {@@ -128,8 +128,8 @@ func Run(ctx context.Context, options Options) (returnedErr error) {}slog.Debug("piik-client", "event", "configuration", "siteConfigured", config.Site != "", "localAccessProtected", config.LocalAccessPassword != "")if options.SiteSet || options.Local {- if err = clientconfig.Save(configPath, config); err != nil {- return errors.New("Piik Client configuration is unavailable")+ if err = appconfig.Save(configPath, config); err != nil {+ return errors.New("Piik App configuration is unavailable")}}nativeMedia := discoverNativeMedia(ctx, options.CaptureProcess)@@ -143,26 +143,26 @@ func Run(ctx context.Context, options Options) (returnedErr error) {"video", nativeMedia.capabilities.Video, "processAudio", nativeMedia.capabilities.ProcessAudio,"systemAudio", nativeMedia.capabilities.SystemAudio, "hardwareH264", nativeMedia.capabilities.HardwareH264,"softwareVP8", nativeMedia.capabilities.SoftwareVP8)- client, err := loopback.Start(ctx, loopback.Options{- AllowedOrigins: clientOrigins(config.Site, options.Port),+ control, err := loopback.Start(ctx, loopback.Options{+ AllowedOrigins: allowedOrigins(config.Site, options.Port),NativeMedia: nativeMedia.capabilities,NewControl: nativeMedia.controlFactory(),Presentation: options.console.setLanguage,})if err != nil {- return errors.New("Piik Client could not start")+ return errors.New("Piik App could not start")}- defer client.Close()+ defer control.Close()slog.Debug("piik-client", "event", "control-ready")if options.console.machine {- if err = printEndpoint(client.Endpoint()); err != nil {+ if err = printEndpoint(control.Endpoint()); err != nil {return err}}if !explicitMode(options) {- return runLauncher(ctx, options, configPath, config, client)+ return runLauncher(ctx, options, configPath, config, control)}- return runConfigured(ctx, options, config, client)+ return runConfigured(ctx, options, config, control)}func explicitMode(options Options) bool {@@ -172,21 +172,21 @@ func explicitMode(options Options) bool {func runConfigured(ctx context.Context,options Options,- config clientconfig.Config,- client *loopback.Server,+ config appconfig.Config,+ control *loopback.Server,) error {if config.Site != "" && !options.Local && !options.Link {- return runSite(config.Site, options, client)+ return runSite(config.Site, options, control)}- return runLocal(ctx, options, config, client)+ return runLocal(ctx, options, config, control)}func runLauncher(ctx context.Context,options Options,configPath string,- config clientconfig.Config,- client *loopback.Server,+ config appconfig.Config,+ control *loopback.Server,) error {launch, err := launcher.Start(ctx,@@ -203,13 +203,13 @@ func runLauncher(if err != nil {return err}- client.SetAllowedOrigins(append(- clientOrigins(config.Site, options.Port),+ control.SetAllowedOrigins(append(+ allowedOrigins(config.Site, options.Port),launchAddress.Scheme+"://"+launchAddress.Host,))options.console.show(consoleView{state: "setup", entry: launch.URL()})if err = browser.Open(launch.URL()); err != nil {- return errors.New("Piik Client could not open its launcher")+ return errors.New("Piik App could not open its launcher")}var selection launcher.Selection@@ -219,7 +219,7 @@ func runLauncher(return nilcase err = <-launch.Done():if err != nil {- return errors.New("Piik Client launcher stopped unexpectedly")+ return errors.New("Piik App launcher stopped unexpectedly")}return nil}@@ -229,12 +229,12 @@ func runLauncher(} else {config.LocalAccessPassword = selection.LocalAccessPassword}- if err = clientconfig.Save(configPath, config); err != nil {+ if err = appconfig.Save(configPath, config); err != nil {launch.SetResult("", err)<-launch.Handled()- return errors.New("Piik Client configuration is unavailable")+ return errors.New("Piik App configuration is unavailable")}- client.SetAllowedOrigins(clientOrigins(config.Site, options.Port))+ control.SetAllowedOrigins(allowedOrigins(config.Site, options.Port))options.SiteSet = falseoptions.Local = selection.Mode == launcher.ModeLocaloptions.Link = selection.Mode == launcher.ModeLink@@ -245,7 +245,7 @@ func runLauncher(runtimeDone := make(chan struct{})var runtimeErr errorgo func() {- runtimeErr = runConfigured(runtimeContext, options, config, client)+ runtimeErr = runConfigured(runtimeContext, options, config, control)close(runtimeDone)}()defer func() {@@ -281,15 +281,15 @@ func runLauncher(}}-func applyMode(config clientconfig.Config, options Options) (clientconfig.Config, error) {+func applyMode(config appconfig.Config, options Options) (appconfig.Config, error) {if options.SiteSet && options.Local {- return clientconfig.Config{}, errors.New("choose either --site or --local")+ return appconfig.Config{}, errors.New("choose either --site or --local")}if options.SiteSet {var err error- config.Site, err = clientconfig.NormalizeSite(options.Site)+ config.Site, err = appconfig.NormalizeSite(options.Site)if err != nil || config.Site == "" {- return clientconfig.Config{}, errors.New("Piik Site must be an HTTP or HTTPS origin")+ return appconfig.Config{}, errors.New("Piik Site must be an HTTP or HTTPS origin")}} else if options.Local {config.Site = ""@@ -304,7 +304,7 @@ func validateMode(options Options) error {return nil}-func clientDebugEnabled(value string) bool {+func debugEnabled(value string) bool {for _, component := range strings.Split(value, ",") {if strings.TrimSpace(component) == "client" {return true@@ -313,7 +313,7 @@ func clientDebugEnabled(value string) bool {return false}-func openClientDiagnostics(directory string) (*diagnostics.Recorder, error) {+func openDiagnostics(directory string) (*diagnostics.Recorder, error) {if directory = strings.TrimSpace(directory); directory == "" {directory = strings.TrimSpace(os.Getenv("PIIK_LOG_DIR"))}@@ -337,34 +337,34 @@ func openClientDiagnostics(directory string) (*diagnostics.Recorder, error) {// runSite opens the configured Piik Site in the Browser and waits for the// loopback server, which is the only thing this mode owns. It takes no context:-// cancellation reaches it through client.Done().-func runSite(site string, options Options, client *loopback.Server) error {+// cancellation reaches it through control.Done().+func runSite(site string, options Options, control *loopback.Server) error {var err errorslog.Debug("piik-client", "event", "mode", "mode", "site")- launchURL := clientLaunchURL(site)- view := consoleView{mode: "site", state: "starting", entry: launchURL}+ targetURL := launchURL(site)+ view := consoleView{mode: "site", state: "starting", entry: targetURL}options.console.show(view)if options.console.machine {fmt.Printf("Piik Site: %s\n", site)}if !options.DisableBrowser {- if err = browser.Open(launchURL); err != nil {- return errors.New("Piik Client could not open the Site")+ if err = browser.Open(targetURL); err != nil {+ return errors.New("Piik App could not open the Site")}} else if options.Ready != nil {- options.Ready(launchURL)+ options.Ready(targetURL)}view.state = "ready"slog.Debug("piik-client", "event", "site-ready")options.console.show(view)- if err = <-client.Done(); err != nil {- return errors.New("Piik Client stopped unexpectedly")+ if err = <-control.Done(); err != nil {+ return errors.New("Piik App stopped unexpectedly")}return nil}-func runLocal(ctx context.Context, options Options, config clientconfig.Config,- client *loopback.Server,+func runLocal(ctx context.Context, options Options, config appconfig.Config,+ control *loopback.Server,) error {view := consoleView{mode: "local", state: "starting", protected: config.LocalAccessPassword != ""}if options.Link {@@ -452,13 +452,13 @@ func runLocal(ctx context.Context, options Options, config clientconfig.Config,fmt.Printf("LAN invitation origin: http://%s:%d\n", selectedAddress, options.Port)}}- launchURL := clientLaunchURLWithLocalAccess(+ launchURL := launchURLWithLocalAccess(fmt.Sprintf("http://127.0.0.1:%d/", options.Port),config.LocalAccessPassword,)if !options.DisableBrowser {if err = browser.Open(launchURL); err != nil {- return errors.New("Piik Client could not open the Local page")+ return errors.New("Piik App could not open the Local page")}} else if options.Ready != nil {options.Ready(launchURL)@@ -476,9 +476,9 @@ func runLocal(ctx context.Context, options Options, config clientconfig.Config,select {case <-ctx.Done():return endLocalServer(localServer)- case err = <-client.Done():+ case err = <-control.Done():if err != nil {- return errors.New("Piik Client runtime stopped unexpectedly")+ return errors.New("Piik App runtime stopped unexpectedly")}return nilcase <-tunnelDone:@@ -486,7 +486,7 @@ func runLocal(ctx context.Context, options Options, config clientconfig.Config,}}-func clientLaunchURL(raw string) string {+func launchURL(raw string) string {parsed, err := url.Parse(raw)if err != nil {return raw@@ -500,14 +500,14 @@ func clientLaunchURL(raw string) string {return parsed.String()}-func clientLaunchURLWithLocalAccess(raw, password string) string {+func launchURLWithLocalAccess(raw, password string) string {parsed, err := url.Parse(raw)if err != nil {return raw}fragment, err := url.ParseQuery(parsed.Fragment)if err != nil {- return clientLaunchURL(raw)+ return launchURL(raw)}fragment.Del("client-access")if password != "" {@@ -530,7 +530,7 @@ func (runtime nativeRuntime) controlFactory() func() loopback.ControlSession {}}-func clientOrigins(site string, localPort int) []string {+func allowedOrigins(site string, localPort int) []string {origins := []string{fmt.Sprintf("http://localhost:%d", localPort),fmt.Sprintf("http://127.0.0.1:%d", localPort),@@ -567,7 +567,7 @@ func discoverNativeMedia(ctx context.Context, configuredPath string) nativeRunti// localSTUNURLs is the Local room authority's ICE configuration. Only --link// has a public path, so only --link configures public STUN and the bounded NAT// prediction survey. The lists are literals on purpose: a gate that sets-// STUN_URLS is configuring the Client's own Pion edge, and that value must not+// STUN_URLS is configuring the App's own Pion edge, and that value must not// reach the room server (which is why serverconfig.Local reads no environment).func localSTUNURLs(link bool) (stunURLs []string, natPredictionSTUNURLs []string) {if !link {@@ -582,7 +582,7 @@ func localSTUNURLs(link bool) (stunURLs []string, natPredictionSTUNURLs []string// the tunnel and the loopback server go away. serverapp.End is memoised, so the// deferred call after an explicit stop is a no-op. A serve loop or a drain that// was already stopping reports http.ErrServerClosed or context.Canceled;-// neither is a Client failure, and Run turns any error into exit status 1,+// neither is an App failure, and Run turns any error into exit status 1,// which is exactly what the packaged smoke fails on.func endLocalServer(server *serverapp.Server) error {ctx, cancel := context.WithTimeout(context.Background(), localShutdownTimeout)@@ -604,7 +604,7 @@ func tunnelExecutable(configured string) string {func printEndpoint(endpoint loopback.Endpoint) error {payload, err := json.Marshal(endpoint)if err != nil {- return errors.New("Piik Client endpoint is unavailable")+ return errors.New("Piik App endpoint is unavailable")}fmt.Println(string(payload))return nildiff --git a/internal/client/clientapp/app_test.go b/internal/app/app_test.gosimilarity index 85%rename from internal/client/clientapp/app_test.gorename to internal/app/app_test.goindex 05dbe891..94eb35a1 100644--- a/internal/client/clientapp/app_test.go+++ b/internal/app/app_test.go@@ -1,4 +1,4 @@-package clientapp+package appimport ("bytes"@@ -13,7 +13,7 @@ import ("strings""testing"- "github.com/TNTcraftHIM/Piik/internal/client/clientconfig"+ appconfig "github.com/TNTcraftHIM/Piik/internal/app/config"serverconfig "github.com/TNTcraftHIM/Piik/internal/server/config")@@ -25,16 +25,16 @@ func TestOccupiedPortRejectsLinkBeforeStartingATunnel(t *testing.T) {defer listener.Close()err = runLocal(t.Context(), Options{Link: true, Port: listener.Addr().(*net.TCPAddr).Port,- TunnelProcess: "missing-tunnel-process", console: &clientConsole{machine: true},- }, clientconfig.Config{}, nil)+ TunnelProcess: "missing-tunnel-process", console: &console{machine: true},+ }, appconfig.Config{}, nil)var bindError *net.OpErrorif !errors.As(err, &bindError) || bindError.Op != "listen" {t.Fatalf("occupied port must fail before tunnel work: %v", err)}}-func TestClientLaunchURLMarksThePageWithoutChangingOrigin(t *testing.T) {- value := clientLaunchURL("https://share.example/")+func TestAppLaunchURLMarksThePageWithoutChangingOrigin(t *testing.T) {+ value := launchURL("https://share.example/")parsed, err := url.Parse(value)if err != nil || parsed.Scheme != "https" || parsed.Host != "share.example" ||parsed.RawQuery != "" {@@ -42,17 +42,17 @@ func TestClientLaunchURLMarksThePageWithoutChangingOrigin(t *testing.T) {}fragment, err := url.ParseQuery(parsed.Fragment)if err != nil || fragment.Get("piik-client") != "1" {- t.Fatalf("Client launch fragment = %q, %v", parsed.Fragment, err)+ t.Fatalf("App launch fragment = %q, %v", parsed.Fragment, err)}}-func TestClientDiagnosticsUseFilesOnlyWhenEnabled(t *testing.T) {+func TestAppDiagnosticsUseFilesOnlyWhenEnabled(t *testing.T) {for value, want := range map[string]bool{"client": true, "route, client": true, "client,": true,"": false, "route": false, "all": false, "client-secret": false,} {- if got := clientDebugEnabled(value); got != want {- t.Fatalf("clientDebugEnabled(%q) = %v, want %v", value, got, want)+ if got := debugEnabled(value); got != want {+ t.Fatalf("debugEnabled(%q) = %v, want %v", value, got, want)}}@@ -73,7 +73,7 @@ func TestClientDiagnosticsUseFilesOnlyWhenEnabled(t *testing.T) {t.Fatal("invalid mode must stop before starting capture or services")}if strings.Contains(output.String(), "piik-client") {- t.Fatalf("Client diagnostics reached stderr: %s", output.String())+ t.Fatalf("App diagnostics reached stderr: %s", output.String())}content, readErr := os.ReadFile(filepath.Join(directory, "client.log"))if !enabled {@@ -90,11 +90,11 @@ func TestClientDiagnosticsUseFilesOnlyWhenEnabled(t *testing.T) {}}-func TestClientDiagnosticDirectoryHonorsExplicitSelection(t *testing.T) {+func TestAppDiagnosticDirectoryHonorsExplicitSelection(t *testing.T) {environmentDirectory := t.TempDir()t.Setenv("PIIK_LOG_DIR", environmentDirectory)for _, directory := range []string{"", t.TempDir()} {- recorder, err := openClientDiagnostics(directory)+ recorder, err := openDiagnostics(directory)if err != nil {t.Fatal(err)}@@ -113,7 +113,7 @@ func TestClientDiagnosticDirectoryHonorsExplicitSelection(t *testing.T) {if err := os.WriteFile(blocked, nil, 0o600); err != nil {t.Fatal(err)}- if recorder, err := openClientDiagnostics(blocked); err == nil {+ if recorder, err := openDiagnostics(blocked); err == nil {_ = recorder.Close()t.Fatal("an explicit directory failure silently fell back")}@@ -132,7 +132,7 @@ func TestMissingCaptureKeepsViewerControlAvailable(t *testing.T) {}func TestLaunchURLPreservesLocalAccessInsideThePrivateFragment(t *testing.T) {- value := clientLaunchURL("http://localhost:8787/#client-access=secret")+ value := launchURL("http://localhost:8787/#client-access=secret")parsed, err := url.Parse(value)if err != nil || parsed.RawQuery != "" {t.Fatalf("local native launch URL = %q, %v", value, err)@@ -145,7 +145,7 @@ func TestLaunchURLPreservesLocalAccessInsideThePrivateFragment(t *testing.T) {}func TestLaunchURLEncodesAndClearsOptionalLocalAccess(t *testing.T) {- value := clientLaunchURLWithLocalAccess(+ value := launchURLWithLocalAccess("http://localhost:8787/#retained=yes&client-access=old","a+b&c?d=e",)@@ -159,7 +159,7 @@ func TestLaunchURLEncodesAndClearsOptionalLocalAccess(t *testing.T) {t.Fatalf("encoded local launch fragment = %q, %v", parsed.Fragment, err)}- open := clientLaunchURLWithLocalAccess("http://localhost:8787/#client-access=old", "")+ open := launchURLWithLocalAccess("http://localhost:8787/#client-access=old", "")parsed, err = url.Parse(open)if err != nil {t.Fatal(err)@@ -171,7 +171,7 @@ func TestLaunchURLEncodesAndClearsOptionalLocalAccess(t *testing.T) {}func TestLinkModeKeepsOneLocalAuthority(t *testing.T) {- config := clientconfig.Config{+ config := appconfig.Config{Version: 1,LocalAccessPassword: "abcdefghijklmnopqrstuvwxyzABCDEF",Site: "https://example.test",@@ -189,7 +189,7 @@ func TestLinkModeKeepsOneLocalAuthority(t *testing.T) {}// The Local room authority owns its ICE configuration: a STUN_URLS meant for-// the Client's own Pion edge must not reach it, and only --link is public.+// the App's own Pion edge must not reach it, and only --link is public.func TestLocalServerOwnsItsSTUNConfiguration(t *testing.T) {t.Setenv("STUN_URLS", "stun:inherited.example:3478")for _, testCase := range []struct {diff --git a/internal/client/browser/open.go b/internal/app/browser/open.gosimilarity index 100%rename from internal/client/browser/open.gorename to internal/app/browser/open.godiff --git a/internal/client/browser/open_test.go b/internal/app/browser/open_test.gosimilarity index 100%rename from internal/client/browser/open_test.gorename to internal/app/browser/open_test.godiff --git a/internal/client/clientconfig/config.go b/internal/app/config/config.gosimilarity index 78%rename from internal/client/clientconfig/config.gorename to internal/app/config/config.goindex d561b698..01ca04b5 100644--- a/internal/client/clientconfig/config.go+++ b/internal/app/config/config.go@@ -1,4 +1,4 @@-package clientconfig+package configimport ("bytes"@@ -49,25 +49,25 @@ func LoadOrCreate(path string) (Config, error) {}payload, err := encode(config)if err != nil {- return Config{}, fmt.Errorf("encode Client configuration: %w", err)+ return Config{}, fmt.Errorf("encode App configuration: %w", err)}if err = os.MkdirAll(filepath.Dir(path), 0o700); err != nil {- return Config{}, fmt.Errorf("create Client configuration directory: %w", err)+ return Config{}, fmt.Errorf("create App configuration directory: %w", err)}file, err := os.OpenFile(path, os.O_WRONLY|os.O_CREATE|os.O_EXCL, 0o600)if errors.Is(err, os.ErrExist) {return load(path)}if err != nil {- return Config{}, fmt.Errorf("create Client configuration: %w", err)+ return Config{}, fmt.Errorf("create App configuration: %w", err)}if _, writeErr := file.Write(payload); writeErr != nil {_ = file.Close()_ = os.Remove(path)- return Config{}, fmt.Errorf("write Client configuration: %w", writeErr)+ return Config{}, fmt.Errorf("write App configuration: %w", writeErr)}if err = file.Close(); err != nil {- return Config{}, fmt.Errorf("close Client configuration: %w", err)+ return Config{}, fmt.Errorf("close App configuration: %w", err)}return config, nil}@@ -78,13 +78,13 @@ func Save(path string, config Config) error {return err}if err = os.MkdirAll(filepath.Dir(path), 0o700); err != nil {- return fmt.Errorf("create Client configuration directory: %w", err)+ return fmt.Errorf("create App configuration directory: %w", err)}if err = os.WriteFile(path, payload, 0o600); err != nil {- return fmt.Errorf("write Client configuration: %w", err)+ return fmt.Errorf("write App configuration: %w", err)}if err = os.Chmod(path, 0o600); err != nil {- return fmt.Errorf("protect Client configuration: %w", err)+ return fmt.Errorf("protect App configuration: %w", err)}return nil}@@ -128,33 +128,33 @@ func load(path string) (Config, error) {decoder.DisallowUnknownFields()if decoder.Decode(&config) != nil || decoder.Decode(&struct{}{}) != io.EOF ||config.Version != currentVersion {- return Config{}, errors.New("Client configuration is invalid")+ return Config{}, errors.New("App configuration is invalid")}normalizedPassword, passwordErr := NormalizeLocalAccessPassword(config.LocalAccessPassword)if passwordErr != nil || normalizedPassword != config.LocalAccessPassword {- return Config{}, errors.New("Client configuration is invalid")+ return Config{}, errors.New("App configuration is invalid")}if config.Site, err = NormalizeSite(config.Site); err != nil {- return Config{}, errors.New("Client configuration is invalid")+ return Config{}, errors.New("App configuration is invalid")}return config, nil}func encode(config Config) ([]byte, error) {if config.Version != currentVersion {- return nil, errors.New("Client configuration is invalid")+ return nil, errors.New("App configuration is invalid")}password, passwordErr := NormalizeLocalAccessPassword(config.LocalAccessPassword)if passwordErr != nil || password != config.LocalAccessPassword {- return nil, errors.New("Client configuration is invalid")+ return nil, errors.New("App configuration is invalid")}site, err := NormalizeSite(config.Site)if err != nil || site != config.Site {- return nil, errors.New("Client configuration is invalid")+ return nil, errors.New("App configuration is invalid")}payload, err := json.MarshalIndent(config, "", " ")if err != nil {- return nil, fmt.Errorf("encode Client configuration: %w", err)+ return nil, fmt.Errorf("encode App configuration: %w", err)}return append(payload, '\n'), nil}diff --git a/internal/client/clientconfig/config_test.go b/internal/app/config/config_test.gosimilarity index 97%rename from internal/client/clientconfig/config_test.gorename to internal/app/config/config_test.goindex d07f8f52..5057a580 100644--- a/internal/client/clientconfig/config_test.go+++ b/internal/app/config/config_test.go@@ -1,4 +1,4 @@-package clientconfig+package configimport ("os"@@ -90,7 +90,7 @@ func TestLoadOrCreateRejectsUnknownOrMalformedState(t *testing.T) {t.Fatal(err)}if _, err := LoadOrCreate(path); err == nil {- t.Fatal("invalid Client configuration was accepted")+ t.Fatal("invalid App configuration was accepted")}})}diff --git a/internal/client/clientapp/console.go b/internal/app/console.gosimilarity index 94%rename from internal/client/clientapp/console.gorename to internal/app/console.goindex facff6e3..a0ed9e33 100644--- a/internal/client/clientapp/console.go+++ b/internal/app/console.go@@ -1,4 +1,4 @@-package clientapp+package appimport ("context"@@ -14,7 +14,7 @@ import (tea "charm.land/bubbletea/v2""charm.land/lipgloss/v2"- "github.com/TNTcraftHIM/Piik/internal/client/browser"+ "github.com/TNTcraftHIM/Piik/internal/app/browser""github.com/charmbracelet/colorprofile""github.com/charmbracelet/x/ansi""github.com/charmbracelet/x/term"@@ -59,7 +59,7 @@ type consoleModel struct {exportError bool}-type clientConsole struct {+type console struct {mu sync.Mutexmachine boolfinished bool@@ -94,8 +94,8 @@ var consoleCopy = map[string][3]string{"exportFailed": {"Could not save diagnostics", "无法保存诊断", ""},}-func newClientConsole(cancel context.CancelFunc, machine bool) *clientConsole {- console := &clientConsole{+func newConsole(cancel context.CancelFunc, machine bool) *console {+ console := &console{machine: machine,plain: consoleModel{view: consoleView{state: "starting"}, language: "vis", width: 76, cancel: cancel,colors: colorprofile.Detect(os.Stdout, os.Environ()) > colorprofile.ASCII},@@ -115,7 +115,7 @@ func newClientConsole(cancel context.CancelFunc, machine bool) *clientConsole {return console}-func (console *clientConsole) send(message tea.Msg) {+func (console *console) send(message tea.Msg) {console.mu.Lock()defer console.mu.Unlock()if console.machine || console.finished {@@ -133,32 +133,32 @@ func (console *clientConsole) send(message tea.Msg) {fmt.Fprintln(os.Stdout, console.plain.content(false))}-func (console *clientConsole) show(view consoleView) { console.send(view) }-func (console *clientConsole) setLanguage(language string) { console.send(consoleLanguage(language)) }+func (console *console) show(view consoleView) { console.send(view) }+func (console *console) setLanguage(language string) { console.send(consoleLanguage(language)) }-func (console *clientConsole) finish(err error) error {+func (console *console) finish(err error) error {console.send(consoleFinished{err})if console.program != nil {terminalErr := <-console.doneif err != nil {- fmt.Fprintln(os.Stderr, "Piik Client:", err)+ fmt.Fprintln(os.Stderr, "Piik App:", err)}if terminalErr != nil {- fmt.Fprintln(os.Stderr, "Piik Client:", terminalErr)+ fmt.Fprintln(os.Stderr, "Piik App:", terminalErr)}return terminalErr}return nil}-func (console *clientConsole) logWriter() io.Writer {+func (console *console) logWriter() io.Writer {if console.program == nil {return os.Stderr}return console}-func (console *clientConsole) Write(data []byte) (int, error) {+func (console *console) Write(data []byte) (int, error) {if text := strings.TrimSpace(string(data)); text != "" {console.send(consoleDiagnostic(ansi.Strip(text)))}@@ -218,7 +218,7 @@ func (model consoleModel) Update(message tea.Msg) (tea.Model, tea.Cmd) {model.cancel()case "o":if target := model.view.entry; target != "" {- return model, func() tea.Msg { return consoleOpenResult{browser.Open(clientLaunchURL(consoleAddress(target)))} }+ return model, func() tea.Msg { return consoleOpenResult{browser.Open(launchURL(consoleAddress(target)))} }}case "d", "D":if model.debug.export != nil && !model.exporting && !model.finished && model.view.state != "stopping" {@@ -260,7 +260,7 @@ func (model consoleModel) text(key string) string {func (model consoleModel) View() tea.View {view := tea.NewView(model.content(true))- view.WindowTitle = "Piik Client"+ view.WindowTitle = "Piik App"view.AltScreen = truereturn view}@@ -281,7 +281,7 @@ func (model consoleModel) content(styled bool) string {revision = revision[:7]}var out strings.Builder- heading := "Piik\nClient\n" + muted.Render(revision)+ heading := "Piik\nApp\n" + muted.Render(revision)animated := styled && model.animating()mascot := accent.Render(consoleTV(model.frame, animated, compact || width < 34))if styled && model.colors && width >= 36 && !compactDebug {@@ -331,7 +331,7 @@ func (model consoleModel) content(styled bool) string {if styled {target := addressif item[0] == "entry" {- target = clientLaunchURL(address)+ target = launchURL(address)}style = style.Hyperlink(target)}diff --git a/internal/client/clientapp/console_test.go b/internal/app/console_test.gosimilarity index 99%rename from internal/client/clientapp/console_test.gorename to internal/app/console_test.goindex d32120b0..5d55635f 100644--- a/internal/client/clientapp/console_test.go+++ b/internal/app/console_test.go@@ -1,4 +1,4 @@-package clientapp+package appimport ("bytes"diff --git a/internal/client/lan/addresses.go b/internal/app/lan/addresses.gosimilarity index 100%rename from internal/client/lan/addresses.gorename to internal/app/lan/addresses.godiff --git a/internal/client/lan/addresses_test.go b/internal/app/lan/addresses_test.gosimilarity index 100%rename from internal/client/lan/addresses_test.gorename to internal/app/lan/addresses_test.godiff --git a/internal/client/launcher/server.go b/internal/app/launcher/server.gosimilarity index 91%rename from internal/client/launcher/server.gorename to internal/app/launcher/server.goindex 41646820..8dfd8fe6 100644--- a/internal/client/launcher/server.go+++ b/internal/app/launcher/server.go@@ -13,7 +13,7 @@ import ("sync""time"- "github.com/TNTcraftHIM/Piik/internal/client/clientconfig"+ appconfig "github.com/TNTcraftHIM/Piik/internal/app/config")const (@@ -66,30 +66,30 @@ type Server struct {}// Start serves the launcher page and its API on a loopback port. assets is the-// built Browser UI, which the Client embeds; a nil file system means the binary+// built Browser UI, which the App embeds; a nil file system means the binary// carries no build and the launcher cannot run.func Start(parent context.Context, assets fs.FS, site, revision, localAccessPassword string) (*Server, error) {if parent == nil {parent = context.Background()}- normalizedSite, err := clientconfig.NormalizeSite(site)+ normalizedSite, err := appconfig.NormalizeSite(site)if err != nil {- return nil, errors.New("Client launcher Site is invalid")+ return nil, errors.New("App launcher Site is invalid")}site = normalizedSite- normalizedPassword, err := clientconfig.NormalizeLocalAccessPassword(localAccessPassword)+ normalizedPassword, err := appconfig.NormalizeLocalAccessPassword(localAccessPassword)if err != nil {- return nil, errors.New("Client launcher local access password is invalid")+ return nil, errors.New("App launcher local access password is invalid")}if assets == nil {- return nil, errors.New("Client launcher assets are unavailable")+ return nil, errors.New("App launcher assets are unavailable")}if metadata, err := fs.Stat(assets, launcherIndex); err != nil || !metadata.Mode().IsRegular() {- return nil, errors.New("Client launcher assets are unavailable")+ return nil, errors.New("App launcher assets are unavailable")}listener, err := net.Listen("tcp4", "127.0.0.1:0")if err != nil {- return nil, errors.New("Client launcher could not start")+ return nil, errors.New("App launcher could not start")}ctx, cancel := context.WithCancel(parent)server := &Server{@@ -140,7 +140,7 @@ func (server *Server) Done() <-chan error {func (server *Server) SetResult(target string, resultErr error) {server.resultOnce.Do(func() {if resultErr == nil && !validTarget(target) {- resultErr = errors.New("Client target is invalid")+ resultErr = errors.New("App target is invalid")}server.mu.Lock()server.resultSet = true@@ -255,7 +255,7 @@ func (server *Server) handleLaunch(response http.ResponseWriter, request *http.Rserver.mu.Unlock()if !resultSet || resultErr != nil {writeJSON(response, http.StatusServiceUnavailable, map[string]string{- "error": "Piik Client could not start",+ "error": "Piik App could not start",})server.markHandled()return@@ -310,7 +310,7 @@ func decodeSelection(reader io.Reader) (Selection, error) {return Selection{}, errors.New("local launch cannot include a Site")}selection.Site = ""- normalizedPassword, err := clientconfig.NormalizeLocalAccessPassword(+ normalizedPassword, err := appconfig.NormalizeLocalAccessPassword(selection.LocalAccessPassword,)if err != nil {@@ -321,7 +321,7 @@ func decodeSelection(reader io.Reader) (Selection, error) {if selection.LocalAccessPassword != "" {return Selection{}, errors.New("Site launch cannot include a local access password")}- normalized, err := clientconfig.NormalizeSite(selection.Site)+ normalized, err := appconfig.NormalizeSite(selection.Site)if err != nil || normalized == "" {return Selection{}, errors.New("Site launch requires an HTTP or HTTPS origin")}diff --git a/internal/client/launcher/server_test.go b/internal/app/launcher/server_test.gosimilarity index 96%rename from internal/client/launcher/server_test.gorename to internal/app/launcher/server_test.goindex 9e8a13bc..3205ec62 100644--- a/internal/client/launcher/server_test.go+++ b/internal/app/launcher/server_test.go@@ -11,8 +11,8 @@ import ("time")-// clientAssets stands in for the embedded Vite build the Client ships.-func clientAssets() fs.FS {+// appAssets stands in for the embedded Vite build the App ships.+func appAssets() fs.FS {return fstest.MapFS{"index.html": {Data: []byte("<!doctype html><html><body>client</body></html>")},}@@ -147,7 +147,7 @@ func TestLauncherCarriesAndNormalizesAnOptionalLocalPassword(t *testing.T) {}func TestLauncherRejectsAnInvalidSavedSite(t *testing.T) {- if _, err := Start(t.Context(), clientAssets(), "https://example.test/path", "", ""); err == nil {+ if _, err := Start(t.Context(), appAssets(), "https://example.test/path", "", ""); err == nil {t.Fatal("launcher accepted a Site path")}}@@ -254,7 +254,7 @@ func startFixtureWithRevisionAndPassword(site, revision, password string,) *Server {t.Helper()- server, err := Start(t.Context(), clientAssets(), site, revision, password)+ server, err := Start(t.Context(), appAssets(), site, revision, password)if err != nil {t.Fatal(err)}diff --git a/internal/client/loopback/protocol.go b/internal/app/loopback/protocol.gosimilarity index 100%rename from internal/client/loopback/protocol.gorename to internal/app/loopback/protocol.godiff --git a/internal/client/loopback/protocol_test.go b/internal/app/loopback/protocol_test.gosimilarity index 100%rename from internal/client/loopback/protocol_test.gorename to internal/app/loopback/protocol_test.godiff --git a/internal/client/loopback/server.go b/internal/app/loopback/server.gosimilarity index 100%rename from internal/client/loopback/server.gorename to internal/app/loopback/server.godiff --git a/internal/client/loopback/server_test.go b/internal/app/loopback/server_test.gosimilarity index 99%rename from internal/client/loopback/server_test.gorename to internal/app/loopback/server_test.goindex 40fe4b13..14cfa9f5 100644--- a/internal/client/loopback/server_test.go+++ b/internal/app/loopback/server_test.go@@ -225,7 +225,7 @@ func TestControlSessionsAreBoundedAndRetireIndependently(t *testing.T) {select {case <-session.closed:default:- t.Fatal("Client close returned before native session cleanup")+ t.Fatal("App close returned before native session cleanup")}}}diff --git a/internal/client/mediaedge/audio.go b/internal/app/mediaedge/audio.gosimilarity index 99%rename from internal/client/mediaedge/audio.gorename to internal/app/mediaedge/audio.goindex ab64df9f..ddfbfe8f 100644--- a/internal/client/mediaedge/audio.go+++ b/internal/app/mediaedge/audio.go@@ -6,7 +6,7 @@ import ("sync/atomic""time"- "github.com/TNTcraftHIM/Piik/internal/client/nativeaudio"+ "github.com/TNTcraftHIM/Piik/internal/app/nativeaudio""github.com/pion/rtp""github.com/pion/webrtc/v4""github.com/pion/webrtc/v4/pkg/media"diff --git a/internal/client/mediaedge/candidate_gathering.go b/internal/app/mediaedge/candidate_gathering.gosimilarity index 100%rename from internal/client/mediaedge/candidate_gathering.gorename to internal/app/mediaedge/candidate_gathering.godiff --git a/internal/client/mediaedge/edge.go b/internal/app/mediaedge/edge.gosimilarity index 100%rename from internal/client/mediaedge/edge.gorename to internal/app/mediaedge/edge.godiff --git a/internal/client/mediaedge/edge_debug_test.go b/internal/app/mediaedge/edge_debug_test.gosimilarity index 100%rename from internal/client/mediaedge/edge_debug_test.gorename to internal/app/mediaedge/edge_debug_test.godiff --git a/internal/client/mediaedge/edge_test.go b/internal/app/mediaedge/edge_test.gosimilarity index 99%rename from internal/client/mediaedge/edge_test.gorename to internal/app/mediaedge/edge_test.goindex 9051cc0f..26030b17 100644--- a/internal/client/mediaedge/edge_test.go+++ b/internal/app/mediaedge/edge_test.go@@ -10,8 +10,8 @@ import ("testing""time"- "github.com/TNTcraftHIM/Piik/internal/client/nativeaudio"- "github.com/TNTcraftHIM/Piik/internal/client/nativecapture"+ "github.com/TNTcraftHIM/Piik/internal/app/nativeaudio"+ "github.com/TNTcraftHIM/Piik/internal/app/nativecapture""github.com/TNTcraftHIM/Piik/internal/media/encoded""github.com/livekit/livekit-server/pkg/sfu""github.com/livekit/livekit-server/pkg/sfu/streamtracker"diff --git a/internal/client/mediaedge/engine.go b/internal/app/mediaedge/engine.gosimilarity index 99%rename from internal/client/mediaedge/engine.gorename to internal/app/mediaedge/engine.goindex 8cd3d22e..72dfde2f 100644--- a/internal/client/mediaedge/engine.go+++ b/internal/app/mediaedge/engine.go@@ -12,7 +12,7 @@ import ("sync/atomic""time"- "github.com/TNTcraftHIM/Piik/internal/client/portmapping"+ "github.com/TNTcraftHIM/Piik/internal/app/portmapping""github.com/TNTcraftHIM/Piik/internal/diagnostics""github.com/TNTcraftHIM/Piik/internal/media/encoded""github.com/TNTcraftHIM/Piik/internal/media/forwarding"diff --git a/internal/client/mediaedge/group_fixture_test.go b/internal/app/mediaedge/group_fixture_test.gosimilarity index 100%rename from internal/client/mediaedge/group_fixture_test.gorename to internal/app/mediaedge/group_fixture_test.godiff --git a/internal/client/mediaedge/groups.go b/internal/app/mediaedge/groups.gosimilarity index 100%rename from internal/client/mediaedge/groups.gorename to internal/app/mediaedge/groups.godiff --git a/internal/client/mediaedge/groups_test.go b/internal/app/mediaedge/groups_test.gosimilarity index 100%rename from internal/client/mediaedge/groups_test.gorename to internal/app/mediaedge/groups_test.godiff --git a/internal/client/mediaedge/publication.go b/internal/app/mediaedge/publication.gosimilarity index 100%rename from internal/client/mediaedge/publication.gorename to internal/app/mediaedge/publication.godiff --git a/internal/client/mediaedge/publication_test.go b/internal/app/mediaedge/publication_test.gosimilarity index 100%rename from internal/client/mediaedge/publication_test.gorename to internal/app/mediaedge/publication_test.godiff --git a/internal/client/mediaedge/quality.go b/internal/app/mediaedge/quality.gosimilarity index 100%rename from internal/client/mediaedge/quality.gorename to internal/app/mediaedge/quality.godiff --git a/internal/client/mediaedge/quality_test.go b/internal/app/mediaedge/quality_test.gosimilarity index 100%rename from internal/client/mediaedge/quality_test.gorename to internal/app/mediaedge/quality_test.godiff --git a/internal/client/mediaedge/receiver.go b/internal/app/mediaedge/receiver.gosimilarity index 100%rename from internal/client/mediaedge/receiver.gorename to internal/app/mediaedge/receiver.godiff --git a/internal/client/mediaedge/receiver_test.go b/internal/app/mediaedge/receiver_test.gosimilarity index 100%rename from internal/client/mediaedge/receiver_test.gorename to internal/app/mediaedge/receiver_test.godiff --git a/internal/client/mediaedge/relay_chain_fixture_test.go b/internal/app/mediaedge/relay_chain_fixture_test.gosimilarity index 99%rename from internal/client/mediaedge/relay_chain_fixture_test.gorename to internal/app/mediaedge/relay_chain_fixture_test.goindex 4d7464c5..7ad13293 100644--- a/internal/client/mediaedge/relay_chain_fixture_test.go+++ b/internal/app/mediaedge/relay_chain_fixture_test.go@@ -11,7 +11,7 @@ import ("testing""time"- "github.com/TNTcraftHIM/Piik/internal/client/nativecapture"+ "github.com/TNTcraftHIM/Piik/internal/app/nativecapture""github.com/TNTcraftHIM/Piik/internal/media/encoded""github.com/pion/webrtc/v4")diff --git a/internal/client/mediaedge/relay_derivation.go b/internal/app/mediaedge/relay_derivation.gosimilarity index 99%rename from internal/client/mediaedge/relay_derivation.gorename to internal/app/mediaedge/relay_derivation.goindex 35e2f980..821b68dc 100644--- a/internal/client/mediaedge/relay_derivation.go+++ b/internal/app/mediaedge/relay_derivation.go@@ -7,7 +7,7 @@ import ("sync""time"- "github.com/TNTcraftHIM/Piik/internal/client/nativecapture"+ "github.com/TNTcraftHIM/Piik/internal/app/nativecapture""github.com/TNTcraftHIM/Piik/internal/media/encoded""github.com/TNTcraftHIM/Piik/internal/media/forwarding""github.com/livekit/mediatransportutil/pkg/utils"diff --git a/internal/client/mediaedge/relay_fixture_test.go b/internal/app/mediaedge/relay_fixture_test.gosimilarity index 99%rename from internal/client/mediaedge/relay_fixture_test.gorename to internal/app/mediaedge/relay_fixture_test.goindex f2572b02..79f050b4 100644--- a/internal/client/mediaedge/relay_fixture_test.go+++ b/internal/app/mediaedge/relay_fixture_test.go@@ -9,7 +9,7 @@ import ("testing""time"- "github.com/TNTcraftHIM/Piik/internal/client/nativecapture"+ "github.com/TNTcraftHIM/Piik/internal/app/nativecapture""github.com/livekit/mediatransportutil"mediacodec "github.com/livekit/mediatransportutil/pkg/codec""github.com/pion/rtcp"diff --git a/internal/client/mediaedge/relay_input.go b/internal/app/mediaedge/relay_input.gosimilarity index 98%rename from internal/client/mediaedge/relay_input.gorename to internal/app/mediaedge/relay_input.goindex 8bf83e1c..da785ea8 100644--- a/internal/client/mediaedge/relay_input.go+++ b/internal/app/mediaedge/relay_input.go@@ -5,7 +5,7 @@ import ("errors""io"- "github.com/TNTcraftHIM/Piik/internal/client/nativecapture"+ "github.com/TNTcraftHIM/Piik/internal/app/nativecapture"mediacodec "github.com/livekit/mediatransportutil/pkg/codec""github.com/livekit/server-sdk-go/v2/pkg/samplebuilder""github.com/pion/rtp"diff --git a/internal/client/mediaedge/relay_input_test.go b/internal/app/mediaedge/relay_input_test.gosimilarity index 100%rename from internal/client/mediaedge/relay_input_test.gorename to internal/app/mediaedge/relay_input_test.godiff --git a/internal/client/mediaedge/relay_network_fixture_test.go b/internal/app/mediaedge/relay_network_fixture_test.gosimilarity index 99%rename from internal/client/mediaedge/relay_network_fixture_test.gorename to internal/app/mediaedge/relay_network_fixture_test.goindex d284fb46..32413a04 100644--- a/internal/client/mediaedge/relay_network_fixture_test.go+++ b/internal/app/mediaedge/relay_network_fixture_test.go@@ -11,7 +11,7 @@ import ("testing""time"- "github.com/TNTcraftHIM/Piik/internal/client/nativecapture"+ "github.com/TNTcraftHIM/Piik/internal/app/nativecapture""github.com/livekit/mediatransportutil""github.com/pion/ice/v4""github.com/pion/interceptor"diff --git a/internal/client/mediaedge/source.go b/internal/app/mediaedge/source.gosimilarity index 99%rename from internal/client/mediaedge/source.gorename to internal/app/mediaedge/source.goindex 068bd39b..0e9cee60 100644--- a/internal/client/mediaedge/source.go+++ b/internal/app/mediaedge/source.go@@ -7,7 +7,7 @@ import ("sync/atomic""time"- "github.com/TNTcraftHIM/Piik/internal/client/nativecapture"+ "github.com/TNTcraftHIM/Piik/internal/app/nativecapture""github.com/TNTcraftHIM/Piik/internal/media/encoded""github.com/TNTcraftHIM/Piik/internal/media/forwarding"mediacodec "github.com/livekit/mediatransportutil/pkg/codec"diff --git a/internal/client/mediaedge/source_test.go b/internal/app/mediaedge/source_test.gosimilarity index 100%rename from internal/client/mediaedge/source_test.gorename to internal/app/mediaedge/source_test.godiff --git a/internal/client/mediaedge/testdata/gcc_feedback_probe.go b/internal/app/mediaedge/testdata/gcc_feedback_probe.gosimilarity index 100%rename from internal/client/mediaedge/testdata/gcc_feedback_probe.gorename to internal/app/mediaedge/testdata/gcc_feedback_probe.godiff --git a/internal/client/nativeaudio/encoder.go b/internal/app/nativeaudio/encoder.gosimilarity index 100%rename from internal/client/nativeaudio/encoder.gorename to internal/app/nativeaudio/encoder.godiff --git a/internal/client/nativeaudio/encoder_test.go b/internal/app/nativeaudio/encoder_test.gosimilarity index 100%rename from internal/client/nativeaudio/encoder_test.gorename to internal/app/nativeaudio/encoder_test.godiff --git a/internal/client/nativecapture/adaptive_fixture_test.go b/internal/app/nativecapture/adaptive_fixture_test.gosimilarity index 100%rename from internal/client/nativecapture/adaptive_fixture_test.gorename to internal/app/nativecapture/adaptive_fixture_test.godiff --git a/internal/client/nativecapture/json.go b/internal/app/nativecapture/json.gosimilarity index 100%rename from internal/client/nativecapture/json.gorename to internal/app/nativecapture/json.godiff --git a/internal/client/nativecapture/probe.go b/internal/app/nativecapture/probe.gosimilarity index 98%rename from internal/client/nativecapture/probe.gorename to internal/app/nativecapture/probe.goindex 1a685018..39ae6b46 100644--- a/internal/client/nativecapture/probe.go+++ b/internal/app/nativecapture/probe.go@@ -114,7 +114,7 @@ func Discover(parent context.Context, executable string) (Capabilities, error) {return Capabilities{}, err}if capabilities.Platform != runtime.GOOS {- return Capabilities{}, errors.New("native capture platform does not match the Client")+ return Capabilities{}, errors.New("native capture platform does not match the App")}return capabilities, nil}@@ -127,11 +127,11 @@ func PackagedExecutable() string {name := ""switch runtime.GOOS {case "windows":- name = "piik-client-capture.exe"+ name = "piik-capture.exe"case "darwin":- name = "piik-client-capture"+ name = "piik-capture"case "linux":- name = "piik-client-capture"+ name = "piik-capture"default:return ""}diff --git a/internal/client/nativecapture/probe_test.go b/internal/app/nativecapture/probe_test.gosimilarity index 100%rename from internal/client/nativecapture/probe_test.gorename to internal/app/nativecapture/probe_test.godiff --git a/internal/client/nativecapture/process_other.go b/internal/app/nativecapture/process_other.gosimilarity index 100%rename from internal/client/nativecapture/process_other.gorename to internal/app/nativecapture/process_other.godiff --git a/internal/client/nativecapture/process_windows.go b/internal/app/nativecapture/process_windows.gosimilarity index 100%rename from internal/client/nativecapture/process_windows.gorename to internal/app/nativecapture/process_windows.godiff --git a/internal/client/nativecapture/protocol.go b/internal/app/nativecapture/protocol.gosimilarity index 100%rename from internal/client/nativecapture/protocol.gorename to internal/app/nativecapture/protocol.godiff --git a/internal/client/nativecapture/protocol_test.go b/internal/app/nativecapture/protocol_test.gosimilarity index 100%rename from internal/client/nativecapture/protocol_test.gorename to internal/app/nativecapture/protocol_test.godiff --git a/internal/client/nativecapture/stream.go b/internal/app/nativecapture/stream.gosimilarity index 100%rename from internal/client/nativecapture/stream.gorename to internal/app/nativecapture/stream.godiff --git a/internal/client/nativecapture/stream_test.go b/internal/app/nativecapture/stream_test.gosimilarity index 100%rename from internal/client/nativecapture/stream_test.gorename to internal/app/nativecapture/stream_test.godiff --git a/internal/client/nativecontrol/publication.go b/internal/app/nativecontrol/publication.gosimilarity index 100%rename from internal/client/nativecontrol/publication.gorename to internal/app/nativecontrol/publication.godiff --git a/internal/client/nativecontrol/session.go b/internal/app/nativecontrol/session.gosimilarity index 99%rename from internal/client/nativecontrol/session.gorename to internal/app/nativecontrol/session.goindex c22f7539..25589937 100644--- a/internal/client/nativecontrol/session.go+++ b/internal/app/nativecontrol/session.go@@ -16,11 +16,11 @@ import ("time""unicode"- "github.com/TNTcraftHIM/Piik/internal/client/loopback"- "github.com/TNTcraftHIM/Piik/internal/client/mediaedge"- "github.com/TNTcraftHIM/Piik/internal/client/nativecapture"- "github.com/TNTcraftHIM/Piik/internal/client/nativehost"- "github.com/TNTcraftHIM/Piik/internal/client/nativeviewer"+ "github.com/TNTcraftHIM/Piik/internal/app/loopback"+ "github.com/TNTcraftHIM/Piik/internal/app/mediaedge"+ "github.com/TNTcraftHIM/Piik/internal/app/nativecapture"+ "github.com/TNTcraftHIM/Piik/internal/app/nativehost"+ "github.com/TNTcraftHIM/Piik/internal/app/nativeviewer""github.com/TNTcraftHIM/Piik/internal/diagnostics""github.com/pion/webrtc/v4")diff --git a/internal/client/nativecontrol/session_test.go b/internal/app/nativecontrol/session_test.gosimilarity index 98%rename from internal/client/nativecontrol/session_test.gorename to internal/app/nativecontrol/session_test.goindex 5e383d64..86e1c628 100644--- a/internal/client/nativecontrol/session_test.go+++ b/internal/app/nativecontrol/session_test.go@@ -14,9 +14,9 @@ import ("testing""time"- "github.com/TNTcraftHIM/Piik/internal/client/loopback"- "github.com/TNTcraftHIM/Piik/internal/client/nativecapture"- "github.com/TNTcraftHIM/Piik/internal/client/nativehost"+ "github.com/TNTcraftHIM/Piik/internal/app/loopback"+ "github.com/TNTcraftHIM/Piik/internal/app/nativecapture"+ "github.com/TNTcraftHIM/Piik/internal/app/nativehost")func TestMain(tests *testing.M) {diff --git a/internal/client/nativecontrol/wire.go b/internal/app/nativecontrol/wire.gosimilarity index 98%rename from internal/client/nativecontrol/wire.gorename to internal/app/nativecontrol/wire.goindex afa45c97..ec9f3620 100644--- a/internal/client/nativecontrol/wire.go+++ b/internal/app/nativecontrol/wire.go@@ -1,8 +1,8 @@package nativecontrolimport (- "github.com/TNTcraftHIM/Piik/internal/client/mediaedge"- "github.com/TNTcraftHIM/Piik/internal/client/nativecapture"+ "github.com/TNTcraftHIM/Piik/internal/app/mediaedge"+ "github.com/TNTcraftHIM/Piik/internal/app/nativecapture""github.com/pion/webrtc/v4")diff --git a/internal/client/nativehost/audio_test.go b/internal/app/nativehost/audio_test.gosimilarity index 98%rename from internal/client/nativehost/audio_test.gorename to internal/app/nativehost/audio_test.goindex 0299ad5a..92198eef 100644--- a/internal/client/nativehost/audio_test.go+++ b/internal/app/nativehost/audio_test.go@@ -10,8 +10,8 @@ import ("testing""time"- "github.com/TNTcraftHIM/Piik/internal/client/nativeaudio"- "github.com/TNTcraftHIM/Piik/internal/client/nativecapture"+ "github.com/TNTcraftHIM/Piik/internal/app/nativeaudio"+ "github.com/TNTcraftHIM/Piik/internal/app/nativecapture""github.com/livekit/livekit-server/pkg/sfu""github.com/pion/webrtc/v4")diff --git a/internal/client/nativehost/profile.go b/internal/app/nativehost/profile.gosimilarity index 81%rename from internal/client/nativehost/profile.gorename to internal/app/nativehost/profile.goindex d33d9be6..7e02897d 100644--- a/internal/client/nativehost/profile.go+++ b/internal/app/nativehost/profile.go@@ -1,6 +1,6 @@package nativehost-import "github.com/TNTcraftHIM/Piik/internal/client/nativecapture"+import "github.com/TNTcraftHIM/Piik/internal/app/nativecapture"type QualityProfile struct {Video nativecapture.VideoProfilediff --git a/internal/client/nativehost/publication.go b/internal/app/nativehost/publication.gosimilarity index 98%rename from internal/client/nativehost/publication.gorename to internal/app/nativehost/publication.goindex 3a85e764..207d9273 100644--- a/internal/client/nativehost/publication.go+++ b/internal/app/nativehost/publication.go@@ -3,7 +3,7 @@ package nativehostimport ("errors"- "github.com/TNTcraftHIM/Piik/internal/client/mediaedge"+ "github.com/TNTcraftHIM/Piik/internal/app/mediaedge""github.com/pion/webrtc/v4")diff --git a/internal/client/nativehost/publication_test.go b/internal/app/nativehost/publication_test.gosimilarity index 97%rename from internal/client/nativehost/publication_test.gorename to internal/app/nativehost/publication_test.goindex 029c14c7..f6568385 100644--- a/internal/client/nativehost/publication_test.go+++ b/internal/app/nativehost/publication_test.go@@ -3,7 +3,7 @@ package nativehostimport ("testing"- "github.com/TNTcraftHIM/Piik/internal/client/mediaedge"+ "github.com/TNTcraftHIM/Piik/internal/app/mediaedge")func TestPublicationGenerationFencesNativeControl(t *testing.T) {diff --git a/internal/client/nativehost/session.go b/internal/app/nativehost/session.gosimilarity index 99%rename from internal/client/nativehost/session.gorename to internal/app/nativehost/session.goindex 4a5c8b46..c6ea3dca 100644--- a/internal/client/nativehost/session.go+++ b/internal/app/nativehost/session.go@@ -13,8 +13,8 @@ import ("time""unicode/utf8"- "github.com/TNTcraftHIM/Piik/internal/client/mediaedge"- "github.com/TNTcraftHIM/Piik/internal/client/nativecapture"+ "github.com/TNTcraftHIM/Piik/internal/app/mediaedge"+ "github.com/TNTcraftHIM/Piik/internal/app/nativecapture""github.com/TNTcraftHIM/Piik/internal/diagnostics""github.com/TNTcraftHIM/Piik/internal/media/encoded""github.com/pion/webrtc/v4"diff --git a/internal/client/nativehost/session_test.go b/internal/app/nativehost/session_test.gosimilarity index 98%rename from internal/client/nativehost/session_test.gorename to internal/app/nativehost/session_test.goindex 880839e6..9918788e 100644--- a/internal/client/nativehost/session_test.go+++ b/internal/app/nativehost/session_test.go@@ -12,8 +12,8 @@ import ("testing""time"- "github.com/TNTcraftHIM/Piik/internal/client/mediaedge"- "github.com/TNTcraftHIM/Piik/internal/client/nativecapture"+ "github.com/TNTcraftHIM/Piik/internal/app/mediaedge"+ "github.com/TNTcraftHIM/Piik/internal/app/nativecapture")func TestMain(tests *testing.M) {diff --git a/internal/client/nativeviewer/session.go b/internal/app/nativeviewer/session.gosimilarity index 98%rename from internal/client/nativeviewer/session.gorename to internal/app/nativeviewer/session.goindex 85844f71..60ae381a 100644--- a/internal/client/nativeviewer/session.go+++ b/internal/app/nativeviewer/session.go@@ -6,8 +6,8 @@ import ("sync""time"- "github.com/TNTcraftHIM/Piik/internal/client/mediaedge"- "github.com/TNTcraftHIM/Piik/internal/client/nativecapture"+ "github.com/TNTcraftHIM/Piik/internal/app/mediaedge"+ "github.com/TNTcraftHIM/Piik/internal/app/nativecapture""github.com/pion/webrtc/v4")diff --git a/internal/client/nativeviewer/session_test.go b/internal/app/nativeviewer/session_test.gosimilarity index 93%rename from internal/client/nativeviewer/session_test.gorename to internal/app/nativeviewer/session_test.goindex 7652745d..33a1876c 100644--- a/internal/client/nativeviewer/session_test.go+++ b/internal/app/nativeviewer/session_test.go@@ -3,7 +3,7 @@ package nativeviewerimport ("testing"- "github.com/TNTcraftHIM/Piik/internal/client/nativecapture"+ "github.com/TNTcraftHIM/Piik/internal/app/nativecapture")func TestViewerProfileHasNoImplicitCaptureDefault(t *testing.T) {diff --git a/internal/client/portmapping/mapping.go b/internal/app/portmapping/mapping.gosimilarity index 100%rename from internal/client/portmapping/mapping.gorename to internal/app/portmapping/mapping.godiff --git a/internal/client/portmapping/mapping_test.go b/internal/app/portmapping/mapping_test.gosimilarity index 100%rename from internal/client/portmapping/mapping_test.gorename to internal/app/portmapping/mapping_test.godiff --git a/internal/client/publictunnel/process.go b/internal/app/publictunnel/process.gosimilarity index 100%rename from internal/client/publictunnel/process.gorename to internal/app/publictunnel/process.godiff --git a/internal/client/publictunnel/process_other.go b/internal/app/publictunnel/process_other.gosimilarity index 100%rename from internal/client/publictunnel/process_other.gorename to internal/app/publictunnel/process_other.godiff --git a/internal/client/publictunnel/process_test.go b/internal/app/publictunnel/process_test.gosimilarity index 100%rename from internal/client/publictunnel/process_test.gorename to internal/app/publictunnel/process_test.godiff --git a/internal/client/publictunnel/process_windows.go b/internal/app/publictunnel/process_windows.gosimilarity index 100%rename from internal/client/publictunnel/process_windows.gorename to internal/app/publictunnel/process_windows.godiff --git a/internal/server/config/config_test.go b/internal/server/config/config_test.goindex a9bf1ed3..01864db1 100644--- a/internal/server/config/config_test.go+++ b/internal/server/config/config_test.go@@ -26,7 +26,7 @@ func env(parts ...map[string]string) map[string]string {}var productionBase = map[string]string{- "PIIK_ENV": "production",+ "PIIK_ENV": "production","PUBLIC_BASE_URL": "https://share.test","SITE_ACCESS_PASSWORD": "host-password-12","STUN_URLS": "stun:stun.test:3478",diff --git a/licenses/README.md b/licenses/README.mdindex 0300cca0..a5656fd1 100644--- a/licenses/README.md+++ b/licenses/README.md@@ -11,7 +11,7 @@ The Cloudflared text includes its source distribution's root and all vendoredLICENSE, COPYING, and NOTICE files, including platform variants. The protobuftext also preserves Google's BSD-licensed varint attribution.The Windows capture adapter statically links the pinned WebRTC SDK, including-its libvpx encoder. The Client's native notices retain the SDK's collected+its libvpx encoder. The App's native notices retain the SDK's collectedthird-party license texts; these dependencies do not become MIT-licensed merelybecause Piik's adapter is MIT-licensed.Linux packages that include the native capture binary include@@ -23,9 +23,9 @@ capture-specific notices.`npm run dev` and `npm run build:client` generate `/third-party-licenses.txt`offline from installed, lockfile-matched Web runtime dependencies.-The application release and Client assembly each add the Go toolchain notice+The application release and App assembly each add the Go toolchain noticeand the license files of the modules actually compiled into that binary; the-Client package also carries the pinned Cloudflared notices. Missing license+App package also carries the pinned Cloudflared notices. Missing licensetexts or changed pinned contents stop packaging.LiveKit media-core packages are referenced as an unmodified, version-pinned Godiff --git a/licenses/linux-system-dependencies.txt b/licenses/linux-system-dependencies.txtindex 21aa1d8f..11dabd9d 100644--- a/licenses/linux-system-dependencies.txt+++ b/licenses/linux-system-dependencies.txt@@ -2,7 +2,7 @@ Linux capture dependencies (not bundled)The Linux native capture process dynamically uses the distribution's XDGDesktop Portal/libportal and GStreamer packages. Piik does not redistribute-those shared libraries. The Client package carries the applicable license texts+those shared libraries. The App package carries the applicable license textsfor this linked capture path.libportal headers and library are LGPL-3.0-only. Source:@@ -16,4 +16,4 @@ https://gstreamer.freedesktop.org/documentation/frequently-asked-questions/licenhttps://gstreamer.freedesktop.org/The runtime stack also depends on the host's Portal, PipeWire, and hardware-encoder services. Those services are not part of the Piik Client package.+encoder services. Those services are not part of the Piik App package.diff --git a/native/capture/darwin/README.md b/native/capture/darwin/README.mdindex 74153d1a..6d0e09b5 100644--- a/native/capture/darwin/README.md+++ b/native/capture/darwin/README.md@@ -1,6 +1,6 @@# macOS Capture Process-This process keeps the native Client media boundary used on Windows while+This process keeps the native App media boundary used on Windows whilereplacing only the platform implementation. It lists current ScreenCaptureKitdisplays and windows, captures one exact source with the current product profile,requires a VideoToolbox hardware H.264 encoder, and writes Annex-B Baseline H.264@@ -13,8 +13,8 @@ Build on Apple Silicon macOS 13 or newer:```shsh native/capture/darwin/build.sh /outside/repository/build-/outside/repository/build/piik-client-capture --self-test-/outside/repository/build/piik-client-capture --probe+/outside/repository/build/piik-capture --self-test+/outside/repository/build/piik-capture --probe````--self-test` encodes one in-memory 420v frame through the same hardware-onlydiff --git a/native/capture/darwin/build.sh b/native/capture/darwin/build.shindex e5cd22a4..6a83f87c 100644--- a/native/capture/darwin/build.sh+++ b/native/capture/darwin/build.sh@@ -19,4 +19,4 @@ xcrun swiftc \-framework ScreenCaptureKit \-framework VideoToolbox \"$(dirname "$0")/main.swift" \- -o "$output/piik-client-capture"+ -o "$output/piik-capture"diff --git a/native/capture/linux/README.md b/native/capture/linux/README.mdindex 6e49579a..5875ac98 100644--- a/native/capture/linux/README.md+++ b/native/capture/linux/README.md@@ -1,6 +1,6 @@# Linux Capture Process-The Linux sidecar keeps the shared Native Client contract while delegating+The Linux sidecar keeps the shared Native App contract while delegatingdesktop integration to the standard Linux media stack. XDG Desktop Portal ownsthe screen/window choice, PipeWire supplies the selected stream, and GStreamerselects an installed element classified as a hardware H.264 video encoder.@@ -21,10 +21,10 @@ sh native/capture/linux/build.sh /outside/repository/buildRuntime requirements are the desktop Portal/PipeWire services, a GStreamerPipeWire source, and an installed GStreamer hardware H.264 encoder. If any part-is unavailable, the Client reports no Linux Native path and the same Browser+is unavailable, the App reports no Linux Native path and the same Browsercapture choice remains available. These system libraries and services are notbundled; their distribution-provided license notices remain applicable. Linux-Client packages repeat the dependency and source links in+App packages repeat the dependency and source links in`THIRD-PARTY-NOTICES.txt`.Primary references:diff --git a/native/capture/linux/build.sh b/native/capture/linux/build.shindex 7a1be654..41adb204 100644--- a/native/capture/linux/build.sh+++ b/native/capture/linux/build.sh@@ -21,4 +21,4 @@ cc \gstreamer-1.0 \gstreamer-app-1.0 \gstreamer-video-1.0) \- -o "$output/piik-client-capture"+ -o "$output/piik-capture"diff --git a/native/capture/windows/README.md b/native/capture/windows/README.mdindex 8fadfa5e..2b1f8756 100644--- a/native/capture/windows/README.md+++ b/native/capture/windows/README.md@@ -1,6 +1,6 @@# Windows Capture Process-This isolated Windows process is the capture candidate for Piik Client. It+This isolated Windows process is the capture candidate for Piik App. Itenumerates local displays and visible top-level windows, binds each window toits PID and process creation time, and has independent modes for:@@ -25,7 +25,7 @@ Auto compares target-profile encoding work within a four-second selectionbudget; H.264 that meets the target needs no software comparison. The selectedcodec remains fixed across profile and source changes. VP8 reads the existingNV12 surface through one staging texture and uses the same encoded-frame-boundary. The process has no network fallback. The Client+boundary. The process has no network fallback. The Appconsumes the selected process or system-audio stream through its native mediaedge when the capability probe reports support. Build to the stable project`build/client-check` directory for a bounded capability run:diff --git a/native/capture/windows/build.ps1 b/native/capture/windows/build.ps1index 31d40ace..a5d52c16 100644--- a/native/capture/windows/build.ps1+++ b/native/capture/windows/build.ps1@@ -26,7 +26,7 @@ if ([string]::IsNullOrWhiteSpace($installationPath)) {}$developerCommand = Join-Path $installationPath 'Common7\Tools\VsDevCmd.bat'-$executablePath = Join-Path $outputPath 'piik-client-capture.exe'+$executablePath = Join-Path $outputPath 'piik-capture.exe'New-Item -ItemType Directory -Path $outputPath -Force | Out-Null$webrtc = & (Join-Path $helperDirectory 'get-webrtc.ps1')$includeFlags = @('', 'third_party\abseil-cpp', 'third_party\boringssl\src\include',diff --git a/native/fixtures/mf-h264-hardware/README.md b/native/fixtures/mf-h264-hardware/README.mdindex 37a4a90c..77cfa5ca 100644--- a/native/fixtures/mf-h264-hardware/README.md+++ b/native/fixtures/mf-h264-hardware/README.md@@ -1,7 +1,7 @@# Media Foundation H.264 Hardware FixtureThis is an offline Windows-only decision fixture. Its build compiles the same-Media Foundation encoder source used by Piik Client's Windows capture+Media Foundation encoder source used by Piik App's Windows captureprocess, under afixture-only macro for synthetic input and telemetry. The generated fixture isnot linked into the sender and does not contact a room, signaling service,diff --git a/native/probes/encoder-pool/README.md b/native/probes/encoder-pool/README.mdindex bbd6a27e..a124c574 100644--- a/native/probes/encoder-pool/README.md+++ b/native/probes/encoder-pool/README.md@@ -83,9 +83,9 @@ Export the first 180 real AUs from sender A for the opt-in Go forwarding check:```powershell& ./build/encoder-pool/probe/Release/encoder-pool-probe.exe `--pooled --group-adjuster --healthy-only --export build/encoder-pool/chain-input.jsonl-go test -c -o build/embedded-media/mediaedge.test.exe ./internal/client/mediaedge+go test -c -o build/embedded-media/mediaedge.test.exe ./internal/app/mediaedge$env:PIIK_POOL_CHAIN_FIXTURE = "$PWD/build/encoder-pool/chain-input.jsonl"-$env:PIIK_NATIVE_CAPTURE = "$PWD/build/client-check/piik-client-capture.exe"+$env:PIIK_NATIVE_CAPTURE = "$PWD/build/client-check/piik-capture.exe"$env:PIIK_POOL_CHAIN_OUTPUT = "$PWD/build/encoder-pool/chain-result.json"& ./build/embedded-media/mediaedge.test.exe `'-test.run=^TestRelayChainEncodedFixture$' '-test.v' '-test.timeout=30s'diff --git a/native/probes/encoder-pool/harness.cpp b/native/probes/encoder-pool/harness.cppindex f017d8d4..3044d046 100644--- a/native/probes/encoder-pool/harness.cpp+++ b/native/probes/encoder-pool/harness.cpp@@ -1,4 +1,4 @@-// Explicit synthetic experiment. Not part of Client, Server, unit tests or CI.+// Explicit synthetic experiment. Not part of App, Server, unit tests or CI.#include "pool.h"#include "h264_encoder_adapter.h"diff --git a/scripts/assemble-client.mjs b/scripts/assemble-client.mjsindex 220d8af7..0cb75427 100644--- a/scripts/assemble-client.mjs+++ b/scripts/assemble-client.mjs@@ -132,7 +132,7 @@ function readDescriptor(path) {function assertOutputDirectory(repositoryRoot, outputRoot, target) {const path = relative(repositoryRoot, outputRoot);const candidateOutput = join(repositoryRoot, "build", "client-package", target.id,- "candidate", `Piik-Client-${target.id}`);+ "candidate", `piik-app-${target.id}`);if (outputRoot !== candidateOutput &&(path === "" || (path.split(/[\\/]/)[0] !== ".." && !isAbsolute(path)))) {fail("Client output must be outside the repository or its exact candidate workspace");@@ -253,10 +253,10 @@ try {"build","-trimpath","-ldflags",- `-s -w -X github.com/TNTcraftHIM/Piik/internal/client/clientapp.BuildRevision=${revision}`,+ `-s -w -X github.com/TNTcraftHIM/Piik/internal/app.BuildRevision=${revision}`,"-o",clientPath,- "./cmd/piik-client",+ "./cmd/piik-app",], repositoryRoot, clientGoEnvironment(target));chmodSync(clientPath, 0o755);assertTargetExecutable(clientPath, target, "Client executable");@@ -266,7 +266,7 @@ try {packageRoot,target,revision,- iconPath: join(repositoryRoot, "cmd", "piik-client", "piik.ico"),+ iconPath: join(repositoryRoot, "cmd", "piik-app", "piik.ico"),});writeFileSync(join(packageRoot, "REVISION"), `${revision}\n`, "ascii");diff --git a/scripts/check-client.mjs b/scripts/check-client.mjsindex 3841d94b..279f2298 100644--- a/scripts/check-client.mjs+++ b/scripts/check-client.mjs@@ -73,7 +73,7 @@ function checkCore() {return true;});const builds = buildTargets.flatMap((target) =>- ["piik-client", "piik-peer-gate"].map((command) => ({ target, command })),+ ["piik-app", "piik-peer-gate"].map((command) => ({ target, command })),);builds.push({ target: SERVER_TARGET, command: "piik-server" });for (const { target, command } of builds) {@@ -146,13 +146,13 @@ function checkPlatformCapture() {buildRoot,"-Check",]);- executable = join(buildRoot, "piik-client-capture.exe");+ executable = join(buildRoot, "piik-capture.exe");} else if (process.platform === "darwin") {run("sh", [join(captureRoot, "darwin", "build.sh"), buildRoot]);- executable = join(buildRoot, "piik-client-capture");+ executable = join(buildRoot, "piik-capture");} else {run("sh", [join(captureRoot, "linux", "build.sh"), buildRoot]);- executable = join(buildRoot, "piik-client-capture");+ executable = join(buildRoot, "piik-capture");}if (!existsSync(executable)) {throw new Error("Native capture build did not produce its executable");@@ -205,4 +205,4 @@ function checkPlatformCapture() {if (mode !== "--capture-only") checkCore();if (mode !== "--core") checkPlatformCapture();-process.stdout.write("Piik Client checks passed.\n");+process.stdout.write("Piik App checks passed.\n");diff --git a/scripts/client-browser-fanout-gate.ts b/scripts/client-browser-fanout-gate.tsindex 32533671..d67d4031 100644--- a/scripts/client-browser-fanout-gate.ts+++ b/scripts/client-browser-fanout-gate.ts@@ -163,9 +163,9 @@ async function main(): Promise<void> {let stage = "startup", error: string | null = null;try {server = await startRoomServer(appPort, profile);- client = spawn(process.env.PIIK_CLIENT_EXE || join(BUILD_ROOT, "piik-client.exe"), [+ client = spawn(process.env.PIIK_CLIENT_EXE || join(BUILD_ROOT, "piik-app.exe"), ["--site", origin, "--config", join(profile, "client.json"),- "--capture-process", join(BUILD_ROOT, "piik-client-capture.exe"),+ "--capture-process", join(BUILD_ROOT, "piik-capture.exe"),], { windowsHide: true, stdio: "pipe", env: { ...process.env, PIIK_CLIENT_GATE_NO_BROWSER: "true" } });client.stderr.resume();let output = "";@@ -211,9 +211,9 @@ async function main(): Promise<void> {let invite = await evaluate<string>(cdp, host, "document.querySelector('.lr-invite-url').value", Date.now()+5000);const url = new URL(invite); url.host = `localhost:${appPort}`; invite = url.toString();const relayOrigin = `http://127.0.0.1:${appPort}`;- relayClient = spawn(process.env.PIIK_CLIENT_EXE || join(BUILD_ROOT,"piik-client.exe"), [+ relayClient = spawn(process.env.PIIK_CLIENT_EXE || join(BUILD_ROOT,"piik-app.exe"), ["--site", relayOrigin, "--config", join(profile,"relay-client.json"),- "--capture-process", join(BUILD_ROOT,"piik-client-capture.exe"),+ "--capture-process", join(BUILD_ROOT,"piik-capture.exe"),], { windowsHide:true, stdio:"pipe", env:{...process.env,PIIK_CLIENT_GATE_NO_BROWSER:"true"} });relayClient.stderr.resume(); let relayOutput="";relayClient.stdout.on("data", (chunk:Buffer) => {diff --git a/scripts/client-icons.mjs b/scripts/client-icons.mjsindex 94a8b182..a26f74df 100644--- a/scripts/client-icons.mjs+++ b/scripts/client-icons.mjs@@ -92,19 +92,19 @@ function writeLinuxAssets(packageRoot, entries) {mkdirSync(iconDirectory, { recursive: true });mkdirSync(applicationDirectory, { recursive: true });writeFileSync(- join(iconDirectory, "piik-client.png"),+ join(iconDirectory, "piik-app.png"),requireEntry(entries, 256),);writeFileSync(- join(applicationDirectory, "piik-client.desktop"),+ join(applicationDirectory, "piik-app.desktop"),["[Desktop Entry]","Version=1.0","Type=Application",- "Name=Piik Client",- "Exec=piik-client",- "TryExec=piik-client",- "Icon=piik-client",+ "Name=Piik App",+ "Exec=piik-app",+ "TryExec=piik-app",+ "Icon=piik-app","Terminal=false","Categories=Network;Utility;","StartupNotify=true",@@ -115,7 +115,7 @@ function writeLinuxAssets(packageRoot, entries) {}function writeMacAssets(packageRoot, revision, entries) {- const bundleRoot = join(packageRoot, "Piik Client.app");+ const bundleRoot = join(packageRoot, "Piik App.app");const contents = join(bundleRoot, "Contents");const macos = join(contents, "MacOS");const resources = join(contents, "Resources");@@ -129,12 +129,12 @@ function writeMacAssets(packageRoot, revision, entries) {'<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">','<plist version="1.0"><dict>',"<key>CFBundleDevelopmentRegion</key><string>en</string>",- "<key>CFBundleDisplayName</key><string>Piik Client</string>",- "<key>CFBundleExecutable</key><string>Launcher</string>",+ "<key>CFBundleDisplayName</key><string>Piik App</string>",+ "<key>CFBundleExecutable</key><string>launcher</string>","<key>CFBundleIconFile</key><string>piik.icns</string>",- "<key>CFBundleIdentifier</key><string>tv.piik.client</string>",+ "<key>CFBundleIdentifier</key><string>tv.piik.app</string>","<key>CFBundleInfoDictionaryVersion</key><string>6.0</string>",- "<key>CFBundleName</key><string>Piik Client</string>",+ "<key>CFBundleName</key><string>Piik App</string>","<key>CFBundlePackageType</key><string>APPL</string>","<key>CFBundleShortVersionString</key><string>1.0</string>","<key>NSScreenCaptureUsageDescription</key><string>Share a screen or application selected by you.</string>",@@ -145,14 +145,14 @@ function writeMacAssets(packageRoot, revision, entries) {].join("\n"),"utf8",);- const launcher = join(macos, "Launcher");+ const launcher = join(macos, "launcher");writeFileSync(launcher,["#!/bin/sh","set -eu",'base=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)',- 'exec "$base/../../../piik-client" "$@"',+ 'exec "$base/../../../piik-app" "$@"',"",].join("\n"),"utf8",@@ -170,8 +170,8 @@ export function writeClientPlatformAssets({if (target.goos === "linux") writeLinuxAssets(packageRoot, entries);if (target.goos === "darwin") writeMacAssets(packageRoot, revision, entries);return target.goos === "linux"- ? "share/applications/piik-client.desktop"+ ? "share/applications/piik-app.desktop": target.goos === "darwin"- ? "Piik Client.app"+ ? "Piik App.app": null;}diff --git a/scripts/client-link-gate.ts b/scripts/client-link-gate.tsindex e3522130..996f279c 100644--- a/scripts/client-link-gate.ts+++ b/scripts/client-link-gate.ts@@ -210,7 +210,7 @@ async function main(): Promise<void> {const port = await reservePort();const clientBinary = configuredClient || join(BUILD_ROOT,- process.platform === "win32" ? "piik-client.exe" : "piik-client",+ process.platform === "win32" ? "piik-app.exe" : "piik-app",);let client: ChildProcessWithoutNullStreams | null = null;let publicOrigin = "";@@ -236,7 +236,7 @@ async function main(): Promise<void> {} else {run("npm", ["run", "build:client"]);}- run(go, ["build", "-trimpath", "-o", clientBinary, "./cmd/piik-client"],+ run(go, ["build", "-trimpath", "-o", clientBinary, "./cmd/piik-app"],ROOT);}result.stage = "client-start";diff --git a/scripts/client-media-gate.ts b/scripts/client-media-gate.tsindex e84e0e50..466803b1 100644--- a/scripts/client-media-gate.ts+++ b/scripts/client-media-gate.ts@@ -734,7 +734,7 @@ async function main(): Promise<void> {"-OutputDirectory",buildRoot,]);- const executable = join(buildRoot, "piik-client-capture.exe");+ const executable = join(buildRoot, "piik-capture.exe");const probe = JSON.parse(run(executable, ["--probe"])) as Probe;const adapter = probe.adapters.find((candidate) => candidate.hardwareH264.length > 0);const encoder = adapter?.hardwareH264[0];@@ -859,9 +859,9 @@ async function main(): Promise<void> {await mkdir(nativeRoot, { recursive: true });await copyFile(executable,- join(nativeRoot, "piik-client-capture.exe"),+ join(nativeRoot, "piik-capture.exe"),);- const clientExecutable = join(packageRoot, "piik-client.exe");+ const clientExecutable = join(packageRoot, "piik-app.exe");const go = process.env.PIIK_GO?.trim() || "go";// The Client embeds the Vite output, so the Web build precedes the Go build.run(process.env.ComSpec || "cmd.exe", [@@ -869,7 +869,7 @@ async function main(): Promise<void> {], ROOT);run(go,- ["build", "-trimpath", "-o", clientExecutable, "./cmd/piik-client"],+ ["build", "-trimpath", "-o", clientExecutable, "./cmd/piik-app"],ROOT,);client = spawn(clientExecutable, [diff --git a/scripts/client-native-host-gate.ts b/scripts/client-native-host-gate.tsindex 273e1426..0c2d9743 100644--- a/scripts/client-native-host-gate.ts+++ b/scripts/client-native-host-gate.ts@@ -596,8 +596,8 @@ async function main(): Promise<void> {const sourceDebugPort = await reservePort();const clientConfig = join(profile, "client.json");const captureBuild = BUILD_ROOT;- const clientBinary = join(BUILD_ROOT, "piik-client.exe");- const captureBinary = join(captureBuild, "piik-client-capture.exe");+ const clientBinary = join(BUILD_ROOT, "piik-app.exe");+ const captureBinary = join(captureBuild, "piik-capture.exe");const remoteBinary = join(BUILD_ROOT, "piik-peer-gate-linux");let source: { close(): Promise<void> } | null = null;let client: ChildProcessWithoutNullStreams | null = null;@@ -669,7 +669,7 @@ async function main(): Promise<void> {process.stderr.write(`${JSON.stringify({ stage, status: "finished", at: new Date().toISOString() })}\n`);stage = "client-build";run(go, [- "build", "-p", "1", "-trimpath", "-o", clientBinary, "./cmd/piik-client",+ "build", "-p", "1", "-trimpath", "-o", clientBinary, "./cmd/piik-app",], ROOT, { ...process.env, GOMAXPROCS: "2" });if (remote) {stage = "remote-peer-build";diff --git a/scripts/client-package-targets.mjs b/scripts/client-package-targets.mjsindex f31a1dd9..996068e2 100644--- a/scripts/client-package-targets.mjs+++ b/scripts/client-package-targets.mjs@@ -8,9 +8,9 @@ export const CLIENT_PACKAGE_TARGETS = [goos: "windows",goarch: "amd64",cgo: false,- clientName: "piik-client.exe",+ clientName: "piik-app.exe",tunnelName: "cloudflared.exe",- captureName: "piik-client-capture.exe",+ captureName: "piik-capture.exe",tunnelAsset: "cloudflared-windows-amd64.exe",tunnelSha256: "83e726ed18ea78c5ad5213c4c3a3a27051393950d2bc8ed4de69bec12d14eaae",tunnelArchive: false,@@ -22,9 +22,9 @@ export const CLIENT_PACKAGE_TARGETS = [goos: "linux",goarch: "amd64",cgo: false,- clientName: "piik-client",+ clientName: "piik-app",tunnelName: "cloudflared",- captureName: "piik-client-capture",+ captureName: "piik-capture",tunnelAsset: "cloudflared-linux-amd64",tunnelSha256: "f29324fe934d1e100617484c78deef803c4dc2cd351d645bbde42e96b4fccc5e",tunnelArchive: false,@@ -36,9 +36,9 @@ export const CLIENT_PACKAGE_TARGETS = [goos: "darwin",goarch: "arm64",cgo: true,- clientName: "piik-client",+ clientName: "piik-app",tunnelName: "cloudflared",- captureName: "piik-client-capture",+ captureName: "piik-capture",tunnelAsset: "cloudflared-darwin-arm64.tgz",tunnelSha256: "40c9144d86df8937c5b43293a1f7d2d2107029aa74725023dd46b1b27154352f",tunnelArchive: true,diff --git a/scripts/embedded-sfu-gate.ts b/scripts/embedded-sfu-gate.tsindex fae20b07..25f876b6 100644--- a/scripts/embedded-sfu-gate.ts+++ b/scripts/embedded-sfu-gate.ts@@ -70,8 +70,8 @@ async function main(): Promise<void> {}await mkdir(BUILD_ROOT, { recursive: true });const binary = join(BUILD_ROOT, `piik-server${process.platform === "win32" ? ".exe" : ""}`);- const clientBinary = join(BUILD_ROOT, "piik-client.exe");- for (const command of nativeArm ? ["piik-server", "piik-client"] : ["piik-server"]) {+ const clientBinary = join(BUILD_ROOT, "piik-app.exe");+ for (const command of nativeArm ? ["piik-server", "piik-app"] : ["piik-server"]) {const build = spawnSync(process.env.PIIK_GO?.trim() || "go", ["build", "-p", "1", "-trimpath", "-o", command === "piik-server" ? binary : clientBinary, `./cmd/${command}`,], { cwd: ROOT, env: { ...process.env, GOMAXPROCS: "2" }, encoding: "utf8", windowsHide: true, timeout: 120_000 });diff --git a/scripts/encoded-group-decode.mjs b/scripts/encoded-group-decode.mjsindex 83bb2c6a..76cfcfa5 100644--- a/scripts/encoded-group-decode.mjs+++ b/scripts/encoded-group-decode.mjs@@ -63,9 +63,9 @@ const server = createServer(async (request, response) => {for (const path of ["go.mod", "go.sum", "internal/media/encoded/packetizer.go","internal/media/forwarding/source.go", "internal/media/forwarding/encoded_source.go","internal/media/forwarding/output.go", "internal/media/forwarding/transport.go",- "internal/client/mediaedge/engine.go", "internal/client/mediaedge/source.go",- "internal/client/mediaedge/edge.go", "internal/client/mediaedge/group_fixture_test.go",- "internal/client/mediaedge/relay_network_fixture_test.go", "internal/client/mediaedge/relay_derivation.go",+ "internal/app/mediaedge/engine.go", "internal/app/mediaedge/source.go",+ "internal/app/mediaedge/edge.go", "internal/app/mediaedge/group_fixture_test.go",+ "internal/app/mediaedge/relay_network_fixture_test.go", "internal/app/mediaedge/relay_derivation.go","native/capture/windows/encoded_group.fixture.cpp"]) {result.sources[path] = createHash("sha256").update(await readFile(new URL(`../${path}`, import.meta.url))).digest("hex");}diff --git a/scripts/package-client-candidate.mjs b/scripts/package-client-candidate.mjsindex 1e332873..830150e3 100644--- a/scripts/package-client-candidate.mjs+++ b/scripts/package-client-candidate.mjs@@ -262,7 +262,7 @@ async function verifyPackage(root, target, revision, temporaryRoot) {function verifyPlatformAssets(root, target) {if (target.goos === "linux") {- const desktop = join(root, "share", "applications", "piik-client.desktop");+ const desktop = join(root, "share", "applications", "piik-app.desktop");const icon = join(root,"share",@@ -270,12 +270,12 @@ function verifyPlatformAssets(root, target) {"hicolor","256x256","apps",- "piik-client.png",+ "piik-app.png",);if (!existsSync(desktop) || !existsSync(icon)) {fail("Linux Client icon assets are missing");}- if (!readFileSync(desktop, "utf8").includes("Icon=piik-client\n")) {+ if (!readFileSync(desktop, "utf8").includes("Icon=piik-app\n")) {fail("Linux desktop entry does not name its icon");}if (!readFileSync(icon).subarray(0, 8).equals(Buffer.from([@@ -285,8 +285,8 @@ function verifyPlatformAssets(root, target) {}}if (target.goos === "darwin") {- const bundle = join(root, "Piik Client.app");- const launcher = join(bundle, "Contents", "MacOS", "Launcher");+ const bundle = join(root, "Piik App.app");+ const launcher = join(bundle, "Contents", "MacOS", "launcher");const plist = join(bundle, "Contents", "Info.plist");const icon = join(bundle, "Contents", "Resources", "piik.icns");if (!existsSync(launcher) || !existsSync(plist) || !existsSync(icon)) {@@ -352,7 +352,7 @@ try {capture = join(repositoryRoot, "build", "client-check", target.captureName);}- const packageRoot = join(temporaryRoot, `Piik-Client-${target.id}`);+ const packageRoot = join(temporaryRoot, `piik-app-${target.id}`);const assembleArguments = [join(repositoryRoot, "scripts", "assemble-client.mjs"),applicationDescriptor(applicationRoot),@@ -368,7 +368,7 @@ try {mkdirSync(outputRoot, { recursive: false, mode: 0o700 });const shortRevision = revision.slice(0, 7);- const archiveName = `Piik-Client-${target.id}-${shortRevision}.tar.gz`;+ const archiveName = `piik-app-${target.id}-${shortRevision}.tar.gz`;const archive = join(outputRoot, archiveName);run(tarExecutable(), ["-czf", archive, "-C", packageRoot, "."], repositoryRoot);const digest = sha256(archive);diff --git a/scripts/package-licenses.mjs b/scripts/package-licenses.mjsindex 6c5b4e33..058c5e57 100644--- a/scripts/package-licenses.mjs+++ b/scripts/package-licenses.mjs@@ -122,8 +122,8 @@ export function writeClientLicenseNotices(repositoryRoot, packageRoot, goCommandwriteFileSync(join(packageRoot, "runtime", "tunnel", "THIRD-PARTY-NOTICES.txt"),pinnedNotice(`cloudflared@${tunnelVersion}`));}- const notices = goNotices(repositoryRoot, goCommand, target, "./cmd/piik-client");- let text = "Native Client third-party software notices\n" ++ const notices = goNotices(repositoryRoot, goCommand, target, "./cmd/piik-app");+ let text = "Piik App third-party software notices\n" +WEB_NOTICE_LINE +(tunnelVersion ? "Cloudflared: runtime/tunnel/THIRD-PARTY-NOTICES.txt\n" : "") +notices.toolchain;diff --git a/scripts/required-project-paths.txt b/scripts/required-project-paths.txtindex b2d33fc1..438f6872 100644--- a/scripts/required-project-paths.txt+++ b/scripts/required-project-paths.txt@@ -41,8 +41,8 @@ scripts/check-client.mjsscripts/client-native-host-gate.tscmd/piik-server/main.gocmd/piik-peer-gate/main.go-cmd/piik-client/piik.ico-cmd/piik-client/piik_windows_amd64.syso+cmd/piik-app/piik.ico+cmd/piik-app/piik_windows_amd64.sysointernal/server/webassets/dist/.gitkeepdeploy/release-app.shdeploy/check-release.shdiff --git a/src/client/App.tsx b/src/client/App.tsxindex 3b578bad..836b7b73 100644--- a/src/client/App.tsx+++ b/src/client/App.tsx@@ -45,8 +45,8 @@ const joinPageModule =appRoute.kind === "join" ? import("./pages/JoinPage") : null;const viewerPageModule =appRoute.kind === "viewer" ? import("./pages/ViewerPage") : null;-const clientLauncherPageModule =- appRoute.kind === "client" ? import("./pages/ClientLauncherPage") : null;+const appLauncherPageModule =+ appRoute.kind === "client" ? import("./pages/AppLauncherPage") : null;const HostPage = lazy(async () => ({default: (await (hostPageModule ?? import("./pages/HostPage"))).HostPage,}));@@ -57,10 +57,10 @@ const ViewerPage = lazy(async () => ({default: (await (viewerPageModule ?? import("./pages/ViewerPage"))).ViewerPage,}));-const ClientLauncherPage = lazy(async () => ({+const AppLauncherPage = lazy(async () => ({default: (await (- clientLauncherPageModule ?? import("./pages/ClientLauncherPage")- )).ClientLauncherPage,+ appLauncherPageModule ?? import("./pages/AppLauncherPage")+ )).AppLauncherPage,}));const SITE_ACCESS_RENEWAL_INTERVAL_MS = 60 * 60 * 1_000;@@ -136,7 +136,7 @@ function AppRoute() {return <TooltipPreviewPage />;}if (appRoute.kind === "client") {- return <ClientLauncherPage />;+ return <AppLauncherPage />;}if (appRoute.kind === "viewer" && viewerRoute) {return viewerRoute.viewerGrant ? (diff --git a/src/client/components/living/hints/set2.tsx b/src/client/components/living/hints/set2.tsxindex 89b225ef..1d52fa97 100644--- a/src/client/components/living/hints/set2.tsx+++ b/src/client/components/living/hints/set2.tsx@@ -261,7 +261,7 @@ ${rmBlock(</>);-// The Client's public-link choice reuses the established invite animation and+// The App's public-link choice reuses the established invite animation and// adds one small globe mark so the destination is clear without text.const HintClientLink: HintScene = ({ theme }) => (<>diff --git a/src/client/locales/en.ts b/src/client/locales/en.tsindex b613af5a..0306f01b 100644--- a/src/client/locales/en.ts+++ b/src/client/locales/en.ts@@ -75,7 +75,7 @@ export const en: Record<CopyKey, string> = {"host.sourcePicker.windowAudio": "Application sound","host.sourcePicker.systemAudio": "System sound","host.sourcePicker.empty": "No sources available",- "host.sourcePicker.nativeAudio": "Client · with sound",+ "host.sourcePicker.nativeAudio": "Piik App · with sound","host.sourcePicker.window": "Share window: {title}","host.sourcePicker.display": "Share screen: {title}","host.sourcePicker.system": "System screen or window picker",diff --git a/src/client/locales/zh.ts b/src/client/locales/zh.tsindex 47c9db4e..3a0096c8 100644--- a/src/client/locales/zh.ts+++ b/src/client/locales/zh.ts@@ -73,7 +73,7 @@ export const zh = {"host.sourcePicker.windowAudio": "应用声音","host.sourcePicker.systemAudio": "系统声音","host.sourcePicker.empty": "暂无可用来源",- "host.sourcePicker.nativeAudio": "Client · 含声音",+ "host.sourcePicker.nativeAudio": "Piik App · 含声音","host.sourcePicker.window": "分享窗口:{title}","host.sourcePicker.display": "分享屏幕:{title}","host.sourcePicker.system": "系统屏幕与窗口选择器",diff --git a/src/client/native/client.ts b/src/client/native/client.tsindex 188b185c..b4954bde 100644--- a/src/client/native/client.ts+++ b/src/client/native/client.ts@@ -84,7 +84,7 @@ export async function discoverNativeHealth(): Promise<NativeHealth | null> {return parsed.data;}} catch {- // An absent Client and a denied local-network permission are both+ // An absent App and a denied local-network permission are both// ordinary Browser-only operation.} finally {window.clearTimeout(timer);@@ -549,7 +549,7 @@ export class NativeClient {timeoutMs: number | null = REQUEST_TIMEOUT_MS,): Promise<T> {if (this.closed || this.socket.readyState !== WebSocket.OPEN) {- return Promise.reject(new Error("Piik Client is unavailable"));+ return Promise.reject(new Error("Piik App is unavailable"));}const id = createOpaqueId();const began = performance.now();@@ -561,7 +561,7 @@ export class NativeClient {: window.setTimeout(() => {this.pending.delete(id);debugEvent("native", "request-timeout", { ...details, durationMs: performance.now() - began });- rejectRequest(new Error("Piik Client request timed out"));+ rejectRequest(new Error("Piik App request timed out"));}, timeoutMs);this.pending.set(id, {schema,@@ -589,7 +589,7 @@ export class NativeClient {if (timer !== null) window.clearTimeout(timer);this.pending.delete(id);debugError("native", "request-failed", error, { ...details, durationMs: performance.now() - began });- rejectRequest(new Error("Piik Client request failed"));+ rejectRequest(new Error("Piik App request failed"));}});}@@ -611,14 +611,14 @@ export class NativeClient {if (pending.timer !== null) window.clearTimeout(pending.timer);const failure = requestFailedResponseSchema.safeParse(value);if (failure.success) {- pending.reject(new Error("Piik Client request failed", { cause: { code: failure.data.code } }));+ pending.reject(new Error("Piik App request failed", { cause: { code: failure.data.code } }));return;}const parsed = pending.schema.safeParse(value);if (parsed.success) {pending.resolve(parsed.data);} else {- pending.reject(new Error("Piik Client response is invalid", { cause: parsed.error }));+ pending.reject(new Error("Piik App response is invalid", { cause: parsed.error }));}return;}@@ -655,7 +655,7 @@ export class NativeClient {private rejectPending(): void {for (const request of this.pending.values()) {if (request.timer !== null) window.clearTimeout(request.timer);- request.reject(new Error("Piik Client disconnected"));+ request.reject(new Error("Piik App disconnected"));}this.pending.clear();}diff --git a/src/client/native/media-ingress.ts b/src/client/native/media-ingress.tsindex 7d8ed971..30d0c6de 100644--- a/src/client/native/media-ingress.ts+++ b/src/client/native/media-ingress.ts@@ -30,7 +30,7 @@ export interface NativeMediaIngressControl {onEvent(listener: (event: NativeClientEvent) => void): () => void;}-/** One ordinary Browser sender supplies the Client's encoded fanout source. */+/** One ordinary Browser sender supplies the App's encoded fanout source. */export class NativeMediaIngress {readonly connectionId = createOpaqueId();readonly source: NativeSenderSource = {diff --git a/src/client/native/native-sfu-publisher.ts b/src/client/native/native-sfu-publisher.tsindex dab55762..b8d6a899 100644--- a/src/client/native/native-sfu-publisher.ts+++ b/src/client/native/native-sfu-publisher.ts@@ -17,7 +17,7 @@ type PublicationControl = Pick<| "onEvent">;-// The page owns room signaling. The Client publishes its existing encoded source.+// The page owns room signaling. The App publishes its existing encoded source.export class NativeSfuPublisher implements HostPublisherTransport {private config: SfuConnectionConfig | null = null;private pending: Array<diff --git a/src/client/pages/ClientLauncherPage.tsx b/src/client/pages/AppLauncherPage.tsxsimilarity index 98%rename from src/client/pages/ClientLauncherPage.tsxrename to src/client/pages/AppLauncherPage.tsxindex 0639a0e6..d8f9d231 100644--- a/src/client/pages/ClientLauncherPage.tsx+++ b/src/client/pages/AppLauncherPage.tsx@@ -13,7 +13,7 @@ import {type ReleaseUpdateNotice,} from "../lib/release-update";-type ClientMode = "local" | "link" | "site";+type AppMode = "local" | "link" | "site";const launcherStateSchema = z.object({@@ -26,7 +26,7 @@ const launcherStateSchema = zconst launcherResultSchema = z.object({ target: z.string().url() }).strict();const MODES: Array<{- mode: ClientMode;+ mode: AppMode;icon: GlyphName;label: CopyKey;hint: CopyKey;@@ -55,11 +55,11 @@ const MODES: Array<{},];-export function ClientLauncherPage() {+export function AppLauncherPage() {const { lang, vis, t } = useCopy();const [loading, setLoading] = useState(true);const [starting, setStarting] = useState(false);- const [mode, setMode] = useState<ClientMode>("local");+ const [mode, setMode] = useState<AppMode>("local");const [site, setSite] = useState("");const [localAccessPassword, setLocalAccessPassword] = useState("");const [error, setError] = useState<null | "load" | "launch">(null);diff --git a/src/client/pages/HostPage.tsx b/src/client/pages/HostPage.tsxindex e7f5a3be..e07fac46 100644--- a/src/client/pages/HostPage.tsx+++ b/src/client/pages/HostPage.tsx@@ -1251,7 +1251,7 @@ export function HostPage({await nativeShareCleanupRef.current;await nativePreviewTailRef.current;if (!isCurrentShare(generation, shareGeneration)) return null;- if (nativeClientRef.current !== client) throw new Error("Piik Client is unavailable");+ if (nativeClientRef.current !== client) throw new Error("Piik App is unavailable");const started = await client.startShare({shareId: shareGeneration,source: target,@@ -1267,7 +1267,7 @@ export function HostPage({await client.stopShare(shareGeneration).catch(() => discardNativeClient(client));return null;}- if (nativeClientRef.current !== client) throw new Error("Piik Client is unavailable");+ if (nativeClientRef.current !== client) throw new Error("Piik App is unavailable");videoCodecRef.current = manualVideoCodecPreference(started.codec);bridge = new NativeMediaBridge(shareGeneration,diff --git a/src/client/styles.css b/src/client/styles.cssindex 4c4bfada..5e78e680 100644--- a/src/client/styles.css+++ b/src/client/styles.css@@ -525,7 +525,7 @@ body.lr-theater-open { overflow: hidden; }.lr-entry-actions { display: flex; gap: 18px; flex-wrap: wrap; justify-content: center; }.lr-entry-action { display: grid; justify-items: center; gap: 8px; align-content: start; }-/* Client capture source picker */+/* App capture source picker */.lr-source-picker {place-content: stretch;justify-items: stretch;diff --git a/tests/client-state.test.ts b/tests/client-state.test.tsindex 46e36d65..3d7a3dd6 100644--- a/tests/client-state.test.ts+++ b/tests/client-state.test.ts@@ -887,7 +887,7 @@ describe("room codes", () => {expect(parseAppRoute("/other")).toEqual({ kind: "unknown" });});- it("consumes one exact Client access bootstrap without retaining it in the URL", () => {+ it("consumes one exact App access bootstrap without retaining it in the URL", () => {const replaceState = vi.fn();vi.stubGlobal("window", {location: {@@ -909,7 +909,7 @@ describe("room codes", () => {);});- it("removes a malformed Client bootstrap without authenticating it", () => {+ it("removes a malformed App bootstrap without authenticating it", () => {const replaceState = vi.fn();vi.stubGlobal("window", {location: { hash: "#client-access=short", pathname: "/", search: "" },@@ -920,7 +920,7 @@ describe("room codes", () => {expect(replaceState).toHaveBeenCalledWith(null, "", "/");});- it("accepts a bounded user-chosen Client access value", () => {+ it("accepts a bounded user-chosen App access value", () => {const replaceState = vi.fn();vi.stubGlobal("window", {location: {@@ -935,7 +935,7 @@ describe("room codes", () => {expect(replaceState).toHaveBeenCalledWith(null, "", "/");});- it("consumes the Client launch marker from a server-private fragment", () => {+ it("consumes the App launch marker from a server-private fragment", () => {const replaceState = vi.fn();const session = new Map<string, string>();vi.stubGlobal("window", {diff --git a/tests/host-quality-ownership.test.ts b/tests/host-quality-ownership.test.tsindex 9d5e9cac..af68a5c2 100644--- a/tests/host-quality-ownership.test.ts+++ b/tests/host-quality-ownership.test.ts@@ -159,7 +159,7 @@ describe("Host quality ownership", () => {expect(createPeer).toHaveBeenCalledOnce();});- it("keeps Browser capture immediate and Client selection reachable after absent discovery", async () => {+ it("keeps Browser capture immediate and App selection reachable after absent discovery", async () => {const browser = fixture(false);browser.nativeClientRef.current = null;browser.requestShare();@@ -188,7 +188,7 @@ describe("Host quality ownership", () => {expect(current.openCaptureSourcePicker).toHaveBeenCalledTimes(2);});- it("fails the full startup before room creation when Client retires during cleanup", async () => {+ it("fails the full startup before room creation when App retires during cleanup", async () => {const current = fixture();current.context.phase = "idle";current.activeGenerationRef.current = null;@@ -249,7 +249,7 @@ describe("Host quality ownership", () => {expect(current.setNativeActive).not.toHaveBeenCalled();});- it("ignores a stale listing failure after a newer picker owns the Client", async () => {+ it("ignores a stale listing failure after a newer picker owns the App", async () => {const current = fixture();current.nativeShareGenerationRef.current = null;const listing = deferred<never>();diff --git a/tests/native-client.test.ts b/tests/native-client.test.tsindex 20e6b37d..cdc5fb95 100644--- a/tests/native-client.test.ts+++ b/tests/native-client.test.ts@@ -18,8 +18,8 @@ afterEach(() => {vi.unstubAllGlobals();});-describe("native Client private wire", () => {- it("notifies only the current presentation request after Client discovery", async () => {+describe("native App private wire", () => {+ it("notifies only the current presentation request after App discovery", async () => {vi.stubGlobal("window", {setTimeout: globalThis.setTimeout,clearTimeout: globalThis.clearTimeout,@@ -112,7 +112,7 @@ describe("native Client private wire", () => {const unexpected = vi.fn();client!.onClose(unexpected);await expect(client!.updateShare("share_123456", DEFAULT_QUALITY_SETTINGS))- .rejects.toThrow("Piik Client request failed");+ .rejects.toThrow("Piik App request failed");await client!.ping();expect(sockets[0]!.close).not.toHaveBeenCalled();expect(unexpected).not.toHaveBeenCalled();diff --git a/tests/release-update.test.ts b/tests/release-update.test.tsindex cfc187ea..de927923 100644--- a/tests/release-update.test.ts+++ b/tests/release-update.test.ts@@ -17,7 +17,7 @@ const release = {html_url: `https://github.com/TNTcraftHIM/Piik/releases/tag/${latestRevision}`,};-describe("Client release update notice", () => {+describe("App release update notice", () => {it("compares a strict release identity without sending the current revision", async () => {const fetchImpl = vi.fn<typeof fetch>(async (input, init) => {expect(String(input)).toBe(DEFAULT_RELEASE_API_URL);diff --git a/tests/viewer-native-client-ownership.test.ts b/tests/viewer-native-client-ownership.test.tsindex ca6ecdce..b89834e2 100644--- a/tests/viewer-native-client-ownership.test.ts+++ b/tests/viewer-native-client-ownership.test.ts@@ -50,9 +50,9 @@ function fixture(launchedByClient = true) {};}-it.each([false, true])("retries an absent or rejected Client on the next offer: reject=%s", async (reject) => {+it.each([false, true])("retries an absent or rejected App on the next offer: reject=%s", async (reject) => {const current = fixture();- if (reject) current.connect.mockRejectedValueOnce(new Error("Client unavailable"));+ if (reject) current.connect.mockRejectedValueOnce(new Error("App unavailable"));await expect(current.acquire()).resolves.toBeNull();expect(current.connect).toHaveBeenCalledOnce();const client = control();@@ -65,7 +65,7 @@ it.each([false, true])("retries an absent or rejected Client on the next offer:expect(client.close).toHaveBeenCalledOnce();});-it("shares pending discovery and rediscovers after the idle Client disconnects", async () => {+it("shares pending discovery and rediscovers after the idle App disconnects", async () => {const current = fixture();const client = control();let resolve!: (value: typeof client) => void;