Add profile inspection command

This commit is contained in:
2026-08-29 14:31:13 +00:00
parent 36c7c5a358
commit 68ebe9ee50
5 changed files with 158 additions and 2 deletions

View File

@@ -24,6 +24,7 @@ go run ./cmd/scriptorium render \
- `scriptorium render`: prepare a prompt and write prepared-run output.
- `scriptorium serve`: start the HTTP server.
- `scriptorium inspect prompt`: inspect one prompt definition without model execution.
- `scriptorium inspect profile`: inspect one effective profile without model execution.
All commands accept `--config <path>` and reject positional arguments. An
effective `prompt_dir` is required for every command. Supply it through the
@@ -151,6 +152,18 @@ and writes to stdout unless `--out` is supplied. It loads and normalizes the
selected definition but does not resolve a profile, load a schema, render a
template, reserve backend capacity, or call a model.
## `scriptorium inspect profile`
```text
scriptorium inspect profile --profile ID
[--config PATH] [--profile-dir DIR] [--format text|json] [--out PATH]
```
`--profile` is required; built-in profiles need no prompt directory. Inspection
resolves profile inheritance and backend defaults, but never reads a credential
value, loads a prompt, reserves capacity, or calls a model. Unset provider
controls are shown as zero values when Promptkit leaves them unspecified.
## Input And Variable Syntax
`--input name=path` maps an input name to a local file; `--var name=value`

View File

@@ -39,6 +39,10 @@ resolves its own defaults and definition-required inputs.
data. It constructs the same configuration-aware engine but does not perform
preparation or generation.
`inspect profile` maps an explicit profile ID to `Engine.InspectProfile` and
formats a safe application-owned effective profile view. It intentionally does
not require prompt, schema, or artifact sources.
`serve` constructs Scriptorium's restricted HTTP artifact reader, injects it
with `promptkit.WithArtifactReader`, passes the engine through the HTTP
adapter's consumer-owned `Runner` interface, and starts the server.

View File

@@ -432,6 +432,8 @@ prepared-run presentation remains backward compatible.
## Stage 7: Add Stable Profile Inspection Output And CLI
**Completion: Complete.**
Complete the inspection command family with inherited, built-in, custom, and
endpoint-only profile support.