51 lines
2.5 KiB
Markdown
51 lines
2.5 KiB
Markdown
# CommandKit ckprompt
|
|
|
|
`ckprompt` adds PromptKit inspection and testing commands to Go applications
|
|
that use CommandKit. Operators can list prompts, profiles, and backends, inspect
|
|
their settings, discover required inputs, validate and preview requests, and
|
|
run smoke tests.
|
|
|
|
The application chooses which commands to install. Importing the package alone
|
|
does not install commands.
|
|
|
|
## Module
|
|
|
|
The module path is `go.maximumdirect.net/ckprompt`. See the
|
|
[consumer guide](https://forge.maximumdirect.net/base-layer/commandkit/src/branch/main/docs/consumers/guide.md#module-selection)
|
|
for compatible releases and Go requirements.
|
|
|
|
## Example
|
|
|
|
Pass your engine loader to `FromEngine` to add resource listings, inspection,
|
|
and requirements discovery:
|
|
|
|
```go
|
|
app, err := commandkit.New(identity, ckprompt.Command(ckprompt.FromEngine(loadEngine)))
|
|
```
|
|
|
|
Add request validation, preview, and smoke tests with `WithRequestValidation`,
|
|
`WithRequestPreparation`, and `WithSmokeTesting`. To expose engine configuration
|
|
under `config`, add `ckprompt.ConfigScope(loadEngine)` to a `ckconfig.Suite`.
|
|
The [integration guide](https://forge.maximumdirect.net/base-layer/commandkit/src/branch/main/docs/consumers/guide.md#promptkit-configuration-definitions-and-requirements)
|
|
explains these choices; the [composed example](examples/composed) shows them together.
|
|
|
|
Inspection commands do not call the model. Smoke tests can use the application's
|
|
configured client or network probes. Applications own engine setup, credentials,
|
|
and any effects of their loaders and callbacks. See the
|
|
[CLI reference](https://forge.maximumdirect.net/base-layer/commandkit/src/branch/main/docs/cli.md#promptkit-smoke-testing)
|
|
for commands and results.
|
|
|
|
## License and attribution
|
|
|
|
This module is licensed under the [GNU Lesser General Public License v3.0 or
|
|
later](COPYRIGHT). The accompanying [LICENSE](LICENSE) contains the full LGPL
|
|
v3 and GPL v3 texts. See [third-party attribution](docs/oss/attribution.md)
|
|
for incorporated and dependency notices.
|
|
|
|
Smoke-test reports default to text; use `--format yaml` or `--format json` for
|
|
structured output. Reports preserve native reasoning-token and cache-hit evidence.
|
|
Backend provider conventions are selected explicitly in PromptKit configuration;
|
|
for example, application-defined OpenRouter backends need `provider: openrouter`.
|
|
See the [PromptKit backend format](https://forge.maximumdirect.net/base-layer/promptkit/src/tag/v0.25.0/docs/formats.md#backend-definitions)
|
|
for provider and zero-cost settings.
|