Login Register
Understanding Commands: How AI Interacts with Your Project

The Strict Pipeline for Command Execution

Estimated reading: 0 minutes 9 views

Every command follows a strict five-stage pipeline. Nothing executes blindly or without validation. This pipeline is what makes GameCatalyst safe even when Vex works autonomously.

The five stages:

  1. Validation: Command name and parameters checked against the definition. Wrong types, missing required fields, and invalid names are caught here with clear error messages plus WhatIs recovery guidance.
  2. Permission Check: Verified at four layers: Command Definition exists, project allows it, engine session allows it, client session allows it. Fail any layer and the command is blocked.
  3. Handler Routing: The validated command routes to the correct handler. Create commands go to the Create handler. File operations go to FileSystem. Each handler is a specialist for its category.
  4. Execution: The handler executes inside Unity on the main thread via MainThreadDispatcher. This ensures thread-safe operation and prevents crashes from cross-thread access.
  5. Response: Results formatted and returned. Success includes result data. Errors include details plus automatic recovery guidance from WhatIs.

Built-in safety gates:

  • Dry-run: File writes simulate by default
  • Protected paths: .git, Library, Temp, Logs permanently blocked
  • Containment: File operations outside project root rejected

What this means: Commands will not execute if invalid, unauthorized, or dangerous. The pipeline catches problems before they happen. Every command goes through the same checks regardless of which AI client is connected.

What this means for your daily work:

You can trust that commands will not execute if they are invalid, unauthorized, or dangerous. The pipeline catches problems before they happen — not after. Every command goes through the same rigorous checks regardless of which AI client is connected or what autonomy level you have set.

Error handling in the pipeline:

When a command fails at any stage, GameCatalyst provides detailed error information. Validation errors include the correct parameter format from WhatIs. Permission denials explain which layer blocked the command. Engine exceptions include the Unity error message. Path issues include DAP recovery guidance suggesting workspace.find or workspace.diagnose. Vex reads these error details and self-corrects on the next attempt.

Thread safety:

Unity requires most operations to happen on the main thread. GameCatalyst uses a MainThreadDispatcher to marshal all command execution onto Unity’s main thread automatically. This prevents crashes, race conditions, and the subtle threading bugs that can occur when external processes try to modify Unity objects directly. You never need to think about thread safety — the pipeline handles it for you.

Share this Doc

The Strict Pipeline for Command Execution

Or copy link

CONTENTS
Antimanual

Ask our AI support assistant your questions about our platform, features, and services.

You are offline
Chatbot Avatar
What can I help you with?