@sentry/junior-memory 0.192.0 → 0.193.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/agent.d.ts +16 -0
- package/dist/index.js +17 -4
- package/dist/index.js.map +1 -1
- package/dist/store.d.ts +8 -0
- package/dist/types.d.ts +8 -0
- package/package.json +2 -2
- package/src/agent.ts +5 -0
- package/src/process-session.ts +3 -1
- package/src/store.ts +11 -3
package/dist/store.d.ts
CHANGED
|
@@ -118,6 +118,14 @@ export declare const memorySupersessionInputSchema: z.ZodObject<{
|
|
|
118
118
|
eventType: z.ZodString;
|
|
119
119
|
identifier: z.ZodString;
|
|
120
120
|
namespace: z.ZodString;
|
|
121
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
122
|
+
kind: z.ZodLiteral<"scheduled_task">;
|
|
123
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
124
|
+
kind: z.ZodLiteral<"event_task">;
|
|
125
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
126
|
+
kind: z.ZodLiteral<"plugin_dispatch">;
|
|
127
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
128
|
+
kind: z.ZodLiteral<"agent_invocation">;
|
|
121
129
|
}, z.core.$strict>], "kind">, unknown>;
|
|
122
130
|
userId: z.ZodOptional<z.ZodString>;
|
|
123
131
|
}, z.core.$strict>;
|
package/dist/types.d.ts
CHANGED
|
@@ -64,6 +64,14 @@ export declare const memoryRuntimeContextSchema: z.ZodObject<{
|
|
|
64
64
|
eventType: z.ZodString;
|
|
65
65
|
identifier: z.ZodString;
|
|
66
66
|
namespace: z.ZodString;
|
|
67
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
68
|
+
kind: z.ZodLiteral<"scheduled_task">;
|
|
69
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
70
|
+
kind: z.ZodLiteral<"event_task">;
|
|
71
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
72
|
+
kind: z.ZodLiteral<"plugin_dispatch">;
|
|
73
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
74
|
+
kind: z.ZodLiteral<"agent_invocation">;
|
|
67
75
|
}, z.core.$strict>], "kind">, unknown>;
|
|
68
76
|
userId: z.ZodOptional<z.ZodString>;
|
|
69
77
|
}, z.core.$strict>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sentry/junior-memory",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.193.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"commander": "^14.0.3",
|
|
28
28
|
"drizzle-orm": "^0.45.2",
|
|
29
29
|
"zod": "^4.5.4",
|
|
30
|
-
"@sentry/junior-plugin-api": "0.
|
|
30
|
+
"@sentry/junior-plugin-api": "0.193.0"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
33
|
"@oxlint/plugins": "1.79.0",
|
package/src/agent.ts
CHANGED
|
@@ -302,6 +302,11 @@ function sourceLabel(source: z.output<typeof sourceSchema>): string {
|
|
|
302
302
|
return `${source.kind}:${source.conversationId}`;
|
|
303
303
|
case "resource_event":
|
|
304
304
|
return `resource-event:${source.namespace}:${source.eventKey}`;
|
|
305
|
+
case "scheduled_task":
|
|
306
|
+
case "event_task":
|
|
307
|
+
case "plugin_dispatch":
|
|
308
|
+
case "agent_invocation":
|
|
309
|
+
return source.kind;
|
|
305
310
|
}
|
|
306
311
|
}
|
|
307
312
|
|
package/src/process-session.ts
CHANGED
|
@@ -223,7 +223,9 @@ export async function processMemorySession(
|
|
|
223
223
|
context: PluginTaskContext,
|
|
224
224
|
): Promise<void> {
|
|
225
225
|
const run = await context.run.load();
|
|
226
|
-
|
|
226
|
+
// TODO(dcramer): Replace this hardcoded Source check when a plugin Run can
|
|
227
|
+
// state whether passive memory extraction should run.
|
|
228
|
+
if (run.source.kind !== "slack" && run.source.kind !== "web") {
|
|
227
229
|
return;
|
|
228
230
|
}
|
|
229
231
|
// Memory tool turns already own memory management or recall; do not reinterpret
|
package/src/store.ts
CHANGED
|
@@ -187,10 +187,18 @@ const memoryRowSchema = z
|
|
|
187
187
|
function storedMemorySource(
|
|
188
188
|
source: MemoryRuntimeContext["source"],
|
|
189
189
|
): MemorySourcePlatform {
|
|
190
|
-
|
|
191
|
-
|
|
190
|
+
switch (source.kind) {
|
|
191
|
+
case "slack":
|
|
192
|
+
case "local":
|
|
193
|
+
case "web":
|
|
194
|
+
return source.kind;
|
|
195
|
+
case "resource_event":
|
|
196
|
+
case "scheduled_task":
|
|
197
|
+
case "event_task":
|
|
198
|
+
case "plugin_dispatch":
|
|
199
|
+
case "agent_invocation":
|
|
200
|
+
throw new Error(`${source.kind} Source cannot own a Memory.`);
|
|
192
201
|
}
|
|
193
|
-
return source.kind;
|
|
194
202
|
}
|
|
195
203
|
|
|
196
204
|
const memoryRecordSchema = z
|