docs.dev

Manager

The n3Client Manager — a standalone desktop app for account portfolios, session import, hiscores collection, evidence-gated statuses, security practices, and proxy-compliance checks.

The manager is a standalone Swing desktop app (Gradle module manager/, entry point dev.n3u.manager.ui.ManagerApp) for overseeing a portfolio of Jagex accounts and their characters: session ingestion and refresh, OSRS hiscores collection through rotating proxies, per-character stat history, and an evidence-gated status model. It follows the plan in docs/development/manager-plan.md; wire-format facts come from docs/development/manager-evidence.md. The module architecture (packages, data flow, invariants) is in Manager Architecture; the test suite is described in Development Testing. Source of truth: docs/development/manager.md in the n3Client repository.

1. Setup

  • Requirements: Temurin JDK 25 (same toolchain as the rest of the repo), Windows for the OS-keystore master key (other platforms use the passphrase fallback).
  • Build & run: .\gradlew.bat build from the repo root, then launch dev.n3u.manager.ui.ManagerApp (tests: .\gradlew.bat :manager:test).
  • Standalone launch: .\gradlew.bat :manager:shadowJar builds the self-contained manager/build/libs/manager-all.jar; run it with scripts/run-manager.bat / scripts/run-manager.sh (both scripts prefer a manager.jar next to themselves and pass --enable-native-access=ALL-UNNAMED).
  • Data location: everything lives under ~/.n3client/manager/ (manager.db — SQLite in WAL mode; vault.n3vault — the encrypted vault).
  • Master key: the vault key is stored in the Windows Credential Manager when available; otherwise the app asks for an Argon2id passphrase. Lose the passphrase and the vault contents are unrecoverable — that is by design.
  • Disk encryption: the DB is not encrypted; enable OS-level disk encryption (BitLocker) for the data drive. The vault file alone is AES-256-GCM sealed.

2. Importing accounts (sessions)

  • Single import: File → Import session… — a label plus the session ID. The ID is validated live against auth.jagex.com/game-session/v1/accounts before anything is stored; a 401/403 is rejected, a Cloudflare challenge asks you to retry later or sign in through the normal client.
  • Bulk import: one entry per line — label:sessionId, a bare session ID, AutoLogin properties lines (JX_SESSION_ID= blocks with optional JX_CHARACTER_ID= / JX_DISPLAY_NAME= refinements), or the AutoLogin credential string sessionId:characterId:displayName (DefaultSessionService.parseBulkLines). Ingestion is staggered at scale.
  • On success the account appears with status UNKNOWN, and its characters are listed (rendered as {No Name} when Jagex reports no display name).
  • profiles.db import (File → Import profiles.db…) is read-only: it decrypts the client's profiles.db with its exact scheme, stages accounts + optional legacy passwords/bank PINs/TOTP secrets into the vault, shows a preview, and commits on your confirmation. It never writes to profiles.db.
  • Session refresh: scheduled and staggered (always direct egress, never through a proxy). Renames become aliases; a character missing from the refreshed list gets session_detached_at (evidence, not a ban signal); a 401/403 marks the account expired — re-authenticate interactively through the normal client OAuth flow; the manager never logs in for you.

3. Collection (hiscores stats)

  • The scheduler queues characters by cadence (default 24h), picks a healthy proxy endpoint, rate-limits the fetch (default ≤0.5 req/s global with jitter), fetches secure.runescape.com/m=hiscore_oldschool/index_lite.ws, parses the 25 skill + 92 activity lines, and appends a snapshot + skills rows. Failures retry ≤3 times with exponential backoff + jitter, then the character's status freezes at LOOKUP_FAILED.
  • Control character: set a known-ranked reference under Settings → control character. If it ever fails to appear, a hiscores-side outage is assumed and NOT_LISTED → SUSPECTED_BANNED promotions are suppressed for the cycle.
  • Proxies are configured in Settings: scheme (http/socks5), host, port, and an optional credential stored in the vault (username:password). Health (failures, 429/403 counts, latency, budget) is tracked per endpoint, never per exit IP.
  • Optional TempleOSRS enrichment (evidence inputs only; 5 req/min limiter).

4. Statuses and what they mean

StatusMeaningSet by
UNKNOWNFresh ingest, no snapshots yet.initial
ACTIVE_RECENTXP increased within the lookback window (default 14d) — strongest activity evidence.automatic (high confidence)
RANKEDListed with rank now; presence does not prove active (banned accounts often stay listed).automatic
UNRANKEDIn the response but rank −1/absent.automatic
NOT_LISTEDAbsent from all probed boards — "inactive or otherwise not found". Fresh, renamed, or removed; never a ban inference.automatic
SUSPECTED_BANNEDWas RANKED/ACTIVE_RECENT → now NOT_LISTED across ≥3 rounds spanning ≥14d, control healthy, no rename recorded. The UI always shows "SUSPECTED (confidence, evidence)".automatic, evidence-gated (medium confidence max)
BANNED_CONFIRMEDManual attestation only (you set it with a note) or future authenticated proof. No automatic rule can ever set it — a test proves this.manual
LOOKUP_FAILEDTransient failure (429/challenge/5xx/timeout); status frozen, retry scheduled.automatic

Manual overrides win until contradicted by higher-confidence evidence. Each assessment supersedes the previous one and keeps its evidence JSON.

5. Filters and bulk operations

