Skip to content
Merged
Show file tree
Hide file tree
Changes from 113 commits
Commits
Show all changes
128 commits
Select commit Hold shift + click to select a range
7f17f18
Test isolated native Mastra memory replay
strickvl Sep 23, 2026
b04612b
Add versioned Mastra memory snapshots
strickvl Sep 23, 2026
fa0bba8
Reject mutations during initial memory capture
strickvl Sep 23, 2026
2517ace
Restore historical Mastra memory in isolated stores
strickvl Sep 23, 2026
e2b93bb
Capture effective Mastra provider requests
strickvl Sep 23, 2026
bdfd2b9
Pin file and skill content for Mastra replay
strickvl Sep 23, 2026
b7bc1d2
Link memory changes to provider attempts
strickvl Sep 23, 2026
68cc513
Enable isolated Mastra memory stream replay
strickvl Sep 23, 2026
c8c0e12
Simplify memory source and tool hook setup
strickvl Sep 23, 2026
96d7b1f
Identify extra context in memory request evidence
strickvl Sep 23, 2026
e56e22c
Accept SDK job objects in MCP activity pages
strickvl Sep 23, 2026
1f6e19e
Prove authenticated headless Mastra memory replay
strickvl Sep 23, 2026
a17ec54
Document and package isolated memory replay
strickvl Sep 23, 2026
b1b86d5
Stop replay after native memory storage failure
strickvl Sep 23, 2026
2a61a29
Format replay documentation examples
strickvl Sep 23, 2026
898bd52
Guard memory replay context and cleanup
strickvl Sep 23, 2026
23038f1
Isolate the optional Mastra memory entrypoint
strickvl Sep 23, 2026
e15a11d
Harden Mastra memory replay
strickvl Sep 24, 2026
5acefb3
Fix devtools import lint on Linux
strickvl Sep 24, 2026
81a614b
Guard shared Mastra resource replay
strickvl Sep 24, 2026
0f9527e
Read ISO-string memory dates at capture
strickvl Sep 24, 2026
f512fdf
Match source store semantics in memory replay
strickvl Sep 24, 2026
59f6039
Test Mastra memory replay on `@mastra/pg`
strickvl Sep 24, 2026
b6051ac
Keep tape models out of production OM records
strickvl Sep 24, 2026
1be648f
Scope Mastra lease poison to the turns it affects
strickvl Sep 24, 2026
4a25031
Honor context selectors and release before uploads
strickvl Sep 24, 2026
978d26d
Tolerate OM call drift in Mastra memory replay
strickvl Sep 24, 2026
e1e0e59
Put Mastra evidence on the replay input budget
strickvl Sep 24, 2026
5bf90d5
Redact URL credentials in Mastra memory replay
strickvl Sep 24, 2026
05d7937
Keep Kitaru latency out of Mastra baseline turns
strickvl Sep 24, 2026
9b7f248
Keep Mastra replay requests identical to baseline
strickvl Sep 24, 2026
0bda0bb
Let pending Mastra sessions close as ineligible
strickvl Sep 24, 2026
07412ad
Report refused Mastra baselines per experiment replay
strickvl Sep 24, 2026
7c8263e
Keep completed runs when finalization is rejected
strickvl Sep 24, 2026
5628daf
Let `RunRecorder` complete incomplete recordings
strickvl Sep 24, 2026
afc7092
Name why Mastra memory turns are not replayable
strickvl Sep 24, 2026
2c8a745
Document Mastra memory replay server and limits
strickvl Sep 24, 2026
5a69ff7
Share repeated Mastra replay helpers
strickvl Sep 24, 2026
5b0e663
Stop Mastra baselines waiting for OM buffering
strickvl Sep 24, 2026
acbcc37
Close Mastra turns ended by processor tripwires
strickvl Sep 24, 2026
5c0731a
Release the Mastra lease before attempt uploads
strickvl Sep 24, 2026
cee803a
Redact escaped and re-encoded URL credentials
strickvl Sep 24, 2026
d4b80ca
Refuse Mastra history with undeclared file URLs
strickvl Sep 24, 2026
96eb262
Refuse outdated Mastra v3 replay inputs up front
strickvl Sep 24, 2026
a1b6207
Keep Mastra OM replay results in their window
strickvl Sep 24, 2026
4f26411
Record Mastra memory tool results on replay budget
strickvl Sep 24, 2026
e3b98eb
Reuse recorded attachment token counts in replay
strickvl Sep 24, 2026
8f21552
Fetch undeclared `resolveFile` URLs in baselines
strickvl Sep 25, 2026
1f12518
Capture Mastra history attachment URLs implicitly
strickvl Sep 25, 2026
c6bd763
Capture Mastra history files on `resolveFile`
strickvl Sep 25, 2026
fcb9e7f
Store Mastra replay files as Kitaru blobs
strickvl Sep 25, 2026
011290e
Keep a finalizing Mastra turn eligible on quick reply
strickvl Sep 25, 2026
c8aa73e
Let Mastra replay answer missing OM results live
strickvl Sep 25, 2026
68798a3
Report the result session error on agent failure
strickvl Sep 25, 2026
b22a52e
Tag replay OM settle timeout `om_settle_timeout`
strickvl Sep 25, 2026
648b1ca
Align Mastra memory replay docs with fixes
strickvl Sep 25, 2026
870df8e
Fence late Mastra writes from released turns
strickvl Sep 25, 2026
3489280
Keep Mastra OM replay from downloading files
strickvl Sep 25, 2026
364d7f4
Refuse Mastra replays whose file blobs are gone
strickvl Sep 25, 2026
b5cc7d2
Record live Mastra OM results without re-encoding
strickvl Sep 25, 2026
0744f47
Skip Mastra buffered OM calls with no recording
strickvl Sep 25, 2026
1fbd222
Reuse Mastra token counts for inline attachments
strickvl Sep 25, 2026
a498c51
Name captured Mastra files in request evidence
strickvl Sep 25, 2026
f62f8d1
Name the reason in failed Mastra baseline errors
strickvl Sep 25, 2026
3aa2fa7
Note new Mastra replay reasons in the changelog
strickvl Sep 25, 2026
6581dc3
Reference captured files in Mastra inline history
strickvl Sep 25, 2026
1d71ad2
Name mismatched Mastra OM calls in replay spans
strickvl Sep 25, 2026
12400ad
Ignore unsent Mastra attachments in `file_url_sent_to_model`
strickvl Sep 25, 2026
c0c273e
Let Mastra quick replies follow a finalizing reply
strickvl Sep 25, 2026
9b5e643
Close diverged Mastra replays with the call named
strickvl Sep 25, 2026
68337ff
Reference Mastra inline files before snapshot copy
strickvl Sep 25, 2026
b01894a
Let Mastra reply writes follow their own lease
strickvl Sep 25, 2026
173f213
Capture Mastra input files on `resolveFile`
strickvl Sep 25, 2026
652874f
Refuse Mastra input URLs `resolveFile` missed
strickvl Sep 25, 2026
29ed985
Refuse Mastra history URLs `resolveFile` missed
strickvl Sep 25, 2026
49d8dcb
Wait for the finalizing mark in quick-reply test
strickvl Sep 25, 2026
cbf9003
Say captured Mastra inputs record a file reference
strickvl Sep 25, 2026
fe18e23
Use neutral record fixtures in Mastra replay tests
strickvl Sep 25, 2026
164f50e
Merge remote-tracking branch 'origin/develop' into feat/issue-1176-ad…
strickvl Sep 25, 2026
aac4183
Refuse Mastra writes outside the captured selector
strickvl Sep 25, 2026
ca98ec3
Refuse compound credential keys like `access_token`
strickvl Sep 25, 2026
753cb6e
Detect in-place Mastra request context edits
strickvl Sep 25, 2026
da3d5fc
Refuse malformed Mastra `keyOrder` on the server
strickvl Sep 25, 2026
f12e976
Send recorded media type in live OM file parts
strickvl Sep 25, 2026
f12a6ba
Drop provider messages from Mastra error text
strickvl Sep 25, 2026
9d75c9c
Grant recorded-file blobs only to replay tasks
strickvl Sep 25, 2026
4a297d2
Check inline Mastra file size before decoding
strickvl Sep 25, 2026
94cadf8
Document extras the Mastra replay check needs
strickvl Sep 25, 2026
db8d294
Check replay model before `recordedInputProjector`
strickvl Sep 25, 2026
092762d
Check blob file references at Mastra finalization
strickvl Sep 25, 2026
af86765
Refuse standalone replays at the final check
strickvl Sep 25, 2026
407c45e
Let lease answers win over a stalled bound
strickvl Sep 25, 2026
eccc720
Make the shared file lease test helper synchronous
strickvl Sep 25, 2026
9ba04e6
Drop the substring credential scan of request context
strickvl Sep 25, 2026
46538b9
Require the exact `toISOString` form for turn starts
strickvl Sep 25, 2026
9b17316
Check each `omTape` entry before replay starts
strickvl Sep 25, 2026
93fea7a
Match credential keys with a format suffix
strickvl Sep 25, 2026
b1a78c4
Refuse ID-only writes to rows outside the turn
strickvl Sep 25, 2026
865e145
Add `nonSecretKeys` and `isSecretKey` to memory replay
strickvl Sep 28, 2026
53c9c88
Name the credential in refused request evidence
strickvl Sep 28, 2026
ba1e7c7
Record memory replay data faithfully by default
strickvl Sep 28, 2026
c5408c1
Document faithful recording for memory replay
strickvl Sep 28, 2026
9a642d2
Hide provider errors and transport keys everywhere
strickvl Sep 28, 2026
c035091
Scope credential docs to the memory replay agent
strickvl Sep 28, 2026
db1af76
Merge remote-tracking branch 'origin/develop' into feat/issue-1176-ad…
strickvl Sep 28, 2026
1422a50
Build not-scorable Mastra results without `notScorable`
strickvl Sep 28, 2026
9a34203
Test the Mastra adapter against `@mastra/core` 1.71
strickvl Sep 28, 2026
f8a2597
Accept every tested Mastra release in memory replay
strickvl Sep 29, 2026
01dcc37
Stop Dependabot moving the pinned Mastra versions
strickvl Sep 29, 2026
a066b03
Trim the Mastra compat packages and guard the doc tables
strickvl Sep 29, 2026
e51e20d
Add changelog fragment for #1229
strickvl Sep 29, 2026
386c106
Replay buffered OM results at production's step
strickvl Sep 29, 2026
2a932df
Store OM tape entries through one helper
strickvl Sep 29, 2026
43b7c2d
Name the changelog fragment for #1230
strickvl Sep 29, 2026
db550f5
Merge develop into Mastra compatibility checks
strickvl Oct 1, 2026
fdaf469
Merge branch 'develop' into ci/mastra-core-1.71-compat
strickvl Oct 2, 2026
7604830
Merge branch 'develop' into ci/mastra-core-1.71-compat
strickvl Oct 2, 2026
b4a6b2b
Fix Mastra compatibility CI integration
strickvl Oct 2, 2026
465f4f8
Merge updated Mastra compatibility CI into range tests
strickvl Oct 2, 2026
32fbc70
Merge updated Mastra range tests into buffer replay
strickvl Oct 2, 2026
b111c49
Refresh MCP index for Mastra version documentation
strickvl Oct 2, 2026
330ad8d
Refresh MCP index for buffered memory replay
strickvl Oct 2, 2026
a655284
Include the final Mastra range parent update
strickvl Oct 2, 2026
57a2847
Merge remote-tracking branch 'origin/develop' into HEAD
strickvl Oct 5, 2026
d74f05a
Merge commit '57a2847f9' into HEAD
strickvl Oct 5, 2026
8e604e9
Merge remote-tracking branch 'origin/develop' into HEAD
strickvl Oct 5, 2026
46c87a8
Merge commit '8e604e922' into HEAD
strickvl Oct 5, 2026
d947a13
Merge remote-tracking branch 'origin/develop' into HEAD
strickvl Oct 5, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .agents/skills/kitaru-adapter-development/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,6 @@ For Python adapters, run the focused adapter tests, then the plugin workspace fo

