2026-11-20 04:22:33 +00:00
|
|
|
# Promptkit v0.24.0
|
|
|
|
|
|
2026-11-21 18:09:47 +00:00
|
|
|
This minor release adds application-owned configuration loading, prompt-owned
|
|
|
|
|
schemas, and a prepared message-content hash. It also enables one repair attempt
|
|
|
|
|
by default for enabled output validation. This is a breaking pre-v1 release;
|
|
|
|
|
consumers upgrading from v0.23.x should review the migration steps below.
|
|
|
|
|
|
|
|
|
|
## Added And Changed
|
|
|
|
|
|
|
|
|
|
- Applications can embed `promptkit.Settings`, compose Promptkit's rules with
|
|
|
|
|
`Configure`, load configuration once through ConfigKit, and pass the entire
|
|
|
|
|
result to `NewFromConfig`. `NewEngine` remains the standalone convenience
|
|
|
|
|
constructor. See the [shared-loading guide](../consumers/pkg-promptkit.md#reuse-an-application-owned-load)
|
|
|
|
|
and [offline preparation example](../../examples/go-library/prepare/main.go).
|
|
|
|
|
- Prompts can select inline, source-relative, or explicit-root JSON Schemas.
|
|
|
|
|
Collections can supply their own schema root. Schema resources are loaded
|
|
|
|
|
during preparation and retained by prepared execution. See the
|
|
|
|
|
[schema reference](../formats.md#schemas).
|
|
|
|
|
- Prepared results include `MessageContentHash` (`message_content_hash` in
|
|
|
|
|
JSON), an opaque equality value for ordered message roles and exact text,
|
|
|
|
|
independent of session identity, cache hints, and other metadata. The existing
|
|
|
|
|
rendered-prompt hash algorithm is unchanged. See the
|
|
|
|
|
[prepared-result GoDoc](../../types.go) and
|
|
|
|
|
[preparation guide](../consumers/pkg-promptkit.md#prepare-now-and-execute-the-same-snapshot-later).
|
|
|
|
|
- Configuration inspection uses a native ConfigKit view focused on `/promptkit`
|
|
|
|
|
and adds `HistoricalPaths`. It retains whole-load evidence and supports
|
|
|
|
|
explicit queries outside that focus; comparison can include ancestor changes.
|
|
|
|
|
See the [inspection guide](../consumers/pkg-promptkit.md#inspect-the-captured-configuration).
|
|
|
|
|
|
|
|
|
|
## Fixes And Efficiency
|
|
|
|
|
|
|
|
|
|
- Prompt-input inspection and requirements now retain effective metadata supplied
|
|
|
|
|
by application defaults, including inherited input requirements.
|
|
|
|
|
- Configuration capture avoids expanding inheritance provenance just to determine
|
|
|
|
|
input-field presence, and shares immutable backend defaults across profiles
|
|
|
|
|
without overrides while preserving defensive copies at public lookups.
|
|
|
|
|
- Schema handling avoids copying inactive runtime schemas and unused slice
|
|
|
|
|
capacity. Inline schemas are separate from provider extra-parameter copy limits.
|
|
|
|
|
See the [schema reference](../formats.md#schemas) and
|
|
|
|
|
[request GoDoc](../../types.go).
|
2026-11-20 04:22:33 +00:00
|
|
|
|
|
|
|
|
## Compatibility And Upgrade
|
|
|
|
|
|
2026-11-21 18:09:47 +00:00
|
|
|
The [configuration migration guide](../consumers/configuration-migration.md#move-settings-under-promptkit)
|
|
|
|
|
owns the full migration walkthrough. In particular:
|
|
|
|
|
|
|
|
|
|
- Move complete-document resources and `schema_root` under `promptkit`.
|
|
|
|
|
Previous root-level resources are now application data, not Promptkit
|
|
|
|
|
resources; IDs and references keep their existing names. `SettingsInput`
|
|
|
|
|
mounts wrapperless fragments at `/promptkit`; `CollectionInput` mounts them
|
|
|
|
|
at `/promptkit/collections/<namespace>`. Discovery helpers still produce
|
|
|
|
|
root-mounted inputs, so adjust fragment destinations explicitly.
|
|
|
|
|
- For an application-owned load, select `BundledOpenRouterUnderlay` before
|
|
|
|
|
loading if you want the bundled catalog. Bundling remains default-on for
|
|
|
|
|
`NewEngine`; it is not implicitly added by `NewFromConfig`.
|
|
|
|
|
- Replace `RunRequest.Validation` values of type `*OutputContract` with
|
|
|
|
|
`*OutputContractInput`; its `RepairAttempts` field is a pointer. Omitted or
|
|
|
|
|
null budgets now resolve to one for `basic`, `json`, and `json_schema`, or
|
|
|
|
|
zero for `none`. Set an explicit zero to retain single-pass behavior.
|
|
|
|
|
Runtime replacements still replace the whole contract and resolve their
|
|
|
|
|
defaults independently. A failed check may now incur another generation call,
|
|
|
|
|
latency, and usage, without guaranteeing a valid result. See the
|
|
|
|
|
[output contract](../formats.md#output-contract).
|
|
|
|
|
- `PromptOutputInspection.RepairAttempts` is now a resolved integer rather than
|
|
|
|
|
an optional pointer, and its JSON includes zero. `OutputContract` remains the
|
|
|
|
|
resolved contract type used by prepared details. See the
|
|
|
|
|
[inspection GoDoc](../../resource_inspection.go) and [contract GoDoc](../../types.go).
|
|
|
|
|
- Schema paths require an explicitly configured applicable root; there is no
|
|
|
|
|
implicit working-directory root. Review file references and make schemas
|
|
|
|
|
self-contained as described in the [schema reference](../formats.md#schemas).
|
|
|
|
|
- Promptkit no longer validates resource-version fields. Applications own version
|
|
|
|
|
policy and sensitivity rules for their extension fields; see the
|
|
|
|
|
[format reference](../formats.md).
|
|
|
|
|
|
|
|
|
|
Older prepared-result JSON without `message_content_hash` decodes with an empty
|
|
|
|
|
value. Callers using positional `PreparedRun` literals may need to adjust them.
|
|
|
|
|
ConfigKit is updated to v1.4.0; the Go consumer minimum remains 1.27.0.
|
2026-11-20 04:22:33 +00:00
|
|
|
|
|
|
|
|
```sh
|
|
|
|
|
go get go.maximumdirect.net/promptkit@v0.24.0
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
[COPYRIGHT](https://forge.maximumdirect.net/base-layer/promptkit/src/tag/v0.24.0/COPYRIGHT) | [LICENSE](https://forge.maximumdirect.net/base-layer/promptkit/src/tag/v0.24.0/LICENSE) | [ATTRIBUTION](https://forge.maximumdirect.net/base-layer/promptkit/src/tag/v0.24.0/docs/oss/attribution.md)
|