@chude/memory 4.0.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.
Files changed (184) hide show
  1. package/README.md +294 -0
  2. package/dist/application/index.d.ts +6 -0
  3. package/dist/application/services/ambient-context-service.d.ts +90 -0
  4. package/dist/application/services/backfill-service.d.ts +71 -0
  5. package/dist/application/services/budget-allocator.d.ts +57 -0
  6. package/dist/application/services/embedding-service.d.ts +131 -0
  7. package/dist/application/services/export-service.d.ts +225 -0
  8. package/dist/application/services/extraction-pipeline.d.ts +50 -0
  9. package/dist/application/services/friction-service.d.ts +148 -0
  10. package/dist/application/services/fts-sanitizer.d.ts +25 -0
  11. package/dist/application/services/index.d.ts +34 -0
  12. package/dist/application/services/llm-extractor.d.ts +96 -0
  13. package/dist/application/services/memory-file-sync-service.d.ts +58 -0
  14. package/dist/application/services/pattern-extractor.d.ts +95 -0
  15. package/dist/application/services/recovery-service.d.ts +81 -0
  16. package/dist/application/services/rrf-fusion.d.ts +53 -0
  17. package/dist/application/services/smart-context-service.d.ts +126 -0
  18. package/dist/application/services/sync-service.d.ts +157 -0
  19. package/dist/application/services/temporal-decay.d.ts +62 -0
  20. package/dist/domain/entities/backfill-state.d.ts +56 -0
  21. package/dist/domain/entities/entity.d.ts +131 -0
  22. package/dist/domain/entities/extraction-state.d.ts +128 -0
  23. package/dist/domain/entities/fact.d.ts +59 -0
  24. package/dist/domain/entities/friction-entry.d.ts +84 -0
  25. package/dist/domain/entities/index.d.ts +15 -0
  26. package/dist/domain/entities/link.d.ts +74 -0
  27. package/dist/domain/entities/memory-file.d.ts +78 -0
  28. package/dist/domain/entities/message.d.ts +70 -0
  29. package/dist/domain/entities/session.d.ts +93 -0
  30. package/dist/domain/entities/tool-use.d.ts +85 -0
  31. package/dist/domain/errors/error-codes.d.ts +37 -0
  32. package/dist/domain/errors/index.d.ts +8 -0
  33. package/dist/domain/errors/memory-error.d.ts +52 -0
  34. package/dist/domain/errors/unknown-error.d.ts +9 -0
  35. package/dist/domain/index.d.ts +11 -0
  36. package/dist/domain/ports/embedding.d.ts +96 -0
  37. package/dist/domain/ports/extraction.d.ts +13 -0
  38. package/dist/domain/ports/index.d.ts +14 -0
  39. package/dist/domain/ports/redactor.d.ts +17 -0
  40. package/dist/domain/ports/repositories.d.ts +658 -0
  41. package/dist/domain/ports/services.d.ts +180 -0
  42. package/dist/domain/ports/signals.d.ts +82 -0
  43. package/dist/domain/ports/sources.d.ts +122 -0
  44. package/dist/domain/ports/types.d.ts +150 -0
  45. package/dist/domain/services/content-extractor.d.ts +61 -0
  46. package/dist/domain/services/index.d.ts +8 -0
  47. package/dist/domain/services/path-decoder.d.ts +56 -0
  48. package/dist/domain/services/query-parser.d.ts +47 -0
  49. package/dist/domain/value-objects/embedding-config.d.ts +56 -0
  50. package/dist/domain/value-objects/embedding-result.d.ts +46 -0
  51. package/dist/domain/value-objects/index.d.ts +10 -0
  52. package/dist/domain/value-objects/project-path.d.ts +92 -0
  53. package/dist/domain/value-objects/search-query.d.ts +30 -0
  54. package/dist/domain/value-objects/search-result.d.ts +92 -0
  55. package/dist/index.d.ts +15 -0
  56. package/dist/index.js +1548 -0
  57. package/dist/infrastructure/database/connection.d.ts +161 -0
  58. package/dist/infrastructure/database/event-log.d.ts +22 -0
  59. package/dist/infrastructure/database/health-checker.d.ts +248 -0
  60. package/dist/infrastructure/database/index.d.ts +11 -0
  61. package/dist/infrastructure/database/repositories/backfill-state-repository.d.ts +19 -0
  62. package/dist/infrastructure/database/repositories/embedding-repository.d.ts +121 -0
  63. package/dist/infrastructure/database/repositories/entity-repository.d.ts +73 -0
  64. package/dist/infrastructure/database/repositories/extraction-log-repository.d.ts +17 -0
  65. package/dist/infrastructure/database/repositories/extraction-state-repository.d.ts +52 -0
  66. package/dist/infrastructure/database/repositories/fact-repository.d.ts +25 -0
  67. package/dist/infrastructure/database/repositories/friction-repository.d.ts +41 -0
  68. package/dist/infrastructure/database/repositories/index.d.ts +17 -0
  69. package/dist/infrastructure/database/repositories/link-repository.d.ts +64 -0
  70. package/dist/infrastructure/database/repositories/memory-file-repository.d.ts +28 -0
  71. package/dist/infrastructure/database/repositories/message-repository.d.ts +87 -0
  72. package/dist/infrastructure/database/repositories/session-repository.d.ts +125 -0
  73. package/dist/infrastructure/database/repositories/tool-use-repository.d.ts +72 -0
  74. package/dist/infrastructure/database/schema.d.ts +203 -0
  75. package/dist/infrastructure/database/services/context-service.d.ts +93 -0
  76. package/dist/infrastructure/database/services/hybrid-search-service.d.ts +156 -0
  77. package/dist/infrastructure/database/services/index.d.ts +10 -0
  78. package/dist/infrastructure/database/services/search-service.d.ts +57 -0
  79. package/dist/infrastructure/database/services/stats-service.d.ts +36 -0
  80. package/dist/infrastructure/embedding/background-embedder.d.ts +125 -0
  81. package/dist/infrastructure/embedding/embedding-provider-factory.d.ts +44 -0
  82. package/dist/infrastructure/embedding/index.d.ts +5 -0
  83. package/dist/infrastructure/embedding/ollama-provider.d.ts +41 -0
  84. package/dist/infrastructure/embedding/openai-provider.d.ts +38 -0
  85. package/dist/infrastructure/embedding/transformers-js-provider.d.ts +34 -0
  86. package/dist/infrastructure/external/index.d.ts +7 -0
  87. package/dist/infrastructure/external/qmd-runner.d.ts +36 -0
  88. package/dist/infrastructure/hooks/auto-memory-writer.d.ts +52 -0
  89. package/dist/infrastructure/hooks/config-manager.d.ts +237 -0
  90. package/dist/infrastructure/hooks/git-syncer.d.ts +44 -0
  91. package/dist/infrastructure/hooks/hook-runner.d.ts +126 -0
  92. package/dist/infrastructure/hooks/index.d.ts +12 -0
  93. package/dist/infrastructure/hooks/log-writer.d.ts +106 -0
  94. package/dist/infrastructure/hooks/settings-manager.d.ts +163 -0
  95. package/dist/infrastructure/hooks/sync-hook-script.d.ts +83 -0
  96. package/dist/infrastructure/hooks/sync-logger-adapter.d.ts +17 -0
  97. package/dist/infrastructure/index.d.ts +11 -0
  98. package/dist/infrastructure/llm/anthropic-extractor.d.ts +20 -0
  99. package/dist/infrastructure/llm/claude-cli-extractor.d.ts +14 -0
  100. package/dist/infrastructure/llm/claude-summary-generator.d.ts +14 -0
  101. package/dist/infrastructure/llm/extraction-helper.d.ts +16 -0
  102. package/dist/infrastructure/llm/ollama-extractor.d.ts +20 -0
  103. package/dist/infrastructure/llm/openai-extractor.d.ts +23 -0
  104. package/dist/infrastructure/migration.d.ts +103 -0
  105. package/dist/infrastructure/parsers/event-classifier.d.ts +111 -0
  106. package/dist/infrastructure/parsers/index.d.ts +8 -0
  107. package/dist/infrastructure/parsers/jsonl-parser.d.ts +25 -0
  108. package/dist/infrastructure/parsers/timestamp.d.ts +18 -0
  109. package/dist/infrastructure/paths.d.ts +129 -0
  110. package/dist/infrastructure/providers/provider-defaults.d.ts +11 -0
  111. package/dist/infrastructure/providers/provider-registry.d.ts +28 -0
  112. package/dist/infrastructure/security/pattern-redactor.d.ts +6 -0
  113. package/dist/infrastructure/signals/adapters.d.ts +27 -0
  114. package/dist/infrastructure/signals/checkpoint-manager.d.ts +83 -0
  115. package/dist/infrastructure/signals/index.d.ts +8 -0
  116. package/dist/infrastructure/signals/signal-handler.d.ts +113 -0
  117. package/dist/infrastructure/sources/index.d.ts +8 -0
  118. package/dist/infrastructure/sources/memory-file-scanner.d.ts +23 -0
  119. package/dist/infrastructure/sources/project-name-resolver.d.ts +67 -0
  120. package/dist/infrastructure/sources/session-source.d.ts +70 -0
  121. package/dist/presentation/cli/command-result.d.ts +10 -0
  122. package/dist/presentation/cli/commands/_helpers/capture-json.d.ts +36 -0
  123. package/dist/presentation/cli/commands/_helpers/deprecation-warning.d.ts +41 -0
  124. package/dist/presentation/cli/commands/backfill.d.ts +56 -0
  125. package/dist/presentation/cli/commands/browse.d.ts +55 -0
  126. package/dist/presentation/cli/commands/completion.d.ts +61 -0
  127. package/dist/presentation/cli/commands/context.d.ts +53 -0
  128. package/dist/presentation/cli/commands/doctor.d.ts +55 -0
  129. package/dist/presentation/cli/commands/export.d.ts +36 -0
  130. package/dist/presentation/cli/commands/extract.d.ts +40 -0
  131. package/dist/presentation/cli/commands/facts.d.ts +17 -0
  132. package/dist/presentation/cli/commands/friction/dashboard.d.ts +18 -0
  133. package/dist/presentation/cli/commands/friction/index.d.ts +12 -0
  134. package/dist/presentation/cli/commands/friction/list.d.ts +12 -0
  135. package/dist/presentation/cli/commands/friction/log.d.ts +12 -0
  136. package/dist/presentation/cli/commands/friction/purge.d.ts +12 -0
  137. package/dist/presentation/cli/commands/friction/resolve.d.ts +12 -0
  138. package/dist/presentation/cli/commands/friction/types.d.ts +86 -0
  139. package/dist/presentation/cli/commands/friction/wontfix.d.ts +12 -0
  140. package/dist/presentation/cli/commands/import.d.ts +38 -0
  141. package/dist/presentation/cli/commands/index.d.ts +51 -0
  142. package/dist/presentation/cli/commands/install.d.ts +67 -0
  143. package/dist/presentation/cli/commands/list.d.ts +61 -0
  144. package/dist/presentation/cli/commands/migrate.d.ts +36 -0
  145. package/dist/presentation/cli/commands/purge.d.ts +100 -0
  146. package/dist/presentation/cli/commands/query.d.ts +51 -0
  147. package/dist/presentation/cli/commands/related.d.ts +47 -0
  148. package/dist/presentation/cli/commands/remote.d.ts +36 -0
  149. package/dist/presentation/cli/commands/search.d.ts +100 -0
  150. package/dist/presentation/cli/commands/show.d.ts +51 -0
  151. package/dist/presentation/cli/commands/stats.d.ts +38 -0
  152. package/dist/presentation/cli/commands/status.d.ts +152 -0
  153. package/dist/presentation/cli/commands/sync/ambient.d.ts +22 -0
  154. package/dist/presentation/cli/commands/sync/background.d.ts +23 -0
  155. package/dist/presentation/cli/commands/sync/embedding-pass.d.ts +32 -0
  156. package/dist/presentation/cli/commands/sync/helpers.d.ts +25 -0
  157. package/dist/presentation/cli/commands/sync/index.d.ts +17 -0
  158. package/dist/presentation/cli/commands/sync/memory-files.d.ts +26 -0
  159. package/dist/presentation/cli/commands/sync/types.d.ts +163 -0
  160. package/dist/presentation/cli/commands/uninstall.d.ts +44 -0
  161. package/dist/presentation/cli/db-startup.d.ts +61 -0
  162. package/dist/presentation/cli/formatters/ai-formatter.d.ts +38 -0
  163. package/dist/presentation/cli/formatters/color.d.ts +82 -0
  164. package/dist/presentation/cli/formatters/context-formatter.d.ts +55 -0
  165. package/dist/presentation/cli/formatters/dto-helpers.d.ts +176 -0
  166. package/dist/presentation/cli/formatters/envelope.d.ts +136 -0
  167. package/dist/presentation/cli/formatters/error-formatter.d.ts +41 -0
  168. package/dist/presentation/cli/formatters/friction-dashboard.d.ts +46 -0
  169. package/dist/presentation/cli/formatters/index.d.ts +17 -0
  170. package/dist/presentation/cli/formatters/list-formatter.d.ts +48 -0
  171. package/dist/presentation/cli/formatters/output-formatter.d.ts +98 -0
  172. package/dist/presentation/cli/formatters/related-formatter.d.ts +57 -0
  173. package/dist/presentation/cli/formatters/show-formatter.d.ts +63 -0
  174. package/dist/presentation/cli/formatters/stats-formatter.d.ts +54 -0
  175. package/dist/presentation/cli/formatters/text-width.d.ts +37 -0
  176. package/dist/presentation/cli/formatters/timestamp-formatter.d.ts +38 -0
  177. package/dist/presentation/cli/index.d.ts +10 -0
  178. package/dist/presentation/cli/index.js +1664 -0
  179. package/dist/presentation/cli/parsers/date-parser.d.ts +28 -0
  180. package/dist/presentation/cli/parsers/index.d.ts +6 -0
  181. package/dist/presentation/cli/pickers/index.d.ts +6 -0
  182. package/dist/presentation/cli/pickers/session-picker.d.ts +59 -0
  183. package/dist/presentation/cli/progress-reporter.d.ts +199 -0
  184. package/package.json +94 -0
