Skip to content

armgit / Piik

Public Imported from GitHub
0

Free, open-source screen sharing for private live streams with friends. Watch together in a browser or self-host Piik. 免费开源的私密屏幕共享,支持游戏直播、一起看电影与自部署。

feat: rename product and runtime to Piik

AAA1332473513d6
diff --git a/.env.example b/.env.example
index 37c43302..8867ceb1 100644
--- a/.env.example
+++ b/.env.example
@@ -20,7 +20,7 @@ MAX_VIEWERS_PER_ROOM=8
# A peer child or Host SFU publication consumes one copy. Valid values: 1, 2, 3.
ENDPOINT_MEDIA_COPY_CAPACITY=2
# During pre-release route canaries, this enables sanitized room/ordinal events.
-# SCREENER_DEBUG=route
+# PIIK_DEBUG=route
# Optional in-process automatic SFU fallback. Set SFU_UDP_PORT=7882 to enable;
# unset or empty keeps it disabled. Local Client modes never create this listener.
@@ -50,11 +50,11 @@ NAT_PREDICTION_ENABLED=false
# Development example (two processes): Vite serves the Browser on 8787 and
# proxies /api, /healthz and /signal to the Go server on 8788. Keep
# PUBLIC_BASE_URL and ALLOWED_ORIGINS on the Browser origin above.
-# SCREENER_ENV=development
+# PIIK_ENV=development
# PORT=8788
# Minimal production example (use independent untracked secrets):
-# SCREENER_ENV=production
+# PIIK_ENV=production
# SITE_ACCESS_PASSWORD=replace-with-an-independent-access-key
# STUN_URLS=stun:stun.example.com:3478
# NAT_PREDICTION_ENABLED=true
diff --git a/.github/workflows/repository-hygiene.yml b/.github/workflows/repository-hygiene.yml
index e9db5ef3..9d47e024 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 Screener Client checks
+ description: Run the optional Piik Client checks
required: false
default: false
type: boolean
@@ -31,7 +31,7 @@ jobs:
- name: Validate tracked project state
run: sh scripts/check-project-state.sh
env:
- SCREENER_BASE_SHA: ${{ github.event.pull_request.base.sha || github.event.before }}
+ PIIK_BASE_SHA: ${{ github.event.pull_request.base.sha || github.event.before }}
- name: Install dependencies
run: npm ci
# The Go build embeds internal/server/webassets/dist, so Vite runs first.
@@ -83,7 +83,7 @@ jobs:
- name: Upload application release
uses: actions/upload-artifact@v7
with:
- name: screener-app-${{ github.sha }}
+ name: piik-app-${{ github.sha }}
path: ${{ runner.temp }}/app-release/*
if-no-files-found: error
retention-days: 14
@@ -142,7 +142,7 @@ jobs:
- name: Download application release
uses: actions/download-artifact@v8
with:
- name: screener-app-${{ github.sha }}
+ name: piik-app-${{ github.sha }}
path: ${{ runner.temp }}/app-release
- name: Build and verify Client candidate
run: >-
@@ -153,7 +153,7 @@ jobs:
- name: Upload Client release candidate
uses: actions/upload-artifact@v7
with:
- name: screener-client-${{ matrix.target }}-${{ github.sha }}
+ name: piik-client-${{ matrix.target }}-${{ github.sha }}
path: ${{ runner.temp }}/client-release/*
if-no-files-found: error
compression-level: 0
diff --git a/AGENTS.md b/AGENTS.md
index b23e853d..62ff490d 100644
--- a/AGENTS.md
+++ b/AGENTS.md
@@ -23,7 +23,7 @@
## Product Contract
-- Screener is private game screen sharing for one Host and up to 20 authenticated
+- Piik is private game screen sharing for one Host and up to 20 authenticated
Viewers, with Web Host/Viewer/relay as the current product surface.
- Current product truth is split by owner:
[rooms/access](./docs/product/rooms-access.md),
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index c32205f5..4e67ffcd 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -55,7 +55,7 @@ Clean up worktrees and branches only after semantic review and integration are c
- 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.
- Review licenses before copying implementation code. A useful reference is not automatically a compatible dependency.
-- Screener-owned code is [MIT-licensed](./LICENSE); third-party components retain
+- Piik-owned code is [MIT-licensed](./LICENSE); third-party components retain
their own licenses and notices. GPL/AGPL implementation sources remain
study-only unless a separate distribution decision accepts their obligations.
diff --git a/LICENSE b/LICENSE
index 321ba7b3..6e6345a2 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,6 +1,6 @@
MIT License
-Copyright (c) 2026 TNTcraft and Screener contributors
+Copyright (c) 2026 TNTcraft and Piik contributors
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff --git a/LICENSE.zh-CN.md b/LICENSE.zh-CN.md
index a3c56bbf..30716557 100644
--- a/LICENSE.zh-CN.md
+++ b/LICENSE.zh-CN.md
@@ -4,10 +4,10 @@ The authoritative license is the English [LICENSE](./LICENSE).
This translation is for convenience and adds no terms or restrictions.
本文件为方便阅读提供中文参考译文,不替代英文 [LICENSE](./LICENSE),
-也不增加条件或限制。Screener 自有代码的 MIT 许可不替代
+也不增加条件或限制。Piik 自有代码的 MIT 许可不替代
[第三方组件的许可与声明](./licenses/README.md)。
-版权所有 (c) 2026 TNTcraft 和 Screener 贡献者
+版权所有 (c) 2026 TNTcraft 和 Piik 贡献者
特此免费授予任何获得本软件及相关文档文件(以下简称“软件”)副本的人,
不受限制地处置本软件的权利,包括但不限于使用、复制、修改、合并、出版、
diff --git a/README.md b/README.md
index 1672b0eb..36796842 100644
--- a/README.md
+++ b/README.md
@@ -1,18 +1,18 @@
-<img src="./public/favicon.svg" width="64" height="64" alt="Screener TV logo">
+<img src="./public/favicon.svg" width="64" height="64" alt="Piik TV logo">
-# Screener
+# Piik
English | [简体中文](./README.zh-CN.md)
Share your screen. Bring your friends.
-Screener is private screen sharing for one Host and up to 20 invited friends.
+Piik is private screen sharing for one Host and up to 20 invited friends.
Friends watch in their browsers, with no installation.
```mermaid
flowchart LR
Browser[Browser] --> Host[Host a room]
- Client[Screener Client] --> Host
+ Client[Piik Client] --> Host
Host -->|Invite link| Friends[Friends watch in browsers]
```
@@ -21,12 +21,12 @@ flowchart LR
1. Open the invitation your friend sent.
2. Press Play if your browser asks. Use the video's sound and fullscreen controls.
-Got a room code instead? Open the same Screener site and choose **Join a room**.
+Got a room code instead? Open the same Piik site and choose **Join a room**.
Site access and the room's password settings still apply.
## Share from your browser
-1. Open the Screener site your group uses. Enter its site password if asked.
+1. Open the Piik site your group uses. Enter its site password if asked.
2. Choose **Start sharing**, pick a screen, window or tab, and check the sound switch.
3. Send the room's invitation link to your friends. Keep the sharing tab open.
@@ -39,20 +39,20 @@ same controls, with light and dark themes.
With a Client package for your platform:
1. Extract the whole package, keeping `runtime` beside the executable.
-2. Open `screener-client.exe` on Windows, `Screener Client.app` on macOS, or
- `./screener-client` on Linux.
+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.
| 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 Screener site, with Client capture and media capabilities available in the same browser UI. |
+| **Connect to Site** | An existing Piik site, with Client capture and media capabilities available in the same browser UI. |
Client opens your system browser. Its package includes the Go application and
capture/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/screener-client/README.md) for platform details.
+See the [Client guide](./cmd/piik-client/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
@@ -75,9 +75,9 @@ 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`
before any `#` in the Browser page URL and use its header download button. Review reports before
sharing; see [diagnostics and export](./docs/reference/configuration.md#diagnostics).
-Connection trouble? Try the [Chromium WebRTC FAQ](./cmd/screener-client/README.md#chromium-webrtc-connections).
+Connection trouble? Try the [Chromium WebRTC FAQ](./cmd/piik-client/README.md#chromium-webrtc-connections).
## License
-Screener-owned code is [MIT licensed](./LICENSE). Third-party components retain
+Piik-owned code is [MIT licensed](./LICENSE). Third-party components retain
their own licenses and notices: [licensing guide](./licenses/README.md).
diff --git a/README.zh-CN.md b/README.zh-CN.md
index d3f7b0bc..4e463bd6 100644
--- a/README.zh-CN.md
+++ b/README.zh-CN.md
@@ -1,18 +1,18 @@
-<img src="./public/favicon.svg" width="64" height="64" alt="Screener 小电视标志">
+<img src="./public/favicon.svg" width="64" height="64" alt="Piik 小电视标志">
-# Screener
+# Piik
[English](./README.md) | 简体中文
分享你的屏幕,叫上朋友一起看。
-Screener 是一个私密屏幕分享工具:一位房主,最多 20 位受邀好友。
+Piik 是一个私密屏幕分享工具:一位房主,最多 20 位受邀好友。
朋友用浏览器就能观看,无须安装。
```mermaid
flowchart LR
Browser[浏览器] --> Host[开房分享]
- Client[Screener Client] --> Host
+ Client[Piik Client] --> Host
Host -->|邀请链接| Friends[好友用浏览器观看]
```
@@ -21,12 +21,12 @@ flowchart LR
1. 打开朋友发来的邀请链接。
2. 如果浏览器提示,点击播放。声音和全屏由视频控件控制。
-只有房间号?打开同一个 Screener 站点,选择 **加入房间**。
+只有房间号?打开同一个 Piik 站点,选择 **加入房间**。
站点访问权限和房间密码设置仍然适用。
## 用浏览器分享
-1. 打开你们使用的 Screener 站点,按提示输入站点密码。
+1. 打开你们使用的 Piik 站点,按提示输入站点密码。
2. 点击 **开始分享**,选择屏幕、窗口或标签页,并检查声音开关。
3. 把房间邀请链接发给朋友,保持分享标签页打开。
@@ -38,19 +38,19 @@ flowchart LR
拿到对应平台的 Client 程序包后:
1. 完整解压,保留可执行文件旁的 `runtime` 目录。
-2. Windows 打开 `screener-client.exe`,macOS 打开 `Screener Client.app`,
- Linux 运行 `./screener-client`。
+2. Windows 打开 `piik-client.exe`,macOS 打开 `Piik Client.app`,
+ Linux 运行 `./piik-client`。
3. 选择模式和分享来源,发出邀请。分享期间保持 Client 运行。
| 模式 | 适合什么情况 |
| --- | --- |
| **本地房间** | 与同一局域网内的好友分享,可设置站点访问密码。 |
| **公网邀请** | 生成本次 Client 运行期间有效的临时邀请链接;媒体仍走 P2P。 |
-| **连接站点** | 使用已有 Screener 站点,并在同一浏览器界面使用 Client 的采集与媒体能力。 |
+| **连接站点** | 使用已有 Piik 站点,并在同一浏览器界面使用 Client 的采集与媒体能力。 |
Client 会打开系统浏览器。程序包包含 Go 应用和采集、临时链接辅助程序,
运行时无须安装 Node.js、npm 或 Go。Linux 原生采集使用系统的 Portal、PipeWire
-和 GStreamer,平台细节见 [Client 指南](./cmd/screener-client/README.md)。
+和 GStreamer,平台细节见 [Client 指南](./cmd/piik-client/README.md)。
临时公网链接使用 Cloudflare Quick Tunnel,不保证持续可用。
媒体需要可用的 UDP 路径;网络限制、浏览器或系统挂起都可能中断分享。
@@ -71,9 +71,9 @@ SFU 后备路径。搭建自己的站点,请看 [自托管指南](./docs/opera
Client 可用 `--debug` 启动后按 `D` 导出本地报告;浏览器网址加上 `?debug=1`
后(放在 `#` 之前),可点击顶部下载按钮。分享前请检查报告内容,详见
[诊断与导出](./docs/reference/configuration.md#diagnostics)。
-连接不上时,也可以查看 [Chromium WebRTC 常见问题](./cmd/screener-client/README.md#chromium-webrtc-connections)。
+连接不上时,也可以查看 [Chromium WebRTC 常见问题](./cmd/piik-client/README.md#chromium-webrtc-connections)。
## 许可
-Screener 自有代码采用 [MIT 许可](./LICENSE),提供 [中文参考译文](./LICENSE.zh-CN.md)。
+Piik 自有代码采用 [MIT 许可](./LICENSE),提供 [中文参考译文](./LICENSE.zh-CN.md)。
第三方组件保留各自的许可与声明,详见 [许可说明](./licenses/README.md)。
diff --git a/cmd/screener-client/README.md b/cmd/piik-client/README.md
similarity index 87%
rename from cmd/screener-client/README.md
rename to cmd/piik-client/README.md
index d6dc77f4..c2adab78 100644
--- a/cmd/screener-client/README.md
+++ b/cmd/piik-client/README.md
@@ -1,14 +1,14 @@
-# Screener Client
+# Piik Client
-Screener Client is the self-contained and native-capability runtime for the same
-Browser application used by Hosted Screener. It does not implement another UI,
+Piik Client is the self-contained and native-capability runtime for the same
+Browser application used by Hosted Piik. It does not implement another UI,
room store, signaling protocol, or route controller.
## Run A Package
Extract the matching platform bundle in full and keep `runtime` beside the
-Client executable. Run `screener-client.exe` on Windows, `./screener-client` on
-Linux, or `Screener Client.app` on macOS. The launcher opens in the system Browser;
+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,
or Go installation. Linux native capture uses the system dependencies described
in the [Linux capture guide](../../native/capture/linux/README.md).
@@ -111,7 +111,7 @@ to one Browser brand or to VPN use.
Check the Browser's WebRTC/IP-handling policy and any extension's WebRTC or
IP-leak protection setting. Restore a policy that permits WebRTC UDP, reload
-Screener, and verify that another extension or managed policy has not overridden
+Piik, and verify that another extension or managed policy has not overridden
the choice. Setting names and availability differ between Browsers. For example,
Vivaldi exposes **Settings > Privacy and Security > WebRTC IP Handling >
Broadcast IP for Best WebRTC Performance**. Changing this policy can expose
@@ -139,7 +139,7 @@ The binary embeds the Browser assets, so build them before running it:
npm run build:client
go test ./...
go vet ./...
-go run ./cmd/screener-client
+go run ./cmd/piik-client
```
The repository-level entry used locally and by CI is:
@@ -200,11 +200,11 @@ explicit CI packaging, Release publication and updates are documented in
The extracted bundle contains:
```text
-screener-client[.exe]
+piik-client[.exe]
REVISION
LICENSE
THIRD-PARTY-NOTICES.txt
-runtime/native/screener-client-capture[.exe] # supported native-media packages
+runtime/native/piik-client-capture[.exe] # supported native-media packages
runtime/tunnel/cloudflared[.exe] # packages that support --link
```
@@ -212,11 +212,11 @@ The executable embeds the Browser assets of the consumed application release and
carries that same full Git revision as the package `REVISION`. No compatibility
reader accepts a mismatched private build.
-The Windows Client embeds the shared Screener mark through the
-`cmd/screener-client/screener_windows_amd64.syso` resource; the platform
+The Windows Client embeds the shared Piik mark through the
+`cmd/piik-client/piik_windows_amd64.syso` resource; the platform
suffix 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 `Screener Client.app` launcher
+hicolor icon. macOS packages include a thin `Piik Client.app` launcher
with 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
@@ -235,53 +235,53 @@ and without Chromium Local Network Access permission. Environment syntax below
is POSIX; use equivalent variables on Windows.
```sh
-SCREENER_CLIENT_LOCAL_GATE=true \
+PIIK_CLIENT_LOCAL_GATE=true \
CHROME_PATH=/path/to/chrome \
-SCREENER_CLIENT_EXE=/path/to/screener-client \
-SCREENER_CLIENT_GATE_LAN_ADDRESS=192.168.1.10 \
+PIIK_CLIENT_EXE=/path/to/piik-client \
+PIIK_CLIENT_GATE_LAN_ADDRESS=192.168.1.10 \
npm run gate:client-local
-SCREENER_CLIENT_LOOPBACK_GATE=true \
+PIIK_CLIENT_LOOPBACK_GATE=true \
CHROME_PATH=/path/to/chrome \
-SCREENER_CLIENT_EXE=/path/to/screener-client \
+PIIK_CLIENT_EXE=/path/to/piik-client \
npm run probe:client-loopback
-SCREENER_CLIENT_MEDIA_GATE=true \
+PIIK_CLIENT_MEDIA_GATE=true \
CHROME_PATH=/path/to/chrome \
-SCREENER_CLIENT_GATE_STUN_URLS=stun:<stun-host>:3478 \
+PIIK_CLIENT_GATE_STUN_URLS=stun:<stun-host>:3478 \
npm run gate:client-media
-SCREENER_CLIENT_NATIVE_HOST_GATE=true \
+PIIK_CLIENT_NATIVE_HOST_GATE=true \
CHROME_PATH=/path/to/chrome \
-SCREENER_GO=/path/to/go \
+PIIK_GO=/path/to/go \
npm run gate:client-native-host
-SCREENER_CLIENT_NATIVE_HOST_GATE=true \
-SCREENER_CLIENT_CROSS_NAT_GATE=true \
+PIIK_CLIENT_NATIVE_HOST_GATE=true \
+PIIK_CLIENT_CROSS_NAT_GATE=true \
CHROME_PATH=/path/to/chrome \
-SCREENER_GO=/path/to/go \
-SCREENER_REMOTE_HOST=<public-test-host> \
-SCREENER_REMOTE_USER=<ssh-user> \
-SCREENER_REMOTE_SSH_KEY=/path/to/key \
-SCREENER_CLIENT_GATE_STUN_URLS=stun:<stun-host>:3478 \
+PIIK_GO=/path/to/go \
+PIIK_REMOTE_HOST=<public-test-host> \
+PIIK_REMOTE_USER=<ssh-user> \
+PIIK_REMOTE_SSH_KEY=/path/to/key \
+PIIK_CLIENT_GATE_STUN_URLS=stun:<stun-host>:3478 \
npm run gate:client-native-host
-SCREENER_CLIENT_NATIVE_HOST_GATE=true \
-SCREENER_CLIENT_LINK_MEDIA_GATE=true \
+PIIK_CLIENT_NATIVE_HOST_GATE=true \
+PIIK_CLIENT_LINK_MEDIA_GATE=true \
CHROME_PATH=/path/to/chrome \
-SCREENER_GO=/path/to/go \
-SCREENER_CLOUDFLARED=/path/to/cloudflared \
-SCREENER_REMOTE_HOST=<public-test-host> \
-SCREENER_REMOTE_USER=<ssh-user> \
-SCREENER_REMOTE_SSH_KEY=/path/to/key \
+PIIK_GO=/path/to/go \
+PIIK_CLOUDFLARED=/path/to/cloudflared \
+PIIK_REMOTE_HOST=<public-test-host> \
+PIIK_REMOTE_USER=<ssh-user> \
+PIIK_REMOTE_SSH_KEY=/path/to/key \
npm run gate:client-native-host
-SCREENER_CLIENT_LINK_GATE=true \
-SCREENER_GO=/path/to/go \
-SCREENER_CLOUDFLARED=/path/to/cloudflared \
-SCREENER_REMOTE_HOST=<public-test-host> \
-SCREENER_REMOTE_USER=<ssh-user> \
-SCREENER_REMOTE_SSH_KEY=/path/to/key \
+PIIK_CLIENT_LINK_GATE=true \
+PIIK_GO=/path/to/go \
+PIIK_CLOUDFLARED=/path/to/cloudflared \
+PIIK_REMOTE_HOST=<public-test-host> \
+PIIK_REMOTE_USER=<ssh-user> \
+PIIK_REMOTE_SSH_KEY=/path/to/key \
npm run gate:client-link
```
diff --git a/cmd/screener-client/main.go b/cmd/piik-client/main.go
similarity index 77%
rename from cmd/screener-client/main.go
rename to cmd/piik-client/main.go
index 2d00bec2..bee3ae6e 100644
--- a/cmd/screener-client/main.go
+++ b/cmd/piik-client/main.go
@@ -1,5 +1,5 @@
-// Command screener-client is the self-contained Screener Client: it opens a
-// configured Screener Site, or runs the Local room authority in-process
+// Command piik-client is the self-contained Piik Client: 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
// lifecycle.
@@ -13,12 +13,12 @@ import (
"os/signal"
"syscall"
- "github.com/TNTcraftHIM/Screener/internal/client/clientapp"
+ "github.com/TNTcraftHIM/Piik/internal/client/clientapp"
)
func main() {
var options clientapp.Options
- flag.Func("site", "save and open a Screener Site origin", func(value string) error {
+ flag.Func("site", "save and open a Piik Site origin", func(value string) error {
options.Site = value
options.SiteSet = true
return nil
@@ -26,14 +26,14 @@ 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.StringVar(&options.LogDir, "log-dir", "", "diagnostic directory (overrides SCREENER_LOG_DIR)")
+ 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.LANAddress, "lan-address", "", "LAN IPv4 address used in Local invitations")
- flag.IntVar(&options.Port, "port", clientapp.DefaultLocalPort, "Local Screener server port")
+ flag.IntVar(&options.Port, "port", clientapp.DefaultLocalPort, "Local Piik server port")
flag.Parse()
- options.DisableBrowser = os.Getenv("SCREENER_CLIENT_GATE_NO_BROWSER") == "true"
+ options.DisableBrowser = os.Getenv("PIIK_CLIENT_GATE_NO_BROWSER") == "true"
ctx, stop := signal.NotifyContext(context.Background(), os.Interrupt, syscall.SIGTERM)
defer stop()
diff --git a/cmd/screener-client/screener.ico b/cmd/piik-client/piik.ico
similarity index 100%
rename from cmd/screener-client/screener.ico
rename to cmd/piik-client/piik.ico
diff --git a/cmd/screener-client/screener_windows_amd64.syso b/cmd/piik-client/piik_windows_amd64.syso
similarity index 100%
rename from cmd/screener-client/screener_windows_amd64.syso
rename to cmd/piik-client/piik_windows_amd64.syso
diff --git a/cmd/screener-peer-gate/main.go b/cmd/piik-peer-gate/main.go
similarity index 99%
rename from cmd/screener-peer-gate/main.go
rename to cmd/piik-peer-gate/main.go
index 5116dd6c..50d2065f 100644
--- a/cmd/screener-peer-gate/main.go
+++ b/cmd/piik-peer-gate/main.go
@@ -13,7 +13,7 @@ import (
"sync"
"time"
- "github.com/TNTcraftHIM/Screener/internal/server/protocol"
+ "github.com/TNTcraftHIM/Piik/internal/server/protocol"
"github.com/coder/websocket"
"github.com/coder/websocket/wsjson"
"github.com/pion/interceptor"
diff --git a/cmd/screener-peer-gate/main_test.go b/cmd/piik-peer-gate/main_test.go
similarity index 100%
rename from cmd/screener-peer-gate/main_test.go
rename to cmd/piik-peer-gate/main_test.go
diff --git a/cmd/screener-server/diagnostics_unix.go b/cmd/piik-server/diagnostics_unix.go
similarity index 89%
rename from cmd/screener-server/diagnostics_unix.go
rename to cmd/piik-server/diagnostics_unix.go
index 8548f31d..dc05ad02 100644
--- a/cmd/screener-server/diagnostics_unix.go
+++ b/cmd/piik-server/diagnostics_unix.go
@@ -7,7 +7,7 @@ import (
"os/signal"
"syscall"
- "github.com/TNTcraftHIM/Screener/internal/diagnostics"
+ "github.com/TNTcraftHIM/Piik/internal/diagnostics"
)
func watchDiagnosticExport(recorder *diagnostics.Recorder) func() {
diff --git a/cmd/screener-server/diagnostics_windows.go b/cmd/piik-server/diagnostics_windows.go
similarity index 72%
rename from cmd/screener-server/diagnostics_windows.go
rename to cmd/piik-server/diagnostics_windows.go
index c2687f3a..e731b900 100644
--- a/cmd/screener-server/diagnostics_windows.go
+++ b/cmd/piik-server/diagnostics_windows.go
@@ -1,6 +1,6 @@
package main
-import "github.com/TNTcraftHIM/Screener/internal/diagnostics"
+import "github.com/TNTcraftHIM/Piik/internal/diagnostics"
// Windows exports at orderly shutdown; it has no SIGUSR1 equivalent.
func watchDiagnosticExport(*diagnostics.Recorder) func() { return func() {} }
diff --git a/cmd/screener-server/main.go b/cmd/piik-server/main.go
similarity index 87%
rename from cmd/screener-server/main.go
rename to cmd/piik-server/main.go
index 395774e9..ae18948a 100644
--- a/cmd/screener-server/main.go
+++ b/cmd/piik-server/main.go
@@ -1,4 +1,4 @@
-// Command screener-server is the Hosted Screener entry point: it loads the
+// Command piik-server is the Hosted Piik entry point: it loads the
// environment, serves the embedded Browser UI together with the signaling and
// room API, and stops on SIGINT or SIGTERM. It replaces src/server/index.ts.
//
@@ -23,10 +23,10 @@ import (
"syscall"
"time"
- "github.com/TNTcraftHIM/Screener/internal/diagnostics"
- "github.com/TNTcraftHIM/Screener/internal/server/app"
- "github.com/TNTcraftHIM/Screener/internal/server/config"
- "github.com/TNTcraftHIM/Screener/internal/server/webassets"
+ "github.com/TNTcraftHIM/Piik/internal/diagnostics"
+ "github.com/TNTcraftHIM/Piik/internal/server/app"
+ "github.com/TNTcraftHIM/Piik/internal/server/config"
+ "github.com/TNTcraftHIM/Piik/internal/server/webassets"
)
// shutdownTimeout bounds the ordered stop (signaling, listener, room store).
@@ -81,11 +81,11 @@ func fail(err error) {
func serve(debug bool) (returnedErr error) {
logger := slog.New(slog.NewTextHandler(os.Stderr, &slog.HandlerOptions{ReplaceAttr: diagnostics.ReplaceAttr}))
var recorder *diagnostics.Recorder
- if debug || serverDebugEnabled(os.Getenv("SCREENER_DEBUG")) {
+ if debug || serverDebugEnabled(os.Getenv("PIIK_DEBUG")) {
var err error
recorder, err = diagnostics.Open(serverLogDirectory(), "server", BuildRevision)
if err != nil {
- return fmt.Errorf("Screener server diagnostics are unavailable: %w", err)
+ return fmt.Errorf("Piik server diagnostics are unavailable: %w", err)
}
logger = slog.New(slog.NewMultiHandler(logger.Handler(), recorder.Logger().Handler()))
previous, previousWriter, previousFlags := slog.Default(), log.Writer(), log.Flags()
@@ -93,18 +93,18 @@ func serve(debug bool) (returnedErr error) {
dependencyLog := diagnostics.Writer("stdlib")
log.SetOutput(dependencyLog)
log.SetFlags(previousFlags)
- fmt.Fprintln(os.Stderr, "Screener diagnostic log:", recorder.LogPath())
+ fmt.Fprintln(os.Stderr, "Piik diagnostic log:", recorder.LogPath())
stopExport := watchDiagnosticExport(recorder)
defer func() {
stopExport()
_ = dependencyLog.Close()
- logger.Info("screener-server", "event", "stopped", "failed", returnedErr != nil, diagnostics.Error(returnedErr))
+ logger.Info("piik-server", "event", "stopped", "failed", returnedErr != nil, diagnostics.Error(returnedErr))
returnedErr = errors.Join(returnedErr, exportServerDiagnostics(recorder), recorder.Close())
slog.SetDefault(previous)
log.SetOutput(previousWriter)
log.SetFlags(previousFlags)
}()
- logger.Info("screener-server", "event", "start", "revision", BuildRevision)
+ logger.Info("piik-server", "event", "start", "revision", BuildRevision)
}
configuration, err := config.Load(environment())
if err != nil {
@@ -133,7 +133,7 @@ func serve(debug bool) (returnedErr error) {
if err != nil {
return err
}
- fmt.Printf("Screener %s is listening on %s:%d; public URL %s\n",
+ fmt.Printf("Piik %s is listening on %s:%d; public URL %s\n",
BuildRevision, configuration.ListenHost, port, config.Origin(configuration.PublicBaseURL))
ctx, stop := signal.NotifyContext(context.Background(), os.Interrupt, syscall.SIGTERM)
@@ -155,7 +155,7 @@ func serverDebugEnabled(value string) bool {
}
func serverLogDirectory() string {
- if directory := strings.TrimSpace(os.Getenv("SCREENER_LOG_DIR")); directory != "" {
+ if directory := strings.TrimSpace(os.Getenv("PIIK_LOG_DIR")); directory != "" {
return directory
}
if directories := filepath.SplitList(os.Getenv("LOGS_DIRECTORY")); len(directories) > 0 && directories[0] != "" {
@@ -167,10 +167,10 @@ func serverLogDirectory() string {
func exportServerDiagnostics(recorder *diagnostics.Recorder) error {
path, err := recorder.Export()
if err != nil {
- fmt.Fprintln(os.Stderr, "Screener diagnostic export failed:", err)
+ fmt.Fprintln(os.Stderr, "Piik diagnostic export failed:", err)
return err
}
- fmt.Fprintln(os.Stderr, "Screener diagnostic bundle:", path)
+ fmt.Fprintln(os.Stderr, "Piik diagnostic bundle:", path)
return nil
}
diff --git a/cmd/screener-server/main_test.go b/cmd/piik-server/main_test.go
similarity index 68%
rename from cmd/screener-server/main_test.go
rename to cmd/piik-server/main_test.go
index 94f8e58a..e2300de1 100644
--- a/cmd/screener-server/main_test.go
+++ b/cmd/piik-server/main_test.go
@@ -7,27 +7,27 @@ import (
)
func TestLoadEnvironmentFileFillsOnlyAbsentVariables(t *testing.T) {
- t.Setenv("SCREENER_TEST_PRESET", "from-the-service")
+ t.Setenv("PIIK_TEST_PRESET", "from-the-service")
path := filepath.Join(t.TempDir(), ".env")
content := "# Application\n" +
- "SCREENER_TEST_PRESET=from-the-file\n" +
- "export SCREENER_TEST_EXPORTED=exported\n" +
- " SCREENER_TEST_QUOTED = \"a b#c\" \n" +
- "SCREENER_TEST_SINGLE=' padded '\n" +
- "SCREENER_TEST_EMPTY=\n" +
- "SCREENER_TEST_MARK=has#hash\n" +
+ "PIIK_TEST_PRESET=from-the-file\n" +
+ "export PIIK_TEST_EXPORTED=exported\n" +
+ " PIIK_TEST_QUOTED = \"a b#c\" \n" +
+ "PIIK_TEST_SINGLE=' padded '\n" +
+ "PIIK_TEST_EMPTY=\n" +
+ "PIIK_TEST_MARK=has#hash\n" +
"\n" +
"not an assignment\n" +
- "#SCREENER_TEST_COMMENTED=never\r\n" +
- "SCREENER_TEST_LAST=tail"
+ "#PIIK_TEST_COMMENTED=never\r\n" +
+ "PIIK_TEST_LAST=tail"
if err := os.WriteFile(path, []byte(content), 0o600); err != nil {
t.Fatal(err)
}
// Setenv registers the restore, Unsetenv makes the name absent for the run.
for _, name := range []string{
- "SCREENER_TEST_EXPORTED", "SCREENER_TEST_QUOTED", "SCREENER_TEST_SINGLE",
- "SCREENER_TEST_EMPTY", "SCREENER_TEST_MARK", "SCREENER_TEST_COMMENTED",
- "SCREENER_TEST_LAST",
+ "PIIK_TEST_EXPORTED", "PIIK_TEST_QUOTED", "PIIK_TEST_SINGLE",
+ "PIIK_TEST_EMPTY", "PIIK_TEST_MARK", "PIIK_TEST_COMMENTED",
+ "PIIK_TEST_LAST",
} {
t.Setenv(name, "absent")
os.Unsetenv(name)
@@ -38,19 +38,19 @@ func TestLoadEnvironmentFileFillsOnlyAbsentVariables(t *testing.T) {
}
for name, want := range map[string]string{
// A variable the service already supplies is never replaced.
- "SCREENER_TEST_PRESET": "from-the-service",
- "SCREENER_TEST_EXPORTED": "exported",
- "SCREENER_TEST_QUOTED": "a b#c",
- "SCREENER_TEST_SINGLE": " padded ",
- "SCREENER_TEST_EMPTY": "",
- "SCREENER_TEST_MARK": "has#hash",
- "SCREENER_TEST_LAST": "tail",
+ "PIIK_TEST_PRESET": "from-the-service",
+ "PIIK_TEST_EXPORTED": "exported",
+ "PIIK_TEST_QUOTED": "a b#c",
+ "PIIK_TEST_SINGLE": " padded ",
+ "PIIK_TEST_EMPTY": "",
+ "PIIK_TEST_MARK": "has#hash",
+ "PIIK_TEST_LAST": "tail",
} {
if got, present := os.LookupEnv(name); !present || got != want {
t.Errorf("%s = %q, present %t; want %q", name, got, present, want)
}
}
- if value, present := os.LookupEnv("SCREENER_TEST_COMMENTED"); present {
+ if value, present := os.LookupEnv("PIIK_TEST_COMMENTED"); present {
t.Errorf("commented assignment was applied as %q", value)
}
}
@@ -75,7 +75,7 @@ func TestServerDiagnosticSelection(t *testing.T) {
t.Fatalf("serverDebugEnabled(%q) = %v, want %v", value, got, want)
}
}
- t.Setenv("SCREENER_LOG_DIR", "")
+ t.Setenv("PIIK_LOG_DIR", "")
t.Setenv("LOGS_DIRECTORY", "")
if got := serverLogDirectory(); got != "logs" {
t.Fatalf("default directory = %q", got)
@@ -84,7 +84,7 @@ func TestServerDiagnosticSelection(t *testing.T) {
if got := serverLogDirectory(); got != "service-logs" {
t.Fatalf("systemd directory = %q", got)
}
- t.Setenv("SCREENER_LOG_DIR", "explicit-logs")
+ t.Setenv("PIIK_LOG_DIR", "explicit-logs")
if got := serverLogDirectory(); got != "explicit-logs" {
t.Fatalf("explicit directory = %q", got)
}
diff --git a/cmd/screener-server/release.go b/cmd/piik-server/release.go
similarity index 96%
rename from cmd/screener-server/release.go
rename to cmd/piik-server/release.go
index 9b1aeec9..eb4d1883 100644
--- a/cmd/screener-server/release.go
+++ b/cmd/piik-server/release.go
@@ -16,7 +16,7 @@ import (
// defaultReleaseAPIURL is DEFAULT_RELEASE_API_URL: the same published release
// contract the Browser update notice uses (src/client/lib/release-update.ts).
-const defaultReleaseAPIURL = "https://api.github.com/repos/TNTcraftHIM/Screener/releases/latest"
+const defaultReleaseAPIURL = "https://api.github.com/repos/TNTcraftHIM/Piik/releases/latest"
// Exit codes are UPDATE_EXIT_CODES. deploy/check-release.sh forwards them, so a
// checker failure stays distinguishable from "an update exists".
@@ -31,13 +31,13 @@ const (
// releaseUsage is the usage string parseArguments threw, with this binary's
// name in place of the script's.
-const releaseUsage = "Usage: screener-server --check-release --current-file <REVISION> [--api-url <URL>]"
+const releaseUsage = "Usage: piik-server --check-release --current-file <REVISION> [--api-url <URL>]"
const (
// releaseTimeout bounds the whole check; an operator runs it interactively.
releaseTimeout = 5 * time.Second
// releasePathPrefix is RELEASE_PATH_PREFIX: the only accepted release page.
- releasePathPrefix = "/TNTcraftHIM/Screener/releases/tag/"
+ releasePathPrefix = "/TNTcraftHIM/Piik/releases/tag/"
releaseHost = "github.com"
releaseAPIHost = "api.github.com"
)
@@ -116,7 +116,7 @@ func checkRelease(ctx context.Context, currentRevision, apiURL, token string) re
}
request.Header.Set("Accept", "application/vnd.github+json")
request.Header.Set("X-GitHub-Api-Version", "2022-11-28")
- request.Header.Set("User-Agent", "Screener-release-check")
+ request.Header.Set("User-Agent", "Piik-release-check")
if authorizesGitHub(endpoint, token) {
request.Header.Set("Authorization", "Bearer "+strings.TrimSpace(token))
}
@@ -203,7 +203,7 @@ type releaseMetadata struct {
// parseReleaseMetadata ports parseReleaseMetadata. It accepts one shape only: a
// published, non-draft release whose tag is a full commit revision and whose
-// page is exactly https://github.com/TNTcraftHIM/Screener/releases/tag/<that
+// page is exactly https://github.com/TNTcraftHIM/Piik/releases/tag/<that
// revision> with no credentials, port, query or fragment. The returned URL is
// rebuilt from the validated parts so nothing unverified reaches the operator.
func parseReleaseMetadata(payload []byte) (revision string, releaseURL string, ok bool) {
diff --git a/cmd/screener-server/release_test.go b/cmd/piik-server/release_test.go
similarity index 94%
rename from cmd/screener-server/release_test.go
rename to cmd/piik-server/release_test.go
index 9725425f..53f9e52a 100644
--- a/cmd/screener-server/release_test.go
+++ b/cmd/piik-server/release_test.go
@@ -16,7 +16,7 @@ import (
const (
deployedRevision = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
latestRevision = "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb"
- latestReleaseURL = "https://github.com/TNTcraftHIM/Screener/releases/tag/" + latestRevision
+ latestReleaseURL = "https://github.com/TNTcraftHIM/Piik/releases/tag/" + latestRevision
latestRelease = `{"tag_name":"` + latestRevision + `","html_url":"` + latestReleaseURL + `"}`
)
@@ -40,29 +40,29 @@ func TestParseReleaseMetadataAcceptsOnlyTheStrictReleaseIdentity(t *testing.T) {
{"other host", tagged("https://evil.example"), "", ""},
{
"userinfo",
- tagged("https://[email protected]/TNTcraftHIM/Screener/releases/tag/" + latestRevision),
+ tagged("https://[email protected]/TNTcraftHIM/Piik/releases/tag/" + latestRevision),
"", "",
},
{
"port",
- tagged("https://github.com:8443/TNTcraftHIM/Screener/releases/tag/" + latestRevision),
+ tagged("https://github.com:8443/TNTcraftHIM/Piik/releases/tag/" + latestRevision),
"", "",
},
{
"plaintext page",
- tagged("http://github.com/TNTcraftHIM/Screener/releases/tag/" + latestRevision),
+ tagged("http://github.com/TNTcraftHIM/Piik/releases/tag/" + latestRevision),
"", "",
},
{"query", tagged(latestReleaseURL + "?asset=1"), "", ""},
{"fragment", tagged(latestReleaseURL + "#assets"), "", ""},
{
"encoded path separator",
- tagged("https://github.com/TNTcraftHIM%2FScreener/releases/tag/" + latestRevision),
+ tagged("https://github.com/TNTcraftHIM%2FPiik/releases/tag/" + latestRevision),
"", "",
},
{
"page tag disagrees with the release tag",
- tagged("https://github.com/TNTcraftHIM/Screener/releases/tag/" + deployedRevision),
+ tagged("https://github.com/TNTcraftHIM/Piik/releases/tag/" + deployedRevision),
"", "",
},
{
@@ -144,7 +144,7 @@ func TestCheckReleaseReportsTheDeployedComparison(t *testing.T) {
if got := request.Header.Get("X-GitHub-Api-Version"); got != "2022-11-28" {
t.Errorf("X-GitHub-Api-Version = %q", got)
}
- if got := request.Header.Get("User-Agent"); got != "Screener-release-check" {
+ if got := request.Header.Get("User-Agent"); got != "Piik-release-check" {
t.Errorf("User-Agent = %q", got)
}
writer.WriteHeader(testCase.status)
diff --git a/deploy/check-release.sh b/deploy/check-release.sh
index 7a82b942..a800fd0a 100644
--- a/deploy/check-release.sh
+++ b/deploy/check-release.sh
@@ -6,6 +6,6 @@ if [ "$#" -gt 1 ]; then
exit 2
fi
-current_file="${1:-/opt/screener/current/REVISION}"
+current_file="${1:-/opt/piik/current/REVISION}"
-exec /opt/screener/current/screener-server --check-release --current-file "$current_file"
+exec /opt/piik/current/piik-server --check-release --current-file "$current_file"
diff --git a/deploy/container/Dockerfile b/deploy/container/Dockerfile
index b1889b36..e2c87b09 100644
--- a/deploy/container/Dockerfile
+++ b/deploy/container/Dockerfile
@@ -1,8 +1,8 @@
FROM gcr.io/distroless/static-debian13:nonroot-amd64@sha256:e754765ad9e167b0677b41c617fd44afb7b9818a477f48f17bda08e12cfb98cb
WORKDIR /app
-COPY --chmod=0555 screener-server /app/
+COPY --chmod=0555 piik-server /app/
COPY --chmod=0444 LICENSE THIRD-PARTY-NOTICES.txt REVISION /app/
-ENV LISTEN_HOST=0.0.0.0 SCREENER_LOG_DIR=/home/nonroot/logs ROOM_DATABASE_PATH=/home/nonroot/rooms.sqlite
+ENV LISTEN_HOST=0.0.0.0 PIIK_LOG_DIR=/home/nonroot/logs ROOM_DATABASE_PATH=/home/nonroot/rooms.sqlite
USER 65532:65532
EXPOSE 8787/tcp 3478/udp 3479/udp 3480/udp 7882/udp
-ENTRYPOINT ["/app/screener-server"]
+ENTRYPOINT ["/app/piik-server"]
diff --git a/deploy/nginx/share.bonfire.icu.conf.example b/deploy/nginx/share.bonfire.icu.conf.example
index c5906b9f..c920c936 100644
--- a/deploy/nginx/share.bonfire.icu.conf.example
+++ b/deploy/nginx/share.bonfire.icu.conf.example
@@ -1,9 +1,9 @@
-map $http_upgrade $screener_connection_upgrade {
+map $http_upgrade $piik_connection_upgrade {
default upgrade;
'' close;
}
-limit_req_zone $binary_remote_addr zone=screener_site_access:10m rate=5r/m;
+limit_req_zone $binary_remote_addr zone=piik_site_access:10m rate=5r/m;
server {
listen 80;
@@ -30,8 +30,8 @@ server {
include /etc/letsencrypt/options-ssl-nginx.conf;
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
- access_log /var/log/nginx/screener.access.log;
- error_log /var/log/nginx/screener.error.log warn;
+ access_log /var/log/nginx/piik.access.log;
+ error_log /var/log/nginx/piik.error.log warn;
add_header Strict-Transport-Security "max-age=31536000" always;
add_header X-Content-Type-Options "nosniff" always;
@@ -48,7 +48,7 @@ server {
}
location = /api/site-access {
- limit_req zone=screener_site_access burst=5 nodelay;
+ limit_req zone=piik_site_access burst=5 nodelay;
limit_req_status 429;
proxy_pass http://127.0.0.1:8787;
proxy_http_version 1.1;
@@ -65,7 +65,7 @@ server {
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Proto https;
proxy_set_header Upgrade $http_upgrade;
- proxy_set_header Connection $screener_connection_upgrade;
+ proxy_set_header Connection $piik_connection_upgrade;
proxy_read_timeout 5h;
proxy_send_timeout 5h;
proxy_buffering off;
diff --git a/deploy/release-app.sh b/deploy/release-app.sh
index 37e89064..9b4434a5 100644
--- a/deploy/release-app.sh
+++ b/deploy/release-app.sh
@@ -3,15 +3,15 @@ set -Eeuo pipefail
umask 022
if [ "$#" -ne 1 ]; then
- printf 'usage: SCREENER_PUBLIC_ORIGIN=https://share.example.com %s /opt/screener/uploads/<release>.release.json\n' "$0" >&2
+ printf 'usage: PIIK_PUBLIC_ORIGIN=https://share.example.com %s /opt/piik/uploads/<release>.release.json\n' "$0" >&2
exit 2
fi
-upload_root='/opt/screener/uploads'
-release_root='/opt/screener/releases'
-current='/opt/screener/current'
-lock='/opt/screener/deploy.lock'
-public_origin="${SCREENER_PUBLIC_ORIGIN:-}"
+upload_root='/opt/piik/uploads'
+release_root='/opt/piik/releases'
+current='/opt/piik/current'
+lock='/opt/piik/deploy.lock'
+public_origin="${PIIK_PUBLIC_ORIGIN:-}"
descriptor="$(realpath -e -- "$1")"
stage=''
release_owned=0
@@ -39,8 +39,8 @@ main_asset="$(descriptor_text mainAsset)"
[[ "$revision" =~ ^[0-9a-f]{40}$ ]]
[[ "$release_id" =~ ^[0-9a-f]{7}$ ]]
test "$release_id" = "${revision:0:7}"
-test "$artifact_name" = "screener-${release_id}-runtime.tar.gz"
-test "$manifest_name" = "screener-${release_id}.manifest.tsv"
+test "$artifact_name" = "piik-${release_id}-runtime.tar.gz"
+test "$manifest_name" = "piik-${release_id}.manifest.tsv"
[[ "$artifact_sha" =~ ^[0-9a-f]{64}$ ]]
[[ "$manifest_sha" =~ ^[0-9a-f]{64}$ ]]
[[ "$file_count" =~ ^[1-9][0-9]*$ ]]
@@ -105,7 +105,7 @@ recover() {
trap - ERR HUP INT TERM EXIT
set +e
if [ "$cutover_started" -eq 1 ]; then
- systemctl stop screener.service || ok=0
+ systemctl stop piik.service || ok=0
if [ "$(readlink -f -- "$current" 2>/dev/null)" != "$old_release" ]; then
link="${current}.recover-${release_id}-$$"
if [ -e "$link" ] || [ -L "$link" ]; then
@@ -115,7 +115,7 @@ recover() {
fi
fi
test "$(readlink -f -- "$current" 2>/dev/null)" = "$old_release" || ok=0
- systemctl start screener.service || ok=0
+ systemctl start piik.service || ok=0
wait_for_health || ok=0
fi
rm -f -- "${current}.${release_id}-$$" "${current}.recover-${release_id}-$$" || ok=0
@@ -126,7 +126,7 @@ recover() {
printf 'deployment_failed=%s recovery_ok=%s current=%s active=%s\n' \
"$code" "$ok" \
"$(readlink -f -- "$current" 2>/dev/null || true)" \
- "$(systemctl show screener.service -p ActiveState --value 2>/dev/null || true)" >&2
+ "$(systemctl show piik.service -p ActiveState --value 2>/dev/null || true)" >&2
if [ "$ok" -ne 1 ]; then
exit 90
fi
@@ -150,15 +150,15 @@ test -f "$artifact"
test -f "$manifest"
test "$(sha256sum "$artifact" | awk '{print $1}')" = "$artifact_sha"
test "$(sha256sum "$manifest" | awk '{print $1}')" = "$manifest_sha"
-for service in screener nginx; do
+for service in piik nginx; do
test "$(systemctl show "${service}.service" -p ActiveState --value)" = 'active'
test "$(systemctl show "${service}.service" -p NRestarts --value)" = '0'
done
# The first Go/embedded-media cutover owns its infrastructure recovery separately.
-test -x "$old_release/screener-server"
-old_pid="$(systemctl show screener.service -p MainPID --value)"
+test -x "$old_release/piik-server"
+old_pid="$(systemctl show piik.service -p MainPID --value)"
test "$old_pid" -gt 1
-test "$(readlink -f "/proc/${old_pid}/exe")" = "$old_release/screener-server"
+test "$(readlink -f "/proc/${old_pid}/exe")" = "$old_release/piik-server"
while IFS= read -r raw_entry; do
entry="$raw_entry"
@@ -170,7 +170,7 @@ while IFS= read -r raw_entry; do
esac
case "$entry" in
/*|*\\*) printf 'invalid archive entry: %s\n' "$raw_entry" >&2; exit 41 ;;
- LICENSE|REVISION|THIRD-PARTY-NOTICES.txt|screener-server) ;;
+ LICENSE|REVISION|THIRD-PARTY-NOTICES.txt|piik-server) ;;
*) printf 'unexpected archive entry: %s\n' "$raw_entry" >&2; exit 42 ;;
esac
done < <(tar -tzf "$artifact")
@@ -183,7 +183,7 @@ tar --no-same-owner --no-same-permissions -xzf "$artifact" -C "$stage"
tab=$'\t'
if [ -n "$(tail -c 1 "$manifest")" ]; then exit 61; fi
if grep -qEv "^[0-9a-f]{64}${tab}[0-9]+${tab}[^${tab}]*$" "$manifest"; then exit 62; fi
-if grep -qEv "^[0-9a-f]{64}${tab}[0-9]+${tab}(LICENSE|REVISION|THIRD-PARTY-NOTICES\.txt|screener-server)$" "$manifest"; then exit 63; fi
+if grep -qEv "^[0-9a-f]{64}${tab}[0-9]+${tab}(LICENSE|REVISION|THIRD-PARTY-NOTICES\.txt|piik-server)$" "$manifest"; then exit 63; fi
if [ -n "$(cut -f3 "$manifest" | sort | uniq -d)" ]; then exit 64; fi
if [ "$(wc -l < "$manifest")" -ne "$file_count" ]; then exit 65; fi
if [ -n "$(find "$stage" -type l)" ]; then exit 66; fi
@@ -199,23 +199,23 @@ printf 'artifact_manifest=ok files=%s revision=%s\n' "$file_count" "$revision"
# Set the mode before testing it: an archive packaged on a host without an
# executable bit (Windows) records 0644, and the release owns the bit here.
-chmod 0755 "$stage/screener-server"
-test -x "$stage/screener-server"
+chmod 0755 "$stage/piik-server"
+test -x "$stage/piik-server"
chmod 0644 "$stage/LICENSE" "$stage/REVISION" "$stage/THIRD-PARTY-NOTICES.txt"
# Runs as the service user under the manager (no sudo/polkit round trip) so a
# binary or environment file the service cannot use fails here, before cutover.
systemd-run \
- --uid=screener \
- --gid=screener \
+ --uid=piik \
+ --gid=piik \
--wait \
--collect \
--quiet \
--service-type=exec \
- --property='EnvironmentFile=/etc/screener/screener.env' \
- --property='Environment=SCREENER_ENV=production' \
+ --property='EnvironmentFile=/etc/piik/piik.env' \
+ --property='Environment=PIIK_ENV=production' \
--property='RuntimeMaxSec=20s' \
- "$stage/screener-server" --check-config
+ "$stage/piik-server" --check-config
if [ -n "$(comm -12 <(find "$old_release" -type f -printf '%D:%i\n' | sort -u) <(find "$stage" -type f -printf '%D:%i\n' | sort -u))" ]; then
exit 80
@@ -237,21 +237,21 @@ nginx_restarts="$(systemctl show nginx.service -p NRestarts --value)"
cutover_since="$(date '+%Y-%m-%d %H:%M:%S')"
cutover_start="$(date +%s%3N)"
cutover_started=1
-systemctl stop screener.service
-test "$(systemctl show screener.service -p ActiveState --value)" = 'inactive'
+systemctl stop piik.service
+test "$(systemctl show piik.service -p ActiveState --value)" = 'inactive'
ln -s "$release" "${current}.${release_id}-$$"
mv -Tf "${current}.${release_id}-$$" "$current"
test "$(readlink -f -- "$current")" = "$release"
-systemctl start screener.service
+systemctl start piik.service
wait_for_health
health_ready="$(date +%s%3N)"
-test "$(systemctl show screener.service -p ActiveState --value)" = 'active'
-test "$(systemctl show screener.service -p NRestarts --value)" = '0'
+test "$(systemctl show piik.service -p ActiveState --value)" = 'active'
+test "$(systemctl show piik.service -p NRestarts --value)" = '0'
test "$(systemctl show nginx.service -p NRestarts --value)" = "$nginx_restarts"
test "$(nft list table inet bonfire_filter | sha256sum | awk '{print $1}')" = "$firewall_before"
test "$(readlink -f -- "$current")" = "$release"
-pid="$(systemctl show screener.service -p MainPID --value)"
+pid="$(systemctl show piik.service -p MainPID --value)"
test "$pid" -gt 1
test "$(readlink -f "/proc/${pid}/cwd")" = "$release"
test "$(curl -fsS --max-time 5 http://127.0.0.1:8787/healthz)" = '{"status":"ok"}'
@@ -262,7 +262,7 @@ test "$(curl -sS -o /dev/null -w '%{http_code}' --max-time 8 "$public_origin/$ma
if [ "$old_asset" != "$main_asset" ]; then
test "$(curl -sS -o /dev/null -w '%{http_code}' --max-time 8 "$public_origin/$old_asset")" = '404'
fi
-test -z "$(journalctl -u screener.service --since "$cutover_since" -p warning --no-pager --output=cat)"
+test -z "$(journalctl -u piik.service --since "$cutover_since" -p warning --no-pager --output=cat)"
asset_sha="$(curl -fsS --max-time 8 "$public_origin/$main_asset" | sha256sum | awk '{print $1}')"
release_owned=0
diff --git a/deploy/systemd/screener.service.example b/deploy/systemd/piik.service.example
similarity index 67%
rename from deploy/systemd/screener.service.example
rename to deploy/systemd/piik.service.example
index 4d9af133..7712a8f9 100644
--- a/deploy/systemd/screener.service.example
+++ b/deploy/systemd/piik.service.example
@@ -1,24 +1,24 @@
[Unit]
-Description=Screener web, signaling, STUN and SFU application
+Description=Piik web, signaling, STUN and SFU application
After=network-online.target
Wants=network-online.target
[Service]
Type=simple
-User=screener
-Group=screener
-WorkingDirectory=/opt/screener/current
-Environment=SCREENER_ENV=production
-Environment=ROOM_DATABASE_PATH=/var/lib/screener/rooms.sqlite
-EnvironmentFile=/etc/screener/screener.env
-ExecStart=/opt/screener/current/screener-server
+User=piik
+Group=piik
+WorkingDirectory=/opt/piik/current
+Environment=PIIK_ENV=production
+Environment=ROOM_DATABASE_PATH=/var/lib/piik/rooms.sqlite
+EnvironmentFile=/etc/piik/piik.env
+ExecStart=/opt/piik/current/piik-server
Restart=on-failure
RestartSec=3s
TimeoutStopSec=20s
UMask=0077
-StateDirectory=screener
+StateDirectory=piik
StateDirectoryMode=0700
-LogsDirectory=screener
+LogsDirectory=piik
LogsDirectoryMode=0700
NoNewPrivileges=true
diff --git a/docs/README.md b/docs/README.md
index ce453a47..5dbf74e8 100644
--- a/docs/README.md
+++ b/docs/README.md
@@ -2,12 +2,12 @@
[English Quick Start](../README.md) · [中文快速开始](../README.zh-CN.md)
-## Use Screener
+## Use Piik
| 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/screener-client/README.md) |
+| Run Client, choose a mode, or fix capture trouble | [Client guide](../cmd/piik-client/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) |
@@ -33,7 +33,7 @@ npm run dev
In a second terminal, start the server. For a POSIX shell:
```sh
-PORT=8788 PUBLIC_BASE_URL=http://localhost:8787 go run ./cmd/screener-server
+PORT=8788 PUBLIC_BASE_URL=http://localhost:8787 go run ./cmd/piik-server
```
Or in PowerShell:
@@ -41,8 +41,8 @@ Or in PowerShell:
```powershell
$env:PORT = '8788'
$env:PUBLIC_BASE_URL = 'http://localhost:8787'
-go build -o build/dev/screener-server.exe ./cmd/screener-server
-./build/dev/screener-server.exe
+go build -o build/dev/piik-server.exe ./cmd/piik-server
+./build/dev/piik-server.exe
```
The fixed Windows executable path avoids repeated firewall prompts from `go run`.
@@ -87,7 +87,7 @@ Browse [all ADRs](./adr/) for their context and consequences.
results, failed controls and limits; neither promises universal performance.
- [Research directory](./research/): transport, capture, platform and backend evidence.
- [Maintenance](./maintenance.md): document ownership and repository lifecycle.
-- [Licensing](../licenses/README.md): Screener's MIT scope and third-party notices.
+- [Licensing](../licenses/README.md): Piik's MIT scope and third-party notices.
Research distinguishes observations from assumptions. Product modules own
accepted behavior, source and tests own implementation detail, and Git/PRs own
diff --git a/docs/adr/0001-p2p-first-media-topology.md b/docs/adr/0001-p2p-first-media-topology.md
index de7b5a44..0b8e7022 100644
--- a/docs/adr/0001-p2p-first-media-topology.md
+++ b/docs/adr/0001-p2p-first-media-topology.md
@@ -5,7 +5,7 @@
## Durable Rationale
-Screener serves one broadcaster and a small group of trusted friends. Low
+Piik serves one broadcaster and a small group of trusted friends. Low
latency, private access, browser viewing, and low server media cost matter more
than public-broadcast scale. Direct WebRTC therefore remains the preferred
media path, while centralized media is fallback infrastructure rather than the
diff --git a/docs/adr/0002-memory-resident-protected-rooms.md b/docs/adr/0002-memory-resident-protected-rooms.md
index 349e2eee..a85fffd1 100644
--- a/docs/adr/0002-memory-resident-protected-rooms.md
+++ b/docs/adr/0002-memory-resident-protected-rooms.md
@@ -5,7 +5,7 @@
## Context
-Screener serves one Host and at most 20 trusted Viewers. The application server
+Piik serves one Host and at most 20 trusted Viewers. The application server
owns a small room and authorization aggregate while WebRTC and LiveKit own live
media sessions. Frequent application releases should not force the Host to
create another room or redistribute invitations, but a database must not become
diff --git a/docs/adr/0005-automatic-hybrid-media-routing.md b/docs/adr/0005-automatic-hybrid-media-routing.md
index 59fcd96d..408efc64 100644
--- a/docs/adr/0005-automatic-hybrid-media-routing.md
+++ b/docs/adr/0005-automatic-hybrid-media-routing.md
@@ -12,7 +12,7 @@ describe the earlier implementation and its production history.
## Context
-Direct Browser WebRTC gives Screener its desired latency and distributed cost,
+Direct Browser WebRTC gives Piik its desired latency and distributed cost,
but one Host cannot fan out to every Viewer and some endpoint pairs cannot
establish usable direct media. The product needs automatic peer distribution and
bounded server fallback without exposing topology choices to users or turning
@@ -214,7 +214,7 @@ tokens. Replacement, abort, timeout, confirmed media-participant loss, share
rollover, stop, and room deletion transfer the resources they own into the same typed drain path.
Only successful room deletion plus an absence readback releases that generation,
so a stale token cannot recreate off-ledger media. The deployment must dedicate
-the LiveKit namespace to Screener and complete startup ownership/cleanup before
+the LiveKit namespace to Piik and complete startup ownership/cleanup before
accepting traffic; [self-hosting operations](../operations/self-hosting.md) owns
that procedure.
@@ -236,7 +236,7 @@ capacity poll or second resource-specific controller.
Ordinary Peers use deployment STUN only. Browser SFU PeerConnections use an
empty external ICE-server list while retaining LiveKit-signaled UDP candidates.
-Screener configures no TURN, ICE/TCP, media TCP, or TLS-relayed media. A future
+Piik configures no TURN, ICE/TCP, media TCP, or TLS-relayed media. A future
strict-firewall transport must be accepted as a LiveKit-internal capability, not
as another application route candidate.
@@ -270,7 +270,7 @@ they mean only one complete same-identity `qualityLimitationReason` delta in
experiment; it does not locate the physical bottleneck or prove end-to-end
quality. `other`, missing, reset, hidden, or stale evidence is unknown. SFU
publication and subscription state remains owned by LiveKit plus the exact
-Viewer's continuing decoded progress. Screener does not combine loss, RTT,
+Viewer's continuing decoded progress. Piik does not combine loss, RTT,
jitter, bitrate, FPS, resolution, or freezes into a weighted route score.
Routing degradation requires three consecutive complete degraded deltas for the
diff --git a/docs/adr/0007-path-isolated-representation-quality.md b/docs/adr/0007-path-isolated-representation-quality.md
index ffecd296..5f9ec984 100644
--- a/docs/adr/0007-path-isolated-representation-quality.md
+++ b/docs/adr/0007-path-isolated-representation-quality.md
@@ -12,12 +12,12 @@ implementation; [media quality](../product/media-quality.md) owns current behavi
## Context
-Screener sends one realtime game-screen source through independent P2P
+Piik sends one realtime game-screen source through independent P2P
connections and, when needed, one shared LiveKit publication. WebRTC and
LiveKit already own congestion control, encoder adaptation, retransmission,
simulcast construction, subscriber bandwidth estimation, and layer selection.
-Earlier experiments added a Screener-defined lower SFU encoding and treated
+Earlier experiments added a Piik-defined lower SFU encoding and treated
quality preference as an application policy. Production evidence showed that
an always-active lower encoding can compete with the highest encoding on a
constrained Host-to-SFU path. It did not justify replacing LiveKit's native
@@ -123,7 +123,7 @@ than claiming complete source isolation.
## Consequences
-- Screener owns fewer media mechanisms and follows the pinned frameworks'
+- Piik owns fewer media mechanisms and follows the pinned frameworks'
supported control surfaces.
- A capable Browser Host or relay can use H.264 hardware encoding while another
sender remains on VP8 without a room-protocol branch; the Host can explicitly
@@ -136,7 +136,7 @@ than claiming complete source isolation.
outbound video sender but no additional capture or encoder beyond the sender
that already exists.
- A Host may need to lower its explicit share profile when encoder or uplink
- capacity is insufficient; Screener does not silently remove constrained
+ capacity is insufficient; Piik does not silently remove constrained
Viewer support.
- ADR-0005's native-edge local convergence is deployed and performs bounded
real-candidate comparisons without owning media adaptation. Weighted or global
@@ -144,7 +144,7 @@ than claiming complete source isolation.
## Stop Lines
-- No Screener resolution/FPS/bitrate ladder or representation formula.
+- No Piik resolution/FPS/bitrate ladder or representation formula.
- No codec wire/state, GPU/MFT allowlist, persistent codec cache, parallel
VP8/H.264 route, active-edge codec churn, or LiveKit backup publication. The
local pre-share Host selector is the only manual codec surface.
diff --git a/docs/adr/0010-cross-platform-client-runtime.md b/docs/adr/0010-cross-platform-client-runtime.md
index 320bc5c8..0af41bb1 100644
--- a/docs/adr/0010-cross-platform-client-runtime.md
+++ b/docs/adr/0010-cross-platform-client-runtime.md
@@ -15,12 +15,12 @@
## Context
-The Browser is the current Screener interaction surface, but it cannot own native
+The Browser is the current Piik interaction surface, but it cannot own native
capture, hardware encode, or reusable native sockets. A self-contained package
must add those capabilities without creating another room model, signaling
protocol, route controller, or UI.
-Existing Screener room, admission, signaling, and routing behavior already has
+Existing Piik room, admission, signaling, and routing behavior already has
one TypeScript implementation. Rewriting that behavior in the Helper would make
Hosted and Local deployments diverge without improving the media path.
@@ -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; no
deployment gets a second product core. Its implementation is owned by
[ADR-0012](./0012-shared-go-backend-core.md).
-2. The packaged product is Screener Client. Its Go process is the cross-platform
+2. The packaged product is Piik Client. Its Go process is the cross-platform
entry 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.
@@ -61,7 +61,7 @@ topologies and makes a saved Site unavailable while another room source runs.
with the page; a picker, share, or room source does not own the socket. The
Browser forwards current signaling and remains the participant.
5. A platform package contains one Go executable carrying the same core and
- embedded Browser assets used by Hosted Screener. It may also carry one
+ embedded Browser assets used by Hosted Piik. It may also carry one
process-isolated capture binary and the pinned `cloudflared` sidecar. Those
sidecars are the only supervised children and keep their bounded lifetime.
Platform packaging is metadata around that entry, not another long-running
@@ -74,7 +74,7 @@ topologies and makes a saved Site unavailable while another room source runs.
network permission. Clearing Site data simply requires opening it from the
Client again.
7. A self-contained Local deployment serves reachable LAN peers without a
- central Screener service. Its explicit `--link` mode starts one accountless
+ central Piik service. Its explicit `--link` mode starts one accountless
Cloudflare Quick Tunnel for the same HTTP/WebSocket surface. The Client
reserves the exact IPv4 listener before creating that tunnel, then applies
its HTTPS origin before the server starts serving that listener. It retains the same
@@ -162,7 +162,7 @@ topologies and makes a saved Site unavailable while another room source runs.
target and must start the assembled Local authority, pass `/healthz`, and
stop it cleanly before the candidate is accepted.
14. The root package manifest is the single dependency contract for the Browser
- bundle and repository tooling. No host installs packages to run Screener, so
+ bundle and repository tooling. No host installs packages to run Piik, so
the manifest has no runtime half, and no second Client dependency list or
post-install package surgery is used.
diff --git a/docs/adr/0012-shared-go-backend-core.md b/docs/adr/0012-shared-go-backend-core.md
index d17c50c5..bc644838 100644
--- a/docs/adr/0012-shared-go-backend-core.md
+++ b/docs/adr/0012-shared-go-backend-core.md
@@ -26,7 +26,7 @@ the same Browser build.
## Decision
1. One Go module at the repository root owns the product core.
- `cmd/screener-server` (Hosted) and `cmd/screener-client` (Client) are entry
+ `cmd/piik-server` (Hosted) and `cmd/piik-client` (Client) are entry
points 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
@@ -65,7 +65,7 @@ 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 build
requires a C toolchain.
-8. The port changes no contract. Signaling stays `screener-v21`, the Client
+8. The port changed no contract. Signaling stayed on its then-current v21 wire; the Client
loopback stays v8, capture framing stays v4, and the HTTP API, cookies, error
codes, and close codes keep their exact shapes. No compatibility alias, dual
reader, or migration is added for a change of implementation language.
diff --git a/docs/adr/0013-embedded-node-local-media.md b/docs/adr/0013-embedded-node-local-media.md
index 98f332dc..a7845cbc 100644
--- a/docs/adr/0013-embedded-node-local-media.md
+++ b/docs/adr/0013-embedded-node-local-media.md
@@ -5,7 +5,7 @@
## Context
-The owner accepts one self-contained Screener process for the current STUN and
+The owner accepts one self-contained Piik process for the current STUN and
SFU services, and one shared encoded-media model for capable Native P2P nodes
and the SFU. Bundling or supervising coturn/LiveKit executables does not meet
this requirement. The existing product uses coturn only as STUN, not TURN.
@@ -28,7 +28,7 @@ acceptance. Mature simulcast implementations provide the starting model.
produce the highest required output and its lower fallbacks, and stop upper
outputs no child needs. This is not a promise of a single Host encode under
all conditions. Representation settings come from the chosen media component
- within Host ceilings, not a new Screener quality score or arbitrary ladder.
+ within Host ceilings, not a new Piik quality score or arbitrary ladder.
4. Each child receives only its selected output. Multiple active encodings do
not imply sending every output to every child. Preserve the original input,
source clock and unaffected siblings. Playback quality, cadence and recovery
diff --git a/docs/adr/0014-browser-node-local-encoding-pool.md b/docs/adr/0014-browser-node-local-encoding-pool.md
index 4b7b9043..c5fb0bfa 100644
--- a/docs/adr/0014-browser-node-local-encoding-pool.md
+++ b/docs/adr/0014-browser-node-local-encoding-pool.md
@@ -29,7 +29,7 @@ in [ADR-0011](./0011-browser-assisted-native-fanout.md) remains independently ow
upstream subscription, room-wide minimum or topology operation is introduced.
2. Each group uses stock WebRTC encoding and adaptation through an independent
local producer. Each outgoing connection retains stock ICE, DTLS-SRTP,
- bandwidth estimation, RTP packetization, pacing and loss recovery. Screener
+ bandwidth estimation, RTP packetization, pacing and loss recovery. Piik
connects existing demand observations to group budgets and membership; it
adds no congestion estimator, quality score or arbitrary resolution ladder.
3. Reuse `HostPeer` and its existing signaling, sender-mutation and retirement
diff --git a/docs/deployment.md b/docs/deployment.md
index aa2d40cd..1c8ecf1f 100644
--- a/docs/deployment.md
+++ b/docs/deployment.md
@@ -15,7 +15,7 @@ bootstrap/updater; do not call this wrapper generic.
## Release Boundary
-A routine application release changes only the built Screener server binary and
+A routine application release changes only the built Piik server binary and
the Browser assets it embeds. It does not change infrastructure,
service units, proxy/firewall rules, secrets, media listener configuration, or
persistent room state.
@@ -42,16 +42,16 @@ The packager refuses a dirty tree, builds the Browser assets and the
linux/amd64 server binary from that exact revision without cgo, records the
full revision, emits a runtime archive plus path/size/SHA-256 manifest and release descriptor, and
extracts its own artifact to verify it. The archive contains exactly
-`screener-server`, `LICENSE`, `THIRD-PARTY-NOTICES.txt`, and `REVISION`. Upload
-the archive, manifest, and descriptor together to `/opt/screener/uploads`.
+`piik-server`, `LICENSE`, `THIRD-PARTY-NOTICES.txt`, and `REVISION`. Upload
+the archive, manifest, and descriptor together to `/opt/piik/uploads`.
The same application descriptor is also the Client assembly input. On each
target platform, provide that platform's Go toolchain:
```sh
-SCREENER_GO=/path/to/go node scripts/assemble-client.mjs \
- /outside/repository/app-release/screener-<revision>.release.json \
- /outside/repository/Screener-Client \
+PIIK_GO=/path/to/go node scripts/assemble-client.mjs \
+ /outside/repository/app-release/piik-<revision>.release.json \
+ /outside/repository/Piik-Client \
--target windows-amd64 \
--capture /path/to/platform-capture \
--tunnel /path/to/cloudflared
@@ -114,7 +114,7 @@ current CI workflow produces short-lived candidates but does not publish a
GitHub Release; publication remains an explicit distribution decision.
The default Client launcher starts immediately, then performs one background
-request to the official Screener GitHub Releases API. It shows a link only when
+request to the official Piik GitHub Releases API. It shows a link only when
the latest release has a valid full revision different from the packaged one.
The request sends no current revision, credentials, room data, or media data;
network errors, private-repository responses, and missing releases are treated
@@ -127,7 +127,7 @@ bash deploy/check-release.sh
```
The script runs the deployed binary's release check, which reads
-`/opt/screener/current/REVISION` and prints one JSON result.
+`/opt/piik/current/REVISION` and prints one JSON result.
Exit status `0` means the deployed revision is current, `10` means a newer
release is available, and `20` means the check could not establish a valid
release identity. For a private repository, inject a short-lived `GITHUB_TOKEN`
@@ -137,9 +137,11 @@ state. A different current-revision file may be supplied as its only argument.
## Permanent-Room Schema Cutover
-Schema 2 / signaling `screener-v23` requires matching Web/Client/Server builds
-and an accepted active-session interruption. Native control stays v9; Browser
-credential keys stay unchanged. This is not an app-only release.
+The schema 2 / signaling v23 cutover required matching Web/Client/Server builds
+and an accepted active-session interruption. Native control stayed v9; that
+schema change preserved Browser credential keys. It was not an app-only release.
+The separate [brand cutover](./research/piik-rename-plan.md) must preserve this
+database rather than repeat the schema change.
1. Verify the candidate; record the current release, environment, absolute DB
path and ownership. Stop ingress and the old application; take and retain a
@@ -184,21 +186,21 @@ restore the previous infrastructure.
Run the tracked server entry with the uploaded descriptor:
```sh
-sudo env SCREENER_PUBLIC_ORIGIN=https://share.example.com \
+sudo env PIIK_PUBLIC_ORIGIN=https://share.example.com \
bash /path/to/repository/deploy/release-app.sh \
- /opt/screener/uploads/screener-<revision>.release.json
+ /opt/piik/uploads/piik-<revision>.release.json
```
The wrapper:
1. takes a deployment lock and validates the descriptor, revision, archive,
- manifest, current Go process, Screener/nginx service state, and public origin;
+ manifest, current Go process, Piik/nginx service state, and public origin;
2. rejects unexpected archive paths, links, file types, or duplicate inodes;
3. extracts to a new release directory and verifies every file hash and size;
4. validates production configuration by running the packaged binary's
configuration check as the service user under a bounded runtime;
5. proves the old and new releases share no regular-file inode;
-6. atomically switches `/opt/screener/current`, starts the service, and polls
+6. atomically switches `/opt/piik/current`, starts the service, and polls
bounded local/public health; and
7. restores the exact prior symlink and service when cutover or health fails.
@@ -225,8 +227,8 @@ Verify only the surfaces relevant to the release:
- local and public `/healthz` return `{"status":"ok"}`;
- the public HTML references the new immutable main asset;
-- Screener and nginx have expected active/restart state;
-- Screener owns each configured STUN/SFU UDP listener and public reachability
+- Piik and nginx have expected active/restart state;
+- Piik owns each configured STUN/SFU UDP listener and public reachability
matches the configuration;
- the current symlink and served revision match the descriptor;
- room creation, Host authentication, one direct Viewer, and configured SFU
@@ -240,7 +242,7 @@ to [verification status](./verification-status.md), not routine postflight.
## Recovery
Before cutover, the wrapper keeps the exact prior release path. On failure after
-the switch begins, it stops Screener, restores that path atomically, restarts the
+the switch begins, it stops Piik, restores that path atomically, restarts the
service, and waits for health. A failed recovery exits distinctly and requires
operator intervention; it must not silently report the new release as active.
diff --git a/docs/operations/self-hosting.md b/docs/operations/self-hosting.md
index 0643267c..4ad2dcd4 100644
--- a/docs/operations/self-hosting.md
+++ b/docs/operations/self-hosting.md
@@ -6,7 +6,7 @@ This runbook owns initial single-host service setup. Application releases use
## Embedded Media Configuration
-The current source embeds STUN and SFU in the Screener process under
+The current source embeds STUN and SFU in the Piik process under
[ADR-0013](../adr/0013-embedded-node-local-media.md). Hosted `STUN_URLS`
advertises ordinary discovery and enables the UDP 3478 listener on
`STUN_LISTEN_HOST` (IPv4, default `0.0.0.0`). Enabling
@@ -16,7 +16,7 @@ public-link Client modes use discovery without creating media-service listeners.
Set `SFU_UDP_PORT=7882` to enable automatic embedded SFU fallback. Its IPv4 bind
address is `SFU_LISTEN_HOST`, default `0.0.0.0`; `SFU_PUBLIC_IP` optionally
overrides the advertised IPv4 address when the host is behind NAT. Unset or
-blank `SFU_UDP_PORT` keeps SFU disabled. SFU control uses authenticated Screener
+blank `SFU_UDP_PORT` keeps SFU disabled. SFU control uses authenticated Piik
signaling through the Web origin. No separate media-service executable, control
origin, or API credentials are needed by this source contract.
@@ -26,27 +26,27 @@ the active-session check, matching artifacts and public media verification below
## Single-Host Topology
```text
-Browser -- HTTPS/WSS --> nginx :443 --> Screener :8787
+Browser -- HTTPS/WSS --> nginx :443 --> Piik :8787
Browser <---------- DTLS-SRTP P2P ----------> Browser
-Browser -------- ordinary STUN/UDP --------> Screener :3478
-Browser -------- optional STUN/UDP --------> Screener :3479/3480
-Browser <--------- DTLS-SRTP/UDP ----------> Screener :7882
+Browser -------- ordinary STUN/UDP --------> Piik :3478
+Browser -------- optional STUN/UDP --------> Piik :3479/3480
+Browser <--------- DTLS-SRTP/UDP ----------> Piik :7882
```
-The public baseline uses one Screener Go binary, nginx, a valid Web TLS
+The public baseline uses one Piik Go binary, nginx, a valid Web TLS
certificate, and time synchronization. nginx terminates Web HTTPS/WSS and
-proxies only to Screener's private application listener; media UDP reaches the
+proxies only to Piik's private application listener; media UDP reaches the
Go process directly. There is no separate SFU token endpoint or TCP 7880 service.
Web and STUN may use different DNS names on the same public IP. Another proxy or
firewall owner needs its own matching updater and recovery checks.
Expose only the public listeners in
-[configuration reference](../reference/configuration.md). Screener TCP 8787 stays
+[configuration reference](../reference/configuration.md). Piik TCP 8787 stays
private. STUN answers Binding requests only; TURN allocations remain unavailable.
## Templates
-- [Screener systemd unit](../../deploy/systemd/screener.service.example)
+- [Piik systemd unit](../../deploy/systemd/piik.service.example)
- [nginx site](../../deploy/nginx/share.bonfire.icu.conf.example)
Copy templates outside the repository, inject independent secrets through an
@@ -56,16 +56,16 @@ domains, certificates, users, and resource limits required by the host.
## Initial Setup
1. Configure DNS and TLS for the Web origin and STUN name.
-2. Install nginx. The Screener release is one static binary and needs no
+2. Install nginx. The Piik release is one static binary and needs no
language runtime or separate media-service executable.
-3. Create an unprivileged `screener` service account, `/opt/screener/releases`,
- `/opt/screener/uploads`, and an access-restricted environment file.
+3. Create an unprivileged `piik` service account, `/opt/piik/releases`,
+ `/opt/piik/uploads`, and an access-restricted environment file.
4. Provision one verified initial immutable release and atomically point
- `/opt/screener/current` to it before enabling the unit. The tracked release
+ `/opt/piik/current` to it before enabling the unit. The tracked release
wrapper is upgrade-only and deliberately refuses a missing prior release;
this repository does not provide a generic first-install transaction.
5. SQLite is the Hosted default. The service template selects
- `/var/lib/screener/rooms.sqlite` in its service-owned StateDirectory; retain
+ `/var/lib/piik/rooms.sqlite` in its service-owned StateDirectory; retain
that absolute path in the environment file and include it in the host's
backup/recovery policy. Use `ROOM_DATABASE_PATH=:memory:` only for intentional
process-only rooms. Do not leave an empty override in a service environment.
@@ -75,7 +75,7 @@ domains, certificates, users, and resource limits required by the host.
preserve the private application boundary.
7. Apply the public-port allowlist and confirm every retired TURN/TCP port
is closed.
-8. Start Screener, then nginx. Screener binds its configured media listeners
+8. Start Piik, then nginx. Piik binds its configured media listeners
before accepting signaling and closes them with the application; a listener
bind failure rolls back startup. Verify public UDP reachability separately.
@@ -93,15 +93,15 @@ proxy/firewall configuration; verify those on the target deployment.
Verify the release archive against its descriptor and manifest using the
[release procedure](../deployment.md), then extract its four files into a new
-build-context directory: `screener-server`, `LICENSE`, `THIRD-PARTY-NOTICES.txt`
+build-context directory: `piik-server`, `LICENSE`, `THIRD-PARTY-NOTICES.txt`
and `REVISION`. Use that directory, not the repository or a secrets directory:
```sh
docker build --platform linux/amd64 \
- -f /path/to/Screener/deploy/container/Dockerfile \
- -t screener:<full-revision> /path/to/extracted-runtime
-docker run --rm --env-file /path/to/screener.env \
- screener:<full-revision> --check-config
+ -f /path/to/Piik/deploy/container/Dockerfile \
+ -t piik:<full-revision> /path/to/extracted-runtime
+docker run --rm --env-file /path/to/piik.env \
+ piik:<full-revision> --check-config
```
Use the existing [production configuration](../reference/configuration.md).
@@ -116,14 +116,14 @@ to a proxy running on the same host. Omit UDP publish options for disabled SFU
or auxiliary STUN listeners; use the matching port if configuration changes it.
```sh
-docker run -d --name screener --restart unless-stopped --stop-timeout 20 \
+docker run -d --name piik --restart unless-stopped --stop-timeout 20 \
--read-only --cap-drop ALL --security-opt no-new-privileges \
- --env-file /path/to/screener.env \
- --mount type=volume,source=screener-data,target=/home/nonroot \
+ --env-file /path/to/piik.env \
+ --mount type=volume,source=piik-data,target=/home/nonroot \
-e ROOM_DATABASE_PATH=/home/nonroot/rooms.sqlite \
-p 127.0.0.1:8787:8787/tcp \
-p 3478:3478/udp -p 3479:3479/udp -p 3480:3480/udp -p 7882:7882/udp \
- screener:<full-revision>
+ piik:<full-revision>
```
The image's `/home/nonroot` is owned by UID/GID `65532:65532` with mode `0700`.
@@ -132,7 +132,7 @@ must already be writable by that identity. Keep this volume when replacing the
container. Set `ROOM_DATABASE_PATH=:memory:` for memory-only room authority. Diagnostics
remain opt-in and use `/home/nonroot/logs`; [export and retention](../reference/configuration.md#diagnostics)
remain the operator's responsibility. Do not mount application files writable.
-With diagnostics enabled, `docker kill --signal=USR1 screener` requests a local
+With diagnostics enabled, `docker kill --signal=USR1 piik` requests a local
export without stopping the container; the ZIP remains in the mounted log directory.
Check `/healthz` from the host and public proxy, then verify configured STUN/SFU
@@ -154,28 +154,28 @@ The routine application wrapper cannot perform or recover it.
Client artifacts. Check active sessions and obtain the owner's acceptance of
share interruption before cutover; old pages and Clients must reload or
update together.
-2. Retain the exact prior release path, Screener unit and drop-ins, environment,
+2. Retain the exact prior release path, Piik unit and drop-ins, environment,
nginx configuration, and external media-service units, configuration, secrets,
and enabled/active state for rollback. Keep this material access-restricted
outside the repository. Define recovery for any persistent-state or firewall
surface the transaction actually changes.
3. Stage the current unit with
- `ExecStart=/opt/screener/current/screener-server` and
- `SCREENER_ENV=production`. Remove retired `NODE_ENV`, `PEER_ASSISTED_MEDIA`
+ `ExecStart=/opt/piik/current/piik-server` and
+ `PIIK_ENV=production`. Remove retired `NODE_ENV`, `PEER_ASSISTED_MEDIA`
and external `LIVEKIT_*` configuration; use the current
[environment contract](../reference/configuration.md), including
`SFU_UDP_PORT=7882` when fallback is enabled. Replace route `NODE_DEBUG` with
- `SCREENER_DEBUG=route` when needed. Validate the new binary's production
+ `PIIK_DEBUG=route` when needed. Validate the new binary's production
configuration as the service user before switching.
-4. Stop Screener and the old coturn/LiveKit services. Disable those old media
- services and remove the installed Screener LiveKit-readiness drop-in so they
+4. Stop Piik and the old coturn/LiveKit services. Disable those old media
+ services and remove the installed Piik LiveKit-readiness drop-in so they
cannot reclaim ports or delay startup. Verify that UDP 3478/3479/3480/7882
are released before the new Go process binds them. Install the current unit,
environment and nginx template, remove the old RTC proxy locations, validate
nginx, and reload systemd. Preserve unrelated proxy headers, limits, TLS,
asset handling, and firewall rules.
5. Atomically point the current release at the verified candidate, start
- Screener, and reload nginx. Verify the actual unit command and environment,
+ Piik, and reload nginx. Verify the actual unit command and environment,
local/public health, the matching Web asset, UDP listener ownership, public
STUN Binding and admitted SFU media, and the agreed active-session outcome.
6. On failure, stop the new Go process and confirm it released its UDP sockets.
@@ -196,11 +196,11 @@ Later application-only releases use the ordinary
Allow UDP 3479 and 3480 in both the cloud security group and the existing
nftables input rule, validating the complete ruleset with
`nft -c -f /etc/nftables.conf`. Set `NAT_PREDICTION_ENABLED=true` and restart
-Screener within an accepted service window. Verify `ss -lunp` shows all three
-Screener STUN listeners and that a public Binding request succeeds on each.
+Piik within an accepted service window. Verify `ss -lunp` shows all three
+Piik STUN listeners and that a public Binding request succeeds on each.
Do not add auxiliary URLs to `STUN_URLS`; enabled connections derive them from
the ordinary STUN authority. Keep both firewall rules while the capability is
-enabled. Set `NAT_PREDICTION_ENABLED=false` and restart Screener before removing
+enabled. Set `NAT_PREDICTION_ENABLED=false` and restart Piik before removing
the auxiliary firewall rules. Avoid verbose STUN/ICE logging because those
requests contain client IP addresses.
@@ -211,15 +211,15 @@ public IPv4.
## Operational Verification
- `/healthz` returns `{"status":"ok"}` locally and through the public origin.
-- Screener and nginx are active with expected restart counts and bounded
- logs/resources; Screener owns the configured STUN/SFU UDP listeners.
+- Piik and nginx are active with expected restart counts and bounded
+ logs/resources; Piik owns the configured STUN/SFU UDP listeners.
- The official Trickle ICE sample obtains an ordinary UDP `srflx` candidate from
the configured STUN service and no relay candidate.
- A direct room presents media on two networks when Peer ICE succeeds.
- A constrained route creates one managed Host publication and only admitted
subscriptions over embedded SFU UDP; Peer descendants remain ordinary P2P.
- Blocking all UDP reaches a clear bounded failure.
-- Restarting Screener in stable mode retains room authority while Browser
+- Restarting Piik in stable mode retains room authority while Browser
sessions and media reconnect from fresh process state.
Representative network, mobile, audio, 20-Viewer, and long-running evidence is
diff --git a/docs/product/media-quality.md b/docs/product/media-quality.md
index b327513a..ee89f05e 100644
--- a/docs/product/media-quality.md
+++ b/docs/product/media-quality.md
@@ -132,7 +132,7 @@ Each ordinary Browser PeerConnection owns stock WebRTC congestion control and
sender adaptation. Clones share one underlying media source and therefore do not provide
complete simultaneous isolation: framework source-wants aggregation may still
partially reduce frames available to sibling clones. Sibling outputs may differ;
-Screener does not impose a room-wide minimum. The Host's one Browser SFU
+Piik does not impose a room-wide minimum. The Host's one Browser SFU
publication uses the share-generation codec and selected ceilings. Its ordinary
simulcast outputs follow pinned LiveKit screen-share construction: original and
half size at the same frame rate, with a quarter-bitrate lower ceiling and its
@@ -200,7 +200,7 @@ native source. This gives one difficult path stock per-sender adaptation without
lowering the shared representation for healthy paths. It adds no quality score,
timer, or room-wide media setting.
-Screener does not maintain an application bitrate/resolution ladder, scene
+Piik does not maintain an application bitrate/resolution ladder, scene
detector, periodic quality controller, manual SFU layer selector, or
application-defined whole-room lowest-common-denominator target.
diff --git a/docs/product/presentation-lifecycle.md b/docs/product/presentation-lifecycle.md
index 7b278daf..c38da241 100644
--- a/docs/product/presentation-lifecycle.md
+++ b/docs/product/presentation-lifecycle.md
@@ -17,7 +17,7 @@ room identity, current state, roster, and one manual media-reconnect action.
Controls and text must remain usable without overlap or horizontal overflow on
desktop and mobile viewports.
-Screener Client opens this same application in the system Browser. Its small
+Piik Client opens this same application in the system Browser. Its small
startup surface selects Local, temporary public invitation, or a configured
Site 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
diff --git a/docs/product/routing-transport.md b/docs/product/routing-transport.md
index 79fc14c1..5ba1c1ef 100644
--- a/docs/product/routing-transport.md
+++ b/docs/product/routing-transport.md
@@ -128,9 +128,9 @@ SFU offer/answer, ICE and output demand use the existing authenticated room
WebSocket. The server binds each physical connection to the current participant,
share and publication; it issues no separate media token or room-service URL.
Browser SFU PeerConnections use the server's UDP candidates and no external
-ICE-server list. Ordinary peer connections use deployment STUN. Hosted Screener
+ICE-server list. Ordinary peer connections use deployment STUN. Hosted Piik
owns its configured Binding-only STUN listeners and optional SFU UDP listener in
-the same Go process. Screener
+the same Go process. Piik
configures no TURN, ICE/TCP, media TCP, or TLS-relayed media path. HTTPS/WSS is a
separate control transport and remains TLS/TCP.
@@ -151,7 +151,7 @@ the same bounded route recovery. Source capture remains Host-owned throughout.
Browser WebRTC and the shared Pion/LiveKit media adapter own ICE, consent,
congestion control, bitrate, frame rate, resolution, retransmission, pacing and
layer selection. Direct-child media demand does not create a topology operation.
-When the per-share convergence gate is enabled, Screener uses an exact persistent native
+When the per-share convergence gate is enabled, Piik uses an exact persistent native
sender limitation only to trigger one measured experiment through the existing
serial operation. Three fresh complete limited deltas from one exact sender may
trigger that experiment on a newly committed availability or direct-convergence
@@ -181,7 +181,7 @@ frame rate, or bitrate across persistent complete windows and produces no
freeze or pause; otherwise the old Peer route stays. The Host publication
ingress and every Viewer subscription are separate quality paths. One Viewer's
SFU proof never authorizes another Viewer. Disabling the gate leaves quality
-state diagnostic. Screener has no weighted route score, general parent-wide
+state diagnostic. Piik has no weighted route score, general parent-wide
prediction, all-pairs probe, periodic rebalance, persistent parent blacklist,
NAT classification, or independent depth cap.
diff --git a/docs/project-memory.md b/docs/project-memory.md
index 9127b9f5..c8c42867 100644
--- a/docs/project-memory.md
+++ b/docs/project-memory.md
@@ -2,7 +2,7 @@
Last updated: 2026-09-10
-Screener is private, low-latency game screen sharing for one Host and up to 20
+Piik is private, low-latency game screen sharing for one Host and up to 20
authenticated friends. The current product surface is Web Host, Web Viewer, and
Browser relay; desktop and mobile Browsers are Viewer targets. It is not a
public broadcast service. Hosted and Client run one shared Go core
@@ -68,7 +68,7 @@ implementation and routine UI detail.
available, and anonymous provenance distinguishes ordinary from predicted
selected paths. The configuration default remains stock ICE. The only
application fallback is one bounded embedded SFU/UDP
- publication; Screener configures no TURN or TCP media route. A pre-share
+ publication; Piik configures no TURN or TCP media route. A pre-share
peer-only policy can exclude that SFU suffix for one share generation.
- Every endpoint shares one steady outbound-copy cap, default `2` and limited to
`1..3`. One room controller owns one committed graph, one reconcile loop, and
@@ -94,12 +94,12 @@ implementation and routine UI detail.
## Current Snapshot
-The permanent-room candidate uses strict `screener-v23` Browser/server signaling,
+The current contract uses strict `piik-v23` Browser/server signaling,
Native control v9 and capture v7 together. Embedded SFU SDP/ICE and demand travel over the
authenticated room WebSocket, without an external room service or media token.
Committed first-frame readiness, bounded candidate-relative progress, durable
room authority and the H.264/VP8 sender gate remain. [Status](./status.md)
-separates this source from last known production; protocol rollback requires
+indexes source and deployment evidence; protocol rollback requires
matching Browser and Client artifacts, not only an application symlink.
Current work is owned by the [TODO ledger](./todo.md). Open physical evidence is
diff --git a/docs/reference/configuration.md b/docs/reference/configuration.md
index 3bf1d70e..ef271429 100644
--- a/docs/reference/configuration.md
+++ b/docs/reference/configuration.md
@@ -8,7 +8,7 @@ service secret store or an untracked access-restricted environment file.
| Variable | Contract |
| --- | --- |
-| `SCREENER_ENV` | `development` or `production`, default `development`; required for every server deployment: `production` enables production-only validation and the `Secure` site-access cookie. |
+| `PIIK_ENV` | `development` or `production`, default `development`; required for every server deployment: `production` enables production-only validation and the `Secure` site-access cookie. |
| `LISTEN_HOST` | Defaults to `0.0.0.0`; bare-metal production normally uses `127.0.0.1`. |
| `PORT` | Positive TCP port, default `8787`; the tracked release wrapper supports only that default. |
| `PUBLIC_BASE_URL` | Exact public HTTP(S) origin; production requires HTTPS. |
@@ -35,7 +35,7 @@ public-link Client construction create no SFU listener. The relay does not
provide application E2EE.
The SQLite parent directory must exist and be writable. The systemd template
-sets `/var/lib/screener/rooms.sqlite` under its managed state directory; the
+sets `/var/lib/piik/rooms.sqlite` under its managed state directory; the
container image sets `/home/nonroot/rooms.sqlite` under its writable data
directory. Keep the existing database path and data across application updates.
Room authority has no idle expiry; the separate site-access cookie keeps its
@@ -53,26 +53,26 @@ Diagnostics are local and opt-in. Enable them **before** reproducing the problem
| Surface | Enable | Export |
| --- | --- | --- |
-| Client | Start with `--debug` or `SCREENER_DEBUG=client` | Press `D` in the terminal for a ZIP |
+| Client | 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`, `SCREENER_DEBUG=server` or `SCREENER_DEBUG=route` | On Unix, `kill -USR1 <pid>`; also exported at orderly shutdown |
+| 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
action stops an active share or uploads anything. Browser export also remains
-available as `await window.__SCREENER_DEBUG__.export()` in DevTools.
+available as `await window.__PIIK_DEBUG__.export()` in DevTools.
-Client logs go to `logs` beside the executable, falling back to `Screener/logs`
+Client 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 shows
the actual path and the exported ZIP. `--log-dir` overrides
-`SCREENER_LOG_DIR`; an explicit directory must be writable. Choosing a
+`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, `SCREENER_DEBUG=route` alone retains console route
+orderly shutdown. On Client, `PIIK_DEBUG=route` alone retains console route
tracing; use `--debug` for file collection and the `D` action.
-Hosted logs use `SCREENER_LOG_DIR`, otherwise systemd `LOGS_DIRECTORY`,
+Hosted logs use `PIIK_LOG_DIR`, otherwise systemd `LOGS_DIRECTORY`,
otherwise `logs` under the working directory. The service unit supplies
-`/var/log/screener` with mode `0700`. Normal service notices remain in the
+`/var/log/piik` with mode `0700`. Normal service notices remain in the
journal; detailed dependency records go into the report. Windows Server has no
Unix signal trigger; forced process termination cannot create a final snapshot.
@@ -129,10 +129,10 @@ project references and the reasons for this collection boundary.
| Port | Scope | Owner |
| ---: | --- | --- |
| TCP 80/443 | public | HTTP redirect and HTTPS/WSS reverse proxy |
-| UDP 3478 | public | in-process STUN-only Screener listener |
-| UDP 3479/3480 | public when NAT prediction is enabled | in-process auxiliary STUN-only Screener listeners |
-| UDP 7882 (or `SFU_UDP_PORT`) | public when SFU enabled | in-process Screener WebRTC media |
-| TCP 8787 | private | Screener application |
+| UDP 3478 | public | in-process STUN-only Piik listener |
+| UDP 3479/3480 | public when NAT prediction is enabled | in-process auxiliary STUN-only Piik listeners |
+| UDP 7882 (or `SFU_UDP_PORT`) | public when SFU enabled | in-process Piik WebRTC media |
+| TCP 8787 | private | Piik application |
TCP 3478, TCP/TLS 5349, TURN relay ranges, media TCP, and other media
ports remain closed. HTTPS/WSS transport is independent of the UDP-only media
@@ -142,7 +142,7 @@ When `NAT_PREDICTION_ENABLED=true`, the server derives
`stun:<same-hostname>:3479` and `:3480` from the first ordinary STUN authority
on UDP 3478. The Host sees a pre-share switch that defaults on and may disable
it. The capability adds no media route or third-party service. It needs both
-cloud security-group rules and the host's `/etc/nftables.conf` rule. Screener
+cloud security-group rules and the host's `/etc/nftables.conf` rule. Piik
binds every required UDP listener before opening room persistence or accepting
signaling; a bind failure rolls back all newly owned sockets. Close and End
retire these listeners with the application. Existing coturn listeners must
diff --git a/docs/research/advanced-peer-distribution.md b/docs/research/advanced-peer-distribution.md
index 341d2c62..b552b07b 100644
--- a/docs/research/advanced-peer-distribution.md
+++ b/docs/research/advanced-peer-distribution.md
@@ -136,7 +136,7 @@ It has three concrete failures/limits:
- The secondary sender's `framesSent` stayed zero despite sending the complete
payload. Its `qualityLimitationReason=none` is not useful proof that the
- borrowed encoding fits that connection. Existing Screener sender evidence
+ borrowed encoding fits that connection. Existing Piik sender evidence
cannot consume those counters unchanged.
- In a VP8 late-join arm, the secondary received bytes but decoded zero frames
and sent 34 PLI requests. Those requests did not make the primary encoder
diff --git a/docs/research/agent-context-governance.md b/docs/research/agent-context-governance.md
index b2dcc227..cdcef1b5 100644
--- a/docs/research/agent-context-governance.md
+++ b/docs/research/agent-context-governance.md
@@ -11,7 +11,7 @@
OpenAI's agent-first repository treats `AGENTS.md` as a map into a structured,
versioned knowledge base. Its reported failure mode for one large instruction
-file is the same one observed in Screener: scarce context is crowded out, every
+file is the same one observed in Piik: scarce context is crowded out, every
rule appears equally important, stale guidance accumulates, and ownership is
hard to verify. The recommended corrective structure is progressive disclosure,
cross-links, and mechanical freshness/structure checks. Codex concatenates the
@@ -34,7 +34,7 @@ below that value and using nested context for genuinely distinct subtrees. Its
bounded-memory guidance starts consolidation at 80% rather than treating the
hard limit as the normal operating target.
-Screener therefore warns at the published recommendation or 80% of a loader
+Piik therefore warns at the published recommendation or 80% of a loader
limit, then fails only at a real loading boundary or a small explicit buffer:
32 KiB for the Codex chain, 20,000 characters for Hermes, and 250 effective
Claude lines above the 200-line recommendation. The same envelope applies to the
@@ -55,7 +55,7 @@ Sources:
### Documentation Shape
Diataxis separates tutorial, how-to, reference, and explanation because mixing
-reader goals makes each form harder to use. Screener's internal product modules
+reader goals makes each form harder to use. Piik's internal product modules
are compact reference; ADRs are explanation of a decision; deployment is a
how-to/reference boundary; research is evidence and explanation. The framework
does not require creating all four categories when there is no reader need.
@@ -76,7 +76,7 @@ Sources:
## Applicability
-Screener is small enough that a vector database, memory provider, generated code
+Piik is small enough that a vector database, memory provider, generated code
map, parallel agent-context format, or separate RFC repository would add more
ownership than it removes. The useful practices are bounded always-on context,
one owner per fact, domain-shaped reference, evidence on demand, short ADRs,
diff --git a/docs/research/backend-audit-1b01048.md b/docs/research/backend-audit-1b01048.md
index 5cbf629a..c27c6ee0 100644
--- a/docs/research/backend-audit-1b01048.md
+++ b/docs/research/backend-audit-1b01048.md
@@ -49,7 +49,7 @@ bounded graph controller; absent LiveKit configuration still means P2P-only
service. Room privacy and topology-optimization controls remain independent.
The old environment variable must be removed before the next deployment.
There is no Host-star compatibility path to port. Removing the unused
-authentication fields requires the coordinated private `screener-v21` release;
+authentication fields required the coordinated private signaling v21 release;
rollback to the prior server must also restore its environment configuration.
[ADR-0009](../adr/0009-optional-nat-prediction.md) distinguishes server-owned
diff --git a/docs/research/browser-background-capture.md b/docs/research/browser-background-capture.md
index 951c6cde..085d232e 100644
--- a/docs/research/browser-background-capture.md
+++ b/docs/research/browser-background-capture.md
@@ -208,4 +208,4 @@ copies no source code and adds no dependency. W3C material uses the
[W3C Document License](https://www.w3.org/copyright/document-license-2023/).
Chromium and WebRTC source files carry BSD-style licenses. Chrome for Developers
prose is CC BY 4.0, with samples under Apache 2.0. These sources are evidence
-only; their implementations are not incorporated into Screener.
+only; their implementations are not incorporated into Piik.
diff --git a/docs/research/cross-platform-client-runtime.md b/docs/research/cross-platform-client-runtime.md
index dbe2692f..7fe9e2e0 100644
--- a/docs/research/cross-platform-client-runtime.md
+++ b/docs/research/cross-platform-client-runtime.md
@@ -23,7 +23,7 @@ constraint. GameViewer separates its UI, supervised media service, codec
capability detector, streamer, health process, and updater. Discord keeps its
Chromium UI separate from a native voice/media module and updater. Oopz ships
Flutter, a second WebView, FFmpeg, Agora RTC, and Tencent LiteAV together; that
-stack is substantially larger and duplicates media ownership. Screener follows
+stack is substantially larger and duplicates media ownership. Piik follows
the first two products' process separation but not their UI runtimes, and avoids
Oopz's parallel RTC stacks: one Go process, one Pion media core, and one thin
system capture sidecar per platform remain sufficient. No binary code or private
@@ -49,9 +49,9 @@ credentials or route policy; those stay in the Browser/server protocol.
## Client Composition
-The Client and Hosted Screener run the same server core, so the local package is
+The Client and Hosted Piik run the same server core, so the local package is
one executable carrying the built Browser assets plus the optional capture and
-tunnel sidecars; [the Client README](../../cmd/screener-client/README.md) owns
+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
explicit local configuration. In Site mode it starts no server, and the system
Browser opens the saved Site while the same process remains its loopback
@@ -67,7 +67,7 @@ Linux remain package gates.
## Local And Hosted Reachability
A local page completed discovery and the full control exchange in Chromium
-151.0.7922.138. The hosted Screener origin completed it after Chromium received
+151.0.7922.138. The hosted Piik origin completed it after Chromium received
its `loopback-network` permission; without that permission the cross-origin
request was blocked. The gate checks both expected outcomes.
@@ -97,7 +97,7 @@ Current WebView2 exposes `getDisplayMedia` screen-capture events and its
Evergreen runtime updates independently; WebKitGTK exposes display capture and
uses GStreamer for WebRTC. Electron instead bundles one Chromium and Node but
makes the Client responsible for shipping those updates and adds substantial
-package size. These facts do not prove equivalent Screener media behavior.
+package size. These facts do not prove equivalent Piik media behavior.
Only a reproduced Browser-launch failure should open a comparative physical
gate for Electron, Tauri, Wails, Neutralino, or another shell. That gate must
@@ -147,7 +147,7 @@ The sidecar remains an explicit package input rather than a linked Client
dependency.
The peer topology gate now treats native `getStats()` RTP identity and frame
-totals as its portable core proof. Detailed Screener quality metrics enrich a
+totals as its portable core proof. Detailed Piik quality metrics enrich a
development run when its source module is served, but their absence on a static
deployment no longer erases valid native RTCStats.
diff --git a/docs/research/embedded-media.md b/docs/research/embedded-media.md
index 189eb3c3..3754e057 100644
--- a/docs/research/embedded-media.md
+++ b/docs/research/embedded-media.md
@@ -5,7 +5,7 @@ Baseline: `3da8ecd22a3499e660f498e527ad4ffbaef08c82`.
## Goal
-The owner requests source/library-level STUN and SFU inside the Screener Go
+The owner requests source/library-level STUN and SFU inside the Piik Go
process. Bundled coturn/LiveKit executables, automatic installers, subprocess
supervision and embedding the full LiveKit service do not meet this goal.
The owner has also agreed to [node-local adaptive reuse](./node-local-adaptation.md):
@@ -25,7 +25,7 @@ meet this requirement and is not an SFU replacement candidate.
Retain H264/VP8, Opus, per-subscriber adaptation, retransmission, recovery and
the existing three STUN destinations. Do not trade weak-Viewer experience for a
smaller package, invent an application quality score or add a media ladder.
-The media library, not Screener, must own congestion and layer decisions.
+The media library, not Piik, must own congestion and layer decisions.
No recording, mixing, TURN relay, public port scanning or production test.
Selective local transcoding is now in research scope under the agreed model;
the existing fanout-only probe does not establish that capability.
@@ -53,7 +53,7 @@ because its example compiles. Keep test executables under the worktree's stable
v3 and ICE v2. Do not introduce another older media stack by default.
- inlivedev/sfu uses Pion WebRTC v4 and exposes room/client APIs. Its README
explicitly warns that its API is early-stage; listed features are claims to
- verify, not proof of Screener's required behavior.
+ verify, not proof of Piik's required behavior.
- Galene is useful architectural reference, not yet an accepted library adapter.
## Current Evidence
@@ -91,7 +91,7 @@ Do not add that second transport merely to change the service's name.
WHIP is HTTP signaling for WebRTC ingest, not a replacement media transport.
Its no-renegotiation constraint must be checked against live audio/source changes;
it is not adopted merely because the request/response looks simpler. The current
-Screener signaling owner remains authoritative during this evaluation.
+Piik signaling owner remains authoritative during this evaluation.
## Sources
diff --git a/docs/research/low-server-media-routes.md b/docs/research/low-server-media-routes.md
index a30c693e..ebd2f19f 100644
--- a/docs/research/low-server-media-routes.md
+++ b/docs/research/low-server-media-routes.md
@@ -140,7 +140,7 @@ that changes this boundary.
Native libp2p, Tailscale, and mobile studies are useful operational evidence,
but their relay reservation, raw-socket control, address discovery, native
coordination, and sampled networks differ from browser WebRTC. Their success
-rates are not Screener coverage estimates.
+rates are not Piik coverage estimates.
## TURN Screening And No-Go
@@ -171,11 +171,11 @@ measured `B_pub` and `sum(B_s)`, so the SFU advantage is not assumed.
This no-go is an application-scope decision, not a claim that TURN is broken.
Coturn remains a valid BSD-3-Clause STUN/TURN implementation, and LiveKit
supports TCP and embedded/external TURN options. Framework capability alone
-does not require enabling every transport in Screener.
+does not require enabling every transport in Piik.
## SFU Admission Evidence
-LiveKit controls do not directly express Screener's resource dimensions:
+LiveKit controls do not directly express Piik's resource dimensions:
- room `maxParticipants` limits participant count;
- `canPublishSources` is an authorization allowlist;
diff --git a/docs/research/native-client-lifecycle.md b/docs/research/native-client-lifecycle.md
index 60d7f9e0..5e58dfab 100644
--- a/docs/research/native-client-lifecycle.md
+++ b/docs/research/native-client-lifecycle.md
@@ -208,7 +208,7 @@ extension forcibly disabled **Broadcast IP for Best WebRTC Performance**;
correcting the setting/extension restored Native sharing. The confirmed cause
is that extension's WebRTC policy, not unsupported Windows capture. VPN
extensions may reapply the override; the
-[Chromium WebRTC FAQ](../../cmd/screener-client/README.md#chromium-webrtc-connections)
+[Chromium WebRTC FAQ](../../cmd/piik-client/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
diff --git a/docs/research/native-client-media.md b/docs/research/native-client-media.md
index 95392c1a..37166de1 100644
--- a/docs/research/native-client-media.md
+++ b/docs/research/native-client-media.md
@@ -8,7 +8,7 @@
## Result
-Screener Client can own one process-isolated Windows capture and hardware H.264
+Piik Client can own one process-isolated Windows capture and hardware H.264
encoder, feed its Annex-B access units into one Pion source, and deliver that
source through independent WebRTC transports to unmodified Chrome receivers.
The Browser remains the room, route, and signaling authority.
diff --git a/docs/research/native-sender.md b/docs/research/native-sender.md
index 65bc1978..4acb28fd 100644
--- a/docs/research/native-sender.md
+++ b/docs/research/native-sender.md
@@ -129,7 +129,7 @@ Before native product consideration, one current-wire candidate must prove:
and
8. project, dependency, H.264 patent, and distribution license decisions.
-No native experiment may preserve an obsolete Screener wire, create another
+No native experiment may preserve an obsolete Piik wire, create another
room/topology model, loosen endpoint capacity, or become production merely to
make a diagnostic gate pass.
diff --git a/docs/research/node-local-adaptation.md b/docs/research/node-local-adaptation.md
index e2a55623..1e345309 100644
--- a/docs/research/node-local-adaptation.md
+++ b/docs/research/node-local-adaptation.md
@@ -16,7 +16,7 @@ alongside an identical `high` encoding.
## Two Workstreams
-- Self-contained Screener Server: library-level STUN/media components inside the
+- Self-contained Piik Server: library-level STUN/media components inside the
executable, 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.
@@ -74,7 +74,7 @@ not inferred from the words "automatic" or "simulcast":
counting. Do not claim every unused individual lower layer is always stopped.
- A higher quality request is not subject to downgrade-only debounce. Reduced
maximum demand is debounced; the pinned server default is five seconds. This
- is an upstream implementation fact, not a proposed Screener timing constant.
+ is an upstream implementation fact, not a proposed Piik timing constant.
Publisher deactivation debounce is not a five-second delay before reducing
traffic to a congested subscriber.
- The SDK applies the selected active flags through `RTCRtpSender.setParameters`
@@ -137,7 +137,7 @@ retire their resources immediately; warm retention cannot revive a retired sourc
| Component | Useful capability | Boundary |
| --- | --- | --- |
| Existing `mediaedge.Source` and Pion RTP/WebRTC/interceptors | Encoded fanout, per-edge transport and feedback | No decoder/transcoder or shared-variant policy is supplied automatically |
-| Existing Native encoders and generation/keyframe ownership | Platform encode paths already integrated with Screener | Received-source decode/scale and shared derived outputs still need design |
+| Existing Native encoders and generation/keyframe ownership | Platform encode paths already integrated with Piik | Received-source decode/scale and shared derived outputs still need design |
| LiveKit Dynacast, layer selector and prober sources | Reference for demand aggregation, safe switching and recovery probes | Apache-2.0 code; inspect imports/ownership before any extraction, not whole-service embedding |
| libvpx multi-resolution VP8 API/example | Multiple spatial encodes through one coordinated API; libvpx is already used | VP8-specific; no promise that H264 hardware sessions have the same cost curve |
| OpenH264 AVC simulcast API | Library H264 encode/decode and per-spatial-layer configuration | Software codec; inspect realtime cost and actual source/binary distribution terms before selection |
diff --git a/docs/research/node-local-media-design.md b/docs/research/node-local-media-design.md
index d3a98852..2253ca1b 100644
--- a/docs/research/node-local-media-design.md
+++ b/docs/research/node-local-media-design.md
@@ -93,7 +93,7 @@ all layers are distinct costs.
each transport still owns its packet headers and recovery.
5. Reduced demand stops unused upper outputs through the framework's normal
deactivation semantics. Any debounce belongs to that owner, not another
- Screener timer beside it. No application-selected timer values in this draft.
+ Piik timer beside it. No application-selected timer values in this draft.
6. Source replacement/failure/stop invalidates the same generation. No dormant
warm pool survives and no old callback can resurrect an encoder.
@@ -127,8 +127,8 @@ an explicitly controlled input-frame boundary is required. In particular,
| Existing module / primary source | Reuse or learn | Integration limit |
| --- | --- | --- |
-| Screener `mediaedge.Source`, `Edge`, Native capture generations | Encoded-source ownership, Pion connections, existing share/route identity | Static RTP broadcast alone does not solve switching sequence spaces or codec descriptors |
-| [Pion GCC](https://github.com/pion/interceptor/blob/main/pkg/gcc/send_side_bwe.go) and RTP/RTCP interceptors | Existing mature feedback and bandwidth estimate | Current Screener path only observes GCC and uses a no-queue pacer; selection/pacing is not already implemented |
+| Piik `mediaedge.Source`, `Edge`, Native capture generations | Encoded-source ownership, Pion connections, existing share/route identity | Static RTP broadcast alone does not solve switching sequence spaces or codec descriptors |
+| [Pion GCC](https://github.com/pion/interceptor/blob/main/pkg/gcc/send_side_bwe.go) and RTP/RTCP interceptors | Existing mature feedback and bandwidth estimate | Current Piik path only observes GCC and uses a no-queue pacer; selection/pacing is not already implemented |
| [LiveKit Dynacast manager](https://github.com/livekit/livekit/blob/v1.13.6/pkg/rtc/dynacast/dynacastmanagervideo.go) | Highest-needed activation and asymmetric demand handling | Apache-2.0; reference, not import the entire service or its downstream-node aggregation |
| [LiveKit Simulcast selector](https://github.com/livekit/livekit/blob/v1.13.6/pkg/sfu/videolayerselector/simulcast.go), [RTPMunger](https://github.com/livekit/livekit/blob/v1.13.6/pkg/sfu/rtpmunger.go), [prober](https://github.com/livekit/livekit/blob/v1.13.6/pkg/sfu/ccutils/prober.go) | Keyframe switching, packet continuity, bounded recovery probes | Valuable source, but imports protocol/buffer/logger infrastructure; not a demonstrated tiny drop-in |
| [libwebrtc VP8 adapter](https://github.com/webrtc-mirror/webrtc/blob/main/modules/video_coding/codecs/vp8/libvpx_vp8_encoder.cc) | Coordinated libvpx encoding, SetRates, active-stream keyframes, prepared scale buffers, separate codec and media timestamps | BSD-style; references many WebRTC types. Reuse the underlying libvpx API before copying a large wrapper |
@@ -141,7 +141,7 @@ or 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
independent universal selector. No new dependency or upstream implementation
source was copied in this design pass. Preserve upstream licenses/notices when
-an actual module is chosen; Screener's MIT does not replace them.
+an actual module is chosen; Piik's MIT does not replace them.
Parallel inLive API inspection found work to validate before selecting it:
publisher-demand change notification is not public; `AddRelayTrack` installs a
@@ -149,7 +149,7 @@ no-op PLI callback; the layer sender has its own packet mapping rather than a
standalone codec-neutral switch API. Its inspected timestamp expression subtracts
the layer origin twice. Manager room removal/locking, failed-PC closing and
logger injection also need focused reproductions. These are candidate-library
-risks, not claims about deployed Screener bugs or reasons to expand the Native
+risks, not claims about deployed Piik bugs or reasons to expand the Native
module into an SFU fork.
## Required Before Production
@@ -354,7 +354,7 @@ compare the selected complete media adapter against the same release trace.
Run the probe explicitly from the repository root, optionally with
`-frame-bursts`; it writes only ignored `build/embedded-media` diagnostics. It is
not a default unit/CI task. The observed cadence sensitivity is a reason to test
-the real packet path, not to introduce a Screener congestion score.
+the real packet path, not to introduce a Piik congestion score.
### Embedded Service Composition
@@ -372,7 +372,7 @@ the existing Close/End owner retires STUN too. No service supervisor or second
availability flag is needed. Deployment removes coturn in the final coordinated
cutover, not while the media implementation is still under acceptance.
-The implementation candidate uses a thin Screener SFU with LiveKit **media-core
+The implementation candidate uses a thin Piik SFU with LiveKit **media-core
components**, without its RTC room or service. A stock-Pion compile and actual
ReceiverBase/DownTrack projection pass; two receiving PCs also demonstrate an
unaffected high-output sibling and high/low/high allocation under forced budgets.
@@ -463,8 +463,8 @@ and the existing pinned libvpx build, using the same MSVC flags as the earlier
CPU probe. Generate its JSONL under `build/embedded-media`, then run:
```powershell
-$env:SCREENER_ENCODED_FIXTURE = 'build/embedded-media/encoded-group.fixture.jsonl'
-$env:SCREENER_ENCODED_OUTPUT = 'build/embedded-media/encoded-group.received.json'
+$env:PIIK_ENCODED_FIXTURE = 'build/embedded-media/encoded-group.fixture.jsonl'
+$env:PIIK_ENCODED_OUTPUT = 'build/embedded-media/encoded-group.received.json'
& .\build\embedded-media\mediaedge.test.exe '-test.run=TestEncodedGroupVP8Fixture' '-test.v' '-test.timeout=30s'
node scripts/encoded-group-decode.mjs
```
diff --git a/docs/research/piik-rename-plan.md b/docs/research/piik-rename-plan.md
new file mode 100644
index 00000000..ee5dba79
--- /dev/null
+++ b/docs/research/piik-rename-plan.md
@@ -0,0 +1,141 @@
+# Piik rename
+
+Status: accepted rename and coordinated cutover plan.
+Last reviewed: 2026-09-10.
+
+## Accepted identity
+
+Display `Piik`; use `piik` for executable, package, environment and service
+identifiers. GitHub is `TNTcraftHIM/Piik`; the Go module follows that exact case.
+The native macOS bundle identifier is `tv.piik.client`.
+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.
+
+This is a private pre-release rename. It changes names and deployment identity,
+not media policy, routing, capture behavior or SQLite room semantics.
+
+## Recovery and local metadata
+
+The external `Piik-recovery/rename-20260910` directory contains a verified
+`repository.bundle` and a complete `git-metadata` copy. The latter preserves
+reflogs and all ten stash entries, which a bundle of ordinary refs alone does
+not capture. Earlier recovery bundles also remain outside the repository.
+Backups keep their original names and contents so they remain identifiable.
+
+The main directory is `Piik`; preparation worktrees are `Piik-appearance` and
+`Piik-rename`, with `Piik-external-audit` retained separately. Their private Git
+registration names, backlinks and shared remote are updated. The hook path is
+relative `.githooks`. Retire integrated preparation worktrees after cutover.
+The audit worktree's branch and source revision remain untouched. Integration
+keeps one complete phase commit on main.
+
+On Windows, a terminal can hold the repository directory open. Move the entries
+into an empty verified destination and run `git worktree repair` from the new
+main directory. Do not terminate the user's terminal to release a path.
+Existing firewall rules name executable paths, so moved build binaries require
+their corresponding path rules to be reviewed before network acceptance.
+
+## Runtime and data boundary
+
+`piik-v23` and `piik-client-v9` are new exact protocol labels. Their message
+schemas 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
+the renamed control boundary. No alternate protocol reader is introduced.
+
+SQLite schema 2, its application ID, room codes, token/grant digests and password
+material remain unchanged. The four-byte database file identity is a format
+constant, not display branding. Copy the database only while the old process is
+stopped, verify integrity and retained columns, and preserve the original for
+rollback. 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:
+copy directly compatible, accessible settings once during cutover; discard
+unavailable or incompatible settings. The product reads only Piik names, with
+no migration code, alternate reader or old-name alias.
+
+The local Client configuration is unchanged JSON version 1 and can be copied
+byte-for-byte into the Piik directory without replacing an existing new config.
+Browser credentials and settings are origin/session-owned. Transfer them only
+through an available original Browser session; do not modify a live Browser's
+storage database or introduce a product bridge to recover them. Otherwise the
+new namespace starts empty, requiring login, room creation and preference setup.
+Old room authority remains in SQLite, but an unavailable Host credential cannot
+be reconstructed from its stored digest. Site-access cookies and remembered
+Client activation are renewed normally under the new contract.
+
+## Git history
+
+The owner authorized replacing the old name in Git history. Use the maintained
+`git-filter-repo` tool in a fresh, separate bare clone, never in the working
+repository. Scope this to commit/tag **messages**: historical source snapshots,
+authorship, dates and topology remain factual. Current tracked prose and code
+use the accepted identity; old snapshots remain recoverable at their mapped
+commits and in the original archive.
+
+The initial inventory found two matching commit bodies and no matching commit
+subjects or tag names. A small text change still changes descendant SHAs and
+invalidates their commit signatures. Preserve `commit-map` and `ref-map`; verify
+equal commit counts, identical source trees, mapped parents, authors and dates,
+no dropped commits and a clean repository integrity check. No replacement refs,
+duplicate compatibility branches or history-rewriting tool enter the product.
+
+The rehearsal verified all 546 reachable branch/tag commits: exactly two messages
+changed, all file trees and mapped parent relationships match, and authors/dates
+are preserved. Standard filtering rewrote 545 IDs and removed 374 signatures.
+Those signatures remain verifiable only in the original archive; a rewritten
+commit must not be presented as preserving its earlier GitHub verification.
+
+Apply a reviewed message rewrite only with the coordinated brand integration,
+using explicit ref targets and old-SHA leases. Do not use `push --mirror` from
+the rehearsal: it could overwrite unrelated refs. Preserve the external audit
+branch and stash history in the original repository. Old audit/deployment SHAs
+remain evidence identifiers, interpreted through the archive and commit map.
+
+## Operational cutover
+
+The following old identifiers are retained here only as operator recovery
+inputs, not as runtime aliases:
+
+| Surface | Before | After |
+| --- | --- | --- |
+| Service, user and group | `screener` | `piik` |
+| Installation root | `/opt/screener` | `/opt/piik` |
+| 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` |
+
+Prepare the new immutable artifacts, service/environment/proxy configuration,
+permissions and database path before stopping the old service. Record original
+configuration and ownership for recovery. Do not run two room authorities on
+the same database or two media services on the same UDP ports.
+
+The routine `deploy/release-app.sh` assumes an existing **Piik** installation.
+It is not the first brand migration tool: its old-release checks and recovery
+target the Piik service/binary. Perform the first name cutover as one explicit
+infrastructure operation, then use the ordinary wrapper for future releases.
+On failure, stop the candidate and restore the old binary, service, environment,
+proxy and data together before reopening ingress.
+
+GitHub is already renamed and the remote works. There are no published releases
+or Pages site to migrate. Keep repository visibility private; `piik.tv` DNS and
+Pages publication remain a separate website task. Old GitHub deployment/PR
+records describe earlier operations and are not rewritten as new releases.
+
+## Validation and references
+
+Acceptance covers the tracked-name inventory, Web type/build checks, relevant
+contract/storage tests, native compilation, Client/Server packaging and a
+controlled local launch. Production release additionally requires the accepted
+best-effort settings transfer, configuration/database recovery and postflight.
+
+Primary references, checked 2026-09-10:
+
+- [Git worktree repair](https://git-scm.com/docs/git-worktree): repair both
+ directions after moving the main repository or linked worktrees.
+- [git-filter-repo](https://github.com/newren/git-filter-repo/blob/main/Documentation/git-filter-repo.txt):
+ message replacement, fresh clones and old/new commit maps.
+- [GitHub repository rename](https://docs.github.com/en/repositories/creating-and-managing-repositories/renaming-a-repository):
+ ordinary URL redirects do not cover repository-hosted Actions or project Pages.
diff --git a/docs/research/platform-output.md b/docs/research/platform-output.md
index c905304e..b5726789 100644
--- a/docs/research/platform-output.md
+++ b/docs/research/platform-output.md
@@ -2,18 +2,18 @@
Last reviewed: 2026-08-31
-This document owns evidence for showing a live Screener session on an AirPlay,
+This document owns evidence for showing a live Piik session on an AirPlay,
Cast, or Presentation API display. It does not add a product output surface.
## Current Decision
Do not add an application Cast or AirPlay button yet. Browser or operating-system
-tab/screen mirroring is already usable without Screener integration. The Web
+tab/screen mirroring is already usable without Piik integration. The Web
platform does not give the current `video.srcObject = MediaStream` a portable
remote-playback contract.
The only application design worth a physical prototype is a custom Cast
-receiver acting as another authenticated Screener Viewer. It would receive its
+receiver acting as another authenticated Piik Viewer. It would receive its
own WebRTC route and count toward room and endpoint capacity; it would not reuse
or fling the controlling Browser's decoded video element.
@@ -24,7 +24,7 @@ or fling the controlling Browser's decoded video element.
Browser and operating-system UI can mirror a tab, window, screen, or media
element. The W3C Remote Playback model explicitly permits this implementation
shape but does not standardize its transport, latency, quality, lifecycle, or
-device coverage. Screener needs no adapter for it and cannot claim its result.
+device coverage. Piik needs no adapter for it and cannot claim its result.
### Media Remoting Or Flinging
@@ -55,12 +55,12 @@ application with custom messaging.
That makes a narrow architecture possible: launch a receiver page, deliver a
short-lived room-scoped Viewer grant over the established control channel, and
-let that page join through the normal Screener Viewer and routing contracts. The
+let that page join through the normal Piik Viewer and routing contracts. The
grant must not appear in the presentation URL, logs, storage, or device metadata.
This is not accepted product behavior. Google's documented media matrix does
not promise WebRTC in a Custom Web Receiver, the Presentation API is not a
-cross-Browser surface, and no target receiver has proved Screener's codec,
+cross-Browser surface, and no target receiver has proved Piik's codec,
autoplay, audio, network, or lifecycle requirements.
## Physical Acceptance Gate
diff --git a/docs/research/realtime-quality-adaptation.md b/docs/research/realtime-quality-adaptation.md
index 44c2510b..25bcda66 100644
--- a/docs/research/realtime-quality-adaptation.md
+++ b/docs/research/realtime-quality-adaptation.md
@@ -230,7 +230,7 @@ default screen-share publication can expose original and lower representations,
and server BWE can forward a lower representation to a constrained subscriber
while another receives the highest available representation.
-Calling the pinned client's own encoding calculator with Screener's exact
+Calling the pinned client's own encoding calculator with Piik's exact
publish options produces two VP8 encodings for every accepted profile:
| Profile | Lower representation | Original representation |
@@ -239,7 +239,7 @@ publish options produces two VP8 encodings for every accepted profile:
| 1080p30 | 1/2 scale, 1.25 Mbps, 30 fps | 5 Mbps, 30 fps |
| 1080p60 | 1/2 scale, 2 Mbps, 60 fps | 8 Mbps, 60 fps |
-Both encodings start without an explicit RTP `priority` because Screener's
+Both encodings start without an explicit RTP `priority` because Piik's
custom `screenShareEncoding` replaces LiveKit's priority-bearing preset while
retaining its default `simulcast: true`. The audio encoding is `high` priority.
Priority can only redistribute bandwidth within that PeerConnection and request
diff --git a/docs/research/server-consolidation.md b/docs/research/server-consolidation.md
index eee7ede7..42917d89 100644
--- a/docs/research/server-consolidation.md
+++ b/docs/research/server-consolidation.md
@@ -7,7 +7,7 @@
## Current Ownership
-`cmd/screener-server` (Hosted) and `cmd/screener-client` (Client) compose the
+`cmd/piik-server` (Hosted) and `cmd/piik-client` (Client) compose the
same 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
@@ -46,8 +46,8 @@ share one route authority and LiveKit remains an optional fallback of that graph
```text
one Go module
-cmd/screener-server -> shared server application
-cmd/screener-client -> shared server application + launcher + native media
+cmd/piik-server -> shared server application
+cmd/piik-client -> shared server application + launcher + native media
internal/server -> rooms, routing, HTTP/signaling, persistence, SFU adapters
internal/client -> current native and platform boundaries
one React/Vite static artifact -> embedded in both binaries
@@ -106,7 +106,7 @@ origin, site-access password, one STUN URL, loopback listen host), polled
`/healthz` every 10 ms until `{"status":"ok"}`, waited 5 s idle, sampled
resident memory through PowerShell `WorkingSet64`, then killed the process.
Five runs per side; the median is reported. Before is the Node baseline at tag
-`baseline-b20fd88`; after is `screener-server` under the same script.
+`baseline-b20fd88`; after is `piik-server` under the same script.
| metric | before | after |
| --- | ---: | ---: |
@@ -117,9 +117,9 @@ Five runs per side; the median is reported. Before is the Node baseline at tag
The before total is the Node runtime (91,694,408 B), the production
`node_modules` tree (12,640,469 B in 1,513 files), `dist/client` (1,492,721 B)
and `dist/server` (856,898 B). The after total is the linux/amd64
-`screener-server` built with `-s -w` and embedded assets (13,983,906 B) plus its
+`piik-server` built with `-s -w` and embedded assets (13,983,906 B) plus its
notices and `REVISION`. For reference, the windows/amd64 binaries are
-14,276,608 B (`screener-server`) and 22,703,104 B (`screener-client`, which also
+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
Node runtime and dependency tree it used to ship beside its Go executable.
diff --git a/docs/research/webrtc-encoder-pool.md b/docs/research/webrtc-encoder-pool.md
index 28166a13..bb042a08 100644
--- a/docs/research/webrtc-encoder-pool.md
+++ b/docs/research/webrtc-encoder-pool.md
@@ -13,7 +13,7 @@ The installed Chrome is 152.0.7977.82. Its [DEPS][chromium-deps] pins libwebrtc
to `6f37672d358475cd17544121a12494da454d85fb`; WebRTC references below use that
revision, not a floating upstream branch. Source shows available mechanisms,
not which field trials or hardware encoder a particular runtime selected.
-The Screener comparison uses the `3c192ddd` candidate, not production.
+The Piik comparison uses the `3c192ddd` candidate, not production.
## Actual Control Ownership
@@ -45,7 +45,7 @@ These are connected but different owners:
For example, the adapter can request at most 3/5 of the current pixel count or
reduce FPS to 2/3 under the corresponding preference. These are upstream rules,
-not proposed Screener constants. The default [encoder minimum][encoder-api] is
+not proposed Piik constants. The default [encoder minimum][encoder-api] is
320x180 pixels and can be overridden; no universal 108p floor is established.
VP8's [libvpx adapter][vp8] disables libvpx internal resizing because WebRTC owns
that work outside the codec. Turning on libvpx resizing alone does not restore
@@ -53,7 +53,7 @@ the omitted control chain.
### Motion And Simulcast Are Not Synonyms
-Screener's `motion` hint becomes `kFluid` in the [Chromium sink][chromium-hint].
+Piik's `motion` hint becomes `kFluid` in the [Chromium sink][chromium-hint].
[VideoRtpSender][sender-hint] then sets `is_screencast=false`; this follows the
realtime-video path even for display capture. Explicit degradation preference
still has precedence over the hint's default. Do not assume all display capture
@@ -584,7 +584,7 @@ software encoder. VSE invokes `OnEncodeStarted` on its encoder queue just
before the codec call; raw arrival and `OnDiscardedFrame` do not supply CPU
samples. Replaying dropped inputs as encoded work would misrepresent feedback.
-Screener's synchronous drain and latest-input mailbox reduce arrivals into VSE
+Piik's synchronous drain and latest-input mailbox reduce arrivals into VSE
under this load, but the [same pinned VSE][vse] also skips queued frames before
calling the CPU observer. Therefore moving admission or reporting source drops
alone is not an established fix for multi-second encode gaps. Chromium's pinned
diff --git a/docs/status.md b/docs/status.md
index 726e41a1..7c6cc568 100644
--- a/docs/status.md
+++ b/docs/status.md
@@ -23,21 +23,24 @@ and Git/PRs own completed history.
## Deployment
-The owner authorized integration, coordinated cutover and cleanup before the
-Piik appearance phase. Authorization is not deployment evidence: the immutable
-release descriptor, runtime `REVISION` and operator deployment record own the
-actual deployed identity and postflight result. The
-[schema cutover procedure](./deployment.md#permanent-room-schema-cutover) preserves
-existing room authority and Browser credential keys with a database/application
-rollback boundary.
+Source, package identity, GitHub repository and local worktree paths use Piik.
+The strict wire labels and stored keys move together at the coordinated
+[brand cutover](./research/piik-rename-plan.md). Directly compatible, accessible
+settings are transferred once; unavailable settings start fresh. Runtime code
+keeps only the Piik contract.
+The immutable release descriptor, runtime `REVISION` and operator deployment
+record own exact identity and postflight results. The
+[schema cutover](./deployment.md#permanent-room-schema-cutover) preserved existing
+room authority and Browser credential keys. Old active pages reload at the
+signaling v23 boundary.
The existing deployment uses one Go process for Web, room authority/signaling,
Binding-only STUN on UDP 3478/3479/3480 and optional SFU on UDP 7882. nginx owns
HTTPS; external LiveKit/coturn services remain disabled. Participants, routes and
media remain process-only. This private service is not a public demonstration.
-[TODO](./todo.md) owns closeout and subsequent appearance, renaming, distribution
-and ablation work. No public site or bulk rename belongs to this release.
+[TODO](./todo.md) owns rename acceptance, distribution and ablation work.
+The public website is a later phase.
## Media Evidence And Limits
diff --git a/docs/todo.md b/docs/todo.md
index 298245fe..77ada5e7 100644
--- a/docs/todo.md
+++ b/docs/todo.md
@@ -7,43 +7,19 @@ and Git/PRs own completed history. A parked idea is not implementation authority
## Now
-Finish the owner-authorized PR386 squash, matched Web/Client/Server cutover and
-cleanup, then resume Piik appearance. Entry/Client lifecycle repairs, confirmed
-reconnect ownership fixes and the permanent-room/Hosted SQLite-default revision
-are implemented and verified. Product modules and
-[ADR-0002](./adr/0002-memory-resident-protected-rooms.md) own that accepted behavior.
-
-Use the [coordinated cutover](./deployment.md#permanent-room-schema-cutover) to
-preserve existing SQLite authority and unchanged Browser credential keys; old
-active pages reload at the signaling v23 boundary. Runtime release metadata and
-the operator record own deployment completion. Do not recreate databases or
-add a replacement garbage collector. Later manual feedback is nonblocking.
+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.
## Next — Awaiting Owner Direction
-1. Resume the [Piik brand study](./design/piik-brand.html) after the experience
- repairs. Keep round i dots; the tiny-e experiment was rejected. Try using the
- two outer stems as small headphones/earcups on the TV, retaining its familiar
- silhouette and the k diagonals as antennae. Display `Piik` and technical
- `piik` remain proposals. Settle identity before coordinated renaming or the
- public-site implementation.
-2. After the brand discussion, rename display copy, Go/npm source identity,
- Client/Server packages and OS icons, strict protocol/service identifiers,
- diagnostic redaction, configuration and deployment tooling in one coordinated
- phase. Inventory is complete. Browser storage contains room authority/grants
- and Client configuration contains a saved Site; decide preservation/reset
- explicitly before renaming their keys or directories. Preserve SQLite room
- authority when changing deployment paths. Use matching Web/Client/Server
- artifacts and one current reader/writer, without compatibility aliases.
- Keep third-party names/notices and historical evidence attribution accurate.
-
The owner owns **piik.tv**.
-Agree on casing, TV mascot/wordmark treatment, repository and runtime identifiers,
-release names and the GitHub Pages website before implementing the rename.
-Keep one current internal contract and remove replaced names in the coordinated
-change; no private compatibility aliases. Existing sketches are input, not an
-accepted identity. Do not configure DNS/Pages or publish the brand before that
-design discussion. The private production service is not a public demo.
+Design the GitHub Pages website around the accepted brand study. Keep one
+current internal contract; third-party names/notices remain accurate. DNS/Pages
+and public publication are separate from the repository rename. The private
+production service is not a public demo.
Include the owner-requested frontend/backend ablation review in that phase.
Review duplicated behavior/state, module boundaries, interface clarity, lifecycle
diff --git a/go.mod b/go.mod
index 88d1fd9f..f0cd37a1 100644
--- a/go.mod
+++ b/go.mod
@@ -1,4 +1,4 @@
-module github.com/TNTcraftHIM/Screener
+module github.com/TNTcraftHIM/Piik
go 1.26
diff --git a/index.html b/index.html
index 8c7b31ea..a5f78731 100644
--- a/index.html
+++ b/index.html
@@ -6,10 +6,10 @@
<meta name="theme-color" content="#141e29" media="(prefers-color-scheme: dark)" />
<meta name="theme-color" content="#e9f2ee" media="(prefers-color-scheme: light)" />
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
- <title>Screener</title>
+ <title>Piik</title>
<script>
try {
- var theme = localStorage.getItem("screener:ui-theme") ||
+ var theme = localStorage.getItem("piik:ui-theme") ||
(matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light");
document.documentElement.dataset.theme = theme;
} catch (e) {}
diff --git a/internal/client/clientapp/app.go b/internal/client/clientapp/app.go
index 8d2e13d4..99517472 100644
--- a/internal/client/clientapp/app.go
+++ b/internal/client/clientapp/app.go
@@ -16,18 +16,18 @@ import (
"syscall"
"time"
- "github.com/TNTcraftHIM/Screener/internal/client/browser"
- "github.com/TNTcraftHIM/Screener/internal/client/clientconfig"
- "github.com/TNTcraftHIM/Screener/internal/client/lan"
- "github.com/TNTcraftHIM/Screener/internal/client/launcher"
- "github.com/TNTcraftHIM/Screener/internal/client/loopback"
- "github.com/TNTcraftHIM/Screener/internal/client/nativecapture"
- "github.com/TNTcraftHIM/Screener/internal/client/nativecontrol"
- "github.com/TNTcraftHIM/Screener/internal/client/publictunnel"
- "github.com/TNTcraftHIM/Screener/internal/diagnostics"
- serverapp "github.com/TNTcraftHIM/Screener/internal/server/app"
- serverconfig "github.com/TNTcraftHIM/Screener/internal/server/config"
- "github.com/TNTcraftHIM/Screener/internal/server/webassets"
+ "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/diagnostics"
+ serverapp "github.com/TNTcraftHIM/Piik/internal/server/app"
+ serverconfig "github.com/TNTcraftHIM/Piik/internal/server/config"
+ "github.com/TNTcraftHIM/Piik/internal/server/webassets"
)
const (
@@ -63,14 +63,14 @@ type Options struct {
func Run(ctx context.Context, options Options) (returnedErr error) {
ctx, cancel := context.WithCancel(ctx)
- options.Debug = options.Debug || clientDebugEnabled(os.Getenv("SCREENER_DEBUG"))
+ options.Debug = options.Debug || clientDebugEnabled(os.Getenv("PIIK_DEBUG"))
options.console = newClientConsole(cancel, options.DisableBrowser)
var recorder *diagnostics.Recorder
var restoreLogger func()
defer func() {
cancel()
if recorder != nil {
- slog.Debug("screener-client", "event", "stopped", "failed", returnedErr != nil, diagnostics.Error(returnedErr))
+ slog.Debug("piik-client", "event", "stopped", "failed", returnedErr != nil, diagnostics.Error(returnedErr))
if options.console.program == nil {
path, err := recorder.Export()
options.console.send(consoleExportResult{path: path, err: err})
@@ -85,7 +85,7 @@ func Run(ctx context.Context, options Options) (returnedErr error) {
var err error
recorder, err = openClientDiagnostics(options.LogDir)
if err != nil {
- return fmt.Errorf("Screener Client diagnostics are unavailable: %w", err)
+ return fmt.Errorf("Piik Client diagnostics are unavailable: %w", err)
}
previous, previousWriter, previousFlags := slog.Default(), log.Writer(), log.Flags()
var dependencyLog *diagnostics.LineWriter
@@ -102,7 +102,7 @@ func Run(ctx context.Context, options Options) (returnedErr error) {
log.SetFlags(previousFlags)
options.console.send(consoleDebug{logPath: recorder.LogPath(), export: recorder.Export})
}
- slog.Debug("screener-client", "event", "start", "revision", BuildRevision)
+ slog.Debug("piik-client", "event", "start", "revision", BuildRevision)
options.console.show(consoleView{state: "starting"})
if err := validateMode(options); err != nil {
return err
@@ -115,21 +115,21 @@ func Run(ctx context.Context, options Options) (returnedErr error) {
var err error
configPath, err = clientconfig.DefaultPath()
if err != nil {
- return errors.New("Screener Client configuration is unavailable")
+ return errors.New("Piik Client configuration is unavailable")
}
}
config, err := clientconfig.LoadOrCreate(configPath)
if err != nil {
- return errors.New("Screener Client configuration is unavailable")
+ return errors.New("Piik Client configuration is unavailable")
}
config, err = applyMode(config, options)
if err != nil {
return err
}
- slog.Debug("screener-client", "event", "configuration", "siteConfigured", config.Site != "", "localAccessProtected", config.LocalAccessPassword != "")
+ 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("Screener Client configuration is unavailable")
+ return errors.New("Piik Client configuration is unavailable")
}
}
nativeMedia := discoverNativeMedia(ctx, options.CaptureProcess)
@@ -139,7 +139,7 @@ func Run(ctx context.Context, options Options) (returnedErr error) {
recorder.Context("capture", nativeMedia.capture)
recorder.Binary("captureExecutable", nativeMedia.captureProcess)
}
- slog.Debug("screener-client", "event", "native-capabilities",
+ slog.Debug("piik-client", "event", "native-capabilities",
"video", nativeMedia.capabilities.Video, "processAudio", nativeMedia.capabilities.ProcessAudio,
"systemAudio", nativeMedia.capabilities.SystemAudio, "hardwareH264", nativeMedia.capabilities.HardwareH264,
"softwareVP8", nativeMedia.capabilities.SoftwareVP8)
@@ -150,10 +150,10 @@ func Run(ctx context.Context, options Options) (returnedErr error) {
Presentation: options.console.setLanguage,
})
if err != nil {
- return errors.New("Screener Client could not start")
+ return errors.New("Piik Client could not start")
}
defer client.Close()
- slog.Debug("screener-client", "event", "control-ready")
+ slog.Debug("piik-client", "event", "control-ready")
if options.console.machine {
if err = printEndpoint(client.Endpoint()); err != nil {
return err
@@ -209,7 +209,7 @@ func runLauncher(
))
options.console.show(consoleView{state: "setup", entry: launch.URL()})
if err = browser.Open(launch.URL()); err != nil {
- return errors.New("Screener Client could not open its launcher")
+ return errors.New("Piik Client could not open its launcher")
}
var selection launcher.Selection
@@ -219,7 +219,7 @@ func runLauncher(
return nil
case err = <-launch.Done():
if err != nil {
- return errors.New("Screener Client launcher stopped unexpectedly")
+ return errors.New("Piik Client launcher stopped unexpectedly")
}
return nil
}
@@ -232,7 +232,7 @@ func runLauncher(
if err = clientconfig.Save(configPath, config); err != nil {
launch.SetResult("", err)
<-launch.Handled()
- return errors.New("Screener Client configuration is unavailable")
+ return errors.New("Piik Client configuration is unavailable")
}
client.SetAllowedOrigins(clientOrigins(config.Site, options.Port))
options.SiteSet = false
@@ -289,7 +289,7 @@ func applyMode(config clientconfig.Config, options Options) (clientconfig.Config
var err error
config.Site, err = clientconfig.NormalizeSite(options.Site)
if err != nil || config.Site == "" {
- return clientconfig.Config{}, errors.New("Screener Site must be an HTTP or HTTPS origin")
+ return clientconfig.Config{}, errors.New("Piik Site must be an HTTP or HTTPS origin")
}
} else if options.Local {
config.Site = ""
@@ -315,7 +315,7 @@ func clientDebugEnabled(value string) bool {
func openClientDiagnostics(directory string) (*diagnostics.Recorder, error) {
if directory = strings.TrimSpace(directory); directory == "" {
- directory = strings.TrimSpace(os.Getenv("SCREENER_LOG_DIR"))
+ directory = strings.TrimSpace(os.Getenv("PIIK_LOG_DIR"))
}
if directory != "" {
return diagnostics.Open(directory, "client", BuildRevision)
@@ -332,33 +332,33 @@ func openClientDiagnostics(directory string) (*diagnostics.Recorder, error) {
if cacheErr != nil {
return nil, errors.Join(err, cacheErr)
}
- return diagnostics.Open(filepath.Join(cache, "Screener", "logs"), "client", BuildRevision)
+ return diagnostics.Open(filepath.Join(cache, "Piik", "logs"), "client", BuildRevision)
}
-// runSite opens the configured Screener Site in the Browser and waits for the
+// 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 {
var err error
- slog.Debug("screener-client", "event", "mode", "mode", "site")
+ slog.Debug("piik-client", "event", "mode", "mode", "site")
launchURL := clientLaunchURL(site)
view := consoleView{mode: "site", state: "starting", entry: launchURL}
options.console.show(view)
if options.console.machine {
- fmt.Printf("Screener Site: %s\n", site)
+ fmt.Printf("Piik Site: %s\n", site)
}
if !options.DisableBrowser {
if err = browser.Open(launchURL); err != nil {
- return errors.New("Screener Client could not open the Site")
+ return errors.New("Piik Client could not open the Site")
}
} else if options.Ready != nil {
options.Ready(launchURL)
}
view.state = "ready"
- slog.Debug("screener-client", "event", "site-ready")
+ slog.Debug("piik-client", "event", "site-ready")
options.console.show(view)
if err = <-client.Done(); err != nil {
- return errors.New("Screener Client stopped unexpectedly")
+ return errors.New("Piik Client stopped unexpectedly")
}
return nil
}
@@ -370,7 +370,7 @@ func runLocal(ctx context.Context, options Options, config clientconfig.Config,
if options.Link {
view.mode = "link"
}
- slog.Debug("screener-client", "event", "mode", "mode", view.mode)
+ slog.Debug("piik-client", "event", "mode", "mode", view.mode)
options.console.show(view)
listener, err := net.ListenTCP("tcp4", &net.TCPAddr{IP: net.IPv4zero, Port: options.Port})
if err != nil {
@@ -402,7 +402,7 @@ func runLocal(ctx context.Context, options Options, config clientconfig.Config,
}
defer tunnel.Close()
publicOrigin = tunnel.Origin()
- slog.Debug("screener-client", "event", "public-link-ready")
+ slog.Debug("piik-client", "event", "public-link-ready")
}
stunURLs, natPredictionStunURLs := localSTUNURLs(options.Link)
@@ -436,7 +436,7 @@ func runLocal(ctx context.Context, options Options, config clientconfig.Config,
if _, err = localServer.Listen(ctx); err != nil {
return err
}
- slog.Debug("screener-client", "event", "local-server-ready", "port", options.Port, "publicLink", publicOrigin != "")
+ slog.Debug("piik-client", "event", "local-server-ready", "port", options.Port, "publicLink", publicOrigin != "")
// The readiness lines follow the listener, which the packaged smoke and the
// public-link gate both read from stdout before they probe the port.
@@ -458,7 +458,7 @@ func runLocal(ctx context.Context, options Options, config clientconfig.Config,
)
if !options.DisableBrowser {
if err = browser.Open(launchURL); err != nil {
- return errors.New("Screener Client could not open the Local page")
+ return errors.New("Piik Client could not open the Local page")
}
} else if options.Ready != nil {
options.Ready(launchURL)
@@ -478,7 +478,7 @@ func runLocal(ctx context.Context, options Options, config clientconfig.Config,
return endLocalServer(localServer)
case err = <-client.Done():
if err != nil {
- return errors.New("Screener Client runtime stopped unexpectedly")
+ return errors.New("Piik Client runtime stopped unexpectedly")
}
return nil
case <-tunnelDone:
@@ -495,7 +495,7 @@ func clientLaunchURL(raw string) string {
if err != nil {
return raw
}
- fragment.Set("screener-client", "1")
+ fragment.Set("piik-client", "1")
parsed.Fragment = fragment.Encode()
return parsed.String()
}
@@ -513,7 +513,7 @@ func clientLaunchURLWithLocalAccess(raw, password string) string {
if password != "" {
fragment.Set("client-access", password)
}
- fragment.Set("screener-client", "1")
+ fragment.Set("piik-client", "1")
parsed.Fragment = fragment.Encode()
return parsed.String()
}
@@ -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("Screener Client endpoint is unavailable")
+ return errors.New("Piik Client endpoint is unavailable")
}
fmt.Println(string(payload))
return nil
diff --git a/internal/client/clientapp/app_test.go b/internal/client/clientapp/app_test.go
index dfa761b2..05dbe891 100644
--- a/internal/client/clientapp/app_test.go
+++ b/internal/client/clientapp/app_test.go
@@ -13,8 +13,8 @@ import (
"strings"
"testing"
- "github.com/TNTcraftHIM/Screener/internal/client/clientconfig"
- serverconfig "github.com/TNTcraftHIM/Screener/internal/server/config"
+ "github.com/TNTcraftHIM/Piik/internal/client/clientconfig"
+ serverconfig "github.com/TNTcraftHIM/Piik/internal/server/config"
)
func TestOccupiedPortRejectsLinkBeforeStartingATunnel(t *testing.T) {
@@ -41,7 +41,7 @@ func TestClientLaunchURLMarksThePageWithoutChangingOrigin(t *testing.T) {
t.Fatalf("launch URL = %q, %v", value, err)
}
fragment, err := url.ParseQuery(parsed.Fragment)
- if err != nil || fragment.Get("screener-client") != "1" {
+ if err != nil || fragment.Get("piik-client") != "1" {
t.Fatalf("Client launch fragment = %q, %v", parsed.Fragment, err)
}
}
@@ -64,7 +64,7 @@ func TestClientDiagnosticsUseFilesOnlyWhenEnabled(t *testing.T) {
log.SetOutput(previousOutput)
slog.SetLogLoggerLevel(previousLevel)
})
- t.Setenv("SCREENER_DEBUG", "")
+ t.Setenv("PIIK_DEBUG", "")
for _, enabled := range []bool{false, true} {
output.Reset()
directory := t.TempDir()
@@ -72,7 +72,7 @@ func TestClientDiagnosticsUseFilesOnlyWhenEnabled(t *testing.T) {
if err == nil {
t.Fatal("invalid mode must stop before starting capture or services")
}
- if strings.Contains(output.String(), "screener-client") {
+ if strings.Contains(output.String(), "piik-client") {
t.Fatalf("Client diagnostics reached stderr: %s", output.String())
}
content, readErr := os.ReadFile(filepath.Join(directory, "client.log"))
@@ -92,7 +92,7 @@ func TestClientDiagnosticsUseFilesOnlyWhenEnabled(t *testing.T) {
func TestClientDiagnosticDirectoryHonorsExplicitSelection(t *testing.T) {
environmentDirectory := t.TempDir()
- t.Setenv("SCREENER_LOG_DIR", environmentDirectory)
+ t.Setenv("PIIK_LOG_DIR", environmentDirectory)
for _, directory := range []string{"", t.TempDir()} {
recorder, err := openClientDiagnostics(directory)
if err != nil {
@@ -139,7 +139,7 @@ func TestLaunchURLPreservesLocalAccessInsideThePrivateFragment(t *testing.T) {
}
fragment, err := url.ParseQuery(parsed.Fragment)
if err != nil || fragment.Get("client-access") != "secret" ||
- fragment.Get("screener-client") != "1" {
+ fragment.Get("piik-client") != "1" {
t.Fatalf("local native launch fragment = %q, %v", parsed.Fragment, err)
}
}
@@ -155,7 +155,7 @@ func TestLaunchURLEncodesAndClearsOptionalLocalAccess(t *testing.T) {
}
fragment, err := url.ParseQuery(parsed.Fragment)
if err != nil || fragment.Get("client-access") != "a+b&c?d=e" ||
- fragment.Get("screener-client") != "1" || fragment.Get("retained") != "yes" {
+ fragment.Get("piik-client") != "1" || fragment.Get("retained") != "yes" {
t.Fatalf("encoded local launch fragment = %q, %v", parsed.Fragment, err)
}
@@ -165,7 +165,7 @@ func TestLaunchURLEncodesAndClearsOptionalLocalAccess(t *testing.T) {
t.Fatal(err)
}
fragment, err = url.ParseQuery(parsed.Fragment)
- if err != nil || fragment.Get("client-access") != "" || fragment.Get("screener-client") != "1" {
+ if err != nil || fragment.Get("client-access") != "" || fragment.Get("piik-client") != "1" {
t.Fatalf("open local launch fragment = %q, %v", parsed.Fragment, err)
}
}
diff --git a/internal/client/clientapp/console.go b/internal/client/clientapp/console.go
index e8ed9768..facff6e3 100644
--- a/internal/client/clientapp/console.go
+++ b/internal/client/clientapp/console.go
@@ -14,7 +14,7 @@ import (
tea "charm.land/bubbletea/v2"
"charm.land/lipgloss/v2"
- "github.com/TNTcraftHIM/Screener/internal/client/browser"
+ "github.com/TNTcraftHIM/Piik/internal/client/browser"
"github.com/charmbracelet/colorprofile"
"github.com/charmbracelet/x/ansi"
"github.com/charmbracelet/x/term"
@@ -72,7 +72,7 @@ var consoleCopy = map[string][3]string{
"mode": {"Mode", "模式", ""},
"local": {"Local network", "局域网", "□"},
"link": {"Public link", "公网链接", "↗"},
- "site": {"Screener Site", "Screener 站点", "@"},
+ "site": {"Piik Site", "Piik 站点", "@"},
"setup": {"Choose a mode in the browser", "在浏览器中选择模式", "?"},
"starting": {"Starting", "正在启动", "…"},
"ready": {"Ready", "已就绪", "✓"},
@@ -141,10 +141,10 @@ func (console *clientConsole) finish(err error) error {
if console.program != nil {
terminalErr := <-console.done
if err != nil {
- fmt.Fprintln(os.Stderr, "Screener Client:", err)
+ fmt.Fprintln(os.Stderr, "Piik Client:", err)
}
if terminalErr != nil {
- fmt.Fprintln(os.Stderr, "Screener Client:", terminalErr)
+ fmt.Fprintln(os.Stderr, "Piik Client:", terminalErr)
}
return terminalErr
}
@@ -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 = "Screener Client"
+ view.WindowTitle = "Piik Client"
view.AltScreen = true
return view
}
@@ -281,7 +281,7 @@ func (model consoleModel) content(styled bool) string {
revision = revision[:7]
}
var out strings.Builder
- heading := "Screener\nClient\n" + muted.Render(revision)
+ heading := "Piik\nClient\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 {
diff --git a/internal/client/clientapp/console_test.go b/internal/client/clientapp/console_test.go
index 0f710495..d32120b0 100644
--- a/internal/client/clientapp/console_test.go
+++ b/internal/client/clientapp/console_test.go
@@ -166,11 +166,11 @@ func TestConsoleDiagnosticsFitCompactTerminal(t *testing.T) {
model := consoleModel{
view: consoleView{mode: "local", state: "ready", entry: "http://localhost:8787/"},
width: 30, height: 18, colors: true,
- debug: consoleDebug{logPath: "C:/Screener/logs/client.log", export: func() (string, error) { return "", nil }},
+ debug: consoleDebug{logPath: "C:/Piik/logs/client.log", export: func() (string, error) { return "", nil }},
}
for _, language := range []string{"en", "zh", "vis"} {
model.language = language
- for _, path := range []string{"", "C:/Screener/logs/client-20260908T120000Z.zip", "C:/Users/Example/Documents/Workspaces/Screener-embedded-media/build/client-check/logs/client-diagnostics-20260908T120000Z-123456789.zip"} {
+ for _, path := range []string{"", "C:/Piik/logs/client-20260908T120000Z.zip", "C:/Users/Example/Documents/Workspaces/Piik-embedded-media/build/client-check/logs/client-diagnostics-20260908T120000Z-123456789.zip"} {
model.exportPath = path
content := model.content(true)
if lipgloss.Width(content) > model.width || lipgloss.Height(content) > model.height {
diff --git a/internal/client/clientconfig/config.go b/internal/client/clientconfig/config.go
index 8f7066a1..d561b698 100644
--- a/internal/client/clientconfig/config.go
+++ b/internal/client/clientconfig/config.go
@@ -32,7 +32,7 @@ func DefaultPath() (string, error) {
if err != nil {
return "", fmt.Errorf("find user configuration directory: %w", err)
}
- return filepath.Join(directory, "Screener", "client.json"), nil
+ return filepath.Join(directory, "Piik", "client.json"), nil
}
func LoadOrCreate(path string) (Config, error) {
@@ -99,7 +99,7 @@ func NormalizeSite(value string) (string, error) {
parsed.Host == "" || parsed.User != nil ||
(parsed.Path != "" && parsed.Path != "/") ||
parsed.RawQuery != "" || parsed.Fragment != "" {
- return "", errors.New("Screener Site must be an HTTP or HTTPS origin")
+ return "", errors.New("Piik Site must be an HTTP or HTTPS origin")
}
return parsed.Scheme + "://" + parsed.Host, nil
}
diff --git a/internal/client/launcher/server.go b/internal/client/launcher/server.go
index 7a5a82dd..41646820 100644
--- a/internal/client/launcher/server.go
+++ b/internal/client/launcher/server.go
@@ -13,7 +13,7 @@ import (
"sync"
"time"
- "github.com/TNTcraftHIM/Screener/internal/client/clientconfig"
+ "github.com/TNTcraftHIM/Piik/internal/client/clientconfig"
)
const (
@@ -255,7 +255,7 @@ func (server *Server) handleLaunch(response http.ResponseWriter, request *http.R
server.mu.Unlock()
if !resultSet || resultErr != nil {
writeJSON(response, http.StatusServiceUnavailable, map[string]string{
- "error": "Screener Client could not start",
+ "error": "Piik Client could not start",
})
server.markHandled()
return
diff --git a/internal/client/launcher/server_test.go b/internal/client/launcher/server_test.go
index a2b52e56..9e8a13bc 100644
--- a/internal/client/launcher/server_test.go
+++ b/internal/client/launcher/server_test.go
@@ -59,7 +59,7 @@ func TestLauncherServesStateAndCompletesOneSelection(t *testing.T) {
if selection != (Selection{Mode: ModeLink, Language: "vis"}) {
t.Fatalf("selection = %+v", selection)
}
- server.SetResult("http://localhost:8787/#screener-client=1", nil)
+ server.SetResult("http://localhost:8787/#piik-client=1", nil)
case <-time.After(time.Second):
t.Fatal("launcher did not emit a selection")
}
@@ -72,7 +72,7 @@ func TestLauncherServesStateAndCompletesOneSelection(t *testing.T) {
Target string `json:"target"`
}
if response.StatusCode != http.StatusOK || json.NewDecoder(response.Body).Decode(&launch) != nil ||
- launch.Target != "http://localhost:8787/#screener-client=1" {
+ launch.Target != "http://localhost:8787/#piik-client=1" {
t.Fatalf("launcher result = %d, %+v", response.StatusCode, launch)
}
case <-time.After(time.Second):
@@ -135,7 +135,7 @@ func TestLauncherCarriesAndNormalizesAnOptionalLocalPassword(t *testing.T) {
if selection.Mode != ModeLocal || selection.Language != "zh" || selection.LocalAccessPassword != "new-local-pass" {
t.Fatalf("selection = %+v", selection)
}
- server.SetResult("http://localhost:8787/#screener-client=1", nil)
+ server.SetResult("http://localhost:8787/#piik-client=1", nil)
case <-time.After(time.Second):
t.Fatal("launcher did not emit a selection")
}
diff --git a/internal/client/loopback/protocol.go b/internal/client/loopback/protocol.go
index 530d3416..ef7c0423 100644
--- a/internal/client/loopback/protocol.go
+++ b/internal/client/loopback/protocol.go
@@ -10,8 +10,8 @@ import (
const (
ProtocolVersion = 9
- ServiceName = "screener-client"
- ControlSubprotocol = "screener-client-v9"
+ ServiceName = "piik-client"
+ ControlSubprotocol = "piik-client-v9"
MaxControlMessageBytes = 256 << 10
DefaultPortStart = 39721
DefaultPortEnd = 39730
diff --git a/internal/client/mediaedge/audio.go b/internal/client/mediaedge/audio.go
index c8298b03..ab64df9f 100644
--- a/internal/client/mediaedge/audio.go
+++ b/internal/client/mediaedge/audio.go
@@ -6,7 +6,7 @@ import (
"sync/atomic"
"time"
- "github.com/TNTcraftHIM/Screener/internal/client/nativeaudio"
+ "github.com/TNTcraftHIM/Piik/internal/client/nativeaudio"
"github.com/pion/rtp"
"github.com/pion/webrtc/v4"
"github.com/pion/webrtc/v4/pkg/media"
@@ -59,7 +59,7 @@ func (engine *Engine) NewAudioSource(capacity, bitrate int) (*AudioSource, error
track, err := webrtc.NewTrackLocalStaticSample(
opusCapability,
"audio",
- "screener-native",
+ "piik-native",
)
if err != nil {
return nil, err
@@ -82,7 +82,7 @@ func (engine *Engine) NewRelayedAudioSource(capacity int) (*AudioSource, error)
track, err := webrtc.NewTrackLocalStaticRTP(
opusCapability,
"audio",
- "screener-native",
+ "piik-native",
)
if err != nil {
return nil, err
diff --git a/internal/client/mediaedge/edge.go b/internal/client/mediaedge/edge.go
index 595833f4..86b5b27d 100644
--- a/internal/client/mediaedge/edge.go
+++ b/internal/client/mediaedge/edge.go
@@ -8,8 +8,8 @@ import (
"strings"
"sync"
- "github.com/TNTcraftHIM/Screener/internal/diagnostics"
- "github.com/TNTcraftHIM/Screener/internal/media/forwarding"
+ "github.com/TNTcraftHIM/Piik/internal/diagnostics"
+ "github.com/TNTcraftHIM/Piik/internal/media/forwarding"
"github.com/pion/ice/v4"
"github.com/pion/webrtc/v4"
)
@@ -138,22 +138,22 @@ func (engine *Engine) NewEdge(source *Source, options EdgeOptions) (*Edge, error
edge.localCandidates.addPion(candidate)
})
connection.OnICEConnectionStateChange(func(state webrtc.ICEConnectionState) {
- log.Debug("screener-client", "event", "media-ice-state", "direction", "outbound", "local", options.Local, "state", state.String())
+ log.Debug("piik-client", "event", "media-ice-state", "direction", "outbound", "local", options.Local, "state", state.String())
})
if dtls := edge.sender.Transport(); dtls != nil {
dtls.OnStateChange(func(state webrtc.DTLSTransportState) {
- log.Debug("screener-client", "event", "media-dtls-state", "direction", "outbound", "local", options.Local, "state", state.String())
+ log.Debug("piik-client", "event", "media-dtls-state", "direction", "outbound", "local", options.Local, "state", state.String())
})
}
connection.OnConnectionStateChange(func(state webrtc.PeerConnectionState) {
debug := slog.Default().Enabled(engine.ctx, slog.LevelDebug)
if debug {
- log.Debug("screener-client", "event", "media-connection-state", "direction", "outbound", "local", options.Local, "state", state.String())
+ log.Debug("piik-client", "event", "media-connection-state", "direction", "outbound", "local", options.Local, "state", state.String())
}
if state == webrtc.PeerConnectionStateConnected {
if err := edge.transport.SetConnected(); err != nil {
if debug {
- log.Debug("screener-client", "event", "media-activation-failed", diagnostics.Error(err))
+ log.Debug("piik-client", "event", "media-activation-failed", diagnostics.Error(err))
}
_ = connection.Close()
return
@@ -165,7 +165,7 @@ func (engine *Engine) NewEdge(source *Source, options EdgeOptions) (*Edge, error
if pair, pairErr := edge.SelectedPair(); pairErr == nil {
selected = &pair
if debug {
- log.Debug("screener-client", "event", "media-selected-path", "direction", "outbound", "local", options.Local,
+ log.Debug("piik-client", "event", "media-selected-path", "direction", "outbound", "local", options.Local,
"localType", pair.Local.String(), "remoteType", pair.Remote.String(), "natTraversalPath", pair.NatTraversalPath)
}
}
@@ -387,7 +387,7 @@ func logLocalMediaCandidateCounts(report webrtc.StatsReport) {
tcp++
}
}
- slog.Debug("screener-client", "event", "media-candidate-counts", "local", true,
+ slog.Debug("piik-client", "event", "media-candidate-counts", "local", true,
"direction", string(direction), "type", kind.String(), "udp", udp, "tcp", tcp)
}
}
diff --git a/internal/client/mediaedge/edge_test.go b/internal/client/mediaedge/edge_test.go
index 4caeaefb..9051cc0f 100644
--- a/internal/client/mediaedge/edge_test.go
+++ b/internal/client/mediaedge/edge_test.go
@@ -10,9 +10,9 @@ import (
"testing"
"time"
- "github.com/TNTcraftHIM/Screener/internal/client/nativeaudio"
- "github.com/TNTcraftHIM/Screener/internal/client/nativecapture"
- "github.com/TNTcraftHIM/Screener/internal/media/encoded"
+ "github.com/TNTcraftHIM/Piik/internal/client/nativeaudio"
+ "github.com/TNTcraftHIM/Piik/internal/client/nativecapture"
+ "github.com/TNTcraftHIM/Piik/internal/media/encoded"
"github.com/livekit/livekit-server/pkg/sfu"
"github.com/livekit/livekit-server/pkg/sfu/streamtracker"
"github.com/pion/interceptor"
diff --git a/internal/client/mediaedge/engine.go b/internal/client/mediaedge/engine.go
index 82144028..8cd3d22e 100644
--- a/internal/client/mediaedge/engine.go
+++ b/internal/client/mediaedge/engine.go
@@ -12,10 +12,10 @@ import (
"sync/atomic"
"time"
- "github.com/TNTcraftHIM/Screener/internal/client/portmapping"
- "github.com/TNTcraftHIM/Screener/internal/diagnostics"
- "github.com/TNTcraftHIM/Screener/internal/media/encoded"
- "github.com/TNTcraftHIM/Screener/internal/media/forwarding"
+ "github.com/TNTcraftHIM/Piik/internal/client/portmapping"
+ "github.com/TNTcraftHIM/Piik/internal/diagnostics"
+ "github.com/TNTcraftHIM/Piik/internal/media/encoded"
+ "github.com/TNTcraftHIM/Piik/internal/media/forwarding"
"github.com/pion/ice/v4"
"github.com/pion/interceptor"
"github.com/pion/rtcp"
@@ -90,7 +90,7 @@ func NewEngine(options EngineOptions) (*Engine, error) {
loggerFactory := diagnostics.PionLoggerFactory()
ready := make(chan struct{})
mux := ice.NewUniversalUDPMuxDefault(ice.UniversalUDPMuxParams{
- Logger: loggerFactory.NewLogger("screener-ice"),
+ Logger: loggerFactory.NewLogger("piik-ice"),
UDPConn: &initializingUDPConn{UDPConn: connection, ready: ready},
})
close(ready)
@@ -288,7 +288,7 @@ func (engine *Engine) NewSource(codec string, capacity, layers int, requestKeyFr
publications: make(map[*Publication]struct{}),
}
media, err := forwarding.NewEncodedSource(forwarding.SourceOptions{
- ID: "screen", StreamID: "screener-native", Codec: videoCodecs[codec],
+ ID: "screen", StreamID: "piik-native", Codec: videoCodecs[codec],
Formats: make([]forwarding.LayerFormat, layers), MaxPackets: encoded.MaxPacketWindow,
OnRTCP: func(layer int, packets []rtcp.Packet) {
for _, packet := range packets {
diff --git a/internal/client/mediaedge/group_fixture_test.go b/internal/client/mediaedge/group_fixture_test.go
index 6b70ac1e..878c5647 100644
--- a/internal/client/mediaedge/group_fixture_test.go
+++ b/internal/client/mediaedge/group_fixture_test.go
@@ -9,16 +9,16 @@ import (
"testing"
"time"
- "github.com/TNTcraftHIM/Screener/internal/media/encoded"
+ "github.com/TNTcraftHIM/Piik/internal/media/encoded"
"github.com/pion/rtp"
"github.com/pion/rtp/codecs"
)
// Explicit codec gate input; ordinary unit checks do not build/run a native codec.
func TestEncodedGroupVP8Fixture(t *testing.T) {
- inputPath := os.Getenv("SCREENER_ENCODED_FIXTURE")
+ inputPath := os.Getenv("PIIK_ENCODED_FIXTURE")
if inputPath == "" {
- t.Skip("set SCREENER_ENCODED_FIXTURE to the bounded VP8 fixture JSONL")
+ t.Skip("set PIIK_ENCODED_FIXTURE to the bounded VP8 fixture JSONL")
}
input, err := os.Open(inputPath)
if err != nil {
@@ -228,7 +228,7 @@ func TestEncodedGroupVP8Fixture(t *testing.T) {
t.Fatal("sender evidence counted unused-layer bytes")
}
}
- if outputPath := os.Getenv("SCREENER_ENCODED_OUTPUT"); outputPath != "" {
+ if outputPath := os.Getenv("PIIK_ENCODED_OUTPUT"); outputPath != "" {
data, err := json.Marshal(delivered)
if err != nil {
t.Fatal(err)
diff --git a/internal/client/mediaedge/groups.go b/internal/client/mediaedge/groups.go
index e6a85187..c06620d7 100644
--- a/internal/client/mediaedge/groups.go
+++ b/internal/client/mediaedge/groups.go
@@ -5,9 +5,9 @@ import (
"log/slog"
"time"
- "github.com/TNTcraftHIM/Screener/internal/diagnostics"
- "github.com/TNTcraftHIM/Screener/internal/media/encoded"
- "github.com/TNTcraftHIM/Screener/internal/media/forwarding"
+ "github.com/TNTcraftHIM/Piik/internal/diagnostics"
+ "github.com/TNTcraftHIM/Piik/internal/media/encoded"
+ "github.com/TNTcraftHIM/Piik/internal/media/forwarding"
"github.com/pion/rtcp"
"github.com/pion/webrtc/v4"
)
diff --git a/internal/client/mediaedge/groups_test.go b/internal/client/mediaedge/groups_test.go
index 06cd11d5..d0ebf6be 100644
--- a/internal/client/mediaedge/groups_test.go
+++ b/internal/client/mediaedge/groups_test.go
@@ -4,8 +4,8 @@ import (
"testing"
"time"
- "github.com/TNTcraftHIM/Screener/internal/media/encoded"
- "github.com/TNTcraftHIM/Screener/internal/media/forwarding"
+ "github.com/TNTcraftHIM/Piik/internal/media/encoded"
+ "github.com/TNTcraftHIM/Piik/internal/media/forwarding"
"github.com/livekit/livekit-server/pkg/sfu"
"github.com/pion/rtcp"
)
diff --git a/internal/client/mediaedge/publication.go b/internal/client/mediaedge/publication.go
index b1c4b6b8..bb34eedf 100644
--- a/internal/client/mediaedge/publication.go
+++ b/internal/client/mediaedge/publication.go
@@ -6,7 +6,7 @@ import (
"sync"
"time"
- "github.com/TNTcraftHIM/Screener/internal/media/forwarding"
+ "github.com/TNTcraftHIM/Piik/internal/media/forwarding"
"github.com/pion/webrtc/v4"
)
diff --git a/internal/client/mediaedge/publication_test.go b/internal/client/mediaedge/publication_test.go
index 3de25c77..5b7ad4f8 100644
--- a/internal/client/mediaedge/publication_test.go
+++ b/internal/client/mediaedge/publication_test.go
@@ -5,8 +5,8 @@ import (
"testing"
"time"
- "github.com/TNTcraftHIM/Screener/internal/media/encoded"
- "github.com/TNTcraftHIM/Screener/internal/media/forwarding"
+ "github.com/TNTcraftHIM/Piik/internal/media/encoded"
+ "github.com/TNTcraftHIM/Piik/internal/media/forwarding"
"github.com/livekit/livekit-server/pkg/sfu"
"github.com/pion/interceptor"
"github.com/pion/webrtc/v4"
diff --git a/internal/client/mediaedge/quality.go b/internal/client/mediaedge/quality.go
index 03c3e83f..f164c057 100644
--- a/internal/client/mediaedge/quality.go
+++ b/internal/client/mediaedge/quality.go
@@ -4,8 +4,8 @@ import (
"log/slog"
"time"
- "github.com/TNTcraftHIM/Screener/internal/diagnostics"
- "github.com/TNTcraftHIM/Screener/internal/media/forwarding"
+ "github.com/TNTcraftHIM/Piik/internal/diagnostics"
+ "github.com/TNTcraftHIM/Piik/internal/media/forwarding"
"github.com/pion/webrtc/v4"
)
diff --git a/internal/client/mediaedge/quality_test.go b/internal/client/mediaedge/quality_test.go
index 608e7fb4..971c8d63 100644
--- a/internal/client/mediaedge/quality_test.go
+++ b/internal/client/mediaedge/quality_test.go
@@ -4,8 +4,8 @@ import (
"testing"
"time"
- "github.com/TNTcraftHIM/Screener/internal/media/encoded"
- "github.com/TNTcraftHIM/Screener/internal/media/forwarding"
+ "github.com/TNTcraftHIM/Piik/internal/media/encoded"
+ "github.com/TNTcraftHIM/Piik/internal/media/forwarding"
"github.com/livekit/livekit-server/pkg/sfu"
)
diff --git a/internal/client/mediaedge/receiver.go b/internal/client/mediaedge/receiver.go
index 85e75798..b456533f 100644
--- a/internal/client/mediaedge/receiver.go
+++ b/internal/client/mediaedge/receiver.go
@@ -99,14 +99,14 @@ func (engine *Engine) NewReceiver(options ReceiverOptions) (*Receiver, webrtc.Se
connection.OnConnectionStateChange(func(state webrtc.PeerConnectionState) {
debug := slog.Default().Enabled(engine.ctx, slog.LevelDebug)
if debug {
- slog.Debug("screener-client", "event", "media-connection-state", "direction", "inbound", "state", state.String())
+ slog.Debug("piik-client", "event", "media-connection-state", "direction", "inbound", "state", state.String())
}
var selected *SelectedPair
if state == webrtc.PeerConnectionStateConnected && (receiver.events.ConnectionState != nil || debug) {
if pair, pairErr := receiver.SelectedPair(); pairErr == nil {
selected = &pair
if debug {
- slog.Debug("screener-client", "event", "media-selected-path", "direction", "inbound",
+ slog.Debug("piik-client", "event", "media-selected-path", "direction", "inbound",
"localType", pair.Local.String(), "remoteType", pair.Remote.String(), "natTraversalPath", pair.NatTraversalPath)
}
}
diff --git a/internal/client/mediaedge/relay_chain_fixture_test.go b/internal/client/mediaedge/relay_chain_fixture_test.go
index 142a8f5f..4d7464c5 100644
--- a/internal/client/mediaedge/relay_chain_fixture_test.go
+++ b/internal/client/mediaedge/relay_chain_fixture_test.go
@@ -11,17 +11,17 @@ import (
"testing"
"time"
- "github.com/TNTcraftHIM/Screener/internal/client/nativecapture"
- "github.com/TNTcraftHIM/Screener/internal/media/encoded"
+ "github.com/TNTcraftHIM/Piik/internal/client/nativecapture"
+ "github.com/TNTcraftHIM/Piik/internal/media/encoded"
"github.com/pion/webrtc/v4"
)
// Replays actual SDK encoder output through independent Pion connections. The
// relays retain derivation capability, but healthy children need only raw reuse.
func TestRelayChainEncodedFixture(t *testing.T) {
- fixture := os.Getenv("SCREENER_POOL_CHAIN_FIXTURE")
+ fixture := os.Getenv("PIIK_POOL_CHAIN_FIXTURE")
if fixture == "" {
- t.Skip("set SCREENER_POOL_CHAIN_FIXTURE and SCREENER_NATIVE_CAPTURE")
+ t.Skip("set PIIK_POOL_CHAIN_FIXTURE and PIIK_NATIVE_CAPTURE")
}
check := func(err error) {
t.Helper()
@@ -29,11 +29,11 @@ func TestRelayChainEncodedFixture(t *testing.T) {
t.Fatal(err)
}
}
- executable := os.Getenv("SCREENER_NATIVE_CAPTURE")
+ executable := os.Getenv("PIIK_NATIVE_CAPTURE")
info, err := os.Stat(executable)
check(err)
if info.IsDir() {
- t.Fatal("SCREENER_NATIVE_CAPTURE must name the existing capture executable")
+ t.Fatal("PIIK_NATIVE_CAPTURE must name the existing capture executable")
}
input, err := os.Open(fixture)
check(err)
@@ -293,7 +293,7 @@ func TestRelayChainEncodedFixture(t *testing.T) {
}{len(frames), 2, actual, false, true})
check(err)
t.Log(string(summary))
- if output := os.Getenv("SCREENER_POOL_CHAIN_OUTPUT"); output != "" {
+ if output := os.Getenv("PIIK_POOL_CHAIN_OUTPUT"); output != "" {
check(os.WriteFile(output, append(summary, '\n'), 0o600))
}
}
diff --git a/internal/client/mediaedge/relay_derivation.go b/internal/client/mediaedge/relay_derivation.go
index 1ca04941..35e2f980 100644
--- a/internal/client/mediaedge/relay_derivation.go
+++ b/internal/client/mediaedge/relay_derivation.go
@@ -7,9 +7,9 @@ import (
"sync"
"time"
- "github.com/TNTcraftHIM/Screener/internal/client/nativecapture"
- "github.com/TNTcraftHIM/Screener/internal/media/encoded"
- "github.com/TNTcraftHIM/Screener/internal/media/forwarding"
+ "github.com/TNTcraftHIM/Piik/internal/client/nativecapture"
+ "github.com/TNTcraftHIM/Piik/internal/media/encoded"
+ "github.com/TNTcraftHIM/Piik/internal/media/forwarding"
"github.com/livekit/mediatransportutil/pkg/utils"
"github.com/pion/rtp"
)
diff --git a/internal/client/mediaedge/relay_fixture_test.go b/internal/client/mediaedge/relay_fixture_test.go
index 9046b164..f2572b02 100644
--- a/internal/client/mediaedge/relay_fixture_test.go
+++ b/internal/client/mediaedge/relay_fixture_test.go
@@ -9,7 +9,7 @@ import (
"testing"
"time"
- "github.com/TNTcraftHIM/Screener/internal/client/nativecapture"
+ "github.com/TNTcraftHIM/Piik/internal/client/nativecapture"
"github.com/livekit/mediatransportutil"
mediacodec "github.com/livekit/mediatransportutil/pkg/codec"
"github.com/pion/rtcp"
@@ -20,9 +20,9 @@ import (
// Explicit small native-codec acceptance, never launched by the ordinary suite.
// Forced layer demand tests derivation ownership, not network adaptation.
func TestRelayDerivationFixture(t *testing.T) {
- executable, fixture := os.Getenv("SCREENER_NATIVE_CAPTURE"), os.Getenv("SCREENER_ENCODED_FIXTURE")
+ executable, fixture := os.Getenv("PIIK_NATIVE_CAPTURE"), os.Getenv("PIIK_ENCODED_FIXTURE")
if executable == "" || fixture == "" {
- t.Skip("set SCREENER_NATIVE_CAPTURE and SCREENER_ENCODED_FIXTURE for native relay acceptance")
+ t.Skip("set PIIK_NATIVE_CAPTURE and PIIK_ENCODED_FIXTURE for native relay acceptance")
}
input, err := os.Open(fixture)
if err != nil {
@@ -291,9 +291,9 @@ func TestRelayDerivationFixture(t *testing.T) {
// Forced direct-child budgets exercise real per-group WebRTC spatial adaptation;
// they do not simulate transport loss or prove bandwidth-estimator behavior.
func TestRelayIndependentSpatialFixture(t *testing.T) {
- executable, fixture := os.Getenv("SCREENER_NATIVE_CAPTURE"), os.Getenv("SCREENER_GROUP_MOTION_INPUT")
+ executable, fixture := os.Getenv("PIIK_NATIVE_CAPTURE"), os.Getenv("PIIK_GROUP_MOTION_INPUT")
if executable == "" || fixture == "" {
- t.Skip("set SCREENER_NATIVE_CAPTURE and SCREENER_GROUP_MOTION_INPUT")
+ t.Skip("set PIIK_NATIVE_CAPTURE and PIIK_GROUP_MOTION_INPUT")
}
check := func(err error) {
t.Helper()
@@ -457,7 +457,7 @@ func TestRelayIndependentSpatialFixture(t *testing.T) {
default:
}
}
- if path := os.Getenv("SCREENER_GROUP_OUTPUT"); path != "" {
+ if path := os.Getenv("PIIK_GROUP_OUTPUT"); path != "" {
file, err := os.Create(path)
check(err)
check(json.NewEncoder(file).Encode(output))
diff --git a/internal/client/mediaedge/relay_input.go b/internal/client/mediaedge/relay_input.go
index f715a22c..8bf83e1c 100644
--- a/internal/client/mediaedge/relay_input.go
+++ b/internal/client/mediaedge/relay_input.go
@@ -5,7 +5,7 @@ import (
"errors"
"io"
- "github.com/TNTcraftHIM/Screener/internal/client/nativecapture"
+ "github.com/TNTcraftHIM/Piik/internal/client/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/client/mediaedge/relay_input_test.go
index 07211df3..c5886a25 100644
--- a/internal/client/mediaedge/relay_input_test.go
+++ b/internal/client/mediaedge/relay_input_test.go
@@ -7,7 +7,7 @@ import (
"testing"
"time"
- "github.com/TNTcraftHIM/Screener/internal/media/encoded"
+ "github.com/TNTcraftHIM/Piik/internal/media/encoded"
"github.com/livekit/livekit-server/pkg/sfu"
"github.com/pion/rtp"
"github.com/pion/rtp/codecs"
diff --git a/internal/client/mediaedge/relay_network_fixture_test.go b/internal/client/mediaedge/relay_network_fixture_test.go
index 3cf40809..d284fb46 100644
--- a/internal/client/mediaedge/relay_network_fixture_test.go
+++ b/internal/client/mediaedge/relay_network_fixture_test.go
@@ -11,7 +11,7 @@ import (
"testing"
"time"
- "github.com/TNTcraftHIM/Screener/internal/client/nativecapture"
+ "github.com/TNTcraftHIM/Piik/internal/client/nativecapture"
"github.com/livekit/mediatransportutil"
"github.com/pion/ice/v4"
"github.com/pion/interceptor"
@@ -26,8 +26,8 @@ import (
// One real VP8 derived process, no desktop capture. The link changes capacity;
// production BWE, output admission and codec controls supply every adaptation.
func TestRelayNetworkVP8Fixture(t *testing.T) {
- if os.Getenv("SCREENER_RELAY_NETWORK") == "" {
- t.Skip("set SCREENER_RELAY_NETWORK=1, SCREENER_NATIVE_CAPTURE and SCREENER_ENCODED_FIXTURE")
+ if os.Getenv("PIIK_RELAY_NETWORK") == "" {
+ t.Skip("set PIIK_RELAY_NETWORK=1, PIIK_NATIVE_CAPTURE and PIIK_ENCODED_FIXTURE")
}
check := func(err error) {
t.Helper()
@@ -35,7 +35,7 @@ func TestRelayNetworkVP8Fixture(t *testing.T) {
t.Fatal(err)
}
}
- input, err := os.Open(os.Getenv("SCREENER_ENCODED_FIXTURE"))
+ input, err := os.Open(os.Getenv("PIIK_ENCODED_FIXTURE"))
check(err)
defer input.Close()
var motion [][]byte
@@ -70,7 +70,7 @@ func TestRelayNetworkVP8Fixture(t *testing.T) {
check(err)
defer source.Close()
source.relay = &relayDerivation{source: source, options: RelayOptions{
- CaptureProcess: os.Getenv("SCREENER_NATIVE_CAPTURE"),
+ CaptureProcess: os.Getenv("PIIK_NATIVE_CAPTURE"),
Capabilities: nativecapture.Capabilities{SoftwareVP8: true, Adapters: []nativecapture.Adapter{{Index: 0}}},
}}
check(source.SetRelayProfile(nativecapture.VideoProfile{Width: 1280, Height: 720,
@@ -332,9 +332,9 @@ func TestRelayNetworkVP8Fixture(t *testing.T) {
recovered = true
}
}
- outputPath := os.Getenv("SCREENER_ENCODED_OUTPUT")
+ outputPath := os.Getenv("PIIK_ENCODED_OUTPUT")
if outputPath == "" {
- t.Fatal("SCREENER_ENCODED_OUTPUT must name the ignored received-frame artifact")
+ t.Fatal("PIIK_ENCODED_OUTPUT must name the ignored received-frame artifact")
}
data, err := json.Marshal(delivered)
check(err)
diff --git a/internal/client/mediaedge/source.go b/internal/client/mediaedge/source.go
index bd9b7414..068bd39b 100644
--- a/internal/client/mediaedge/source.go
+++ b/internal/client/mediaedge/source.go
@@ -7,9 +7,9 @@ import (
"sync/atomic"
"time"
- "github.com/TNTcraftHIM/Screener/internal/client/nativecapture"
- "github.com/TNTcraftHIM/Screener/internal/media/encoded"
- "github.com/TNTcraftHIM/Screener/internal/media/forwarding"
+ "github.com/TNTcraftHIM/Piik/internal/client/nativecapture"
+ "github.com/TNTcraftHIM/Piik/internal/media/encoded"
+ "github.com/TNTcraftHIM/Piik/internal/media/forwarding"
mediacodec "github.com/livekit/mediatransportutil/pkg/codec"
"github.com/pion/rtcp"
"github.com/pion/rtp"
diff --git a/internal/client/mediaedge/source_test.go b/internal/client/mediaedge/source_test.go
index 33358fa8..6f87a2e2 100644
--- a/internal/client/mediaedge/source_test.go
+++ b/internal/client/mediaedge/source_test.go
@@ -6,7 +6,7 @@ import (
"testing"
"time"
- "github.com/TNTcraftHIM/Screener/internal/media/encoded"
+ "github.com/TNTcraftHIM/Piik/internal/media/encoded"
"github.com/livekit/livekit-server/pkg/sfu"
"github.com/livekit/livekit-server/pkg/sfu/streamtracker"
"google.golang.org/protobuf/proto"
diff --git a/internal/client/nativecapture/adaptive_fixture_test.go b/internal/client/nativecapture/adaptive_fixture_test.go
index fc554f37..c426da71 100644
--- a/internal/client/nativecapture/adaptive_fixture_test.go
+++ b/internal/client/nativecapture/adaptive_fixture_test.go
@@ -13,11 +13,11 @@ import (
// Opt-in real capture-process check; normal tests never start a codec or GPU.
func TestAdaptiveOutputFixture(t *testing.T) {
- executable, fixture := os.Getenv("SCREENER_NATIVE_CAPTURE"), os.Getenv("SCREENER_ADAPTIVE_INPUT")
+ executable, fixture := os.Getenv("PIIK_NATIVE_CAPTURE"), os.Getenv("PIIK_ADAPTIVE_INPUT")
if executable == "" || fixture == "" {
- t.Skip("set SCREENER_NATIVE_CAPTURE and SCREENER_ADAPTIVE_INPUT")
+ t.Skip("set PIIK_NATIVE_CAPTURE and PIIK_ADAPTIVE_INPUT")
}
- codec := os.Getenv("SCREENER_ADAPTIVE_CODEC")
+ codec := os.Getenv("PIIK_ADAPTIVE_CODEC")
if codec == "" {
codec = "vp8"
}
diff --git a/internal/client/nativecapture/probe.go b/internal/client/nativecapture/probe.go
index 94e63e9c..1a685018 100644
--- a/internal/client/nativecapture/probe.go
+++ b/internal/client/nativecapture/probe.go
@@ -15,7 +15,7 @@ import (
"strings"
"time"
- "github.com/TNTcraftHIM/Screener/internal/diagnostics"
+ "github.com/TNTcraftHIM/Piik/internal/diagnostics"
)
const (
@@ -103,7 +103,7 @@ func Discover(parent context.Context, executable string) (Capabilities, error) {
command.Stderr = stderr
hideWindow(command)
if err := command.Run(); err != nil {
- slog.DebugContext(ctx, "screener-client", "event", "capture-probe-failed", diagnostics.Error(err), "canceled", ctx.Err() != nil)
+ slog.DebugContext(ctx, "piik-client", "event", "capture-probe-failed", diagnostics.Error(err), "canceled", ctx.Err() != nil)
if errors.Is(ctx.Err(), context.DeadlineExceeded) {
return Capabilities{}, errors.New("native capture probe timed out")
}
@@ -127,11 +127,11 @@ func PackagedExecutable() string {
name := ""
switch runtime.GOOS {
case "windows":
- name = "screener-client-capture.exe"
+ name = "piik-client-capture.exe"
case "darwin":
- name = "screener-client-capture"
+ name = "piik-client-capture"
case "linux":
- name = "screener-client-capture"
+ name = "piik-client-capture"
default:
return ""
}
diff --git a/internal/client/nativecapture/protocol.go b/internal/client/nativecapture/protocol.go
index bf6decc8..93de7f1a 100644
--- a/internal/client/nativecapture/protocol.go
+++ b/internal/client/nativecapture/protocol.go
@@ -7,7 +7,7 @@ import (
"time"
"unicode/utf8"
- "github.com/TNTcraftHIM/Screener/internal/media/encoded"
+ "github.com/TNTcraftHIM/Piik/internal/media/encoded"
)
const (
diff --git a/internal/client/nativecapture/stream.go b/internal/client/nativecapture/stream.go
index fd26eef3..bf623784 100644
--- a/internal/client/nativecapture/stream.go
+++ b/internal/client/nativecapture/stream.go
@@ -15,7 +15,7 @@ import (
"time"
"unicode/utf8"
- "github.com/TNTcraftHIM/Screener/internal/diagnostics"
+ "github.com/TNTcraftHIM/Piik/internal/diagnostics"
)
const (
@@ -143,7 +143,7 @@ func ListSources(parent context.Context, executable string) ([]CaptureTarget, er
command.Stderr = stderr
hideWindow(command)
if err := command.Run(); err != nil {
- slog.DebugContext(ctx, "screener-client", "event", "capture-source-list-failed", diagnostics.Error(err), "canceled", ctx.Err() != nil)
+ slog.DebugContext(ctx, "piik-client", "event", "capture-source-list-failed", diagnostics.Error(err), "canceled", ctx.Err() != nil)
return nil, errors.New("native capture source list is unavailable")
}
var targets []CaptureTarget
@@ -178,7 +178,7 @@ func PreviewSource(parent context.Context, executable string, target CaptureTarg
command.Stderr = stderr
hideWindow(command)
if err := command.Run(); err != nil {
- slog.DebugContext(ctx, "screener-client", "event", "capture-source-preview-failed", diagnostics.Error(err), "canceled", ctx.Err() != nil)
+ slog.DebugContext(ctx, "piik-client", "event", "capture-source-preview-failed", diagnostics.Error(err), "canceled", ctx.Err() != nil)
return nil, errors.New("native capture preview is unavailable")
}
preview := stdout.Bytes()
@@ -198,7 +198,7 @@ func StartVideo(parent context.Context, executable string, options VideoOptions)
}
environment := []string(nil)
if options.RestoreToken != "" {
- environment = []string{"SCREENER_XDP_RESTORE_TOKEN=" + options.RestoreToken}
+ environment = []string{"PIIK_XDP_RESTORE_TOKEN=" + options.RestoreToken}
}
arguments := []string{
"--capture-video",
@@ -398,7 +398,7 @@ func startStreamWithEnvironment(
logger := slog.Default().With("capture", captureID)
command := exec.CommandContext(ctx, executable, arguments...)
if logger.Enabled(ctx, slog.LevelDebug) {
- environment = append(environment, "SCREENER_CAPTURE_DEBUG=1")
+ environment = append(environment, "PIIK_CAPTURE_DEBUG=1")
}
if len(environment) > 0 {
command.Env = append(os.Environ(), environment...)
@@ -420,7 +420,7 @@ func startStreamWithEnvironment(
if err = command.Start(); err != nil {
_ = trace.Close()
cancel()
- logger.DebugContext(ctx, "screener-client", "event", "capture-process-start-failed", diagnostics.Error(err))
+ logger.DebugContext(ctx, "piik-client", "event", "capture-process-start-failed", diagnostics.Error(err))
return nil, fmt.Errorf("start native capture process: %w", err)
}
logger = logger.With("pid", command.Process.Pid)
@@ -431,7 +431,7 @@ func startStreamWithEnvironment(
mode = strings.TrimPrefix(arguments[0], "--")
}
}
- logger.DebugContext(ctx, "screener-client", "event", "capture-process-started", "mode", mode)
+ logger.DebugContext(ctx, "piik-client", "event", "capture-process-started", "mode", mode)
stream := &Stream{
cancel: cancel,
input: stdout,
@@ -444,7 +444,7 @@ func startStreamWithEnvironment(
waitErr := command.Wait()
_ = trace.Close()
logCaptureFailure(ctx, waitErr, command.ProcessState.ExitCode(), stderr.Bytes())
- logger.DebugContext(ctx, "screener-client", "event", "capture-process-ended", "mode", mode,
+ logger.DebugContext(ctx, "piik-client", "event", "capture-process-ended", "mode", mode,
"durationMs", time.Since(started).Milliseconds(), "exitCode", command.ProcessState.ExitCode(),
"canceled", ctx.Err() != nil, "cancelReason", diagnostics.SafeText(fmt.Sprint(context.Cause(ctx))), diagnostics.Error(waitErr))
stream.done <- waitErr
@@ -473,7 +473,7 @@ func logCaptureFailure(ctx context.Context, err error, exitCode int, stderr []by
if canceled && stage == "" && hresult == "" {
return
}
- slog.DebugContext(ctx, "screener-client", "event", "capture-process-failed",
+ slog.DebugContext(ctx, "piik-client", "event", "capture-process-failed",
"exitCode", exitCode, "stage", stage, "hresult", hresult, "canceled", canceled)
}
@@ -481,7 +481,7 @@ func (stream *Stream) Read() (Frame, error) {
frame, err := readFrame(stream.input)
if err != nil && stream.logger != nil {
stream.readEnd.Do(func() {
- stream.logger.DebugContext(stream.ctx, "screener-client", "event", "capture-stream-ended",
+ stream.logger.DebugContext(stream.ctx, "piik-client", "event", "capture-stream-ended",
"eof", errors.Is(err, io.EOF), "canceled", stream.ctx.Err() != nil, diagnostics.Error(err))
})
}
diff --git a/internal/client/nativecapture/stream_test.go b/internal/client/nativecapture/stream_test.go
index c0c06685..abe5576f 100644
--- a/internal/client/nativecapture/stream_test.go
+++ b/internal/client/nativecapture/stream_test.go
@@ -86,7 +86,7 @@ func TestCaptureFailureDebugUsesOnlyFixedFields(t *testing.T) {
if err := json.Unmarshal(output.Bytes(), &record); err != nil {
t.Fatal(err)
}
- if len(record) != 8 || record["event"] != "capture-process-failed" || record["msg"] != "screener-client" ||
+ if len(record) != 8 || record["event"] != "capture-process-failed" || record["msg"] != "piik-client" ||
record["level"] != "DEBUG" || record["exitCode"] != float64(2) || record["stage"] != check.stage ||
record["hresult"] != check.hresult || record["canceled"] != check.canceled || strings.Contains(output.String(), "private") {
t.Fatalf("diagnostic leaked or changed fields: %s", output.String())
diff --git a/internal/client/nativecontrol/session.go b/internal/client/nativecontrol/session.go
index 05572f97..c22f7539 100644
--- a/internal/client/nativecontrol/session.go
+++ b/internal/client/nativecontrol/session.go
@@ -16,12 +16,12 @@ import (
"time"
"unicode"
- "github.com/TNTcraftHIM/Screener/internal/client/loopback"
- "github.com/TNTcraftHIM/Screener/internal/client/mediaedge"
- "github.com/TNTcraftHIM/Screener/internal/client/nativecapture"
- "github.com/TNTcraftHIM/Screener/internal/client/nativehost"
- "github.com/TNTcraftHIM/Screener/internal/client/nativeviewer"
- "github.com/TNTcraftHIM/Screener/internal/diagnostics"
+ "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/diagnostics"
"github.com/pion/webrtc/v4"
)
@@ -153,7 +153,7 @@ func (session *Session) Handle(ctx context.Context, payload []byte) (result any,
!validQualitySettings(request.Profile) {
return nil, errors.New("native start-share request is invalid")
}
- slog.Debug("screener-client", "event", "native-profile-requested", "requestId", envelope.ID,
+ slog.Debug("piik-client", "event", "native-profile-requested", "requestId", envelope.ID,
"share", diagnostics.ID(request.ShareID), "profile", nativeQualityProfile(request.Profile), "codec", request.Codec, "audio", request.Audio,
"sourceKind", request.Source.Kind, "adapterIndex", request.AdapterIndex, "encoderIndex", request.EncoderIndex)
return session.startShare(ctx, envelope, request)
@@ -166,7 +166,7 @@ func (session *Session) Handle(ctx context.Context, payload []byte) (result any,
return nil, errors.New("native update-share request is invalid")
}
profile := nativeQualityProfile(request.Profile)
- slog.Debug("screener-client", "event", "native-profile-requested", "requestId", envelope.ID,
+ slog.Debug("piik-client", "event", "native-profile-requested", "requestId", envelope.ID,
"share", diagnostics.ID(request.ShareID), "profile", profile)
var err error
if host := session.current(request.ShareID); host != nil {
@@ -199,7 +199,7 @@ func (session *Session) Handle(ctx context.Context, payload []byte) (result any,
audio := request.Audio && session.capabilities.Summary().AudioFor(
request.Source.Kind,
)
- slog.Debug("screener-client", "event", "native-source-requested", "requestId", envelope.ID,
+ slog.Debug("piik-client", "event", "native-source-requested", "requestId", envelope.ID,
"share", diagnostics.ID(request.ShareID), "sourceKind", request.Source.Kind, "audio", audio,
"adapterIndex", request.AdapterIndex, "encoderIndex", request.EncoderIndex)
err := host.ReplaceSource(ctx, nativecapture.VideoOptions{
@@ -210,7 +210,7 @@ func (session *Session) Handle(ctx context.Context, payload []byte) (result any,
if err != nil {
return operationFailure(envelope, err), nil
}
- slog.Debug("screener-client", "event", "native-source-applied", "requestId", envelope.ID,
+ slog.Debug("piik-client", "event", "native-source-applied", "requestId", envelope.ID,
"share", diagnostics.ID(request.ShareID), "sourceKind", request.Source.Kind, "audio", audio)
return shareSourceReplacedResponse{
responseEnvelope: response(envelope, "share-source-replaced"),
@@ -347,7 +347,7 @@ func (session *Session) Handle(ctx context.Context, payload []byte) (result any,
return nil, errors.New("native share does not exist")
}
host.SetPaused(request.Paused)
- slog.Debug("screener-client", "event", "native-share-paused", "requestId", envelope.ID,
+ slog.Debug("piik-client", "event", "native-share-paused", "requestId", envelope.ID,
"share", diagnostics.ID(request.ShareID), "paused", request.Paused)
return response(envelope, "share-paused"), nil
default:
@@ -429,7 +429,7 @@ func (session *Session) shareUpdateResult(request requestEnvelope, shareID strin
if err != nil {
return operationFailure(request, err)
}
- slog.Debug("screener-client", "event", "native-profile-applied", "requestId", request.ID,
+ slog.Debug("piik-client", "event", "native-profile-applied", "requestId", request.ID,
"share", diagnostics.ID(shareID), "profile", profile)
return shareUpdatedResponse{responseEnvelope: response(request, "share-updated"), ShareID: shareID}
}
@@ -480,7 +480,7 @@ func (session *Session) startShare(
session.host = host
session.mu.Unlock()
codec := host.Codec()
- slog.Debug("screener-client", "event", "native-profile-applied", "requestId", envelope.ID,
+ slog.Debug("piik-client", "event", "native-profile-applied", "requestId", envelope.ID,
"share", diagnostics.ID(request.ShareID), "profile", profile, "codec", codec, "audio", host.HasAudio())
go session.watchHost(host)
return shareStartedResponse{
@@ -940,7 +940,7 @@ func response(request requestEnvelope, responseType string) responseEnvelope {
func operationFailure(request requestEnvelope, causes ...error) requestFailedResponse {
if len(causes) > 0 {
- slog.Debug("screener-client", "event", "native-operation-failed", "requestId", request.ID,
+ slog.Debug("piik-client", "event", "native-operation-failed", "requestId", request.ID,
"requestType", diagnostics.SafeText(request.Type), diagnostics.Error(causes[0]))
}
return requestFailedResponse{
@@ -965,10 +965,10 @@ func (session *Session) traceRequest(request requestEnvelope, payload []byte) fu
"share", diagnostics.ID(identity.ShareID), "connection", diagnostics.ID(identity.ConnectionID),
"sourceConnection", diagnostics.ID(identity.SourceConnectionID), "publication", diagnostics.ID(identity.PublicationGeneration))
started := time.Now()
- logger.Debug("screener-client", "event", "native-request-started")
+ logger.Debug("piik-client", "event", "native-request-started")
return func(result any, err error) {
failure, rejected := result.(requestFailedResponse)
- logger.Debug("screener-client", "event", "native-request-ended", "durationMs", time.Since(started).Milliseconds(),
+ logger.Debug("piik-client", "event", "native-request-ended", "durationMs", time.Since(started).Milliseconds(),
"failed", err != nil || rejected, "code", failure.Code, diagnostics.Error(err))
}
}
diff --git a/internal/client/nativecontrol/session_test.go b/internal/client/nativecontrol/session_test.go
index 998e6396..5e383d64 100644
--- a/internal/client/nativecontrol/session_test.go
+++ b/internal/client/nativecontrol/session_test.go
@@ -14,13 +14,13 @@ import (
"testing"
"time"
- "github.com/TNTcraftHIM/Screener/internal/client/loopback"
- "github.com/TNTcraftHIM/Screener/internal/client/nativecapture"
- "github.com/TNTcraftHIM/Screener/internal/client/nativehost"
+ "github.com/TNTcraftHIM/Piik/internal/client/loopback"
+ "github.com/TNTcraftHIM/Piik/internal/client/nativecapture"
+ "github.com/TNTcraftHIM/Piik/internal/client/nativehost"
)
func TestMain(tests *testing.M) {
- if directory := os.Getenv("SCREENER_QUIET_CAPTURE_FIXTURE"); directory != "" {
+ if directory := os.Getenv("PIIK_QUIET_CAPTURE_FIXTURE"); directory != "" {
runQuietCaptureFixture(directory)
os.Exit(0)
}
@@ -103,7 +103,7 @@ func TestQuietHostUpdatePreservesControlAndCancelsCleanly(t *testing.T) {
slog.SetDefault(slog.New(slog.NewJSONHandler(&trace, &slog.HandlerOptions{Level: slog.LevelDebug})))
}
directory := t.TempDir()
- t.Setenv("SCREENER_QUIET_CAPTURE_FIXTURE", directory)
+ t.Setenv("PIIK_QUIET_CAPTURE_FIXTURE", directory)
executable, err := os.Executable()
if err != nil {
t.Fatal(err)
diff --git a/internal/client/nativecontrol/wire.go b/internal/client/nativecontrol/wire.go
index 657b8e15..afa45c97 100644
--- a/internal/client/nativecontrol/wire.go
+++ b/internal/client/nativecontrol/wire.go
@@ -1,8 +1,8 @@
package nativecontrol
import (
- "github.com/TNTcraftHIM/Screener/internal/client/mediaedge"
- "github.com/TNTcraftHIM/Screener/internal/client/nativecapture"
+ "github.com/TNTcraftHIM/Piik/internal/client/mediaedge"
+ "github.com/TNTcraftHIM/Piik/internal/client/nativecapture"
"github.com/pion/webrtc/v4"
)
diff --git a/internal/client/nativehost/audio_test.go b/internal/client/nativehost/audio_test.go
index 4cf12f39..0299ad5a 100644
--- a/internal/client/nativehost/audio_test.go
+++ b/internal/client/nativehost/audio_test.go
@@ -10,8 +10,8 @@ import (
"testing"
"time"
- "github.com/TNTcraftHIM/Screener/internal/client/nativeaudio"
- "github.com/TNTcraftHIM/Screener/internal/client/nativecapture"
+ "github.com/TNTcraftHIM/Piik/internal/client/nativeaudio"
+ "github.com/TNTcraftHIM/Piik/internal/client/nativecapture"
"github.com/livekit/livekit-server/pkg/sfu"
"github.com/pion/webrtc/v4"
)
@@ -76,7 +76,7 @@ func runAudioRecoveryCapture() {
}
func TestAudioEOFWaitsForExplicitSourceReplacement(t *testing.T) {
- t.Setenv("SCREENER_NATIVEHOST_PIPE_FIXTURE", "audio-recovery")
+ t.Setenv("PIIK_NATIVEHOST_PIPE_FIXTURE", "audio-recovery")
check := func(err error) {
t.Helper()
if err != nil {
diff --git a/internal/client/nativehost/profile.go b/internal/client/nativehost/profile.go
index 7c790376..d33d9be6 100644
--- a/internal/client/nativehost/profile.go
+++ b/internal/client/nativehost/profile.go
@@ -1,6 +1,6 @@
package nativehost
-import "github.com/TNTcraftHIM/Screener/internal/client/nativecapture"
+import "github.com/TNTcraftHIM/Piik/internal/client/nativecapture"
type QualityProfile struct {
Video nativecapture.VideoProfile
diff --git a/internal/client/nativehost/publication.go b/internal/client/nativehost/publication.go
index 381a3e3b..3a85e764 100644
--- a/internal/client/nativehost/publication.go
+++ b/internal/client/nativehost/publication.go
@@ -3,7 +3,7 @@ package nativehost
import (
"errors"
- "github.com/TNTcraftHIM/Screener/internal/client/mediaedge"
+ "github.com/TNTcraftHIM/Piik/internal/client/mediaedge"
"github.com/pion/webrtc/v4"
)
diff --git a/internal/client/nativehost/publication_test.go b/internal/client/nativehost/publication_test.go
index 894c2101..029c14c7 100644
--- a/internal/client/nativehost/publication_test.go
+++ b/internal/client/nativehost/publication_test.go
@@ -3,7 +3,7 @@ package nativehost
import (
"testing"
- "github.com/TNTcraftHIM/Screener/internal/client/mediaedge"
+ "github.com/TNTcraftHIM/Piik/internal/client/mediaedge"
)
func TestPublicationGenerationFencesNativeControl(t *testing.T) {
diff --git a/internal/client/nativehost/session.go b/internal/client/nativehost/session.go
index f2b7017a..4a5c8b46 100644
--- a/internal/client/nativehost/session.go
+++ b/internal/client/nativehost/session.go
@@ -13,10 +13,10 @@ import (
"time"
"unicode/utf8"
- "github.com/TNTcraftHIM/Screener/internal/client/mediaedge"
- "github.com/TNTcraftHIM/Screener/internal/client/nativecapture"
- "github.com/TNTcraftHIM/Screener/internal/diagnostics"
- "github.com/TNTcraftHIM/Screener/internal/media/encoded"
+ "github.com/TNTcraftHIM/Piik/internal/client/mediaedge"
+ "github.com/TNTcraftHIM/Piik/internal/client/nativecapture"
+ "github.com/TNTcraftHIM/Piik/internal/diagnostics"
+ "github.com/TNTcraftHIM/Piik/internal/media/encoded"
"github.com/pion/webrtc/v4"
)
@@ -129,7 +129,7 @@ func Start(parent context.Context, options Options) (*Session, error) {
options.Video.Target,
)
if audioErr != nil {
- slog.DebugContext(parent, "screener-client", "event", "capture-audio-unavailable", "share", diagnostics.ID(options.ShareID), diagnostics.Error(audioErr))
+ slog.DebugContext(parent, "piik-client", "event", "capture-audio-unavailable", "share", diagnostics.ID(options.ShareID), diagnostics.Error(audioErr))
}
}
ctx, cancel := context.WithCancel(parent)
@@ -155,7 +155,7 @@ func Start(parent context.Context, options Options) (*Session, error) {
options.EdgeCapacity, options.Profile.AudioBitrate,
)
if audioErr != nil {
- slog.DebugContext(ctx, "screener-client", "event", "capture-audio-source-failed", "share", diagnostics.ID(options.ShareID), diagnostics.Error(audioErr))
+ slog.DebugContext(ctx, "piik-client", "event", "capture-audio-source-failed", "share", diagnostics.ID(options.ShareID), diagnostics.Error(audioErr))
_ = audioStream.Close()
audioStream = nil
session.audioStream = nil
@@ -642,7 +642,7 @@ func (session *Session) run() {
_ = audioStream.Close()
}
if slog.Default().Enabled(session.ctx, slog.LevelDebug) {
- slog.Debug("screener-client", "event", "share-ended", "share", diagnostics.ID(session.shareID), "failed", result != nil, diagnostics.Error(result))
+ slog.Debug("piik-client", "event", "share-ended", "share", diagnostics.ID(session.shareID), "failed", result != nil, diagnostics.Error(result))
}
session.done <- result
close(session.done)
@@ -679,7 +679,7 @@ func (session *Session) runVideo() error {
}
continue
}
- slog.DebugContext(session.ctx, "screener-client", "event", "capture-video-read-ended",
+ slog.DebugContext(session.ctx, "piik-client", "event", "capture-video-read-ended",
"share", diagnostics.ID(session.shareID), "canceled", session.ctx.Err() != nil, "eof", errors.Is(err, io.EOF), diagnostics.Error(err))
return fail(errors.New("native capture process stopped unexpectedly"))
}
@@ -741,7 +741,7 @@ func (session *Session) runVideo() error {
}
}
session.mu.Unlock()
- slog.Debug("screener-client", "event", "capture-state", "state", status.State, "codec", status.Codec,
+ slog.Debug("piik-client", "event", "capture-state", "state", status.State, "codec", status.Codec,
"share", diagnostics.ID(session.shareID), "width", status.Width, "height", status.Height, "fps", status.FPS,
"hardware", status.HardwareOnly, "adapterIndex", status.AdapterIndex, "encoderIndex", status.EncoderIndex,
"adapterName", diagnostics.SafeText(status.AdapterName), "encoderName", diagnostics.SafeText(status.EncoderName),
@@ -790,7 +790,7 @@ func (session *Session) runVideo() error {
}
}
case nativecapture.FrameLayerUnavailable:
- slog.DebugContext(session.ctx, "screener-client", "event", "capture-output-unavailable",
+ slog.DebugContext(session.ctx, "piik-client", "event", "capture-output-unavailable",
"share", diagnostics.ID(session.shareID), "layer", frame.Layer, "detail", diagnostics.SafeText(string(frame.Data)))
if session.source == nil {
return fail(errors.New("native output ended before its source state"))
@@ -864,7 +864,7 @@ func (session *Session) currentStream() *nativecapture.Stream {
}
func captureProfileFailure(ctx context.Context, profile nativecapture.VideoProfile, stage string, err error) error {
- slog.DebugContext(ctx, "screener-client", "event", "capture-profile-rejected", "stage", stage,
+ slog.DebugContext(ctx, "piik-client", "event", "capture-profile-rejected", "stage", stage,
"width", profile.Width, "height", profile.Height, "fps", profile.Framerate, "bitrate", profile.Bitrate, diagnostics.Error(err))
return err
}
@@ -920,7 +920,7 @@ func waitForCaptureProfile(
send(result{stage: "status-invalid", err: err})
return
}
- slog.DebugContext(ctx, "screener-client", "event", "capture-profile-observed", "state", state.State,
+ slog.DebugContext(ctx, "piik-client", "event", "capture-profile-observed", "state", state.State,
"expectedCodec", codec, "actualCodec", state.Codec, "expectedProfile", profile,
"actualWidth", state.Width, "actualHeight", state.Height, "actualFPS", state.FPS,
"expectedOutputs", stream.Outputs(), "actualOutputs", state.Outputs)
@@ -1044,7 +1044,7 @@ func (session *Session) runAudio() {
continue
}
}
- slog.DebugContext(session.ctx, "screener-client", "event", "capture-audio-stream-ended",
+ slog.DebugContext(session.ctx, "piik-client", "event", "capture-audio-stream-ended",
"share", diagnostics.ID(session.shareID), "frameKind", frame.Kind, "eof", errors.Is(err, io.EOF),
"canceled", session.ctx.Err() != nil, diagnostics.Error(err))
// Audio failure leaves video live. Only an explicit source replacement
diff --git a/internal/client/nativehost/session_test.go b/internal/client/nativehost/session_test.go
index 88806a96..880839e6 100644
--- a/internal/client/nativehost/session_test.go
+++ b/internal/client/nativehost/session_test.go
@@ -12,20 +12,20 @@ import (
"testing"
"time"
- "github.com/TNTcraftHIM/Screener/internal/client/mediaedge"
- "github.com/TNTcraftHIM/Screener/internal/client/nativecapture"
+ "github.com/TNTcraftHIM/Piik/internal/client/mediaedge"
+ "github.com/TNTcraftHIM/Piik/internal/client/nativecapture"
)
func TestMain(tests *testing.M) {
- if os.Getenv("SCREENER_NATIVEHOST_PIPE_FIXTURE") == "audio-recovery" {
+ if os.Getenv("PIIK_NATIVEHOST_PIPE_FIXTURE") == "audio-recovery" {
runAudioRecoveryCapture()
os.Exit(0)
}
- if os.Getenv("SCREENER_NATIVEHOST_PIPE_FIXTURE") == "echo" {
+ if os.Getenv("PIIK_NATIVEHOST_PIPE_FIXTURE") == "echo" {
_, _ = io.Copy(os.Stdout, os.Stdin)
os.Exit(0)
}
- if os.Getenv("SCREENER_NATIVEHOST_PIPE_FIXTURE") == "1" {
+ if os.Getenv("PIIK_NATIVEHOST_PIPE_FIXTURE") == "1" {
_, _ = io.Copy(io.Discard, os.Stdin)
os.Exit(0)
}
@@ -33,7 +33,7 @@ func TestMain(tests *testing.M) {
}
func TestCaptureCommitWaitsForReaderMetadataOrTermination(t *testing.T) {
- t.Setenv("SCREENER_NATIVEHOST_PIPE_FIXTURE", "1")
+ t.Setenv("PIIK_NATIVEHOST_PIPE_FIXTURE", "1")
executable, err := os.Executable()
if err != nil {
t.Fatal(err)
@@ -143,7 +143,7 @@ func TestCaptureCommitWaitsForReaderMetadataOrTermination(t *testing.T) {
}
func TestOutputPlanPreservesOriginalStartupAndIndependentActivation(t *testing.T) {
- t.Setenv("SCREENER_NATIVEHOST_PIPE_FIXTURE", "echo")
+ t.Setenv("PIIK_NATIVEHOST_PIPE_FIXTURE", "echo")
executable, err := os.Executable()
if err != nil {
t.Fatal(err)
diff --git a/internal/client/nativeviewer/session.go b/internal/client/nativeviewer/session.go
index fbab1814..85844f71 100644
--- a/internal/client/nativeviewer/session.go
+++ b/internal/client/nativeviewer/session.go
@@ -6,8 +6,8 @@ import (
"sync"
"time"
- "github.com/TNTcraftHIM/Screener/internal/client/mediaedge"
- "github.com/TNTcraftHIM/Screener/internal/client/nativecapture"
+ "github.com/TNTcraftHIM/Piik/internal/client/mediaedge"
+ "github.com/TNTcraftHIM/Piik/internal/client/nativecapture"
"github.com/pion/webrtc/v4"
)
diff --git a/internal/client/nativeviewer/session_test.go b/internal/client/nativeviewer/session_test.go
index 7bc74958..7652745d 100644
--- a/internal/client/nativeviewer/session_test.go
+++ b/internal/client/nativeviewer/session_test.go
@@ -3,7 +3,7 @@ package nativeviewer
import (
"testing"
- "github.com/TNTcraftHIM/Screener/internal/client/nativecapture"
+ "github.com/TNTcraftHIM/Piik/internal/client/nativecapture"
)
func TestViewerProfileHasNoImplicitCaptureDefault(t *testing.T) {
diff --git a/internal/client/portmapping/mapping.go b/internal/client/portmapping/mapping.go
index f1761123..882fc65a 100644
--- a/internal/client/portmapping/mapping.go
+++ b/internal/client/portmapping/mapping.go
@@ -6,7 +6,7 @@ import (
"sync"
"time"
- "github.com/TNTcraftHIM/Screener/internal/diagnostics"
+ "github.com/TNTcraftHIM/Piik/internal/diagnostics"
nat "github.com/netbirdio/go-nat"
)
@@ -123,7 +123,7 @@ func (mapping *Mapping) discover(parent context.Context) {
func (mapping *Mapping) mapPortLocked(ctx context.Context) {
mapping.attempted = true
externalPort, err := mapping.gateway.AddPortMapping(
- ctx, "udp", mapping.localPort, "Screener", leaseDuration,
+ ctx, "udp", mapping.localPort, "Piik", leaseDuration,
)
slog.Debug("nat-mapping", "event", "mapping-result", "localPort", mapping.localPort,
"externalPort", externalPort, "leaseSeconds", leaseDuration.Seconds(), diagnostics.Error(err))
diff --git a/internal/client/publictunnel/process.go b/internal/client/publictunnel/process.go
index ab330d8e..dceee058 100644
--- a/internal/client/publictunnel/process.go
+++ b/internal/client/publictunnel/process.go
@@ -154,7 +154,7 @@ func Start(
}
func writeTemporaryConfig() (string, error) {
- file, err := os.CreateTemp("", "screener-cloudflared-*.yml")
+ file, err := os.CreateTemp("", "piik-cloudflared-*.yml")
if err != nil {
return "", errors.New("public tunnel configuration is unavailable")
}
diff --git a/internal/diagnostics/recorder.go b/internal/diagnostics/recorder.go
index 93f4fbfc..50de2f68 100644
--- a/internal/diagnostics/recorder.go
+++ b/internal/diagnostics/recorder.go
@@ -179,7 +179,7 @@ func (r *Recorder) Export() (path string, returnedErr error) {
return "", err
}
}
- if err := add("README.txt", []byte("Screener diagnostic report / Screener 诊断报告\n\n"+
+ if err := add("README.txt", []byte("Piik diagnostic report / Piik 诊断报告\n\n"+
"Local opt-in report. Review before sharing: technical identifiers, paths and network/system details may remain.\n"+
"Credentials are filtered; raw media and process-memory contents are not collected. heap.pprof is an allocation profile.\n"+
"metadata.json lists retained files and collector failures. Rotated logs are a bounded history, not the entire session.\n\n"+
diff --git a/internal/diagnostics/recorder_test.go b/internal/diagnostics/recorder_test.go
index 41e9707c..b198c307 100644
--- a/internal/diagnostics/recorder_test.go
+++ b/internal/diagnostics/recorder_test.go
@@ -22,7 +22,7 @@ import (
func TestRecorderRotationAndExport(t *testing.T) {
directory := t.TempDir()
const private = "private-environment-and-media-sentinel"
- t.Setenv("SCREENER_DIAGNOSTICS_TEST_SECRET", private)
+ t.Setenv("PIIK_DIAGNOSTICS_TEST_SECRET", private)
if err := os.WriteFile(filepath.Join(directory, "private-config.json"), []byte(private), 0600); err != nil {
t.Fatal(err)
}
diff --git a/internal/media/forwarding/encoded_source.go b/internal/media/forwarding/encoded_source.go
index 48001ee9..2f1a9d00 100644
--- a/internal/media/forwarding/encoded_source.go
+++ b/internal/media/forwarding/encoded_source.go
@@ -5,7 +5,7 @@ import (
"math"
"time"
- "github.com/TNTcraftHIM/Screener/internal/media/encoded"
+ "github.com/TNTcraftHIM/Piik/internal/media/encoded"
"github.com/livekit/mediatransportutil"
"github.com/livekit/protocol/livekit"
"github.com/livekit/protocol/utils/mono"
diff --git a/internal/media/forwarding/encoded_source_test.go b/internal/media/forwarding/encoded_source_test.go
index aab0f975..088757a2 100644
--- a/internal/media/forwarding/encoded_source_test.go
+++ b/internal/media/forwarding/encoded_source_test.go
@@ -5,7 +5,7 @@ import (
"testing"
"time"
- "github.com/TNTcraftHIM/Screener/internal/media/encoded"
+ "github.com/TNTcraftHIM/Piik/internal/media/encoded"
"github.com/livekit/livekit-server/pkg/sfu"
"github.com/pion/webrtc/v4"
)
diff --git a/internal/media/forwarding/publication.go b/internal/media/forwarding/publication.go
index c638bd65..19a05eb9 100644
--- a/internal/media/forwarding/publication.go
+++ b/internal/media/forwarding/publication.go
@@ -11,7 +11,7 @@ import (
"sync/atomic"
"time"
- "github.com/TNTcraftHIM/Screener/internal/diagnostics"
+ "github.com/TNTcraftHIM/Piik/internal/diagnostics"
"github.com/livekit/livekit-server/pkg/sfu"
"github.com/livekit/livekit-server/pkg/sfu/buffer"
"github.com/livekit/livekit-server/pkg/sfu/bwe"
diff --git a/internal/media/forwarding/publication_test.go b/internal/media/forwarding/publication_test.go
index a1c0fbdc..79ce6287 100644
--- a/internal/media/forwarding/publication_test.go
+++ b/internal/media/forwarding/publication_test.go
@@ -8,7 +8,7 @@ import (
"testing"
"time"
- "github.com/TNTcraftHIM/Screener/internal/media/encoded"
+ "github.com/TNTcraftHIM/Piik/internal/media/encoded"
"github.com/livekit/livekit-server/pkg/sfu"
"github.com/livekit/livekit-server/pkg/sfu/bwe"
"github.com/livekit/livekit-server/pkg/sfu/bwe/sendsidebwe"
diff --git a/internal/media/forwarding/recovery_test.go b/internal/media/forwarding/recovery_test.go
index d0d90f95..7102f4e9 100644
--- a/internal/media/forwarding/recovery_test.go
+++ b/internal/media/forwarding/recovery_test.go
@@ -7,7 +7,7 @@ import (
"testing"
"time"
- "github.com/TNTcraftHIM/Screener/internal/media/encoded"
+ "github.com/TNTcraftHIM/Piik/internal/media/encoded"
"github.com/livekit/livekit-server/pkg/sfu"
"github.com/pion/ice/v4"
"github.com/pion/interceptor"
@@ -20,8 +20,8 @@ import (
// ICE/DTLS/RTP/TWCC, and the production allocator/pacer/probe driver. No decoder,
// capture device or physical network participates.
func TestTransportConstrainedDormantRecovery(t *testing.T) {
- if os.Getenv("SCREENER_TRANSPORT_RECOVERY") == "" {
- t.Skip("set SCREENER_TRANSPORT_RECOVERY=1 for the bounded virtual-network gate")
+ if os.Getenv("PIIK_TRANSPORT_RECOVERY") == "" {
+ t.Skip("set PIIK_TRANSPORT_RECOVERY=1 for the bounded virtual-network gate")
}
ctx, cancel := context.WithTimeout(t.Context(), 32*time.Second)
defer cancel()
diff --git a/internal/media/forwarding/retarget_test.go b/internal/media/forwarding/retarget_test.go
index f386f1a4..2035c2c0 100644
--- a/internal/media/forwarding/retarget_test.go
+++ b/internal/media/forwarding/retarget_test.go
@@ -7,7 +7,7 @@ import (
"testing"
"time"
- "github.com/TNTcraftHIM/Screener/internal/media/encoded"
+ "github.com/TNTcraftHIM/Piik/internal/media/encoded"
"github.com/livekit/livekit-server/pkg/sfu"
"github.com/pion/rtcp"
"github.com/pion/webrtc/v4"
diff --git a/internal/media/forwarding/source.go b/internal/media/forwarding/source.go
index 3f0b1f25..c4037299 100644
--- a/internal/media/forwarding/source.go
+++ b/internal/media/forwarding/source.go
@@ -9,8 +9,8 @@ import (
"sync/atomic"
"time"
- "github.com/TNTcraftHIM/Screener/internal/diagnostics"
- "github.com/TNTcraftHIM/Screener/internal/media/encoded"
+ "github.com/TNTcraftHIM/Piik/internal/diagnostics"
+ "github.com/TNTcraftHIM/Piik/internal/media/encoded"
"github.com/livekit/livekit-server/pkg/sfu"
"github.com/livekit/livekit-server/pkg/sfu/buffer"
"github.com/livekit/mediatransportutil"
diff --git a/internal/media/forwarding/transport.go b/internal/media/forwarding/transport.go
index d0b19416..ae2ebb78 100644
--- a/internal/media/forwarding/transport.go
+++ b/internal/media/forwarding/transport.go
@@ -10,7 +10,7 @@ import (
"sync/atomic"
"time"
- "github.com/TNTcraftHIM/Screener/internal/diagnostics"
+ "github.com/TNTcraftHIM/Piik/internal/diagnostics"
"github.com/livekit/livekit-server/pkg/sfu"
"github.com/livekit/livekit-server/pkg/sfu/buffer"
"github.com/livekit/livekit-server/pkg/sfu/bwe"
diff --git a/internal/server/app/access.go b/internal/server/app/access.go
index 7eb94436..a73d1fb6 100644
--- a/internal/server/app/access.go
+++ b/internal/server/app/access.go
@@ -13,8 +13,8 @@ import (
"strings"
"time"
- "github.com/TNTcraftHIM/Screener/internal/server/config"
- "github.com/TNTcraftHIM/Screener/internal/server/protocol"
+ "github.com/TNTcraftHIM/Piik/internal/server/config"
+ "github.com/TNTcraftHIM/Piik/internal/server/protocol"
)
// Ported from src/server/access-session.ts.
@@ -159,9 +159,9 @@ func (a *siteAccessGate) createCookie() string {
func (a *siteAccessGate) cookieName() string {
if a.secure {
- return "__Host-screener-site-access"
+ return "__Host-piik-site-access"
}
- return "screener-site-access"
+ return "piik-site-access"
}
func (a *siteAccessGate) sign(payload string) string {
diff --git a/internal/server/app/access_test.go b/internal/server/app/access_test.go
index 5f6cc88f..7d8f91f8 100644
--- a/internal/server/app/access_test.go
+++ b/internal/server/app/access_test.go
@@ -50,7 +50,7 @@ func TestSiteAccessIssuesStatelessDayLongCookie(t *testing.T) {
}
setCookie := access.createCookie()
- if want := "screener-site-access=v1."; !strings.Contains(setCookie, want) {
+ if want := "piik-site-access=v1."; !strings.Contains(setCookie, want) {
t.Fatalf("Set-Cookie %q does not contain %q", setCookie, want)
}
for _, attribute := range []string{"Path=/", "Max-Age=86400", "HttpOnly", "SameSite=Strict"} {
@@ -92,12 +92,12 @@ func TestSiteAccessCookieAttributeOrder(t *testing.T) {
// now = 1000 ms -> floor(1) + 12 = 13 seconds.
wantValue := "v1.13." + signature
- want := "screener-site-access=" + wantValue +
+ want := "piik-site-access=" + wantValue +
"; Path=/; Max-Age=12; HttpOnly; SameSite=Strict"
if got := insecure.createCookie(); got != want {
t.Fatalf("CreateCookie() = %q, want %q", got, want)
}
- wantSecure := "__Host-screener-site-access=" + wantValue +
+ wantSecure := "__Host-piik-site-access=" + wantValue +
"; Path=/; Max-Age=12; HttpOnly; SameSite=Strict; Secure"
if got := secure.createCookie(); got != wantSecure {
t.Fatalf("secure CreateCookie() = %q, want %q", got, wantSecure)
@@ -114,7 +114,7 @@ func TestSiteAccessUsesHostPrefixedCookieWhenSecure(t *testing.T) {
setCookie := access.createCookie()
for _, attribute := range []string{
- "__Host-screener-site-access=", "Secure", "HttpOnly", "SameSite=Strict", "Path=/",
+ "__Host-piik-site-access=", "Secure", "HttpOnly", "SameSite=Strict", "Path=/",
} {
if !strings.Contains(setCookie, attribute) {
t.Fatalf("Set-Cookie %q is missing %q", setCookie, attribute)
@@ -259,7 +259,7 @@ func TestSiteAccessWithoutPassword(t *testing.T) {
if !access.isAuthenticated("") {
t.Fatal("every request must be authenticated without a password")
}
- if !access.isAuthenticated("screener-site-access=nonsense") {
+ if !access.isAuthenticated("piik-site-access=nonsense") {
t.Fatal("a bogus cookie must not matter without a password")
}
if !access.passwordMatches("") || !access.passwordMatches("anything") {
diff --git a/internal/server/app/app.go b/internal/server/app/app.go
index 7d3f680e..830d6d45 100644
--- a/internal/server/app/app.go
+++ b/internal/server/app/app.go
@@ -30,12 +30,12 @@ import (
"sync/atomic"
"time"
- "github.com/TNTcraftHIM/Screener/internal/diagnostics"
- "github.com/TNTcraftHIM/Screener/internal/server/config"
- "github.com/TNTcraftHIM/Screener/internal/server/room"
- "github.com/TNTcraftHIM/Screener/internal/server/sfu"
- "github.com/TNTcraftHIM/Screener/internal/server/signal"
- "github.com/TNTcraftHIM/Screener/internal/server/stun"
+ "github.com/TNTcraftHIM/Piik/internal/diagnostics"
+ "github.com/TNTcraftHIM/Piik/internal/server/config"
+ "github.com/TNTcraftHIM/Piik/internal/server/room"
+ "github.com/TNTcraftHIM/Piik/internal/server/sfu"
+ "github.com/TNTcraftHIM/Piik/internal/server/signal"
+ "github.com/TNTcraftHIM/Piik/internal/server/stun"
"github.com/pion/ice/v4"
"github.com/pion/webrtc/v4"
)
@@ -76,7 +76,7 @@ type Options struct {
RoomStore *room.Store
}
-// Server is ScreenerServer.
+// Server is PiikServer.
type Server struct {
config config.Config
store *room.Store
@@ -110,7 +110,7 @@ type Server struct {
shutdownErr error
}
-// New is createScreenerServer minus the listening: it builds the SFU fallback,
+// New is createPiikServer minus the listening: it builds the SFU fallback,
// the room store, the site-access issuer, the frontend handler and the HTTP
// server, none of which performs I/O.
func New(options Options) (*Server, error) {
@@ -185,7 +185,7 @@ func New(options Options) (*Server, error) {
return server, nil
}
-// newRoomStore builds the room store createScreenerServer would otherwise take
+// newRoomStore builds the room store createPiikServer would otherwise take
// from Options.RoomStore. An empty RoomDatabasePath is the memory-only mode.
func newRoomStore(options Options) (*room.Store, error) {
if options.RoomStore != nil {
@@ -211,7 +211,7 @@ func newRoomStore(options Options) (*room.Store, error) {
// Handler is the composed router, exposed so a host process can mount it.
func (s *Server) Handler() http.Handler { return s }
-// Store is ScreenerServer.roomStore. The signaling server's mutex guards it, so
+// Store is PiikServer.roomStore. The signaling server's mutex guards it, so
// callers outside that lock may only read it while no request is in flight.
func (s *Server) Store() *room.Store { return s.store }
@@ -220,11 +220,11 @@ func (s *Server) Listen(ctx context.Context) (int, error) {
s.mu.Lock()
if s.startupRequested {
s.mu.Unlock()
- return 0, errors.New("Screener server startup was already requested")
+ return 0, errors.New("Piik server startup was already requested")
}
if s.closing {
s.mu.Unlock()
- return 0, errors.New("Screener server is closing")
+ return 0, errors.New("Piik server is closing")
}
s.startupRequested = true
s.mu.Unlock()
@@ -253,14 +253,14 @@ func (s *Server) start(ctx context.Context) (int, error) {
s.stunServer, err = stun.Listen(ctx, s.config.STUNListenAddresses)
if err != nil {
_ = listener.Close()
- return 0, fmt.Errorf("Screener STUN listener failed: %w", err)
+ return 0, fmt.Errorf("Piik STUN listener failed: %w", err)
}
}
if configuration := s.config.SFU; configuration != nil {
connection, listenErr := net.ListenPacket("udp4", net.JoinHostPort(configuration.ListenHost, strconv.Itoa(configuration.Port)))
if listenErr != nil {
_ = s.stopServing(ctx)
- return 0, fmt.Errorf("Screener SFU listener failed: %w", listenErr)
+ return 0, fmt.Errorf("Piik SFU listener failed: %w", listenErr)
}
factory := diagnostics.PionLoggerFactory()
s.mediaMux = ice.NewUDPMuxDefault(ice.UDPMuxParams{UDPConn: connection, Logger: factory.NewLogger("sfu-udp")})
@@ -287,7 +287,7 @@ func (s *Server) start(ctx context.Context) (int, error) {
// ErrServerClosed on a permanent accept failure, which nothing here
// causes; report it rather than serving nothing in silence.
if err := s.httpServer.Serve(listener); !errors.Is(err, http.ErrServerClosed) {
- s.logger.Error("Screener HTTP server stopped unexpectedly", "errorType", fmt.Sprintf("%T", err))
+ s.logger.Error("Piik HTTP server stopped unexpectedly", "errorType", fmt.Sprintf("%T", err))
s.logger.Debug("http-listener-failed", diagnostics.Error(err))
}
}()
@@ -303,7 +303,7 @@ func (s *Server) start(ctx context.Context) (int, error) {
cleanup = append(cleanup, closeErr)
}
if len(cleanup) > 0 {
- return 0, fmt.Errorf("Screener startup reconciliation failed: %w",
+ return 0, fmt.Errorf("Piik startup reconciliation failed: %w",
errors.Join(append([]error{err}, cleanup...)...))
}
return 0, err
@@ -403,7 +403,7 @@ func (s *Server) runShutdown(ctx context.Context, endRooms bool) error {
failures = append(failures, s.stopServing(ctx))
failures = append(failures, s.store.Close())
if joined := errors.Join(failures...); joined != nil {
- return fmt.Errorf("Screener server shutdown failed: %w", joined)
+ return fmt.Errorf("Piik server shutdown failed: %w", joined)
}
return nil
}
diff --git a/internal/server/app/app_test.go b/internal/server/app/app_test.go
index fbff959e..40f154cd 100644
--- a/internal/server/app/app_test.go
+++ b/internal/server/app/app_test.go
@@ -28,9 +28,9 @@ import (
"github.com/coder/websocket"
_ "modernc.org/sqlite"
- "github.com/TNTcraftHIM/Screener/internal/server/config"
- "github.com/TNTcraftHIM/Screener/internal/server/protocol"
- "github.com/TNTcraftHIM/Screener/internal/server/room"
+ "github.com/TNTcraftHIM/Piik/internal/server/config"
+ "github.com/TNTcraftHIM/Piik/internal/server/protocol"
+ "github.com/TNTcraftHIM/Piik/internal/server/room"
)
// The scenarios below are ported from tests/server-http.test.ts.
@@ -40,10 +40,10 @@ const allowedOrigin = "http://allowed.test"
// setCookiePattern is the exact attribute order access-session.ts emits and
// app.ts writes verbatim.
var setCookiePattern = regexp.MustCompile(
- `^screener-site-access=v1\.[0-9]+\.[A-Za-z0-9_-]{43}; Path=/; Max-Age=86400; HttpOnly; SameSite=Strict$`)
+ `^piik-site-access=v1\.[0-9]+\.[A-Za-z0-9_-]{43}; Path=/; Max-Age=86400; HttpOnly; SameSite=Strict$`)
var secureSetCookiePattern = regexp.MustCompile(
- `^__Host-screener-site-access=v1\.[0-9]+\.[A-Za-z0-9_-]{43}; Path=/; Max-Age=86400; HttpOnly; SameSite=Strict; Secure$`)
+ `^__Host-piik-site-access=v1\.[0-9]+\.[A-Za-z0-9_-]{43}; Path=/; Max-Age=86400; HttpOnly; SameSite=Strict; Secure$`)
func testConfig(t *testing.T) config.Config {
t.Helper()
@@ -1333,7 +1333,7 @@ func TestListenIsSingleShotAndRefusedAfterClose(t *testing.T) {
server := start(t, Options{Config: testConfig(t)})
if _, err := server.Listen(context.Background()); err == nil ||
- err.Error() != "Screener server startup was already requested" {
+ err.Error() != "Piik server startup was already requested" {
t.Fatalf("second Listen error = %v", err)
}
if err := server.Close(context.Background()); err != nil {
@@ -1346,7 +1346,7 @@ func TestListenIsSingleShotAndRefusedAfterClose(t *testing.T) {
t.Fatalf("Close before Listen: %v", err)
}
if _, err := fresh.Listen(context.Background()); err == nil ||
- err.Error() != "Screener server is closing" {
+ err.Error() != "Piik server is closing" {
t.Fatalf("Listen after Close error = %v", err)
}
}
@@ -1517,7 +1517,7 @@ func TestReportsAListenerThatDiesWhileServing(t *testing.T) {
t.Fatalf("close the listener: %v", err)
}
waitFor(t, "the serve failure to be reported", func() bool {
- return strings.Contains(logged.String(), "Screener HTTP server stopped unexpectedly")
+ return strings.Contains(logged.String(), "Piik HTTP server stopped unexpectedly")
})
if record := logged.String(); !strings.Contains(record, "errorType=*net.OpError") || strings.Contains(record, "error=") || strings.Contains(record, "127.0.0.1") {
t.Fatalf("listener failure must log only the error type: %q", record)
diff --git a/internal/server/app/routes.go b/internal/server/app/routes.go
index e87cbed7..ba32ccb6 100644
--- a/internal/server/app/routes.go
+++ b/internal/server/app/routes.go
@@ -7,10 +7,10 @@ import (
"regexp"
"strings"
- "github.com/TNTcraftHIM/Screener/internal/server/config"
- "github.com/TNTcraftHIM/Screener/internal/server/protocol"
- "github.com/TNTcraftHIM/Screener/internal/server/room"
- "github.com/TNTcraftHIM/Screener/internal/server/signal"
+ "github.com/TNTcraftHIM/Piik/internal/server/config"
+ "github.com/TNTcraftHIM/Piik/internal/server/protocol"
+ "github.com/TNTcraftHIM/Piik/internal/server/room"
+ "github.com/TNTcraftHIM/Piik/internal/server/signal"
)
// The request router of src/server/app.ts. Route order is a contract (map
diff --git a/internal/server/app/static.go b/internal/server/app/static.go
index 0e15f9a2..864e2574 100644
--- a/internal/server/app/static.go
+++ b/internal/server/app/static.go
@@ -7,7 +7,7 @@ import (
"path"
"strings"
- "github.com/TNTcraftHIM/Screener/internal/server/protocol"
+ "github.com/TNTcraftHIM/Piik/internal/server/protocol"
)
// staticContentTypes freezes mrmime's answers for the extensions a Vite build
diff --git a/internal/server/config/config.go b/internal/server/config/config.go
index 6bb25337..4d33ab8d 100644
--- a/internal/server/config/config.go
+++ b/internal/server/config/config.go
@@ -15,14 +15,14 @@ import (
"strconv"
"strings"
- "github.com/TNTcraftHIM/Screener/internal/server/protocol"
+ "github.com/TNTcraftHIM/Piik/internal/server/protocol"
)
// Environment ports RuntimeEnvironment. DECISIONS D8 renames NODE_ENV to
-// SCREENER_ENV and drops "test".
+// PIIK_ENV and drops "test".
type Environment string
-// The two accepted SCREENER_ENV values.
+// The two accepted PIIK_ENV values.
const (
EnvironmentDevelopment Environment = "development"
EnvironmentProduction Environment = "production"
@@ -64,7 +64,7 @@ var removedEnvironmentVariables = []struct{ name, reason string }{
{"ROOM_TTL_SECONDS", "rooms do not expire"},
{"ROOM_LEASE_SECONDS", "rooms do not expire"},
{"ACCESS_PASSWORD", "use SITE_ACCESS_PASSWORD"},
- {"NODE_ENV", "use SCREENER_ENV"},
+ {"NODE_ENV", "use PIIK_ENV"},
}
// SFUConfig enables the embedded UDP media listener.
@@ -229,11 +229,11 @@ func Load(env map[string]string) (Config, error) {
}, nil
}
-// parseEnvironment ports parseEnvironment for SCREENER_ENV.
+// parseEnvironment ports parseEnvironment for PIIK_ENV.
func parseEnvironment(env map[string]string) (Environment, error) {
// TS: value ?? "development" — a present empty value is not nullish and so
// reaches the check below.
- value, present := env["SCREENER_ENV"]
+ value, present := env["PIIK_ENV"]
if !present {
return EnvironmentDevelopment, nil
}
@@ -241,7 +241,7 @@ func parseEnvironment(env map[string]string) (Environment, error) {
case EnvironmentDevelopment, EnvironmentProduction:
return Environment(value), nil
}
- return "", errors.New("SCREENER_ENV must be development or production")
+ return "", errors.New("PIIK_ENV must be development or production")
}
// parseBoolean ports parseBoolean; every caller used a false fallback.
diff --git a/internal/server/config/config_test.go b/internal/server/config/config_test.go
index cbc8ae8d..a9bf1ed3 100644
--- a/internal/server/config/config_test.go
+++ b/internal/server/config/config_test.go
@@ -11,7 +11,7 @@ import (
"strings"
"testing"
- "github.com/TNTcraftHIM/Screener/internal/server/protocol"
+ "github.com/TNTcraftHIM/Piik/internal/server/protocol"
)
// Ported from tests/server-config.test.ts.
@@ -26,7 +26,7 @@ func env(parts ...map[string]string) map[string]string {
}
var productionBase = map[string]string{
- "SCREENER_ENV": "production",
+ "PIIK_ENV": "production",
"PUBLIC_BASE_URL": "https://share.test",
"SITE_ACCESS_PASSWORD": "host-password-12",
"STUN_URLS": "stun:stun.test:3478",
@@ -50,7 +50,7 @@ func mustLoad(t *testing.T, environment map[string]string) Config {
}
func TestLoadDevelopmentDefaults(t *testing.T) {
- config := mustLoad(t, map[string]string{"SCREENER_ENV": "development", "PORT": "9123"})
+ config := mustLoad(t, map[string]string{"PIIK_ENV": "development", "PORT": "9123"})
if config.Env != EnvironmentDevelopment {
t.Errorf("Env = %q", config.Env)
@@ -374,11 +374,11 @@ func TestLoadRejects(t *testing.T) {
// Production requirements.
{"production without STUN", map[string]string{
- "SCREENER_ENV": "production", "PUBLIC_BASE_URL": "https://share.test",
+ "PIIK_ENV": "production", "PUBLIC_BASE_URL": "https://share.test",
"SITE_ACCESS_PASSWORD": "host-password-12",
}, "STUN is required in production"},
{"production without a site password", map[string]string{
- "SCREENER_ENV": "production", "PUBLIC_BASE_URL": "https://share.test",
+ "PIIK_ENV": "production", "PUBLIC_BASE_URL": "https://share.test",
"STUN_URLS": "stun:stun.test:3478",
}, "SITE_ACCESS_PASSWORD is required in production"},
@@ -444,13 +444,13 @@ func TestLoadRejects(t *testing.T) {
// Runtime environment (DECISIONS D8).
{"NODE_ENV is removed", map[string]string{"NODE_ENV": "production"},
- "NODE_ENV is no longer supported; use SCREENER_ENV"},
+ "NODE_ENV is no longer supported; use PIIK_ENV"},
{"blank NODE_ENV is removed", map[string]string{"NODE_ENV": ""},
- "NODE_ENV is no longer supported; use SCREENER_ENV"},
- {"test environment is gone", map[string]string{"SCREENER_ENV": "test"},
- "SCREENER_ENV must be development or production"},
- {"blank environment", map[string]string{"SCREENER_ENV": ""},
- "SCREENER_ENV must be development or production"},
+ "NODE_ENV is no longer supported; use PIIK_ENV"},
+ {"test environment is gone", map[string]string{"PIIK_ENV": "test"},
+ "PIIK_ENV must be development or production"},
+ {"blank environment", map[string]string{"PIIK_ENV": ""},
+ "PIIK_ENV must be development or production"},
// Removed variables carrying their own replacement.
{"removed relay downstream setting", map[string]string{"MAX_PEER_RELAY_DOWNSTREAM_EDGES": "2"},
diff --git a/internal/server/config/ice.go b/internal/server/config/ice.go
index 617e0383..6e6441c4 100644
--- a/internal/server/config/ice.go
+++ b/internal/server/config/ice.go
@@ -7,7 +7,7 @@ import (
"strconv"
"strings"
- "github.com/TNTcraftHIM/Screener/internal/server/protocol"
+ "github.com/TNTcraftHIM/Piik/internal/server/protocol"
)
// Ported from src/server/ice.ts.
diff --git a/internal/server/config/ice_test.go b/internal/server/config/ice_test.go
index 21e05a06..eadaae2e 100644
--- a/internal/server/config/ice_test.go
+++ b/internal/server/config/ice_test.go
@@ -5,7 +5,7 @@ import (
"slices"
"testing"
- "github.com/TNTcraftHIM/Screener/internal/server/protocol"
+ "github.com/TNTcraftHIM/Piik/internal/server/protocol"
)
// Ported from tests/ice.test.ts.
diff --git a/internal/server/config/local.go b/internal/server/config/local.go
index 5c0bf0a4..c8784cd3 100644
--- a/internal/server/config/local.go
+++ b/internal/server/config/local.go
@@ -9,7 +9,7 @@ import (
"slices"
"strings"
- "github.com/TNTcraftHIM/Screener/internal/server/protocol"
+ "github.com/TNTcraftHIM/Piik/internal/server/protocol"
)
// localPasswordPattern is VISIBLE_ASCII_PATTERN from local-config.ts. Because
diff --git a/internal/server/protocol/constants.go b/internal/server/protocol/constants.go
index ed692a47..2ec3064b 100644
--- a/internal/server/protocol/constants.go
+++ b/internal/server/protocol/constants.go
@@ -1,4 +1,4 @@
-// Package protocol is the Go owner of the Screener wire contract. It mirrors
+// Package protocol is the Go owner of the Piik wire contract. It mirrors
// src/shared/protocol.ts (zod schemas) plus the four shared scalar helpers
// (media-copy-accounting.ts, nat-candidate.ts, packet-loss.ts,
// video-codec-evidence.ts). The package performs no I/O and imports nothing
@@ -13,7 +13,7 @@ const (
MaxViewersPerRoomLimit = 20
MaxParticipantsPerRoomLimit = MaxViewersPerRoomLimit + 1
MaxSignalBytes = 64 * 1024
- SignalingProtocol = "screener-v23"
+ SignalingProtocol = "piik-v23"
RoomCodeLength = 4
MaxMediaRouteRevision = MaxSafeInteger
MaxIceServerURLs = 8
diff --git a/internal/server/protocol/contract_test.go b/internal/server/protocol/contract_test.go
index 1df085a8..e3864696 100644
--- a/internal/server/protocol/contract_test.go
+++ b/internal/server/protocol/contract_test.go
@@ -75,7 +75,7 @@ const (
func authenticatedHost() []member {
return []member{
{"type", `"authenticated"`},
- {"protocol", `"screener-v23"`},
+ {"protocol", `"piik-v23"`},
{"peerId", `"host_12345678"`},
{"maxViewers", `8`},
{"endpointMediaCopyCapacity", `2`},
@@ -618,7 +618,7 @@ func TestOptionalAndNullableAreExact(t *testing.T) {
// A host authenticate without routePolicy takes DEFAULT_ROUTE_POLICY.
func TestAuthenticateAppliesTheRoutePolicyDefault(t *testing.T) {
message, err := DecodeClientMessage([]byte(
- `{"type":"authenticate","protocol":"screener-v23","roomId":"1234","role":"host",` +
+ `{"type":"authenticate","protocol":"piik-v23","roomId":"1234","role":"host",` +
`"token":"` + repeat("a", 43) + `","clientId":"client_12345678"}`))
if err != nil {
t.Fatal(err)
diff --git a/internal/server/room/database.go b/internal/server/room/database.go
index 028d948f..b70805c3 100644
--- a/internal/server/room/database.go
+++ b/internal/server/room/database.go
@@ -12,7 +12,7 @@ import (
// The pure-Go driver: the port must build with CGO_ENABLED=0 (D2).
_ "modernc.org/sqlite"
- "github.com/TNTcraftHIM/Screener/internal/server/protocol"
+ "github.com/TNTcraftHIM/Piik/internal/server/protocol"
)
// Database identity and the single current schema are checked before adopting
diff --git a/internal/server/room/database_test.go b/internal/server/room/database_test.go
index 0f68fe22..3dab380c 100644
--- a/internal/server/room/database_test.go
+++ b/internal/server/room/database_test.go
@@ -10,7 +10,7 @@ import (
"strings"
"testing"
- "github.com/TNTcraftHIM/Screener/internal/server/protocol"
+ "github.com/TNTcraftHIM/Piik/internal/server/protocol"
)
// The scenarios below are ported from tests/room-database.test.ts.
diff --git a/internal/server/room/password.go b/internal/server/room/password.go
index cae24c6f..db4d6ad0 100644
--- a/internal/server/room/password.go
+++ b/internal/server/room/password.go
@@ -7,7 +7,7 @@ import (
"golang.org/x/crypto/scrypt"
- "github.com/TNTcraftHIM/Screener/internal/server/protocol"
+ "github.com/TNTcraftHIM/Piik/internal/server/protocol"
)
const (
diff --git a/internal/server/room/store.go b/internal/server/room/store.go
index 74184758..efc8492a 100644
--- a/internal/server/room/store.go
+++ b/internal/server/room/store.go
@@ -13,8 +13,8 @@ import (
"slices"
"strconv"
- "github.com/TNTcraftHIM/Screener/internal/server/ordered"
- "github.com/TNTcraftHIM/Screener/internal/server/protocol"
+ "github.com/TNTcraftHIM/Piik/internal/server/ordered"
+ "github.com/TNTcraftHIM/Piik/internal/server/protocol"
)
// Capacity is ROOM_CAPACITY: every four-digit room code.
diff --git a/internal/server/room/store_test.go b/internal/server/room/store_test.go
index 04980078..42c6f285 100644
--- a/internal/server/room/store_test.go
+++ b/internal/server/room/store_test.go
@@ -11,7 +11,7 @@ import (
"testing"
"time"
- "github.com/TNTcraftHIM/Screener/internal/server/protocol"
+ "github.com/TNTcraftHIM/Piik/internal/server/protocol"
)
// The scenarios below are ported from tests/room-store.test.ts.
diff --git a/internal/server/route/api.go b/internal/server/route/api.go
index 33034366..3681dbf1 100644
--- a/internal/server/route/api.go
+++ b/internal/server/route/api.go
@@ -1,8 +1,8 @@
package route
import (
- "github.com/TNTcraftHIM/Screener/internal/server/ordered"
- "github.com/TNTcraftHIM/Screener/internal/server/protocol"
+ "github.com/TNTcraftHIM/Piik/internal/server/ordered"
+ "github.com/TNTcraftHIM/Piik/internal/server/protocol"
)
// Resource is the caller-owned SFU/overlap allocation the controller stores,
diff --git a/internal/server/route/candidates.go b/internal/server/route/candidates.go
index 5aee90a9..3ecdf05a 100644
--- a/internal/server/route/candidates.go
+++ b/internal/server/route/candidates.go
@@ -5,7 +5,7 @@ import (
"slices"
"sort"
- "github.com/TNTcraftHIM/Screener/internal/server/protocol"
+ "github.com/TNTcraftHIM/Piik/internal/server/protocol"
)
// buildCandidates ports 2767: the full plan list filtered by the
diff --git a/internal/server/route/controller.go b/internal/server/route/controller.go
index 946d94d2..cc647a66 100644
--- a/internal/server/route/controller.go
+++ b/internal/server/route/controller.go
@@ -7,8 +7,8 @@ import (
"sort"
"strings"
- "github.com/TNTcraftHIM/Screener/internal/server/ordered"
- "github.com/TNTcraftHIM/Screener/internal/server/protocol"
+ "github.com/TNTcraftHIM/Piik/internal/server/ordered"
+ "github.com/TNTcraftHIM/Piik/internal/server/protocol"
)
// File-local constants of room-route-controller.ts (lines 112-114).
diff --git a/internal/server/route/controller_test.go b/internal/server/route/controller_test.go
index ffb9ff87..3ba13de2 100644
--- a/internal/server/route/controller_test.go
+++ b/internal/server/route/controller_test.go
@@ -12,7 +12,7 @@ import (
"strings"
"testing"
- "github.com/TNTcraftHIM/Screener/internal/server/protocol"
+ "github.com/TNTcraftHIM/Piik/internal/server/protocol"
)
// TS 359: keeps one diagnostic label until a departed relay is finally pruned
diff --git a/internal/server/route/debug.go b/internal/server/route/debug.go
index 621f2d26..7f6e32b1 100644
--- a/internal/server/route/debug.go
+++ b/internal/server/route/debug.go
@@ -7,11 +7,11 @@ import (
"strconv"
"strings"
- "github.com/TNTcraftHIM/Screener/internal/server/protocol"
+ "github.com/TNTcraftHIM/Piik/internal/server/protocol"
)
func debugEnabled() bool {
- return routeDebugEnabled(os.Getenv("SCREENER_DEBUG")) ||
+ return routeDebugEnabled(os.Getenv("PIIK_DEBUG")) ||
slog.Default().Enabled(context.Background(), slog.LevelDebug)
}
@@ -44,7 +44,7 @@ func (c *Controller) debug(event string, details ...any) {
"revision", c.revision,
"factVersion", c.factVersion)
args = append(args, details...)
- slog.Info("screener-route", args...)
+ slog.Info("piik-route", args...)
}
// debugPeer ports 4895: "host", "viewer-<joinOrder>" or "viewer-unknown".
diff --git a/internal/server/route/debug_test.go b/internal/server/route/debug_test.go
index 3344c56b..ebeded63 100644
--- a/internal/server/route/debug_test.go
+++ b/internal/server/route/debug_test.go
@@ -11,12 +11,12 @@ func TestDebugUsesCurrentEnvironmentAndLogger(t *testing.T) {
t.Cleanup(func() { slog.SetDefault(previous) })
slog.SetDefault(slog.New(slog.NewTextHandler(io.Discard, nil)))
for value, want := range map[string]bool{"": false, "client": false, "route": true, "client, route": true} {
- t.Setenv("SCREENER_DEBUG", value)
+ t.Setenv("PIIK_DEBUG", value)
if got := debugEnabled(); got != want {
t.Fatalf("debugEnabled with %q = %v, want %v", value, got, want)
}
}
- t.Setenv("SCREENER_DEBUG", "")
+ t.Setenv("PIIK_DEBUG", "")
slog.SetDefault(slog.New(slog.NewTextHandler(io.Discard, &slog.HandlerOptions{Level: slog.LevelDebug})))
if !debugEnabled() {
t.Fatal("the active diagnostic logger did not enable route events")
diff --git a/internal/server/route/graph.go b/internal/server/route/graph.go
index 01fcaae6..432ca7b1 100644
--- a/internal/server/route/graph.go
+++ b/internal/server/route/graph.go
@@ -3,7 +3,7 @@ package route
import (
"errors"
- "github.com/TNTcraftHIM/Screener/internal/server/protocol"
+ "github.com/TNTcraftHIM/Piik/internal/server/protocol"
)
// pruneDepartedLeaves ports 4015: removes departed viewers without
diff --git a/internal/server/route/harness_test.go b/internal/server/route/harness_test.go
index a6caac59..746cd8af 100644
--- a/internal/server/route/harness_test.go
+++ b/internal/server/route/harness_test.go
@@ -12,7 +12,7 @@ import (
"strings"
"testing"
- "github.com/TNTcraftHIM/Screener/internal/server/protocol"
+ "github.com/TNTcraftHIM/Piik/internal/server/protocol"
)
const (
diff --git a/internal/server/route/opportunities.go b/internal/server/route/opportunities.go
index 3cc551bd..458df7f2 100644
--- a/internal/server/route/opportunities.go
+++ b/internal/server/route/opportunities.go
@@ -3,8 +3,8 @@ package route
import (
"strings"
- "github.com/TNTcraftHIM/Screener/internal/server/ordered"
- "github.com/TNTcraftHIM/Screener/internal/server/protocol"
+ "github.com/TNTcraftHIM/Piik/internal/server/ordered"
+ "github.com/TNTcraftHIM/Piik/internal/server/protocol"
)
// candidateOpportunityBase ports 2900: the NUL-joined ledger key. A session
diff --git a/internal/server/route/quality.go b/internal/server/route/quality.go
index 52b27e03..405491e2 100644
--- a/internal/server/route/quality.go
+++ b/internal/server/route/quality.go
@@ -3,7 +3,7 @@ package route
import (
"sort"
- "github.com/TNTcraftHIM/Screener/internal/server/ordered"
+ "github.com/TNTcraftHIM/Piik/internal/server/ordered"
)
// ObserveQualityEvidence aggregates one receiver-side window onto the
diff --git a/internal/server/route/smoke_test.go b/internal/server/route/smoke_test.go
index c30908b5..29867a2a 100644
--- a/internal/server/route/smoke_test.go
+++ b/internal/server/route/smoke_test.go
@@ -3,7 +3,7 @@ package route
import (
"testing"
- "github.com/TNTcraftHIM/Screener/internal/server/protocol"
+ "github.com/TNTcraftHIM/Piik/internal/server/protocol"
)
// TestSmokeCommitsOneDirectCandidate wires the controller end to end: a
diff --git a/internal/server/route/timing.go b/internal/server/route/timing.go
index 54535388..9d705d27 100644
--- a/internal/server/route/timing.go
+++ b/internal/server/route/timing.go
@@ -1,6 +1,6 @@
package route
-import "github.com/TNTcraftHIM/Screener/internal/server/protocol"
+import "github.com/TNTcraftHIM/Piik/internal/server/protocol"
// recordDemand ports 4633: replaces the peer's timing record wholesale.
func (c *Controller) recordDemand(childPeerID string, nowMs int64, reason DemandReason) {
diff --git a/internal/server/sfu/admission.go b/internal/server/sfu/admission.go
index 02dbdd0c..db2f866f 100644
--- a/internal/server/sfu/admission.go
+++ b/internal/server/sfu/admission.go
@@ -4,8 +4,8 @@ package sfu
import (
"regexp"
- "github.com/TNTcraftHIM/Screener/internal/server/ordered"
- "github.com/TNTcraftHIM/Screener/internal/server/protocol"
+ "github.com/TNTcraftHIM/Piik/internal/server/ordered"
+ "github.com/TNTcraftHIM/Piik/internal/server/protocol"
)
// ResourceFence is SfuResourceFence. It is a comparable value, so the
diff --git a/internal/server/sfu/admission_test.go b/internal/server/sfu/admission_test.go
index 1f63c4e4..03bfd0da 100644
--- a/internal/server/sfu/admission_test.go
+++ b/internal/server/sfu/admission_test.go
@@ -7,7 +7,7 @@ import (
"strings"
"testing"
- "github.com/TNTcraftHIM/Screener/internal/server/protocol"
+ "github.com/TNTcraftHIM/Piik/internal/server/protocol"
)
func TestSubscriptionDrainReleasesOnlyExactConnection(t *testing.T) {
diff --git a/internal/server/sfu/media.go b/internal/server/sfu/media.go
index 60894157..63452c0c 100644
--- a/internal/server/sfu/media.go
+++ b/internal/server/sfu/media.go
@@ -7,7 +7,7 @@ import (
"strings"
"sync"
- "github.com/TNTcraftHIM/Screener/internal/media/forwarding"
+ "github.com/TNTcraftHIM/Piik/internal/media/forwarding"
"github.com/pion/interceptor"
"github.com/pion/rtcp"
"github.com/pion/webrtc/v4"
diff --git a/internal/server/sfu/media_test.go b/internal/server/sfu/media_test.go
index 9e5dcd97..8720cb0d 100644
--- a/internal/server/sfu/media_test.go
+++ b/internal/server/sfu/media_test.go
@@ -9,7 +9,7 @@ import (
"testing"
"time"
- "github.com/TNTcraftHIM/Screener/internal/media/forwarding"
+ "github.com/TNTcraftHIM/Piik/internal/media/forwarding"
livekitsfu "github.com/livekit/livekit-server/pkg/sfu"
"github.com/pion/interceptor"
"github.com/pion/rtp"
diff --git a/internal/server/sfu/sfutest/fake.go b/internal/server/sfu/sfutest/fake.go
index 0c244bd4..4356d731 100644
--- a/internal/server/sfu/sfutest/fake.go
+++ b/internal/server/sfu/sfutest/fake.go
@@ -7,7 +7,7 @@ import (
"slices"
"sync"
- "github.com/TNTcraftHIM/Screener/internal/server/sfu"
+ "github.com/TNTcraftHIM/Piik/internal/server/sfu"
"github.com/pion/webrtc/v4"
)
diff --git a/internal/server/signal/presence.go b/internal/server/signal/presence.go
index 847297b2..8e3a955c 100644
--- a/internal/server/signal/presence.go
+++ b/internal/server/signal/presence.go
@@ -13,8 +13,8 @@ import (
"github.com/coder/websocket"
- "github.com/TNTcraftHIM/Screener/internal/server/protocol"
- "github.com/TNTcraftHIM/Screener/internal/server/room"
+ "github.com/TNTcraftHIM/Piik/internal/server/protocol"
+ "github.com/TNTcraftHIM/Piik/internal/server/room"
)
// viewerKey is the TS `${roomId}:${peerId}` used by the grace timers and the
diff --git a/internal/server/signal/recovery_test.go b/internal/server/signal/recovery_test.go
index 252b4e3d..28c358be 100644
--- a/internal/server/signal/recovery_test.go
+++ b/internal/server/signal/recovery_test.go
@@ -4,7 +4,7 @@ import (
"strings"
"testing"
- "github.com/TNTcraftHIM/Screener/internal/server/protocol"
+ "github.com/TNTcraftHIM/Piik/internal/server/protocol"
)
func TestSignalRebuildSupersedesOverlappingQualityPreparation(t *testing.T) {
diff --git a/internal/server/signal/router.go b/internal/server/signal/router.go
index 2e1fb664..78598a9e 100644
--- a/internal/server/signal/router.go
+++ b/internal/server/signal/router.go
@@ -7,7 +7,7 @@ package signal
// goroutines the router starts (pump driver, media prepares, drains and timer
// callbacks) take it themselves. Every I/O window is an
// unlock / I/O / lock window followed by exactly the guard the TS code ran
-// after that await (map C:/tmp/screener-go/maps/effect-layer.md, section 2.2).
+// after that await (map C:/tmp/piik-go/maps/effect-layer.md, section 2.2).
import (
"context"
@@ -21,11 +21,11 @@ import (
"sync"
"time"
- "github.com/TNTcraftHIM/Screener/internal/server/ordered"
- "github.com/TNTcraftHIM/Screener/internal/server/protocol"
- "github.com/TNTcraftHIM/Screener/internal/server/room"
- "github.com/TNTcraftHIM/Screener/internal/server/route"
- "github.com/TNTcraftHIM/Screener/internal/server/sfu"
+ "github.com/TNTcraftHIM/Piik/internal/server/ordered"
+ "github.com/TNTcraftHIM/Piik/internal/server/protocol"
+ "github.com/TNTcraftHIM/Piik/internal/server/room"
+ "github.com/TNTcraftHIM/Piik/internal/server/route"
+ "github.com/TNTcraftHIM/Piik/internal/server/sfu"
)
const (
@@ -33,7 +33,7 @@ const (
)
func routeDebugEnabled() bool {
- return routeDebugFlag(os.Getenv("SCREENER_DEBUG")) ||
+ return routeDebugFlag(os.Getenv("PIIK_DEBUG")) ||
slog.Default().Enabled(context.Background(), slog.LevelDebug)
}
@@ -1436,7 +1436,7 @@ func (r *router) debug(roomID, event string, details ...any) {
args := make([]any, 0, 4+len(details))
args = append(args, "event", event, "roomId", roomID)
args = append(args, details...)
- slog.Info("screener-route", args...)
+ slog.Info("piik-route", args...)
}
// sendRoomError ports sendRoomError: only the connected host is told.
diff --git a/internal/server/signal/router_pump.go b/internal/server/signal/router_pump.go
index 8159d0de..89e249a2 100644
--- a/internal/server/signal/router_pump.go
+++ b/internal/server/signal/router_pump.go
@@ -6,10 +6,10 @@ import (
"log/slog"
"time"
- "github.com/TNTcraftHIM/Screener/internal/server/protocol"
- "github.com/TNTcraftHIM/Screener/internal/server/room"
- "github.com/TNTcraftHIM/Screener/internal/server/route"
- "github.com/TNTcraftHIM/Screener/internal/server/sfu"
+ "github.com/TNTcraftHIM/Piik/internal/server/protocol"
+ "github.com/TNTcraftHIM/Piik/internal/server/room"
+ "github.com/TNTcraftHIM/Piik/internal/server/route"
+ "github.com/TNTcraftHIM/Piik/internal/server/sfu"
)
// preparedCandidate is PreparedCandidate; the optional TS keys are "" / nil.
diff --git a/internal/server/signal/router_sfu.go b/internal/server/signal/router_sfu.go
index 28c698db..f8593ec0 100644
--- a/internal/server/signal/router_sfu.go
+++ b/internal/server/signal/router_sfu.go
@@ -4,9 +4,9 @@ import (
"context"
"errors"
- "github.com/TNTcraftHIM/Screener/internal/server/protocol"
- "github.com/TNTcraftHIM/Screener/internal/server/route"
- "github.com/TNTcraftHIM/Screener/internal/server/sfu"
+ "github.com/TNTcraftHIM/Piik/internal/server/protocol"
+ "github.com/TNTcraftHIM/Piik/internal/server/route"
+ "github.com/TNTcraftHIM/Piik/internal/server/sfu"
)
type drainKind string
diff --git a/internal/server/signal/router_sfu_signal.go b/internal/server/signal/router_sfu_signal.go
index 27ea83d5..7eb1d594 100644
--- a/internal/server/signal/router_sfu_signal.go
+++ b/internal/server/signal/router_sfu_signal.go
@@ -5,10 +5,10 @@ import (
"encoding/json"
"time"
- "github.com/TNTcraftHIM/Screener/internal/media/forwarding"
- "github.com/TNTcraftHIM/Screener/internal/server/protocol"
- "github.com/TNTcraftHIM/Screener/internal/server/route"
- "github.com/TNTcraftHIM/Screener/internal/server/sfu"
+ "github.com/TNTcraftHIM/Piik/internal/media/forwarding"
+ "github.com/TNTcraftHIM/Piik/internal/server/protocol"
+ "github.com/TNTcraftHIM/Piik/internal/server/route"
+ "github.com/TNTcraftHIM/Piik/internal/server/sfu"
"github.com/pion/webrtc/v4"
)
diff --git a/internal/server/signal/router_sfu_signal_test.go b/internal/server/signal/router_sfu_signal_test.go
index baee85db..1f12f825 100644
--- a/internal/server/signal/router_sfu_signal_test.go
+++ b/internal/server/signal/router_sfu_signal_test.go
@@ -8,8 +8,8 @@ import (
"testing"
"time"
- "github.com/TNTcraftHIM/Screener/internal/server/protocol"
- "github.com/TNTcraftHIM/Screener/internal/server/sfu"
+ "github.com/TNTcraftHIM/Piik/internal/server/protocol"
+ "github.com/TNTcraftHIM/Piik/internal/server/sfu"
livekitsfu "github.com/livekit/livekit-server/pkg/sfu"
"github.com/pion/webrtc/v4"
"github.com/pion/webrtc/v4/pkg/media"
diff --git a/internal/server/signal/router_test.go b/internal/server/signal/router_test.go
index 64f5de05..af7ee2ea 100644
--- a/internal/server/signal/router_test.go
+++ b/internal/server/signal/router_test.go
@@ -32,12 +32,12 @@ import (
"testing"
"time"
- "github.com/TNTcraftHIM/Screener/internal/server/ordered"
- "github.com/TNTcraftHIM/Screener/internal/server/protocol"
- "github.com/TNTcraftHIM/Screener/internal/server/room"
- "github.com/TNTcraftHIM/Screener/internal/server/route"
- "github.com/TNTcraftHIM/Screener/internal/server/sfu"
- "github.com/TNTcraftHIM/Screener/internal/server/sfu/sfutest"
+ "github.com/TNTcraftHIM/Piik/internal/server/ordered"
+ "github.com/TNTcraftHIM/Piik/internal/server/protocol"
+ "github.com/TNTcraftHIM/Piik/internal/server/room"
+ "github.com/TNTcraftHIM/Piik/internal/server/route"
+ "github.com/TNTcraftHIM/Piik/internal/server/sfu"
+ "github.com/TNTcraftHIM/Piik/internal/server/sfu/sfutest"
)
const testShareGeneration = "share_generation_12345678"
@@ -682,7 +682,7 @@ func captureRouteDebug(t *testing.T) *debugRecorder {
t.Helper()
recorder := &debugRecorder{}
previousLogger := slog.Default()
- t.Setenv("SCREENER_DEBUG", "route")
+ t.Setenv("PIIK_DEBUG", "route")
slog.SetDefault(slog.New(recorder))
t.Cleanup(func() {
slog.SetDefault(previousLogger)
@@ -693,7 +693,7 @@ func captureRouteDebug(t *testing.T) *debugRecorder {
func (d *debugRecorder) Enabled(context.Context, slog.Level) bool { return true }
func (d *debugRecorder) Handle(_ context.Context, record slog.Record) error {
- if record.Message != "screener-route" {
+ if record.Message != "piik-route" {
return nil
}
details := map[string]any{}
@@ -2075,7 +2075,7 @@ func TestRouterDebugFlagParsesLikeNodeDebug(t *testing.T) {
}
sort.Strings(keys)
for _, key := range keys {
- t.Setenv("SCREENER_DEBUG", key)
+ t.Setenv("PIIK_DEBUG", key)
if got := routeDebugFlag(key); got != cases[key] {
t.Fatalf("routeDebugFlag(%q) = %v, want %v", key, got, cases[key])
}
@@ -2083,7 +2083,7 @@ func TestRouterDebugFlagParsesLikeNodeDebug(t *testing.T) {
t.Fatalf("routeDebugEnabled with %q = %v, want %v", key, got, cases[key])
}
}
- t.Setenv("SCREENER_DEBUG", "")
+ t.Setenv("PIIK_DEBUG", "")
slog.SetDefault(slog.New(slog.NewTextHandler(io.Discard, &slog.HandlerOptions{Level: slog.LevelDebug})))
if !routeDebugEnabled() {
t.Fatal("the active diagnostic logger did not enable route events")
diff --git a/internal/server/signal/server.go b/internal/server/signal/server.go
index c6aadc62..5e6ab765 100644
--- a/internal/server/signal/server.go
+++ b/internal/server/signal/server.go
@@ -27,12 +27,12 @@ import (
"github.com/coder/websocket"
- "github.com/TNTcraftHIM/Screener/internal/server/config"
- "github.com/TNTcraftHIM/Screener/internal/server/ordered"
- "github.com/TNTcraftHIM/Screener/internal/server/protocol"
- "github.com/TNTcraftHIM/Screener/internal/server/room"
- "github.com/TNTcraftHIM/Screener/internal/server/route"
- "github.com/TNTcraftHIM/Screener/internal/server/sfu"
+ "github.com/TNTcraftHIM/Piik/internal/server/config"
+ "github.com/TNTcraftHIM/Piik/internal/server/ordered"
+ "github.com/TNTcraftHIM/Piik/internal/server/protocol"
+ "github.com/TNTcraftHIM/Piik/internal/server/room"
+ "github.com/TNTcraftHIM/Piik/internal/server/route"
+ "github.com/TNTcraftHIM/Piik/internal/server/sfu"
)
// Ceilings and option defaults ported from src/server/signaling.ts. The first
diff --git a/internal/server/signal/server_test.go b/internal/server/signal/server_test.go
index cdc165e6..914058c9 100644
--- a/internal/server/signal/server_test.go
+++ b/internal/server/signal/server_test.go
@@ -31,16 +31,16 @@ import (
"github.com/coder/websocket"
- "github.com/TNTcraftHIM/Screener/internal/server/config"
- "github.com/TNTcraftHIM/Screener/internal/server/protocol"
- "github.com/TNTcraftHIM/Screener/internal/server/room"
- "github.com/TNTcraftHIM/Screener/internal/server/sfu"
- "github.com/TNTcraftHIM/Screener/internal/server/sfu/sfutest"
+ "github.com/TNTcraftHIM/Piik/internal/server/config"
+ "github.com/TNTcraftHIM/Piik/internal/server/protocol"
+ "github.com/TNTcraftHIM/Piik/internal/server/room"
+ "github.com/TNTcraftHIM/Piik/internal/server/sfu"
+ "github.com/TNTcraftHIM/Piik/internal/server/sfu/sfutest"
)
const (
allowedOrigin = "http://allowed.test"
- siteAccessCookie = "screener-site-access=granted"
+ siteAccessCookie = "piik-site-access=granted"
defaultWait = 2 * time.Second
)
@@ -2512,7 +2512,7 @@ func TestSignalTerminatesStaleV12BeforeAuthentication(t *testing.T) {
invalidClient := openClient(t, h)
invalidClient.sendJSON(map[string]any{
"type": "authenticate",
- "protocol": "screener-v12",
+ "protocol": "piik-v12",
"roomId": h.room.RoomID,
"role": protocol.RoleViewer,
"clientId": "invalid-client",
diff --git a/internal/server/signal/session.go b/internal/server/signal/session.go
index 0dfd7fe9..3c4b4fdd 100644
--- a/internal/server/signal/session.go
+++ b/internal/server/signal/session.go
@@ -12,7 +12,7 @@ import (
"github.com/coder/websocket"
- "github.com/TNTcraftHIM/Screener/internal/server/protocol"
+ "github.com/TNTcraftHIM/Piik/internal/server/protocol"
)
// authenticatedSession is AuthenticatedSession. Handlers compare it by
diff --git a/licenses/README.md b/licenses/README.md
index dcfdb626..0300cca0 100644
--- a/licenses/README.md
+++ b/licenses/README.md
@@ -1,6 +1,6 @@
# Third-Party Licenses
-Screener-owned code uses the root [MIT license](../LICENSE). Dependencies retain
+Piik-owned code uses the root [MIT license](../LICENSE). Dependencies retain
their own licenses; MIT does not replace their copyright notices or terms.
The [pinned source index](./upstream.json) records exact upstream commits and
@@ -13,7 +13,7 @@ text 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
third-party license texts; these dependencies do not become MIT-licensed merely
-because Screener's adapter is MIT-licensed.
+because Piik's adapter is MIT-licensed.
Linux packages that include the native capture binary include
`linux-system-dependencies.txt`, the full LGPL-3.0-only text for libportal, and
the full GPL-3.0 text referenced by that license. The system shared libraries
@@ -29,7 +29,7 @@ Client package also carries the pinned Cloudflared notices. Missing license
texts or changed pinned contents stop packaging.
LiveKit media-core packages are referenced as an unmodified, version-pinned Go
-module under Apache-2.0. Original Screener adapters remain MIT; adapted upstream
+module under Apache-2.0. Original Piik adapters remain MIT; adapted upstream
probe orchestration retains its Apache-2.0 attribution in the source. Redistribution retains
the module's license and applicable notices through the same Go notice collector.
Any later copied or modified upstream file must retain its attribution and mark
diff --git a/licenses/linux-system-dependencies.txt b/licenses/linux-system-dependencies.txt
index 5581d5d9..21aa1d8f 100644
--- a/licenses/linux-system-dependencies.txt
+++ b/licenses/linux-system-dependencies.txt
@@ -1,7 +1,7 @@
Linux capture dependencies (not bundled)
The Linux native capture process dynamically uses the distribution's XDG
-Desktop Portal/libportal and GStreamer packages. Screener does not redistribute
+Desktop Portal/libportal and GStreamer packages. Piik does not redistribute
those shared libraries. The Client package carries the applicable license texts
for this linked capture path.
@@ -16,4 +16,4 @@ https://gstreamer.freedesktop.org/documentation/frequently-asked-questions/licen
https://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 Screener Client package.
+encoder services. Those services are not part of the Piik Client package.
diff --git a/native/capture/darwin/README.md b/native/capture/darwin/README.md
index 93d65049..74153d1a 100644
--- a/native/capture/darwin/README.md
+++ b/native/capture/darwin/README.md
@@ -13,8 +13,8 @@ Build on Apple Silicon macOS 13 or newer:
```sh
sh native/capture/darwin/build.sh /outside/repository/build
-/outside/repository/build/screener-client-capture --self-test
-/outside/repository/build/screener-client-capture --probe
+/outside/repository/build/piik-client-capture --self-test
+/outside/repository/build/piik-client-capture --probe
```
`--self-test` encodes one in-memory 420v frame through the same hardware-only
diff --git a/native/capture/darwin/build.sh b/native/capture/darwin/build.sh
index 97aca0c8..e5cd22a4 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/screener-client-capture"
+ -o "$output/piik-client-capture"
diff --git a/native/capture/darwin/main.swift b/native/capture/darwin/main.swift
index bd2fa727..9af0e5e5 100644
--- a/native/capture/darwin/main.swift
+++ b/native/capture/darwin/main.swift
@@ -555,7 +555,7 @@ private final class HardwareEncoder {
self.layer = layer
self.onActive = onActive
self.onFailure = onFailure ?? { done.signal($0) }
- self.queue = DispatchQueue(label: "screener.capture.encoder.\(layer)")
+ self.queue = DispatchQueue(label: "piik.capture.encoder.\(layer)")
desiredBitrate = profile.bitrate
currentBitrate = profile.bitrate
let specification = [
@@ -1661,7 +1661,7 @@ private func capture(_ arguments: [String]) async throws {
let done = StopSignal()
let encoders = try EncoderGroup(writer: writer, done: done, profile: profile, outputs: profiles)
defer { encoders.close() }
- let captureQueue = DispatchQueue(label: "screener.capture.video")
+ let captureQueue = DispatchQueue(label: "piik.capture.video")
let output = CaptureOutput(
encoders: encoders,
done: done,
@@ -1732,7 +1732,7 @@ private func captureAudio(_ arguments: [String]) async throws {
configuration.excludesCurrentProcessAudio = true
configuration.sampleRate = 48_000
configuration.channelCount = 2
- let queue = DispatchQueue(label: "screener.capture.audio")
+ let queue = DispatchQueue(label: "piik.capture.audio")
let stream = SCStream(
filter: filter,
configuration: configuration,
@@ -1753,7 +1753,7 @@ private func captureAudio(_ arguments: [String]) async throws {
}
@main
-private struct ScreenerCapture {
+private struct PiikCapture {
static func main() async {
do {
let arguments = CommandLine.arguments
@@ -1771,7 +1771,7 @@ private struct ScreenerCapture {
try await capture(arguments)
}
} catch {
- let message = "Screener capture unavailable: \(error)\n"
+ let message = "Piik capture unavailable: \(error)\n"
FileHandle.standardError.write(message.data(using: .utf8) ?? Data())
Darwin.exit(2)
}
diff --git a/native/capture/linux/README.md b/native/capture/linux/README.md
index ad60cbfd..6e49579a 100644
--- a/native/capture/linux/README.md
+++ b/native/capture/linux/README.md
@@ -4,7 +4,7 @@ The Linux sidecar keeps the shared Native Client contract while delegating
desktop integration to the standard Linux media stack. XDG Desktop Portal owns
the screen/window choice, PipeWire supplies the selected stream, and GStreamer
selects an installed element classified as a hardware H.264 video encoder.
-Screener adds only the current product profile, Annex-B access-unit framing,
+Piik adds only the current product profile, Annex-B access-unit framing,
key-frame requests, and the bounded `SMED` output protocol.
The Portal restore token remains in the active share process and lets a live
diff --git a/native/capture/linux/build.sh b/native/capture/linux/build.sh
index 12d4fb2a..7a1be654 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/screener-client-capture"
+ -o "$output/piik-client-capture"
diff --git a/native/capture/linux/main.c b/native/capture/linux/main.c
index 102a7aa6..0f2268a0 100644
--- a/native/capture/linux/main.c
+++ b/native/capture/linux/main.c
@@ -291,7 +291,7 @@ static gboolean video_stack_available(void) {
for (guint index = 0; index < G_N_ELEMENTS(required); ++index) {
if (!has_factory(required[index])) return FALSE;
}
- return screener_portal_available();
+ return piik_portal_available();
}
static gboolean audio_stack_available(void) {
@@ -1000,7 +1000,7 @@ stopped:
char *failure = g_strdup(run->failure);
g_mutex_unlock(&run->lock);
if (failure != NULL) {
- fprintf(stderr, "Screener capture unavailable: %s\n", failure);
+ fprintf(stderr, "Piik capture unavailable: %s\n", failure);
g_free(failure);
return 2;
}
@@ -1022,10 +1022,10 @@ static int capture_video(int count, char **values) {
}
const EncoderInfo *encoder_info = g_ptr_array_index(encoders, encoder_index);
GError *error = NULL;
- ScreenerPortalCapture portal = {.pipewire_fd = -1};
- if (!encoded && !screener_portal_capture_open(
- g_getenv("SCREENER_XDP_RESTORE_TOKEN"), &portal, &error)) {
- fprintf(stderr, "Screener capture unavailable: %s\n",
+ PiikPortalCapture portal = {.pipewire_fd = -1};
+ if (!encoded && !piik_portal_capture_open(
+ g_getenv("PIIK_XDP_RESTORE_TOKEN"), &portal, &error)) {
+ fprintf(stderr, "Piik capture unavailable: %s\n",
error == NULL ? "screen selection failed" : error->message);
g_clear_error(&error);
g_ptr_array_unref(encoders);
@@ -1063,11 +1063,11 @@ static int capture_video(int count, char **values) {
GstElement *pipeline = gst_parse_launch(pipeline_text->str, &error);
g_string_free(pipeline_text, TRUE);
if (pipeline == NULL || error != NULL) {
- fprintf(stderr, "Screener capture unavailable: %s\n",
+ fprintf(stderr, "Piik capture unavailable: %s\n",
error == NULL ? "video pipeline failed" : error->message);
g_clear_error(&error);
if (pipeline != NULL) gst_object_unref(pipeline);
- screener_portal_capture_close(&portal);
+ piik_portal_capture_close(&portal);
g_ptr_array_unref(encoders);
return 2;
}
@@ -1099,7 +1099,7 @@ static int capture_video(int count, char **values) {
output->encoder = gst_bin_get_by_name(GST_BIN(pipeline), name);
g_free(name);
if (output->encoder == NULL || !configure_encoder(output)) {
- fprintf(stderr, "Screener capture unavailable: hardware encoder is incompatible\n");
+ fprintf(stderr, "Piik capture unavailable: hardware encoder is incompatible\n");
write_frame(6, 0, (guint8)index, 0, 0, 0, 0,
(const guint8 *)"hardware encoder configuration failed",
strlen("hardware encoder configuration failed"));
@@ -1154,7 +1154,7 @@ cleanup:
g_main_loop_unref(run.loop);
g_mutex_clear(&run.lock);
gst_object_unref(pipeline);
- screener_portal_capture_close(&portal);
+ piik_portal_capture_close(&portal);
g_ptr_array_unref(encoders);
return result;
}
@@ -1210,6 +1210,6 @@ int main(int argc, char **argv) {
if (argc > 1 && strcmp(argv[1], "--capture-audio") == 0) {
return capture_audio(argc, argv);
}
- fprintf(stderr, "Screener capture unavailable: unsupported command\n");
+ fprintf(stderr, "Piik capture unavailable: unsupported command\n");
return 2;
}
diff --git a/native/capture/linux/portal.c b/native/capture/linux/portal.c
index daaf172b..586e8cd8 100644
--- a/native/capture/linux/portal.c
+++ b/native/capture/linux/portal.c
@@ -39,7 +39,7 @@ static void session_created(GObject *source, GAsyncResult *result,
xdp_session_start(request->session, NULL, NULL, session_started, request);
}
-gboolean screener_portal_available(void) {
+gboolean piik_portal_available(void) {
GError *error = NULL;
GDBusConnection *bus = g_bus_get_sync(G_BUS_TYPE_SESSION, NULL, &error);
if (bus == NULL) {
@@ -62,11 +62,11 @@ gboolean screener_portal_available(void) {
return available;
}
-gboolean screener_portal_capture_open(const char *restore_token,
- ScreenerPortalCapture *capture,
+gboolean piik_portal_capture_open(const char *restore_token,
+ PiikPortalCapture *capture,
GError **error) {
g_return_val_if_fail(capture != NULL, FALSE);
- *capture = (ScreenerPortalCapture){.pipewire_fd = -1};
+ *capture = (PiikPortalCapture){.pipewire_fd = -1};
capture->portal = xdp_portal_initable_new(error);
if (capture->portal == NULL) return FALSE;
@@ -85,7 +85,7 @@ gboolean screener_portal_capture_open(const char *restore_token,
g_main_loop_unref(request.loop);
if (request.error != NULL) {
g_propagate_error(error, request.error);
- screener_portal_capture_close(capture);
+ piik_portal_capture_close(capture);
return FALSE;
}
capture->session = request.session;
@@ -94,7 +94,7 @@ gboolean screener_portal_capture_open(const char *restore_token,
if (streams == NULL) {
g_set_error_literal(error, G_IO_ERROR, G_IO_ERROR_FAILED,
"portal returned no screen-cast streams");
- screener_portal_capture_close(capture);
+ piik_portal_capture_close(capture);
return FALSE;
}
GVariantIter iterator;
@@ -114,7 +114,7 @@ gboolean screener_portal_capture_open(const char *restore_token,
if (!found || capture->node_id == 0) {
g_set_error_literal(error, G_IO_ERROR, G_IO_ERROR_FAILED,
"portal returned an invalid PipeWire stream");
- screener_portal_capture_close(capture);
+ piik_portal_capture_close(capture);
return FALSE;
}
@@ -122,7 +122,7 @@ gboolean screener_portal_capture_open(const char *restore_token,
if (capture->pipewire_fd < 0) {
g_set_error_literal(error, G_IO_ERROR, G_IO_ERROR_FAILED,
"portal could not open its PipeWire remote");
- screener_portal_capture_close(capture);
+ piik_portal_capture_close(capture);
return FALSE;
}
if (capture->target_object == NULL) {
@@ -132,7 +132,7 @@ gboolean screener_portal_capture_open(const char *restore_token,
return TRUE;
}
-void screener_portal_capture_close(ScreenerPortalCapture *capture) {
+void piik_portal_capture_close(PiikPortalCapture *capture) {
if (capture == NULL) return;
if (capture->pipewire_fd >= 0) close(capture->pipewire_fd);
capture->pipewire_fd = -1;
diff --git a/native/capture/linux/portal.h b/native/capture/linux/portal.h
index 5b71d86b..f4928c76 100644
--- a/native/capture/linux/portal.h
+++ b/native/capture/linux/portal.h
@@ -1,5 +1,5 @@
-#ifndef SCREENER_LINUX_PORTAL_H
-#define SCREENER_LINUX_PORTAL_H
+#ifndef PIIK_LINUX_PORTAL_H
+#define PIIK_LINUX_PORTAL_H
#include <glib.h>
#include <libportal/portal.h>
@@ -11,12 +11,12 @@ typedef struct {
char *target_object;
int pipewire_fd;
char *restore_token;
-} ScreenerPortalCapture;
+} PiikPortalCapture;
-gboolean screener_portal_available(void);
-gboolean screener_portal_capture_open(const char *restore_token,
- ScreenerPortalCapture *capture,
+gboolean piik_portal_available(void);
+gboolean piik_portal_capture_open(const char *restore_token,
+ PiikPortalCapture *capture,
GError **error);
-void screener_portal_capture_close(ScreenerPortalCapture *capture);
+void piik_portal_capture_close(PiikPortalCapture *capture);
#endif
diff --git a/native/capture/windows/README.md b/native/capture/windows/README.md
index 1a44906e..8fadfa5e 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 Screener Client. It
+This isolated Windows process is the capture candidate for Piik Client. It
enumerates local displays and visible top-level windows, binds each window to
its PID and process creation time, and has independent modes for:
@@ -36,7 +36,7 @@ npm run check:client-capture
The implementation follows Microsoft's MIT-licensed reference samples and
official API contracts without copying their WIL framework. The retained MF
-fixture compiles the same encoder source with `SCREENER_H264_FIXTURE`; there is
+fixture compiles the same encoder source with `PIIK_H264_FIXTURE`; there is
not a second product MFT implementation.
Shared local outputs use stock WebRTC source/encoder adaptation. H264 keeps
native NV12 surfaces, while WebRTC VP8 reads back into I420. The existing capture
diff --git a/native/capture/windows/adaptive_encoder.cpp b/native/capture/windows/adaptive_encoder.cpp
index f8a0b0bc..ffdf79cb 100644
--- a/native/capture/windows/adaptive_encoder.cpp
+++ b/native/capture/windows/adaptive_encoder.cpp
@@ -31,7 +31,7 @@
#include "video/send_statistics_proxy.h"
#include "video/video_stream_encoder.h"
-namespace screener::capture::windows {
+namespace piik::capture::windows {
namespace {
template <typename F>
@@ -163,7 +163,7 @@ class HardwareEncoder final : public webrtc::VideoEncoder {
public:
HardwareEncoder(const webrtc::Environment& env, VideoProfile ceiling,
AdaptiveEncoder::Factory create,
- std::unique_ptr<screener::capture::windows::VideoEncoder> initial,
+ std::unique_ptr<piik::capture::windows::VideoEncoder> initial,
Failure& failure)
: env_(env), ceiling_(ceiling), create_(std::move(create)),
initial_(std::move(initial)), failure_(failure) {
@@ -325,7 +325,7 @@ class HardwareEncoder final : public webrtc::VideoEncoder {
const webrtc::Environment env_;
const VideoProfile ceiling_;
AdaptiveEncoder::Factory create_;
- std::unique_ptr<screener::capture::windows::VideoEncoder> initial_, encoder_;
+ std::unique_ptr<piik::capture::windows::VideoEncoder> initial_, encoder_;
Failure& failure_;
VideoProfile profile_;
webrtc::EncodedImageCallback* callback_ = nullptr;
@@ -600,7 +600,7 @@ class AdaptiveEncoder::Impl final : public webrtc::VideoSourceInterface<webrtc::
const int output_index_;
const bool debug_ = [] {
wchar_t value[2]{};
- return GetEnvironmentVariableW(L"SCREENER_CAPTURE_DEBUG", value, 2) == 1 && value[0] == L'1';
+ return GetEnvironmentVariableW(L"PIIK_CAPTURE_DEBUG", value, 2) == 1 && value[0] == L'1';
}();
std::optional<INT64> last_stats_ms_;
ComPtr<ID3D11Device> device_;
@@ -648,4 +648,4 @@ std::optional<AdaptiveAccessUnit> AdaptiveEncoder::Encode(FrameProducer produce,
key_frame, bitrate);
}
-} // namespace screener::capture::windows
+} // namespace piik::capture::windows
diff --git a/native/capture/windows/adaptive_encoder.h b/native/capture/windows/adaptive_encoder.h
index 1bc389a8..7a9f8628 100644
--- a/native/capture/windows/adaptive_encoder.h
+++ b/native/capture/windows/adaptive_encoder.h
@@ -5,7 +5,7 @@
#include <functional>
#include <memory>
-namespace screener::capture::windows {
+namespace piik::capture::windows {
struct AdaptiveAccessUnit final {
EncodedAccessUnit access_unit;
@@ -36,4 +36,4 @@ class AdaptiveEncoder final {
std::unique_ptr<Impl> impl_;
};
-} // namespace screener::capture::windows
+} // namespace piik::capture::windows
diff --git a/native/capture/windows/build.ps1 b/native/capture/windows/build.ps1
index ff809699..31d40ace 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 'screener-client-capture.exe'
+$executablePath = Join-Path $outputPath 'piik-client-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/capture/windows/capture_control.h b/native/capture/windows/capture_control.h
index a56a0e1d..d1d3cd4a 100644
--- a/native/capture/windows/capture_control.h
+++ b/native/capture/windows/capture_control.h
@@ -6,7 +6,7 @@
#include <string>
#include <string_view>
-namespace screener::capture {
+namespace piik::capture {
constexpr int kMaxOutputs = 6;
@@ -55,4 +55,4 @@ class CaptureControls final {
}
};
-} // namespace screener::capture
+} // namespace piik::capture
diff --git a/native/capture/windows/capture_control.test.cpp b/native/capture/windows/capture_control.test.cpp
index 5d917e0a..4959ef4a 100644
--- a/native/capture/windows/capture_control.test.cpp
+++ b/native/capture/windows/capture_control.test.cpp
@@ -15,10 +15,10 @@
void CheckOutputPipe() {
HANDLE input = nullptr, output = nullptr;
assert(CreatePipe(&input, &output, nullptr, 4096));
- screener::capture::ProtocolWriter writer(output);
+ piik::capture::ProtocolWriter writer(output);
assert(SUCCEEDED(writer.WriteBegin(333'333, 333'333)));
const std::array<BYTE, 3> payload{1, 2, 3};
- assert(SUCCEEDED(writer.Write(screener::capture::OutputKind::vp8, 1,
+ assert(SUCCEEDED(writer.Write(piik::capture::OutputKind::vp8, 1,
333'333, 333'333, payload.data(), static_cast<DWORD>(payload.size()), 1, 320, 180)));
std::array<BYTE, 67> data{};
DWORD received = 0;
@@ -30,7 +30,7 @@ void CheckOutputPipe() {
std::vector<BYTE> large(256 * 1024, 128);
HRESULT result = S_OK;
std::thread blocked([&]() {
- result = writer.Write(screener::capture::OutputKind::vp8, 0,
+ result = writer.Write(piik::capture::OutputKind::vp8, 0,
666'666, 333'333, large.data(), static_cast<DWORD>(large.size()), 1, 320, 180);
});
const auto deadline = std::chrono::steady_clock::now() + std::chrono::seconds(2);
@@ -54,7 +54,7 @@ void CheckOutputPipe() {
void CheckWorkers() {
struct Input { uint32_t index; };
- using Mailbox = screener::capture::OutputMailbox<Input>;
+ using Mailbox = piik::capture::OutputMailbox<Input>;
std::array<Mailbox, 3> mailboxes{Mailbox(90'000), Mailbox(300'000), Mailbox(1'200'000)};
std::array<std::thread, 3> workers;
std::array<uint32_t, 3> last{}, count{}, retired{};
@@ -71,7 +71,7 @@ void CheckWorkers() {
const uint32_t width = 160u << layer;
const uint32_t height = 90u << layer;
std::vector<uint8_t> pixels(static_cast<size_t>(width) * height * 3 / 2, 128);
- std::unique_ptr<screener::capture::Vp8Encoder> encoder;
+ std::unique_ptr<piik::capture::Vp8Encoder> encoder;
for (;;) {
const auto work = mailboxes[layer].Take();
if (work.action == Mailbox::Action::stop) break;
@@ -86,7 +86,7 @@ void CheckWorkers() {
entered.set_value();
released.wait();
}
- if (!encoder) encoder = std::make_unique<screener::capture::Vp8Encoder>(width, height, 30, work.bitrate);
+ if (!encoder) encoder = std::make_unique<piik::capture::Vp8Encoder>(width, height, 30, work.bitrate);
encoder->SetBitrate(work.bitrate);
const auto output = encoder->Encode(pixels.data(), width,
static_cast<uint64_t>(work.input->index) * 10'000'000 / 30, work.recovery);
@@ -138,7 +138,7 @@ void CheckWorkers() {
}
void CheckDroppedRecoveryInput() {
- using Mailbox = screener::capture::OutputMailbox<int>;
+ using Mailbox = piik::capture::OutputMailbox<int>;
Mailbox mailbox(90'000);
mailbox.Submit(std::make_shared<int>(1));
const auto dropped = mailbox.Take();
@@ -155,7 +155,7 @@ void CheckDroppedRecoveryInput() {
}
void CheckIndependentActivation() {
- using Mailbox = screener::capture::OutputMailbox<int>;
+ using Mailbox = piik::capture::OutputMailbox<int>;
Mailbox original(300'000), extra(90'000, false);
original.Submit(std::make_shared<int>(1));
const auto original_frame = original.Take();
@@ -189,7 +189,7 @@ void CheckInputEnvelopes() {
control[5] = 7;
control[31] = 4;
control += "K -1";
- screener::capture::InputEnvelopes parser;
+ piik::capture::InputEnvelopes parser;
assert(parser.Feed(std::string_view(control).substr(0, 11)).empty());
assert(!parser.Empty());
const auto controls = parser.Feed(std::string_view(control).substr(11));
@@ -203,7 +203,7 @@ void CheckInputEnvelopes() {
}
int main() {
- using screener::capture::CaptureControls;
+ using piik::capture::CaptureControls;
assert(CaptureControls::Parse("K -1").layer == -1);
assert(CaptureControls::Parse("A 5 1").layer == 5);
assert(CaptureControls::Parse("A 5 1").value == 1);
@@ -222,8 +222,8 @@ int main() {
catch (const std::runtime_error&) { rejected = true; }
assert(rejected);
- screener::capture::Vp8Encoder encoder(160, 90, 30, 90'000);
- screener::capture::Vp8Decoder decoder;
+ piik::capture::Vp8Encoder encoder(160, 90, 30, 90'000);
+ piik::capture::Vp8Decoder decoder;
std::vector<uint8_t> pixels(160 * 90 * 3 / 2, 128);
for (uint32_t frame = 0; frame < 12; ++frame) {
if (frame == 4) encoder.SetBitrate(30'000);
diff --git a/native/capture/windows/capture_geometry.h b/native/capture/windows/capture_geometry.h
index 66f7368c..3c1bff3d 100644
--- a/native/capture/windows/capture_geometry.h
+++ b/native/capture/windows/capture_geometry.h
@@ -5,7 +5,7 @@
#include <algorithm>
#include <cmath>
-namespace screener::capture {
+namespace piik::capture {
inline SIZE DisplayedFrameSize(SIZE captured, SIZE desktop, SIZE target,
DISPLAYCONFIG_SCALING scaling,
@@ -40,4 +40,4 @@ inline RECT FitFrameRect(SIZE content, SIZE output) {
return {left, top, left + width, top + height};
}
-} // namespace screener::capture
+} // namespace piik::capture
diff --git a/native/capture/windows/capture_geometry.test.cpp b/native/capture/windows/capture_geometry.test.cpp
index 4bad7be4..766d11ab 100644
--- a/native/capture/windows/capture_geometry.test.cpp
+++ b/native/capture/windows/capture_geometry.test.cpp
@@ -5,7 +5,7 @@
#include <iostream>
int main() {
- using namespace screener::capture;
+ using namespace piik::capture;
const SIZE captured{1280, 960};
const SIZE monitor{1920, 1080};
const auto presentation = [&](DISPLAYCONFIG_SCALING scaling,
diff --git a/native/capture/windows/capture_input.h b/native/capture/windows/capture_input.h
index 1acb8b7e..8d56f29d 100644
--- a/native/capture/windows/capture_input.h
+++ b/native/capture/windows/capture_input.h
@@ -10,7 +10,7 @@
#include <utility>
#include <vector>
-namespace screener::capture {
+namespace piik::capture {
struct InputEnvelope final {
uint8_t kind = 0;
@@ -98,4 +98,4 @@ class InputEnvelopes final {
InputEnvelope frame_;
};
-} // namespace screener::capture
+} // namespace piik::capture
diff --git a/native/capture/windows/capture_output.h b/native/capture/windows/capture_output.h
index 50bd0f17..8db35417 100644
--- a/native/capture/windows/capture_output.h
+++ b/native/capture/windows/capture_output.h
@@ -11,7 +11,7 @@
#include <mutex>
#include <string>
-namespace screener::capture {
+namespace piik::capture {
constexpr DWORD kMaxProductAccessUnitBytes = 4 * 1024 * 1024;
constexpr DWORD kMaxStatusBytes = 4 * 1024;
@@ -85,4 +85,4 @@ class ProtocolWriter final {
std::atomic<bool> stopped_{false};
};
-} // namespace screener::capture
+} // namespace piik::capture
diff --git a/native/capture/windows/capture_target.cpp b/native/capture/windows/capture_target.cpp
index cd544b32..c5a2a20e 100644
--- a/native/capture/windows/capture_target.cpp
+++ b/native/capture/windows/capture_target.cpp
@@ -27,7 +27,7 @@
#include <utility>
#include <vector>
-namespace screener::capture {
+namespace piik::capture {
namespace {
using Microsoft::WRL::ComPtr;
@@ -37,7 +37,7 @@ constexpr LONG kPreviewWidth = 320;
constexpr LONG kPreviewHeight = 180;
constexpr LONG kMaxPreviewSourceDimension = 2'048;
constexpr DWORD kBitmapHeaderBytes = 54;
-constexpr wchar_t kPreviewWindowClass[] = L"ScreenerPreviewWindow";
+constexpr wchar_t kPreviewWindowClass[] = L"PiikPreviewWindow";
SIZE ReadDisplayPresentation(const wchar_t* device_name, SIZE captured) {
UINT32 path_count = 0;
@@ -1051,4 +1051,4 @@ HRESULT ValidateDisplayTarget(UINT64 source_id) {
: HRESULT_FROM_WIN32(ERROR_INVALID_MONITOR_HANDLE);
}
-} // namespace screener::capture
+} // namespace piik::capture
diff --git a/native/capture/windows/capture_target.h b/native/capture/windows/capture_target.h
index f14f232b..94898b11 100644
--- a/native/capture/windows/capture_target.h
+++ b/native/capture/windows/capture_target.h
@@ -4,7 +4,7 @@
#include <cstdint>
-namespace screener::capture {
+namespace piik::capture {
enum class TargetKind { window, display };
@@ -32,4 +32,4 @@ class CapturePresentation final {
SIZE presentation_{};
};
-} // namespace screener::capture
+} // namespace piik::capture
diff --git a/native/capture/windows/encoded_group.fixture.cpp b/native/capture/windows/encoded_group.fixture.cpp
index 880d66ea..a8d82de5 100644
--- a/native/capture/windows/encoded_group.fixture.cpp
+++ b/native/capture/windows/encoded_group.fixture.cpp
@@ -12,7 +12,7 @@
namespace {
using Clock = std::chrono::steady_clock;
-using screener::capture::Vp8Encoder;
+using piik::capture::Vp8Encoder;
struct Profile { uint32_t width, height, bitrate; };
// Codec fixtures, not product presets. Layers are L=0, M=1, H=2.
constexpr std::array<Profile, 3> kProfiles{{
@@ -34,7 +34,7 @@ void DrawFrame(std::vector<uint8_t>& pixels, Profile profile, uint32_t frame) {
}
void WriteFrame(uint32_t index, int layer, Profile profile, uint64_t pts,
- const screener::capture::Vp8Frame& packet) {
+ const piik::capture::Vp8Frame& packet) {
std::cout << "{\"FrameIndex\":" << index << ",\"Layer\":" << layer
<< ",\"Width\":" << profile.width << ",\"Height\":" << profile.height
<< ",\"PTS\":" << pts << ",\"Recovery\":"
diff --git a/native/capture/windows/encoded_variants.probe.cpp b/native/capture/windows/encoded_variants.probe.cpp
index 675ccde1..38f3f17d 100644
--- a/native/capture/windows/encoded_variants.probe.cpp
+++ b/native/capture/windows/encoded_variants.probe.cpp
@@ -21,7 +21,7 @@
#endif
using Clock = std::chrono::steady_clock;
-using screener::capture::Vp8Encoder;
+using piik::capture::Vp8Encoder;
namespace {
diff --git a/native/capture/windows/h264_decoder.h b/native/capture/windows/h264_decoder.h
index d06e07b5..51b8dde9 100644
--- a/native/capture/windows/h264_decoder.h
+++ b/native/capture/windows/h264_decoder.h
@@ -16,7 +16,7 @@
#include <string>
#include <utility>
-namespace screener::capture {
+namespace piik::capture {
// One inbox decoder owns the compressed reference chain. Consumers must finish
// copying/retaining an output sample before the callback returns.
@@ -168,4 +168,4 @@ class H264Decoder final {
bool configured_ = false;
};
-} // namespace screener::capture
+} // namespace piik::capture
diff --git a/native/capture/windows/h264_encoder.cpp b/native/capture/windows/h264_encoder.cpp
index d829bbea..44988302 100644
--- a/native/capture/windows/h264_encoder.cpp
+++ b/native/capture/windows/h264_encoder.cpp
@@ -10,7 +10,7 @@
#include <algorithm>
#include <thread>
-namespace screener::capture::windows {
+namespace piik::capture::windows {
namespace {
constexpr DWORD kMaxEncodedSampleBytes = 4 * 1024 * 1024;
@@ -743,4 +743,4 @@ void LiveEncoder::WaitForInput(EncoderClock::time_point probe_deadline) {
}
}
-} // namespace screener::capture::windows
+} // namespace piik::capture::windows
diff --git a/native/capture/windows/h264_encoder.h b/native/capture/windows/h264_encoder.h
index e658b4d1..9fd0f62a 100644
--- a/native/capture/windows/h264_encoder.h
+++ b/native/capture/windows/h264_encoder.h
@@ -23,11 +23,11 @@
#include <utility>
#include <vector>
-namespace screener::capture {
+namespace piik::capture {
enum class OutputKind : UINT8;
}
-namespace screener::capture::windows {
+namespace piik::capture::windows {
using Microsoft::WRL::ComPtr;
@@ -250,4 +250,4 @@ class LiveEncoder final : public VideoEncoder {
bool started_ = false;
};
-} // namespace screener::capture::windows
+} // namespace piik::capture::windows
diff --git a/native/capture/windows/main.cpp b/native/capture/windows/main.cpp
index 22d0ddae..ad6bf9d2 100644
--- a/native/capture/windows/main.cpp
+++ b/native/capture/windows/main.cpp
@@ -13,7 +13,7 @@
#include <mfidl.h>
#include <mftransform.h>
#include <wmcodecdsp.h>
-#ifdef SCREENER_H264_FIXTURE
+#ifdef PIIK_H264_FIXTURE
#include <pdh.h>
#include <pdhmsg.h>
#endif
@@ -33,7 +33,7 @@
#include "capture_geometry.h"
#include "process_audio.h"
#include "h264_encoder.h"
-#ifndef SCREENER_H264_FIXTURE
+#ifndef PIIK_H264_FIXTURE
#include "adaptive_encoder.h"
#include "capture_control.h"
#include "capture_input.h"
@@ -85,10 +85,10 @@ IGraphicsCaptureSession5 : public IInspectable {
namespace {
-using namespace screener::capture::windows;
+using namespace piik::capture::windows;
constexpr LONGLONG kFastCaptureUpdateInterval100ns = 40'000;
-#ifdef SCREENER_H264_FIXTURE
+#ifdef PIIK_H264_FIXTURE
constexpr UINT32 kFrameRate = kDefaultVideoProfile.frame_rate;
constexpr UINT32 kBitRate = kDefaultVideoProfile.bit_rate;
constexpr UINT32 kGopFrames = kFrameRate * 2;
@@ -186,7 +186,7 @@ ComPtr<ID3D11Texture2D> CreateSyntheticTexture(
return texture;
}
-#ifdef SCREENER_H264_FIXTURE
+#ifdef PIIK_H264_FIXTURE
ComPtr<IMFSample> CreateInputSample(ID3D11Device* device, UINT32 frame_index) {
auto texture = CreateSyntheticTexture(device, frame_index);
ComPtr<IMFMediaBuffer> buffer;
@@ -206,7 +206,7 @@ ComPtr<IMFSample> CreateInputSample(ID3D11Device* device, UINT32 frame_index) {
}
#endif
-#ifdef SCREENER_H264_FIXTURE
+#ifdef PIIK_H264_FIXTURE
ULONGLONG ProcessCpu100ns() {
FILETIME created = {};
FILETIME exited = {};
@@ -367,7 +367,7 @@ struct RunEvidence final {
};
#endif
-#ifdef SCREENER_H264_FIXTURE
+#ifdef PIIK_H264_FIXTURE
bool IsRecoveryFrame(UINT32 frame) {
return frame % kGopFrames == 0;
}
@@ -635,10 +635,10 @@ UINT ParseIndex(const wchar_t* value, const std::string& stage) {
}
}
-#ifndef SCREENER_H264_FIXTURE
-using screener::capture::kMaxProductAccessUnitBytes;
-using screener::capture::OutputKind;
-using screener::capture::ProtocolWriter;
+#ifndef PIIK_H264_FIXTURE
+using piik::capture::kMaxProductAccessUnitBytes;
+using piik::capture::OutputKind;
+using piik::capture::ProtocolWriter;
class UniqueHandle final {
public:
@@ -713,7 +713,7 @@ class FrameConverter final {
RECT source_rect = {0, 0, static_cast<LONG>(width),
static_cast<LONG>(height)};
- RECT target_rect = screener::capture::FitFrameRect(
+ RECT target_rect = piik::capture::FitFrameRect(
presentation, {static_cast<LONG>(profile_.width),
static_cast<LONG>(profile_.height)});
RECT output_rect = {0, 0, static_cast<LONG>(profile_.width),
@@ -841,7 +841,7 @@ std::string JSONString(const std::string& value) {
class InputReader final {
public:
- std::vector<screener::capture::InputEnvelope> Read(bool blocking = false) {
+ std::vector<piik::capture::InputEnvelope> Read(bool blocking = false) {
HANDLE input = GetStdHandle(STD_INPUT_HANDLE);
DWORD available = 0;
if (input == INVALID_HANDLE_VALUE || input == nullptr) return {};
@@ -862,20 +862,20 @@ class InputReader final {
}
private:
- std::vector<screener::capture::InputEnvelope> End() {
+ std::vector<piik::capture::InputEnvelope> End() {
if (!envelopes_.Empty()) Fail("capture-input-eof", "native input ended within an envelope");
- screener::capture::InputEnvelope stop;
+ piik::capture::InputEnvelope stop;
stop.kind = 7;
stop.data = {'Q'};
return {std::move(stop)};
}
- screener::capture::InputEnvelopes envelopes_;
+ piik::capture::InputEnvelopes envelopes_;
};
class ControlReader final {
public:
- std::vector<screener::capture::CaptureControl> Read() {
- std::vector<screener::capture::CaptureControl> controls;
+ std::vector<piik::capture::CaptureControl> Read() {
+ std::vector<piik::capture::CaptureControl> controls;
for (const auto& envelope : input_.Read()) controls.push_back(envelope.Control());
return controls;
}
@@ -910,17 +910,17 @@ UINT64 ParseNonNegativeUint64(const wchar_t* value, const std::string& stage) {
}
}
-screener::capture::TargetKind ParseTargetKind(const wchar_t* value) {
+piik::capture::TargetKind ParseTargetKind(const wchar_t* value) {
const std::wstring kind(value);
- if (kind == L"window") return screener::capture::TargetKind::window;
- if (kind == L"display") return screener::capture::TargetKind::display;
+ if (kind == L"window") return piik::capture::TargetKind::window;
+ if (kind == L"display") return piik::capture::TargetKind::display;
Fail("argument-target-kind", "capture target kind is unsupported");
}
struct ProductArguments final {
enum class Mode { list, probe, preview, audio, video, encoded } mode = Mode::list;
- screener::capture::TargetKind target_kind =
- screener::capture::TargetKind::window;
+ piik::capture::TargetKind target_kind =
+ piik::capture::TargetKind::window;
DWORD pid = 0;
UINT64 creation_time = 0;
UINT64 source_id = 0;
@@ -1000,7 +1000,7 @@ ProductArguments ParseProductArguments(int count, wchar_t** values) {
if (count == 5 && std::wstring(values[1]) == L"--capture-audio") {
arguments.mode = ProductArguments::Mode::audio;
arguments.target_kind = ParseTargetKind(values[2]);
- } else if (count >= 16 && count <= 11 + 5 * screener::capture::kMaxOutputs && (count - 11) % 5 == 0 &&
+ } else if (count >= 16 && count <= 11 + 5 * piik::capture::kMaxOutputs && (count - 11) % 5 == 0 &&
std::wstring(values[1]) == L"--encoded-video" &&
std::wstring(values[2]) == L"--codec" &&
std::wstring(values[4]) == L"--adapter-index" &&
@@ -1022,7 +1022,7 @@ ProductArguments ParseProductArguments(int count, wchar_t** values) {
arguments.profile.bit_rate = std::max(arguments.profile.bit_rate, output.bit_rate);
}
return arguments;
- } else if (count >= 28 && count <= 23 + 5 * screener::capture::kMaxOutputs && (count - 23) % 5 == 0 &&
+ } else if (count >= 28 && count <= 23 + 5 * piik::capture::kMaxOutputs && (count - 23) % 5 == 0 &&
std::wstring(values[1]) == L"--capture-video" &&
std::wstring(values[6]) == L"--adapter-index" &&
std::wstring(values[8]) == L"--mft-index" &&
@@ -1067,11 +1067,11 @@ ProductArguments ParseProductArguments(int count, wchar_t** values) {
arguments.pid = static_cast<DWORD>(pid);
arguments.creation_time =
ParseNonNegativeUint64(values[creation_index], "argument-creation-time");
- if (arguments.target_kind == screener::capture::TargetKind::window &&
+ if (arguments.target_kind == piik::capture::TargetKind::window &&
(arguments.pid == 0 || arguments.creation_time == 0)) {
Fail("argument-window-identity", "window identity is incomplete");
}
- if (arguments.target_kind == screener::capture::TargetKind::display &&
+ if (arguments.target_kind == piik::capture::TargetKind::display &&
(arguments.pid != 0 || arguments.creation_time != 0)) {
Fail("argument-display-identity", "display identity is invalid");
}
@@ -1094,14 +1094,14 @@ HRESULT RunAudioCapture(const ProductArguments& arguments) {
};
auto pcm = [&writer](UINT64 timestamp100ns, const BYTE* data, DWORD size) {
return writer.Write(OutputKind::pcm, 0, timestamp100ns,
- screener::capture::kAudioChunkDuration100ns, data,
+ piik::capture::kAudioChunkDuration100ns, data,
size);
};
- if (arguments.target_kind == screener::capture::TargetKind::display) {
- return screener::capture::CaptureSystemAudio(
+ if (arguments.target_kind == piik::capture::TargetKind::display) {
+ return piik::capture::CaptureSystemAudio(
stop.get(), should_stop, ready, pcm);
}
- return screener::capture::CaptureProcessAudio(
+ return piik::capture::CaptureProcessAudio(
arguments.pid, arguments.creation_time, stop.get(),
should_stop,
ready, pcm);
@@ -1141,8 +1141,8 @@ void WriteCapabilityProbe() {
}
const bool process_audio =
build >= kProcessLoopbackMinimumBuild &&
- screener::capture::ProcessAudioAvailable();
- const bool system_audio = screener::capture::SystemAudioAvailable();
+ piik::capture::ProcessAudioAvailable();
+ const bool system_audio = piik::capture::SystemAudioAvailable();
std::vector<Adapter> adapters = EnumerateAdapters();
std::ostringstream output;
@@ -1396,7 +1396,7 @@ class OutputWorker final {
std::unique_ptr<VideoEncoder> initial_;
std::function<void()> on_output_;
std::function<void(std::exception_ptr)> on_failure_;
- using Mailbox = screener::capture::OutputMailbox<CaptureInput>;
+ using Mailbox = piik::capture::OutputMailbox<CaptureInput>;
Mailbox mailbox_;
std::thread thread_;
};
@@ -1484,7 +1484,7 @@ std::string OutputFailureDetail(std::exception_ptr error) {
}
}
-bool ApplyOutputControl(const screener::capture::CaptureControl& control,
+bool ApplyOutputControl(const piik::capture::CaptureControl& control,
const std::vector<std::unique_ptr<OutputWorker>>& workers) {
if (control.layer >= static_cast<int>(workers.size())) Fail("control-layer", "output layer is unavailable");
if (control.kind == 'A') {
@@ -1592,10 +1592,10 @@ void RunEncodedVideo(const ProductArguments& arguments) {
for (auto& worker : workers) worker->Join();
};
try {
- std::unique_ptr<screener::capture::H264Decoder> h264;
- std::unique_ptr<screener::capture::Vp8Decoder> vp8;
- if (hardware) h264 = std::make_unique<screener::capture::H264Decoder>(device.manager.Get());
- else vp8 = std::make_unique<screener::capture::Vp8Decoder>();
+ std::unique_ptr<piik::capture::H264Decoder> h264;
+ std::unique_ptr<piik::capture::Vp8Decoder> vp8;
+ if (hardware) h264 = std::make_unique<piik::capture::H264Decoder>(device.manager.Get());
+ else vp8 = std::make_unique<piik::capture::Vp8Decoder>();
InputReader reader;
bool began = false;
UINT64 last_timestamp = 0;
@@ -1649,12 +1649,12 @@ void RunEncodedVideo(const ProductArguments& arguments) {
void RunVideoCapture(const ProductArguments& arguments) {
const bool window_target =
- arguments.target_kind == screener::capture::TargetKind::window;
+ arguments.target_kind == piik::capture::TargetKind::window;
HRESULT identity = window_target
- ? screener::capture::ValidateWindowTarget(
+ ? piik::capture::ValidateWindowTarget(
arguments.source_id, arguments.pid,
arguments.creation_time)
- : screener::capture::ValidateDisplayTarget(
+ : piik::capture::ValidateDisplayTarget(
arguments.source_id);
Check(identity, "target-identity");
@@ -1663,7 +1663,7 @@ void RunVideoCapture(const ProductArguments& arguments) {
DeviceContext device = CreateDevice(adapter);
auto encoder = SelectVideoEncoder(arguments, adapter, device);
const bool hardware = encoder.kind == OutputKind::h264;
- screener::capture::CapturePresentation presentation(arguments.target_kind,
+ piik::capture::CapturePresentation presentation(arguments.target_kind,
arguments.source_id);
ProtocolWriter writer;
@@ -1679,9 +1679,9 @@ void RunVideoCapture(const ProductArguments& arguments) {
Check(HRESULT_FROM_WIN32(GetLastError()), "target-process-handle");
}
Check(window_target
- ? screener::capture::ValidateWindowTarget(
+ ? piik::capture::ValidateWindowTarget(
arguments.source_id, arguments.pid, arguments.creation_time)
- : screener::capture::ValidateDisplayTarget(arguments.source_id),
+ : piik::capture::ValidateDisplayTarget(arguments.source_id),
"target-identity-before-capture");
auto capture_device = CreateCaptureDevice(device.device.Get());
GraphicsCaptureItem item = window_target
@@ -1690,9 +1690,9 @@ void RunVideoCapture(const ProductArguments& arguments) {
: CreateCaptureItem(reinterpret_cast<HMONITOR>(
static_cast<UINT_PTR>(arguments.source_id)));
Check(window_target
- ? screener::capture::ValidateWindowTarget(
+ ? piik::capture::ValidateWindowTarget(
arguments.source_id, arguments.pid, arguments.creation_time)
- : screener::capture::ValidateDisplayTarget(arguments.source_id),
+ : piik::capture::ValidateDisplayTarget(arguments.source_id),
"target-identity-after-item");
auto initial_size = item.Size();
if (initial_size.Width <= 0 || initial_size.Height <= 0) {
@@ -1909,7 +1909,7 @@ void RunVideoCapture(const ProductArguments& arguments) {
}
#endif
-#ifdef SCREENER_H264_FIXTURE
+#ifdef PIIK_H264_FIXTURE
struct Arguments final {
bool list = false;
std::optional<UINT> adapter_index;
@@ -1972,7 +1972,7 @@ void PrintEvidence(const Adapter& adapter, UINT mft_index,
} // namespace
-#ifdef SCREENER_H264_FIXTURE
+#ifdef PIIK_H264_FIXTURE
int wmain(int argc, wchar_t** argv) {
try {
Arguments arguments = ParseArguments(argc, argv);
@@ -2024,12 +2024,12 @@ int wmain(int argc, wchar_t** argv) {
}
#endif
-#ifndef SCREENER_H264_FIXTURE
+#ifndef PIIK_H264_FIXTURE
int wmain(int argc, wchar_t** argv) {
try {
ProductArguments arguments = ParseProductArguments(argc, argv);
if (arguments.mode == ProductArguments::Mode::list) {
- return screener::capture::WriteSourceList();
+ return piik::capture::WriteSourceList();
}
if (arguments.mode == ProductArguments::Mode::probe) {
Runtime runtime;
@@ -2040,7 +2040,7 @@ int wmain(int argc, wchar_t** argv) {
Fail("stdout-binary", "could not switch stdout to binary mode");
}
if (arguments.mode == ProductArguments::Mode::preview) {
- Check(screener::capture::WriteSourcePreview(
+ Check(piik::capture::WriteSourcePreview(
arguments.target_kind, arguments.source_id, arguments.pid,
arguments.creation_time),
"capture-preview");
diff --git a/native/capture/windows/output_mailbox.h b/native/capture/windows/output_mailbox.h
index 86a4997a..a7dad504 100644
--- a/native/capture/windows/output_mailbox.h
+++ b/native/capture/windows/output_mailbox.h
@@ -7,7 +7,7 @@
#include <stdexcept>
#include <utility>
-namespace screener::capture {
+namespace piik::capture {
// One codec worker consumes raw inputs; only its not-yet-encoded input is replaceable.
template <typename Frame>
@@ -105,4 +105,4 @@ class OutputMailbox final {
bool key_requested_ = true;
};
-} // namespace screener::capture
+} // namespace piik::capture
diff --git a/native/capture/windows/process_audio.cpp b/native/capture/windows/process_audio.cpp
index 4480b77e..48b4de3c 100644
--- a/native/capture/windows/process_audio.cpp
+++ b/native/capture/windows/process_audio.cpp
@@ -26,7 +26,7 @@ using Microsoft::WRL::RuntimeClass;
using Microsoft::WRL::RuntimeClassFlags;
using Microsoft::WRL::ClassicCom;
-namespace screener::capture {
+namespace piik::capture {
namespace {
class ActivationHandler final : public RuntimeClass<
RuntimeClassFlags<ClassicCom>, FtmBase, IActivateAudioInterfaceCompletionHandler> {
@@ -270,4 +270,4 @@ HRESULT CaptureSystemAudio(HANDLE stop_event, const StopProbe& stop_probe,
return result;
}
-} // namespace screener::capture
+} // namespace piik::capture
diff --git a/native/capture/windows/process_audio.h b/native/capture/windows/process_audio.h
index bc5a1158..692b9915 100644
--- a/native/capture/windows/process_audio.h
+++ b/native/capture/windows/process_audio.h
@@ -5,7 +5,7 @@
#include <cstdint>
#include <functional>
-namespace screener::capture {
+namespace piik::capture {
constexpr UINT32 kAudioSampleRate = 48'000;
constexpr UINT16 kAudioChannels = 2;
@@ -30,4 +30,4 @@ HRESULT CaptureSystemAudio(HANDLE stop_event, const StopProbe& stop_probe,
const ReadyWriter& ready_writer,
const PCMWriter& writer);
-} // namespace screener::capture
+} // namespace piik::capture
diff --git a/native/capture/windows/vp8_decoder.h b/native/capture/windows/vp8_decoder.h
index 584ed58d..cb57c4eb 100644
--- a/native/capture/windows/vp8_decoder.h
+++ b/native/capture/windows/vp8_decoder.h
@@ -8,7 +8,7 @@
#include <stdexcept>
#include <vector>
-namespace screener::capture {
+namespace piik::capture {
// Decoder image storage belongs to libvpx until the next Decode call. A single
// NV12 copy is shared by all derived-output workers after upload.
@@ -72,4 +72,4 @@ class Vp8Decoder final {
vpx_codec_ctx_t codec_{};
};
-} // namespace screener::capture
+} // namespace piik::capture
diff --git a/native/capture/windows/vp8_encoder.cpp b/native/capture/windows/vp8_encoder.cpp
index 8fcd26e0..a0046ea5 100644
--- a/native/capture/windows/vp8_encoder.cpp
+++ b/native/capture/windows/vp8_encoder.cpp
@@ -8,7 +8,7 @@
#include <vpx/vp8cx.h>
-namespace screener::capture {
+namespace piik::capture {
namespace {
void CheckVpx(vpx_codec_err_t result) {
@@ -103,4 +103,4 @@ Vp8Frame Vp8Encoder::Encode(uint8_t* nv12, size_t row_pitch,
return frame;
}
-} // namespace screener::capture
+} // namespace piik::capture
diff --git a/native/capture/windows/vp8_encoder.h b/native/capture/windows/vp8_encoder.h
index e2661362..f70f9dfd 100644
--- a/native/capture/windows/vp8_encoder.h
+++ b/native/capture/windows/vp8_encoder.h
@@ -6,7 +6,7 @@
#include <vpx/vpx_encoder.h>
-namespace screener::capture {
+namespace piik::capture {
struct Vp8Frame final {
bool key_frame = false;
@@ -35,4 +35,4 @@ class Vp8Encoder final {
unsigned long duration100ns_;
};
-} // namespace screener::capture
+} // namespace piik::capture
diff --git a/native/fixtures/mf-h264-hardware/README.md b/native/fixtures/mf-h264-hardware/README.md
index cb246177..37a4a90c 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 Fixture
This is an offline Windows-only decision fixture. Its build compiles the same
-Media Foundation encoder source used by Screener Client's Windows capture
+Media Foundation encoder source used by Piik Client's Windows capture
process, under a
fixture-only macro for synthetic input and telemetry. The generated fixture is
not linked into the sender and does not contact a room, signaling service,
@@ -27,10 +27,10 @@ fallback. Exit code zero requires all of these checks in one 360-frame run:
The generated executable must stay outside the repository. From PowerShell:
```powershell
-$out = Join-Path ([IO.Path]::GetTempPath()) 'screener-mf-h264-fixture-build'
+$out = Join-Path ([IO.Path]::GetTempPath()) 'piik-mf-h264-fixture-build'
./native/fixtures/mf-h264-hardware/build.ps1 -OutputDirectory $out
-& "$out/screener-mf-h264-fixture.exe" --list-adapters
-& "$out/screener-mf-h264-fixture.exe" --adapter-index 0 --mft-index 0
+& "$out/piik-mf-h264-fixture.exe" --list-adapters
+& "$out/piik-mf-h264-fixture.exe" --adapter-index 0 --mft-index 0
```
Select the adapter index explicitly from the first command. The MFT index
diff --git a/native/fixtures/mf-h264-hardware/build.ps1 b/native/fixtures/mf-h264-hardware/build.ps1
index 1e90a9e2..d9a8dd2b 100644
--- a/native/fixtures/mf-h264-hardware/build.ps1
+++ b/native/fixtures/mf-h264-hardware/build.ps1
@@ -30,7 +30,7 @@ if ([string]::IsNullOrWhiteSpace($installationPath)) {
$developerCommand = Join-Path $installationPath 'Common7\Tools\VsDevCmd.bat'
$sourcePath = Join-Path $fixtureDirectory '..\..\capture\windows\main.cpp'
$encoderSourcePath = Join-Path $fixtureDirectory '..\..\capture\windows\h264_encoder.cpp'
-$executablePath = Join-Path $outputPath 'screener-mf-h264-fixture.exe'
+$executablePath = Join-Path $outputPath 'piik-mf-h264-fixture.exe'
$objectPath = Join-Path $outputPath 'main.obj'
$encoderObjectPath = Join-Path $outputPath 'h264-encoder.obj'
@@ -38,7 +38,7 @@ New-Item -ItemType Directory -Path $outputPath -Force | Out-Null
$compile = @(
'call "{0}" -arch=x64 -host_arch=x64 >nul' -f $developerCommand
- 'cl.exe /nologo /c /std:c++20 /EHsc /W4 /WX /DSCREENER_H264_FIXTURE /DUNICODE /D_UNICODE /DWIN32_LEAN_AND_MEAN /D_WIN32_WINNT=0x0A00 "{0}" /Fo:"{1}"' -f $sourcePath, $objectPath
+ 'cl.exe /nologo /c /std:c++20 /EHsc /W4 /WX /DPIIK_H264_FIXTURE /DUNICODE /D_UNICODE /DWIN32_LEAN_AND_MEAN /D_WIN32_WINNT=0x0A00 "{0}" /Fo:"{1}"' -f $sourcePath, $objectPath
'cl.exe /nologo /c /std:c++20 /EHsc /W4 /WX /DUNICODE /D_UNICODE /DWIN32_LEAN_AND_MEAN /D_WIN32_WINNT=0x0A00 "{0}" /Fo:"{1}"' -f $encoderSourcePath, $encoderObjectPath
'link.exe /nologo /out:"{0}" "{1}" "{2}" mfplat.lib mf.lib mfuuid.lib d3d11.lib dxgi.lib dxguid.lib evr.lib ole32.lib oleaut32.lib pdh.lib windowsapp.lib' -f $executablePath, $objectPath, $encoderObjectPath
) -join ' && '
diff --git a/native/probes/encoder-pool/CMakeLists.txt b/native/probes/encoder-pool/CMakeLists.txt
index 9f7e9f82..543fb64b 100644
--- a/native/probes/encoder-pool/CMakeLists.txt
+++ b/native/probes/encoder-pool/CMakeLists.txt
@@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.20)
-project(screener_encoder_pool_probe LANGUAGES CXX)
+project(piik_encoder_pool_probe LANGUAGES CXX)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_MSVC_RUNTIME_LIBRARY MultiThreaded)
set(WEBRTC_SDK "" CACHE PATH "Extracted matching Shiguredo WebRTC SDK")
diff --git a/native/probes/encoder-pool/README.md b/native/probes/encoder-pool/README.md
index 18c89866..bbd6a27e 100644
--- a/native/probes/encoder-pool/README.md
+++ b/native/probes/encoder-pool/README.md
@@ -11,7 +11,7 @@ Use Shiguredo `m152.7977.0.2` Windows x64 SDK (WebRTC commit
ZIP SHA-256: `3250ee091eb745b9885482d92db352e6bcd5426940021ff90a095747d84d2137`.
Keep the extracted SDK, official compiler dependencies and executable under
ignored `build/encoder-pool`; preserve the SDK's notices. Do not ship this SDK
-as part of Screener based on this probe.
+as part of Piik based on this probe.
With CMake and Visual Studio 2022 x64 tools available:
@@ -71,7 +71,7 @@ This is synthetic I420 upload to NV12/MFT, not WGC capture or zero-copy input.
The pinned SDK has no H264 decoder, so this arm records payload equality and
encoded dimensions with decoded counters at zero. Validate the exported AUs
separately in Chrome. The existing `scripts/encoded-group-decode.mjs` accepts
-`SCREENER_ENCODED_CODEC=avc1.42c033` and `SCREENER_ENCODED_OUTPUT` pointing to two
+`PIIK_ENCODED_CODEC=avc1.42c033` and `PIIK_ENCODED_OUTPUT` pointing to two
arrays of `{Index, Width, Height, PTS, Recovery, Data}` frames (nanosecond PTS,
base64 Annex-B data). A repeated export in those two arrays proves decoding of
that bitstream, not two Pion transports or weak-budget/resource adaptation.
@@ -84,9 +84,9 @@ Export the first 180 real AUs from sender A for the opt-in Go forwarding check:
& ./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
-$env:SCREENER_POOL_CHAIN_FIXTURE = "$PWD/build/encoder-pool/chain-input.jsonl"
-$env:SCREENER_NATIVE_CAPTURE = "$PWD/build/client-check/screener-client-capture.exe"
-$env:SCREENER_POOL_CHAIN_OUTPUT = "$PWD/build/encoder-pool/chain-result.json"
+$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_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/h264_encoder_adapter.cpp b/native/probes/encoder-pool/h264_encoder_adapter.cpp
index f8d3921b..b4e0f538 100644
--- a/native/probes/encoder-pool/h264_encoder_adapter.cpp
+++ b/native/probes/encoder-pool/h264_encoder_adapter.cpp
@@ -15,9 +15,9 @@
#include "modules/video_coding/include/video_error_codes.h"
#include "system_wrappers/include/clock.h"
-namespace screener::probe {
+namespace piik::probe {
namespace {
-namespace native = screener::capture::windows;
+namespace native = piik::capture::windows;
bool ValidDimensions(int width, int height) {
return width >= 2 && width <= 2560 && height >= 2 && height <= 1440 &&
@@ -307,4 +307,4 @@ std::unique_ptr<webrtc::VideoEncoderFactory> CreateHardwareEncoderFactory(
return std::make_unique<HardwareFactory>(adapter_index, encoder_index);
}
-} // namespace screener::probe
+} // namespace piik::probe
diff --git a/native/probes/encoder-pool/h264_encoder_adapter.h b/native/probes/encoder-pool/h264_encoder_adapter.h
index 3a3f8839..6977ed8d 100644
--- a/native/probes/encoder-pool/h264_encoder_adapter.h
+++ b/native/probes/encoder-pool/h264_encoder_adapter.h
@@ -4,10 +4,10 @@
#include "api/video_codecs/video_encoder_factory.h"
-namespace screener::probe {
+namespace piik::probe {
// CPU I420 input only. InitEncode and Release own COM/MF on the encoder queue.
std::unique_ptr<webrtc::VideoEncoderFactory> CreateHardwareEncoderFactory(
unsigned adapter_index = 0, unsigned encoder_index = 0);
-} // namespace screener::probe
+} // namespace piik::probe
diff --git a/native/probes/encoder-pool/harness.cpp b/native/probes/encoder-pool/harness.cpp
index 469f11ad..f017d8d4 100644
--- a/native/probes/encoder-pool/harness.cpp
+++ b/native/probes/encoder-pool/harness.cpp
@@ -433,7 +433,7 @@ int main(int argc, char** argv) {
const auto env = CreateEnvironment(std::make_unique<Trials>(no_adjuster));
const bool unsafe_skip = has("--unsafe-skip");
PoolFactory factory(pooled, group_adjuster, unsafe_skip,
- h264 ? screener::probe::CreateHardwareEncoderFactory() : nullptr);
+ h264 ? piik::probe::CreateHardwareEncoderFactory() : nullptr);
auto allocator = CreateBuiltinVideoBitrateAllocatorFactory();
auto worker = env.task_queue_factory().CreateTaskQueue(
"PoolProbeWorker", TaskQueueFactory::Priority::kNormal);
diff --git a/package-lock.json b/package-lock.json
index 2f2e2425..47cfb1bc 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,11 +1,11 @@
{
- "name": "screener",
+ "name": "piik",
"version": "0.1.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
- "name": "screener",
+ "name": "piik",
"version": "0.1.0",
"license": "MIT",
"devDependencies": {
diff --git a/package.json b/package.json
index 9b6c33a6..99af5dc3 100644
--- a/package.json
+++ b/package.json
@@ -1,5 +1,5 @@
{
- "name": "screener",
+ "name": "piik",
"version": "0.1.0",
"license": "MIT",
"private": true,
diff --git a/scripts/access-privacy-gate.ts b/scripts/access-privacy-gate.ts
index 2e459b5e..7bbf776f 100644
--- a/scripts/access-privacy-gate.ts
+++ b/scripts/access-privacy-gate.ts
@@ -35,8 +35,8 @@ import {
const root = resolve(import.meta.dirname, "..");
const nginxConfigPath = resolve(root, "deploy/nginx/share.bonfire.icu.conf.example");
const serverExecutable = join(root, "build", "client-check",
- process.platform === "win32" ? "screener-server.exe" : "screener-server");
-// SCREENER_ENV=production refuses to start without STUN. Nothing listens on
+ process.platform === "win32" ? "piik-server.exe" : "piik-server");
+// PIIK_ENV=production refuses to start without STUN. Nothing listens on
// this address, so the gate still never leaves the loopback interface.
const gateStunUrl = "stun:127.0.0.1:3478";
const hostClientId = "privacy-gate-host";
@@ -55,7 +55,7 @@ const fragmentProbe = `(() => {
if (location.hash) { state.replaced = true; state.beforeDomContentLoaded = !domContentLoaded; }
return replaceState.apply(this, args);
};
- Object.defineProperty(globalThis, "__SCREENER_ACCESS_GATE__", { value: state });
+ Object.defineProperty(globalThis, "__PIIK_ACCESS_GATE__", { value: state });
})();`;
interface GateReport {
passed: boolean; serverReady: boolean; roomPrepared: boolean;
@@ -96,13 +96,13 @@ async function reserveDistinctPorts(count: number): Promise<number[]> {
return ports;
}
function buildServer(): void {
- const go = process.env.SCREENER_GO?.trim() || "go";
- const result = spawnSync(go, ["build", "-trimpath", "-o", serverExecutable, "./cmd/screener-server"], {
+ const go = process.env.PIIK_GO?.trim() || "go";
+ const result = spawnSync(go, ["build", "-trimpath", "-o", serverExecutable, "./cmd/piik-server"], {
cwd: root, encoding: "utf8", stdio: ["ignore", "pipe", "pipe"],
env: { ...process.env, CGO_ENABLED: "0" },
});
if (result.error) throw result.error;
- if (result.status !== 0) throw new Error("screener-server build failed");
+ if (result.status !== 0) throw new Error("piik-server build failed");
}
function forwardedHeaders(headers: IncomingHttpHeaders): OutgoingHttpHeaders {
return Object.fromEntries(
@@ -244,7 +244,7 @@ async function main(): Promise<void> {
try {
await access(chromePath);
[proxyPort, serverPort, debugPort] = await reserveDistinctPorts(3);
- profile = await mkdtemp(join(tmpdir(), "screener-access-privacy-"));
+ profile = await mkdtemp(join(tmpdir(), "piik-access-privacy-"));
const baseUrl = `http://127.0.0.1:${proxyPort}`;
await mkdir(dirname(serverExecutable), { recursive: true });
buildServer();
@@ -260,7 +260,7 @@ async function main(): Promise<void> {
env: {
PATH: process.env.PATH,
SystemRoot: process.env.SystemRoot,
- SCREENER_ENV: "production",
+ PIIK_ENV: "production",
ROOM_DATABASE_PATH: ":memory:",
PORT: String(serverPort),
LISTEN_HOST: "127.0.0.1",
@@ -346,7 +346,7 @@ async function main(): Promise<void> {
const expected = JSON.stringify({ roomId: room.roomId, grant });
const audit = await evaluate<BrowserAudit>(cdp, page, `(() => {
const expected = ${expected};
- const fragment = globalThis.__SCREENER_ACCESS_GATE__;
+ const fragment = globalThis.__PIIK_ACCESS_GATE__;
const entries = (storage) => Object.keys(storage).map((key) => [key, storage.getItem(key)]);
const session = entries(sessionStorage); const local = entries(localStorage);
return {
@@ -355,8 +355,8 @@ async function main(): Promise<void> {
fragmentClearedBeforeDomContentLoaded: fragment?.beforeDomContentLoaded === true,
fragmentCleared: location.hash === "",
canonicalRoomPath: location.pathname === "/r/" + expected.roomId && location.search === "",
- roomSessionGrantMatches: session.filter(([key, value]) => key === "screener:viewer-grant:" + expected.roomId && value === expected.grant).length,
- otherSessionGrantMatches: session.filter(([key, value]) => value?.includes(expected.grant) && key !== "screener:viewer-grant:" + expected.roomId).length,
+ roomSessionGrantMatches: session.filter(([key, value]) => key === "piik:viewer-grant:" + expected.roomId && value === expected.grant).length,
+ otherSessionGrantMatches: session.filter(([key, value]) => value?.includes(expected.grant) && key !== "piik:viewer-grant:" + expected.roomId).length,
localGrantMatches: local.filter(([, value]) => value && value.includes(expected.grant)).length,
resourceGrantMatches: performance.getEntriesByType("resource").filter((entry) => entry.name.includes(expected.grant)).length,
};
diff --git a/scripts/assemble-client.mjs b/scripts/assemble-client.mjs
index 48e45ce7..220d8af7 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", `Screener-Client-${target.id}`);
+ "candidate", `Piik-Client-${target.id}`);
if (outputRoot !== candidateOutput &&
(path === "" || (path.split(/[\\/]/)[0] !== ".." && !isAbsolute(path)))) {
fail("Client output must be outside the repository or its exact candidate workspace");
@@ -248,15 +248,15 @@ try {
const clientName = target.clientName;
const clientPath = join(packageRoot, clientName);
- const goCommand = process.env.SCREENER_GO?.trim() || "go";
+ const goCommand = process.env.PIIK_GO?.trim() || "go";
run(goCommand, [
"build",
"-trimpath",
"-ldflags",
- `-s -w -X github.com/TNTcraftHIM/Screener/internal/client/clientapp.BuildRevision=${revision}`,
+ `-s -w -X github.com/TNTcraftHIM/Piik/internal/client/clientapp.BuildRevision=${revision}`,
"-o",
clientPath,
- "./cmd/screener-client",
+ "./cmd/piik-client",
], repositoryRoot, clientGoEnvironment(target));
chmodSync(clientPath, 0o755);
assertTargetExecutable(clientPath, target, "Client executable");
@@ -266,7 +266,7 @@ try {
packageRoot,
target,
revision,
- iconPath: join(repositoryRoot, "cmd", "screener-client", "screener.ico"),
+ iconPath: join(repositoryRoot, "cmd", "piik-client", "piik.ico"),
});
writeFileSync(join(packageRoot, "REVISION"), `${revision}\n`, "ascii");
diff --git a/scripts/browser-gate-harness.ts b/scripts/browser-gate-harness.ts
index f160b76f..4b7ec3bb 100644
--- a/scripts/browser-gate-harness.ts
+++ b/scripts/browser-gate-harness.ts
@@ -28,7 +28,7 @@ interface AsyncCloseable {
}
// A gate's server is either an in-process page server it closes directly or a
-// spawned Screener server it stops like any other child.
+// spawned Piik server it stops like any other child.
export type CleanupServer = AsyncCloseable | ChildProcessWithoutNullStreams;
export interface CleanupResources {
@@ -495,11 +495,11 @@ function portClosed(port: number, deadline: number): Promise<boolean> {
export const profileCleanupScript = String.raw`
$ErrorActionPreference = 'Stop'
-$root = [IO.Path]::GetFullPath($env:SCREENER_GATE_PROFILE_TO_REMOVE)
+$root = [IO.Path]::GetFullPath($env:PIIK_GATE_PROFILE_TO_REMOVE)
$temp = [IO.Path]::GetFullPath([IO.Path]::GetTempPath()).TrimEnd([IO.Path]::DirectorySeparatorChar)
$parent = [IO.Path]::GetDirectoryName($root).TrimEnd([IO.Path]::DirectorySeparatorChar)
$name = [IO.Path]::GetFileName($root)
-if ($parent -ine $temp -or $name -notmatch '^screener-(access-privacy|client-loopback|client-media)-[A-Za-z0-9_-]{6}$') { exit 31 }
+if ($parent -ine $temp -or $name -notmatch '^piik-(access-privacy|client-loopback|client-media)-[A-Za-z0-9_-]{6}$') { exit 31 }
$rootEntries = @([IO.Directory]::EnumerateFileSystemEntries($parent, $name, [IO.SearchOption]::TopDirectoryOnly))
if ($rootEntries.Count -eq 0) { exit 0 }
if ($rootEntries.Count -ne 1) { exit 34 }
@@ -534,7 +534,7 @@ export function isExactGateProfile(
? dirname(candidate).toLowerCase() === temp.toLowerCase()
: dirname(candidate) === temp;
return same &&
- /^screener-(?:access-privacy|client-loopback|client-media)-[A-Za-z0-9_-]{6}$/.test(
+ /^piik-(?:access-privacy|client-loopback|client-media)-[A-Za-z0-9_-]{6}$/.test(
basename(candidate),
);
}
@@ -564,7 +564,7 @@ async function removeGateProfile(profile: string): Promise<boolean> {
"powershell.exe",
["-NoProfile", "-NonInteractive", "-Command", profileCleanupScript],
10_000,
- { ...process.env, SCREENER_GATE_PROFILE_TO_REMOVE: profile },
+ { ...process.env, PIIK_GATE_PROFILE_TO_REMOVE: profile },
);
}
diff --git a/scripts/browser-local-pool-probe.ts b/scripts/browser-local-pool-probe.ts
index c3e4cf8c..a44070d8 100644
--- a/scripts/browser-local-pool-probe.ts
+++ b/scripts/browser-local-pool-probe.ts
@@ -65,7 +65,7 @@ const server = createServer((request, response) => {
});
await new Promise<void>(r => server.listen(0, '127.0.0.1', r));
const port = (server.address() as { port: number }).port, debugPort = await reservePort();
-const profile = await mkdtemp(join(tmpdir(), 'screener-client-media-'));
+const profile = await mkdtemp(join(tmpdir(), 'piik-client-media-'));
const chrome = launchChrome(process.env.CHROME_PATH || 'C:/Program Files/Google/Chrome/Application/chrome.exe', debugPort, profile,
['--headless=new', '--no-first-run', '--autoplay-policy=no-user-gesture-required',
...(background ? [] : ['--disable-background-timer-throttling', '--disable-renderer-backgrounding']),
diff --git a/scripts/check-client.mjs b/scripts/check-client.mjs
index 45a1d5a3..3841d94b 100644
--- a/scripts/check-client.mjs
+++ b/scripts/check-client.mjs
@@ -52,9 +52,9 @@ function buildWebAssets() {
function checkCore() {
buildWebAssets();
- const go = process.env.SCREENER_GO?.trim() || "go";
+ const go = process.env.PIIK_GO?.trim() || "go";
const goRoot = run(go, ["env", "GOROOT"], { capture: true });
- const gofmt = process.env.SCREENER_GOFMT?.trim() ||
+ const gofmt = process.env.PIIK_GOFMT?.trim() ||
join(goRoot, "bin", process.platform === "win32" ? "gofmt.exe" : "gofmt");
const unformatted = run(gofmt, ["-l", "."], { capture: true });
if (unformatted) {
@@ -73,9 +73,9 @@ function checkCore() {
return true;
});
const builds = buildTargets.flatMap((target) =>
- ["screener-client", "screener-peer-gate"].map((command) => ({ target, command })),
+ ["piik-client", "piik-peer-gate"].map((command) => ({ target, command })),
);
- builds.push({ target: SERVER_TARGET, command: "screener-server" });
+ builds.push({ target: SERVER_TARGET, command: "piik-server" });
for (const { target, command } of builds) {
const outputName = target.goos === "windows"
? `${command}.exe`
@@ -132,7 +132,7 @@ function checkPlatformCapture() {
"7",
"pwsh.exe",
);
- const powershell = process.env.SCREENER_POWERSHELL?.trim() ||
+ const powershell = process.env.PIIK_POWERSHELL?.trim() ||
(existsSync(modernPowerShell)
? modernPowerShell
: (existsSync(systemPowerShell) ? systemPowerShell : "pwsh"));
@@ -146,13 +146,13 @@ function checkPlatformCapture() {
buildRoot,
"-Check",
]);
- executable = join(buildRoot, "screener-client-capture.exe");
+ executable = join(buildRoot, "piik-client-capture.exe");
} else if (process.platform === "darwin") {
run("sh", [join(captureRoot, "darwin", "build.sh"), buildRoot]);
- executable = join(buildRoot, "screener-client-capture");
+ executable = join(buildRoot, "piik-client-capture");
} else {
run("sh", [join(captureRoot, "linux", "build.sh"), buildRoot]);
- executable = join(buildRoot, "screener-client-capture");
+ executable = join(buildRoot, "piik-client-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("Screener Client checks passed.\n");
+process.stdout.write("Piik Client checks passed.\n");
diff --git a/scripts/check-project-state.ps1 b/scripts/check-project-state.ps1
index 64456006..d1a1a38d 100644
--- a/scripts/check-project-state.ps1
+++ b/scripts/check-project-state.ps1
@@ -2,7 +2,7 @@ $ErrorActionPreference = "Stop"
$repoRoot = (git rev-parse --show-toplevel).Trim()
if ($LASTEXITCODE -ne 0) {
- throw "This command must run inside the Screener Git repository."
+ throw "This command must run inside the Piik Git repository."
}
Set-Location $repoRoot
@@ -19,8 +19,8 @@ if ($LASTEXITCODE -ne 0) { throw "Working-tree whitespace check failed." }
git diff --cached --check
if ($LASTEXITCODE -ne 0) { throw "Staged whitespace check failed." }
-if ($env:SCREENER_BASE_SHA -and $env:SCREENER_BASE_SHA -notmatch '^0{40}$') {
- git diff --check "$env:SCREENER_BASE_SHA...HEAD"
+if ($env:PIIK_BASE_SHA -and $env:PIIK_BASE_SHA -notmatch '^0{40}$') {
+ git diff --check "$env:PIIK_BASE_SHA...HEAD"
if ($LASTEXITCODE -ne 0) { throw "Commit-range whitespace check failed." }
}
diff --git a/scripts/check-project-state.sh b/scripts/check-project-state.sh
index e8302ea2..5ed24fd9 100755
--- a/scripts/check-project-state.sh
+++ b/scripts/check-project-state.sh
@@ -15,8 +15,8 @@ done < scripts/required-project-paths.txt
git diff --check
git diff --cached --check
-if [ -n "${SCREENER_BASE_SHA:-}" ] && [ "$SCREENER_BASE_SHA" != "0000000000000000000000000000000000000000" ]; then
- git diff --check "$SCREENER_BASE_SHA"...HEAD
+if [ -n "${PIIK_BASE_SHA:-}" ] && [ "$PIIK_BASE_SHA" != "0000000000000000000000000000000000000000" ]; then
+ git diff --check "$PIIK_BASE_SHA"...HEAD
fi
node scripts/check-docs.mjs
diff --git a/scripts/client-browser-fanout-gate.ts b/scripts/client-browser-fanout-gate.ts
index ebae63e6..32533671 100644
--- a/scripts/client-browser-fanout-gate.ts
+++ b/scripts/client-browser-fanout-gate.ts
@@ -15,10 +15,10 @@ const BUILD_ROOT = join(ROOT, "build/client-check");
// Client does on a real network.
const LAN_ADDRESS = "192.0.2.1";
-const initialAudio = process.env.SCREENER_CLIENT_GATE_AUDIO !== "false";
+const initialAudio = process.env.PIIK_CLIENT_GATE_AUDIO !== "false";
const probe = String.raw`(() => {
- localStorage.setItem('screener:ui-lang', 'en');
- localStorage.setItem('screener:ui-mode', 'text');
+ localStorage.setItem('piik:ui-lang', 'en');
+ localStorage.setItem('piik:ui-mode', 'text');
const pcs = [], requests = [], sockets = [], errors = [];
window.addEventListener('unhandledrejection', (e) => errors.push(String(e.reason)));
const codecPreferences = RTCRtpTransceiver.prototype.setCodecPreferences;
@@ -103,20 +103,20 @@ function build(command: string, args: string[]): void {
}
}
-// startRoomServer builds and starts the Screener server the Browser pages and
-// both Clients share. SCREENER_ENV stays development because production
+// startRoomServer builds and starts the Piik server the Browser pages and
+// both Clients share. PIIK_ENV stays development because production
// requires an https public origin, a site password and STUN; the Web assets are
// embedded either way.
async function startRoomServer(
port: number,
workingDirectory: string,
): Promise<ChildProcessWithoutNullStreams> {
- const go = process.env.SCREENER_GO?.trim() || "go";
+ const go = process.env.PIIK_GO?.trim() || "go";
await mkdir(BUILD_ROOT, { recursive: true });
// The server embeds the Vite output, so the Web build precedes the Go build.
build(process.env.ComSpec || "cmd.exe", ["/d", "/s", "/c", "npm run build:client"]);
- const binary = join(BUILD_ROOT, "screener-server.exe");
- build(go, ["build", "-trimpath", "-o", binary, "./cmd/screener-server"]);
+ const binary = join(BUILD_ROOT, "piik-server.exe");
+ build(go, ["build", "-trimpath", "-o", binary, "./cmd/piik-server"]);
const origins = [`http://localhost:${port}`, `http://127.0.0.1:${port}`, `http://${LAN_ADDRESS}:${port}`];
const child = spawn(binary, [], {
// The gate profile has no .env, and the environment is explicit: the
@@ -126,7 +126,7 @@ async function startRoomServer(
env: {
PATH: process.env.PATH,
SystemRoot: process.env.SystemRoot,
- SCREENER_ENV: "development",
+ PIIK_ENV: "development",
ROOM_DATABASE_PATH: ":memory:",
PORT: String(port),
LISTEN_HOST: "127.0.0.1",
@@ -145,10 +145,10 @@ async function startRoomServer(
}
async function main(): Promise<void> {
- if (process.env.SCREENER_CLIENT_BROWSER_FANOUT_GATE !== "true") throw new Error("Browser fanout gate was not enabled");
+ if (process.env.PIIK_CLIENT_BROWSER_FANOUT_GATE !== "true") throw new Error("Browser fanout gate was not enabled");
const chromePath = process.env.CHROME_PATH;
if (!chromePath) throw new Error("CHROME_PATH is required");
- const profile = await mkdtemp(join(tmpdir(), "screener-client-media-"));
+ const profile = await mkdtemp(join(tmpdir(), "piik-client-media-"));
const appPort = await reservePort(), debugPort = await reservePort();
const origin = `http://localhost:${appPort}`;
let client: ChildProcessWithoutNullStreams | null = null;
@@ -163,10 +163,10 @@ async function main(): Promise<void> {
let stage = "startup", error: string | null = null;
try {
server = await startRoomServer(appPort, profile);
- client = spawn(process.env.SCREENER_CLIENT_EXE || join(BUILD_ROOT, "screener-client.exe"), [
+ client = spawn(process.env.PIIK_CLIENT_EXE || join(BUILD_ROOT, "piik-client.exe"), [
"--site", origin, "--config", join(profile, "client.json"),
- "--capture-process", join(BUILD_ROOT, "screener-client-capture.exe"),
- ], { windowsHide: true, stdio: "pipe", env: { ...process.env, SCREENER_CLIENT_GATE_NO_BROWSER: "true" } });
+ "--capture-process", join(BUILD_ROOT, "piik-client-capture.exe"),
+ ], { windowsHide: true, stdio: "pipe", env: { ...process.env, PIIK_CLIENT_GATE_NO_BROWSER: "true" } });
client.stderr.resume();
let output = "";
client.stdout.on("data", (chunk: Buffer) => {
@@ -185,7 +185,7 @@ async function main(): Promise<void> {
checks.browser = version.Browser;
cdp = await CdpConnection.connect(version.webSocketDebuggerUrl, Date.now() + 10000);
await cdp.call("Browser.setPermission", { origin, permission: {name:"loopback-network"}, setting:"granted" }, undefined, Date.now()+5000);
- const host = await createPage(cdp, `${origin}/#screener-client=1`, probe);
+ const host = await createPage(cdp, `${origin}/#piik-client=1`, probe);
pages.push(host);
const read = async (page: PageHandle) => {
const sample = await evaluate<any>(cdp!, page, "fanoutGate.sample()", Date.now()+5000);
@@ -211,10 +211,10 @@ 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.SCREENER_CLIENT_EXE || join(BUILD_ROOT,"screener-client.exe"), [
+ relayClient = spawn(process.env.PIIK_CLIENT_EXE || join(BUILD_ROOT,"piik-client.exe"), [
"--site", relayOrigin, "--config", join(profile,"relay-client.json"),
- "--capture-process", join(BUILD_ROOT,"screener-client-capture.exe"),
- ], { windowsHide:true, stdio:"pipe", env:{...process.env,SCREENER_CLIENT_GATE_NO_BROWSER:"true"} });
+ "--capture-process", join(BUILD_ROOT,"piik-client-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) => {
relayOutput+=chunk.toString();
@@ -226,7 +226,7 @@ async function main(): Promise<void> {
stage = `viewer-${index+1}`;
const context = await cdp.call<{browserContextId: string}>("Target.createBrowserContext", {}, undefined, Date.now()+5000);
await cdp.call("Browser.setPermission", { origin:index===0?relayOrigin:origin, permission: {name:"loopback-network"}, setting:"granted", browserContextId: context.browserContextId }, undefined, Date.now()+5000);
- const viewerURL = index===0 ? invite.replace(origin,relayOrigin)+"&screener-client=1" : invite;
+ const viewerURL = index===0 ? invite.replace(origin,relayOrigin)+"&piik-client=1" : invite;
const viewer = await createPage(cdp, viewerURL, probe, true, context.browserContextId);
viewers.push(viewer);
pages.push(viewer);
diff --git a/scripts/client-icons.mjs b/scripts/client-icons.mjs
index 36322ac6..94a8b182 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, "screener-client.png"),
+ join(iconDirectory, "piik-client.png"),
requireEntry(entries, 256),
);
writeFileSync(
- join(applicationDirectory, "screener-client.desktop"),
+ join(applicationDirectory, "piik-client.desktop"),
[
"[Desktop Entry]",
"Version=1.0",
"Type=Application",
- "Name=Screener Client",
- "Exec=screener-client",
- "TryExec=screener-client",
- "Icon=screener-client",
+ "Name=Piik Client",
+ "Exec=piik-client",
+ "TryExec=piik-client",
+ "Icon=piik-client",
"Terminal=false",
"Categories=Network;Utility;",
"StartupNotify=true",
@@ -115,13 +115,13 @@ function writeLinuxAssets(packageRoot, entries) {
}
function writeMacAssets(packageRoot, revision, entries) {
- const bundleRoot = join(packageRoot, "Screener Client.app");
+ const bundleRoot = join(packageRoot, "Piik Client.app");
const contents = join(bundleRoot, "Contents");
const macos = join(contents, "MacOS");
const resources = join(contents, "Resources");
mkdirSync(macos, { recursive: true });
mkdirSync(resources, { recursive: true });
- writeIcns(entries, join(resources, "screener.icns"));
+ writeIcns(entries, join(resources, "piik.icns"));
writeFileSync(
join(contents, "Info.plist"),
[
@@ -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>Screener Client</string>",
+ "<key>CFBundleDisplayName</key><string>Piik Client</string>",
"<key>CFBundleExecutable</key><string>Launcher</string>",
- "<key>CFBundleIconFile</key><string>screener.icns</string>",
- "<key>CFBundleIdentifier</key><string>icu.bonfire.screener.client</string>",
+ "<key>CFBundleIconFile</key><string>piik.icns</string>",
+ "<key>CFBundleIdentifier</key><string>tv.piik.client</string>",
"<key>CFBundleInfoDictionaryVersion</key><string>6.0</string>",
- "<key>CFBundleName</key><string>Screener Client</string>",
+ "<key>CFBundleName</key><string>Piik Client</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>",
@@ -152,7 +152,7 @@ function writeMacAssets(packageRoot, revision, entries) {
"#!/bin/sh",
"set -eu",
'base=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)',
- 'exec "$base/../../../screener-client" "$@"',
+ 'exec "$base/../../../piik-client" "$@"',
"",
].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/screener-client.desktop"
+ ? "share/applications/piik-client.desktop"
: target.goos === "darwin"
- ? "Screener Client.app"
+ ? "Piik Client.app"
: null;
}
diff --git a/scripts/client-link-gate.ts b/scripts/client-link-gate.ts
index c14dd7da..e3522130 100644
--- a/scripts/client-link-gate.ts
+++ b/scripts/client-link-gate.ts
@@ -86,21 +86,21 @@ function remoteOptions(): {
key: string;
ssh: string;
} {
- const host = process.env.SCREENER_REMOTE_HOST?.trim();
- const key = process.env.SCREENER_REMOTE_SSH_KEY?.trim();
+ const host = process.env.PIIK_REMOTE_HOST?.trim();
+ const key = process.env.PIIK_REMOTE_SSH_KEY?.trim();
if (!host || !key) {
- throw new Error("SCREENER_REMOTE_HOST and SCREENER_REMOTE_SSH_KEY are required");
+ throw new Error("PIIK_REMOTE_HOST and PIIK_REMOTE_SSH_KEY are required");
}
return {
host,
key,
- user: process.env.SCREENER_REMOTE_USER?.trim() || "root",
- ssh: process.env.SCREENER_SSH?.trim() || "ssh",
+ user: process.env.PIIK_REMOTE_USER?.trim() || "root",
+ ssh: process.env.PIIK_SSH?.trim() || "ssh",
};
}
function transportArgs(key: string): string[] {
- const bindAddress = process.env.SCREENER_REMOTE_BIND_ADDRESS?.trim();
+ const bindAddress = process.env.PIIK_REMOTE_BIND_ADDRESS?.trim();
return [
"-o", "BatchMode=yes",
"-o", "StrictHostKeyChecking=yes",
@@ -196,21 +196,21 @@ async function waitUntilLinkCloses(origin: string): Promise<boolean> {
}
async function main(): Promise<void> {
- if (process.env.SCREENER_CLIENT_LINK_GATE !== "true") {
- throw new Error("SCREENER_CLIENT_LINK_GATE=true is required");
+ if (process.env.PIIK_CLIENT_LINK_GATE !== "true") {
+ throw new Error("PIIK_CLIENT_LINK_GATE=true is required");
}
const remote = remoteOptions();
const transport = transportArgs(remote.key);
const destination = `${remote.user}@${remote.host}`;
- const go = process.env.SCREENER_GO?.trim() || "go";
- const configuredClient = process.env.SCREENER_CLIENT_EXE?.trim();
- const tunnel = process.env.SCREENER_CLOUDFLARED?.trim() ||
+ const go = process.env.PIIK_GO?.trim() || "go";
+ const configuredClient = process.env.PIIK_CLIENT_EXE?.trim();
+ const tunnel = process.env.PIIK_CLOUDFLARED?.trim() ||
join(BUILD_ROOT, process.platform === "win32" ? "cloudflared.exe" : "cloudflared");
- const profile = await mkdtemp(join(tmpdir(), "screener-client-link-"));
+ const profile = await mkdtemp(join(tmpdir(), "piik-client-link-"));
const port = await reservePort();
const clientBinary = configuredClient || join(
BUILD_ROOT,
- process.platform === "win32" ? "screener-client.exe" : "screener-client",
+ process.platform === "win32" ? "piik-client.exe" : "piik-client",
);
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/screener-client"],
+ run(go, ["build", "-trimpath", "-o", clientBinary, "./cmd/piik-client"],
ROOT);
}
result.stage = "client-start";
@@ -248,7 +248,7 @@ async function main(): Promise<void> {
"--tunnel-process", tunnel,
], {
cwd: ROOT,
- env: { ...process.env, SCREENER_CLIENT_GATE_NO_BROWSER: "true" },
+ env: { ...process.env, PIIK_CLIENT_GATE_NO_BROWSER: "true" },
stdio: "pipe",
windowsHide: true,
});
diff --git a/scripts/client-local-gate.ts b/scripts/client-local-gate.ts
index 3f993ac8..77969ec9 100644
--- a/scripts/client-local-gate.ts
+++ b/scripts/client-local-gate.ts
@@ -45,22 +45,22 @@ const LOCAL_PAGE_STATE = `fetch('/api/site-access')
.then((response) => response.json())
.catch(() => null)
.then((access) => ({
- bootstrapPresent: ['client-access', 'screener-client']
+ bootstrapPresent: ['client-access', 'piik-client']
.some((key) => new URLSearchParams(location.hash.slice(1)).has(key)),
access,
hostReady: Boolean(document.querySelector('.lr-host-personal-controls')),
}))`;
async function main(): Promise<void> {
- if (process.env.SCREENER_CLIENT_LOCAL_GATE !== "true") {
+ if (process.env.PIIK_CLIENT_LOCAL_GATE !== "true") {
throw new Error("Local Client gate was not explicitly enabled");
}
const browserPath = process.env.CHROME_PATH?.trim();
- const clientPath = process.env.SCREENER_CLIENT_EXE?.trim();
- const lanAddress = process.env.SCREENER_CLIENT_GATE_LAN_ADDRESS?.trim();
+ const clientPath = process.env.PIIK_CLIENT_EXE?.trim();
+ const lanAddress = process.env.PIIK_CLIENT_GATE_LAN_ADDRESS?.trim();
if (!browserPath || !clientPath || !lanAddress) {
throw new Error(
- "CHROME_PATH, SCREENER_CLIENT_EXE, and SCREENER_CLIENT_GATE_LAN_ADDRESS are required",
+ "CHROME_PATH, PIIK_CLIENT_EXE, and PIIK_CLIENT_GATE_LAN_ADDRESS are required",
);
}
@@ -82,7 +82,7 @@ async function main(): Promise<void> {
};
const appPort = await reservePort();
const debugPort = await reservePort();
- const profile = await mkdtemp(join(tmpdir(), "screener-client-loopback-"));
+ const profile = await mkdtemp(join(tmpdir(), "piik-client-loopback-"));
const configPath = join(profile, "client.json");
let client: ChildProcessWithoutNullStreams | null = null;
let browser: ChildProcessWithoutNullStreams | null = null;
@@ -97,7 +97,7 @@ async function main(): Promise<void> {
], {
stdio: "pipe",
windowsHide: true,
- env: { ...process.env, SCREENER_CLIENT_GATE_NO_BROWSER: "true" },
+ env: { ...process.env, PIIK_CLIENT_GATE_NO_BROWSER: "true" },
});
client.stderr.resume();
const endpoint = await readClientEndpoint(client);
@@ -121,12 +121,12 @@ async function main(): Promise<void> {
const localAccessPassword = config.localAccessPassword;
const bootstrap = new URLSearchParams({
...(localAccessPassword ? { "client-access": localAccessPassword } : {}),
- "screener-client": "1",
+ "piik-client": "1",
}).toString();
browser = launchChrome(browserPath, debugPort, profile, [
"--headless=new",
- ...(process.env.SCREENER_CLIENT_GATE_NO_SANDBOX === "true"
+ ...(process.env.PIIK_CLIENT_GATE_NO_SANDBOX === "true"
? ["--no-sandbox"]
: []),
"--no-first-run",
diff --git a/scripts/client-loopback-gate.ts b/scripts/client-loopback-gate.ts
index 06f07e82..f4480552 100644
--- a/scripts/client-loopback-gate.ts
+++ b/scripts/client-loopback-gate.ts
@@ -73,7 +73,7 @@ async function browserHandshake(
});
if (!response.ok) continue;
const health = await response.json();
- if (health.protocol === ${NATIVE_PROTOCOL} && health.service === "screener-client" &&
+ if (health.protocol === ${NATIVE_PROTOCOL} && health.service === "piik-client" &&
health.port === port && typeof health.instanceToken === "string" &&
typeof health.nativeMedia?.video === "boolean" &&
typeof health.nativeMedia?.processAudio === "boolean" &&
@@ -137,18 +137,18 @@ async function main(): Promise<void> {
if (process.platform !== "win32" && process.platform !== "darwin" && process.platform !== "linux") {
throw new Error("loopback gate requires a desktop platform");
}
- if (process.env.SCREENER_CLIENT_LOOPBACK_GATE !== "true") {
+ if (process.env.PIIK_CLIENT_LOOPBACK_GATE !== "true") {
throw new Error("loopback gate was not explicitly enabled");
}
const browserPath = process.env.CHROME_PATH?.trim();
- const clientPath = process.env.SCREENER_CLIENT_EXE?.trim();
+ const clientPath = process.env.PIIK_CLIENT_EXE?.trim();
if (!browserPath || !clientPath) {
- throw new Error("CHROME_PATH and SCREENER_CLIENT_EXE are required");
+ throw new Error("CHROME_PATH and PIIK_CLIENT_EXE are required");
}
const disposableNoSandbox =
- process.env.SCREENER_CLIENT_GATE_NO_SANDBOX === "true";
+ process.env.PIIK_CLIENT_GATE_NO_SANDBOX === "true";
const grantLoopback =
- process.env.SCREENER_CLIENT_GATE_GRANT_LOOPBACK === "true";
+ process.env.PIIK_CLIENT_GATE_GRANT_LOOPBACK === "true";
const report: GateReport = {
passed: false,
@@ -173,14 +173,14 @@ async function main(): Promise<void> {
let cdp: CdpConnection | null = null;
let debugPort = 0;
try {
- profile = await mkdtemp(join(tmpdir(), "screener-client-loopback-"));
+ profile = await mkdtemp(join(tmpdir(), "piik-client-loopback-"));
client = spawn(clientPath, [
"--site", PAGE_URL,
"--config", join(profile, "client.json"),
], {
stdio: "pipe",
windowsHide: true,
- env: { ...process.env, SCREENER_CLIENT_GATE_NO_BROWSER: "true" },
+ env: { ...process.env, PIIK_CLIENT_GATE_NO_BROWSER: "true" },
});
client.stderr.resume();
const endpoint = await readClientEndpoint(client, { timeoutMs: 8_000 });
diff --git a/scripts/client-media-gate.ts b/scripts/client-media-gate.ts
index 6f51c181..e84e0e50 100644
--- a/scripts/client-media-gate.ts
+++ b/scripts/client-media-gate.ts
@@ -26,8 +26,8 @@ import {
const ROOT = resolve(import.meta.dirname, "..");
const BUILD_ROOT = join(ROOT, "build", "client-check");
-const SOURCE_TITLE = "Screener Native Gate Source";
-const GATE_STUN_URLS = process.env.SCREENER_CLIENT_GATE_STUN_URLS?.trim();
+const SOURCE_TITLE = "Piik Native Gate Source";
+const GATE_STUN_URLS = process.env.PIIK_CLIENT_GATE_STUN_URLS?.trim();
interface Probe {
protocol: number;
@@ -97,7 +97,7 @@ function run(command: string, args: string[], cwd = ROOT): string {
}
function powershell(): string {
- const configured = process.env.SCREENER_POWERSHELL?.trim();
+ const configured = process.env.PIIK_POWERSHELL?.trim();
if (configured) return configured;
return join(
process.env.SystemRoot || "C:\\Windows",
@@ -301,7 +301,7 @@ async function browserMediaGate(input: {
const health = await healthResponse.json();
if (
health.protocol !== input.protocol ||
- health.service !== "screener-client" ||
+ health.service !== "piik-client" ||
health.instanceToken !== input.endpoint.instanceToken ||
health.nativeMedia?.video !== true ||
health.nativeMedia?.hardwareH264 !== true
@@ -657,16 +657,16 @@ async function main(): Promise<void> {
if (process.platform !== "win32") {
throw new Error("The native capture gate currently requires Windows");
}
- if (process.env.SCREENER_CLIENT_MEDIA_GATE !== "true") {
- throw new Error("SCREENER_CLIENT_MEDIA_GATE=true is required");
+ if (process.env.PIIK_CLIENT_MEDIA_GATE !== "true") {
+ throw new Error("PIIK_CLIENT_MEDIA_GATE=true is required");
}
const chromePath = process.env.CHROME_PATH?.trim();
if (!chromePath) throw new Error("CHROME_PATH is required");
if (!GATE_STUN_URLS) {
- throw new Error("SCREENER_CLIENT_GATE_STUN_URLS is required");
+ throw new Error("PIIK_CLIENT_GATE_STUN_URLS is required");
}
- const profile = await mkdtemp(join(tmpdir(), "screener-client-media-"));
+ const profile = await mkdtemp(join(tmpdir(), "piik-client-media-"));
// Keep network-capable binaries at a stable repository path. Windows
// associates its firewall decision with the full executable path; the
// disposable Browser profile remains in the system temp directory.
@@ -734,7 +734,7 @@ async function main(): Promise<void> {
"-OutputDirectory",
buildRoot,
]);
- const executable = join(buildRoot, "screener-client-capture.exe");
+ const executable = join(buildRoot, "piik-client-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];
@@ -775,7 +775,7 @@ async function main(): Promise<void> {
oscillator.frequency.value = 440;
oscillator.connect(gain).connect(context.destination);
oscillator.start();
- globalThis.__screenerAudioGate = { context, oscillator };
+ globalThis.__piikAudioGate = { context, oscillator };
return context.resume().then(() => context.state);
})()`,
Date.now() + 5_000,
@@ -785,7 +785,7 @@ async function main(): Promise<void> {
}
const targets = JSON.parse(run(executable, ["--list"])) as WindowTarget[];
const sourceKind: "window" | "display" =
- process.env.SCREENER_CLIENT_MEDIA_SOURCE === "display"
+ process.env.PIIK_CLIENT_MEDIA_SOURCE === "display"
? "display"
: "window";
const target = targets.find(
@@ -859,17 +859,17 @@ async function main(): Promise<void> {
await mkdir(nativeRoot, { recursive: true });
await copyFile(
executable,
- join(nativeRoot, "screener-client-capture.exe"),
+ join(nativeRoot, "piik-client-capture.exe"),
);
- const clientExecutable = join(packageRoot, "screener-client.exe");
- const go = process.env.SCREENER_GO?.trim() || "go";
+ const clientExecutable = join(packageRoot, "piik-client.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", [
"/d", "/s", "/c", "npm run build:client",
], ROOT);
run(
go,
- ["build", "-trimpath", "-o", clientExecutable, "./cmd/screener-client"],
+ ["build", "-trimpath", "-o", clientExecutable, "./cmd/piik-client"],
ROOT,
);
client = spawn(clientExecutable, [
@@ -880,7 +880,7 @@ async function main(): Promise<void> {
], {
stdio: "pipe",
windowsHide: true,
- env: { ...process.env, SCREENER_CLIENT_GATE_NO_BROWSER: "true" },
+ env: { ...process.env, PIIK_CLIENT_GATE_NO_BROWSER: "true" },
});
client.stderr.resume();
const endpoint = await readClientEndpoint(client);
diff --git a/scripts/client-native-host-gate.ts b/scripts/client-native-host-gate.ts
index 19ff9fe3..273e1426 100644
--- a/scripts/client-native-host-gate.ts
+++ b/scripts/client-native-host-gate.ts
@@ -29,7 +29,7 @@ import {
const ROOT = resolve(import.meta.dirname, "..");
const BUILD_ROOT = join(ROOT, "build", "client-check");
-export const SOURCE_TITLE = "Screener Native Gate Source";
+export const SOURCE_TITLE = "Piik Native Gate Source";
type GateMode = "local" | "cross-nat" | "one-link";
type VideoCodec = "h264" | "vp8";
@@ -40,7 +40,7 @@ const CODEC_PROBE = `(() => {
window.WebSocket = class extends BrowserSocket {
constructor(...args) { super(...args); sockets.push(this); }
};
- window.__screenerGatePublicSignal = () => sockets.some((socket) => {
+ window.__piikGatePublicSignal = () => sockets.some((socket) => {
const url = new URL(socket.url);
return socket.readyState === WebSocket.OPEN && url.protocol === 'wss:' &&
url.host === location.host && url.pathname === '/signal';
@@ -48,7 +48,7 @@ const CODEC_PROBE = `(() => {
window.RTCPeerConnection = class extends BrowserPeer {
constructor(...args) { super(...args); peers.push(this); }
};
- window.__screenerGateVideoCodec = async () => {
+ window.__piikGateVideoCodec = async () => {
const trackId = document.querySelector('video')?.srcObject?.getVideoTracks()[0]?.id;
if (!trackId) return null;
for (const peer of peers) {
@@ -240,7 +240,7 @@ async function clickHostControl(
async function readVideoCodec(cdp: CdpConnection, page: PageHandle): Promise<VideoCodec> {
const codec = await waitForValue(
- (deadline) => evaluate<VideoCodec | null>(cdp, page, "window.__screenerGateVideoCodec()", deadline),
+ (deadline) => evaluate<VideoCodec | null>(cdp, page, "window.__piikGateVideoCodec()", deadline),
(value) => value === "vp8" || value === "h264",
5_000,
);
@@ -254,14 +254,14 @@ async function assertVideoCodec(cdp: CdpConnection, page: PageHandle, expected:
}
function remoteOptions(): RemoteGateOptions {
- const host = process.env.SCREENER_REMOTE_HOST?.trim();
- const user = process.env.SCREENER_REMOTE_USER?.trim() || "root";
- const key = process.env.SCREENER_REMOTE_SSH_KEY?.trim();
- const signalPortText = process.env.SCREENER_REMOTE_SIGNAL_PORT?.trim() || "49721";
+ const host = process.env.PIIK_REMOTE_HOST?.trim();
+ const user = process.env.PIIK_REMOTE_USER?.trim() || "root";
+ const key = process.env.PIIK_REMOTE_SSH_KEY?.trim();
+ const signalPortText = process.env.PIIK_REMOTE_SIGNAL_PORT?.trim() || "49721";
const signalPort = Number(signalPortText);
if (!host || !key || !Number.isInteger(signalPort) || signalPort < 1024 || signalPort > 65_535) {
throw new Error(
- "SCREENER_REMOTE_HOST, SCREENER_REMOTE_SSH_KEY, and a valid SCREENER_REMOTE_SIGNAL_PORT are required",
+ "PIIK_REMOTE_HOST, PIIK_REMOTE_SSH_KEY, and a valid PIIK_REMOTE_SIGNAL_PORT are required",
);
}
return {
@@ -269,7 +269,7 @@ function remoteOptions(): RemoteGateOptions {
user,
key,
signalPort,
- bindAddress: process.env.SCREENER_REMOTE_BIND_ADDRESS?.trim() || null,
+ bindAddress: process.env.PIIK_REMOTE_BIND_ADDRESS?.trim() || null,
};
}
@@ -293,10 +293,10 @@ async function runRemotePeerGate(
viewerGrant: string,
origin: string,
): Promise<RemoteGateResult> {
- const ssh = process.env.SCREENER_SSH?.trim() || "ssh";
- const scp = process.env.SCREENER_SCP?.trim() || "scp";
+ const ssh = process.env.PIIK_SSH?.trim() || "ssh";
+ const scp = process.env.PIIK_SCP?.trim() || "scp";
const destination = `${options.user}@${options.host}`;
- const remotePath = `/tmp/screener-peer-gate-${randomBytes(8).toString("hex")}`;
+ const remotePath = `/tmp/piik-peer-gate-${randomBytes(8).toString("hex")}`;
const transportOptions = remoteTransportOptions(options);
try {
run(scp, [...transportOptions, binary, `${destination}:${remotePath}`]);
@@ -376,7 +376,7 @@ async function runRemotePeerGate(
}
export function powershell(): string {
- return process.env.SCREENER_POWERSHELL?.trim() || join(
+ return process.env.PIIK_POWERSHELL?.trim() || join(
process.env.SystemRoot || "C:\\Windows",
"System32",
"WindowsPowerShell",
@@ -550,44 +550,44 @@ async function main(): Promise<void> {
if (process.platform !== "win32") {
throw new Error("The native Host gate currently requires Windows");
}
- if (process.env.SCREENER_CLIENT_NATIVE_HOST_GATE !== "true") {
- throw new Error("SCREENER_CLIENT_NATIVE_HOST_GATE=true is required");
+ if (process.env.PIIK_CLIENT_NATIVE_HOST_GATE !== "true") {
+ throw new Error("PIIK_CLIENT_NATIVE_HOST_GATE=true is required");
}
- const crossNat = process.env.SCREENER_CLIENT_CROSS_NAT_GATE === "true";
- const linkMedia = process.env.SCREENER_CLIENT_LINK_MEDIA_GATE === "true";
+ const crossNat = process.env.PIIK_CLIENT_CROSS_NAT_GATE === "true";
+ const linkMedia = process.env.PIIK_CLIENT_LINK_MEDIA_GATE === "true";
if (crossNat && linkMedia) {
throw new Error("Cross-NAT and one-link gate modes are mutually exclusive");
}
const mode: GateMode = linkMedia ? "one-link" : crossNat ? "cross-nat" : "local";
- const gateStunUrls = process.env.SCREENER_CLIENT_GATE_STUN_URLS?.trim();
+ const gateStunUrls = process.env.PIIK_CLIENT_GATE_STUN_URLS?.trim();
if (mode === "cross-nat" && !gateStunUrls) {
- throw new Error("SCREENER_CLIENT_GATE_STUN_URLS is required for the cross-NAT gate");
+ throw new Error("PIIK_CLIENT_GATE_STUN_URLS is required for the cross-NAT gate");
}
const crashGate =
- process.env.SCREENER_CLIENT_NATIVE_HOST_CRASH_GATE === "true";
+ process.env.PIIK_CLIENT_NATIVE_HOST_CRASH_GATE === "true";
if (crashGate && mode !== "local") {
throw new Error("Client crash gate requires local mode");
}
const sourceKind: "window" | "display" =
- process.env.SCREENER_CLIENT_NATIVE_HOST_SOURCE === "display"
+ process.env.PIIK_CLIENT_NATIVE_HOST_SOURCE === "display"
? "display"
: "window";
- const requestedCodec = process.env.SCREENER_CLIENT_NATIVE_HOST_CODEC?.trim() || "auto";
+ const requestedCodec = process.env.PIIK_CLIENT_NATIVE_HOST_CODEC?.trim() || "auto";
if (requestedCodec !== "auto" && requestedCodec !== "h264" && requestedCodec !== "vp8") {
- throw new Error("SCREENER_CLIENT_NATIVE_HOST_CODEC must be auto, h264, or vp8");
+ throw new Error("PIIK_CLIENT_NATIVE_HOST_CODEC must be auto, h264, or vp8");
}
const remote = mode === "cross-nat" || mode === "one-link" &&
- Boolean(process.env.SCREENER_REMOTE_HOST?.trim() || process.env.SCREENER_REMOTE_SSH_KEY?.trim())
+ Boolean(process.env.PIIK_REMOTE_HOST?.trim() || process.env.PIIK_REMOTE_SSH_KEY?.trim())
? remoteOptions() : null;
const chromePath = process.env.CHROME_PATH?.trim();
if (!chromePath) throw new Error("CHROME_PATH is required");
- const go = process.env.SCREENER_GO?.trim() || "go";
- const tunnel = process.env.SCREENER_CLOUDFLARED?.trim() || join(
+ const go = process.env.PIIK_GO?.trim() || "go";
+ const tunnel = process.env.PIIK_CLOUDFLARED?.trim() || join(
BUILD_ROOT,
"cloudflared.exe",
);
- const profile = await mkdtemp(join(tmpdir(), "screener-client-media-"));
- const sourceProfile = await mkdtemp(join(tmpdir(), "screener-client-media-"));
+ const profile = await mkdtemp(join(tmpdir(), "piik-client-media-"));
+ const sourceProfile = await mkdtemp(join(tmpdir(), "piik-client-media-"));
await mkdir(BUILD_ROOT, { recursive: true });
const diagnosticDirectory = await mkdtemp(join(BUILD_ROOT, "native-host-gate-"));
const sourcePort = await reservePort();
@@ -596,9 +596,9 @@ async function main(): Promise<void> {
const sourceDebugPort = await reservePort();
const clientConfig = join(profile, "client.json");
const captureBuild = BUILD_ROOT;
- const clientBinary = join(BUILD_ROOT, "screener-client.exe");
- const captureBinary = join(captureBuild, "screener-client-capture.exe");
- const remoteBinary = join(BUILD_ROOT, "screener-peer-gate-linux");
+ const clientBinary = join(BUILD_ROOT, "piik-client.exe");
+ const captureBinary = join(captureBuild, "piik-client-capture.exe");
+ const remoteBinary = join(BUILD_ROOT, "piik-peer-gate-linux");
let source: { close(): Promise<void> } | null = null;
let client: ChildProcessWithoutNullStreams | null = null;
let sourceChrome: ChildProcessWithoutNullStreams | null = null;
@@ -669,13 +669,13 @@ 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/screener-client",
+ "build", "-p", "1", "-trimpath", "-o", clientBinary, "./cmd/piik-client",
], ROOT, { ...process.env, GOMAXPROCS: "2" });
if (remote) {
stage = "remote-peer-build";
run(
go,
- ["build", "-trimpath", "-o", remoteBinary, "./cmd/screener-peer-gate"],
+ ["build", "-trimpath", "-o", remoteBinary, "./cmd/piik-peer-gate"],
ROOT,
{ ...process.env, GOOS: "linux", GOARCH: "amd64", CGO_ENABLED: "0" },
);
@@ -703,8 +703,8 @@ async function main(): Promise<void> {
windowsHide: true,
env: {
...process.env,
- SCREENER_DEBUG: "",
- SCREENER_CLIENT_GATE_NO_BROWSER: "true",
+ PIIK_DEBUG: "",
+ PIIK_CLIENT_GATE_NO_BROWSER: "true",
// STUN_URLS reaches only the Client's own Pion edge: the in-process
// room server never reads it, so the cross-NAT arm stays isolated.
...(mode === "cross-nat" && gateStunUrls
@@ -719,7 +719,7 @@ async function main(): Promise<void> {
if (mode === "cross-nat" && remote) {
stage = "signaling-tunnel";
const tunnel = spawn(
- process.env.SCREENER_SSH?.trim() || "ssh",
+ process.env.PIIK_SSH?.trim() || "ssh",
[
"-N", "-T",
...remoteTransportOptions(remote),
@@ -761,7 +761,7 @@ async function main(): Promise<void> {
cdp = await CdpConnection.connect(version.webSocketDebuggerUrl, Date.now() + 10_000);
const hostBootstrap = new URLSearchParams({
...(clientInfo.password ? { "client-access": clientInfo.password } : {}),
- "screener-client": "1",
+ "piik-client": "1",
}).toString();
stage = "host-page";
const host = await createPage(
@@ -942,7 +942,7 @@ async function main(): Promise<void> {
`location.origin === ${JSON.stringify(clientInfo.publicOrigin)} && location.pathname === ${JSON.stringify(viewerURL.pathname)}`,
Date.now() + 5_000);
result.publicViewerSignal = await evaluate<boolean>(cdp, viewer,
- "window.__screenerGatePublicSignal()", Date.now() + 5_000);
+ "window.__piikGatePublicSignal()", Date.now() + 5_000);
} else {
await evaluate<boolean>(
cdp,
@@ -950,8 +950,8 @@ async function main(): Promise<void> {
`(() => {
const video = document.querySelector('video');
if (!video) return false;
- window.__screenerGateMedia = video.srcObject;
- return window.__screenerGateMedia !== null;
+ window.__piikGateMedia = video.srcObject;
+ return window.__piikGateMedia !== null;
})()`,
Date.now() + 5_000,
);
@@ -1151,7 +1151,7 @@ async function main(): Promise<void> {
frames: video?.getVideoPlaybackQuality().totalVideoFrames ?? 0,
width: video?.videoWidth ?? 0,
height: video?.videoHeight ?? 0,
- sameMedia: Boolean(video && video.srcObject === window.__screenerGateMedia),
+ sameMedia: Boolean(video && video.srcObject === window.__piikGateMedia),
};
})()`,
deadline,
@@ -1213,7 +1213,7 @@ async function main(): Promise<void> {
await waitForValue((deadline) => evaluate<boolean>(cdp!, viewer,
`(() => {
const video = document.querySelector('video');
- return Boolean(video && video.srcObject === window.__screenerGateMedia &&
+ return Boolean(video && video.srcObject === window.__piikGateMedia &&
video.videoWidth === ${width} && video.videoHeight === ${height} &&
video.getVideoPlaybackQuality().totalVideoFrames >= ${before + 10});
})()`, deadline,
@@ -1275,7 +1275,7 @@ async function main(): Promise<void> {
`(() => {
const video = document.querySelector('video');
return Boolean(
- video && video.srcObject === window.__screenerGateMedia &&
+ video && video.srcObject === window.__piikGateMedia &&
video.videoWidth === 854 && video.videoHeight === 480 &&
video.getVideoPlaybackQuality().totalVideoFrames >= ${framesBeforeSourceChange + 10}
);
@@ -1298,7 +1298,7 @@ async function main(): Promise<void> {
return diagnostics.split(/\r?\n/).some((line) => {
try {
const record = JSON.parse(line);
- return record.msg === "screener-route" && record.event === "sender-quality-evidence" &&
+ return record.msg === "piik-route" && record.event === "sender-quality-evidence" &&
(record.state === "healthy" || record.state === "degraded");
} catch {
return false;
@@ -1383,7 +1383,7 @@ async function main(): Promise<void> {
`(() => {
const video = document.querySelector('video');
return Boolean(video && video.srcObject &&
- video.srcObject !== window.__screenerGateMedia &&
+ video.srcObject !== window.__piikGateMedia &&
video.videoWidth === 854 && video.videoHeight === 480);
})()`,
deadline,
diff --git a/scripts/client-package-targets.mjs b/scripts/client-package-targets.mjs
index 69763944..f31a1dd9 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: "screener-client.exe",
+ clientName: "piik-client.exe",
tunnelName: "cloudflared.exe",
- captureName: "screener-client-capture.exe",
+ captureName: "piik-client-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: "screener-client",
+ clientName: "piik-client",
tunnelName: "cloudflared",
- captureName: "screener-client-capture",
+ captureName: "piik-client-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: "screener-client",
+ clientName: "piik-client",
tunnelName: "cloudflared",
- captureName: "screener-client-capture",
+ captureName: "piik-client-capture",
tunnelAsset: "cloudflared-darwin-arm64.tgz",
tunnelSha256: "40c9144d86df8937c5b43293a1f7d2d2107029aa74725023dd46b1b27154352f",
tunnelArchive: true,
diff --git a/scripts/embedded-sfu-gate.ts b/scripts/embedded-sfu-gate.ts
index 4cf212ee..fae20b07 100644
--- a/scripts/embedded-sfu-gate.ts
+++ b/scripts/embedded-sfu-gate.ts
@@ -22,9 +22,9 @@ const AUDIO_PROBE = `(() => {
window.RTCPeerConnection = class extends BrowserPeer {
constructor(...args) { super(...args); peers.push(this); }
};
- window.__screenerGateAudioEnergy = async () => {
+ window.__piikGateAudioEnergy = async () => {
const trackId = document.querySelector('video')?.srcObject?.getAudioTracks()[0]?.id;
- const diagnostic = window.__screenerGateAudioStats = { hasAudioTrack: !!trackId, peerCount: peers.length, inbound: [] };
+ const diagnostic = window.__piikGateAudioStats = { hasAudioTrack: !!trackId, peerCount: peers.length, inbound: [] };
if (!trackId) return 0;
for (const peer of peers) {
if (peer.connectionState !== 'connected') continue;
@@ -54,26 +54,26 @@ async function udpPort(requested = 0): Promise<number> {
}
async function main(): Promise<void> {
- if (process.env.SCREENER_EMBEDDED_SFU_GATE !== "true") {
- throw new Error("SCREENER_EMBEDDED_SFU_GATE=true is required; this is an explicit local Browser media gate");
+ if (process.env.PIIK_EMBEDDED_SFU_GATE !== "true") {
+ throw new Error("PIIK_EMBEDDED_SFU_GATE=true is required; this is an explicit local Browser media gate");
}
const chromePath = process.env.CHROME_PATH?.trim();
if (!chromePath) throw new Error("CHROME_PATH is required");
- const nativeArm = process.env.SCREENER_EMBEDDED_SFU_NATIVE === "true";
- const twoRooms = process.env.SCREENER_EMBEDDED_SFU_TWO_ROOMS === "true";
+ const nativeArm = process.env.PIIK_EMBEDDED_SFU_NATIVE === "true";
+ const twoRooms = process.env.PIIK_EMBEDDED_SFU_TWO_ROOMS === "true";
if (twoRooms && !nativeArm) throw new Error("Two-room arm requires Native publication");
- const codec = process.env.SCREENER_EMBEDDED_SFU_CODEC?.trim() || "vp8";
+ const codec = process.env.PIIK_EMBEDDED_SFU_CODEC?.trim() || "vp8";
if (codec !== "vp8" && codec !== "h264") throw new Error("SFU gate codec must be vp8 or h264");
- const captureBinary = process.env.SCREENER_CAPTURE_PROCESS?.trim();
+ const captureBinary = process.env.PIIK_CAPTURE_PROCESS?.trim();
if (nativeArm && (process.platform !== "win32" || !captureBinary)) {
- throw new Error("Native arm requires Windows and SCREENER_CAPTURE_PROCESS");
+ throw new Error("Native arm requires Windows and PIIK_CAPTURE_PROCESS");
}
await mkdir(BUILD_ROOT, { recursive: true });
- const binary = join(BUILD_ROOT, `screener-server${process.platform === "win32" ? ".exe" : ""}`);
- const clientBinary = join(BUILD_ROOT, "screener-client.exe");
- for (const command of nativeArm ? ["screener-server", "screener-client"] : ["screener-server"]) {
- const build = spawnSync(process.env.SCREENER_GO?.trim() || "go", [
- "build", "-p", "1", "-trimpath", "-o", command === "screener-server" ? binary : clientBinary, `./cmd/${command}`,
+ 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 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 });
if (build.error || build.status !== 0) throw build.error ?? new Error(build.stderr || `${command} build failed`);
}
@@ -82,8 +82,8 @@ async function main(): Promise<void> {
]);
const origin = `http://127.0.0.1:${vitePort}`;
const backend = `http://127.0.0.1:${serverPort}`;
- const profile = await mkdtemp(join(tmpdir(), "screener-client-media-"));
- const sourceProfile = nativeArm ? await mkdtemp(join(tmpdir(), "screener-client-media-")) : null;
+ const profile = await mkdtemp(join(tmpdir(), "piik-client-media-"));
+ const sourceProfile = nativeArm ? await mkdtemp(join(tmpdir(), "piik-client-media-")) : null;
const [sourcePort, sourceDebugPort] = nativeArm ? [await reservePort(), await reservePort()] : [0, 0];
const result = { passed: false, arm: `${nativeArm ? "native" : "browser"}-${codec}-simulcast${twoRooms ? "-two-rooms" : ""}`, stage: "start",
startedAt: new Date().toISOString(), finishedAt: "", processes: [] as Array<{ role: string; pid: number | null }>,
@@ -132,7 +132,7 @@ async function main(): Promise<void> {
try {
server = spawn(binary, [], { cwd: ROOT, stdio: "pipe", windowsHide: true,
env: { PATH: process.env.PATH, SystemRoot: process.env.SystemRoot,
- SCREENER_ENV: "development", LISTEN_HOST: "127.0.0.1", PORT: String(serverPort),
+ PIIK_ENV: "development", LISTEN_HOST: "127.0.0.1", PORT: String(serverPort),
PUBLIC_BASE_URL: origin, ALLOWED_ORIGINS: origin,
SFU_LISTEN_HOST: "127.0.0.1", SFU_UDP_PORT: String(mediaPort), SFU_PUBLIC_IP: "127.0.0.1" },
});
@@ -157,7 +157,7 @@ async function main(): Promise<void> {
result.stage = "native-client-start";
client = spawn(clientBinary, ["--site", origin, "--capture-process", captureBinary!,
"--config", join(profile, "client.json")], { cwd: ROOT, stdio: "pipe", windowsHide: true,
- env: { ...process.env, GOMAXPROCS: "2", SCREENER_CLIENT_GATE_NO_BROWSER: "true" } });
+ env: { ...process.env, GOMAXPROCS: "2", PIIK_CLIENT_GATE_NO_BROWSER: "true" } });
processStarted("client", client);
client.stderr.resume();
clientPort = (await readClientEndpoint(client, { timeoutMs: 15_000, ignoreNonEndpointLines: true })).port;
@@ -266,7 +266,7 @@ async function main(): Promise<void> {
} catch (error) {
result.error = error instanceof Error ? error.message : String(error);
if (viewer && cdp && result.stage === "decoded-audio-energy") result.audioDiagnostics = await evaluate(
- cdp, viewer, "window.__screenerGateAudioStats ?? null", Date.now() + 3_000).catch(() => null);
+ cdp, viewer, "window.__piikGateAudioStats ?? null", Date.now() + 3_000).catch(() => null);
if (server?.exitCode !== null && serverError) result.error += `; server: ${serverError}`;
} finally {
const pagesStopped = await Promise.all([host, viewer, secondHost, secondViewer].map((page) =>
diff --git a/scripts/embedded-sfu-page.ts b/scripts/embedded-sfu-page.ts
index 3b500c0d..d84aeb31 100644
--- a/scripts/embedded-sfu-page.ts
+++ b/scripts/embedded-sfu-page.ts
@@ -249,7 +249,7 @@ export function snapshot() {
}
export async function audioEnergy(): Promise<number> {
- const probe = (window as unknown as { __screenerGateAudioEnergy: () => Promise<number> }).__screenerGateAudioEnergy;
+ const probe = (window as unknown as { __piikGateAudioEnergy: () => Promise<number> }).__piikGateAudioEnergy;
return await probe();
}
diff --git a/scripts/encoded-group-decode.mjs b/scripts/encoded-group-decode.mjs
index 473494d3..83bb2c6a 100644
--- a/scripts/encoded-group-decode.mjs
+++ b/scripts/encoded-group-decode.mjs
@@ -4,8 +4,8 @@ import { readFile, writeFile } from "node:fs/promises";
import { createServer } from "node:http";
import { resolve } from "node:path";
-const customInput = process.env.SCREENER_ENCODED_OUTPUT;
-const codec = process.env.SCREENER_ENCODED_CODEC ?? "vp8";
+const customInput = process.env.PIIK_ENCODED_OUTPUT;
+const codec = process.env.PIIK_ENCODED_CODEC ?? "vp8";
assert.ok(["vp8", "avc1.42c033"].includes(codec), "Expected VP8 or constrained-baseline H264");
const inputPath = customInput ? resolve(customInput) : new URL("../build/embedded-media/encoded-group.received.json", import.meta.url);
const input = await readFile(inputPath);
diff --git a/scripts/install-hooks.ps1 b/scripts/install-hooks.ps1
index b08f1cb8..93988b1e 100644
--- a/scripts/install-hooks.ps1
+++ b/scripts/install-hooks.ps1
@@ -2,7 +2,7 @@ $ErrorActionPreference = "Stop"
$repoRoot = git rev-parse --show-toplevel
if ($LASTEXITCODE -ne 0) {
- throw "This command must run inside the Screener Git repository."
+ throw "This command must run inside the Piik Git repository."
}
git -C $repoRoot config core.hooksPath .githooks
diff --git a/scripts/package-app-release.mjs b/scripts/package-app-release.mjs
index 35063867..d396c447 100644
--- a/scripts/package-app-release.mjs
+++ b/scripts/package-app-release.mjs
@@ -26,7 +26,7 @@ import { resetBuildWorkspace } from "./build-workspace.mjs";
// as the service user, so the release is always built for linux/amd64, and
// CGO_ENABLED=0 keeps it self-contained.
const SERVER_TARGET = { goos: "linux", goarch: "amd64" };
-const SERVER_NAME = "screener-server";
+const SERVER_NAME = "piik-server";
// Everything the archive may contain. deploy/release-app.sh enforces the same
// four names in its entry allowlist and manifest pattern; both change together.
@@ -198,7 +198,7 @@ const verifyRoot = join(temporaryRoot, "verify");
try {
mkdirSync(runtimeRoot, { recursive: true });
copyFileSync(join(repositoryRoot, "LICENSE"), join(runtimeRoot, "LICENSE"));
- const goCommand = process.env.SCREENER_GO?.trim() || "go";
+ const goCommand = process.env.PIIK_GO?.trim() || "go";
const serverPath = join(runtimeRoot, SERVER_NAME);
run(goCommand, [
"build",
@@ -207,7 +207,7 @@ try {
`-s -w -X main.BuildRevision=${revision}`,
"-o",
serverPath,
- "./cmd/screener-server",
+ "./cmd/piik-server",
], repositoryRoot, {
...process.env,
GOOS: SERVER_TARGET.goos,
@@ -225,9 +225,9 @@ try {
writeFileSync(join(runtimeRoot, "REVISION"), `${revision}\n`, "ascii");
const records = recordsFor(runtimeRoot);
- const manifestName = `screener-${releaseId}.manifest.tsv`;
- const artifactName = `screener-${releaseId}-runtime.tar.gz`;
- const descriptorName = `screener-${releaseId}.release.json`;
+ const manifestName = `piik-${releaseId}.manifest.tsv`;
+ const artifactName = `piik-${releaseId}-runtime.tar.gz`;
+ const descriptorName = `piik-${releaseId}.release.json`;
mkdirSync(outputRoot, { recursive: false, mode: 0o700 });
const manifestPath = join(outputRoot, manifestName);
const artifactPath = join(outputRoot, artifactName);
diff --git a/scripts/package-client-candidate.mjs b/scripts/package-client-candidate.mjs
index 5f024623..1e332873 100644
--- a/scripts/package-client-candidate.mjs
+++ b/scripts/package-client-candidate.mjs
@@ -155,7 +155,7 @@ async function verifyLocalPackage(root, target, temporaryRoot) {
"--port", String(port),
], {
cwd: root,
- env: { ...process.env, SCREENER_CLIENT_GATE_NO_BROWSER: "true" },
+ env: { ...process.env, PIIK_CLIENT_GATE_NO_BROWSER: "true" },
stdio: "pipe",
windowsHide: true,
});
@@ -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", "screener-client.desktop");
+ const desktop = join(root, "share", "applications", "piik-client.desktop");
const icon = join(
root,
"share",
@@ -270,12 +270,12 @@ function verifyPlatformAssets(root, target) {
"hicolor",
"256x256",
"apps",
- "screener-client.png",
+ "piik-client.png",
);
if (!existsSync(desktop) || !existsSync(icon)) {
fail("Linux Client icon assets are missing");
}
- if (!readFileSync(desktop, "utf8").includes("Icon=screener-client\n")) {
+ if (!readFileSync(desktop, "utf8").includes("Icon=piik-client\n")) {
fail("Linux desktop entry does not name its icon");
}
if (!readFileSync(icon).subarray(0, 8).equals(Buffer.from([
@@ -285,10 +285,10 @@ function verifyPlatformAssets(root, target) {
}
}
if (target.goos === "darwin") {
- const bundle = join(root, "Screener Client.app");
+ const bundle = join(root, "Piik Client.app");
const launcher = join(bundle, "Contents", "MacOS", "Launcher");
const plist = join(bundle, "Contents", "Info.plist");
- const icon = join(bundle, "Contents", "Resources", "screener.icns");
+ const icon = join(bundle, "Contents", "Resources", "piik.icns");
if (!existsSync(launcher) || !existsSync(plist) || !existsSync(icon)) {
fail("macOS Client app icon assets are missing");
}
@@ -352,7 +352,7 @@ try {
capture = join(repositoryRoot, "build", "client-check", target.captureName);
}
- const packageRoot = join(temporaryRoot, `Screener-Client-${target.id}`);
+ const packageRoot = join(temporaryRoot, `Piik-Client-${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 = `Screener-Client-${target.id}-${shortRevision}.tar.gz`;
+ const archiveName = `Piik-Client-${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.mjs
index ea9b47b4..6c5b4e33 100644
--- a/scripts/package-licenses.mjs
+++ b/scripts/package-licenses.mjs
@@ -42,7 +42,7 @@ export function writeWebLicenseNotices(repositoryRoot, outputFile) {
const visited = new Set();
const entries = new Map();
for (const [name, parent] of queue) {
- const paths = createRequire(parent).resolve.paths("screener-license-lookup");
+ const paths = createRequire(parent).resolve.paths("piik-license-lookup");
const directory = paths.map((path) => join(path, name))
.find((path) => existsSync(join(path, "package.json")));
if (!directory) throw new Error(`Missing installed runtime dependency ${name}`);
@@ -64,7 +64,7 @@ export function writeWebLicenseNotices(repositoryRoot, outputFile) {
}
mkdirSync(dirname(outputFile), { recursive: true });
writeFileSync(outputFile, "Third-party software notices\n" +
- "Screener's MIT license does not replace the following component licenses.\n" +
+ "Piik's MIT license does not replace the following component licenses.\n" +
[...entries].sort(([a], [b]) => a.localeCompare(b)).map(([, body]) => body).join(""));
}
@@ -109,10 +109,10 @@ function moduleSections(modules) {
}
// writeServerLicenseNotices produces the Hosted application release notice file,
-// which ships beside the single screener-server binary.
+// which ships beside the single piik-server binary.
export function writeServerLicenseNotices(repositoryRoot, outputFile, goCommand, target) {
- const notices = goNotices(repositoryRoot, goCommand, target, "./cmd/screener-server");
- writeFileSync(outputFile, "Screener server third-party software notices\n" +
+ const notices = goNotices(repositoryRoot, goCommand, target, "./cmd/piik-server");
+ writeFileSync(outputFile, "Piik server third-party software notices\n" +
WEB_NOTICE_LINE + notices.toolchain + moduleSections(notices.modules));
}
@@ -122,7 +122,7 @@ export function writeClientLicenseNotices(repositoryRoot, packageRoot, goCommand
writeFileSync(join(packageRoot, "runtime", "tunnel", "THIRD-PARTY-NOTICES.txt"),
pinnedNotice(`cloudflared@${tunnelVersion}`));
}
- const notices = goNotices(repositoryRoot, goCommand, target, "./cmd/screener-client");
+ const notices = goNotices(repositoryRoot, goCommand, target, "./cmd/piik-client");
let text = "Native Client third-party software notices\n" +
WEB_NOTICE_LINE +
(tunnelVersion ? "Cloudflared: runtime/tunnel/THIRD-PARTY-NOTICES.txt\n" : "") +
diff --git a/scripts/peer-assisted-benchmark.ts b/scripts/peer-assisted-benchmark.ts
index f89c712a..1ba191f5 100644
--- a/scripts/peer-assisted-benchmark.ts
+++ b/scripts/peer-assisted-benchmark.ts
@@ -1680,11 +1680,11 @@ function buildBenchmarkInitScript(options: {
}): string {
const serialized = JSON.stringify(options);
return `(() => {
- if (globalThis.__SCREENER_BENCHMARK__) return;
+ if (globalThis.__PIIK_BENCHMARK__) return;
const options = ${serialized};
const expectedRoleCap = options.expectedEndpointCap;
if (options.clearHostRoom) {
- try { localStorage.removeItem("screener:host-room:v1"); } catch {}
+ try { localStorage.removeItem("piik:host-room:v1"); } catch {}
}
const state = {
label: options.label,
@@ -2226,7 +2226,7 @@ function buildBenchmarkInitScript(options: {
function markShareRequested() {
state.shareRequestedAtEpochMs = Date.now();
}
- Object.defineProperty(globalThis, "__SCREENER_BENCHMARK__", {
+ Object.defineProperty(globalThis, "__PIIK_BENCHMARK__", {
configurable: false,
value: { sample, progress, snapshot, canarySnapshot, senderDegradationPreferences, sendViewerQualityEvidence, markShareRequested, requestRouteDiagnosticSnapshot, routeDiagnosticTimingSamples, stop: () => clearInterval(videoObserver) },
});
@@ -2262,23 +2262,23 @@ function buildStep(command: string, args: string[], failure: string): void {
}
}
-// buildServer compiles the Screener server this run starts. The Web assets are
+// buildServer compiles the Piik server this run starts. The Web assets are
// embedded, so the Vite build precedes the Go build and the Browser reaches the
// same bundle the binary serves.
function buildServer(): string {
- const go = process.env.SCREENER_GO?.trim() || "go";
+ const go = process.env.PIIK_GO?.trim() || "go";
const buildRoot = join(REPO_ROOT, "build", "peer-benchmark");
mkdirSync(buildRoot, { recursive: true });
const output = join(buildRoot,
- process.platform === "win32" ? "screener-server.exe" : "screener-server");
+ process.platform === "win32" ? "piik-server.exe" : "piik-server");
if (process.platform === "win32") {
buildStep(process.env.ComSpec || "cmd.exe", ["/d", "/s", "/c", "npm run build:client"],
"Browser client build failed");
} else {
buildStep("npm", ["run", "build:client"], "Browser client build failed");
}
- buildStep(go, ["build", "-trimpath", "-o", output, "./cmd/screener-server"],
- "Screener server build failed");
+ buildStep(go, ["build", "-trimpath", "-o", output, "./cmd/piik-server"],
+ "Piik server build failed");
return output;
}
@@ -2431,7 +2431,7 @@ async function createPage(
await waitForPage(
cdp,
page,
- "document.readyState === 'complete' && Boolean(globalThis.__SCREENER_BENCHMARK__)",
+ "document.readyState === 'complete' && Boolean(globalThis.__PIIK_BENCHMARK__)",
15_000,
"page initialization",
signal,
@@ -2484,7 +2484,7 @@ async function quickSnapshot(
return evaluate<PageObservation>(
cdp,
page,
- "globalThis.__SCREENER_BENCHMARK__.snapshot()",
+ "globalThis.__PIIK_BENCHMARK__.snapshot()",
);
}
@@ -2495,7 +2495,7 @@ async function detailedSample(
return evaluate<PageObservation>(
cdp,
page,
- "globalThis.__SCREENER_BENCHMARK__.sample()",
+ "globalThis.__PIIK_BENCHMARK__.sample()",
);
}
@@ -2506,7 +2506,7 @@ async function progressSample(
return evaluate<PageObservation>(
cdp,
page,
- "globalThis.__SCREENER_BENCHMARK__.progress()",
+ "globalThis.__PIIK_BENCHMARK__.progress()",
);
}
@@ -2600,7 +2600,7 @@ async function startHost(
profile.click();
const start = document.querySelector('.lr-entry-actions button.lr-tv-big.is-action[aria-label]');
if (!(start instanceof HTMLButtonElement)) throw new Error('Start button missing');
- globalThis.__SCREENER_BENCHMARK__.markShareRequested();
+ globalThis.__PIIK_BENCHMARK__.markShareRequested();
start.click();
return true;
})()`,
@@ -2608,7 +2608,7 @@ async function startHost(
await waitForPage(
cdp,
page,
- "globalThis.__SCREENER_BENCHMARK__.snapshot().peerId !== null",
+ "globalThis.__PIIK_BENCHMARK__.snapshot().peerId !== null",
timeoutMs,
"host signaling authentication",
signal,
@@ -2655,7 +2655,7 @@ async function requestRouteTimingSummary(
const requested = await evaluate<boolean>(
cdp,
hostPage,
- "globalThis.__SCREENER_BENCHMARK__.requestRouteDiagnosticSnapshot()",
+ "globalThis.__PIIK_BENCHMARK__.requestRouteDiagnosticSnapshot()",
);
if (!requested) {
throw new Error("Host route diagnostic request was unavailable");
@@ -2663,7 +2663,7 @@ async function requestRouteTimingSummary(
await waitForPage(
cdp,
hostPage,
- "globalThis.__SCREENER_BENCHMARK__.routeDiagnosticTimingSamples() !== null",
+ "globalThis.__PIIK_BENCHMARK__.routeDiagnosticTimingSamples() !== null",
timeoutMs,
"Host route diagnostic snapshot",
signal,
@@ -2671,7 +2671,7 @@ async function requestRouteTimingSummary(
const samples = await evaluate<BenchmarkRouteTimingSamples>(
cdp,
hostPage,
- "globalThis.__SCREENER_BENCHMARK__.routeDiagnosticTimingSamples()",
+ "globalThis.__PIIK_BENCHMARK__.routeDiagnosticTimingSamples()",
);
return summarizeBenchmarkRouteTiming(samples);
}
@@ -2849,7 +2849,7 @@ async function runQualityControlSmoke(
waitForPage(
cdp,
page,
- `JSON.stringify(globalThis.__SCREENER_BENCHMARK__.snapshot().qualitySettings) === ${serializedSettings}`,
+ `JSON.stringify(globalThis.__PIIK_BENCHMARK__.snapshot().qualitySettings) === ${serializedSettings}`,
10_000,
`${settings.degradationPreference} quality propagation`,
signal,
@@ -2878,7 +2878,7 @@ async function runQualityControlSmoke(
sendingPages.map(async (page) => {
const expectedCount = activeSenderCounts.get(page.label) ?? 0;
const predicate = `(() => {
- const values = globalThis.__SCREENER_BENCHMARK__.senderDegradationPreferences();
+ const values = globalThis.__PIIK_BENCHMARK__.senderDegradationPreferences();
return values.length === ${expectedCount} &&
values.every((value) => value === ${JSON.stringify(preference)});
})()`;
@@ -3236,7 +3236,7 @@ async function runViewerMbbCanary(
const oldFrames = old.receiveTotals?.framesTotal ?? 0;
const revision = target.routeRevision;
const send = (page: PageHandle, method: string, message: unknown) =>
- evaluate<boolean>(cdp, page, `globalThis.__SCREENER_BENCHMARK__.${method}(${JSON.stringify(message)})`);
+ evaluate<boolean>(cdp, page, `globalThis.__PIIK_BENCHMARK__.${method}(${JSON.stringify(message)})`);
let windows = 0;
for (let sequence = 0; sequence < 3; sequence += 1) {
const windowSent = await send(targetHandle, "sendViewerQualityEvidence", {
@@ -3303,7 +3303,7 @@ async function canary(cdp: CdpConnection, page: PageHandle): Promise<{
prepareUpdates: number; activeUpdates: number; routeFailed: number;
maxActiveOutboundMediaEdges: number;
}> {
- return evaluate(cdp, page, "globalThis.__SCREENER_BENCHMARK__.canarySnapshot()");
+ return evaluate(cdp, page, "globalThis.__PIIK_BENCHMARK__.canarySnapshot()");
}
function canaryChecks(result: ViewerMbbCanaryResult): RunCheck[] {
@@ -3360,7 +3360,7 @@ async function runCase(
cdp,
hostPage,
`(() => {
- const grant = sessionStorage.getItem('screener:viewer-grant:${roomId}');
+ const grant = sessionStorage.getItem('piik:viewer-grant:${roomId}');
return grant ? location.origin + '/r/${roomId}#v=' + grant : '';
})()`,
);
@@ -3702,7 +3702,7 @@ async function main(): Promise<number> {
const appPort = externalServer ? null : await reservePort();
const debugPort = await reservePort();
const baseUrl = externalServer?.origin ?? `http://127.0.0.1:${appPort}`;
- profileDirectory = await mkdtemp(join(tmpdir(), "screener-peer-benchmark-"));
+ profileDirectory = await mkdtemp(join(tmpdir(), "piik-peer-benchmark-"));
if (appPort !== null) {
// An explicit environment and a profile working directory: the measured
// configuration is exactly these values, never the repository's .env or
@@ -3711,7 +3711,7 @@ async function main(): Promise<number> {
server = startProcess(buildServer(), [], {
PATH: process.env.PATH,
SystemRoot: process.env.SystemRoot,
- SCREENER_ENV: "development",
+ PIIK_ENV: "development",
PORT: String(appPort),
LISTEN_HOST: "127.0.0.1",
PUBLIC_BASE_URL: baseUrl,
diff --git a/scripts/required-project-paths.txt b/scripts/required-project-paths.txt
index a9fa9061..b2d33fc1 100644
--- a/scripts/required-project-paths.txt
+++ b/scripts/required-project-paths.txt
@@ -39,10 +39,10 @@ scripts/client-icons.mjs
scripts/package-client-candidate.mjs
scripts/check-client.mjs
scripts/client-native-host-gate.ts
-cmd/screener-server/main.go
-cmd/screener-peer-gate/main.go
-cmd/screener-client/screener.ico
-cmd/screener-client/screener_windows_amd64.syso
+cmd/piik-server/main.go
+cmd/piik-peer-gate/main.go
+cmd/piik-client/piik.ico
+cmd/piik-client/piik_windows_amd64.syso
internal/server/webassets/dist/.gitkeep
deploy/release-app.sh
deploy/check-release.sh
diff --git a/src/client/lib/creation-profile.ts b/src/client/lib/creation-profile.ts
index 1a6eb729..ae76ba60 100644
--- a/src/client/lib/creation-profile.ts
+++ b/src/client/lib/creation-profile.ts
@@ -4,7 +4,7 @@ import {
type CodeEntryPolicy,
} from "../../shared/protocol";
-const CREATION_PROFILE_STORAGE_KEY = "screener:host-creation-profile:v1";
+const CREATION_PROFILE_STORAGE_KEY = "piik:host-creation-profile:v1";
export interface HostCreationProfile {
codeEntryPolicy: CodeEntryPolicy;
diff --git a/src/client/lib/debug.ts b/src/client/lib/debug.ts
index 65828ccf..857de3a5 100644
--- a/src/client/lib/debug.ts
+++ b/src/client/lib/debug.ts
@@ -28,7 +28,7 @@ function safeText(value: string): string {
.replace(/\bv=0\r?\n[\s\S]*/g, "[redacted SDP]")
.replace(/\b(?:set-cookie|cookie|authorization)\s*:[^\r\n]*/gi, "[redacted credential header]")
.replace(/\b(?:Bearer|Basic)\s+[^\s,;"']+/gi, "[redacted authorization]")
- .replace(/screener-client-v\d+\.[A-Za-z0-9_-]+/g, "[redacted Client capability]")
+ .replace(/piik-client-v\d+\.[A-Za-z0-9_-]+/g, "[redacted Client capability]")
.replace(/\beyJ[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+\b/g, "[redacted token]")
.replace(/\b(?:[a-z]*token|[a-z]*grant|password|passwd|secret|authorization|cookie|ice-pwd)["']?\s*[=:]\s*(?:"[^"]*"|'[^']*'|[^\s,;]+)/gi, "[redacted credential]")
.replace(/(?:https?|wss?):\/\/[^\s<>"')]+/gi, (text) => {
@@ -111,7 +111,7 @@ export function debugEvent(scope: string, event: string, details: DebugDetails =
retainedBytes -= events.shift()!.bytes;
evictedEvents++;
}
- console.info("[screener]", record);
+ console.info("[piik]", record);
} catch { /* Diagnostics must not interrupt the operation being observed. */ }
}
@@ -179,14 +179,14 @@ export async function downloadBrowserDebug(): Promise<void> {
try {
const link = document.createElement("a");
link.href = url;
- link.download = `screener-browser-${new Date().toISOString().replace(/[:.]/g, "-")}.json`;
+ link.download = `piik-browser-${new Date().toISOString().replace(/[:.]/g, "-")}.json`;
link.click();
} finally { setTimeout(() => URL.revokeObjectURL(url), 0); }
}
export function installBrowserDebug(): (() => void) | undefined {
if (!browserDebugEnabled) return;
- window.__SCREENER_DEBUG__ = {
+ window.__PIIK_DEBUG__ = {
events: snapshot,
clear: () => { evictedEvents += events.length; events.length = 0; retainedBytes = 0; },
export: exportBrowserDebug,
@@ -204,7 +204,7 @@ export function installBrowserDebug(): (() => void) | undefined {
declare global {
interface Window {
- __SCREENER_DEBUG__?: {
+ __PIIK_DEBUG__?: {
events: () => readonly BrowserDebugEvent[];
clear: () => void;
export: () => Promise<string>;
diff --git a/src/client/lib/display-name.ts b/src/client/lib/display-name.ts
index 3da3002d..b612074c 100644
--- a/src/client/lib/display-name.ts
+++ b/src/client/lib/display-name.ts
@@ -4,7 +4,7 @@ import {
} from "../../shared/protocol";
import { say } from "../ui/copy";
-const DISPLAY_NAME_STORAGE_KEY = "screener:display-name:v1";
+const DISPLAY_NAME_STORAGE_KEY = "piik:display-name:v1";
export function readStoredDisplayName(): DisplayName | null {
try {
diff --git a/src/client/lib/release-update.ts b/src/client/lib/release-update.ts
index cf3dd96d..91c78633 100644
--- a/src/client/lib/release-update.ts
+++ b/src/client/lib/release-update.ts
@@ -1,8 +1,8 @@
export const DEFAULT_RELEASE_API_URL =
- "https://api.github.com/repos/TNTcraftHIM/Screener/releases/latest";
+ "https://api.github.com/repos/TNTcraftHIM/Piik/releases/latest";
const FULL_REVISION = /^[0-9a-f]{40}$/i;
-const RELEASE_PATH_PREFIX = "/TNTcraftHIM/Screener/releases/tag/";
+const RELEASE_PATH_PREFIX = "/TNTcraftHIM/Piik/releases/tag/";
export interface ReleaseUpdateNotice {
revision: string;
diff --git a/src/client/lib/session.ts b/src/client/lib/session.ts
index 77b2f235..56768b54 100644
--- a/src/client/lib/session.ts
+++ b/src/client/lib/session.ts
@@ -10,9 +10,9 @@ import { createOpaqueId } from "./opaque-id";
const CLIENT_ID_PATTERN = /^[A-Za-z0-9_-]{8,128}$/;
const CLIENT_ACCESS_BOOTSTRAP_PATTERN = /^[\x21-\x7e]{8,128}$/;
-const CLIENT_LAUNCH_STORAGE_KEY = "screener:client-launch:v1";
-const HOST_ROOM_STORAGE_KEY = "screener:host-room:v1";
-const HOST_ROOM_PREFERENCE_STORAGE_KEY = "screener:host-room-preference:v1";
+const CLIENT_LAUNCH_STORAGE_KEY = "piik:client-launch:v1";
+const HOST_ROOM_STORAGE_KEY = "piik:host-room:v1";
+const HOST_ROOM_PREFERENCE_STORAGE_KEY = "piik:host-room-preference:v1";
const hostRoomStorageSchema = createRoomResponseSchema.pick({
roomId: true,
hostToken: true,
@@ -104,11 +104,11 @@ export function takeClientLaunchBootstrap(): ClientLaunchBootstrap {
const params = new URLSearchParams(window.location.hash.replace(/^#/, ""));
const keys = [
"client-access",
- "screener-client",
+ "piik-client",
] as const;
const present = keys.some((key) => params.has(key));
const accessValue = params.get("client-access");
- const launchedFromFragment = params.get("screener-client") === "1";
+ const launchedFromFragment = params.get("piik-client") === "1";
let launchedByClient = launchedFromFragment;
try {
if (launchedFromFragment) {
@@ -283,7 +283,7 @@ function claimHostRoom(
byte.toString(16).padStart(2, "0"),
).join("");
await locks.request(
- `screener:host-room:${room.roomId}:${identity}`,
+ `piik:host-room:${room.roomId}:${identity}`,
{ ifAvailable: true },
async (lock) => {
resolveReady(lock !== null);
@@ -519,7 +519,7 @@ export function clearViewerGrant(roomId: string): void {
}
function viewerGrantStorageKey(roomId: string): string {
- return `screener:viewer-grant:${roomId}`;
+ return `piik:viewer-grant:${roomId}`;
}
function isValidViewerGrant(value: string): boolean {
@@ -527,7 +527,7 @@ function isValidViewerGrant(value: string): boolean {
}
export function getStableClientId(role: "host" | "viewer", roomId: string): string {
- const storageKey = `screener:client-id:${role}:${roomId}`;
+ const storageKey = `piik:client-id:${role}:${roomId}`;
const existing = readSessionValue(storageKey);
if (existing && CLIENT_ID_PATTERN.test(existing)) {
return existing;
diff --git a/src/client/locales/en.ts b/src/client/locales/en.ts
index f57bb0a9..b613af5a 100644
--- a/src/client/locales/en.ts
+++ b/src/client/locales/en.ts
@@ -5,7 +5,7 @@ export const en: Record<CopyKey, string> = {
"debug.export": "Debug report",
"debug.exportHint": "Download local diagnostics; may include network addresses and device details",
"debug.exportFailed": "Could not download diagnostics; try again",
- "brand.home": "Screener home",
+ "brand.home": "Piik home",
"common.roomCode": "Room code",
"common.copy": "Copy",
@@ -22,23 +22,23 @@ export const en: Record<CopyKey, string> = {
"common.name.viewerDefault": "Viewer",
"common.name.hostDefault": "Host",
- "client.launch.title": "Open Screener",
+ "client.launch.title": "Open Piik",
"client.launch.hint": "Choose how to connect this time",
"client.launch.local": "Local room",
"client.launch.localHint": "Use on the same local network",
"client.launch.link": "Public invite",
"client.launch.linkHint": "Create one temporary public invitation link",
"client.launch.site": "Connect to Site",
- "client.launch.siteHint": "Use an existing Screener Site",
- "client.launch.siteAddress": "Screener Site address",
+ "client.launch.siteHint": "Use an existing Piik Site",
+ "client.launch.siteAddress": "Piik Site address",
"client.launch.localAccess": "Local site password (optional)",
"client.launch.localAccessHint": "Leave blank for open access; fill it to require a password",
"client.launch.localAccessPlaceholder": "Leave blank for open access",
- "client.launch.go": "Open Screener",
- "client.launch.starting": "Preparing Screener",
- "client.launch.error": "Screener could not start; check the setting and retry",
+ "client.launch.go": "Open Piik",
+ "client.launch.starting": "Preparing Piik",
+ "client.launch.error": "Piik could not start; check the setting and retry",
"client.launch.loadFailed": "Could not read the launcher settings; retry",
- "client.update.available": "A newer Screener release is available",
+ "client.update.available": "A newer Piik release is available",
"gate.title": "Site access",
"gate.hint": "Enter the site passphrase",
diff --git a/src/client/locales/zh.ts b/src/client/locales/zh.ts
index 3a648c54..47c9db4e 100644
--- a/src/client/locales/zh.ts
+++ b/src/client/locales/zh.ts
@@ -3,7 +3,7 @@ export const zh = {
"debug.export": "调试报告",
"debug.exportHint": "下载本地诊断,可能包含网络地址和设备信息",
"debug.exportFailed": "诊断下载失败,请重试",
- "brand.home": "Screener 首页",
+ "brand.home": "Piik 首页",
"common.roomCode": "房间号",
"common.copy": "复制",
@@ -20,23 +20,23 @@ export const zh = {
"common.name.viewerDefault": "观众",
"common.name.hostDefault": "分享者",
- "client.launch.title": "打开 Screener",
+ "client.launch.title": "打开 Piik",
"client.launch.hint": "选择这次使用的连接方式",
"client.launch.local": "本地房间",
"client.launch.localHint": "同一局域网内使用",
"client.launch.link": "公网邀请",
"client.launch.linkHint": "生成一个临时公网邀请链接",
"client.launch.site": "连接站点",
- "client.launch.siteHint": "使用已有的 Screener 站点",
- "client.launch.siteAddress": "Screener 站点地址",
+ "client.launch.siteHint": "使用已有的 Piik 站点",
+ "client.launch.siteAddress": "Piik 站点地址",
"client.launch.localAccess": "本地站点密码(可选)",
"client.launch.localAccessHint": "留空即可开放访问;填写后需要密码",
"client.launch.localAccessPlaceholder": "留空即可开放访问",
- "client.launch.go": "进入 Screener",
- "client.launch.starting": "正在准备 Screener",
+ "client.launch.go": "进入 Piik",
+ "client.launch.starting": "正在准备 Piik",
"client.launch.error": "暂时无法启动,请检查设置后重试",
"client.launch.loadFailed": "无法读取启动设置,请重试",
- "client.update.available": "发现新的 Screener 版本",
+ "client.update.available": "发现新的 Piik 版本",
"gate.title": "站点访问",
"gate.hint": "请输入站点口令",
diff --git a/src/client/native/client.ts b/src/client/native/client.ts
index da913c2e..188b185c 100644
--- a/src/client/native/client.ts
+++ b/src/client/native/client.ts
@@ -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("Screener Client is unavailable"));
+ return Promise.reject(new Error("Piik Client 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("Screener Client request timed out"));
+ rejectRequest(new Error("Piik Client 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("Screener Client request failed"));
+ rejectRequest(new Error("Piik Client 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("Screener Client request failed", { cause: { code: failure.data.code } }));
+ pending.reject(new Error("Piik Client 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("Screener Client response is invalid", { cause: parsed.error }));
+ pending.reject(new Error("Piik Client 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("Screener Client disconnected"));
+ request.reject(new Error("Piik Client disconnected"));
}
this.pending.clear();
}
diff --git a/src/client/native/wire.ts b/src/client/native/wire.ts
index e71a393f..d6b66db8 100644
--- a/src/client/native/wire.ts
+++ b/src/client/native/wire.ts
@@ -4,7 +4,7 @@ import { sfuMediaSchema } from "../../shared/protocol";
export const NATIVE_CLIENT_PROTOCOL = 9;
export const NATIVE_CLIENT_PORT_START = 39_721;
export const NATIVE_CLIENT_PORT_END = 39_730;
-export const NATIVE_CLIENT_SUBPROTOCOL = "screener-client-v9";
+export const NATIVE_CLIENT_SUBPROTOCOL = "piik-client-v9";
const decimalIdentifierSchema = z.string().regex(/^[1-9]\d{0,19}$/);
const opaqueIdentifierSchema = z
@@ -16,7 +16,7 @@ const opaqueIdentifierSchema = z
export const nativeHealthSchema = z
.object({
protocol: z.literal(NATIVE_CLIENT_PROTOCOL),
- service: z.literal("screener-client"),
+ service: z.literal("piik-client"),
port: z
.number()
.int()
diff --git a/src/client/pages/HostPage.tsx b/src/client/pages/HostPage.tsx
index 84eef3a6..e7f5a3be 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("Screener Client is unavailable");
+ if (nativeClientRef.current !== client) throw new Error("Piik Client 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("Screener Client is unavailable");
+ if (nativeClientRef.current !== client) throw new Error("Piik Client is unavailable");
videoCodecRef.current = manualVideoCodecPreference(started.codec);
bridge = new NativeMediaBridge(
shareGeneration,
diff --git a/src/client/styles.css b/src/client/styles.css
index 58eaeaa1..4c4bfada 100644
--- a/src/client/styles.css
+++ b/src/client/styles.css
@@ -1,4 +1,4 @@
-/* Screener living-room UI — the production design system.
+/* Piik living-room UI — the production design system.
The stage is a TV on the wall, viewers are pawns on the couch, connection
state is what the TV shows and what the LEDs say. Copy lives in tooltips
and aria in visual mode; text modes add visible captions.
diff --git a/src/client/ui/copy.ts b/src/client/ui/copy.ts
index 8d99c609..d792c070 100644
--- a/src/client/ui/copy.ts
+++ b/src/client/ui/copy.ts
@@ -12,8 +12,8 @@ import {
export type { CopyKey, Lang, TitleFrameKey } from "../locales";
export type CopyMode = "text" | "vis";
-const LANG_STORAGE_KEY = "screener:ui-lang";
-const MODE_STORAGE_KEY = "screener:ui-mode";
+const LANG_STORAGE_KEY = "piik:ui-lang";
+const MODE_STORAGE_KEY = "piik:ui-mode";
interface CopyPrefs {
lang: Lang;
diff --git a/src/client/ui/document-title.ts b/src/client/ui/document-title.ts
index 7046825f..6aca1268 100644
--- a/src/client/ui/document-title.ts
+++ b/src/client/ui/document-title.ts
@@ -1,6 +1,6 @@
import { useEffect } from "react";
-const BRAND_TITLE = "Screener";
+const BRAND_TITLE = "Piik";
const TITLE_VARIATION_INTERVAL_MS = 15_000;
export function composeDocumentTitle(
diff --git a/src/client/ui/theme.ts b/src/client/ui/theme.ts
index 6775cfc8..7af02228 100644
--- a/src/client/ui/theme.ts
+++ b/src/client/ui/theme.ts
@@ -5,7 +5,7 @@ import { useSyncExternalStore } from "react";
export type Theme = "light" | "dark";
-const THEME_STORAGE_KEY = "screener:ui-theme";
+const THEME_STORAGE_KEY = "piik:ui-theme";
const DARK_THEME_QUERY = "(prefers-color-scheme: dark)";
function detectTheme(): Theme {
diff --git a/src/shared/protocol.ts b/src/shared/protocol.ts
index 78dbed99..5640a766 100644
--- a/src/shared/protocol.ts
+++ b/src/shared/protocol.ts
@@ -7,7 +7,7 @@ import { NAT_TRAVERSAL_PATHS } from "./nat-candidate.js";
export const MAX_VIEWERS_PER_ROOM_LIMIT = 20;
export const MAX_PARTICIPANTS_PER_ROOM_LIMIT = MAX_VIEWERS_PER_ROOM_LIMIT + 1;
export const MAX_SIGNAL_BYTES = 64 * 1024;
-export const SIGNALING_PROTOCOL = "screener-v23";
+export const SIGNALING_PROTOCOL = "piik-v23";
export const SIGNAL_CLOSE_CODES = {
serviceRestart: 1012,
sessionReplaced: 4001,
diff --git a/tests/browser-debug.test.ts b/tests/browser-debug.test.ts
index 2de4deb1..0cb91c36 100644
--- a/tests/browser-debug.test.ts
+++ b/tests/browser-debug.test.ts
@@ -27,7 +27,7 @@ describe("opt-in Browser diagnostics", () => {
debug.debugEvent("capture", "requested", { resolution: "1080p" });
debug.debugError("capture", "failed", new Error("private detail"));
expect(console.info).not.toHaveBeenCalled();
- expect(page.__SCREENER_DEBUG__).toBeUndefined();
+ expect(page.__PIIK_DEBUG__).toBeUndefined();
});
it("retains error causes, stacks and technical context while removing credentials and media", async () => {
@@ -42,9 +42,9 @@ describe("opt-in Browser diagnostics", () => {
hostToken: "secret-host", nested: { icePwd: "secret-ice", cookie: "secret-cookie", sdp: "secret-sdp", remoteSdp: "secret-remote-sdp" },
data: "secret-pixels", payload: "secret-audio",
viewerGrant: "secret-grant", passwordHash: "secret-hash",
- transportError: "screener-client-v9.secret-capability Basic secret-basic\nCookie: session=secret-session; refresh=secret-refresh",
+ transportError: "piik-client-v9.secret-capability Basic secret-basic\nCookie: session=secret-session; refresh=secret-refresh",
});
- const report = await page.__SCREENER_DEBUG__!.export();
+ const report = await page.__PIIK_DEBUG__!.export();
for (const secret of ["secret-password", "secret-auth", "secret-query", "secret-fragment", "secret-bearer",
"secret-host", "secret-ice", "secret-cookie", "secret-sdp", "secret-remote-sdp", "secret-pixels", "secret-audio", "private-grant",
"secret-grant", "secret-hash", "secret-capability", "secret-basic", "secret-session", "secret-refresh"])
@@ -59,10 +59,10 @@ describe("opt-in Browser diagnostics", () => {
const debug = await import("../src/client/lib/debug");
debug.installBrowserDebug();
for (let revision = 0; revision < 8_300; revision++) debug.debugEvent("signal", "route", { revision });
- const saved = page.__SCREENER_DEBUG__!.events();
+ const saved = page.__PIIK_DEBUG__!.events();
expect(saved).toHaveLength(8_192);
saved[0]!.details.revision = -1;
- expect(page.__SCREENER_DEBUG__!.events()[0]!.details.revision).toBe(108);
+ expect(page.__PIIK_DEBUG__!.events()[0]!.details.revision).toBe(108);
// Exercise the byte limit separately from the event-count limit.
for (let index = 0; index < 1_100; index++) debug.debugEvent("capture", "state", { message: "界".repeat(9_000) });
debug.debugError("webrtc", "collector-failed", new Error("stats unavailable"), { collector: "getStats", connectionId: "edge" });
@@ -118,7 +118,7 @@ describe("opt-in Browser diagnostics", () => {
await vi.advanceTimersByTimeAsync(5_000);
expect(connection.getStats).not.toHaveBeenCalled();
expect(vi.getTimerCount()).toBe(0);
- const history = page.__SCREENER_DEBUG__!.events();
+ const history = page.__PIIK_DEBUG__!.events();
expect(history.filter((event) => event.scope === "webrtc").every((event) => event.details.connectionId === "local-edge")).toBe(true);
expect(history).toContainEqual(expect.objectContaining({ event: "dtls-state", details: expect.objectContaining({ state: "connected" }) }));
const report = await debug.exportBrowserDebug();
@@ -132,7 +132,7 @@ describe("opt-in Browser diagnostics", () => {
const token = "x".repeat(43);
class Socket extends EventTarget {
static OPEN = 1; static CLOSING = 2;
- readyState = 1; protocol = `screener-client-v9.${token}`;
+ readyState = 1; protocol = `piik-client-v9.${token}`;
constructor() { super(); queueMicrotask(() => this.dispatchEvent(new Event("open"))); }
close() { this.readyState = 3; }
send(raw: string) {
@@ -146,7 +146,7 @@ describe("opt-in Browser diagnostics", () => {
}
vi.stubGlobal("WebSocket", Socket);
vi.stubGlobal("fetch", vi.fn(async () => new Response(JSON.stringify({
- protocol: 9, service: "screener-client", port: 39721, instanceToken: token,
+ protocol: 9, service: "piik-client", port: 39721, instanceToken: token,
nativeMedia: { video: true, processAudio: false, systemAudio: true, hardwareH264: true, softwareVP8: true },
}), { status: 200 })));
const debug = await import("../src/client/lib/debug");
@@ -157,7 +157,7 @@ describe("opt-in Browser diagnostics", () => {
expect(client).not.toBeNull();
try { await client!.updateShare("share_123456", DEFAULT_QUALITY_SETTINGS); }
finally { client!.close(); }
- const history = page.__SCREENER_DEBUG__!.events().filter((event) => event.details.type === "update-share");
+ const history = page.__PIIK_DEBUG__!.events().filter((event) => event.details.type === "update-share");
expect(history.map((event) => event.event)).toEqual(["request", "response"]);
expect(history[1]!.details.requestId).toBe(history[0]!.details.requestId);
expect(history[1]!.details.durationMs).toBeGreaterThanOrEqual(0);
diff --git a/tests/client-state.test.ts b/tests/client-state.test.ts
index 3efdefe6..46e36d65 100644
--- a/tests/client-state.test.ts
+++ b/tests/client-state.test.ts
@@ -350,7 +350,7 @@ describe("client session identity", () => {
hostToken: "a".repeat(32),
canonicalUrl: "https://share.test/r/1234",
});
- expect(values.get("screener:host-room:v1")).toBe(
+ expect(values.get("piik:host-room:v1")).toBe(
JSON.stringify({
roomId: "1234",
hostToken: "a".repeat(32),
@@ -358,67 +358,67 @@ describe("client session identity", () => {
}),
);
expect([...values.values()].join(" ")).not.toContain(`${"b".repeat(21)}A`);
- expect(session.get("screener:host-room:v1")).toBe(values.get("screener:host-room:v1"));
+ expect(session.get("piik:host-room:v1")).toBe(values.get("piik:host-room:v1"));
clearHostRoom();
expect(await readHostRoom()).toBeNull();
});
it("restores an origin resume hint only after claiming its room", async () => {
const { local, session, request } = hostRoomStorage();
- local.set("screener:host-room:v1", JSON.stringify(storedHost("1234", "h".repeat(32))));
+ local.set("piik:host-room:v1", JSON.stringify(storedHost("1234", "h".repeat(32))));
expect(await readHostRoom()).toEqual({
roomId: "1234",
hostToken: "h".repeat(32),
canonicalUrl: "https://share.test/r/1234",
});
- expect(JSON.parse(session.get("screener:host-room:v1")!)).toEqual(JSON.parse(local.get("screener:host-room:v1")!));
- expect(request).toHaveBeenCalledWith(expect.stringMatching(/^screener:host-room:1234:[a-f0-9]{64}$/), { ifAvailable: true }, expect.any(Function));
+ expect(JSON.parse(session.get("piik:host-room:v1")!)).toEqual(JSON.parse(local.get("piik:host-room:v1")!));
+ expect(request).toHaveBeenCalledWith(expect.stringMatching(/^piik:host-room:1234:[a-f0-9]{64}$/), { ifAvailable: true }, expect.any(Function));
expect(request.mock.calls[0]![0]).not.toContain("h".repeat(32));
});
it("keeps stored room authority despite unowned metadata and discards malformed records", async () => {
const { local: values, session } = hostRoomStorage();
- values.set("screener:host-room:v1", JSON.stringify({ ...storedHost(), unusedMetadata: 123 }));
+ values.set("piik:host-room:v1", JSON.stringify({ ...storedHost(), unusedMetadata: 123 }));
expect(await readHostRoom()).toEqual({
roomId: "1234", hostToken: "a".repeat(32), canonicalUrl: "https://share.test/r/1234",
});
- expect(JSON.parse(session.get("screener:host-room:v1")!)).toEqual(storedHost());
+ expect(JSON.parse(session.get("piik:host-room:v1")!)).toEqual(storedHost());
releaseHostRoom();
- session.delete("screener:host-room:v1");
- values.set("screener:host-room:v1", "not-json");
+ session.delete("piik:host-room:v1");
+ values.set("piik:host-room:v1", "not-json");
expect(await readHostRoom()).toBeNull();
- expect(values.has("screener:host-room:v1")).toBe(false);
+ expect(values.has("piik:host-room:v1")).toBe(false);
});
it("rejects a copied tab room while another tab holds it without deleting that hint", async () => {
const { local, session } = hostRoomStorage("held");
const saved = JSON.stringify(storedHost());
- local.set("screener:host-room:v1", saved);
- session.set("screener:host-room:v1", saved);
+ local.set("piik:host-room:v1", saved);
+ session.set("piik:host-room:v1", saved);
expect(await readHostRoom()).toBeNull();
- expect(session.has("screener:host-room:v1")).toBe(false);
- expect(local.get("screener:host-room:v1")).toBe(saved);
+ expect(session.has("piik:host-room:v1")).toBe(false);
+ expect(local.get("piik:host-room:v1")).toBe(saved);
});
it("prefers this tab's room over another tab's latest hint and preserves that hint when forgotten", async () => {
const { local, session } = hostRoomStorage();
- session.set("screener:host-room:v1", JSON.stringify(storedHost()));
+ session.set("piik:host-room:v1", JSON.stringify(storedHost()));
const other = JSON.stringify(storedHost("5678", "b".repeat(32)));
- local.set("screener:host-room:v1", other);
+ local.set("piik:host-room:v1", other);
expect(await readHostRoom()).toMatchObject({ roomId: "1234" });
clearHostRoom();
- expect(session.has("screener:host-room:v1")).toBe(false);
- expect(local.get("screener:host-room:v1")).toBe(other);
+ expect(session.has("piik:host-room:v1")).toBe(false);
+ expect(local.get("piik:host-room:v1")).toBe(other);
});
it("retains both records on unmount, reclaims on refresh, and releases the old claim on rotation", async () => {
const { local, session, held, request } = hostRoomStorage();
const room = storedHost();
await writeHostRoom({ ...room, codeEntryPolicy: "open" });
- const stored = local.get("screener:host-room:v1");
+ const stored = local.get("piik:host-room:v1");
releaseHostRoom();
- expect(session.get("screener:host-room:v1")).toBe(stored);
- expect(local.get("screener:host-room:v1")).toBe(stored);
+ expect(session.get("piik:host-room:v1")).toBe(stored);
+ expect(local.get("piik:host-room:v1")).toBe(stored);
expect(await readHostRoom()).toMatchObject({ roomId: "1234" });
expect(request).toHaveBeenCalledTimes(2);
await writeHostRoom({ ...storedHost("5678", "b".repeat(32)), codeEntryPolicy: "open" });
@@ -428,7 +428,7 @@ describe("client session identity", () => {
it("coalesces concurrent restoration and preserves records when an unmounted restore is cancelled", async () => {
const { local, session, request } = hostRoomStorage();
- local.set("screener:host-room:v1", JSON.stringify(storedHost()));
+ local.set("piik:host-room:v1", JSON.stringify(storedHost()));
const first = await Promise.all([readHostRoom(), readHostRoom()]);
expect(first[0]).toEqual(first[1]);
expect(request).toHaveBeenCalledOnce();
@@ -436,16 +436,16 @@ describe("client session identity", () => {
const cancelled = readHostRoom();
releaseHostRoom();
expect(await cancelled).toBeNull();
- expect(session.has("screener:host-room:v1")).toBe(true);
+ expect(session.has("piik:host-room:v1")).toBe(true);
expect(await readHostRoom()).toMatchObject({ roomId: "1234" });
});
it("does not reuse the origin hint without Web Locks but keeps same-tab refresh authority", async () => {
const { local, session } = hostRoomStorage("absent");
const saved = JSON.stringify(storedHost());
- local.set("screener:host-room:v1", saved);
+ local.set("piik:host-room:v1", saved);
expect(await readHostRoom()).toBeNull();
- session.set("screener:host-room:v1", saved);
+ session.set("piik:host-room:v1", saved);
expect(await readHostRoom()).toMatchObject({ roomId: "1234" });
releaseHostRoom();
expect(await readHostRoom()).toMatchObject({ roomId: "1234" });
@@ -454,21 +454,21 @@ describe("client session identity", () => {
it("does not erase the resume hint when the server replaces this Host session", async () => {
const { local, session } = hostRoomStorage();
await writeHostRoom({ ...storedHost(), codeEntryPolicy: "open" });
- const saved = local.get("screener:host-room:v1");
+ const saved = local.get("piik:host-room:v1");
clearHostRoom(true);
- expect(session.has("screener:host-room:v1")).toBe(false);
- expect(local.get("screener:host-room:v1")).toBe(saved);
+ expect(session.has("piik:host-room:v1")).toBe(false);
+ expect(local.get("piik:host-room:v1")).toBe(saved);
});
it("keeps same-tab authority when Web Locks are denied, without restoring the origin hint", async () => {
const { local, session, request } = hostRoomStorage();
request.mockRejectedValue(new DOMException("Blocked", "SecurityError"));
const saved = JSON.stringify(storedHost());
- local.set("screener:host-room:v1", saved);
+ local.set("piik:host-room:v1", saved);
expect(await readHostRoom()).toBeNull();
- session.set("screener:host-room:v1", saved);
+ session.set("piik:host-room:v1", saved);
expect(await readHostRoom()).toMatchObject({ roomId: "1234" });
- expect(session.get("screener:host-room:v1")).toBeTruthy();
+ expect(session.get("piik:host-room:v1")).toBeTruthy();
});
it("does not persist an obsolete creation and gives a reused code a distinct incarnation claim", async () => {
@@ -489,13 +489,13 @@ describe("client session identity", () => {
const { held, request, local } = hostRoomStorage();
const room = { ...storedHost(), codeEntryPolicy: "open" as const };
await writeHostRoom(room);
- const saved = local.get("screener:host-room:v1");
+ const saved = local.get("piik:host-room:v1");
let owns = true;
const writing = writeHostRoom({ ...room, inviteUrl: "https://new.test/r/1234" }, () => owns);
owns = false;
expect(await writing).toBe(false);
expect(held.size).toBe(1);
- expect(local.get("screener:host-room:v1")).toBe(saved);
+ expect(local.get("piik:host-room:v1")).toBe(saved);
expect(await readHostRoom()).toMatchObject({ roomId: "1234", canonicalUrl: "https://share.test/r/1234" });
expect(request).toHaveBeenCalledOnce();
});
@@ -515,7 +515,7 @@ describe("client session identity", () => {
});
expect(readViewerRoute()).toEqual({ roomId: "1234", viewerGrant: grant });
- expect(values.get("screener:viewer-grant:1234")).toBe(grant);
+ expect(values.get("piik:viewer-grant:1234")).toBe(grant);
expect(replaceState).toHaveBeenCalledWith(
{ navigation: 1 },
"",
@@ -527,7 +527,7 @@ describe("client session identity", () => {
it("fails malformed Viewer fragments closed without leaking across rooms", () => {
const values = new Map<string, string>();
const oldGrant = `${"d".repeat(21)}w`;
- values.set("screener:viewer-grant:1234", oldGrant);
+ values.set("piik:viewer-grant:1234", oldGrant);
vi.stubGlobal("window", {
location: new URL("https://share.test/r/1234#v=malformed"),
history: { state: null, replaceState: vi.fn() },
@@ -550,7 +550,7 @@ describe("client session identity", () => {
it("keeps the stored Viewer grant when the URL carries an unrelated fragment", () => {
const values = new Map<string, string>();
const grant = `${"d".repeat(21)}w`;
- values.set("screener:viewer-grant:1234", grant);
+ values.set("piik:viewer-grant:1234", grant);
const replaceState = vi.fn();
vi.stubGlobal("window", {
location: new URL("https://share.test/r/1234#:~:text=hello"),
@@ -647,14 +647,14 @@ describe("client session identity", () => {
clearHostRoom();
expect(readPreferredRoomId()).toBe("4321");
- expect(values.get("screener:host-room-preference:v1")).toBe(
+ expect(values.get("piik:host-room-preference:v1")).toBe(
JSON.stringify({ roomId: "4321" }),
);
});
it("removes a legacy Viewer grant from room-scoped session storage", () => {
const values = new Map<string, string>([
- ["screener:viewer-grant:1234", `g1.1234.1.${"f".repeat(43)}`],
+ ["piik:viewer-grant:1234", `g1.1234.1.${"f".repeat(43)}`],
]);
const removeItem = vi.fn((key: string) => values.delete(key));
vi.stubGlobal("window", {
@@ -666,7 +666,7 @@ describe("client session identity", () => {
});
expect(readViewerGrant("1234")).toBeNull();
- expect(removeItem).toHaveBeenCalledWith("screener:viewer-grant:1234");
+ expect(removeItem).toHaveBeenCalledWith("piik:viewer-grant:1234");
});
});
@@ -841,8 +841,8 @@ describe("room codes", () => {
it("drops only the stored grant for an explicit valid room-code entry", () => {
const values = new Map<string, string>([
- ["screener:viewer-grant:1234", "AAAAAAAAAAAAAAAAAAAAAA"],
- ["screener:viewer-grant:5678", "AAAAAAAAAAAAAAAAAAAAAA"],
+ ["piik:viewer-grant:1234", "AAAAAAAAAAAAAAAAAAAAAA"],
+ ["piik:viewer-grant:5678", "AAAAAAAAAAAAAAAAAAAAAA"],
]);
vi.stubGlobal("window", {
sessionStorage: {
@@ -851,11 +851,11 @@ describe("room codes", () => {
});
expect(roomRouteForExplicitEntry("1234")).toBe("/r/1234");
- expect(values.has("screener:viewer-grant:1234")).toBe(false);
- expect(values.has("screener:viewer-grant:5678")).toBe(true);
+ expect(values.has("piik:viewer-grant:1234")).toBe(false);
+ expect(values.has("piik:viewer-grant:5678")).toBe(true);
expect(roomRouteForExplicitEntry(" 5678 ")).toBeNull();
- expect(values.has("screener:viewer-grant:5678")).toBe(true);
+ expect(values.has("piik:viewer-grant:5678")).toBe(true);
});
it("classifies routes without normalizing malformed room input", () => {
@@ -940,7 +940,7 @@ describe("room codes", () => {
const session = new Map<string, string>();
vi.stubGlobal("window", {
location: {
- hash: `#client-access=${"a".repeat(32)}&screener-client=1&retained=yes`,
+ hash: `#client-access=${"a".repeat(32)}&piik-client=1&retained=yes`,
pathname: "/",
search: "?room=6020",
},
diff --git a/tests/creation-profile.test.ts b/tests/creation-profile.test.ts
index 0d5662b6..69275ff8 100644
--- a/tests/creation-profile.test.ts
+++ b/tests/creation-profile.test.ts
@@ -40,7 +40,7 @@ describe("Host creation profile", () => {
codeEntryPolicy: "private",
roomPassword: "room-password",
});
- expect(values.get("screener:host-creation-profile:v1")).not.toContain(
+ expect(values.get("piik:host-creation-profile:v1")).not.toContain(
"SITE_ACCESS_PASSWORD",
);
diff --git a/tests/fixtures/wire-samples.json b/tests/fixtures/wire-samples.json
index ddacb88a..56600fd5 100644
--- a/tests/fixtures/wire-samples.json
+++ b/tests/fixtures/wire-samples.json
@@ -1,6 +1,6 @@
{
"constants": {
- "signalingProtocol": "screener-v23",
+ "signalingProtocol": "piik-v23",
"maxViewersPerRoomLimit": 20,
"maxParticipantsPerRoomLimit": 21,
"maxSignalBytes": 65536,
@@ -41,79 +41,79 @@
{
"name": "authenticate-host-minimal",
"schema": "client",
- "json": "{\"type\":\"authenticate\",\"protocol\":\"screener-v23\",\"roomId\":\"1234\",\"role\":\"host\",\"token\":\"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",\"clientId\":\"client_12345678\"}",
+ "json": "{\"type\":\"authenticate\",\"protocol\":\"piik-v23\",\"roomId\":\"1234\",\"role\":\"host\",\"token\":\"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",\"clientId\":\"client_12345678\"}",
"valid": true
},
{
"name": "authenticate-host-full",
"schema": "client",
- "json": "{\"type\":\"authenticate\",\"protocol\":\"screener-v23\",\"roomId\":\"1234\",\"role\":\"host\",\"token\":\"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",\"clientId\":\"client_12345678\",\"shareGeneration\":\"share_generation_12345678\",\"sharingPaused\":false,\"qualitySettings\":{\"resolution\":\"1080p\",\"maxFramerate\":60,\"maxBitrate\":8000000,\"degradationPreference\":\"maintain-resolution\",\"screenAudioQuality\":\"music\"},\"routePolicy\":{\"peerOnly\":false,\"topologyOptimization\":true,\"natPrediction\":false},\"viewerPresence\":true,\"displayName\":\"小明\"}",
+ "json": "{\"type\":\"authenticate\",\"protocol\":\"piik-v23\",\"roomId\":\"1234\",\"role\":\"host\",\"token\":\"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",\"clientId\":\"client_12345678\",\"shareGeneration\":\"share_generation_12345678\",\"sharingPaused\":false,\"qualitySettings\":{\"resolution\":\"1080p\",\"maxFramerate\":60,\"maxBitrate\":8000000,\"degradationPreference\":\"maintain-resolution\",\"screenAudioQuality\":\"music\"},\"routePolicy\":{\"peerOnly\":false,\"topologyOptimization\":true,\"natPrediction\":false},\"viewerPresence\":true,\"displayName\":\"小明\"}",
"valid": true
},
{
"name": "authenticate-host-carries-viewer-grant",
"schema": "client",
- "json": "{\"type\":\"authenticate\",\"protocol\":\"screener-v23\",\"roomId\":\"1234\",\"role\":\"host\",\"token\":\"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",\"clientId\":\"client_12345678\",\"viewerGrant\":\"bbbbbbbbbbbbbbbbbbbbbg\"}",
+ "json": "{\"type\":\"authenticate\",\"protocol\":\"piik-v23\",\"roomId\":\"1234\",\"role\":\"host\",\"token\":\"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",\"clientId\":\"client_12345678\",\"viewerGrant\":\"bbbbbbbbbbbbbbbbbbbbbg\"}",
"valid": false
},
{
"name": "authenticate-host-carries-viewer-password",
"schema": "client",
- "json": "{\"type\":\"authenticate\",\"protocol\":\"screener-v23\",\"roomId\":\"1234\",\"role\":\"host\",\"token\":\"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",\"clientId\":\"client_12345678\",\"viewerPassword\":\"easy-password\"}",
+ "json": "{\"type\":\"authenticate\",\"protocol\":\"piik-v23\",\"roomId\":\"1234\",\"role\":\"host\",\"token\":\"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",\"clientId\":\"client_12345678\",\"viewerPassword\":\"easy-password\"}",
"valid": false
},
{
"name": "authenticate-host-short-token",
"schema": "client",
- "json": "{\"type\":\"authenticate\",\"protocol\":\"screener-v23\",\"roomId\":\"1234\",\"role\":\"host\",\"token\":\"short\",\"clientId\":\"client_12345678\"}",
+ "json": "{\"type\":\"authenticate\",\"protocol\":\"piik-v23\",\"roomId\":\"1234\",\"role\":\"host\",\"token\":\"short\",\"clientId\":\"client_12345678\"}",
"valid": false
},
{
"name": "authenticate-host-unknown-key",
"schema": "client",
- "json": "{\"type\":\"authenticate\",\"protocol\":\"screener-v23\",\"roomId\":\"1234\",\"role\":\"host\",\"token\":\"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",\"clientId\":\"client_12345678\",\"admin\":true}",
+ "json": "{\"type\":\"authenticate\",\"protocol\":\"piik-v23\",\"roomId\":\"1234\",\"role\":\"host\",\"token\":\"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",\"clientId\":\"client_12345678\",\"admin\":true}",
"valid": false
},
{
"name": "authenticate-viewer-minimal",
"schema": "client",
- "json": "{\"type\":\"authenticate\",\"protocol\":\"screener-v23\",\"roomId\":\"1234\",\"role\":\"viewer\",\"clientId\":\"client_12345678\"}",
+ "json": "{\"type\":\"authenticate\",\"protocol\":\"piik-v23\",\"roomId\":\"1234\",\"role\":\"viewer\",\"clientId\":\"client_12345678\"}",
"valid": true
},
{
"name": "authenticate-viewer-full",
"schema": "client",
- "json": "{\"type\":\"authenticate\",\"protocol\":\"screener-v23\",\"roomId\":\"1234\",\"role\":\"viewer\",\"clientId\":\"client_12345678\",\"viewerGrant\":\"bbbbbbbbbbbbbbbbbbbbbg\",\"viewerPassword\":\"easy-password\",\"displayName\":\"Café 朋友\",\"viewerPresence\":true}",
+ "json": "{\"type\":\"authenticate\",\"protocol\":\"piik-v23\",\"roomId\":\"1234\",\"role\":\"viewer\",\"clientId\":\"client_12345678\",\"viewerGrant\":\"bbbbbbbbbbbbbbbbbbbbbg\",\"viewerPassword\":\"easy-password\",\"displayName\":\"Café 朋友\",\"viewerPresence\":true}",
"valid": true
},
{
"name": "authenticate-viewer-carries-host-token",
"schema": "client",
- "json": "{\"type\":\"authenticate\",\"protocol\":\"screener-v23\",\"roomId\":\"1234\",\"role\":\"viewer\",\"clientId\":\"client_12345678\",\"token\":\"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\"}",
+ "json": "{\"type\":\"authenticate\",\"protocol\":\"piik-v23\",\"roomId\":\"1234\",\"role\":\"viewer\",\"clientId\":\"client_12345678\",\"token\":\"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\"}",
"valid": false
},
{
"name": "authenticate-viewer-carries-route-policy",
"schema": "client",
- "json": "{\"type\":\"authenticate\",\"protocol\":\"screener-v23\",\"roomId\":\"1234\",\"role\":\"viewer\",\"clientId\":\"client_12345678\",\"routePolicy\":{\"peerOnly\":false,\"topologyOptimization\":true,\"natPrediction\":false}}",
+ "json": "{\"type\":\"authenticate\",\"protocol\":\"piik-v23\",\"roomId\":\"1234\",\"role\":\"viewer\",\"clientId\":\"client_12345678\",\"routePolicy\":{\"peerOnly\":false,\"topologyOptimization\":true,\"natPrediction\":false}}",
"valid": false
},
{
"name": "authenticate-viewer-malformed-grant",
"schema": "client",
- "json": "{\"type\":\"authenticate\",\"protocol\":\"screener-v23\",\"roomId\":\"1234\",\"role\":\"viewer\",\"clientId\":\"client_12345678\",\"viewerGrant\":\"bbbbbbbbbbbbbbbbbbbbb\"}",
+ "json": "{\"type\":\"authenticate\",\"protocol\":\"piik-v23\",\"roomId\":\"1234\",\"role\":\"viewer\",\"clientId\":\"client_12345678\",\"viewerGrant\":\"bbbbbbbbbbbbbbbbbbbbb\"}",
"valid": false
},
{
"name": "authenticate-viewer-grant-bad-final-character",
"schema": "client",
- "json": "{\"type\":\"authenticate\",\"protocol\":\"screener-v23\",\"roomId\":\"1234\",\"role\":\"viewer\",\"clientId\":\"client_12345678\",\"viewerGrant\":\"bbbbbbbbbbbbbbbbbbbbbb\"}",
+ "json": "{\"type\":\"authenticate\",\"protocol\":\"piik-v23\",\"roomId\":\"1234\",\"role\":\"viewer\",\"clientId\":\"client_12345678\",\"viewerGrant\":\"bbbbbbbbbbbbbbbbbbbbbb\"}",
"valid": false
},
{
"name": "authenticate-viewer-unknown-capabilities",
"schema": "client",
- "json": "{\"type\":\"authenticate\",\"protocol\":\"screener-v23\",\"roomId\":\"1234\",\"role\":\"viewer\",\"clientId\":\"client_12345678\",\"capabilities\":{\"peerIceTurn\":true}}",
+ "json": "{\"type\":\"authenticate\",\"protocol\":\"piik-v23\",\"roomId\":\"1234\",\"role\":\"viewer\",\"clientId\":\"client_12345678\",\"capabilities\":{\"peerIceTurn\":true}}",
"valid": false
},
{
@@ -131,55 +131,55 @@
{
"name": "authenticate-viewer-leading-zero-room",
"schema": "client",
- "json": "{\"type\":\"authenticate\",\"protocol\":\"screener-v23\",\"roomId\":\"0123\",\"role\":\"viewer\",\"clientId\":\"client_12345678\"}",
+ "json": "{\"type\":\"authenticate\",\"protocol\":\"piik-v23\",\"roomId\":\"0123\",\"role\":\"viewer\",\"clientId\":\"client_12345678\"}",
"valid": false
},
{
"name": "authenticate-viewer-long-room",
"schema": "client",
- "json": "{\"type\":\"authenticate\",\"protocol\":\"screener-v23\",\"roomId\":\"11111\",\"role\":\"viewer\",\"clientId\":\"client_12345678\"}",
+ "json": "{\"type\":\"authenticate\",\"protocol\":\"piik-v23\",\"roomId\":\"11111\",\"role\":\"viewer\",\"clientId\":\"client_12345678\"}",
"valid": false
},
{
"name": "authenticate-viewer-noncanonical-display-name",
"schema": "client",
- "json": "{\"type\":\"authenticate\",\"protocol\":\"screener-v23\",\"roomId\":\"1234\",\"role\":\"viewer\",\"clientId\":\"client_12345678\",\"displayName\":\" Café \"}",
+ "json": "{\"type\":\"authenticate\",\"protocol\":\"piik-v23\",\"roomId\":\"1234\",\"role\":\"viewer\",\"clientId\":\"client_12345678\",\"displayName\":\" Café \"}",
"valid": false
},
{
"name": "authenticate-viewer-display-name-too-long",
"schema": "client",
- "json": "{\"type\":\"authenticate\",\"protocol\":\"screener-v23\",\"roomId\":\"1234\",\"role\":\"viewer\",\"clientId\":\"client_12345678\",\"displayName\":\"名名名名名名名名名名名名名名名名名名名名名名名名名\"}",
+ "json": "{\"type\":\"authenticate\",\"protocol\":\"piik-v23\",\"roomId\":\"1234\",\"role\":\"viewer\",\"clientId\":\"client_12345678\",\"displayName\":\"名名名名名名名名名名名名名名名名名名名名名名名名名\"}",
"valid": false
},
{
"name": "authenticate-viewer-display-name-at-limit",
"schema": "client",
- "json": "{\"type\":\"authenticate\",\"protocol\":\"screener-v23\",\"roomId\":\"1234\",\"role\":\"viewer\",\"clientId\":\"client_12345678\",\"displayName\":\"名名名名名名名名名名名名名名名名名名名名名名名名\"}",
+ "json": "{\"type\":\"authenticate\",\"protocol\":\"piik-v23\",\"roomId\":\"1234\",\"role\":\"viewer\",\"clientId\":\"client_12345678\",\"displayName\":\"名名名名名名名名名名名名名名名名名名名名名名名名\"}",
"valid": true
},
{
"name": "authenticate-viewer-display-name-bidi-override",
"schema": "client",
- "json": "{\"type\":\"authenticate\",\"protocol\":\"screener-v23\",\"roomId\":\"1234\",\"role\":\"viewer\",\"clientId\":\"client_12345678\",\"displayName\":\"a‮b\"}",
+ "json": "{\"type\":\"authenticate\",\"protocol\":\"piik-v23\",\"roomId\":\"1234\",\"role\":\"viewer\",\"clientId\":\"client_12345678\",\"displayName\":\"a‮b\"}",
"valid": false
},
{
"name": "authenticate-viewer-display-name-newline",
"schema": "client",
- "json": "{\"type\":\"authenticate\",\"protocol\":\"screener-v23\",\"roomId\":\"1234\",\"role\":\"viewer\",\"clientId\":\"client_12345678\",\"displayName\":\"a\\nb\"}",
+ "json": "{\"type\":\"authenticate\",\"protocol\":\"piik-v23\",\"roomId\":\"1234\",\"role\":\"viewer\",\"clientId\":\"client_12345678\",\"displayName\":\"a\\nb\"}",
"valid": false
},
{
"name": "authenticate-viewer-null-display-name",
"schema": "client",
- "json": "{\"type\":\"authenticate\",\"protocol\":\"screener-v23\",\"roomId\":\"1234\",\"role\":\"viewer\",\"clientId\":\"client_12345678\",\"displayName\":null}",
+ "json": "{\"type\":\"authenticate\",\"protocol\":\"piik-v23\",\"roomId\":\"1234\",\"role\":\"viewer\",\"clientId\":\"client_12345678\",\"displayName\":null}",
"valid": false
},
{
"name": "authenticate-unknown-role",
"schema": "client",
- "json": "{\"type\":\"authenticate\",\"protocol\":\"screener-v23\",\"roomId\":\"1234\",\"role\":\"relay\",\"clientId\":\"client_12345678\"}",
+ "json": "{\"type\":\"authenticate\",\"protocol\":\"piik-v23\",\"roomId\":\"1234\",\"role\":\"relay\",\"clientId\":\"client_12345678\"}",
"valid": false
},
{
@@ -810,19 +810,19 @@
"serverMessages": [
{
"name": "authenticated-host-minimal",
- "json": "{\"type\":\"authenticated\",\"protocol\":\"screener-v23\",\"peerId\":\"host_12345678\",\"maxViewers\":8,\"endpointMediaCopyCapacity\":2,\"hostOnline\":true,\"connectionId\":null,\"iceConfig\":{\"iceServers\":[],\"natPredictionStunUrls\":[]},\"routePolicy\":{\"peerOnly\":false,\"topologyOptimization\":true,\"natPrediction\":false},\"codeEntryPolicy\":\"open\",\"viewerAuthorizationGeneration\":\"viewer_generation_12345678\",\"mediaMode\":\"peer-assisted\",\"shareGeneration\":\"share_generation_12345678\",\"routeRevision\":0,\"routeAssignment\":{\"upstream\":{\"kind\":\"none\"},\"childPeerIds\":[],\"sfuPublicationGeneration\":null},\"qualitySettings\":{\"resolution\":\"1080p\",\"maxFramerate\":60,\"maxBitrate\":8000000,\"degradationPreference\":\"maintain-resolution\",\"screenAudioQuality\":\"music\"},\"role\":\"host\",\"viewerPasswordEnabled\":false}"
+ "json": "{\"type\":\"authenticated\",\"protocol\":\"piik-v23\",\"peerId\":\"host_12345678\",\"maxViewers\":8,\"endpointMediaCopyCapacity\":2,\"hostOnline\":true,\"connectionId\":null,\"iceConfig\":{\"iceServers\":[],\"natPredictionStunUrls\":[]},\"routePolicy\":{\"peerOnly\":false,\"topologyOptimization\":true,\"natPrediction\":false},\"codeEntryPolicy\":\"open\",\"viewerAuthorizationGeneration\":\"viewer_generation_12345678\",\"mediaMode\":\"peer-assisted\",\"shareGeneration\":\"share_generation_12345678\",\"routeRevision\":0,\"routeAssignment\":{\"upstream\":{\"kind\":\"none\"},\"childPeerIds\":[],\"sfuPublicationGeneration\":null},\"qualitySettings\":{\"resolution\":\"1080p\",\"maxFramerate\":60,\"maxBitrate\":8000000,\"degradationPreference\":\"maintain-resolution\",\"screenAudioQuality\":\"music\"},\"role\":\"host\",\"viewerPasswordEnabled\":false}"
},
{
"name": "authenticated-host-full",
- "json": "{\"type\":\"authenticated\",\"protocol\":\"screener-v23\",\"peerId\":\"host_12345678\",\"maxViewers\":8,\"endpointMediaCopyCapacity\":2,\"hostOnline\":true,\"connectionId\":\"connection_12345678\",\"iceConfig\":{\"iceServers\":[{\"urls\":\"stun:stun.example.test:3478\"},{\"urls\":[\"stun:stun-1.example.test:3478\",\"stun:[2001:db8::1]:3478\"]}],\"natPredictionStunUrls\":[\"stun:nat.example.test:3478\"]},\"routePolicy\":{\"peerOnly\":false,\"topologyOptimization\":true,\"natPrediction\":false},\"codeEntryPolicy\":\"open\",\"viewerAuthorizationGeneration\":\"viewer_generation_12345678\",\"mediaMode\":\"peer-assisted\",\"shareGeneration\":\"share_generation_12345678\",\"routeRevision\":0,\"routeAssignment\":{\"upstream\":{\"kind\":\"sfu\"},\"childPeerIds\":[],\"sfuPublicationGeneration\":\"generation_12345678\"},\"qualitySettings\":{\"resolution\":\"1080p\",\"maxFramerate\":60,\"maxBitrate\":8000000,\"degradationPreference\":\"maintain-resolution\",\"screenAudioQuality\":\"music\"},\"role\":\"host\",\"viewerPasswordEnabled\":false}"
+ "json": "{\"type\":\"authenticated\",\"protocol\":\"piik-v23\",\"peerId\":\"host_12345678\",\"maxViewers\":8,\"endpointMediaCopyCapacity\":2,\"hostOnline\":true,\"connectionId\":\"connection_12345678\",\"iceConfig\":{\"iceServers\":[{\"urls\":\"stun:stun.example.test:3478\"},{\"urls\":[\"stun:stun-1.example.test:3478\",\"stun:[2001:db8::1]:3478\"]}],\"natPredictionStunUrls\":[\"stun:nat.example.test:3478\"]},\"routePolicy\":{\"peerOnly\":false,\"topologyOptimization\":true,\"natPrediction\":false},\"codeEntryPolicy\":\"open\",\"viewerAuthorizationGeneration\":\"viewer_generation_12345678\",\"mediaMode\":\"peer-assisted\",\"shareGeneration\":\"share_generation_12345678\",\"routeRevision\":0,\"routeAssignment\":{\"upstream\":{\"kind\":\"sfu\"},\"childPeerIds\":[],\"sfuPublicationGeneration\":\"generation_12345678\"},\"qualitySettings\":{\"resolution\":\"1080p\",\"maxFramerate\":60,\"maxBitrate\":8000000,\"degradationPreference\":\"maintain-resolution\",\"screenAudioQuality\":\"music\"},\"role\":\"host\",\"viewerPasswordEnabled\":false}"
},
{
"name": "authenticated-viewer-minimal",
- "json": "{\"type\":\"authenticated\",\"protocol\":\"screener-v23\",\"peerId\":\"viewer_12345678\",\"maxViewers\":8,\"endpointMediaCopyCapacity\":2,\"hostOnline\":true,\"hostPaused\":false,\"connectionId\":null,\"iceConfig\":{\"iceServers\":[],\"natPredictionStunUrls\":[]},\"routePolicy\":{\"peerOnly\":false,\"topologyOptimization\":true,\"natPrediction\":false},\"codeEntryPolicy\":\"open\",\"viewerAuthorizationGeneration\":\"viewer_generation_12345678\",\"mediaMode\":\"peer-assisted\",\"shareGeneration\":\"share_generation_12345678\",\"routeRevision\":0,\"routeAssignment\":{\"upstream\":{\"kind\":\"none\"},\"childPeerIds\":[],\"sfuPublicationGeneration\":null},\"qualitySettings\":{\"resolution\":\"1080p\",\"maxFramerate\":60,\"maxBitrate\":8000000,\"degradationPreference\":\"maintain-resolution\",\"screenAudioQuality\":\"music\"},\"role\":\"viewer\"}"
+ "json": "{\"type\":\"authenticated\",\"protocol\":\"piik-v23\",\"peerId\":\"viewer_12345678\",\"maxViewers\":8,\"endpointMediaCopyCapacity\":2,\"hostOnline\":true,\"hostPaused\":false,\"connectionId\":null,\"iceConfig\":{\"iceServers\":[],\"natPredictionStunUrls\":[]},\"routePolicy\":{\"peerOnly\":false,\"topologyOptimization\":true,\"natPrediction\":false},\"codeEntryPolicy\":\"open\",\"viewerAuthorizationGeneration\":\"viewer_generation_12345678\",\"mediaMode\":\"peer-assisted\",\"shareGeneration\":\"share_generation_12345678\",\"routeRevision\":0,\"routeAssignment\":{\"upstream\":{\"kind\":\"none\"},\"childPeerIds\":[],\"sfuPublicationGeneration\":null},\"qualitySettings\":{\"resolution\":\"1080p\",\"maxFramerate\":60,\"maxBitrate\":8000000,\"degradationPreference\":\"maintain-resolution\",\"screenAudioQuality\":\"music\"},\"role\":\"viewer\"}"
},
{
"name": "authenticated-viewer-full",
- "json": "{\"type\":\"authenticated\",\"protocol\":\"screener-v23\",\"peerId\":\"viewer_12345678\",\"maxViewers\":8,\"endpointMediaCopyCapacity\":2,\"hostOnline\":true,\"hostPaused\":true,\"connectionId\":\"connection_12345678\",\"iceConfig\":{\"iceServers\":[],\"natPredictionStunUrls\":[]},\"routePolicy\":{\"peerOnly\":false,\"topologyOptimization\":true,\"natPrediction\":false},\"codeEntryPolicy\":\"open\",\"viewerAuthorizationGeneration\":\"viewer_generation_12345678\",\"mediaMode\":\"peer-assisted\",\"shareGeneration\":\"share_generation_12345678\",\"routeRevision\":0,\"routeAssignment\":{\"upstream\":{\"kind\":\"peer\",\"peerId\":\"parent_12345678\"},\"childPeerIds\":[\"child_12345678\",\"child_87654321\"],\"sfuPublicationGeneration\":null},\"qualitySettings\":{\"resolution\":\"1080p\",\"maxFramerate\":60,\"maxBitrate\":8000000,\"degradationPreference\":\"maintain-resolution\",\"screenAudioQuality\":\"music\"},\"role\":\"viewer\"}"
+ "json": "{\"type\":\"authenticated\",\"protocol\":\"piik-v23\",\"peerId\":\"viewer_12345678\",\"maxViewers\":8,\"endpointMediaCopyCapacity\":2,\"hostOnline\":true,\"hostPaused\":true,\"connectionId\":\"connection_12345678\",\"iceConfig\":{\"iceServers\":[],\"natPredictionStunUrls\":[]},\"routePolicy\":{\"peerOnly\":false,\"topologyOptimization\":true,\"natPrediction\":false},\"codeEntryPolicy\":\"open\",\"viewerAuthorizationGeneration\":\"viewer_generation_12345678\",\"mediaMode\":\"peer-assisted\",\"shareGeneration\":\"share_generation_12345678\",\"routeRevision\":0,\"routeAssignment\":{\"upstream\":{\"kind\":\"peer\",\"peerId\":\"parent_12345678\"},\"childPeerIds\":[\"child_12345678\",\"child_87654321\"],\"sfuPublicationGeneration\":null},\"qualitySettings\":{\"resolution\":\"1080p\",\"maxFramerate\":60,\"maxBitrate\":8000000,\"degradationPreference\":\"maintain-resolution\",\"screenAudioQuality\":\"music\"},\"role\":\"viewer\"}"
},
{
"name": "signaling-challenge-response",
diff --git a/tests/native-client.test.ts b/tests/native-client.test.ts
index 4cdad779..20e6b37d 100644
--- a/tests/native-client.test.ts
+++ b/tests/native-client.test.ts
@@ -26,7 +26,7 @@ describe("native Client private wire", () => {
});
const fetcher = vi.fn(async (url: string) => url.endsWith("/health")
? new Response(JSON.stringify({
- protocol: 9, service: "screener-client", port: 39_721,
+ protocol: 9, service: "piik-client", port: 39_721,
instanceToken: "a".repeat(43),
nativeMedia: {video: true, processAudio: false, systemAudio: true, hardwareH264: true, softwareVP8: true},
}), {status: 200})
@@ -53,7 +53,7 @@ describe("native Client private wire", () => {
static readonly CLOSING = 2;
static readonly CLOSED = 3;
readyState = FakeWebSocket.OPEN;
- protocol = `screener-client-v9.${token}`;
+ protocol = `piik-client-v9.${token}`;
readonly close = vi.fn(() => {
this.readyState = FakeWebSocket.CLOSING;
});
@@ -94,7 +94,7 @@ describe("native Client private wire", () => {
vi.stubGlobal("fetch", vi.fn(async () =>
new Response(JSON.stringify({
protocol: 9,
- service: "screener-client",
+ service: "piik-client",
port: 39_721,
instanceToken: token,
nativeMedia: {
@@ -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("Screener Client request failed");
+ .rejects.toThrow("Piik Client request failed");
await client!.ping();
expect(sockets[0]!.close).not.toHaveBeenCalled();
expect(unexpected).not.toHaveBeenCalled();
@@ -133,7 +133,7 @@ describe("native Client private wire", () => {
expect(
nativeHealthSchema.parse({
protocol: 9,
- service: "screener-client",
+ service: "piik-client",
port: 39_721,
instanceToken: "a".repeat(43),
nativeMedia: {
@@ -148,7 +148,7 @@ describe("native Client private wire", () => {
expect(
nativeHealthSchema.safeParse({
protocol: 7,
- service: "screener-client",
+ service: "piik-client",
port: 39_721,
instanceToken: "a".repeat(43),
nativeMedia: {
diff --git a/tests/protocol.test.ts b/tests/protocol.test.ts
index 8d030043..c188f265 100644
--- a/tests/protocol.test.ts
+++ b/tests/protocol.test.ts
@@ -87,7 +87,7 @@ const qualityEvidence = {
describe("client signaling protocol", () => {
it("uses the current strict signaling generation", () => {
- expect(SIGNALING_PROTOCOL).toBe("screener-v23");
+ expect(SIGNALING_PROTOCOL).toBe("piik-v23");
});
it("keeps signaling challenges strict and sequence-only", () => {
diff --git a/tests/release-update.test.ts b/tests/release-update.test.ts
index 37bc0046..cfc187ea 100644
--- a/tests/release-update.test.ts
+++ b/tests/release-update.test.ts
@@ -6,15 +6,15 @@ import {
parseReleaseMetadata,
} from "../src/client/lib/release-update";
-// The operator checker (cmd/screener-server --check-release, covered by
-// cmd/screener-server/release_test.go) shares this release contract while
+// The operator checker (cmd/piik-server --check-release, covered by
+// cmd/piik-server/release_test.go) shares this release contract while
// keeping its runtime boundary independent.
const currentRevision = "a".repeat(40);
const latestRevision = "b".repeat(40);
const release = {
tag_name: latestRevision,
- html_url: `https://github.com/TNTcraftHIM/Screener/releases/tag/${latestRevision}`,
+ html_url: `https://github.com/TNTcraftHIM/Piik/releases/tag/${latestRevision}`,
};
describe("Client release update notice", () => {
@@ -45,7 +45,7 @@ describe("Client release update notice", () => {
expect(
parseReleaseMetadata({
...release,
- html_url: `https://[email protected]/TNTcraftHIM/Screener/releases/tag/${latestRevision}`,
+ html_url: `https://[email protected]/TNTcraftHIM/Piik/releases/tag/${latestRevision}`,
}),
).toBeNull();
expect(parseReleaseMetadata({ ...release, draft: true })).toBeNull();
diff --git a/tests/theme.test.ts b/tests/theme.test.ts
index 04349fc1..5b69cd8e 100644
--- a/tests/theme.test.ts
+++ b/tests/theme.test.ts
@@ -9,9 +9,9 @@ afterEach(() => {
describe("theme preference", () => {
it("keeps room state compact and the product name first", () => {
expect(composeDocumentTitle("7063", "Sharing")).toBe(
- "Screener | 7063 · Sharing",
+ "Piik | 7063 · Sharing",
);
- expect(composeDocumentTitle()).toBe("Screener");
+ expect(composeDocumentTitle()).toBe("Piik");
});
it("follows the system until the user chooses explicitly", async () => {
@@ -45,7 +45,7 @@ describe("theme preference", () => {
expect(dataset.theme).toBe("dark");
theme.applyTheme("light");
- expect(values.get("screener:ui-theme")).toBe("light");
+ expect(values.get("piik:ui-theme")).toBe("light");
onChange({ matches: true });
expect(dataset.theme).toBe("light");
});