For TypeScript adapters, run the affected package's test, typecheck, lint, and build scripts. Run the root `pnpm test`, `pnpm typecheck`, `pnpm lint`, and `pnpm pack:check` when shared primitives, workspace metadata, or packaging changes.

The Mastra adapter is tested against every Mastra release set the memory replay factory accepts. `MEMORY_REPLAY_TESTED_VERSIONS` in `packages/mastra/src/memory-replay-versions.ts` lists those sets (`@mastra/core`, the `@mastra/memory` release built against it, and the `@mastra/pg` release the PostgreSQL tests use), and `assertMemoryReplayVersions` accepts exactly its core and memory pairs. `packages/mastra/` installs the oldest set. Each private `packages/mastra-compat/<major.minor>/` package installs one other set and runs every `packages/mastra` test against it through `packages/mastra-compat/shared/`; the 1.71 package also holds the Mastra compatibility suite. To add a Mastra release, check which memory and pg releases were built against it (their published `devDependencies`), copy a compat package with those pins, run its suite including PostgreSQL, then add the table row and the adapter's `@mastra/memory` peer version. `packages/mastra/test/tested-versions.test.ts` fails when the table, the test packages, the installed versions and the peer range disagree, and the packed-tarball smoke reads the table from the built adapter. Dependabot ignores these pins; see `.github/dependabot.yml`. When you raise the supported `@mastra/core` ceiling for the rest of the adapter, move the compatibility suite to the newest compat package in the same change.