@@ -0,0 +1,28 @@
1
+ /**
2
+ * Date Parser
3
+ *
4
+ * Wrapper around chrono-node for natural language date parsing.
5
+ * Validates that parsed dates are not in the future (for search filters).
6
+ */
7
+ /**
8
+ * Error thrown when date parsing fails.
9
+ */
10
+ export declare class DateParseError extends Error {
11
+ constructor(message: string);
12
+ }
13
+ /**
14
+ * Parse a natural language date string into a Date object.
15
+ *
16
+ * Supports formats like:
17
+ * - "yesterday"
18
+ * - "2 weeks ago"
19
+ * - "last Friday"
20
+ * - "2026-01-15"
21
+ * - "today"
22
+ *
23
+ * @param input Date string to parse
24
+ * @param referenceDate Reference date for relative calculations (defaults to now)
25
+ * @returns Parsed Date object
26
+ * @throws DateParseError if input cannot be parsed or is in the future
27
+ */
28
+ export declare function parseDate(input: string, referenceDate?: Date): Date;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * CLI Parsers Barrel Export
3
+ *
4
+ * Date parsing utilities for CLI argument processing.
5
+ */
6
+ export { parseDate, DateParseError } from "./date-parser.js";
@@ -0,0 +1,6 @@
1
+ /**
2
+ * CLI Pickers Barrel Export
3
+ *
4
+ * Interactive picker components for CLI commands.
5
+ */
6
+ export { sessionPicker, canUseInteractivePicker, setTtyOverride, setMocks, type PickerAction, type PickerResult, type SessionPickerOptions, } from "./session-picker.js";
@@ -0,0 +1,59 @@
1
+ /**
2
+ * Session Picker
3
+ *
4
+ * Interactive session picker with fzf-style fuzzy search.
5
+ * Uses @inquirer/search for search interface and @inquirer/select for action menu.
6
+ */
7
+ import type { ISessionRepository } from "../../../domain/ports/repositories.js";
8
+ /**
9
+ * Actions available after selecting a session.
10
+ */
11
+ export type PickerAction = "show" | "search" | "context" | "related" | "cancel";
12
+ /**
13
+ * Result from the session picker.
14
+ */
15
+ export interface PickerResult {
16
+ /** Selected session ID */
17
+ sessionId: string;
18
+ /** Action to perform on the session */
19
+ action: PickerAction;
20
+ }
21
+ /**
22
+ * Options for the session picker.
23
+ */
24
+ export interface SessionPickerOptions {
25
+ /** Repository for loading sessions */
26
+ sessionRepo: ISessionRepository;
27
+ /** Maximum sessions to display (default: 100) */
28
+ limit?: number;
29
+ }
30
+ /**
31
+ * Set TTY override for testing.
32
+ *
33
+ * @param value true/false to override, null to use real value
34
+ */
35
+ export declare function setTtyOverride(value: boolean | null): void;
36
+ /**
37
+ * Set mock functions for testing.
38
+ *
39
+ * @param searchFn Mock search function
40
+ * @param selectFn Mock select function
41
+ */
42
+ export declare function setMocks(searchFn: Function | null, selectFn: Function | null): void;
43
+ /**
44
+ * Check if interactive mode is available.
45
+ *
46
+ * @returns true if running in a TTY
47
+ */
48
+ export declare function canUseInteractivePicker(): boolean;
49
+ /**
50
+ * Interactive session picker with fuzzy search.
51
+ *
52
+ * Displays a searchable list of sessions with project name and relative time.
53
+ * After selection, shows an action menu with Show/Search/Context/Related options.
54
+ *
55
+ * @param options Picker configuration
56
+ * @returns PickerResult with sessionId and action, or null if cancelled
57
+ * @throws Error if not running in TTY mode
58
+ */
59
+ export declare function sessionPicker(options: SessionPickerOptions): Promise<PickerResult | null>;
@@ -0,0 +1,199 @@
1
+ /**
2
+ * Progress Reporter for CLI Sync Command
3
+ *
4
+ * Adapts progress display to TTY/non-TTY/quiet environments.
5
+ * TTY: Shows animated progress bar with Unicode or ASCII fallback
6
+ * Non-TTY: Shows plain text output (safe for pipes/CI)
7
+ * Quiet: Suppresses all progress output
8
+ */
9
+ /**
10
+ * Bar character pair for progress bar rendering.
11
+ */
12
+ interface BarCharacters {
13
+ readonly complete: string;
14
+ readonly incomplete: string;
15
+ }
16
+ /**
17
+ * Detect whether the current terminal supports Unicode output.
18
+ *
19
+ * Most modern terminals (including MINGW64/Git Bash) render Unicode
20
+ * block characters correctly. The only known exceptions are the Linux
21
+ * kernel console (TERM=linux) and legacy Windows cmd.exe without
22
+ * Windows Terminal.
23
+ *
24
+ * Note: The Bun bundler's --target=node flag double-encodes UTF-8
25
+ * literals (Bun #25767), which produces garbled output regardless of
26
+ * terminal capability. The fix for that is --target=bun in the build
27
+ * command, not a runtime fallback.
28
+ *
29
+ * Exported for testing.
30
+ */
31
+ export declare function isUnicodeSupported(): boolean;
32
+ /**
33
+ * Get the appropriate bar characters for the current terminal.
34
+ *
35
+ * Returns Unicode block characters on capable terminals,
36
+ * ASCII fallback otherwise.
37
+ */
38
+ export declare function getBarCharacters(): BarCharacters;
39
+ /**
40
+ * Interface for reporting sync progress.
41
+ *
42
+ * Implementations adapt to different output environments.
43
+ */
44
+ export interface ProgressReporter {
45
+ /**
46
+ * Start progress tracking with total count.
47
+ */
48
+ start(total: number): void;
49
+ /**
50
+ * Update progress to current value.
51
+ */
52
+ update(current: number, sessionId: string): void;
53
+ /**
54
+ * Stop progress tracking and finalize output.
55
+ */
56
+ stop(): void;
57
+ /**
58
+ * Log a message (for verbose mode).
59
+ */
60
+ log(message: string): void;
61
+ }
62
+ /**
63
+ * Progress reporter for TTY environments.
64
+ *
65
+ * Displays an animated progress bar that updates in place.
66
+ */
67
+ export declare class TtyProgressReporter implements ProgressReporter {
68
+ private bar;
69
+ private verbose;
70
+ private total;
71
+ private currentValue;
72
+ constructor(verbose?: boolean);
73
+ start(total: number): void;
74
+ update(current: number, sessionId: string): void;
75
+ stop(): void;
76
+ log(message: string): void;
77
+ }
78
+ /**
79
+ * Progress reporter for non-TTY environments (pipes, CI).
80
+ *
81
+ * Uses plain text output instead of escape codes.
82
+ */
83
+ export declare class PlainProgressReporter implements ProgressReporter {
84
+ private verbose;
85
+ constructor(verbose?: boolean);
86
+ start(total: number): void;
87
+ update(current: number, sessionId: string): void;
88
+ stop(): void;
89
+ log(message: string): void;
90
+ }
91
+ /**
92
+ * Progress reporter that suppresses all output.
93
+ *
94
+ * Used for --quiet mode (hooks, scripting).
95
+ */
96
+ export declare class QuietProgressReporter implements ProgressReporter {
97
+ start(_total: number): void;
98
+ update(_current: number, _sessionId: string): void;
99
+ stop(): void;
100
+ log(_message: string): void;
101
+ }
102
+ /**
103
+ * Create appropriate progress reporter based on options and environment.
104
+ *
105
+ * Priority:
106
+ * 1. If quiet=true: QuietProgressReporter (no output)
107
+ * 2. If not TTY: PlainProgressReporter (safe for pipes)
108
+ * 3. If TTY: TtyProgressReporter (animated bar)
109
+ *
110
+ * @param options Configuration options
111
+ * @returns Appropriate ProgressReporter for the environment
112
+ */
113
+ export declare function createProgressReporter(options: {
114
+ quiet?: boolean;
115
+ verbose?: boolean;
116
+ }): ProgressReporter;
117
+ /**
118
+ * Interface for reporting embedding progress.
119
+ *
120
+ * Separate from ProgressReporter because embedding uses a different
121
+ * format (no sessionId) and different progress bar text.
122
+ */
123
+ export interface EmbeddingProgressReporter {
124
+ /** Start progress tracking with total count. */
125
+ start(total: number): void;
126
+ /** Update progress to current value. */
127
+ update(current: number): void;
128
+ /** Stop progress tracking and finalize output. */
129
+ stop(): void;
130
+ }
131
+ /**
132
+ * Embedding progress reporter for TTY environments.
133
+ *
134
+ * Displays an animated progress bar with embedding-specific format.
135
+ */
136
+ export declare class TtyEmbeddingProgressReporter implements EmbeddingProgressReporter {
137
+ private bar;
138
+ constructor();
139
+ start(total: number): void;
140
+ update(current: number): void;
141
+ stop(): void;
142
+ }
143
+ /**
144
+ * Embedding progress reporter for non-TTY environments (pipes, CI).
145
+ *
146
+ * Uses plain text output instead of escape codes.
147
+ */
148
+ export declare class PlainEmbeddingProgressReporter implements EmbeddingProgressReporter {
149
+ start(total: number): void;
150
+ update(_current: number): void;
151
+ stop(): void;
152
+ }
153
+ /**
154
+ * Embedding progress reporter that suppresses all output.
155
+ *
156
+ * Used for --quiet mode (hooks, scripting).
157
+ */
158
+ export declare class QuietEmbeddingProgressReporter implements EmbeddingProgressReporter {
159
+ start(_total: number): void;
160
+ update(_current: number): void;
161
+ stop(): void;
162
+ }
163
+ /**
164
+ * Create appropriate embedding progress reporter based on options and environment.
165
+ *
166
+ * @param options Configuration options
167
+ * @returns Appropriate EmbeddingProgressReporter for the environment
168
+ */
169
+ export declare function createEmbeddingProgressReporter(options: {
170
+ quiet?: boolean;
171
+ }): EmbeddingProgressReporter;
172
+ import type { DownloadProgress } from "../../domain/ports/embedding.js";
173
+ /**
174
+ * Track the largest download total across multiple progress events.
175
+ *
176
+ * Transformers.js emits progress events for multiple files (config.json,
177
+ * tokenizer.json, model.onnx). Small files may report total=0. This
178
+ * function keeps the largest total seen so the progress bar shows the
179
+ * model file size, not a config file's size.
180
+ *
181
+ * @param currentMax Current largest total in MB
182
+ * @param newTotalBytes New total from a progress event in bytes
183
+ * @returns The larger of currentMax or the new total converted to MB
184
+ */
185
+ export declare function trackDownloadTotal(currentMax: number, newTotalBytes: number): number;
186
+ /**
187
+ * Create a handler for model download progress events.
188
+ *
189
+ * On TTY: shows animated progress bar for download.
190
+ * On non-TTY: prints a single announcement line.
191
+ * On quiet: suppresses all output.
192
+ *
193
+ * @param options Configuration options
194
+ * @returns Callback for DownloadProgress events from provider.initialize()
195
+ */
196
+ export declare function createModelDownloadHandler(options: {
197
+ quiet?: boolean;
198
+ }): (progress: DownloadProgress) => void;
199
+ export {};
package/package.json ADDED
@@ -0,0 +1,94 @@
1
+ {
2
+ "name": "@chude/memory",
3
+ "version": "4.0.0",
4
+ "description": "Cross-project context persistence for Claude Code sessions",
5
+ "type": "module",
6
+ "main": "dist/index.js",
7
+ "types": "dist/index.d.ts",
8
+ "bin": {
9
+ "memory": "dist/presentation/cli/index.js"
10
+ },
11
+ "files": [
12
+ "dist"
13
+ ],
14
+ "scripts": {
15
+ "clean:dist": "bun run scripts/clean-dist.ts",
16
+ "build:types": "tsc --project tsconfig.lib.json",
17
+ "build:lib": "bun build src/index.ts --outdir dist --target bun --packages=external --minify --sourcemap=none",
18
+ "build:cli": "bun build src/presentation/cli/index.ts --outdir dist/presentation/cli --target bun --packages=external --minify --sourcemap=none",
19
+ "build": "bun run clean:dist && bun run build:types && bun run build:lib && bun run build:cli",
20
+ "build:hook": "bun build src/infrastructure/hooks/sync-hook-script.ts --outfile=dist/sync-hook.js --target=bun",
21
+ "test": "bun test",
22
+ "test:coverage": "bun run scripts/run-istanbul-bun-coverage.ts --coverage-dir coverage && bun run scripts/check-coverage-thresholds.ts --summary coverage/coverage-summary.json --threshold 95",
23
+ "quality": "bun run typecheck && bun run build && bun test --timeout 15000 && bun run test:isolation && bun run test:coverage && bun audit",
24
+ "test:smoke": "bun test tests/smoke",
25
+ "test:isolation": "bun run scripts/check-test-isolation.ts",
26
+ "typecheck": "tsc --noEmit && tsc --project tsconfig.scripts.json",
27
+ "lint": "bun run typecheck",
28
+ "mutation": "stryker run",
29
+ "mutation:domain": "stryker run --mutate 'src/domain/**/!(*.test).ts'"
30
+ },
31
+ "author": "Chude <chude@emeke.org>",
32
+ "license": "MIT",
33
+ "devDependencies": {
34
+ "@stryker-mutator/core": "9.6.1",
35
+ "@stryker-mutator/typescript-checker": "9.6.1",
36
+ "@stryker-mutator/vitest-runner": "9.6.1",
37
+ "@types/bun": "1.3.14",
38
+ "@types/cli-progress": "^3.11.6",
39
+ "@types/istanbul-lib-coverage": "^2.0.6",
40
+ "@types/istanbul-lib-instrument": "^1.7.8",
41
+ "@types/istanbul-lib-report": "^3.0.3",
42
+ "@types/istanbul-reports": "^3.0.4",
43
+ "istanbul-lib-coverage": "^3.2.2",
44
+ "istanbul-lib-instrument": "^6.0.3",
45
+ "istanbul-lib-report": "^3.0.1",
46
+ "istanbul-reports": "^3.2.0",
47
+ "typescript": "^5.5.0",
48
+ "vitest": "4.1.7"
49
+ },
50
+ "engines": {
51
+ "bun": ">=1.0.0"
52
+ },
53
+ "keywords": [
54
+ "claude",
55
+ "claude-code",
56
+ "context",
57
+ "memory",
58
+ "session",
59
+ "search"
60
+ ],
61
+ "repository": {
62
+ "type": "git",
63
+ "url": "git+ssh://git@github.com/chudeemeke/memory-nexus.git"
64
+ },
65
+ "dependencies": {
66
+ "@anthropic-ai/claude-code": "2.1.152",
67
+ "@anthropic-ai/sdk": "0.98.1",
68
+ "@huggingface/transformers": "4.2.0",
69
+ "@inquirer/search": "4.2.0",
70
+ "@inquirer/select": "5.2.0",
71
+ "chart.js": "^4.5.1",
72
+ "chrono-node": "2.9.1",
73
+ "cli-progress": "^3.12.0",
74
+ "commander": "14.0.3",
75
+ "fuzzy": "^0.1.3",
76
+ "sqlite-vec": "0.1.9",
77
+ "string-width": "8.2.1"
78
+ },
79
+ "overrides": {
80
+ "@protobufjs/utf8": "1.1.1",
81
+ "fast-uri": "3.1.2",
82
+ "picomatch": "4.0.4",
83
+ "postcss": "8.5.15",
84
+ "protobufjs": "8.4.2",
85
+ "qs": "6.15.2",
86
+ "rollup": "4.60.4",
87
+ "vite": "8.0.14",
88
+ "yaml": "2.9.0"
89
+ },
90
+ "trustedDependencies": [
91
+ "onnxruntime-node",
92
+ "protobufjs"
93
+ ]
94
+ }