• eric released this 2026-11-21 18:16:55 +00:00 | 0 commits to main since this release

    Promptkit v0.24.0

    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
      and offline preparation example.
    • 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.
    • 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 and
      preparation guide.
    • 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.

    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 and
      request GoDoc.

    Compatibility And Upgrade

    The configuration migration guide
    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.
    • 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 and contract GoDoc.
    • 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.
    • Promptkit no longer validates resource-version fields. Applications own version
      policy and sensitivity rules for their extension fields; see the
      format reference.

    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.

    go get go.maximumdirect.net/promptkit@v0.24.0
    

    COPYRIGHT | LICENSE | ATTRIBUTION

    Downloads