Use live provider or framework tests only when their credentials and external side effects are explicitly in scope.
2 changes: 2 additions & 0 deletions .claude/skills/kitaru-adapter-development/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,6 @@ For Python adapters, run the focused adapter tests, then the plugin workspace fo

For TypeScript adapters, run the affected package's test, typecheck, lint, and build scripts. Run the root `pnpm test`, `pnpm typecheck`, `pnpm lint`, and `pnpm pack:check` when shared primitives, workspace metadata, or packaging changes.

The Mastra adapter is tested against every Mastra release set the memory replay factory accepts. `MEMORY_REPLAY_TESTED_VERSIONS` in `packages/mastra/src/memory-replay-versions.ts` lists those sets (`@mastra/core`, the `@mastra/memory` release built against it, and the `@mastra/pg` release the PostgreSQL tests use), and `assertMemoryReplayVersions` accepts exactly its core and memory pairs. `packages/mastra/` installs the oldest set. Each private `packages/mastra-compat/<major.minor>/` package installs one other set and runs every `packages/mastra` test against it through `packages/mastra-compat/shared/`; the 1.71 package also holds the Mastra compatibility suite. To add a Mastra release, check which memory and pg releases were built against it (their published `devDependencies`), copy a compat package with those pins, run its suite including PostgreSQL, then add the table row and the adapter's `@mastra/memory` peer version. `packages/mastra/test/tested-versions.test.ts` fails when the table, the test packages, the installed versions and the peer range disagree, and the packed-tarball smoke reads the table from the built adapter. Dependabot ignores these pins; see `.github/dependabot.yml`. When you raise the supported `@mastra/core` ceiling for the rest of the adapter, move the compatibility suite to the newest compat package in the same change.

