Document shared loading and integration upgrades
This commit is contained in:
@@ -37,9 +37,11 @@ go get go.maximumdirect.net/commandkit@v0.7.0
|
||||
Select either integration with `go get go.maximumdirect.net/ckconfig@v0.9.0`
|
||||
or `go get go.maximumdirect.net/ckprompt@v0.10.0`. Both integrations select
|
||||
core v0.7.0. ckprompt v0.10.0 selects ckconfig v0.9.0, which includes
|
||||
`AdaptDiagnostics` and `ClassifyConfigurationError`. Both integrations build
|
||||
independently against their released dependencies. An aligned workspace can
|
||||
exercise the local sources together during development.
|
||||
`AdaptDiagnostics` and `ClassifyConfigurationError`. Those published releases
|
||||
build independently. The current checkout adopts
|
||||
ConfigKit v1.4.0 and PromptKit v0.24.0; ckprompt uses the new local ckconfig API
|
||||
while still requiring published ckconfig v0.9.0. Use an aligned workspace until
|
||||
ckconfig is released and selected by ckprompt.
|
||||
Published ckconfig v0.3.0 also uses ConfigKit v1.1.0 and does not compose with
|
||||
ckprompt v0.2.0's earlier ConfigKit dependency.
|
||||
|
||||
@@ -48,10 +50,12 @@ loaders should use keyed struct literals when constructing them. ConfigKit's
|
||||
release notes describe
|
||||
main-relative imports and overlay contexts. [ConfigKit v1.2.0 upgrade guidance](https://forge.maximumdirect.net/base-layer/configkit/src/tag/v1.2.0/docs/releases/v1.2.0.md#upgrade-notes).
|
||||
|
||||
The current checkout selects PromptKit v0.23.2, which exposes main-relative
|
||||
companion imports through its existing configuration-source API. Applications
|
||||
select those inputs when constructing
|
||||
the engine supplied to ckprompt's loader callback. [PromptKit companion import guidance](https://forge.maximumdirect.net/base-layer/promptkit/src/commit/382ccfb14b9630fd8f48c8364dbe2b6159637d71/docs/consumers/pkg-promptkit.md#load-companion-prompts-relative-to-the-main-configuration).
|
||||
The current checkout selects PromptKit v0.24.0. Complete documents put
|
||||
settings under `promptkit`; wrapperless fragments use `SettingsInput`, and
|
||||
collection fragments use `CollectionInput`. Consult the [upstream migration
|
||||
guide](https://forge.maximumdirect.net/base-layer/promptkit/src/tag/v0.24.0/docs/consumers/configuration-migration.md)
|
||||
and [format reference](https://forge.maximumdirect.net/base-layer/promptkit/src/tag/v0.24.0/docs/formats.md)
|
||||
for the exact migration and schema rules.
|
||||
|
||||
Importing a module does not install its commands. Pass commands to
|
||||
`commandkit.New` or `App.Register` explicitly. ckprompt depends on ckconfig's
|
||||
@@ -309,6 +313,14 @@ separate initialization calls do not guarantee distinct objects. See
|
||||
[ckconfig.Suite's GoDoc](../../integrations/ckconfig/contracts.go) for factory
|
||||
timing, omitted-factory zero values (including nil pointers), and ownership.
|
||||
The application owns the state type and what it caches.
|
||||
`ckconfig.FromConfigKitSubtree(name, summary, path, load)` adapts the same typed
|
||||
loader to a focused native inspection. The loader validates the whole result;
|
||||
its sources and findings retain whole-load context. Listing uses the focused
|
||||
native paths, while explicit paths and comparison retain native semantics. The
|
||||
[composed example](../../integrations/ckprompt/examples/composed/main.go) uses
|
||||
this adapter for `storage` and passes the same application result to
|
||||
`promptkit.NewFromConfig`. The application composes `promptkit.Configure` and
|
||||
selects `BundledOpenRouterUnderlay` before loading when it needs that catalog.
|
||||
`ckconfig.FromConfigKit` adapts a typed ConfigKit loader without calling it
|
||||
during construction. The bundled comparison adapters call the loader for the
|
||||
left side before the right, retain left diagnostics if right loading fails,
|
||||
@@ -320,8 +332,10 @@ The `config` family provides scope discovery, validation, safe effective configu
|
||||
source inventory, path explanation, and ConfigKit-backed comparison for the
|
||||
capabilities declared by its scopes. The [CLI reference](../cli.md#configuration-scopes)
|
||||
owns operator syntax and report details. `Scope.Features` declares optional modes; acquired
|
||||
`View.Metadata` and `View.Findings` carry native path metadata and diagnostic
|
||||
records when available. `Findings.Messages` contains presentations associated
|
||||
`View.Paths` supplies native discovery candidates; when nil, `View.Metadata`
|
||||
supplies them for existing custom providers. Metadata remains required for
|
||||
filtering and describing candidates. `View.Findings` carries diagnostic records
|
||||
when available. `Findings.Messages` contains presentations associated
|
||||
with those records, while `Acquired.Diagnostics` carries independent messages.
|
||||
Custom explanation providers implement `Explain`; CommandKit renders the
|
||||
acquired evidence. See `EffectiveWriter` and `ExplanationReader` in the
|
||||
@@ -343,8 +357,8 @@ parses CLI records but cannot add them to an already-loaded result. The
|
||||
engine's captured configuration. Add that scope to a `ckconfig.Suite` to expose
|
||||
it under `config` with validate/show/sources/explain and native diff operations;
|
||||
it does not install PromptKit catalog, definition, or requirements commands.
|
||||
Its override feature is disabled because the released PromptKit configuration
|
||||
loader does not accept ConfigKit override records.
|
||||
Its override feature is disabled by default. Applications may enable it only
|
||||
when their own loader applies the supplied overrides.
|
||||
|
||||
### Install resource commands and optional checks
|
||||
|
||||
@@ -388,7 +402,9 @@ If the loader is nil, the returned suite retains a wiring issue for installation
|
||||
to report, even if capabilities are narrowed later. A builder runs before the
|
||||
engine loader and receives the seed request, selection, typed input, shared
|
||||
state, and invocation context. It returns the
|
||||
concrete request; the adapter does not merge seed fields back afterward. The
|
||||
concrete request; the adapter does not merge seed fields back afterward. For
|
||||
validation replacements use `*promptkit.OutputContractInput`: a nil repair
|
||||
budget remains omitted and a pointer to zero explicitly disables repair. The
|
||||
loader receives the original selection. Builders should start from the seed,
|
||||
preserve operator values and bindings, and apply defaults only when a map key is
|
||||
absent, so explicitly supplied empty values stay meaningful. Applications that
|
||||
@@ -424,7 +440,7 @@ and uses `Engine.ValidateRequest`.
|
||||
Applications own engine construction and may build complete native requests in
|
||||
callbacks. Preparation and validation use the supplied context; execution owns
|
||||
prepared notifications and operation timeouts. See the [PromptKit consumer
|
||||
guide](https://forge.maximumdirect.net/base-layer/promptkit/src/commit/382ccfb14b9630fd8f48c8364dbe2b6159637d71/docs/consumers/pkg-promptkit.md)
|
||||
guide](https://forge.maximumdirect.net/base-layer/promptkit/src/commit/5ea60e9b96651fd7dfcbc7d05b6f43d131df358f/docs/consumers/pkg-promptkit.md)
|
||||
for conversation and execution capabilities.
|
||||
|
||||
`ckprompt.WithRequestPreparation` adds a separate callback backed by
|
||||
@@ -463,7 +479,7 @@ complete return value is authoritative. The [CLI reference](../cli.md#promptkit-
|
||||
and reports.
|
||||
|
||||
The [composed example](../../integrations/ckprompt/examples/composed/README.md)
|
||||
combines app and PromptKit config scopes, comparison and catalogs, named and
|
||||
combines app, storage, and PromptKit config scopes, comparison and catalogs, named and
|
||||
requirements inspection, request validation, smoke testing, and an
|
||||
application-owned `session restore` command.
|
||||
|
||||
@@ -487,7 +503,7 @@ These are independent defaults for unqualified caller-supplied prompt, profile,
|
||||
and backend names; qualified IDs pass through. Stored references and configuration
|
||||
inspection are unchanged, while namespace and collection inventories remain global.
|
||||
Catalog `--namespace` filters are separate from these defaults. See the released
|
||||
[namespace API](https://forge.maximumdirect.net/base-layer/promptkit/src/commit/382ccfb14b9630fd8f48c8364dbe2b6159637d71/namespaces.go).
|
||||
[namespace API](https://forge.maximumdirect.net/base-layer/promptkit/src/commit/5ea60e9b96651fd7dfcbc7d05b6f43d131df358f/namespaces.go).
|
||||
|
||||
## Outcomes and ownership
|
||||
|
||||
@@ -501,8 +517,8 @@ signal handling, and exit mapping; `Execute` never exits the process.
|
||||
Go declarations and GoDoc own exact exported contracts. ConfigKit owns
|
||||
configuration decoding, validation, and provenance. PromptKit owns prompt
|
||||
formats, profile resolution, and inspection details. See the
|
||||
[ConfigKit v1.2.1 source records](https://forge.maximumdirect.net/base-layer/configkit/src/commit/51ef3144158db1a09fabdbd1c7ae59908c84923b/records.go),
|
||||
[PromptKit engine methods](https://forge.maximumdirect.net/base-layer/promptkit/src/commit/382ccfb14b9630fd8f48c8364dbe2b6159637d71/engine.go),
|
||||
[configuration inspection](https://forge.maximumdirect.net/base-layer/promptkit/src/commit/382ccfb14b9630fd8f48c8364dbe2b6159637d71/configuration_inspection.go),
|
||||
[smoke diagnostics](https://forge.maximumdirect.net/base-layer/promptkit/src/commit/382ccfb14b9630fd8f48c8364dbe2b6159637d71/smoke_diagnostics.go),
|
||||
and [PromptKit v0.23.2 consumer guidance](https://forge.maximumdirect.net/base-layer/promptkit/src/commit/382ccfb14b9630fd8f48c8364dbe2b6159637d71/docs/consumers/pkg-promptkit.md).
|
||||
[ConfigKit v1.4.0 source records](https://forge.maximumdirect.net/base-layer/configkit/src/commit/4a7ae664a6287d71cba20f59c7c5b37b6f05b0a3/records.go),
|
||||
[PromptKit engine methods](https://forge.maximumdirect.net/base-layer/promptkit/src/commit/5ea60e9b96651fd7dfcbc7d05b6f43d131df358f/engine.go),
|
||||
[configuration inspection](https://forge.maximumdirect.net/base-layer/promptkit/src/commit/5ea60e9b96651fd7dfcbc7d05b6f43d131df358f/configuration_inspection.go),
|
||||
[smoke diagnostics](https://forge.maximumdirect.net/base-layer/promptkit/src/commit/5ea60e9b96651fd7dfcbc7d05b6f43d131df358f/smoke_diagnostics.go),
|
||||
and [PromptKit v0.24.0 consumer guidance](https://forge.maximumdirect.net/base-layer/promptkit/src/commit/5ea60e9b96651fd7dfcbc7d05b6f43d131df358f/docs/consumers/pkg-promptkit.md).
|
||||
|
||||
Reference in New Issue
Block a user