Files
Reims-Go/frontend/wailsjs/go/models.ts
T
Nwflower faa2b71202 feat(guest-tools): add token-authenticated clipboard & shared folder bridge and update roadmap
- Pure-Go Win32 clipboard + localhost HTTP bridge (127.0.0.1:19847) with per-VM 256-bit random Bearer token and jailed shared directory (<DataRoot>/shared/<vm>)
- Pure-Go HFS+ REIMSTOOLS virtual USB disk with stock-macOS POSIX LaunchAgent installer (no Xcode or Python needed) for two-way UTF-8 clipboard and ~/Desktop/ReimsShare sync
- VMPage Guest Tools card with live connection badge, Open shared folder, Attach/Eject tools disk, and one-click QMP install command
- Update docs/roadmap.md with v0.3/v0.4 competitor-aligned follow-up tasks
2026-11-28 08:41:09 -07:00

745 lines
22 KiB
TypeScript

export namespace config {
export class Config {
data_root: string;
locale: string;
active_runtime?: string;
auto_pin_pcores: boolean;
default_gpu?: string;
runtime_channel?: string;
static createFrom(source: any = {}) {
return new Config(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.data_root = source["data_root"];
this.locale = source["locale"];
this.active_runtime = source["active_runtime"];
this.auto_pin_pcores = source["auto_pin_pcores"];
this.default_gpu = source["default_gpu"];
this.runtime_channel = source["runtime_channel"];
}
}
}
export namespace host {
export class GPUInfo {
name: string;
vulkan_icd: string;
kind: string;
static createFrom(source: any = {}) {
return new GPUInfo(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.name = source["name"];
this.vulkan_icd = source["vulkan_icd"];
this.kind = source["kind"];
}
}
export class Optimization {
id: string;
status: string;
supported: boolean;
recommended: boolean;
detail?: string;
static createFrom(source: any = {}) {
return new Optimization(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.id = source["id"];
this.status = source["status"];
this.supported = source["supported"];
this.recommended = source["recommended"];
this.detail = source["detail"];
}
}
export class WHPXCapabilities {
modern_os: boolean;
apic_emulation: boolean;
kernel_irqchip_available: boolean;
nested_virt_property: boolean;
nested_virt_probe_error?: string;
static createFrom(source: any = {}) {
return new WHPXCapabilities(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.modern_os = source["modern_os"];
this.apic_emulation = source["apic_emulation"];
this.kernel_irqchip_available = source["kernel_irqchip_available"];
this.nested_virt_property = source["nested_virt_property"];
this.nested_virt_probe_error = source["nested_virt_probe_error"];
}
}
export class Report {
os: string;
arch: string;
logical_cpus: number;
physical_cores: number;
has_hybrid_cores: boolean;
p_core_count: number;
e_core_count: number;
lpe_core_count?: number;
p_core_mask: number;
p_core_mask_hex: string;
p_core_logical_cpus?: number[];
e_core_logical_cpus?: number[];
non_lpe_mask?: number;
non_lpe_mask_hex?: string;
non_lpe_logical_cpus?: number[];
total_ram_gb: number;
avail_ram_gb: number;
commit_avail_gb: number;
commit_limit_gb: number;
data_root: string;
free_disk_gb: number;
whpx: string;
whpx_caps: WHPXCapabilities;
needs_cold_reboot_workaround: boolean;
gpus: GPUInfo[];
recommended_gpu?: GPUInfo;
static createFrom(source: any = {}) {
return new Report(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.os = source["os"];
this.arch = source["arch"];
this.logical_cpus = source["logical_cpus"];
this.physical_cores = source["physical_cores"];
this.has_hybrid_cores = source["has_hybrid_cores"];
this.p_core_count = source["p_core_count"];
this.e_core_count = source["e_core_count"];
this.lpe_core_count = source["lpe_core_count"];
this.p_core_mask = source["p_core_mask"];
this.p_core_mask_hex = source["p_core_mask_hex"];
this.p_core_logical_cpus = source["p_core_logical_cpus"];
this.e_core_logical_cpus = source["e_core_logical_cpus"];
this.non_lpe_mask = source["non_lpe_mask"];
this.non_lpe_mask_hex = source["non_lpe_mask_hex"];
this.non_lpe_logical_cpus = source["non_lpe_logical_cpus"];
this.total_ram_gb = source["total_ram_gb"];
this.avail_ram_gb = source["avail_ram_gb"];
this.commit_avail_gb = source["commit_avail_gb"];
this.commit_limit_gb = source["commit_limit_gb"];
this.data_root = source["data_root"];
this.free_disk_gb = source["free_disk_gb"];
this.whpx = source["whpx"];
this.whpx_caps = this.convertValues(source["whpx_caps"], WHPXCapabilities);
this.needs_cold_reboot_workaround = source["needs_cold_reboot_workaround"];
this.gpus = this.convertValues(source["gpus"], GPUInfo);
this.recommended_gpu = this.convertValues(source["recommended_gpu"], GPUInfo);
}
convertValues(a: any, classs: any, asMap: boolean = false): any {
if (!a) {
return a;
}
if (a.slice && a.map) {
return (a as any[]).map(elem => this.convertValues(elem, classs));
} else if ("object" === typeof a) {
if (asMap) {
for (const key of Object.keys(a)) {
a[key] = new classs(a[key]);
}
return a;
}
return new classs(a);
}
return a;
}
}
}
export namespace installer {
export class Cached {
name: string;
path: string;
bytes: number;
kind: string;
partial: boolean;
title?: string;
version?: string;
build?: string;
static createFrom(source: any = {}) {
return new Cached(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.name = source["name"];
this.path = source["path"];
this.bytes = source["bytes"];
this.kind = source["kind"];
this.partial = source["partial"];
this.title = source["title"];
this.version = source["version"];
this.build = source["build"];
}
}
export class Release {
product: string;
title: string;
version: string;
build: string;
posted: string;
size: number;
static createFrom(source: any = {}) {
return new Release(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.product = source["product"];
this.title = source["title"];
this.version = source["version"];
this.build = source["build"];
this.posted = source["posted"];
this.size = source["size"];
}
}
}
export namespace main {
export class AppState {
config?: config.Config;
host: host.Report;
optimizations: host.Optimization[];
runtimes: runtime.Installed[];
active_runtime?: runtime.Installed;
vms: reims.VMListItem[];
transitions: Record<string, string>;
pending_changes: Record<string, Array<PendingChange>>;
needs_setup: boolean;
static createFrom(source: any = {}) {
return new AppState(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.config = this.convertValues(source["config"], config.Config);
this.host = this.convertValues(source["host"], host.Report);
this.optimizations = this.convertValues(source["optimizations"], host.Optimization);
this.runtimes = this.convertValues(source["runtimes"], runtime.Installed);
this.active_runtime = this.convertValues(source["active_runtime"], runtime.Installed);
this.vms = this.convertValues(source["vms"], reims.VMListItem);
this.transitions = source["transitions"];
this.pending_changes = this.convertValues(source["pending_changes"], Array<PendingChange>, true);
this.needs_setup = source["needs_setup"];
}
convertValues(a: any, classs: any, asMap: boolean = false): any {
if (!a) {
return a;
}
if (a.slice && a.map) {
return (a as any[]).map(elem => this.convertValues(elem, classs));
} else if ("object" === typeof a) {
if (asMap) {
for (const key of Object.keys(a)) {
a[key] = new classs(a[key]);
}
return a;
}
return new classs(a);
}
return a;
}
}
export class DataRootCheck {
path: string;
free_gb: number;
system: boolean;
external: boolean;
has_config: boolean;
error?: string;
static createFrom(source: any = {}) {
return new DataRootCheck(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.path = source["path"];
this.free_gb = source["free_gb"];
this.system = source["system"];
this.external = source["external"];
this.has_config = source["has_config"];
this.error = source["error"];
}
}
export class DataRootChoice {
path: string;
free_gb: number;
system: boolean;
external: boolean;
recommended: boolean;
static createFrom(source: any = {}) {
return new DataRootChoice(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.path = source["path"];
this.free_gb = source["free_gb"];
this.system = source["system"];
this.external = source["external"];
this.recommended = source["recommended"];
}
}
export class PendingChange {
field: string;
from: string;
to: string;
static createFrom(source: any = {}) {
return new PendingChange(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.field = source["field"];
this.from = source["from"];
this.to = source["to"];
}
}
export class Task {
id: string;
kind: string;
subject: string;
vm?: string;
step: string;
done: number;
total: number;
percent: number;
rate: number;
status: string;
error?: string;
result?: string;
cancelable: boolean;
started_at: number;
updated_at: number;
static createFrom(source: any = {}) {
return new Task(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.id = source["id"];
this.kind = source["kind"];
this.subject = source["subject"];
this.vm = source["vm"];
this.step = source["step"];
this.done = source["done"];
this.total = source["total"];
this.percent = source["percent"];
this.rate = source["rate"];
this.status = source["status"];
this.error = source["error"];
this.result = source["result"];
this.cancelable = source["cancelable"];
this.started_at = source["started_at"];
this.updated_at = source["updated_at"];
}
}
}
export namespace reims {
export class CreateOpts {
name: string;
dir?: string;
source_mode?: string;
macos?: string;
offline?: boolean;
installer?: string;
cpus?: number;
memory?: string;
disk_size?: string;
disk?: string;
disk_mode?: string;
disk_controller?: string;
graphics?: string;
gpu?: string;
resolution?: string;
displays?: number;
borderless?: boolean;
audio?: boolean;
network?: boolean;
ssh_port?: number;
logs?: boolean;
start?: boolean;
static createFrom(source: any = {}) {
return new CreateOpts(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.name = source["name"];
this.dir = source["dir"];
this.source_mode = source["source_mode"];
this.macos = source["macos"];
this.offline = source["offline"];
this.installer = source["installer"];
this.cpus = source["cpus"];
this.memory = source["memory"];
this.disk_size = source["disk_size"];
this.disk = source["disk"];
this.disk_mode = source["disk_mode"];
this.disk_controller = source["disk_controller"];
this.graphics = source["graphics"];
this.gpu = source["gpu"];
this.resolution = source["resolution"];
this.displays = source["displays"];
this.borderless = source["borderless"];
this.audio = source["audio"];
this.network = source["network"];
this.ssh_port = source["ssh_port"];
this.logs = source["logs"];
this.start = source["start"];
}
}
export class SetOpts {
name: string;
cpus?: number;
memory?: string;
graphics?: string;
displays?: number;
disk_controller?: string;
resolution?: string;
borderless?: boolean;
capture?: boolean;
gpu?: string;
logs?: boolean;
log_level?: string;
audio?: boolean;
audio_backend?: string;
network?: boolean;
ssh_port?: number;
stop_timeout?: number;
extra_args?: string;
env?: string[];
static createFrom(source: any = {}) {
return new SetOpts(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.name = source["name"];
this.cpus = source["cpus"];
this.memory = source["memory"];
this.graphics = source["graphics"];
this.displays = source["displays"];
this.disk_controller = source["disk_controller"];
this.resolution = source["resolution"];
this.borderless = source["borderless"];
this.capture = source["capture"];
this.gpu = source["gpu"];
this.logs = source["logs"];
this.log_level = source["log_level"];
this.audio = source["audio"];
this.audio_backend = source["audio_backend"];
this.network = source["network"];
this.ssh_port = source["ssh_port"];
this.stop_timeout = source["stop_timeout"];
this.extra_args = source["extra_args"];
this.env = source["env"];
}
}
export class VMDetail {
name: string;
state: string;
kind: string;
directory: string;
cpus: number;
memory: string;
disk: string;
disk_controller: string;
graphics: string;
display: string;
displays: number;
resolution: string;
gpu: string;
has_opencore: boolean;
has_installer: boolean;
recovery_mode: boolean;
installer_path?: string;
cpu_model: string;
audio: boolean;
audio_raw: string;
network: boolean;
network_summary: string;
ssh_port: number;
logs: boolean;
log_level: string;
stop_timeout: number;
capture: boolean;
borderless: boolean;
extra_args: string;
guest_tools_attached: boolean;
guest_tools_configured: boolean;
guest_tools_connected: boolean;
shared_dir?: string;
static createFrom(source: any = {}) {
return new VMDetail(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.name = source["name"];
this.state = source["state"];
this.kind = source["kind"];
this.directory = source["directory"];
this.cpus = source["cpus"];
this.memory = source["memory"];
this.disk = source["disk"];
this.disk_controller = source["disk_controller"];
this.graphics = source["graphics"];
this.display = source["display"];
this.displays = source["displays"];
this.resolution = source["resolution"];
this.gpu = source["gpu"];
this.has_opencore = source["has_opencore"];
this.has_installer = source["has_installer"];
this.recovery_mode = source["recovery_mode"];
this.installer_path = source["installer_path"];
this.cpu_model = source["cpu_model"];
this.audio = source["audio"];
this.audio_raw = source["audio_raw"];
this.network = source["network"];
this.network_summary = source["network_summary"];
this.ssh_port = source["ssh_port"];
this.logs = source["logs"];
this.log_level = source["log_level"];
this.stop_timeout = source["stop_timeout"];
this.capture = source["capture"];
this.borderless = source["borderless"];
this.extra_args = source["extra_args"];
this.guest_tools_attached = source["guest_tools_attached"];
this.guest_tools_configured = source["guest_tools_configured"];
this.guest_tools_connected = source["guest_tools_connected"];
this.shared_dir = source["shared_dir"];
}
}
export class VMListItem {
name: string;
dir: string;
pid?: number;
state: string;
static createFrom(source: any = {}) {
return new VMListItem(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.name = source["name"];
this.dir = source["dir"];
this.pid = source["pid"];
this.state = source["state"];
}
}
export class ValidationIssue {
field: string;
code: string;
message: string;
static createFrom(source: any = {}) {
return new ValidationIssue(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.field = source["field"];
this.code = source["code"];
this.message = source["message"];
}
}
}
export namespace runtime {
export class Patch {
name: string;
target: string;
sha256: string;
static createFrom(source: any = {}) {
return new Patch(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.name = source["name"];
this.target = source["target"];
this.sha256 = source["sha256"];
}
}
export class Manifest {
schema_version: number;
name: string;
platform: string;
upstream_repo: string;
commit: string;
full_commit: string;
qemu_version: string;
util_version: string;
built_at: string;
file_count: number;
dll_count: number;
raw_bytes: number;
sha256: Record<string, string>;
vendor_qemu_commit?: string;
util_commit?: string;
metal2vulkan_commit?: string;
patches?: Patch[];
channel?: string;
source_package?: string;
static createFrom(source: any = {}) {
return new Manifest(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.schema_version = source["schema_version"];
this.name = source["name"];
this.platform = source["platform"];
this.upstream_repo = source["upstream_repo"];
this.commit = source["commit"];
this.full_commit = source["full_commit"];
this.qemu_version = source["qemu_version"];
this.util_version = source["util_version"];
this.built_at = source["built_at"];
this.file_count = source["file_count"];
this.dll_count = source["dll_count"];
this.raw_bytes = source["raw_bytes"];
this.sha256 = source["sha256"];
this.vendor_qemu_commit = source["vendor_qemu_commit"];
this.util_commit = source["util_commit"];
this.metal2vulkan_commit = source["metal2vulkan_commit"];
this.patches = this.convertValues(source["patches"], Patch);
this.channel = source["channel"];
this.source_package = source["source_package"];
}
convertValues(a: any, classs: any, asMap: boolean = false): any {
if (!a) {
return a;
}
if (a.slice && a.map) {
return (a as any[]).map(elem => this.convertValues(elem, classs));
} else if ("object" === typeof a) {
if (asMap) {
for (const key of Object.keys(a)) {
a[key] = new classs(a[key]);
}
return a;
}
return new classs(a);
}
return a;
}
}
export class Installed {
commit: string;
dir: string;
active: boolean;
manifest: Manifest;
static createFrom(source: any = {}) {
return new Installed(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.commit = source["commit"];
this.dir = source["dir"];
this.active = source["active"];
this.manifest = this.convertValues(source["manifest"], Manifest);
}
convertValues(a: any, classs: any, asMap: boolean = false): any {
if (!a) {
return a;
}
if (a.slice && a.map) {
return (a as any[]).map(elem => this.convertValues(elem, classs));
} else if ("object" === typeof a) {
if (asMap) {
for (const key of Object.keys(a)) {
a[key] = new classs(a[key]);
}
return a;
}
return new classs(a);
}
return a;
}
}
export class Remote {
commit: string;
tag: string;
channel: string;
published_at: string;
page_url: string;
archive_name: string;
archive_url: string;
archive_size: number;
sums_url: string;
source_name?: string;
source_url?: string;
static createFrom(source: any = {}) {
return new Remote(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.commit = source["commit"];
this.tag = source["tag"];
this.channel = source["channel"];
this.published_at = source["published_at"];
this.page_url = source["page_url"];
this.archive_name = source["archive_name"];
this.archive_url = source["archive_url"];
this.archive_size = source["archive_size"];
this.sums_url = source["sums_url"];
this.source_name = source["source_name"];
this.source_url = source["source_url"];
}
}
}