Add PromptKit request validation adapter

This commit is contained in:
2026-10-12 22:13:16 +00:00
parent 1c542505b7
commit 7fc5423688
4 changed files with 193 additions and 7 deletions

View File

@@ -1,6 +1,6 @@
# PromptKit request validation implementation plan
Status: Stage 1 complete; implementation is ongoing.
Status: Stages 1 and 2 complete; implementation is ongoing.
## Authority, scope, and baseline
@@ -153,6 +153,16 @@ capabilities are cleared. Run the focused tests and ckprompt suite.
**Complete when:** the public API and adapter work without command dispatch,
with explicit capability opt-in and the selected wiring/error behavior.
**Completed:** 2026-10-12. Added `ValidationRequest`, the optional suite callback,
and `WithRequestValidation`. The callback forwards a nil-builder seed through
PromptKit validation, preserves original selection and invocation objects, and
retains configuration diagnostics. Adapter tests cover suite composition,
successful nil-builder validation, builder failure before loading, independent
retention of nil-loader issues, and installation reporting after capabilities
are cleared. Focused adapter tests and
`GOTOOLCHAIN=local go test -count=1 ./...` passed from
`integrations/ckprompt`.
## Stage 3: Verify native delegation, request construction, and cancellation
**Primary files:** a focused `integrations/ckprompt/validation_adapters_test.go`