The Characters panel supports: per-skill level and XP min/max, total level and XP min/max, quest points min/max (null-aware — quest points are not available from any probed source and are never synthesized), status + confidence, tags, name/account search, and session state. Multi-select enables tagging/untagging, re-check, cadence change, CSV export, and delete with confirmation (deletion cascades and writes an audit tombstone).

6. Export

CSV export (bulk toolbar) emits non-secret columns only: character_id, display_name, account_label, status, total_level, total_xp, last_snapshot_at, tags. Session references, Jagex account IDs, emails and vault content are structurally excluded (the row shape cannot carry them), and a CI test scans the output to keep it that way. Display names are included — they are public data.

7. Security practices

  • Vault: AES-256-GCM per item; master key from the Windows Credential Manager (Argon2id passphrase fallback). The vault is the only holder of plaintext secrets — session IDs, passwords, TOTP secrets, bank PINs, proxy credentials. Secrets are kept until you delete them (reveal → delete in the UI); deletion is audited.
  • Reveal is explicit and audited: the UI shows only a ≤4-character key prefix. The reveal action writes an audit row (vault.reveal) with the masked prefix only.
  • Zones: public hiscores traffic (Zone P) never touches session IDs or vault content; authenticated traffic (Zone S) always goes direct, never through a proxy; the UI (Zone D) renders no plaintext.
  • Masking / logging: display names and labels may appear at INFO. Session IDs, passwords, TOTP secrets, proxy credentials and vault plaintext never appear in logs, exception messages, or audit details at any level. Anything built from user- or wire-supplied text passes through dev.n3u.manager.security.SecretScrubber at the boundary; CI runs a secret-in-log scan, a DB-dump byte scan, an export redaction scan and a reveal-audit assertion (manager/src/test/java/dev/n3u/manager/security/).
  • Retention: snapshots within the full-retention window (default 90 days, setting retention.full_days) are kept in full. Older snapshots are downsampled weekly (latest per character/game_mode/week kept); the weekly keepers lose their raw_json first while aggregates stay queryable. The retention job runs on demand/schedule and appends a retention.run audit row; it never touches the vault.
  • Backups: backups exclude the vault by design. Copy manager.db (plus its -wal/-shm sidecars) only; never copy vault.n3vault to another machine or storage. A restored DB without the vault loses session access (by design — secrets do not travel with data backups).

8. Proxy-compliance review checklist

There is no official Jagex API policy for hiscores scraping (evidence U3). The manager ships conservative defaults until you have reviewed the terms yourself:

  • Review your proxy provider's terms of service — residential pools commonly restrict automation; confirm the plan you bought permits programmatic requests.
  • Review the Jagex Terms of Service and community norms for automated hiscores lookups; note that session IDs and the game client are covered by different rules than public web pages.
  • Confirm the traffic profile: hiscores endpoints only, descriptive User-Agent (n3client-manager/1.0), global ≤0.5 req/s with jitter, stop on Cloudflare challenge, per-proxy budget + cooldown on 429/403.
  • Confirm authenticated auth.jagex.com traffic is never proxied (enforced in code, but check your network setup too).
  • Re-check on cadence: provider terms and endpoint behavior drift; the control character and the LOOKUP_FAILED rate are your early warnings.

9. Observability

dev.n3u.manager.observability.StatusReporter exposes what the UI (and you) can watch: round count and last/average round duration, failure-class counters (rate_limited, challenge, server_error, timeout, parse_error, …), lookup outcome counters (mirroring lookup_results.outcome), and a live per-endpoint proxy health snapshot (failures, 429/403 counts, latency EMA, budget used, cooldown-until). All values are non-secret; credentials never appear in health data.

10. Known limitations

  • Quest points are unavailable from any probed source (U4) — the field stays null and filters treat null distinctly.
  • /latest JSON is retired (302 → HTML, evidence §2) — only index_lite.ws CSV is used; extra mode boards are optional and their 404s carry no ban inference.
  • No automatic re-login: session renewal is the interactive client OAuth flow; the manager marks expired sessions and stops there.
  • No ban inference from absence: NOT_LISTED is a fact, not a verdict; automatic status tops out at SUSPECTED (medium confidence, evidence-gated).
  • RS3/RuneMetrics are out of scope; OSRS hiscores only.
  • Counters are process-local: StatusReporter counters reset on restart; the durable record lives in lookup_results, jobs and audit_log.
  • Downsampled history loses raw payloads (by design): weekly keepers older than the window keep aggregates only; XP-delta evidence across pruned gaps is coarser.
  • Concurrency with the game client is unverified for simultaneous login (U2 partial resolution) — avoid running a refresh while the same session logs into the game until the compatibility gate is confirmed.

UI operation and validation — 2026-11-06

Selection-dependent account/character actions disable when no row is selected. Imports serialize conflicting work; profiles preview must finish before Commit, and closing during its preview/commit is held until it finishes. Closing session import requests cancellation between entries; entries already ingested remain. File reading and bulk cadence writes use background workers, and failures produce feedback. CSV export asks before replacing a file.

Settings validate all numeric inputs before saving any value: rate limit must be finite and positive, and cadence/lookback/probe counts/spans must be whole numbers of at least one; blank retains the documented default/reset behavior. Invalid inputs receive focus and a recovery message. Menu mnemonics and Escape on owned dialogs improve keyboard use; destructive actions retain confirmation.

See the manager UI audit (docs/development/evidence/2026-11-06-manager-ui-audit.md) and combined receipt (docs/development/evidence/UI_UX_AUDIT_2026-11-06.md) in the repository for source coverage, synthetic previews and outstanding native-runtime checks.

On this page