CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/npm-google--gemini-cli-core

Gemini CLI Core - Core functionality library for the open-source AI agent that brings the power of Gemini directly into your terminal.

Overall
score

87%

Evaluation87%

1.01x

Agent success when using this tile

Overview
Eval results
Files

task.mdevals/scenario-7/

Command Runner with Safety Confirmations

Build a command execution tool that safely runs shell commands with user approval and proper output handling.

Capabilities

Execute commands with user confirmation

  • When a command is requested, prompt the user for approval before executing @test
  • After user approval, execute the command and return its output including stdout and stderr @test
  • When user denies approval, do not execute the command and return a cancellation message @test

Handle long output

  • When command output exceeds 500 characters, truncate it and indicate truncation @test

Timeout protection

  • Apply a configurable timeout (default 30 seconds) to prevent commands from running indefinitely @test
  • When a command times out, terminate it and return a timeout error @test

Implementation

@generates

API

/**
 * Creates a command runner with safety features.
 *
 * @param {Object} options - Configuration options
 * @param {Function} options.promptForApproval - Function that prompts user and returns boolean
 * @param {number} [options.timeout=30000] - Command timeout in milliseconds
 * @param {number} [options.maxOutputLength=500] - Maximum output length before truncation
 * @returns {Object} Command runner instance
 */
function createCommandRunner(options) {
  // Implementation here
}

/**
 * CommandRunner instance methods
 */
class CommandRunner {
  /**
   * Execute a shell command with safety checks.
   *
   * @param {string} command - The shell command to execute
   * @returns {Promise<Object>} Result object with { approved, executed, stdout, stderr, truncated, error }
   */
  async execute(command) {
    // Implementation here
  }
}

module.exports = { createCommandRunner };

Dependencies { .dependencies }

@google/gemini-cli-core { .dependency }

Provides shell command execution capabilities with safety features.

@satisfied-by

Install with Tessl CLI

npx tessl i tessl/npm-google--gemini-cli-core

tile.json