@plur-ai/core 0.1.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.
@@ -0,0 +1,600 @@
1
+ import { z } from 'zod';
2
+
3
+ declare const KnowledgeAnchorSchema: z.ZodObject<{
4
+ path: z.ZodString;
5
+ relevance: z.ZodDefault<z.ZodEnum<["primary", "supporting", "example"]>>;
6
+ snippet: z.ZodOptional<z.ZodString>;
7
+ snippet_extracted_at: z.ZodOptional<z.ZodString>;
8
+ }, "strip", z.ZodTypeAny, {
9
+ path: string;
10
+ relevance: "primary" | "supporting" | "example";
11
+ snippet?: string | undefined;
12
+ snippet_extracted_at?: string | undefined;
13
+ }, {
14
+ path: string;
15
+ relevance?: "primary" | "supporting" | "example" | undefined;
16
+ snippet?: string | undefined;
17
+ snippet_extracted_at?: string | undefined;
18
+ }>;
19
+ declare const AssociationSchema: z.ZodObject<{
20
+ target_type: z.ZodEnum<["engram", "document"]>;
21
+ target: z.ZodString;
22
+ strength: z.ZodNumber;
23
+ type: z.ZodEnum<["semantic", "temporal", "causal", "co_accessed"]>;
24
+ updated_at: z.ZodOptional<z.ZodString>;
25
+ }, "strip", z.ZodTypeAny, {
26
+ type: "semantic" | "temporal" | "causal" | "co_accessed";
27
+ target_type: "engram" | "document";
28
+ target: string;
29
+ strength: number;
30
+ updated_at?: string | undefined;
31
+ }, {
32
+ type: "semantic" | "temporal" | "causal" | "co_accessed";
33
+ target_type: "engram" | "document";
34
+ target: string;
35
+ strength: number;
36
+ updated_at?: string | undefined;
37
+ }>;
38
+ declare const EngramSchema: z.ZodObject<{
39
+ id: z.ZodString;
40
+ version: z.ZodDefault<z.ZodNumber>;
41
+ status: z.ZodEnum<["active", "dormant", "retired", "candidate"]>;
42
+ consolidated: z.ZodDefault<z.ZodBoolean>;
43
+ type: z.ZodEnum<["behavioral", "terminological", "procedural", "architectural"]>;
44
+ scope: z.ZodString;
45
+ visibility: z.ZodDefault<z.ZodEnum<["private", "public", "template"]>>;
46
+ statement: z.ZodString;
47
+ rationale: z.ZodOptional<z.ZodString>;
48
+ contraindications: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
49
+ source_patterns: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
50
+ derivation_count: z.ZodDefault<z.ZodNumber>;
51
+ knowledge_type: z.ZodOptional<z.ZodObject<{
52
+ memory_class: z.ZodEnum<["semantic", "episodic", "procedural", "metacognitive"]>;
53
+ cognitive_level: z.ZodEnum<["remember", "understand", "apply", "analyze", "evaluate", "create"]>;
54
+ }, "strip", z.ZodTypeAny, {
55
+ memory_class: "procedural" | "semantic" | "episodic" | "metacognitive";
56
+ cognitive_level: "remember" | "understand" | "apply" | "analyze" | "evaluate" | "create";
57
+ }, {
58
+ memory_class: "procedural" | "semantic" | "episodic" | "metacognitive";
59
+ cognitive_level: "remember" | "understand" | "apply" | "analyze" | "evaluate" | "create";
60
+ }>>;
61
+ domain: z.ZodOptional<z.ZodString>;
62
+ relations: z.ZodOptional<z.ZodObject<{
63
+ broader: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
64
+ narrower: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
65
+ related: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
66
+ conflicts: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
67
+ }, "strip", z.ZodTypeAny, {
68
+ broader: string[];
69
+ narrower: string[];
70
+ related: string[];
71
+ conflicts: string[];
72
+ }, {
73
+ broader?: string[] | undefined;
74
+ narrower?: string[] | undefined;
75
+ related?: string[] | undefined;
76
+ conflicts?: string[] | undefined;
77
+ }>>;
78
+ activation: z.ZodDefault<z.ZodObject<{
79
+ retrieval_strength: z.ZodNumber;
80
+ storage_strength: z.ZodNumber;
81
+ frequency: z.ZodNumber;
82
+ last_accessed: z.ZodString;
83
+ }, "strip", z.ZodTypeAny, {
84
+ retrieval_strength: number;
85
+ storage_strength: number;
86
+ frequency: number;
87
+ last_accessed: string;
88
+ }, {
89
+ retrieval_strength: number;
90
+ storage_strength: number;
91
+ frequency: number;
92
+ last_accessed: string;
93
+ }>>;
94
+ provenance: z.ZodOptional<z.ZodObject<{
95
+ origin: z.ZodString;
96
+ chain: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
97
+ signature: z.ZodDefault<z.ZodNullable<z.ZodString>>;
98
+ license: z.ZodDefault<z.ZodString>;
99
+ }, "strip", z.ZodTypeAny, {
100
+ origin: string;
101
+ chain: string[];
102
+ signature: string | null;
103
+ license: string;
104
+ }, {
105
+ origin: string;
106
+ chain?: string[] | undefined;
107
+ signature?: string | null | undefined;
108
+ license?: string | undefined;
109
+ }>>;
110
+ feedback_signals: z.ZodDefault<z.ZodObject<{
111
+ positive: z.ZodDefault<z.ZodNumber>;
112
+ negative: z.ZodDefault<z.ZodNumber>;
113
+ neutral: z.ZodDefault<z.ZodNumber>;
114
+ }, "strip", z.ZodTypeAny, {
115
+ positive: number;
116
+ negative: number;
117
+ neutral: number;
118
+ }, {
119
+ positive?: number | undefined;
120
+ negative?: number | undefined;
121
+ neutral?: number | undefined;
122
+ }>>;
123
+ knowledge_anchors: z.ZodDefault<z.ZodArray<z.ZodObject<{
124
+ path: z.ZodString;
125
+ relevance: z.ZodDefault<z.ZodEnum<["primary", "supporting", "example"]>>;
126
+ snippet: z.ZodOptional<z.ZodString>;
127
+ snippet_extracted_at: z.ZodOptional<z.ZodString>;
128
+ }, "strip", z.ZodTypeAny, {
129
+ path: string;
130
+ relevance: "primary" | "supporting" | "example";
131
+ snippet?: string | undefined;
132
+ snippet_extracted_at?: string | undefined;
133
+ }, {
134
+ path: string;
135
+ relevance?: "primary" | "supporting" | "example" | undefined;
136
+ snippet?: string | undefined;
137
+ snippet_extracted_at?: string | undefined;
138
+ }>, "many">>;
139
+ associations: z.ZodDefault<z.ZodArray<z.ZodObject<{
140
+ target_type: z.ZodEnum<["engram", "document"]>;
141
+ target: z.ZodString;
142
+ strength: z.ZodNumber;
143
+ type: z.ZodEnum<["semantic", "temporal", "causal", "co_accessed"]>;
144
+ updated_at: z.ZodOptional<z.ZodString>;
145
+ }, "strip", z.ZodTypeAny, {
146
+ type: "semantic" | "temporal" | "causal" | "co_accessed";
147
+ target_type: "engram" | "document";
148
+ target: string;
149
+ strength: number;
150
+ updated_at?: string | undefined;
151
+ }, {
152
+ type: "semantic" | "temporal" | "causal" | "co_accessed";
153
+ target_type: "engram" | "document";
154
+ target: string;
155
+ strength: number;
156
+ updated_at?: string | undefined;
157
+ }>, "many">>;
158
+ dual_coding: z.ZodOptional<z.ZodEffects<z.ZodObject<{
159
+ example: z.ZodOptional<z.ZodString>;
160
+ analogy: z.ZodOptional<z.ZodString>;
161
+ }, "strip", z.ZodTypeAny, {
162
+ example?: string | undefined;
163
+ analogy?: string | undefined;
164
+ }, {
165
+ example?: string | undefined;
166
+ analogy?: string | undefined;
167
+ }>, {
168
+ example?: string | undefined;
169
+ analogy?: string | undefined;
170
+ }, {
171
+ example?: string | undefined;
172
+ analogy?: string | undefined;
173
+ }>>;
174
+ tags: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
175
+ pack: z.ZodDefault<z.ZodNullable<z.ZodString>>;
176
+ abstract: z.ZodDefault<z.ZodNullable<z.ZodString>>;
177
+ derived_from: z.ZodDefault<z.ZodNullable<z.ZodString>>;
178
+ }, "strip", z.ZodTypeAny, {
179
+ type: "behavioral" | "architectural" | "procedural" | "terminological";
180
+ status: "active" | "dormant" | "retired" | "candidate";
181
+ id: string;
182
+ version: number;
183
+ consolidated: boolean;
184
+ scope: string;
185
+ visibility: "private" | "public" | "template";
186
+ statement: string;
187
+ derivation_count: number;
188
+ activation: {
189
+ retrieval_strength: number;
190
+ storage_strength: number;
191
+ frequency: number;
192
+ last_accessed: string;
193
+ };
194
+ feedback_signals: {
195
+ positive: number;
196
+ negative: number;
197
+ neutral: number;
198
+ };
199
+ knowledge_anchors: {
200
+ path: string;
201
+ relevance: "primary" | "supporting" | "example";
202
+ snippet?: string | undefined;
203
+ snippet_extracted_at?: string | undefined;
204
+ }[];
205
+ associations: {
206
+ type: "semantic" | "temporal" | "causal" | "co_accessed";
207
+ target_type: "engram" | "document";
208
+ target: string;
209
+ strength: number;
210
+ updated_at?: string | undefined;
211
+ }[];
212
+ tags: string[];
213
+ pack: string | null;
214
+ abstract: string | null;
215
+ derived_from: string | null;
216
+ rationale?: string | undefined;
217
+ contraindications?: string[] | undefined;
218
+ source_patterns?: string[] | undefined;
219
+ knowledge_type?: {
220
+ memory_class: "procedural" | "semantic" | "episodic" | "metacognitive";
221
+ cognitive_level: "remember" | "understand" | "apply" | "analyze" | "evaluate" | "create";
222
+ } | undefined;
223
+ domain?: string | undefined;
224
+ relations?: {
225
+ broader: string[];
226
+ narrower: string[];
227
+ related: string[];
228
+ conflicts: string[];
229
+ } | undefined;
230
+ provenance?: {
231
+ origin: string;
232
+ chain: string[];
233
+ signature: string | null;
234
+ license: string;
235
+ } | undefined;
236
+ dual_coding?: {
237
+ example?: string | undefined;
238
+ analogy?: string | undefined;
239
+ } | undefined;
240
+ }, {
241
+ type: "behavioral" | "architectural" | "procedural" | "terminological";
242
+ status: "active" | "dormant" | "retired" | "candidate";
243
+ id: string;
244
+ scope: string;
245
+ statement: string;
246
+ version?: number | undefined;
247
+ consolidated?: boolean | undefined;
248
+ visibility?: "private" | "public" | "template" | undefined;
249
+ rationale?: string | undefined;
250
+ contraindications?: string[] | undefined;
251
+ source_patterns?: string[] | undefined;
252
+ derivation_count?: number | undefined;
253
+ knowledge_type?: {
254
+ memory_class: "procedural" | "semantic" | "episodic" | "metacognitive";
255
+ cognitive_level: "remember" | "understand" | "apply" | "analyze" | "evaluate" | "create";
256
+ } | undefined;
257
+ domain?: string | undefined;
258
+ relations?: {
259
+ broader?: string[] | undefined;
260
+ narrower?: string[] | undefined;
261
+ related?: string[] | undefined;
262
+ conflicts?: string[] | undefined;
263
+ } | undefined;
264
+ activation?: {
265
+ retrieval_strength: number;
266
+ storage_strength: number;
267
+ frequency: number;
268
+ last_accessed: string;
269
+ } | undefined;
270
+ provenance?: {
271
+ origin: string;
272
+ chain?: string[] | undefined;
273
+ signature?: string | null | undefined;
274
+ license?: string | undefined;
275
+ } | undefined;
276
+ feedback_signals?: {
277
+ positive?: number | undefined;
278
+ negative?: number | undefined;
279
+ neutral?: number | undefined;
280
+ } | undefined;
281
+ knowledge_anchors?: {
282
+ path: string;
283
+ relevance?: "primary" | "supporting" | "example" | undefined;
284
+ snippet?: string | undefined;
285
+ snippet_extracted_at?: string | undefined;
286
+ }[] | undefined;
287
+ associations?: {
288
+ type: "semantic" | "temporal" | "causal" | "co_accessed";
289
+ target_type: "engram" | "document";
290
+ target: string;
291
+ strength: number;
292
+ updated_at?: string | undefined;
293
+ }[] | undefined;
294
+ dual_coding?: {
295
+ example?: string | undefined;
296
+ analogy?: string | undefined;
297
+ } | undefined;
298
+ tags?: string[] | undefined;
299
+ pack?: string | null | undefined;
300
+ abstract?: string | null | undefined;
301
+ derived_from?: string | null | undefined;
302
+ }>;
303
+ type Engram = z.infer<typeof EngramSchema>;
304
+ type KnowledgeAnchor = z.infer<typeof KnowledgeAnchorSchema>;
305
+ type Association = z.infer<typeof AssociationSchema>;
306
+
307
+ declare const PackManifestSchema: z.ZodObject<{
308
+ name: z.ZodString;
309
+ version: z.ZodString;
310
+ description: z.ZodOptional<z.ZodString>;
311
+ creator: z.ZodOptional<z.ZodString>;
312
+ license: z.ZodDefault<z.ZodString>;
313
+ tags: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
314
+ metadata: z.ZodOptional<z.ZodObject<{
315
+ id: z.ZodOptional<z.ZodString>;
316
+ injection_policy: z.ZodDefault<z.ZodEnum<["on_match", "on_request", "always"]>>;
317
+ match_terms: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
318
+ domain: z.ZodOptional<z.ZodString>;
319
+ engram_count: z.ZodOptional<z.ZodNumber>;
320
+ }, "strip", z.ZodTypeAny, {
321
+ injection_policy: "on_match" | "on_request" | "always";
322
+ match_terms: string[];
323
+ id?: string | undefined;
324
+ domain?: string | undefined;
325
+ engram_count?: number | undefined;
326
+ }, {
327
+ id?: string | undefined;
328
+ domain?: string | undefined;
329
+ injection_policy?: "on_match" | "on_request" | "always" | undefined;
330
+ match_terms?: string[] | undefined;
331
+ engram_count?: number | undefined;
332
+ }>>;
333
+ 'x-datacore': z.ZodOptional<z.ZodObject<{
334
+ id: z.ZodString;
335
+ injection_policy: z.ZodEnum<["on_match", "on_request"]>;
336
+ match_terms: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
337
+ domain: z.ZodOptional<z.ZodString>;
338
+ engram_count: z.ZodNumber;
339
+ }, "strip", z.ZodTypeAny, {
340
+ id: string;
341
+ injection_policy: "on_match" | "on_request";
342
+ match_terms: string[];
343
+ engram_count: number;
344
+ domain?: string | undefined;
345
+ }, {
346
+ id: string;
347
+ injection_policy: "on_match" | "on_request";
348
+ engram_count: number;
349
+ domain?: string | undefined;
350
+ match_terms?: string[] | undefined;
351
+ }>>;
352
+ }, "strip", z.ZodTypeAny, {
353
+ version: string;
354
+ license: string;
355
+ tags: string[];
356
+ name: string;
357
+ description?: string | undefined;
358
+ creator?: string | undefined;
359
+ metadata?: {
360
+ injection_policy: "on_match" | "on_request" | "always";
361
+ match_terms: string[];
362
+ id?: string | undefined;
363
+ domain?: string | undefined;
364
+ engram_count?: number | undefined;
365
+ } | undefined;
366
+ 'x-datacore'?: {
367
+ id: string;
368
+ injection_policy: "on_match" | "on_request";
369
+ match_terms: string[];
370
+ engram_count: number;
371
+ domain?: string | undefined;
372
+ } | undefined;
373
+ }, {
374
+ version: string;
375
+ name: string;
376
+ license?: string | undefined;
377
+ tags?: string[] | undefined;
378
+ description?: string | undefined;
379
+ creator?: string | undefined;
380
+ metadata?: {
381
+ id?: string | undefined;
382
+ domain?: string | undefined;
383
+ injection_policy?: "on_match" | "on_request" | "always" | undefined;
384
+ match_terms?: string[] | undefined;
385
+ engram_count?: number | undefined;
386
+ } | undefined;
387
+ 'x-datacore'?: {
388
+ id: string;
389
+ injection_policy: "on_match" | "on_request";
390
+ engram_count: number;
391
+ domain?: string | undefined;
392
+ match_terms?: string[] | undefined;
393
+ } | undefined;
394
+ }>;
395
+ type PackManifest = z.infer<typeof PackManifestSchema>;
396
+
397
+ interface PackInfo {
398
+ name: string;
399
+ path: string;
400
+ engram_count: number;
401
+ manifest?: PackManifest;
402
+ }
403
+ declare function listPacks(packsDir: string): PackInfo[];
404
+
405
+ declare const EpisodeSchema: z.ZodObject<{
406
+ id: z.ZodString;
407
+ summary: z.ZodString;
408
+ agent: z.ZodOptional<z.ZodString>;
409
+ channel: z.ZodOptional<z.ZodString>;
410
+ session_id: z.ZodOptional<z.ZodString>;
411
+ tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
412
+ timestamp: z.ZodString;
413
+ }, "strip", z.ZodTypeAny, {
414
+ id: string;
415
+ summary: string;
416
+ timestamp: string;
417
+ tags?: string[] | undefined;
418
+ agent?: string | undefined;
419
+ channel?: string | undefined;
420
+ session_id?: string | undefined;
421
+ }, {
422
+ id: string;
423
+ summary: string;
424
+ timestamp: string;
425
+ tags?: string[] | undefined;
426
+ agent?: string | undefined;
427
+ channel?: string | undefined;
428
+ session_id?: string | undefined;
429
+ }>;
430
+ type Episode = z.infer<typeof EpisodeSchema>;
431
+
432
+ declare const PlurConfigSchema: z.ZodObject<{
433
+ auto_learn: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
434
+ auto_capture: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
435
+ injection_budget: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
436
+ decay_enabled: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
437
+ decay_threshold: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
438
+ packs: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodString, "many">>>;
439
+ injection: z.ZodOptional<z.ZodDefault<z.ZodObject<{
440
+ spread_cap: z.ZodDefault<z.ZodNumber>;
441
+ spread_budget: z.ZodDefault<z.ZodNumber>;
442
+ co_access: z.ZodDefault<z.ZodBoolean>;
443
+ }, "strip", z.ZodTypeAny, {
444
+ spread_cap: number;
445
+ spread_budget: number;
446
+ co_access: boolean;
447
+ }, {
448
+ spread_cap?: number | undefined;
449
+ spread_budget?: number | undefined;
450
+ co_access?: boolean | undefined;
451
+ }>>>;
452
+ }, "strip", z.ZodTypeAny, {
453
+ auto_learn?: boolean | undefined;
454
+ auto_capture?: boolean | undefined;
455
+ injection_budget?: number | undefined;
456
+ decay_enabled?: boolean | undefined;
457
+ decay_threshold?: number | undefined;
458
+ packs?: string[] | undefined;
459
+ injection?: {
460
+ spread_cap: number;
461
+ spread_budget: number;
462
+ co_access: boolean;
463
+ } | undefined;
464
+ }, {
465
+ auto_learn?: boolean | undefined;
466
+ auto_capture?: boolean | undefined;
467
+ injection_budget?: number | undefined;
468
+ decay_enabled?: boolean | undefined;
469
+ decay_threshold?: number | undefined;
470
+ packs?: string[] | undefined;
471
+ injection?: {
472
+ spread_cap?: number | undefined;
473
+ spread_budget?: number | undefined;
474
+ co_access?: boolean | undefined;
475
+ } | undefined;
476
+ }>;
477
+ type PlurConfig = z.infer<typeof PlurConfigSchema>;
478
+
479
+ interface LearnContext {
480
+ type?: 'behavioral' | 'terminological' | 'procedural' | 'architectural';
481
+ scope?: string;
482
+ domain?: string;
483
+ source?: string;
484
+ }
485
+ /**
486
+ * Function that calls an LLM. Model-agnostic — consumer provides this.
487
+ * Takes a prompt, returns the LLM's text response.
488
+ */
489
+ type LlmFunction = (prompt: string) => Promise<string>;
490
+ interface RecallOptions {
491
+ scope?: string;
492
+ domain?: string;
493
+ limit?: number;
494
+ min_strength?: number;
495
+ /** Search mode: 'fast' (BM25, default) or 'agentic' (LLM-assisted semantic search) */
496
+ mode?: 'fast' | 'agentic';
497
+ /** LLM function for agentic mode. Required when mode='agentic'. */
498
+ llm?: LlmFunction;
499
+ }
500
+ interface InjectOptions {
501
+ budget?: number;
502
+ scope?: string;
503
+ boost_recent?: boolean;
504
+ }
505
+ interface InjectionResult {
506
+ directives: string;
507
+ consider: string;
508
+ count: number;
509
+ tokens_used: number;
510
+ }
511
+ interface CaptureContext {
512
+ agent?: string;
513
+ channel?: string;
514
+ session_id?: string;
515
+ tags?: string[];
516
+ }
517
+ interface TimelineQuery {
518
+ since?: Date;
519
+ until?: Date;
520
+ agent?: string;
521
+ channel?: string;
522
+ search?: string;
523
+ }
524
+
525
+ interface IngestOptions {
526
+ source?: string;
527
+ extract_only?: boolean;
528
+ scope?: string;
529
+ domain?: string;
530
+ }
531
+ interface IngestCandidate {
532
+ statement: string;
533
+ type: 'behavioral' | 'architectural' | 'procedural';
534
+ source?: string;
535
+ }
536
+ interface StatusResult {
537
+ engram_count: number;
538
+ episode_count: number;
539
+ pack_count: number;
540
+ storage_root: string;
541
+ config: PlurConfig;
542
+ }
543
+ declare class Plur {
544
+ private paths;
545
+ private config;
546
+ constructor(options?: {
547
+ path?: string;
548
+ });
549
+ /** Create engram, detect conflicts, save. Returns the created engram. */
550
+ learn(statement: string, context?: LearnContext): Engram;
551
+ /**
552
+ * Search engrams, filter by scope/domain/strength, reactivate accessed.
553
+ * Supports two modes:
554
+ * - 'fast' (default): BM25 keyword search, instant, no API calls
555
+ * - 'agentic': LLM-assisted semantic search, higher accuracy, requires llm function
556
+ */
557
+ /** Search engrams using fast BM25 keyword matching. Sync, no API calls. */
558
+ recall(query: string, options?: Omit<RecallOptions, 'mode' | 'llm'>): Engram[];
559
+ /** Search engrams using LLM-assisted semantic filtering. Async, requires llm function. */
560
+ recallAsync(query: string, options: RecallOptions & {
561
+ llm: LlmFunction;
562
+ }): Promise<Engram[]>;
563
+ /** Filter engrams by scope/domain/strength (shared by both modes) */
564
+ private _filterEngrams;
565
+ /** Reactivate accessed engrams (bump retrieval strength, frequency, last_accessed) */
566
+ private _reactivateResults;
567
+ /** Scored injection within token budget. Returns formatted strings. */
568
+ inject(task: string, options?: InjectOptions): InjectionResult;
569
+ /** Update feedback_signals and adjust retrieval_strength. */
570
+ feedback(id: string, signal: 'positive' | 'negative' | 'neutral'): void;
571
+ /** Set engram status to 'retired'. */
572
+ forget(id: string, reason?: string): void;
573
+ /** Capture an episodic memory. */
574
+ capture(summary: string, context?: CaptureContext): Episode;
575
+ /** Query the episode timeline. */
576
+ timeline(query?: TimelineQuery): Episode[];
577
+ /** Rule-based extraction of engram candidates from content. */
578
+ ingest(content: string, options?: IngestOptions): IngestCandidate[];
579
+ /** Install a pack from a source path. */
580
+ installPack(source: string): {
581
+ installed: number;
582
+ name: string;
583
+ };
584
+ /** Export engrams as a shareable pack. */
585
+ exportPack(engrams: Engram[], outputDir: string, manifest: {
586
+ name: string;
587
+ version: string;
588
+ description?: string;
589
+ creator?: string;
590
+ }): {
591
+ path: string;
592
+ engram_count: number;
593
+ };
594
+ /** List all installed packs. */
595
+ listPacks(): ReturnType<typeof listPacks>;
596
+ /** Return system health info. */
597
+ status(): StatusResult;
598
+ }
599
+
600
+ export { type Association, type CaptureContext, type Engram, type Episode, type IngestCandidate, type IngestOptions, type InjectOptions, type InjectionResult, type KnowledgeAnchor, type LearnContext, type LlmFunction, type PackManifest, Plur, type PlurConfig, type RecallOptions, type StatusResult, type TimelineQuery };