RaggieScript v1.3 (.rssc) • 31 Namespaces, defer, ?., Built-In Test Runner, StoreScript & Two-Way .NET Host SDK

One Clean Curly-Brace Language Across All Eight Studio Tools & Consumer Apps.

RaggieScript v1.3 (.rssc) combines familiar C# / TypeScript curly-brace syntax (struct, enum, match, first-class => closures, defer LIFO cleanup, ?. optional chaining, built-in test "..." suites, and gradual static type inference RSW701–RSW715) with a compact static /MT C++20 Linear Stack Bytecode VM (RSWBC2), a Per-Monitor V2 DPI Declarative In-Window Win32 Wizard UI Engine, Reg-Free COM .manifest generation, StoreScript (use storescript; for StoreTrainer), Story Crossroads (use crossroads;), a two-way managed .NET Host SDK (RaggieScript.Core v1.3), and a zero-eval() ES2022 transpiler!

Interactive 7-Profile Language Explorer • Compile-Time Capability Sandbox

Inspect How RaggieScript Adapts Across Studio Hosts, StoreScript & Standalone EXEs

Profile: use showcase; use installer; (Showcase Studio — Community & Architect): Bundle payload files inside an embedded self-extracting _support\ staging directory, stamp your exact UAC manifest (Uac.Deferred, Uac.AsInvoker, Uac.HighestAvailable, or Uac.RequireAdministrator), and drive full file copy/extraction, Registry keys, and Start Menu shortcuts from a custom-painted .BMP or FluentMica canvas—with automatic rollback journaling!

use std;
use showcase;
use installer; // Unlocked in Showcase Studio Community & Architect Editions

showcase "Starlight Collector's Box Set" {
  style:      CanvasStyle.RetroBmp95;       // Or CanvasStyle.FluentMica16x9
  uac:        Uac.Deferred;                 // Runs canvas un-elevated; prompts UAC only on Install!
  supportDir: "./_support";                 // Bundled into self-extracting EXE & unpacked on demand
  autoPlay:   false;                        // Enforced false by WCAG 2.2 SC 1.4.2
}

let destDir: path = sys.programFiles / "Starlight" / "CollectorEdition";

on hotspot("BtnInstall").click {
  installer.runTransaction(productId: "{7C91E240-41B0-4F92-9A2E-88B12044E901}") {
    // Every fs.*, reg.*, and shortcut.* call auto-journals to .rsw-rollback.jnl!
    fs.copyTree(from: sys.supportDir / "CoreGame", to: destDir, progress: "MainProgressBar");
    fs.copy(from: sys.supportDir / "Soundtrack-Lossless.pak", to: destDir / "Audio" / "Soundtrack.pak");

    reg.writeString(Hive.HKLM, "Software\Starlight\CollectorEdition", "InstallPath", str(destDir));
    shortcut.create(ShortcutLocation.StartMenu, "Starlight Collector's Edition", destDir / "Starlight.exe");
    shortcut.create(ShortcutLocation.Desktop,   "Starlight Collector's Edition", destDir / "Starlight.exe");
  }
  showcase.setHotspotLabel("BtnInstall", "&Launch Collector's Edition");
}

Profile: use installer; (Commit-Time Deferred UAC + Restart Manager + Build-Time compile.json): Because RSW701 statically guarantees wizard { ... } cannot mutate the PC, setting uac: Uac.Deferred keeps the PE manifest at asInvoker—running the entire wizard un-elevated and spawning --elevated-rssc-worker right when the user clicks Install (just like MsiSetExternalUIRecord installers!).

use std;
use installer;

package "Sample Studio Workbench" {
  id:      "{9B4E20A1-7C93-4D62-9B44-524147474950}";
  version: v"1.2.0";
  scope:   Scope.Machine;
  uac:     Uac.Deferred;           // Zero upfront UAC! Elevates Commit worker on &Install
  style:   WizardStyle.FluentMica;
}

const buildMeta = compile.json("build-manifest.json"); // Harvested straight into RSWBC1 bytecode!
param installDir: path = sys.programFiles / "Sample Studio" / "Workbench";
feature "core" { title: "Core Workbench"; inCompact: true; required: true; }
payload AppBins { from "..\publish\win-${arch}\*" -> installDir; }

