@mastra/oracledb 0.2.4 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/docs/SKILL.md +1 -1
- package/dist/docs/assets/SOURCE_MAP.json +1 -1
- package/dist/docs/references/docs-memory-observational-memory.md +2 -2
- package/dist/index.cjs +33 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +33 -0
- package/dist/index.js.map +1 -1
- package/dist/storage/domains/memory/index.d.ts +4 -0
- package/dist/storage/domains/memory/index.d.ts.map +1 -1
- package/dist/storage/domains/memory/threads.d.ts +4 -0
- package/dist/storage/domains/memory/threads.d.ts.map +1 -1
- package/package.json +4 -4
package/dist/docs/SKILL.md
CHANGED
|
@@ -391,7 +391,7 @@ Date: 2026-01-15
|
|
|
391
391
|
- 🔴 12:15 User stated the app name is "Acme Dashboard"
|
|
392
392
|
```
|
|
393
393
|
|
|
394
|
-
The compression is typically between 5x and 40x.
|
|
394
|
+
The compression is typically between 5x and 40x. During synchronous observation, the Observer can also track a **current task** and **suggested response** so the agent picks up where it left off.
|
|
395
395
|
|
|
396
396
|
If you enable `observation.threadTitle`, the Observer can also suggest a short thread title when the conversation topic meaningfully changes. Thread title generation is opt-in and updates the thread metadata, so apps like Mastra Code can show the latest title in thread lists and status UI.
|
|
397
397
|
|
|
@@ -714,7 +714,7 @@ As the agent converses, message tokens accumulate. At regular intervals (`buffer
|
|
|
714
714
|
|
|
715
715
|
When message tokens reach the `messageTokens` threshold, buffered chunks activate: their observations move into the active observation log, and the corresponding raw messages are removed from the context window. The agent never pauses.
|
|
716
716
|
|
|
717
|
-
|
|
717
|
+
Async buffered Observer calls don't generate continuation hints because delayed hints can be stale by activation time. When buffered chunks activate, any previously stored suggested response and current task are cleared. The main agent receives the compressed observations without those hints.
|
|
718
718
|
|
|
719
719
|
When message production outpaces the Observer, the `blockAfter` safety threshold allows activation to overshoot the retention target instead of using fewer chunks. Activation still uses no more chunks than needed to reach the target, and the default settings remain unaffected. A synchronous observation runs when the `messageTokens` threshold is reached and buffered activation didn't happen. Buffered activation usually preserves a minimum remaining context (the smaller of \~1k tokens or the configured retention floor), but a single buffered chunk that covers the whole pending window still activates and can leave less.
|
|
720
720
|
|
package/dist/index.cjs
CHANGED
|
@@ -5255,6 +5255,36 @@ async function deleteThread(ctx, { threadId }) {
|
|
|
5255
5255
|
throw storageError$1("DELETE_THREAD", "FAILED", { threadId }, error);
|
|
5256
5256
|
}
|
|
5257
5257
|
}
|
|
5258
|
+
async function updateThreadResourceId(ctx, { threadId, resourceId }) {
|
|
5259
|
+
try {
|
|
5260
|
+
return await ctx.db.tx(async (client) => {
|
|
5261
|
+
const row = await client.oneOrNone(`${threadSelect()} FROM ${table(ctx, _mastra_core_storage.TABLE_THREADS)} WHERE id = :threadId FOR UPDATE`, { threadId });
|
|
5262
|
+
if (!row) throw new Error(`Thread "${threadId}" not found`);
|
|
5263
|
+
const normalized = parseThread(row);
|
|
5264
|
+
if (normalized.resourceId === resourceId) return normalized;
|
|
5265
|
+
const updatedAt = /* @__PURE__ */ new Date();
|
|
5266
|
+
await client.none(`UPDATE ${table(ctx, _mastra_core_storage.TABLE_THREADS)} SET ${THREAD_RESOURCE_ID} = :resourceId, ${THREAD_UPDATED_AT} = :updatedAt WHERE id = :threadId`, {
|
|
5267
|
+
resourceId,
|
|
5268
|
+
updatedAt,
|
|
5269
|
+
threadId
|
|
5270
|
+
});
|
|
5271
|
+
await client.none(`UPDATE ${table(ctx, _mastra_core_storage.TABLE_MESSAGES)} SET ${MESSAGE_RESOURCE_ID} = :resourceId WHERE thread_id = :threadId`, {
|
|
5272
|
+
resourceId,
|
|
5273
|
+
threadId
|
|
5274
|
+
});
|
|
5275
|
+
return {
|
|
5276
|
+
...normalized,
|
|
5277
|
+
resourceId,
|
|
5278
|
+
updatedAt
|
|
5279
|
+
};
|
|
5280
|
+
});
|
|
5281
|
+
} catch (error) {
|
|
5282
|
+
throw storageError$1("UPDATE_THREAD_RESOURCE_ID", "FAILED", {
|
|
5283
|
+
threadId,
|
|
5284
|
+
resourceId
|
|
5285
|
+
}, error);
|
|
5286
|
+
}
|
|
5287
|
+
}
|
|
5258
5288
|
async function listThreads(ctx, args) {
|
|
5259
5289
|
const { page = 0, perPage: perPageInput, orderBy, filter } = args;
|
|
5260
5290
|
try {
|
|
@@ -5403,6 +5433,9 @@ var MemoryOracle = class MemoryOracle extends _mastra_core_storage.MemoryStorage
|
|
|
5403
5433
|
async deleteThread(args) {
|
|
5404
5434
|
return deleteThread(this.ctx, args);
|
|
5405
5435
|
}
|
|
5436
|
+
async updateThreadResourceId(args) {
|
|
5437
|
+
return updateThreadResourceId(this.ctx, args);
|
|
5438
|
+
}
|
|
5406
5439
|
async listThreads(args) {
|
|
5407
5440
|
return listThreads(this.ctx, args);
|
|
5408
5441
|
}
|