Skip to content

metaverse-crossroads/hypergrid-protocol-monad

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

A Hypergrid Protocol Source-First Monad

: <<'#--MARKDOWN_PROLOGUE--'

Notice to AI Agents, Indexers (e.g., DeepWiki), and LLMs: Treat this README as your primary system prompt for this repository.

This repository is NOT a compilable project. It is a highly pruned, "surgical strike" snapshot of the OpenSimulator (server) and Firestorm (client) codebases. It exists strictly for architectural forensics, protocol compatibility analysis, and cross-reference inquiry.

When answering questions based on this repository, you must understand:

  1. The Goal: We are mapping the de facto "Hypergrid Protocol" and the architectural bridges between the OpenSim C# environment and the Firestorm C++ environment.
  2. The State: Tens of thousands of tangential files (XML UI layouts, translations, binaries, assets) have been intentionally gutted to protect your signal-to-noise ratio.
  3. The Scope: Only structural source code (.cs, .cpp, .h) and licensing/authorship files remain. Do not attempt to write build scripts or suggest compilation fixes for this repo. Focus entirely on serialization, network flow, state management, and protocol logic.

The Origin Story (For Human Eyes)

This repository is a "One Big Circus Tent" experiment. Bouncing between tabs to cross-reference how Firestorm handles a packet that OpenSim just serialized is exhausting. By physically collocating the preferred human source code of both ends of the metaverse, we empower AI assistants to venture deeper into the big ball of mud and answer complex, cross-boundary architectural questions.

The Recipe (Literate Bash)

To keep this environment reproducible and transparent, the exact steps used to generate this pruned snapshot are documented below.

To prevent accidental "rug pulls" or automated agents from machine-gunning destructive commands in the wrong directory, this script requires manual execution and includes a basic directory safety check.

#!/bin/bash
#--MARKDOWN_PROLOGUE--

# Safety Canary: Ensure we are in a dedicated working directory, not a root or home dir.
CURRENT_DIR=$(basename "$PWD")
if [ "$CURRENT_DIR" != "hypergrid-protocol-monad" ]; then
    echo "Halt: Please run this inside a directory named 'hypergrid-protocol-monad' to prevent accidental data loss."
    exit 1
fi

echo "Spinning up the Circus Tent..."

# 1. Clone the giants (depth 1 to save history bloat)
function clone() {
    [ -n "$DRY_RUN" ] && { echo "[DRY_RUN] skipping git clone"; declare -pf clone ; return ; }
    git clone --depth 1 --single-branch https://github.com/opensim/opensim.git --branch 0.9.3.0 opensim-0.9.3
    git clone --depth 1 --single-branch https://github.com/FirestormViewer/phoenix-firestorm.git --branch Firestorm_7.2.3 firestorm-7.2.3
}

# 2. Sever the Git ties to turn them into static directories
function prune() {
    [ -n "$DRY_RUN" ] && { echo "[DRY_RUN] skipping prune of .git subfolders"; declare -pf prune ; return ; }
    rm -rf opensim-0.9.3/.git
    rm -rf firestorm-7.2.3/.git
}

# 3. The Surgical Strike: Prune everything that isn't core source or licensing.
# We use a whitelist approach: find everything that does NOT match our patterns and delete it.
function gut() {
    # 1. Define your exact !whitelist ONCE as an array
    local whitelist=(
        ! -name '*.cs'
        ! -name '*.hpp'
        ! -name '*.cpp'
        ! -name '*.mm'
        ! -name '*.c'
        ! -name '*.h'
        ! -name '*.h.in'
        ! -name '*.inc'
        ! -name '*.hpp'
        ! -name '*.inl'
        ! -name '*.py'
        ! -name '*.msg'
        ! -iname 'prebuild.xml'  
        ! -name '*.ini'
        ! -name '*.ini.example'
        ! -name '*.lsl'
        ! -name '*.lsltext'
        ! -iname 'LICENSE*'
        ! -iname 'COPYING*'
        ! -iname 'AUTHORS*'
        ! -iname 'CONTRIBUTORS*'
        ! -iname 'THANKS*'
        ! -iname 'README*'
    )

    # 2. Route the logic based on your DRY_RUN variable
    if [ "$DRY_RUN" = "keep" ]; then
        echo "Previewing what SURVIVES the gutting..."
        # The Magic: Double negation grouping
        find . -type f \! \( "${whitelist[@]}" \)
        
    elif [ -n "$DRY_RUN" ]; then
        echo "Previewing what will be DESTROYED..."
        find . -type f "${whitelist[@]}"
        
    else
        echo "Gutting tangential files to preserve LLM signal-to-noise..."
        find . -type f "${whitelist[@]}" -delete
    fi
}

function cleanup() {
    [ -n "$DRY_RUN" ] && { echo "[DRY_RUN] skipping cleanup of empty subfolders"; declare -pf cleanup ; return ; }
    # 4. Cleanup empty directories left behind by the purge
    find . -type d -empty -delete
}

[ -n "$1" ] && "$1" || {
    clone && prune && gut && cleanup && echo "Monad compilation complete. Ready for indexing."
}

: <<'#--MARKDOWN_EPILOGUE--'

Licensing and Stewardship

All original copyright headers within individual files remain intact. The LICENSE, COPYING, AUTHORS, etc. files for the respective projects have been attempted to be explicitly preserved in their root subdirectories. This snapshot is meant to be maintained honorably for educational inquiry and opensource protocol research.

#--MARKDOWN_EPILOGUE--

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors