Skip to content

release: v0.7.0 — event time on ingest, get-by-id, paging - #17

Merged
rrader26 merged 1 commit into
mainfrom
release/v0.7.0
Jul 14, 2026
Merged

release: v0.7.0 — event time on ingest, get-by-id, paging#17
rrader26 merged 1 commit into
mainfrom
release/v0.7.0

Conversation

@rrader26

Copy link
Copy Markdown
Contributor

Cuts @thinkfleet/memory-sdk@0.7.0, already published to npm (latest). This lands the release commit on main so the repo doesn't drift from the registry.

The fix

observe() accepted an occurredAt — documented as "defaults to now server-side" — but dropped it into the opaque metadata blob and never set validFrom. CreateMemoryRequest had no validFrom field at all, so the SDK was structurally incapable of back-dating a memory.

validFrom is the column behavior mining buckets day-of-week / hour-of-day on. A customer backfilling historical orders therefore got every row stamped with the moment of import, and the mined patterns described the import job — "concentrates on Sunday, clusters around 17:00" — rather than their data. Nothing errored: the field validated, round-tripped on read, and produced plausible-looking output.

Also

  • admin.get(memoryId) — there was previously no way to resolve a memory id at all.
  • admin.listAll() — async-iterator auto-paginator.
  • offset on search.
  • explain() now point-looks-up its sources instead of scanning list({ limit: 1000 }), which exceeded the route's max of 500 and 400'd.

npm jumps 0.5.0 → 0.7.0: main had been bumped to 0.6.0 for the brains resource, but 0.6.0 was never published. 0.7.0 contains both.

🤖 Generated with Claude Code

`observe()` accepted an `occurredAt` (documented as "defaults to now server-side")
but dropped it into the opaque `metadata` blob and never set `validFrom` — and
`CreateMemoryRequest` had no `validFrom` field at all, so the SDK was
structurally incapable of back-dating a memory.

`validFrom` is the column behavior mining buckets day-of-week / hour-of-day on,
so a customer backfilling historical orders got patterns describing the moment
they ran the import ("concentrates on Sunday, clusters around 17:00") rather
than when the orders actually happened. Nothing errored — the field validated,
round-tripped on read, and produced plausible-looking output.

Also closes the inspection gaps that same customer hit:
- admin.get(memoryId) — there was no way to resolve a memory id at all.
- admin.listAll() — async-iterator auto-paginator so callers stop hand-rolling
  the offset loop.
- search() takes `offset`.
- explain() now point-looks-up its sources instead of scanning
  list({ limit: 1000 }), which exceeded the route's max of 500 and 400'd.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@rrader26
rrader26 merged commit 4c6698d into main Jul 14, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants