1.5 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 resolves configured operator profile sources, the embedded 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 validation plus prepared execution. It maps safe prompt identity, logical profile, effective backend/model, preparation, execution, validation, and optional debug values into promptexec. Execute passes the YAML package as an inline Promptkit input; it does not construct a filesystem URI or write a package file.
The application uses the preparation callback to record active safe provenance in memory and optionally writes content-rich diagnostics only through an explicit debug writer. The adapter returns raw output for application validation and rendering. It does not retain application 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.