or run

npx @tessl/cli init
Log in

Version

Files

tile.json

task.mdevals/scenario-4/

System Status Reporter

A command-line utility that reports system health metrics with colored status indicators.

Capabilities

Status Message Display

The tool should display system health information using appropriate status messages with color-coded output that indicates severity levels.

  • Displays "CPU usage at 45%" as an INFO message @test
  • Displays "Memory critically low!" as an ERROR message @test
  • Displays "All systems operational" as an OK message @test
  • Displays "Debug: Cache hit ratio 89%" as a DEBUG message when debug mode is enabled @test

Color Control

The tool should respect terminal capabilities and user preferences for colored output.

  • When --no-color flag is provided, output contains no ANSI color codes @test
  • When running in a non-TTY environment, automatically disables colors @test

Debug Mode

The tool should support a debug mode that shows additional diagnostic information.

  • When --debug flag is provided, debug messages are displayed @test
  • When --debug flag is not provided, debug messages are hidden @test

Implementation

@generates

API

/**
 * Reports system status with appropriate color-coded messages
 * @param {Object} metrics - System metrics to report
 * @param {number} metrics.cpu - CPU usage percentage (0-100)
 * @param {number} metrics.memory - Available memory percentage (0-100)
 * @param {string} metrics.status - Overall system status ('ok', 'warning', 'error')
 */
function reportStatus(metrics) {
  // IMPLEMENTATION HERE
}

module.exports = { reportStatus };

Dependencies { .dependencies }

cli { .dependency }

Provides command-line interface functionality with color output control and TTY detection.

@satisfied-by