Skip to content

feat: Add comprehensive output schemas for all supported tools/platforms #75

@gouravjshah

Description

@gouravjshah

Overview

Extend structured I/O (output schemas) to all supported tools and platforms beyond Docker containers.

Motivation

Issue #74 introduces structured I/O foundation with pre-built schemas. Currently we have basic container schemas, but we need comprehensive coverage for:

  • ✅ Docker containers (in progress)
  • All other platforms and tools

This will provide consistent, validated outputs across all AOF operations.

Scope

Docker Platform

  • - Running containers (basic)
  • - Detailed container info
  • - Container log output
  • - Resource usage statistics (enhanced)
  • - Image listing
  • - Network configuration
  • - Volume information
  • - Compose service status

Kubernetes Platform

  • - Pod listings with status
  • - Detailed pod information
  • - Service endpoints
  • - Deployment rollout status
  • - kubectl top output
  • - Kubernetes events
  • - Pod log output
  • - ConfigMap contents
  • - Secret names (redacted values)

Git Operations

  • - Working tree status
  • - Commit history
  • - Diff output (structured)
  • - Branch listing
  • - Remote repositories

System/Shell

  • - Running processes (ps output)
  • - df output
  • - netstat/ss output
  • - ls output with metadata
  • - uname/hostinfo output

Cloud Providers

  • AWS: EC2 instances, S3 buckets, Lambda functions
  • GCP: Compute instances, GCS buckets, Cloud Functions
  • Azure: VMs, Storage accounts, Functions

Databases

  • PostgreSQL: Table listings, query results
  • MySQL: Database structure, query output
  • MongoDB: Collection data
  • Redis: Key listings, data structures

Implementation Strategy

  1. Phase 1: Docker schemas (containers, images, stats) - feat: Add Structured I/O (Input/Output Schemas) similar to Agno #74
  2. Phase 2: Kubernetes schemas (pods, deployments, services)
  3. Phase 3: System/shell schemas (processes, files, network)
  4. Phase 4: Git and cloud provider schemas
  5. Phase 5: Database schemas

Each schema should include:

  • ✅ JSON Schema definition
  • ✅ Format hint (table/list/json)
  • ✅ Description
  • ✅ Example usage
  • ✅ Tests

API Design

// In schemas:: module
pub mod docker {
    pub fn container_list() -> OutputSchema { /* ... */ }
    pub fn container_inspect() -> OutputSchema { /* ... */ }
    pub fn stats() -> OutputSchema { /* ... */ }
}

pub mod kubernetes {
    pub fn pod_list() -> OutputSchema { /* ... */ }
    pub fn deployment_status() -> OutputSchema { /* ... */ }
}

pub mod git {
    pub fn status() -> OutputSchema { /* ... */ }
    pub fn log() -> OutputSchema { /* ... */ }
}

CLI Usage

# Docker
aofctl run agent docker.yaml --output-schema docker.container-list
aofctl run agent docker.yaml --output-schema docker.stats

# Kubernetes
aofctl run agent k8s.yaml --output-schema kubernetes.pod-list
aofctl run agent k8s.yaml --output-schema kubernetes.deployment-status

# Git
aofctl run agent git.yaml --output-schema git.status
aofctl run agent git.yaml --output-schema git.log

Dependencies

Acceptance Criteria

  • All listed platforms have comprehensive schemas
  • Each schema includes tests
  • Documentation with examples for each schema
  • CLI integration for schema selection
  • Validated with real-world usage

Future Enhancements

  • Schema versioning (v1, v2, etc.)
  • Custom schema composition (combine multiple schemas)
  • Schema validation strictness levels
  • Schema auto-detection from tool output

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions