Files
git.stella-ops.org/docs/features/unchecked/cli/advisoryai-chat-cli.md

2.0 KiB

AdvisoryAI Chat CLI (stella advise ask)

Module

Cli

Status

IMPLEMENTED

Description

Interactive AI chat queries from the terminal scoped to specific container images, digests, or environments for security advisory assistance.

Implementation Details

  • Command Group: src/Cli/StellaOps.Cli/Commands/Advise/AdviseChatCommandGroup.cs -- AdviseChatCommandGroup (internal static class)
  • Chat Renderer: src/Cli/StellaOps.Cli/Commands/Advise/ChatRenderer.cs -- terminal rendering for chat responses
  • Chat Service: src/Cli/StellaOps.Cli/Services/Chat/ -- backend chat client and models
  • Chat Models: src/Cli/StellaOps.Cli/Services/Models/Chat/ -- request/response DTOs
  • Commands:
    • stella advise ask <query> -- ask the advisory AI assistant a question. Options: --image|-i <ref> (scope to container image), --digest|-d <digest> (scope to artifact digest), --environment|-e <env> (scope to environment)
    • stella advise chat-doctor -- diagnose advisory AI connectivity and configuration
    • stella advise chat-settings -- view/update chat configuration
  • Configuration: src/Cli/StellaOps.Cli/Configuration/StellaOpsCliOptions.cs -- CLI options including advisory AI endpoint settings

E2E Test Plan

  • Run stella advise ask "What CVEs affect this image?" and verify a response is returned
  • Run stella advise ask "Is CVE-2024-1234 reachable?" --image myregistry/app:v1.0 and verify image-scoped response
  • Run stella advise ask "Show risk summary" --digest sha256:abc123 and verify digest-scoped response
  • Run stella advise ask "What's the risk?" --environment production and verify environment-scoped response
  • Run stella advise chat-doctor and verify connectivity/configuration diagnostics
  • Run stella advise chat-settings and verify settings are displayed
  • Verify error handling when advisory AI service is unavailable
  • Verify --verbose flag shows additional request/response details