wizard {
  step Welcome     { ui.welcome("Welcome to Sample Studio Workbench (${buildMeta.channel})"); }
  step Destination { ui.folderPicker(label: "&Destination folder:", bind: ref installDir); }
  step Ready       { ui.readySummary(installButton: "&Install"); }
}

install {
  let locks = proc.getLockingProcesses([installDir / "Workbench.exe"]);
  if (len(locks) > 0) { proc.restartManagerShutdown([installDir / "Workbench.exe"]); }
  fs.extract(AppBins);
  reg.writeString(Hive.HKLM, r"SoftwareSampleStudioWorkbench", "Version", "1.2.0");
  shortcut.create(ShortcutLocation.StartMenu, "Sample Studio Workbench", installDir / "Workbench.exe");
}

Profile: msi.* Direct Relational SQL & External-UI Engine: Want full scriptable control over Windows Installer .msi, .msm, and .mst files? Query or mutate any MSI SQL table directly (CREATE TABLE, SELECT, INSERT, UPDATE, DELETE), edit SummaryInformation & Binary streams, emit .mst GPO transforms, or drive msi.install / msi.repair through live MsiSetExternalUIRecord progress!

use installer;

// Create or open any .msi database and execute parameterized MSI SQL DDL & DML directly!
msi.createDatabase("Baseline.msi");
msi.execSql("Baseline.msi", "CREATE TABLE `Property` (`Property` CHAR(72) NOT NULL, `Value` CHAR(0) LOCALIZABLE PRIMARY KEY `Property`)");
msi.setProperty("Baseline.msi", "Manufacturer", "RaggieSoft");
msi.setSummary("Baseline.msi", 7 /* PID_TEMPLATE */, "x64;1033");

fs.copy("Baseline.msi", "EnterpriseCustomized.msi");
msi.setProperty("EnterpriseCustomized.msi", "DISABLE_TELEMETRY", "1");
msi.generateTransform("Baseline.msi", "EnterpriseCustomized.msi", "EnterprisePolicy.mst");

let props = msi.query("EnterpriseCustomized.msi", "SELECT `Property`, `Value` FROM `Property`");

Profile: app "..." (Standalone raggiescript.exe pack-exe + 64-Bit ffi.call): Build single-file zero-dependency native Windows diagnostic utilities, config patchers, and _support\ helpers with direct 64-bit native DLL FFI (ffi.call) across x64 and ARM64.

// Compile into a single portable .exe: raggiescript.exe pack-exe diag.rssc AudioDiag.exe --support-dir=./_support
app "Audio Endpoint Diagnostic Utility" {
  version:    1.0.0;
  publisher:  "RaggieSoft";
  uac:        Uac.AsInvoker;
  supportDir: "./_support";
}

param cfgPath: path = sys.localAppData / "SampleStudio" / "audio-settings.json";
let currentPid = ffi.call("kernel32.dll", "GetCurrentProcessId", "uint", []);

if (!fs.exists(cfgPath)) {
  fs.writeJson(cfgPath, { sampleRateHz: 48000, arch: sys.arch(), telemetry: false });
}
const digest = crypto.sha256File(cfgPath);
ui.taskDialog(
  title: "Audio Endpoint Diagnostic Utility",
  heading: "Audio Configuration Verified (${sys.arch()} • PID ${currentPid})",
  body: "Active profile path:\n${cfgPath}",
  detailsTitle: "Cryptographic & OS details",
  detailsBody: "SHA-256: ${digest}\nKernel Version: ${sys.osVersion()} (Build ${sys.osBuild()})"
);

Profile: use training; (Training Studio — Sandboxed ES2022 Target, Zero Filesystem/Network Access): Author deterministic branching scenarios and weighted quiz rubrics that transpile into clean, eval()-free ES2022 inside <50 KB SCORM 1.2 & SCORM 2004 packages.

use training; // Filesystem, Registry & Process namespaces forbidden at compile time!

