Skip to content

Comments

feat: add Ollama, Enhanced Sandbox, and Sub-agents#31

Merged
robotlearning123 merged 3 commits intomainfrom
feat/ollama-sandbox-subagents
Jan 23, 2026
Merged

feat: add Ollama, Enhanced Sandbox, and Sub-agents#31
robotlearning123 merged 3 commits intomainfrom
feat/ollama-sandbox-subagents

Conversation

@robotlearning123
Copy link
Owner

@robotlearning123 robotlearning123 commented Jan 23, 2026

Summary

  • Ollama Provider: Local LLM support via Ollama's OpenAI-compatible API at localhost:11434
  • Enhanced Sandbox: Safe command execution with Docker, Firejail, or ulimit backends
  • Sub-agents System: Spawn specialized agents for focused tasks

New Tools

Tool Description
sandbox Run commands in isolated environment with resource limits
sandbox_info Get available sandbox backends info
spawn_agent Spawn specialized sub-agent for task
list_agents List available sub-agent types

Sub-agent Types

  • research - Explore codebases (glob, grep, read_file, list_dir, web_search)
  • code-review - Review code (glob, grep, read_file, diff, git_diff)
  • test-writer - Write tests (glob, grep, read_file, write_file, bash)
  • refactor - Refactor code (glob, grep, read_file, edit_file, bash)
  • documentation - Generate docs (glob, grep, read_file, write_file, edit_file)

Test plan

  • Build passes with npm run build
  • Test Ollama with nano --provider ollama --model llama3.2
  • Test sandbox with sandbox_info tool
  • Test sub-agents with list_agents and spawn_agent

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features
    • Added agent-readiness CLI tool for scanning repository maturity across 9 pillars and 5 levels with extensible profiles.
    • Added Ollama support for local language model inference.
    • Added sub-agent system for specialized tasks (research, code review, test writing, refactoring, documentation).
    • Added sandboxed command execution with Docker, Firejail, and direct isolation backends.

✏️ Tip: You can customize this high-level summary in your review settings.

- Ollama provider for local LLM support (localhost:11434)
- Enhanced sandbox with Docker/Firejail/ulimit backends
- Sub-agent system for specialized tasks (research, code-review, test-writer, refactor, documentation)

New files:
- src/providers/ollama.ts - Ollama streaming provider
- src/sandbox/index.ts - Multi-backend sandbox implementation
- src/tools/sandbox.ts - sandbox and sandbox_info tools
- src/agents/subagent.ts - Sub-agent types and runner
- src/tools/spawn.ts - spawn_agent and list_agents tools

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@chatgpt-codex-connector
Copy link

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@coderabbitai
Copy link

coderabbitai bot commented Jan 23, 2026

Caution

Review failed

The pull request is closed.

📝 Walkthrough

Walkthrough

Introduces a comprehensive Factory-compatible repository readiness scanner as a new module (agent-readiness) with nine pillars and five levels, plus Ollama provider support and sub-agent spawning capabilities with sandbox isolation to the main codebase.

Changes