Use live provider or framework tests only when their credentials and external side effects are explicitly in scope.
32 changes: 29 additions & 3 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,8 @@ updates:
# users are told is unsupported. Treat that PR as the prompt for a
# deliberate range extension like #1092, not something to merge as is.
# Separate groups keep a Mastra range question from holding up an `ai`
# patch.
# patch. `@mastra/*` version updates are ignored below, so for Mastra
# that range extension always starts by hand.
vercel-ai:
patterns:
- ai
Expand All @@ -426,8 +427,10 @@ updates:
- minor
- patch

# `zod` is declared only by the Mastra adapter and its example, where it
# defines the tool schemas Mastra validates.
# `zod` is declared only by the Mastra adapter, its test packages and its
# example, where it defines the tool schemas Mastra validates. The
# `@mastra/*` version updates this group would carry are ignored below;
# the pattern stays so they never land in the catch-all either.
mastra:
patterns:
- "@mastra/*"
Expand Down Expand Up @@ -465,6 +468,29 @@ updates:
# package builds do not accidentally depend on APIs absent from Node 22.
- dependency-name: "@types/node"
update-types: ["version-update:semver-major"]
# The Mastra memory replay factory accepts only the release sets in
# MEMORY_REPLAY_TESTED_VERSIONS (packages/mastra/src/memory-replay-versions.ts),
# and packages/mastra plus each packages/mastra-compat/<x.y> package pins
# one set so CI runs the full suite on it. Dependabot writes one version
# into every package.json that declares a dependency, and nothing here
# can scope an update to one workspace member: `ignore` takes only names
# and versions, `dependency-type` classifies a name across all members
# (the examples make `@mastra/core` a production dependency), and a
# second npm block inside this pnpm workspace fails as misconfigured. So
# any `@mastra/*` update would move every pin at once, as the cooldown-
# limited #1222 did when it moved `@mastra/core` from 1.71.0 down to 1.67.0.
#
# Each Mastra package is built against one core release (memory 1.31.0
# does not load on core 1.67.0), so all of `@mastra/*` moves by hand:
# validate a new release in a new compat package, add its row to the
# table, and bump the examples then. Listing every update type ignores
# version updates only; security updates still open, and CI fails them
# until their release set is tested.
- dependency-name: "@mastra/*"
update-types:
- version-update:semver-major
- version-update:semver-minor
- version-update:semver-patch
cooldown:
default-days: 7
semver-major-days: 14
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,12 @@ jobs:
- run: pnpm run generate:check
- run: pnpm run lint
- run: pnpm run typecheck
- run: pnpm run test:built
- name: Test TypeScript packages, including Mastra memory on PostgreSQL
env:
POSTGRES_PASSWORD: password
run: >-
KITARU_TEST_MASTRA_POSTGRES_URL="postgres://postgres:${POSTGRES_PASSWORD}@localhost:5433/postgres"
pnpm run test:built
- name: Report TypeScript coverage
run: |
set -euo pipefail
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ helm/Chart.lock
# Root TypeScript workspace
/node_modules/
/packages/*/node_modules/
/packages/mastra-compat/*/node_modules/
/examples/typescript/mastra_support_triage/node_modules/
/examples/typescript/mastra_adaptive_conversation/node_modules/
/examples/typescript/vercel_ai_support_triage/node_modules/
Expand Down
1 change: 1 addition & 0 deletions biome.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"includes": [
"packages/core/**",
"packages/mastra/**",
"packages/mastra-compat/**",
"packages/vercel-ai/**",
"examples/typescript/mastra_support_triage/**",
"examples/typescript/mastra_adaptive_conversation/**",
Expand Down
10 changes: 10 additions & 0 deletions changelog.d/1178.added.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
- Add opt-in Mastra streamed replay with isolated native thread memory. `createMemoryReplayAgent()` from `@zenml-io/kitaru-mastra/memory` records starting working and observational memory, observation and reflection outputs including failed attempts, effective actor requests, controlled files, and memory changes. Replay reuses those recorded outputs, matched to calls by phase and input, without reading or writing production memory or, by default, calling the observer or reflector model; working-memory updates run live against the isolated replay store. Requires a tested Mastra core and memory pair, from core 1.67.0 with memory 1.30.0 through core 1.71.0 with memory 1.32.1 (the adapter docs list each pair and its `@mastra/pg` release), and a Kitaru server newer than 0.27.1; existing history-only recordings must be recorded again to use this path.
- The Kitaru server tracks whether a recorded Mastra memory session can be replayed in its `mastra_replay_state` metadata (`pending`, `eligible`, or `ineligible` with a `mastra_replay_reason`). Replaying a pending, ineligible, or incomplete baseline returns HTTP 409 with a `mastra_replay_<reason>` code, and CLI and MCP error details include that reason and the baseline's `session_id`. An experiment run records each refused baseline as a failed replay and still runs the others. A pending session closed without a replay decision, such as a plain `failed` update after a recorder stopped mid-turn, is stored as `ineligible` with reason `abandoned` (failed) or `unfinalized` (completed).
- Mastra memory replay coordinates every writer of a thread and resource through a `MastraExclusiveMemoryAccess` lease; deployments with more than one server writing to the same threads must supply a shared lease backend that expires leases of dead holders. Only overlapping turns become ineligible; a reply that starts while the previous turn's buffered observational-memory work is still running leaves that previous turn eligible when the backend supports the optional `markFinalizing()` lease method, and the reply is ineligible with `earlier_turn_finalizing`, as is each further reply that starts while the previous reply's memory work is still running. A `markUnsafeWrite()` marker lasts until the application calls `resetAfterQuiescence()`.
- Mastra memory replay `files` can be a function that returns the attachment URLs for each call. URLs in file and image parts of the input and thread history need no declaration: with a `resolveFile`, Kitaru captures each one when a processor resolves it, so `files` is optional for a processor that resolves attachments through `resolveFile`, a turn that sends a new attachment URL stays eligible with `files: []`, and older attachments the processor never reads cost no downloads. A message attachment that Mastra does not send to the model, because the message also holds a file part, does not make a turn ineligible. A turn whose input or history URL reaches the model as a URL instead of bytes is ineligible with `file_url_sent_to_model`. A turn whose processor downloads an input or history URL with its own client instead of `resolveFile` is ineligible with `file_url_undeclared`. Recorded Mastra input, thread history, and evidence never keep URL credentials: an input attachment that Kitaru captured is recorded as a `kitaru-file://` reference, and every other URL keeps its text with its credentials (download tokens, signatures, API keys, userinfo) replaced by `REDACTED`.
- A Mastra memory replay baseline turn does not wait on a slow or unresponsive Kitaru server. Evidence uploads run in the background in order; the turn waits at most `sessionSetupWaitMs` (default 2 seconds) for its session and `fileCaptureWaitMs` (default 10 seconds) for declared files, then answers natively and records why it is not replayable. A native fallback reuses the file downloads Kitaru already started instead of fetching the URLs again.
- Mastra memory replay sends the model the same request production sent, even when the recorded input was stored in PostgreSQL `jsonb`, which re-sorts object keys, and even when the replay runs days after the baseline. Replay restores the recorded key order and evaluates observational-memory date labels and `activateAfterIdle` at the recorded turn time.
- A Mastra memory replay baseline whose native answer succeeded but whose recording cannot be replayed is stored as a `completed` session with its answer, marked `ineligible` with a specific `mastra_replay_reason` such as `replay_input_too_large`, `credential_key_unsupported`, `om_config_unsupported`, `memory_lease_conflict`, `om_tape_incomplete`, or `server_rejected_finalization`. `onRecordingError` receives the same code as `reason`, including for turns that ran natively because recording could not be set up (`stage: "setup"`). Failed provider calls keep their HTTP status and its category, such as `HTTP 429: rate limited`, but not the provider's message, which can echo request content and credentials, and each failed call is recorded as one model node.
- Mastra memory replay stores each captured file once as a content-addressed Kitaru blob after the native answer, instead of inlining base64 bytes in the replay input, so attachments no longer count against the 16 MiB replay input limit. One file may use the whole 16 MiB per-turn file limit. A process that already stored a file does not upload it again on later turns, replay tasks are granted read access to the blobs their replay input names, and the server checks that each named blob holds the recorded length and hash before marking a turn eligible. Inline attachment content in thread history that matches a captured file is replaced by its reference before Kitaru copies or size-checks the history, so it neither counts toward the 16 MiB replay input limit nor slows the start of the turn. A turn whose files cannot be stored is ineligible with `file_store_failed`, and a replay of a turn whose file blob was deleted is refused with `mastra_replay_file_missing`. Replay inputs recorded with inline file bytes still replay. When a processor writes a captured file's bytes into a message and Mastra saves them in thread history, later replay inputs, memory-change evidence and model-request evidence name the file by its reference instead of repeating the bytes, and replay writes the exact bytes back into the restored history.
- A Mastra memory replay whose actor takes a step production never took, so that observational memory needs a blocking observation or reflection with no recorded output, fails as diverged by default. The failed replay records an `om_unanswered_call` span naming that call, and closes its session before its stream ends. Set `missingObservationalMemoryResults: "live"` on `createMemoryReplayAgent()` to call the observer or reflector model for those calls only; each live call is recorded as an `llm_call` node and the replay session reports `mastra_om_live_calls` in its metadata.
- Mastra memory replay records application data as it is by default, whatever its keys are called: tool arguments and results, messages, working and observational memory, the captured request context, configuration, and model-request and memory-change evidence. This keeps a turn with a field such as an opaque `resultToken` handle replayable, but it also means a real `apiKey` or `client_secret` that an application puts in those places is stored in Kitaru. Kitaru always keeps `authorization`, `proxy-authorization`, `cookie`, `set-cookie`, `headers`, and `abortSignal` keys and Mastra's authentication token out of recordings and marks such a turn `credential_key_unsupported`, redacts credentials in URLs, and never stores a provider's error message. To mask other keys, pass `isSecretKey(key)` to `createMemoryReplayAgent()`: `isSecretKey: isCredentialKeyName`, exported from `@zenml-io/kitaru-mastra/memory`, treats names such as `token`, `password`, or `accessToken` as credentials, and `nonSecretKeys` lists keys that always record as they are. The history-only `KitaruAgent` and the other TypeScript adapters still redact credential-looking keys by name.
4 changes: 4 additions & 0 deletions changelog.d/1178.fixed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
- A failed agent task or replay whose process exits without writing a result now reports its result session's status and error, such as a Mastra replay divergence, instead of a generic "exited successfully without writing a result" message. A task token may now list the sessions its own task produced.
- The history-only Mastra `KitaruAgent` and the Vercel AI adapter now treat compound credential key names such as `access_token`, `clientSecret`, `refresh_token`, or `x-api-key`, and such names followed by a format word such as `secret_value` or `privateKeyPem`, like `token` or `password`: recorded tool and model evidence redacts their values. A Mastra memory replay agent created with `isSecretKey: isCredentialKeyName` marks a turn that holds one anywhere in its recorded data ineligible with `credential_key_unsupported`. Plural counters such as `max_tokens` and pagination names such as `pageToken` stay unchanged.
- Recorded provider metadata from the TypeScript adapters now hides values under `headers`, `abortSignal`, and the other transport keys, not only under credential-named keys.
- The Mastra memory replay agent no longer stores a provider's error message: the `error` part Mastra saves on a failed turn's assistant message is recorded with its message replaced by `[redacted]`, in memory-change evidence and in later turns' replay input.
1 change: 1 addition & 0 deletions changelog.d/1229.changed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- The Mastra memory replay factory (`createMemoryReplayAgent()`) accepts every Mastra release set its full test suite passes on, instead of only `@mastra/core` 1.67.0 with `@mastra/memory` 1.30.0: core 1.67.0 through 1.71.0, each with the `@mastra/memory` release built against it (1.30.0, 1.31.0, 1.31.0, 1.32.0, 1.32.1). Install core and memory from the same row of the table in the adapter docs, which also names the tested `@mastra/pg` release for each. Any other combination, including a supported core with another row's memory, still fails closed with `version_mismatch`, and the error now lists the supported pairs. The adapter's `@mastra/memory` peer range lists the same releases.
1 change: 1 addition & 0 deletions changelog.d/mastra-om-buffer-timing.fixed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- A Mastra memory replay (`createMemoryReplayAgent()`) no longer observes at a step where production did not. With a slow production observer, the instant replay used to start extra buffering rounds while the recorded round would still have been running. Each extra round split later steps into more stored messages and raised OM's pending token count, so a turn that ended just under `messageTokens` crossed it only in replay and the actor's last prompt differed. Baselines now record how many actor steps had started when each OM output arrived and how long the call took, and replay returns a matching buffered output at that step, or after that duration at the latest. Baselines recorded earlier replay as before.
Loading
Loading