scenario "CaptionComplianceCheck" {
  on answer(questionId: "Q3_ReadingSpeed", choice: selected) {
    if (selected == "Over30Cps") {
      course.routeRemediation(slideId: "Slide04_CaptionPacing");
      course.announcePolite("Reviewing WCAG caption reading-speed guidance before retry.");
    } else {
      course.awardPoints(points: 25, objectiveId: "OBJ_WCAG_CAPTIONS");
    }
  }
}

Profile: use a11y; use localization; (Accessibility & Localization Studio CI/CD Rules): Enforce organization-specific design tokens, ARIA landmarks, and localized caption constraints emitting OASIS SARIF 2.1.0.

use a11y;
use localization;

rule "ORG-A11Y-014: Brand Dialog Buttons Must Preserve Keyboard Accelerators" {
  severity: Severity.Error;
  on localizedString(src, target, locale) {
    if (localization.findMnemonic(src) != "" && localization.findMnemonic(target) == "") {
      a11y.reportViolation("ORG-A11Y-014", locale, "Missing '&' keyboard accelerator in locale " + locale);
    }
  }
}

Profile: use storescript; & use crossroads; (Consumer Sandboxes — StoreTrainer & Story Crossroads): StoreScript runs 100% in memory on an explicit player save-file buffer (RSW702 blocks fs.*, reg.*, proc.*, & net.*!), providing automatic save snapshots, "??" wildcard signature scanning, clamped little-endian integer/float writes, and IEEE CRC-32 checksum recalculation!

use storescript; // Zero raw OS filesystem, registry, process, or network calls allowed (RSW702)!

const meta = storescript.profile("cedar-run-tactics", "Cedar Run Tactics — Campaign Save Utility", "*.sav");

fn applyCreditsBoost(requestedCredits: int) : map {
  const backupId = storescript.backupSave("pre-credits-boost");
  defer { log("StoreScript session finished (snapshot=${backupId})"); }

  const tagOffset = storescript.findPatternHex("43 52 45 44 ?? ??"); // "CRED" + 2-byte version wildcard
  if (tagOffset < 0) { return { ok: false }; }

  storescript.writeI32LE(tagOffset + 6, math.clamp(requestedCredits, 0, 999999), min: 0, max: 999999);
  const crc = storescript.crc32Range(4, storescript.size() - 4);
  storescript.writeU32LE(0, crc);
  return { ok: true, backupId: backupId, crc32: crc };
}
Shipped Static /MT C++20 & .NET 11 Standard Library • 31 Built-In Win32, Studio & Consumer Namespaces

Complete RaggieScript v1.3 Standard Library & raggiescript.exe CLI Reference

Compiled directly into raggiescript.exe, instbuild.exe, SetupWizard.exe, and RaggieSoft.RaggieScript.Core across Windows 11 x64, ARM64, .NET, and ES2022—with compile-time RSW701 phase isolation, RSW702 capability sandboxing, defer LIFO cleanup, ?. optional chaining, and atomic .rsw-rollback.jnl undo journaling!

