Skip to content

36 cross process cli for aimdb introspection#42

Merged
lxsaah merged 6 commits into
mainfrom
36-cross-process-cli-for-aimdb-introspection
Nov 2, 2025
Merged

36 cross process cli for aimdb introspection#42
lxsaah merged 6 commits into
mainfrom
36-cross-process-cli-for-aimdb-introspection

Conversation

@lxsaah

@lxsaah lxsaah commented Nov 2, 2025

Copy link
Copy Markdown
Contributor

Added

  • New aimdb CLI tool for cross-process introspection and management of running AimDB instances via the AimX v1 remote access protocol. ([Cross-Process CLI for AimDB Introspection #36])
    • Instance Management Commands:
      • aimdb instance list - Discover and list all running AimDB instances by scanning Unix domain sockets
      • aimdb instance info - Display detailed information about a specific instance
      • aimdb instance ping - Test connectivity to an AimDB instance
    • Record Management Commands:
      • aimdb record list - List all registered records with metadata (type, buffer type, producer/consumer counts, writable status)
      • aimdb record get <name> - Retrieve the current value of a specific record
      • aimdb record set <name> <value> - Set the value of a writable record (with JSON input validation)
    • Real-time Monitoring:
      • aimdb watch <record> - Subscribe to record updates and display events in real-time with proper Ctrl+C handling
    • Multiple Output Formats:
      • Table format (default, human-readable with colored output)
      • JSON (pretty-printed)
      • JSON compact (single-line for scripting)
      • YAML (optional feature)
    • Automatic Socket Discovery: Scans /tmp and /var/run/aimdb directories for .sock files
    • Comprehensive Error Handling: Clear, actionable error messages with troubleshooting hints
    • Client Library: Full async implementation of the AimX v1 protocol client with connection management and handshaking
    • Extensive Documentation: Complete README with command reference, examples, and usage patterns

Changed

  • Improved timestamp format in remote access events to use accurate Unix timestamp representation (seconds.nanoseconds format instead of Debug format) for better parsing and compatibility with CLI tools. ([Cross-Process CLI for AimDB Introspection #36])

Fixed

@lxsaah lxsaah requested a review from Copilot November 2, 2025 19:59
@lxsaah lxsaah self-assigned this Nov 2, 2025
@lxsaah lxsaah added the 🏗️ core Core engine work label Nov 2, 2025
@lxsaah lxsaah linked an issue Nov 2, 2025 that may be closed by this pull request

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR implements the AimDB CLI tool, providing a command-line interface for introspecting and managing running AimDB instances via the AimX v1 remote access protocol. This addresses the "CLI Tools" priority mentioned in the project's next priorities.

Key Changes:

  • Implements a full-featured CLI with commands for instance management, record operations, and real-time monitoring
  • Adds client implementation for the AimX protocol over Unix domain sockets with NDJSON messaging
  • Provides multiple output formats (table, JSON, YAML) for flexible integration with other tools
  • Updates timestamp format from integer to floating-point (seconds.nanoseconds) for higher precision event tracking

Reviewed Changes

Copilot reviewed 19 out of 20 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
tools/aimdb-cli/Cargo.toml Adds dependencies for CLI framework (clap), async runtime (tokio), output formatting (tabled, colored), and error handling
tools/aimdb-cli/src/main.rs Main CLI entry point with command routing for instance, record, and watch operations
tools/aimdb-cli/src/error.rs Comprehensive error types with actionable hints for common failure scenarios
tools/aimdb-cli/src/output/*.rs Output formatting modules for table, JSON, and live event display
tools/aimdb-cli/src/commands/*.rs Command implementations for instance management, record operations, and real-time watching
tools/aimdb-cli/src/client/*.rs AimX protocol client with connection management, discovery, and protocol utilities
tools/aimdb-cli/README.md Comprehensive documentation with examples and command reference
aimdb-core/src/remote/mod.rs Exports ErrorObject type for CLI error handling
aimdb-core/src/remote/handler.rs Fixes timestamp generation to use proper formatting (seconds.nanoseconds)
examples/remote-access-demo/src/server.rs Updates Temperature struct to use f64 timestamp matching new format
Cargo.lock Adds CLI dependencies and resolves unicode-width version

Comment thread examples/remote-access-demo/src/server.rs Outdated
@lxsaah lxsaah merged commit 3e3f690 into main Nov 2, 2025
7 checks passed
@lxsaah lxsaah deleted the 36-cross-process-cli-for-aimdb-introspection branch November 2, 2025 20:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🏗️ core Core engine work

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cross-Process CLI for AimDB Introspection

2 participants