@sentry/junior-memory 0.198.0 → 0.199.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/store.d.ts DELETED
@@ -1,229 +0,0 @@
1
- import { type SQL } from "drizzle-orm";
2
- import type { PgDatabase } from "drizzle-orm/pg-core";
3
- import type { PgQueryResultHKT } from "drizzle-orm/pg-core/session";
4
- import { z } from "zod";
5
- import * as memorySqlSchema from "./db/schema";
6
- import { type MemoryRuntimeContext } from "./types";
7
- import { type ResolvedMemoryScope } from "./scope";
8
- export type MemoryDb = PgDatabase<PgQueryResultHKT, typeof memorySqlSchema>;
9
- declare const createMemoryInputSchema: z.ZodObject<{
10
- content: z.ZodString;
11
- expiresAtMs: z.ZodOptional<z.ZodNumber>;
12
- idempotencyKey: z.ZodString;
13
- kind: z.ZodEnum<{
14
- preference: "preference";
15
- procedure: "procedure";
16
- knowledge: "knowledge";
17
- }>;
18
- }, z.core.$strict>;
19
- declare const listMemoriesInputSchema: z.ZodObject<{
20
- limit: z.ZodOptional<z.ZodNumber>;
21
- }, z.core.$strict>;
22
- declare const searchMemoriesInputSchema: z.ZodObject<{
23
- limit: z.ZodOptional<z.ZodNumber>;
24
- query: z.ZodString;
25
- }, z.core.$strict>;
26
- declare const archiveMemoryInputSchema: z.ZodObject<{
27
- id: z.ZodString;
28
- reason: z.ZodOptional<z.ZodString>;
29
- }, z.core.$strict>;
30
- declare const archiveExpiredMemoriesInputSchema: z.ZodObject<{
31
- limit: z.ZodOptional<z.ZodNumber>;
32
- }, z.core.$strict>;
33
- declare const memoryRecordSchema: z.ZodObject<{
34
- archivedAtMs: z.ZodOptional<z.ZodNumber>;
35
- archiveReason: z.ZodOptional<z.ZodString>;
36
- content: z.ZodString;
37
- createdAtMs: z.ZodNumber;
38
- expiresAtMs: z.ZodOptional<z.ZodNumber>;
39
- id: z.ZodString;
40
- observedAtMs: z.ZodNumber;
41
- scope: z.ZodEnum<{
42
- public: "public";
43
- private: "private";
44
- }>;
45
- subjectType: z.ZodEnum<{
46
- user: "user";
47
- conversation: "conversation";
48
- general: "general";
49
- }>;
50
- supersededAtMs: z.ZodOptional<z.ZodNumber>;
51
- supersededById: z.ZodOptional<z.ZodString>;
52
- kind: z.ZodEnum<{
53
- preference: "preference";
54
- procedure: "procedure";
55
- knowledge: "knowledge";
56
- }>;
57
- }, z.core.$strict>;
58
- /** Validated preference comparison input supplied to a supersession decider. */
59
- export declare const memorySupersessionInputSchema: z.ZodObject<{
60
- candidate: z.ZodObject<{
61
- content: z.ZodString;
62
- kind: z.ZodLiteral<"preference">;
63
- }, z.core.$strict>;
64
- existingMemories: z.ZodArray<z.ZodObject<{
65
- content: z.ZodString;
66
- id: z.ZodString;
67
- }, z.core.$strict>>;
68
- runtimeContext: z.ZodObject<{
69
- conversationId: z.ZodOptional<z.ZodString>;
70
- locationId: z.ZodOptional<z.ZodString>;
71
- actor: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
72
- platform: z.ZodLiteral<"slack">;
73
- teamId: z.ZodString;
74
- email: z.ZodOptional<z.ZodString>;
75
- fullName: z.ZodOptional<z.ZodString>;
76
- userId: z.ZodString;
77
- userName: z.ZodOptional<z.ZodString>;
78
- }, z.core.$strict>, z.ZodObject<{
79
- platform: z.ZodLiteral<"local">;
80
- email: z.ZodOptional<z.ZodString>;
81
- fullName: z.ZodOptional<z.ZodString>;
82
- userId: z.ZodString;
83
- userName: z.ZodOptional<z.ZodString>;
84
- }, z.core.$strict>, z.ZodObject<{
85
- platform: z.ZodLiteral<"web">;
86
- email: z.ZodOptional<z.ZodString>;
87
- fullName: z.ZodOptional<z.ZodString>;
88
- userId: z.ZodString;
89
- userName: z.ZodOptional<z.ZodString>;
90
- }, z.core.$strict>, z.ZodObject<{
91
- platform: z.ZodLiteral<"system">;
92
- name: z.ZodString;
93
- }, z.core.$strict>], "platform">>;
94
- source: z.ZodPreprocess<z.ZodDiscriminatedUnion<[z.ZodObject<{
95
- kind: z.ZodLiteral<"slack">;
96
- teamId: z.ZodString;
97
- channelId: z.ZodString;
98
- visibility: z.ZodEnum<{
99
- public: "public";
100
- private: "private";
101
- }>;
102
- messageTs: z.ZodOptional<z.ZodString>;
103
- threadTs: z.ZodOptional<z.ZodString>;
104
- }, z.core.$strict>, z.ZodObject<{
105
- kind: z.ZodLiteral<"local">;
106
- visibility: z.ZodLiteral<"private">;
107
- conversationId: z.ZodString;
108
- }, z.core.$strict>, z.ZodObject<{
109
- kind: z.ZodLiteral<"web">;
110
- visibility: z.ZodEnum<{
111
- public: "public";
112
- private: "private";
113
- }>;
114
- conversationId: z.ZodString;
115
- }, z.core.$strict>, z.ZodObject<{
116
- kind: z.ZodLiteral<"resource_event">;
117
- eventKey: z.ZodString;
118
- eventType: z.ZodString;
119
- identifier: z.ZodString;
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">;
129
- }, z.core.$strict>], "kind">, unknown>;
130
- userId: z.ZodOptional<z.ZodString>;
131
- }, z.core.$strict>;
132
- }, z.core.$strict>;
133
- /**
134
- * Validated preference decision whose referenced ids must come from the
135
- * supplied existing memories.
136
- */
137
- export declare const memorySupersessionDecisionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
138
- decision: z.ZodLiteral<"duplicate">;
139
- duplicateId: z.ZodString;
140
- }, z.core.$strict>, z.ZodObject<{
141
- decision: z.ZodLiteral<"supersedes_old">;
142
- supersededIds: z.ZodArray<z.ZodString>;
143
- }, z.core.$strict>, z.ZodObject<{
144
- decision: z.ZodEnum<{
145
- distinct: "distinct";
146
- uncertain: "uncertain";
147
- }>;
148
- }, z.core.$strict>], "decision">;
149
- export type MemoryRecord = z.output<typeof memoryRecordSchema>;
150
- export type CreateMemoryInput = z.output<typeof createMemoryInputSchema>;
151
- /** Result of a memory write after idempotency checks. */
152
- export interface CreateMemoryResult {
153
- created: boolean;
154
- /** True when this call found the memory previously written for the same input identity. */
155
- idempotent?: true;
156
- memory: MemoryRecord;
157
- /** Memory ids made inactive by this write. */
158
- supersededIds?: string[];
159
- }
160
- export type ListMemoriesInput = z.output<typeof listMemoriesInputSchema>;
161
- export type SearchMemoriesInput = z.output<typeof searchMemoriesInputSchema>;
162
- export type ArchiveMemoryInput = z.output<typeof archiveMemoryInputSchema>;
163
- export type ArchiveExpiredMemoriesInput = z.output<typeof archiveExpiredMemoriesInputSchema>;
164
- export interface ArchiveExpiredMemoriesResult {
165
- archivedCount: number;
166
- }
167
- export interface MemoryEmbeddingProvider {
168
- /** Embed normalized memory text for derived vector retrieval. */
169
- embedTexts(input: {
170
- texts: string[];
171
- }): Promise<{
172
- costUsd?: number;
173
- dimensions: number;
174
- model: string;
175
- provider: string;
176
- vectors: number[][];
177
- }>;
178
- }
179
- export type MemorySupersessionInput = z.output<typeof memorySupersessionInputSchema>;
180
- export type MemorySupersessionDecision = z.output<typeof memorySupersessionDecisionSchema>;
181
- export interface MemorySupersessionDecider {
182
- /** Classify a new preference against related active preferences. */
183
- adjudicateSupersession(input: MemorySupersessionInput): Promise<MemorySupersessionDecision> | MemorySupersessionDecision;
184
- }
185
- export interface MemoryStoreOptions {
186
- embedder?: MemoryEmbeddingProvider;
187
- now?: () => number;
188
- supersessionDecider?: MemorySupersessionDecider;
189
- }
190
- /** Context-bound storage operations for visible long-term memories. */
191
- export interface MemoryStore {
192
- /** Archive expired memories visible in the current runtime context. */
193
- archiveExpiredMemories(input?: ArchiveExpiredMemoriesInput): Promise<ArchiveExpiredMemoriesResult>;
194
- /** Archive a visible memory in the current runtime context. */
195
- archiveMemory(input: ArchiveMemoryInput): Promise<MemoryRecord>;
196
- /** Store a memory about the current User. The Source sets access. */
197
- createMemory(input: CreateMemoryInput): Promise<CreateMemoryResult>;
198
- /** Store a memory about the current Conversation. The Source sets access. */
199
- createConversationMemory(input: CreateMemoryInput): Promise<CreateMemoryResult>;
200
- /** List active memories visible in the current runtime context. */
201
- listMemories(input: ListMemoriesInput): Promise<MemoryRecord[]>;
202
- /**
203
- * Retrieve a broad relevance-ranked candidate window for automatic recall.
204
- * Prompt admission remains owned by the recall boundary.
205
- */
206
- recallMemories(input: SearchMemoriesInput): Promise<MemoryRecord[]>;
207
- /** Search active memories visible in the current runtime context. */
208
- searchMemories(input: SearchMemoriesInput): Promise<MemoryRecord[]>;
209
- }
210
- /** Parse one SQL row into the public memory projection. */
211
- export declare function parseMemoryRow(row: unknown): MemoryRecord;
212
- /** Build the active-row predicate for already-authorized memory scopes. */
213
- export declare function activeVisiblePredicate(args: {
214
- nowMs: number;
215
- scopes: ResolvedMemoryScope[];
216
- }): SQL | undefined;
217
- /**
218
- * Archive a bounded batch of expired active rows and remove their derived vectors.
219
- */
220
- export declare function archiveExpiredMemoryBatch(args: {
221
- db: MemoryDb;
222
- idempotencyKey?: string;
223
- limit?: number;
224
- nowMs: number;
225
- scopes: ResolvedMemoryScope[];
226
- }): Promise<ArchiveExpiredMemoriesResult>;
227
- /** Create a context-bound SQL-backed store for explicit memory operations. */
228
- export declare function createMemoryStore(db: MemoryDb, context: MemoryRuntimeContext, options?: MemoryStoreOptions): MemoryStore;
229
- export {};
package/dist/tools.d.ts DELETED
@@ -1,164 +0,0 @@
1
- import { type Source, type Actor, type Identity, type User } from "@sentry/junior-plugin-api";
2
- import { type MemoryEmbeddingProvider, type MemoryDb, type MemorySupersessionDecider } from "./store";
3
- import { type MemoryAgent } from "./agent";
4
- export type MemoryReviewer = Pick<MemoryAgent, "reviewCreateRequest">;
5
- /** Runtime-owned context used to bind memory tools to visible scopes. */
6
- export interface MemoryToolContext {
7
- agent: MemoryReviewer;
8
- conversationId?: string;
9
- db: MemoryDb;
10
- embedder?: MemoryEmbeddingProvider;
11
- locationId?: string;
12
- actor?: Actor;
13
- source: Source;
14
- users: {
15
- resolveActor(): Promise<{
16
- identity: Identity;
17
- user?: User;
18
- } | undefined>;
19
- };
20
- userText?: string;
21
- }
22
- export interface MemoryCreateToolContext extends MemoryToolContext {
23
- supersessionDecider?: MemorySupersessionDecider;
24
- }
25
- /** Create a tool that submits an explicit memory candidate for storage. */
26
- export declare function createMemoryCreateTool(context: MemoryCreateToolContext): import("@sentry/junior-plugin-api").PluginToolDefinition<{
27
- content: string;
28
- expires_at?: string | undefined;
29
- }, {
30
- [x: string]: unknown;
31
- target: string;
32
- created: boolean;
33
- memory: {
34
- id: string;
35
- content: string;
36
- createdAtMs: number;
37
- observedAtMs: number;
38
- expiresAtMs?: number | undefined;
39
- };
40
- truncated?: boolean | undefined;
41
- continuation?: {
42
- arguments: Record<string, unknown>;
43
- reason?: string | undefined;
44
- } | undefined;
45
- }, {
46
- [x: string]: unknown;
47
- target: string;
48
- created: boolean;
49
- memory: {
50
- id: string;
51
- content: string;
52
- createdAtMs: number;
53
- observedAtMs: number;
54
- expiresAtMs?: number | undefined;
55
- };
56
- truncated?: boolean | undefined;
57
- continuation?: {
58
- arguments: Record<string, unknown>;
59
- reason?: string | undefined;
60
- } | undefined;
61
- }>;
62
- /** Create a tool that archives a visible memory in the active context. */
63
- export declare function createMemoryRemoveTool(context: MemoryToolContext): import("@sentry/junior-plugin-api").PluginToolDefinition<{
64
- id: string;
65
- }, {
66
- [x: string]: unknown;
67
- target: string;
68
- memory: {
69
- id: string;
70
- content: string;
71
- createdAtMs: number;
72
- observedAtMs: number;
73
- expiresAtMs?: number | undefined;
74
- };
75
- truncated?: boolean | undefined;
76
- continuation?: {
77
- arguments: Record<string, unknown>;
78
- reason?: string | undefined;
79
- } | undefined;
80
- }, {
81
- [x: string]: unknown;
82
- target: string;
83
- memory: {
84
- id: string;
85
- content: string;
86
- createdAtMs: number;
87
- observedAtMs: number;
88
- expiresAtMs?: number | undefined;
89
- };
90
- truncated?: boolean | undefined;
91
- continuation?: {
92
- arguments: Record<string, unknown>;
93
- reason?: string | undefined;
94
- } | undefined;
95
- }>;
96
- /** Create a tool that lists visible active memories in the active context. */
97
- export declare function createMemoryListTool(context: MemoryToolContext): import("@sentry/junior-plugin-api").PluginToolDefinition<{
98
- limit?: number | undefined;
99
- }, {
100
- [x: string]: unknown;
101
- target: string;
102
- memories: {
103
- id: string;
104
- content: string;
105
- createdAtMs: number;
106
- observedAtMs: number;
107
- expiresAtMs?: number | undefined;
108
- }[];
109
- truncated?: boolean | undefined;
110
- continuation?: {
111
- arguments: Record<string, unknown>;
112
- reason?: string | undefined;
113
- } | undefined;
114
- }, {
115
- [x: string]: unknown;
116
- target: string;
117
- memories: {
118
- id: string;
119
- content: string;
120
- createdAtMs: number;
121
- observedAtMs: number;
122
- expiresAtMs?: number | undefined;
123
- }[];
124
- truncated?: boolean | undefined;
125
- continuation?: {
126
- arguments: Record<string, unknown>;
127
- reason?: string | undefined;
128
- } | undefined;
129
- }>;
130
- /** Create a tool that searches visible active memories in the active context. */
131
- export declare function createMemorySearchTool(context: MemoryToolContext): import("@sentry/junior-plugin-api").PluginToolDefinition<{
132
- query: string;
133
- limit?: number | undefined;
134
- }, {
135
- [x: string]: unknown;
136
- target: string;
137
- memories: {
138
- id: string;
139
- content: string;
140
- createdAtMs: number;
141
- observedAtMs: number;
142
- expiresAtMs?: number | undefined;
143
- }[];
144
- truncated?: boolean | undefined;
145
- continuation?: {
146
- arguments: Record<string, unknown>;
147
- reason?: string | undefined;
148
- } | undefined;
149
- }, {
150
- [x: string]: unknown;
151
- target: string;
152
- memories: {
153
- id: string;
154
- content: string;
155
- createdAtMs: number;
156
- observedAtMs: number;
157
- expiresAtMs?: number | undefined;
158
- }[];
159
- truncated?: boolean | undefined;
160
- continuation?: {
161
- arguments: Record<string, unknown>;
162
- reason?: string | undefined;
163
- } | undefined;
164
- }>;
package/dist/types.d.ts DELETED
@@ -1,78 +0,0 @@
1
- import { z } from "zod";
2
- export declare const MEMORY_KINDS: readonly ["preference", "procedure", "knowledge"];
3
- export declare const MEMORY_SCOPES: readonly ["private", "public"];
4
- export declare const MEMORY_SUBJECT_TYPES: readonly ["user", "conversation", "general"];
5
- export declare const MEMORY_SOURCE_PLATFORMS: readonly ["slack", "local", "web"];
6
- export declare const MEMORY_EMBEDDING_METRICS: readonly ["cosine"];
7
- export declare const MEMORY_EMBEDDING_DIMENSIONS = 1536;
8
- export type MemoryKind = (typeof MEMORY_KINDS)[number];
9
- export type MemoryScope = (typeof MEMORY_SCOPES)[number];
10
- export type MemorySubjectType = (typeof MEMORY_SUBJECT_TYPES)[number];
11
- export type MemorySourcePlatform = (typeof MEMORY_SOURCE_PLATFORMS)[number];
12
- export type MemoryEmbeddingMetric = (typeof MEMORY_EMBEDDING_METRICS)[number];
13
- /** Host data used to set memory access, subject, and source. */
14
- export declare const memoryRuntimeContextSchema: z.ZodObject<{
15
- conversationId: z.ZodOptional<z.ZodString>;
16
- locationId: z.ZodOptional<z.ZodString>;
17
- actor: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
18
- platform: z.ZodLiteral<"slack">;
19
- teamId: z.ZodString;
20
- email: z.ZodOptional<z.ZodString>;
21
- fullName: z.ZodOptional<z.ZodString>;
22
- userId: z.ZodString;
23
- userName: z.ZodOptional<z.ZodString>;
24
- }, z.core.$strict>, z.ZodObject<{
25
- platform: z.ZodLiteral<"local">;
26
- email: z.ZodOptional<z.ZodString>;
27
- fullName: z.ZodOptional<z.ZodString>;
28
- userId: z.ZodString;
29
- userName: z.ZodOptional<z.ZodString>;
30
- }, z.core.$strict>, z.ZodObject<{
31
- platform: z.ZodLiteral<"web">;
32
- email: z.ZodOptional<z.ZodString>;
33
- fullName: z.ZodOptional<z.ZodString>;
34
- userId: z.ZodString;
35
- userName: z.ZodOptional<z.ZodString>;
36
- }, z.core.$strict>, z.ZodObject<{
37
- platform: z.ZodLiteral<"system">;
38
- name: z.ZodString;
39
- }, z.core.$strict>], "platform">>;
40
- source: z.ZodPreprocess<z.ZodDiscriminatedUnion<[z.ZodObject<{
41
- kind: z.ZodLiteral<"slack">;
42
- teamId: z.ZodString;
43
- channelId: z.ZodString;
44
- visibility: z.ZodEnum<{
45
- public: "public";
46
- private: "private";
47
- }>;
48
- messageTs: z.ZodOptional<z.ZodString>;
49
- threadTs: z.ZodOptional<z.ZodString>;
50
- }, z.core.$strict>, z.ZodObject<{
51
- kind: z.ZodLiteral<"local">;
52
- visibility: z.ZodLiteral<"private">;
53
- conversationId: z.ZodString;
54
- }, z.core.$strict>, z.ZodObject<{
55
- kind: z.ZodLiteral<"web">;
56
- visibility: z.ZodEnum<{
57
- public: "public";
58
- private: "private";
59
- }>;
60
- conversationId: z.ZodString;
61
- }, z.core.$strict>, z.ZodObject<{
62
- kind: z.ZodLiteral<"resource_event">;
63
- eventKey: z.ZodString;
64
- eventType: z.ZodString;
65
- identifier: z.ZodString;
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">;
75
- }, z.core.$strict>], "kind">, unknown>;
76
- userId: z.ZodOptional<z.ZodString>;
77
- }, z.core.$strict>;
78
- export type MemoryRuntimeContext = z.output<typeof memoryRuntimeContextSchema>;
@@ -1,4 +0,0 @@
1
- /** Render memory in Junior's User page format. */
2
- import type { PluginUserPageDefinition } from "@sentry/junior-plugin-api";
3
- /** Create the interactive Memories dashboard page. */
4
- export declare function createMemoryUserPage(): PluginUserPageDefinition;
package/dist/viewer.d.ts DELETED
@@ -1,91 +0,0 @@
1
- import { z } from "zod";
2
- import { type MemoryDb, type MemoryRecord } from "./store";
3
- import { type MemorySourcePlatform } from "./types";
4
- declare const memoryVisibilitySchema: z.ZodEnum<{
5
- public: "public";
6
- private: "private";
7
- }>;
8
- declare const pageInputSchema: z.ZodObject<{
9
- cursor: z.ZodOptional<z.ZodString>;
10
- kind: z.ZodOptional<z.ZodEnum<{
11
- preference: "preference";
12
- procedure: "procedure";
13
- knowledge: "knowledge";
14
- }>>;
15
- limit: z.ZodNumber;
16
- origin: z.ZodOptional<z.ZodEnum<{
17
- automatic: "automatic";
18
- explicit: "explicit";
19
- }>>;
20
- query: z.ZodOptional<z.ZodString>;
21
- visibility: z.ZodOptional<z.ZodEnum<{
22
- public: "public";
23
- private: "private";
24
- }>>;
25
- }, z.core.$strict>;
26
- /** Access label returned by dashboard and REST memory views. */
27
- export type MemoryVisibility = z.output<typeof memoryVisibilitySchema>;
28
- /** Memory fields returned to an authenticated User. */
29
- export type MemoryView = MemoryRecord & {
30
- origin: "automatic" | "explicit" | "other";
31
- sourcePlatform: MemorySourcePlatform;
32
- visibility: MemoryVisibility;
33
- };
34
- interface MemoryPage {
35
- memories: MemoryView[];
36
- nextCursor?: string;
37
- }
38
- type MemoryPageInput = z.output<typeof pageInputSchema>;
39
- /** Expected error for a malformed or mismatched page cursor. */
40
- export declare class InvalidMemoryCursorError extends Error {
41
- constructor();
42
- }
43
- /** Expected error when the current User cannot access a memory. */
44
- export declare class MemoryNotFoundError extends Error {
45
- constructor();
46
- }
47
- /** Archive one active private memory owned by the authenticated User. */
48
- export declare function archiveMemory(db: MemoryDb, userId: string, id: string): Promise<{
49
- content: string;
50
- createdAtMs: number;
51
- id: string;
52
- observedAtMs: number;
53
- scope: "public" | "private";
54
- subjectType: "user" | "conversation" | "general";
55
- kind: "preference" | "procedure" | "knowledge";
56
- archivedAtMs?: number | undefined;
57
- archiveReason?: string | undefined;
58
- expiresAtMs?: number | undefined;
59
- supersededAtMs?: number | undefined;
60
- supersededById?: string | undefined;
61
- }>;
62
- /** Read one active memory visible to the authenticated User. */
63
- export declare function getMemory(db: MemoryDb, userId: string, id: string): Promise<MemoryView>;
64
- /** List one stable page of active memory visible to the authenticated User. */
65
- export declare function listMemories(db: MemoryDb, userId: string, input: MemoryPageInput): Promise<MemoryPage>;
66
- /** Summarize active memory visible to the authenticated User. */
67
- export declare function getMemoryStats(db: MemoryDb, userId: string): Promise<{
68
- active: number;
69
- automatic: number;
70
- createdThirtyDays: number;
71
- embedded: number;
72
- explicit: number;
73
- knowledge: number;
74
- private: number;
75
- preference: number;
76
- procedure: number;
77
- public: number;
78
- }>;
79
- /** Read daily memory creation totals visible to the authenticated User in UTC. */
80
- export declare function getMemoryTimeline(db: MemoryDb, userId: string, days: number): Promise<{
81
- date: string;
82
- private: number;
83
- public: number;
84
- }[]>;
85
- /** Read hourly memory creation totals visible to the authenticated User in UTC. */
86
- export declare function getMemoryTimelineHours(db: MemoryDb, userId: string, hours?: number): Promise<{
87
- date: string;
88
- private: number;
89
- public: number;
90
- }[]>;
91
- export {};