packages feed

kioku-api-0.4.0.0: CHANGELOG.md

# Changelog

## 0.4.0.0 — 2026-08-17

### Added

- `Kioku.Api.Recall`: `RecallTarget`, which says whether a recall call searches one exact scope
  (`ExactScope`) or every scope in one namespace (`NamespaceWide`). `ExactScope (ScopeGlobal ns)`
  is the exact global bucket, a request that had no representation before. The wire format carries
  a required discriminator with one tag per meaning — `exact_global`, `exact_entity`,
  `namespace_wide` — and decoding refuses an unknown tag or a variant carrying a field it has no
  meaning for.
- `RecallQuery`, the request a caller composes: a target, query text, a strategy, and a
  `RecallLimit` validated to 1–100. It deliberately carries no memory space; that comes from the
  `MemoryAccessContext` at execution.
- `legacyRecallTarget`, the migration helper: it maps a pre-target `MemoryScope` to the target
  that returns the same rows (`ScopeGlobal ns` to `NamespaceWide ns`). It is not deprecated,
  because it is what a migrating caller must call.
- `RecallStrategy` moved here from `kioku-core`'s `Kioku.Recall`, which re-exports it, so an
  existing `import Kioku.Recall (RecallStrategy (..))` keeps working. It gained
  `recallStrategyText`, `parseRecallStrategy`, `allRecallStrategies`, and a bare-string JSON
  encoding.

- `RecordedPrincipal` and `LegacyPrincipalRef` in `Kioku.Api.Access`: who a stored fact says
  acted. Three cases — a principal a directory issued, a pre-memory-space free-text agent label
  kept verbatim and marked, and an event that recorded no actor at all. The wire markers
  `kioku:legacy:` and `kioku:unattributed` are unambiguous because `mkPrincipalRef` rejects `:`.
- `memoryContextRecordedActor`, the supported way to attribute a write. Attribution comes from the
  context that authorized it, never from a separate caller-supplied name.
- `MemoryContextProvider` and `assumeAuthorizedContextProvider`, for background work that
  discovers which memory space it belongs to only after claiming it.

## 0.3.0.0 — 2026-08-05

### Changed

- No API change. Released in lockstep with the rest of the Kioku packages for the Keiki 0.9 and
  Keiro 0.11 cohort upgrade. `kioku-api` depends on neither, so a consumer that uses only this
  package can move from 0.2.0.0 to 0.3.0.0 with no other change.

## 0.2.0.0 — 2026-07-30

### Changed

- No API change. Released in lockstep with the rest of the Kioku packages for the Keiki 0.4,
  Keiro 0.4, Baikai 0.4 and Shikumi cohort upgrade.

## 0.1.0.0 — 2026-07-14

### Added

- Added host-agnostic global and entity memory scopes with validating constructors and column/text
  conversion helpers.
- Added TypeID-backed `MemoryId` and `SessionId` generation, rendering, strict parsing, and an
  explicitly named lenient parser for legacy identifiers.
- Added shared memory type, confidence, status, and record wire types plus the Kioku prelude.

### Fixed

- Rejected reserved characters in namespace and scope-kind labels so distinct scopes cannot
  collapse to the same distillation identity.

### Changed

- Renamed the any-prefix identifier parser to `parseIdLenient` and documented the narrow cases
  where rebranding an identifier is safe.