1.6 KiB
Promptkit Adapter Internals
internal/adapters/promptkit maps Weatherreporter's project-owned executor contract to Promptkit.
The CLI maps promptkit configuration to a PromptExecutorConfig and constructs one executor
per action. Promptkit dependency types do not escape the adapter.
The adapter supplies Weatherreporter's embedded prompt, schema, and fallback profile filesystems to each engine. Promptkit remains responsible for resolving the configured operator profile source, application fallback catalog, and its built-in catalog; the adapter does not parse profile YAML, merge sources, or probe endpoints.
The adapter exposes exact prompt and profile inspection plus prepared execution. It maps Promptkit inspection values to project-owned prompt input, output-contract, logical profile identity, effective backend/model, preparation, execution, validation, and optional debug values. It classifies adapter failures without copying provider secrets or unbounded response bodies into application errors or normal state.
The app calls the executor's preparation callback before provider execution to persist safe preparation
provenance. Completed executions are then persisted as safe execution provenance and raw generated text
is validated by internal/generatedtext. The adapter does not write workspace state, render Markdown,
choose report definitions, or send Distributor notifications.
Focused tests:
go test ./internal/adapters/promptkit ./internal/cli ./internal/app
The public logical prompt/profile/schema contract is owned by the Promptkit integration guide.