@sentry/junior-memory 0.125.0 → 0.126.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
@@ -25,9 +25,9 @@ declare const createMemoryRequestSchema: z.ZodObject<{
25
25
  platform: z.ZodLiteral<"slack">;
26
26
  teamId: z.ZodString;
27
27
  channelId: z.ZodString;
28
- type: z.ZodEnum<{
29
- pub: "pub";
30
- priv: "priv";
28
+ visibility: z.ZodEnum<{
29
+ public: "public";
30
+ private: "private";
31
31
  }>;
32
32
  messageTs: z.ZodOptional<z.ZodString>;
33
33
  threadTs: z.ZodOptional<z.ZodString>;
@@ -43,7 +43,7 @@ declare const createMemoryRequestSchema: z.ZodObject<{
43
43
  }, z.core.$strict>>;
44
44
  source: z.ZodObject<{
45
45
  platform: z.ZodLiteral<"local">;
46
- type: z.ZodLiteral<"priv">;
46
+ visibility: z.ZodLiteral<"private">;
47
47
  conversationId: z.ZodString;
48
48
  }, z.core.$strict>;
49
49
  }, z.core.$strict>]>;
@@ -86,9 +86,9 @@ declare const extractSessionRequestSchema: z.ZodObject<{
86
86
  platform: z.ZodLiteral<"slack">;
87
87
  teamId: z.ZodString;
88
88
  channelId: z.ZodString;
89
- type: z.ZodEnum<{
90
- pub: "pub";
91
- priv: "priv";
89
+ visibility: z.ZodEnum<{
90
+ public: "public";
91
+ private: "private";
92
92
  }>;
93
93
  messageTs: z.ZodOptional<z.ZodString>;
94
94
  threadTs: z.ZodOptional<z.ZodString>;
@@ -104,7 +104,7 @@ declare const extractSessionRequestSchema: z.ZodObject<{
104
104
  }, z.core.$strict>>;
105
105
  source: z.ZodObject<{
106
106
  platform: z.ZodLiteral<"local">;
107
- type: z.ZodLiteral<"priv">;
107
+ visibility: z.ZodLiteral<"private">;
108
108
  conversationId: z.ZodString;
109
109
  }, z.core.$strict>;
110
110
  }, z.core.$strict>]>;
package/dist/api.d.ts CHANGED
@@ -55,6 +55,11 @@ export declare const memoryDashboardResponseSchema: z.ZodObject<{
55
55
  events: z.ZodNumber;
56
56
  }, z.core.$strict>>;
57
57
  generatedAt: z.ZodISODateTime;
58
+ recallDays: z.ZodArray<z.ZodObject<{
59
+ costUsd: z.ZodNumber;
60
+ date: z.ZodISODate;
61
+ events: z.ZodNumber;
62
+ }, z.core.$strict>>;
58
63
  stats: z.ZodObject<{
59
64
  active: z.ZodNumber;
60
65
  automatic: z.ZodNumber;
package/dist/index.js CHANGED
@@ -2077,7 +2077,7 @@ function runtimeContext(actor) {
2077
2077
  actor,
2078
2078
  source: {
2079
2079
  platform: "slack",
2080
- type: "priv",
2080
+ visibility: "private",
2081
2081
  teamId: actor.teamId,
2082
2082
  channelId: "DDASHBOARD"
2083
2083
  }
@@ -2087,7 +2087,7 @@ function runtimeContext(actor) {
2087
2087
  actor,
2088
2088
  source: {
2089
2089
  platform: "local",
2090
- type: "priv",
2090
+ visibility: "private",
2091
2091
  conversationId: "local:dashboard:memories"
2092
2092
  }
2093
2093
  };
@@ -2177,15 +2177,16 @@ var memoryDashboardDaySchema = z6.object({
2177
2177
  personal: z6.number().int().min(0),
2178
2178
  public: z6.number().int().min(0)
2179
2179
  }).strict();
2180
- var memoryExtractionDaySchema = z6.object({
2180
+ var memoryCostDaySchema = z6.object({
2181
2181
  costUsd: z6.number().finite().nonnegative(),
2182
2182
  date: z6.iso.date(),
2183
2183
  events: z6.number().int().min(0)
2184
2184
  }).strict();
2185
2185
  var memoryDashboardResponseSchema = z6.object({
2186
2186
  days: z6.array(memoryDashboardDaySchema).length(90),
2187
- extractionDays: z6.array(memoryExtractionDaySchema).length(90),
2187
+ extractionDays: z6.array(memoryCostDaySchema).length(90),
2188
2188
  generatedAt: z6.iso.datetime(),
2189
+ recallDays: z6.array(memoryCostDaySchema).length(90),
2189
2190
  stats: z6.object({
2190
2191
  active: z6.number().int().min(0),
2191
2192
  automatic: z6.number().int().min(0),
@@ -2246,18 +2247,23 @@ function createMemoryApi(options) {
2246
2247
  const memories = createViewerMemories(options.db, actors);
2247
2248
  try {
2248
2249
  if (isDashboard && (request.method === "GET" || request.method === "HEAD")) {
2249
- const [stats, days, extractionDays] = await Promise.all([
2250
+ const [stats, days, extractionDays, recallDays] = await Promise.all([
2250
2251
  memories.stats(),
2251
2252
  memories.timeline({ days: 90 }),
2252
2253
  options.eventStats.costsByDay({
2253
2254
  days: 90,
2254
2255
  eventName: "memories_captured"
2256
+ }),
2257
+ options.eventStats.costsByDay({
2258
+ days: 90,
2259
+ eventName: "memories_recalled"
2255
2260
  })
2256
2261
  ]);
2257
2262
  const body = memoryDashboardResponseSchema.parse({
2258
2263
  days,
2259
2264
  extractionDays,
2260
2265
  generatedAt: (/* @__PURE__ */ new Date()).toISOString(),
2266
+ recallDays,
2261
2267
  stats
2262
2268
  });
2263
2269
  return request.method === "HEAD" ? new Response(null, {