Add llm and prologue command groups - #43
Merged
Merged
Conversation
Introduce LlmConfiguration (kind, endpoint, apiKey, model) and an optional Llm property on CliConfiguration so Cratis tools like Prologue can resolve a shared language model configuration from ~/.cratis/config.json. The section is omitted from the file when not configured. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Add 'cratis llm use <KIND>' (anthropic | openai | local) with --api-key/--endpoint/--model options and interactive prompts for missing values (secret prompt for the API key, endpoint required for local, per-kind default model hints), 'cratis llm show' with a masked API key, and 'cratis llm clear' honoring the --yes confirmation convention. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Cover the llm section persisting and clearing through CliConfiguration, API key masking (partial for long keys, full for short ones), and provider kind validation including casing. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Cratis.Prologue.{Configuration,Contracts,Interpretation,Interpreter.Contracts,Screenplay}
1.1.0 and Cratis.Screenplay 1.3.0, plus Microsoft.Extensions.Logging.Abstractions
for hosting the interpreter session in the CLI.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
An interactive wizard that walks through the capture sources (SQL Server, PostgreSQL, API through a reverse proxy, OpenTelemetry) and output (rolling JSON capture files or the Prologue Receiver API), assembles a PrologueConfiguration through a testable builder, and writes it as cratis-prologue.json. Non-interactive terminals fail with a clear validation error since the wizard needs prompts. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Reads capture (.jsonl) files, resolves the language model from the cratis-prologue.json Llm section or the CLI's own llm configuration (heuristics only when neither is set), and drives the interpreter session with console callbacks — status transitions as progress lines and the model's questions one at a time with a selection prompt that always offers a free-text "Other" answer. On completion the extracted model is generated into a Screenplay and written to --file or <SystemName>.play, reporting the module/feature/slice counts. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Covers the wizard-to-configuration assembly (sources, output, reverse proxy), llm options resolution across the Prologue and CLI configurations, capture folder resolution, and the configuration and Screenplay output path derivations. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Picks up command descriptions on the extraction contract and the multi-line description support in the Screenplay language. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Added
cratis llmgroup — configure the language model used by Cratis tools:use <anthropic|openai|local>(interactive prompts, secret API-key input),show(masked key), andclearcratis prologue start— interactive wizard producing acratis-prologue.jsoncapture definition (SQL Server/PostgreSQL sources, API reverse-proxy capture, OpenTelemetry, JSON or Receiver API output)cratis prologue interpret [PATH]— interprets captured data into a Screenplay.playfile, streaming interpreter status and asking the interpreter's questions one at a time with multiple choice plus a free-text "Other" option; output path optional, defaulting to the derived system name🤖 Generated with Claude Code