Cohort / File(s) Summary
Implementation Plan Updates
IMPLEMENTATION_PLAN.md
Updated status markers to reflect completed features across Plan Mode, Web Search, Image Support, Sandbox, Ollama Integration, Sub-agents, and Git Auto-commit.
Agent-Readiness Project Setup
agent-readiness/.github/workflows/ci.yml, agent-readiness/package.json, agent-readiness/tsconfig.json, agent-readiness/eslint.config.js, agent-readiness/.prettierrc, agent-readiness/.prettierignore, agent-readiness/.gitignore, agent-readiness/.husky/pre-commit
Project configuration, CI/CD pipeline (lint, typecheck, test, build), and code quality tooling with ESLint, Prettier, Husky, and lint-staged.
Agent-Readiness Documentation
agent-readiness/README.md, agent-readiness/LICENSE, agent-readiness/FACTORY_COMPARISON.md
Comprehensive documentation including project overview, Factory-compatible model comparison, and licensing.
Check Implementations
agent-readiness/src/checks/file-exists.ts, agent-readiness/src/checks/path-glob.ts, agent-readiness/src/checks/any-of.ts, agent-readiness/src/checks/github-workflow.ts, agent-readiness/src/checks/github-action.ts, agent-readiness/src/checks/build-command.ts, agent-readiness/src/checks/log-framework.ts, agent-readiness/src/checks/dependency-detect.ts, agent-readiness/src/checks/index.ts
Eight distinct check types for validating repository readiness across multiple pillars, with unified dispatcher and composition support.
Engine & Scoring
agent-readiness/src/engine/context.ts, agent-readiness/src/engine/level-gate.ts, agent-readiness/src/engine/index.ts
Repository context building, level gating logic with 80% threshold, pillar and level summaries, and overall scoring calculations.
Command Implementations
agent-readiness/src/commands/scan.ts, agent-readiness/src/commands/init.ts
Scan and init commands with output handling, validation, and template-based file generation.
Output Formatters
agent-readiness/src/output/json.ts, agent-readiness/src/output/markdown.ts
JSON serialization and terminal-friendly Markdown-formatted output with progress visualization and monorepo support.
Profile & Template System
agent-readiness/src/profiles/index.ts, agent-readiness/src/profiles/factory_compat.yaml, agent-readiness/src/templates/index.ts, agent-readiness/templates/*
Profile loading from YAML with validation, factory-compatible profile definition, and template system for initialization with eight template files.
Utility Modules
agent-readiness/src/utils/fs.ts, agent-readiness/src/utils/git.ts, agent-readiness/src/utils/yaml.ts, agent-readiness/src/utils/exec.ts, agent-readiness/src/utils/regex.ts, agent-readiness/src/utils/lru-cache.ts, agent-readiness/src/utils/index.ts
File system operations with caching, Git utilities, YAML parsing with validation, safe command execution, ReDoS-safe regex utilities, and LRU cache implementation.
Core Type System
agent-readiness/src/types.ts, agent-readiness/src/scanner.ts, agent-readiness/src/index.ts
Comprehensive TypeScript types for checks, profiles, results, and context; main scanner orchestrator with monorepo support; CLI entry point with Commander.
Test Suite & Fixtures
agent-readiness/test/checks.test.ts, agent-readiness/test/engine.test.ts, agent-readiness/test/security.test.ts, agent-readiness/test/fixtures/*
Comprehensive tests for check execution, level-gating logic, security utilities, and two test fixture repositories (minimal and standard).
Ollama Provider Integration
src/providers/ollama.ts, src/providers/index.ts, src/constants.ts, src/types.ts
New OllamaProvider with OpenAI-compatible API, fetch-based streaming, and tool-call support; updated provider factory, constants, and config types.
Sub-Agent & Tool System
src/agents/subagent.ts, src/tools/spawn.ts, src/tools/sandbox.ts, src/tools/index.ts
Sub-agent spawning with five predefined types (research, code-review, test-writer, refactor, documentation), sandbox execution tools with Docker/Firejail/direct backends, and agent listing tools.
Sandbox Isolation
src/sandbox/index.ts
Multi-backend sandbox runner supporting Docker, Firejail, and direct execution with timeout, memory limits, and network isolation.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~50 minutes

Possibly related PRs

  • nano-opencode#10: Adds matching CI/CD configuration (GitHub Actions, ESLint, Prettier, Husky/lint-staged setup) to agent-readiness module, indicating parallel tooling standardization efforts.

Poem

🐰 A rabbit hops through code so grand,
With readiness checks across the land,
From Ollama's wisdom to sandboxes tight,
Sub-agents dancing, pulling all night!
Nine pillars strong, five levels deep—
Quality metrics we're here to keep!

✨ Finishing touches
  • 📝 Generate docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

robotlearning123 and others added 2 commits January 22, 2026 20:19
Add agent-readiness CLI tool for scanning repository maturity against
Factory Agent Readiness model (10 pillars, 5 levels, 80% gating).

Security improvements:
- Path traversal protection in profile loading and config files
- ReDoS-safe regex checker using linear-time string scanning
- LRU cache with size limits to prevent unbounded memory growth
- Workspace pattern injection prevention

Features:
- 33 checks across 10 pillars (docs, style, build, test, security,
  observability, env, ci, monorepo, task_discovery)
- YAML-based extensible profile system
- JSON and Markdown output formats
- Monorepo detection and app-scope scanning
- Init command with templates for missing files

Testing:
- 43 tests covering checks, engine, security, and LRU cache
- Test fixtures for minimal, standard, and monorepo scenarios

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Move sub-agent types to spawn.ts to avoid circular import
- Add parseMemoryLimit() for Firejail --rlimit-as option
- Firejail now respects maxMemory parameter

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@robotlearning123 robotlearning123 merged commit ef3aad1 into main Jan 23, 2026
5 of 6 checks passed
@robotlearning123 robotlearning123 deleted the feat/ollama-sandbox-subagents branch January 23, 2026 01:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant