@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 CHANGED
@@ -64,6 +64,14 @@ declare const createMemoryRequestSchema: 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>;
@@ -151,6 +159,14 @@ declare const extractSessionRequestSchema: z.ZodObject<{
151
159
  eventType: z.ZodString;
152
160
  identifier: z.ZodString;
153
161
  namespace: z.ZodString;
162
+ }, z.core.$strict>, z.ZodObject<{
163
+ kind: z.ZodLiteral<"scheduled_task">;
164
+ }, z.core.$strict>, z.ZodObject<{
165
+ kind: z.ZodLiteral<"event_task">;
166
+ }, z.core.$strict>, z.ZodObject<{
167
+ kind: z.ZodLiteral<"plugin_dispatch">;
168
+ }, z.core.$strict>, z.ZodObject<{
169
+ kind: z.ZodLiteral<"agent_invocation">;
154
170
  }, z.core.$strict>], "kind">, unknown>;
155
171
  userId: z.ZodOptional<z.ZodString>;
156
172
  }, z.core.$strict>;
package/dist/index.js CHANGED
@@ -368,10 +368,18 @@ var memoryRowSchema = z2.object({
368
368
  }
369
369
  });
370
370
  function storedMemorySource(source) {
371
- if (source.kind === "resource_event") {
372
- throw new Error("Resource event Source cannot own a Memory.");
371
+ switch (source.kind) {
372
+ case "slack":
373
+ case "local":
374
+ case "web":
375
+ return source.kind;
376
+ case "resource_event":
377
+ case "scheduled_task":
378
+ case "event_task":
379
+ case "plugin_dispatch":
380
+ case "agent_invocation":
381
+ throw new Error(`${source.kind} Source cannot own a Memory.`);
373
382
  }
374
- return source.kind;
375
383
  }
376
384
  var memoryRecordSchema = z2.object({
377
385
  archivedAtMs: numberSchema.optional(),
@@ -1465,6 +1473,11 @@ function sourceLabel(source) {
1465
1473
  return `${source.kind}:${source.conversationId}`;
1466
1474
  case "resource_event":
1467
1475
  return `resource-event:${source.namespace}:${source.eventKey}`;
1476
+ case "scheduled_task":
1477
+ case "event_task":
1478
+ case "plugin_dispatch":
1479
+ case "agent_invocation":
1480
+ return source.kind;
1468
1481
  }
1469
1482
  }
1470
1483
  function runtimeDescription(request) {
@@ -2984,7 +2997,7 @@ async function getTaskExtraction(context, extract) {
2984
2997
  }
2985
2998
  async function processMemorySession(context) {
2986
2999
  const run = await context.run.load();
2987
- if (run.source.kind === "local" || run.source.kind === "resource_event") {
3000
+ if (run.source.kind !== "slack" && run.source.kind !== "web") {
2988
3001
  return;
2989
3002
  }
2990
3003
  if (run.transcript.some(