@sentry/junior-memory 0.204.0 → 0.206.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/README.md +2 -2
- package/dist/index.js +11 -8
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -6,8 +6,8 @@ exported types, tools, and tests are authoritative.
|
|
|
6
6
|
|
|
7
7
|
## Surfaces
|
|
8
8
|
|
|
9
|
-
- `createMemory`, `
|
|
10
|
-
model-visible tools registered by `src/plugin.ts`. `
|
|
9
|
+
- `createMemory`, `archiveMemory`, `listMemories`, and `searchMemories` are
|
|
10
|
+
model-visible tools registered by `src/plugin.ts`. `archiveMemory` can forget
|
|
11
11
|
public memory or private memory owned by the current User.
|
|
12
12
|
- `userPrompt` recall contributes bounded memory context before a run.
|
|
13
13
|
- `processSession` reviews completed sessions asynchronously for passive
|
package/dist/index.js
CHANGED
|
@@ -1925,7 +1925,7 @@ async function archiveMemory(db, userId, id) {
|
|
|
1925
1925
|
archiveReason: "user_removed"
|
|
1926
1926
|
}).where(
|
|
1927
1927
|
and2(
|
|
1928
|
-
activeMemoryPredicate(userId, nowMs
|
|
1928
|
+
activeMemoryPredicate(userId, nowMs),
|
|
1929
1929
|
eq2(juniorMemoryMemories.id, memoryId)
|
|
1930
1930
|
)
|
|
1931
1931
|
).returning();
|
|
@@ -2563,7 +2563,7 @@ var createMemoryInputSchema2 = z6.object({
|
|
|
2563
2563
|
'Expiration selector. Omit or use "never" when the memory should not expire, or use an exact ISO timestamp such as "2027-06-21T00:00:00Z".'
|
|
2564
2564
|
).optional()
|
|
2565
2565
|
}).strict();
|
|
2566
|
-
var
|
|
2566
|
+
var archiveMemoryInputSchema2 = z6.object({
|
|
2567
2567
|
id: z6.string().min(1).describe("Memory id or unambiguous short id prefix to remove.")
|
|
2568
2568
|
}).strict();
|
|
2569
2569
|
var listMemoriesInputSchema2 = z6.object({
|
|
@@ -2727,7 +2727,7 @@ function createMemoryCreateTool(context) {
|
|
|
2727
2727
|
}
|
|
2728
2728
|
});
|
|
2729
2729
|
}
|
|
2730
|
-
function
|
|
2730
|
+
function createMemoryArchiveTool(context) {
|
|
2731
2731
|
return definePluginTool({
|
|
2732
2732
|
annotations: {
|
|
2733
2733
|
destructiveHint: true,
|
|
@@ -2737,10 +2737,13 @@ function createMemoryRemoveTool(context) {
|
|
|
2737
2737
|
},
|
|
2738
2738
|
description: "Forget one active memory visible in the current context. This includes public memories and private memories owned by the current User. Use only ids or short id prefixes returned by listMemories or searchMemories. Never remove memories by hidden Actor, provider, scope, or subject ids.",
|
|
2739
2739
|
executionMode: "sequential",
|
|
2740
|
-
inputSchema:
|
|
2740
|
+
inputSchema: archiveMemoryInputSchema2,
|
|
2741
2741
|
outputSchema: memorySingleOutputSchema,
|
|
2742
2742
|
execute: async (input) => {
|
|
2743
|
-
const parsedInput = parseMemoryToolInput(
|
|
2743
|
+
const parsedInput = parseMemoryToolInput(
|
|
2744
|
+
archiveMemoryInputSchema2,
|
|
2745
|
+
input
|
|
2746
|
+
);
|
|
2744
2747
|
const runtimeContext = await memoryRuntimeContext(context);
|
|
2745
2748
|
const memory = await (async () => {
|
|
2746
2749
|
try {
|
|
@@ -2752,7 +2755,7 @@ function createMemoryRemoveTool(context) {
|
|
|
2752
2755
|
asToolInputError(error);
|
|
2753
2756
|
}
|
|
2754
2757
|
})();
|
|
2755
|
-
return memoryToolResult("
|
|
2758
|
+
return memoryToolResult("archiveMemory", {
|
|
2756
2759
|
memory: compactMemory(memory)
|
|
2757
2760
|
});
|
|
2758
2761
|
}
|
|
@@ -2896,9 +2899,9 @@ function capturedMemory(memory) {
|
|
|
2896
2899
|
|
|
2897
2900
|
// src/process-session.ts
|
|
2898
2901
|
var MEMORY_TOOL_NAMES = /* @__PURE__ */ new Set([
|
|
2902
|
+
"archiveMemory",
|
|
2899
2903
|
"createMemory",
|
|
2900
2904
|
"listMemories",
|
|
2901
|
-
"removeMemory",
|
|
2902
2905
|
"searchMemories"
|
|
2903
2906
|
]);
|
|
2904
2907
|
var MEMORY_TASK_STATE_TTL_MS = 7 * 24 * 60 * 60 * 1e3;
|
|
@@ -3568,7 +3571,7 @@ function memoryPlugin(options = {}) {
|
|
|
3568
3571
|
supersessionDecider: agent
|
|
3569
3572
|
})
|
|
3570
3573
|
),
|
|
3571
|
-
|
|
3574
|
+
archiveMemory: createMemoryArchiveTool(context),
|
|
3572
3575
|
listMemories: createMemoryListTool(context),
|
|
3573
3576
|
searchMemories: createMemorySearchTool(context)
|
|
3574
3577
|
};
|