RaggieScript v1.3 31-Namespace Standard Library & CLI Subcommands
Namespace / CLI Key Methods & Primitives Architectural Advantage
raggiescript.exe check [--diagnostics=json], test [--json], compile (RSWBC2), disasm, fmt, lsp, transpile-es2022, run, pack-exe Gradual static binder (RSW701–RSW715), built-in unit test runner, formatter, JSON-RPC 2.0 LSP, & zero-eval() ES2022!
sys.*, time.*, math.*, map.*, array.* sys.isEmulatedUnderPrism(), time.{nowUtc,stopwatchMs,formatScormDuration}, math.{clamp,lerp,round}, map.{keys,entries,merge}, array.{map,filter,reduce,find,sort,unique} Pierces ARM64 Prism via IsWow64Process2 + SCORM 2004 ISO durations + functional collection pipelines!
com.*, font.*, sign.*, cert.*, mutex.*, activesetup.* com.{inspectTypeLib,generateRegFreeManifest}, font.{isInstalled,install}, sign.inspect, cert.importTrustedPublisher, mutex.{isHeld,waitRelease}, net.findFreePort, activesetup.register Zero-HKCR VB6/ActiveX Reg-Free COM Side-by-Side .manifest generation, zero-reboot fonts, & <1ms Wizard port/mutex probes!
fs.* extract, copy, copyTree, isLocked, fileVersion, readJson/writeJson, setNtfsCompression Every mutating file operation backs up existing files to .rswbak for instant LIFO rollback!
reg.* exists, readString, readDword, listSubkeys, writeString, writeDword, deleteKeyTree Stateless view: RegView.Native64 | Wow32 | Both eliminates global 32/64-bit mode toggle bugs!
proc.* & ffi.* run(..., token: Token.Current | Elevated | Desktop), getLockingProcesses, restartManagerShutdown, ffi.call Token.Desktop Explorer de-elevation, Windows Restart Manager (Rstrtmgr.dll), & 64-bit native DLL FFI!
msi.* (SQL & Runtime) createDatabase, query, execSql, getProperty/setProperty, setSummary, importStream, generateTransform, install, repair Direct relational MSI SQL table DDL/DML + .mst transforms + live MsiSetExternalUIRecord progress!
ui.*, wizard.* & Uac.Deferred ui.taskDialog (Command Links, UAC shields, detailsBody, verifyText), pickFolder, progress, wizard.back(), Uac.Deferred Runs wizard { ... } un-elevated (asInvoker) and spawns --elevated-rssc-worker only on Install!
archive.*, compile.*, prereq.*, env.*, arp.*, svc.*, net.*, crypto.* archive.{create,extract,create7z,extract7z,createLzma,extractLzma,createZip,createPak,createCab,createTar,createZst,createIso,createWim,list,verify}, compile.json, env.appendPath, crypto.verifyAuthenticode Zero-DLL Windows 11 multi-format archiving (.7z, .zip, .rswpak, .cab, .tar.zst, .iso, .wim) with Zip-Slip & LIFO rollback protection!
storescript.*, crossroads.* & 7 Studio Sandboxes storescript.{profile,backupSave,findPatternHex,writeI32LE,writeU32LE,crc32Range,setJson}, crossroads.{visit,adjustStat,offerOption}, showcase.*, training.*, a11y.parseVttCues, localization.tokensMatch RSW702 capability-sandboxed save-file trainer DSL for StoreTrainer, branching scenes for Story Crossroads, & 8-tool Studio automation!
First-Class Authoring Experience • Integrated Win32 IDE + Every Popular Code Editor

Syntax Highlighting & Live Diagnostics Everywhere You Write .rssc

1. Integrated RichEdit 5.0 Editor in InstallerStudio.exe

Author .rssc, .rsip, .rsis, and .rsii files directly inside InstallerStudio.exe with native Msftedit.dll Dark, Light, and High-Contrast syntax highlighting, a synchronized line-number gutter, F7 RSW701/RSW702 validation, and one-key F5 compilation.

2. Official VS Code Extension (vscode-raggiescript .vsix)

Full TextMate grammar for .rssc and .rsip/.rsis, rich snippets, and live on-save raggiescript.exe check --diagnostics=json squiggles pinpointing exact 1-based lines and columns.

3. Notepad++ (Light & Dark UDL) & Sublime Text

Ready-to-import Notepad++ User Defined Language XML definitions (tuned for both Light and Dark themes) alongside a modern YAML RaggieScript.sublime-syntax grammar for Sublime Text 4.

4. Vim / Neovim, KDE Kate & GitHub Linguist

Ships ftdetect + syntax/raggiescript.vim for Vim and Neovim, KSyntaxHighlighting XML for KDE Kate/KWrite, and repository .gitattributes mappings for clean pull-request diffs on GitHub.

Compiler Engineering Cross-Pollination • RaggieSoft Labs

From RaggieScript Phase Isolation to Zoë's Fin# Linear-Type Compiler

RaggieScript's compile-time separation between side-effect-free wizard { ... } steps and double-entry journaled install { ... } blocks shares architectural DNA with our experimental RaggieSoft Labs research project on Fin# (Financial Sharp — raggiesoft.dev/labs/finsharp)—a domain-specific .NET / Roslyn-inspired financial compiler enforcing conservation of capital at compile time!