mem-os-python 1.6.27__py3-none-any.whl

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 (253) hide show
  1. mem_os_python-1.6.27.dist-info/METADATA +1032 -0
  2. mem_os_python-1.6.27.dist-info/RECORD +253 -0
  3. mem_os_python-1.6.27.dist-info/WHEEL +4 -0
  4. mem_os_python-1.6.27.dist-info/entry_points.txt +2 -0
  5. mem_os_python-1.6.27.dist-info/licenses/LICENSE +21 -0
  6. memos/__init__.py +16 -0
  7. memos/_js/adapters/anthropic.d.ts +279 -0
  8. memos/_js/adapters/anthropic.d.ts.map +1 -0
  9. memos/_js/adapters/anthropic.js +348 -0
  10. memos/_js/adapters/anthropic.js.map +1 -0
  11. memos/_js/adapters/base.d.ts +10 -0
  12. memos/_js/adapters/base.d.ts.map +1 -0
  13. memos/_js/adapters/base.js +2 -0
  14. memos/_js/adapters/base.js.map +1 -0
  15. memos/_js/adapters/openai.d.ts +264 -0
  16. memos/_js/adapters/openai.d.ts.map +1 -0
  17. memos/_js/adapters/openai.js +342 -0
  18. memos/_js/adapters/openai.js.map +1 -0
  19. memos/_js/apps/explorer.d.ts +244 -0
  20. memos/_js/apps/explorer.d.ts.map +1 -0
  21. memos/_js/apps/explorer.js +738 -0
  22. memos/_js/apps/explorer.js.map +1 -0
  23. memos/_js/citations.d.ts +65 -0
  24. memos/_js/citations.d.ts.map +1 -0
  25. memos/_js/citations.js +143 -0
  26. memos/_js/citations.js.map +1 -0
  27. memos/_js/cli-browse.d.ts +3 -0
  28. memos/_js/cli-browse.d.ts.map +1 -0
  29. memos/_js/cli-browse.js +129 -0
  30. memos/_js/cli-browse.js.map +1 -0
  31. memos/_js/cli-completion.d.ts +31 -0
  32. memos/_js/cli-completion.d.ts.map +1 -0
  33. memos/_js/cli-completion.js +340 -0
  34. memos/_js/cli-completion.js.map +1 -0
  35. memos/_js/cli-help.d.ts +18 -0
  36. memos/_js/cli-help.d.ts.map +1 -0
  37. memos/_js/cli-help.js +357 -0
  38. memos/_js/cli-help.js.map +1 -0
  39. memos/_js/cli.d.ts +28 -0
  40. memos/_js/cli.d.ts.map +1 -0
  41. memos/_js/cli.js +2880 -0
  42. memos/_js/cli.js.map +1 -0
  43. memos/_js/compression.d.ts +25 -0
  44. memos/_js/compression.d.ts.map +1 -0
  45. memos/_js/compression.js +319 -0
  46. memos/_js/compression.js.map +1 -0
  47. memos/_js/confidence-machine.d.ts +99 -0
  48. memos/_js/confidence-machine.d.ts.map +1 -0
  49. memos/_js/confidence-machine.js +222 -0
  50. memos/_js/confidence-machine.js.map +1 -0
  51. memos/_js/context-pack.d.ts +506 -0
  52. memos/_js/context-pack.d.ts.map +1 -0
  53. memos/_js/context-pack.js +1435 -0
  54. memos/_js/context-pack.js.map +1 -0
  55. memos/_js/contradictions.d.ts +160 -0
  56. memos/_js/contradictions.d.ts.map +1 -0
  57. memos/_js/contradictions.js +255 -0
  58. memos/_js/contradictions.js.map +1 -0
  59. memos/_js/dashboard.d.ts +30 -0
  60. memos/_js/dashboard.d.ts.map +1 -0
  61. memos/_js/dashboard.js +302 -0
  62. memos/_js/dashboard.js.map +1 -0
  63. memos/_js/ebbinghaus.d.ts +29 -0
  64. memos/_js/ebbinghaus.d.ts.map +1 -0
  65. memos/_js/ebbinghaus.js +32 -0
  66. memos/_js/ebbinghaus.js.map +1 -0
  67. memos/_js/embedding-queue.d.ts +190 -0
  68. memos/_js/embedding-queue.d.ts.map +1 -0
  69. memos/_js/embedding-queue.js +316 -0
  70. memos/_js/embedding-queue.js.map +1 -0
  71. memos/_js/embeddings.d.ts +187 -0
  72. memos/_js/embeddings.d.ts.map +1 -0
  73. memos/_js/embeddings.js +633 -0
  74. memos/_js/embeddings.js.map +1 -0
  75. memos/_js/entity-extraction.d.ts +54 -0
  76. memos/_js/entity-extraction.d.ts.map +1 -0
  77. memos/_js/entity-extraction.js +325 -0
  78. memos/_js/entity-extraction.js.map +1 -0
  79. memos/_js/entity-index.d.ts +93 -0
  80. memos/_js/entity-index.d.ts.map +1 -0
  81. memos/_js/entity-index.js +165 -0
  82. memos/_js/entity-index.js.map +1 -0
  83. memos/_js/event-memory.d.ts +147 -0
  84. memos/_js/event-memory.d.ts.map +1 -0
  85. memos/_js/event-memory.js +290 -0
  86. memos/_js/event-memory.js.map +1 -0
  87. memos/_js/external-import.d.ts +98 -0
  88. memos/_js/external-import.d.ts.map +1 -0
  89. memos/_js/external-import.js +669 -0
  90. memos/_js/external-import.js.map +1 -0
  91. memos/_js/fidelity.d.ts +367 -0
  92. memos/_js/fidelity.d.ts.map +1 -0
  93. memos/_js/fidelity.js +911 -0
  94. memos/_js/fidelity.js.map +1 -0
  95. memos/_js/graph-expansion.d.ts +119 -0
  96. memos/_js/graph-expansion.d.ts.map +1 -0
  97. memos/_js/graph-expansion.js +213 -0
  98. memos/_js/graph-expansion.js.map +1 -0
  99. memos/_js/graph-mermaid.d.ts +13 -0
  100. memos/_js/graph-mermaid.d.ts.map +1 -0
  101. memos/_js/graph-mermaid.js +32 -0
  102. memos/_js/graph-mermaid.js.map +1 -0
  103. memos/_js/graph.d.ts +170 -0
  104. memos/_js/graph.d.ts.map +1 -0
  105. memos/_js/graph.js +482 -0
  106. memos/_js/graph.js.map +1 -0
  107. memos/_js/harness.d.ts +63 -0
  108. memos/_js/harness.d.ts.map +1 -0
  109. memos/_js/harness.js +93 -0
  110. memos/_js/harness.js.map +1 -0
  111. memos/_js/importance.d.ts +118 -0
  112. memos/_js/importance.d.ts.map +1 -0
  113. memos/_js/importance.js +144 -0
  114. memos/_js/importance.js.map +1 -0
  115. memos/_js/index.d.ts +51 -0
  116. memos/_js/index.d.ts.map +1 -0
  117. memos/_js/index.js +53 -0
  118. memos/_js/index.js.map +1 -0
  119. memos/_js/mcp.d.ts +58 -0
  120. memos/_js/mcp.d.ts.map +1 -0
  121. memos/_js/mcp.js +1853 -0
  122. memos/_js/mcp.js.map +1 -0
  123. memos/_js/memory.d.ts +1762 -0
  124. memos/_js/memory.d.ts.map +1 -0
  125. memos/_js/memory.js +6283 -0
  126. memos/_js/memory.js.map +1 -0
  127. memos/_js/procedural.d.ts +74 -0
  128. memos/_js/procedural.d.ts.map +1 -0
  129. memos/_js/procedural.js +125 -0
  130. memos/_js/procedural.js.map +1 -0
  131. memos/_js/project-config.d.ts +68 -0
  132. memos/_js/project-config.d.ts.map +1 -0
  133. memos/_js/project-config.js +59 -0
  134. memos/_js/project-config.js.map +1 -0
  135. memos/_js/proof-of-forgetting.d.ts +57 -0
  136. memos/_js/proof-of-forgetting.d.ts.map +1 -0
  137. memos/_js/proof-of-forgetting.js +80 -0
  138. memos/_js/proof-of-forgetting.js.map +1 -0
  139. memos/_js/provenance.d.ts +122 -0
  140. memos/_js/provenance.d.ts.map +1 -0
  141. memos/_js/provenance.js +182 -0
  142. memos/_js/provenance.js.map +1 -0
  143. memos/_js/quarantine-commands.d.ts +23 -0
  144. memos/_js/quarantine-commands.d.ts.map +1 -0
  145. memos/_js/quarantine-commands.js +42 -0
  146. memos/_js/quarantine-commands.js.map +1 -0
  147. memos/_js/quarantine.d.ts +120 -0
  148. memos/_js/quarantine.d.ts.map +1 -0
  149. memos/_js/quarantine.js +873 -0
  150. memos/_js/quarantine.js.map +1 -0
  151. memos/_js/redact.d.ts +12 -0
  152. memos/_js/redact.d.ts.map +1 -0
  153. memos/_js/redact.js +26 -0
  154. memos/_js/redact.js.map +1 -0
  155. memos/_js/repl.d.ts +57 -0
  156. memos/_js/repl.d.ts.map +1 -0
  157. memos/_js/repl.js +295 -0
  158. memos/_js/repl.js.map +1 -0
  159. memos/_js/rerank-local.d.ts +61 -0
  160. memos/_js/rerank-local.d.ts.map +1 -0
  161. memos/_js/rerank-local.js +210 -0
  162. memos/_js/rerank-local.js.map +1 -0
  163. memos/_js/retain-filter.d.ts +98 -0
  164. memos/_js/retain-filter.d.ts.map +1 -0
  165. memos/_js/retain-filter.js +232 -0
  166. memos/_js/retain-filter.js.map +1 -0
  167. memos/_js/retrieval.d.ts +265 -0
  168. memos/_js/retrieval.d.ts.map +1 -0
  169. memos/_js/retrieval.js +1018 -0
  170. memos/_js/retrieval.js.map +1 -0
  171. memos/_js/revert.d.ts +77 -0
  172. memos/_js/revert.d.ts.map +1 -0
  173. memos/_js/revert.js +252 -0
  174. memos/_js/revert.js.map +1 -0
  175. memos/_js/scope.d.ts +30 -0
  176. memos/_js/scope.d.ts.map +1 -0
  177. memos/_js/scope.js +71 -0
  178. memos/_js/scope.js.map +1 -0
  179. memos/_js/semantic-screen.d.ts +152 -0
  180. memos/_js/semantic-screen.d.ts.map +1 -0
  181. memos/_js/semantic-screen.js +290 -0
  182. memos/_js/semantic-screen.js.map +1 -0
  183. memos/_js/session-hooks.d.ts +127 -0
  184. memos/_js/session-hooks.d.ts.map +1 -0
  185. memos/_js/session-hooks.js +482 -0
  186. memos/_js/session-hooks.js.map +1 -0
  187. memos/_js/storage/sqlite.d.ts +427 -0
  188. memos/_js/storage/sqlite.d.ts.map +1 -0
  189. memos/_js/storage/sqlite.js +2428 -0
  190. memos/_js/storage/sqlite.js.map +1 -0
  191. memos/_js/sync.d.ts +213 -0
  192. memos/_js/sync.d.ts.map +1 -0
  193. memos/_js/sync.js +389 -0
  194. memos/_js/sync.js.map +1 -0
  195. memos/_js/tamper-log.d.ts +98 -0
  196. memos/_js/tamper-log.d.ts.map +1 -0
  197. memos/_js/tamper-log.js +327 -0
  198. memos/_js/tamper-log.js.map +1 -0
  199. memos/_js/temporal.d.ts +92 -0
  200. memos/_js/temporal.d.ts.map +1 -0
  201. memos/_js/temporal.js +536 -0
  202. memos/_js/temporal.js.map +1 -0
  203. memos/_js/time-travel.d.ts +38 -0
  204. memos/_js/time-travel.d.ts.map +1 -0
  205. memos/_js/time-travel.js +46 -0
  206. memos/_js/time-travel.js.map +1 -0
  207. memos/_js/timestamp-format.d.ts +18 -0
  208. memos/_js/timestamp-format.d.ts.map +1 -0
  209. memos/_js/timestamp-format.js +52 -0
  210. memos/_js/timestamp-format.js.map +1 -0
  211. memos/_js/triple-extraction.d.ts +31 -0
  212. memos/_js/triple-extraction.d.ts.map +1 -0
  213. memos/_js/triple-extraction.js +116 -0
  214. memos/_js/triple-extraction.js.map +1 -0
  215. memos/_js/types.d.ts +2474 -0
  216. memos/_js/types.d.ts.map +1 -0
  217. memos/_js/types.js +20 -0
  218. memos/_js/types.js.map +1 -0
  219. memos/_js/updater.d.ts +95 -0
  220. memos/_js/updater.d.ts.map +1 -0
  221. memos/_js/updater.js +268 -0
  222. memos/_js/updater.js.map +1 -0
  223. memos/_js/version.d.ts +17 -0
  224. memos/_js/version.d.ts.map +1 -0
  225. memos/_js/version.js +34 -0
  226. memos/_js/version.js.map +1 -0
  227. memos/_js/vision/clip-query-cache.d.ts +58 -0
  228. memos/_js/vision/clip-query-cache.d.ts.map +1 -0
  229. memos/_js/vision/clip-query-cache.js +79 -0
  230. memos/_js/vision/clip-query-cache.js.map +1 -0
  231. memos/_js/vision/clip.d.ts +113 -0
  232. memos/_js/vision/clip.d.ts.map +1 -0
  233. memos/_js/vision/clip.js +224 -0
  234. memos/_js/vision/clip.js.map +1 -0
  235. memos/_js/vision/fake-clip.d.ts +55 -0
  236. memos/_js/vision/fake-clip.d.ts.map +1 -0
  237. memos/_js/vision/fake-clip.js +122 -0
  238. memos/_js/vision/fake-clip.js.map +1 -0
  239. memos/_js/vision/index.d.ts +15 -0
  240. memos/_js/vision/index.d.ts.map +1 -0
  241. memos/_js/vision/index.js +13 -0
  242. memos/_js/vision/index.js.map +1 -0
  243. memos/_js/vision/store.d.ts +137 -0
  244. memos/_js/vision/store.d.ts.map +1 -0
  245. memos/_js/vision/store.js +383 -0
  246. memos/_js/vision/store.js.map +1 -0
  247. memos/adapters/__init__.py +0 -0
  248. memos/adapters/crewai.py +385 -0
  249. memos/adapters/langchain.py +301 -0
  250. memos/adapters/ollama.py +396 -0
  251. memos/server/__init__.py +0 -0
  252. memos/server/main.py +547 -0
  253. memos/server/routes.py +360 -0
@@ -0,0 +1,506 @@
1
+ /**
2
+ * AI Trio context pack builder.
3
+ *
4
+ * Implements the `ai-trio.memos.context-pack.v1` contract from
5
+ * `docs/ai-trio-contracts.md`. This is the canonical envelope LLM Guardian
6
+ * and any other AI Trio consumer reads.
7
+ *
8
+ * Token-saving features:
9
+ * - Content debloating: strips redundant whitespace, collapses repeated
10
+ * phrases, trims trailing punctuation noise.
11
+ * - Smart dedup: drops near-duplicate items from the pack so the
12
+ * consumer doesn't fold the same fact twice — but only genuine
13
+ * duplicates. Similarity scores are order-blind and value-blind, so
14
+ * every drop is gated by a discriminating-token guard: an inverted
15
+ * fact (source/destination swapped) or a changed number survives.
16
+ * - Token-accurate budgeting: uses a GPT-style BPE approximation
17
+ * (whitespace + punctuation split) instead of the 4-chars-per-token
18
+ * heuristic. Callers can swap in a real tokenizer via `tokenCounter`.
19
+ * - Prompt-cache stability: scores are rounded to 3 decimals, items
20
+ * sort deterministically (score desc, id asc), and serialization
21
+ * layouts are fixed — so rebuilding a pack from the same memories
22
+ * yields byte-identical output. Providers that discount repeated
23
+ * prompt prefixes (Anthropic prompt caching, OpenAI) then cache the
24
+ * evidence block instead of re-billing it every turn.
25
+ *
26
+ * @module @memos/context-pack
27
+ */
28
+ import type { ContextPackCompressionOptions, ContextPackWireFormat, EmbeddingVector, ImageAttachment, ImageMemoryMeta, ScoredMemory } from "./types.js";
29
+ import type { ProceduralLesson } from "./types.js";
30
+ import type { FidelityLevel } from "./fidelity.js";
31
+ /**
32
+ * The image payload carried by a node, or null when it is not an image
33
+ * memory.
34
+ *
35
+ * `metadata.image` — not `type`, not a new MemoryType member — is the
36
+ * discriminator (the same pattern `metadata.context` uses), so
37
+ * MemoryType exhaustiveness stays intact everywhere: the sync
38
+ * allowlist, fidelity labels, adapters, and the MCP zod schema all keep
39
+ * working without knowing images exist.
40
+ *
41
+ * A malformed payload returns null rather than throwing: a pack is a
42
+ * read path, and a partially-written metadata key must degrade to
43
+ * "not an image" instead of failing the whole pack.
44
+ */
45
+ export declare function imageAttachmentOf(node: {
46
+ metadata?: Record<string, unknown>;
47
+ }): ImageMemoryMeta | null;
48
+ /** The single source of truth for the context-pack schema id. */
49
+ export declare const CONTEXT_PACK_SCHEMA = "ai-trio.memos.context-pack.v1";
50
+ /** A single ranked, ready-to-fold memory item. */
51
+ export interface ContextPackItem {
52
+ id: string;
53
+ /**
54
+ * Citable token like `[mem:a3f9]`, unique within the pack. Present
55
+ * only when the pack was built with `citations: true`.
56
+ */
57
+ citation?: string;
58
+ content: string;
59
+ summary: string | null;
60
+ /**
61
+ * Fidelity level this item's content was rendered at. Present only
62
+ * when the pack was built with the `fidelity` option; `undefined`
63
+ * means L3 verbatim (the default).
64
+ */
65
+ fidelity?: FidelityLevel;
66
+ score: number;
67
+ scores: {
68
+ keyword?: number;
69
+ semantic?: number;
70
+ hybrid?: number;
71
+ };
72
+ /** Pack-level trust label (e.g. "local"). Use trustScore for the numeric value. */
73
+ trust: string;
74
+ /** Pack-level source label (e.g. "session"). Use nodeSource for the per-node provenance. */
75
+ source: string;
76
+ /** Per-node numeric trust score [0, 1]. Used by compact TOON for 0-9 encoding. */
77
+ trustScore?: number;
78
+ /** Per-node provenance source. Used by compact TOON for 2-char code. */
79
+ nodeSource?: string;
80
+ /**
81
+ * Provenance tier of the item's channel (`user-verified` > `user` >
82
+ * `tool-output` > `chat` > `imported`). Lets pack consumers apply the
83
+ * read-time trust policy.
84
+ */
85
+ provenance?: string;
86
+ /**
87
+ * True when the item comes from a low-trust channel (`imported` /
88
+ * `tool-output` tier, or quarantined-then-released): the host agent
89
+ * should confirm it instead of silently injecting it as context.
90
+ */
91
+ untrustedSource?: boolean;
92
+ tags: string[];
93
+ updatedAt: string;
94
+ /**
95
+ * Image attachments carried by this item. Present only when the item
96
+ * is an image memory AND the pack was built with images enabled
97
+ * (the default when any candidate is an image memory).
98
+ *
99
+ * A REFERENCE, never the bytes: `ref` resolves through
100
+ * `memos.imageMemory(ref)`. One item can carry several (a node whose
101
+ * caption describes a multi-image memory), so this stays an array.
102
+ */
103
+ images?: ImageAttachment[];
104
+ }
105
+ /** Top-level envelope returned to the AI Trio. */
106
+ export interface ContextPack {
107
+ schema: typeof CONTEXT_PACK_SCHEMA;
108
+ query: string;
109
+ namespace: string;
110
+ tokenBudget: number;
111
+ items: ContextPackItem[];
112
+ /** Number of tokens saved by debloating + dedup. 0 when neither ran. */
113
+ tokensSaved: number;
114
+ /**
115
+ * Fidelity metadata: which level the pack was rendered at and what it
116
+ * cost vs verbatim, so token savings are visible. Present only when
117
+ * the pack was built with the `fidelity` option.
118
+ */
119
+ fidelity?: ContextPackFidelityMeta;
120
+ /**
121
+ * Procedural lessons injected as an "operating instructions" section.
122
+ * Present only when the pack was built with lessons requested
123
+ * (`MemOS.contextPack({ lessons })`).
124
+ */
125
+ lessons?: ProceduralLesson[];
126
+ }
127
+ /**
128
+ * Pack-level fidelity metadata. `contentTokens` is what the packed item
129
+ * contents cost at the chosen level; `verbatimTokens` is what the SAME
130
+ * items would have cost at L3 — the difference is the fidelity saving.
131
+ */
132
+ export interface ContextPackFidelityMeta {
133
+ level: FidelityLevel;
134
+ /** True when the level came from the query-adaptive router. */
135
+ adaptive: boolean;
136
+ contentTokens: number;
137
+ verbatimTokens: number;
138
+ }
139
+ /** Options for building a context pack. */
140
+ export interface BuildContextPackOptions {
141
+ query: string;
142
+ namespace: string;
143
+ tokenBudget: number;
144
+ items: ScoredMemory[];
145
+ trust?: string;
146
+ source?: string;
147
+ includeSummary?: boolean;
148
+ /**
149
+ * Custom token counter. Receives a string, returns the token count.
150
+ * Default: a GPT-style BPE approximation (split on whitespace +
151
+ * punctuation, count fragments). Callers that have a real tokenizer
152
+ * (e.g. `tiktoken` or an LM Studio endpoint) should pass it here for
153
+ * exact budget enforcement.
154
+ */
155
+ tokenCounter?: (text: string) => number;
156
+ /**
157
+ * If true (default), strip redundant whitespace and collapse repeated
158
+ * phrases from each item's content before packing.
159
+ */
160
+ debloat?: boolean;
161
+ /**
162
+ * If true (default), drop items whose content is >85% similar (by
163
+ * token-set Jaccard) to an item already in the pack.
164
+ */
165
+ dedup?: boolean;
166
+ /**
167
+ * Jaccard similarity threshold above which two items are considered
168
+ * duplicates. Default 0.85.
169
+ */
170
+ dedupThreshold?: number;
171
+ /**
172
+ * Keep items whose only difference is the one that matters (default
173
+ * true). Before a lexical or semantic near-duplicate is dropped, the
174
+ * two texts are compared on their DISCRIMINATING tokens: any
175
+ * difference in the digit-bearing tokens (`pool size 20` vs
176
+ * `pool size 40`), or — when the vocabulary overlap is high enough
177
+ * for word order to be signal — a different content-word sequence
178
+ * (source/destination inverted) keeps BOTH items.
179
+ *
180
+ * Set-membership similarity is order-blind and value-blind:
181
+ * `moved the deploy script from the runner to the cluster` and
182
+ * `moved the deploy script from the cluster to the runner` score
183
+ * Jaccard 1.0 and cosine ≈ 0.99, so without this guard the pack
184
+ * silently deletes one of two opposite facts. Genuine redundancy
185
+ * (identical text, or a difference confined to function words) still
186
+ * collapses — the token savings are the point of the feature. Set
187
+ * `false` to restore pure similarity-threshold dedup.
188
+ */
189
+ dedupKeepIfDistinct?: boolean;
190
+ /**
191
+ * Opt-in semantic dedup: when provided, items whose stored embedding has
192
+ * cosine similarity >= `semanticDedupThreshold` (default 0.90) with an
193
+ * item already selected for the pack are dropped as paraphrased
194
+ * duplicates. The higher-scored item always survives. Lexical dedup
195
+ * (Jaccard) still runs independently; the two passes are complementary —
196
+ * lexical catches shared-vocabulary copies, semantic catches paraphrases.
197
+ *
198
+ * Vectors come from the caller (typically MemOS, which already has them
199
+ * in memory from hybrid search), so this pass adds no embedding compute.
200
+ */
201
+ embeddings?: Map<string, EmbeddingVector>;
202
+ /**
203
+ * Cosine similarity threshold for `embeddings`-based dedup.
204
+ * Default 0.90 (near-certain paraphrase; lower values risk dropping
205
+ * distinct-but-related facts).
206
+ */
207
+ semanticDedupThreshold?: number;
208
+ /**
209
+ * Memory-grounded citations (opt-in, default off). When true, every
210
+ * pack item carries a `citation` token like `[mem:a3f9]` — unique
211
+ * within the pack, lengthened git-style on collision — and the TOON
212
+ * serializers render it ahead of the item's content so an agent can
213
+ * quote it and a verifier can trace it via `resolveCitation`.
214
+ * Opt-in because it changes the rendered bytes (cache-prefix rule:
215
+ * never reshuffle a layout mid-session unasked).
216
+ */
217
+ citations?: boolean;
218
+ /**
219
+ * Procedural lessons to inject as an "operating instructions" section
220
+ * (additive; does not consume the item token budget). Fetched via
221
+ * `recallProcedural` by `MemOS.contextPack` — pass pre-fetched rows
222
+ * here when calling `buildContextPack` directly.
223
+ */
224
+ lessons?: ProceduralLesson[];
225
+ /**
226
+ * Fidelity level for item contents: a fixed level or `"adaptive"`
227
+ * (the query-adaptive router picks the starting level from query
228
+ * signals). Default `undefined` = L3 verbatim — current behavior
229
+ * preserved exactly. The resolved level is recorded per item
230
+ * (`item.fidelity`) and in the pack metadata (`pack.fidelity`).
231
+ */
232
+ fidelity?: FidelityLevel | "adaptive";
233
+ /**
234
+ * Wire format the pack will be serialized to. When set, the budget
235
+ * loop charges every item what it actually costs on the wire for that
236
+ * format — the TOON row scaffolding (`id|score|trust|src|epochDelta|
237
+ * tags|content`, base64url ids, citations) or the JSON serializer's
238
+ * field names and quotes — instead of the legacy flat
239
+ * `content + summary + 4` estimate. Letting a large budget buy fewer
240
+ * items than it can really afford is the bug this closes.
241
+ *
242
+ * Default `undefined` = legacy accounting, which keeps the item
243
+ * selection byte-identical for every existing caller.
244
+ */
245
+ wireFormat?: ContextPackWireFormat;
246
+ /**
247
+ * Compression for items that do not fit `tokenBudget`. Off by default
248
+ * (see `ContextPackCompressionOptions`); when enabled, an oversized
249
+ * item is re-rendered through `compressText` and admitted if the
250
+ * compressed form fits. Items that are still too big after
251
+ * compression are skipped exactly as before, so this can only add
252
+ * items to a pack, never remove them.
253
+ */
254
+ compression?: ContextPackCompressionOptions;
255
+ /**
256
+ * Attach image references to pack items whose node is an image memory
257
+ * (`metadata.image` present).
258
+ *
259
+ * Default `true` when any candidate item is an image memory: the
260
+ * attachment is a REFERENCE (`img_<sha256[0:12]>` + dimensions +
261
+ * caption), never the bytes, so there is no token-budget cost that
262
+ * would justify an off-by-default. Pass `false` explicitly to omit
263
+ * them (a pack with no images is byte-identical to before).
264
+ *
265
+ * The bytes are resolved separately via `memos.imageMemory(ref)` by a
266
+ * vision-capable host model — inlining them would be both a token
267
+ * bomb and a prompt-cache-prefix disaster.
268
+ */
269
+ images?: boolean;
270
+ }
271
+ /**
272
+ * Estimate token count using a GPT-style BPE approximation.
273
+ *
274
+ * Splits on whitespace and punctuation boundaries, then counts the
275
+ * fragments. This is within ~10% of real tiktoken counts for English
276
+ * text and is zero-dependency. For exact counts, pass a `tokenCounter`
277
+ * that calls tiktoken or an LM Studio token-count endpoint.
278
+ */
279
+ export declare function estimateTokens(text: string): number;
280
+ /**
281
+ * Tokens the *serialization scaffolding* of one pack item costs on the
282
+ * wire — everything the item contributes except its own content and
283
+ * summary text: the id, score, trust, source, timestamp and tags, the
284
+ * pipe separators (TOON) or field names and quotes (JSON), the optional
285
+ * citation token, and the optional fidelity field.
286
+ *
287
+ * The count is derived from the real serializers (`JSON.stringify`,
288
+ * `packToToon`'s row layout, `serializeCompactRows`'s field order), so
289
+ * the enforced budget tracks the bytes a consumer actually pays for
290
+ * rather than the memory text alone.
291
+ *
292
+ * Two documented approximations, both in the conservative direction:
293
+ * - Compact TOON rows carry numeric placeholder fields (`0`), so the
294
+ * epoch-delta digits are undercounted by ~1 token.
295
+ * - Compact TOON references tags through the header dictionary when
296
+ * that is a net win; this charges the literal tags.
297
+ *
298
+ * @param item — The pack item (or a partial one) being costed.
299
+ * @param wireFormat — Target format; `undefined` returns the legacy
300
+ * flat estimate.
301
+ * @param tokenCounter — Token counter to measure the scaffolding with.
302
+ * @param withCitation — True when the pack is built with `citations`, so
303
+ * the `[mem:xxxx]` token is charged too (it is assigned after budget
304
+ * selection, so the caller must say whether it will exist).
305
+ */
306
+ export declare function itemWireOverheadTokens(item: ContextPackItem, wireFormat: ContextPackWireFormat | undefined, tokenCounter?: (text: string) => number, withCitation?: boolean): number;
307
+ /**
308
+ * Strip content bloat without losing meaning:
309
+ * - Collapse 3+ newlines to 2
310
+ * - Collapse 3+ spaces to 1
311
+ * - Strip trailing whitespace per line
312
+ * - Remove duplicate consecutive lines
313
+ * - Trim leading/trailing whitespace
314
+ *
315
+ * Returns the debloated text. If the text is short (<100 chars), returns
316
+ * it unchanged — debloating overhead isn't worth it for one-liners.
317
+ */
318
+ export declare function debloatContent(text: string): string;
319
+ /**
320
+ * Derived pack limits.
321
+ *
322
+ * `contextPack()` derives how many items to retrieve from the caller's
323
+ * `tokenBudget`. The old rule clamped the derived value at 50, which made
324
+ * a 200k-token context window buy exactly the same evidence volume as a
325
+ * 4k one — the window scaled, the memory layer didn't. The ceiling now
326
+ * grows with the budget up to {@link PACK_ITEM_LIMIT_MAX}, which is what
327
+ * a large window is actually paying for.
328
+ */
329
+ /** Budget assumed per packed item when deriving the item limit. */
330
+ export declare const PACK_TOKENS_PER_ITEM = 80;
331
+ /** Floor on the derived item limit (tiny budgets still get a real pack). */
332
+ export declare const PACK_ITEM_LIMIT_MIN = 8;
333
+ /**
334
+ * Absolute ceiling on the derived item limit, and therefore on the
335
+ * candidate pool (`limit * PACK_CANDIDATE_DEPTH_FACTOR` rows come back
336
+ * from storage). Bounds memory use no matter how large a budget a caller
337
+ * passes; 500 items of evidence is already more than fits in any
338
+ * practical prompt once the token budget itself is enforced.
339
+ */
340
+ export declare const PACK_ITEM_LIMIT_MAX = 500;
341
+ /**
342
+ * How many candidates the pack path fetches per item slot. A larger
343
+ * budget has to retrieve more candidates for budget trimming to have
344
+ * material to work with.
345
+ */
346
+ export declare const PACK_CANDIDATE_DEPTH_FACTOR = 4;
347
+ /**
348
+ * Derive the pack item limit from a token budget.
349
+ *
350
+ * Scales linearly (`tokenBudget / PACK_TOKENS_PER_ITEM`) between
351
+ * {@link PACK_ITEM_LIMIT_MIN} and {@link PACK_ITEM_LIMIT_MAX}. Budgets up
352
+ * to 4,000 tokens derive the historical value of 50, so small-budget
353
+ * packs are unchanged; larger windows now buy proportionally more
354
+ * evidence.
355
+ */
356
+ export declare function derivePackItemLimit(tokenBudget: number): number;
357
+ /**
358
+ * Derive the candidate depth (how many rows retrieval fetches) for a
359
+ * derived pack item limit.
360
+ */
361
+ export declare function derivePackCandidateDepth(limit: number): number;
362
+ /**
363
+ * Round a score to 3 decimals.
364
+ *
365
+ * Cache-prefix stability: fusion scores are float64 math, so two runs
366
+ * over the same memories can differ in the last bits
367
+ * (0.9499999999999999 vs 0.95). Rounding at build time keeps JSON and
368
+ * TOON output byte-identical across rebuilds, which is what lets
369
+ * provider prompt caches hit on the evidence block.
370
+ */
371
+ export declare function roundScore(score: number): number;
372
+ export declare function buildContextPack(opts: BuildContextPackOptions): ContextPack;
373
+ /**
374
+ * Serialize a ContextPack to TOON (Token-Optimized Object Notation).
375
+ *
376
+ * TOON is a compact, human-readable alternative to JSON for highly
377
+ * structured data. Each line is a pipe-delimited record with a stable
378
+ * field order: `id|score|trust|source|updatedAt|content|tags`.
379
+ *
380
+ * Format:
381
+ * # ai-trio.memos.context-pack.v1
382
+ * # toon:pipe-delimited|q=<query>|n=<namespace>|b=<tokenBudget>|s=<tokensSaved>
383
+ * # fields: id|score|trust|source|updatedAt|tags|content
384
+ * mem_abc123|0.95|local|user_input|2026-06-18T12:00:00Z|user;preference|User likes dark mode
385
+ * mem_def456|0.87|local|user_input|2026-06-18T11:30:00Z|work|User works at Google
386
+ * # q=<query>
387
+ *
388
+ * The trailer line repeats the query AFTER the evidence block (the header
389
+ * already states it BEFORE) — a reader scanning bottom-up re-anchors on
390
+ * the query. It is a `#` comment line, so line-based consumers skip it.
391
+ *
392
+ * Token savings vs JSON: 60-90% on typical context packs (where JSON
393
+ * overhead like braces, quotes, and field names dominate).
394
+ *
395
+ * Fidelity: when the pack was built with the `fidelity` option, a
396
+ * `# fidelity=<level>` header line is emitted so the rendered level is
397
+ * visible (and cacheable) in the serialized form.
398
+ *
399
+ * @param pack — The ContextPack to serialize.
400
+ * @returns A TOON-formatted string.
401
+ */
402
+ export declare function packToToon(pack: ContextPack): string;
403
+ /**
404
+ * Serialize an array of ScoredMemory to TOON (Token-Optimized Object Notation).
405
+ *
406
+ * @param results — Array of scored memories from a search.
407
+ * @returns A TOON-formatted string.
408
+ */
409
+ export declare function searchResultsToToon(results: ScoredMemory[]): string;
410
+ /**
411
+ * Serialize a ContextPack in the requested format.
412
+ *
413
+ * @param pack — The ContextPack to serialize.
414
+ * @param format — "json" returns the pack object as-is.
415
+ * "toon" returns verbose pipe-delimited.
416
+ * "toon-compact" returns ultra-compact pipe-delimited.
417
+ * @param tokenCounter — Optional custom token counter for budget
418
+ * enforcement in compact mode.
419
+ * @param maxTokens — Optional hard ceiling on the rendered token count,
420
+ * honoured by the compact TOON serializer (`packToToonCompact`). Ignored
421
+ * for "json" (an object has no length to trim) and "toon".
422
+ * @returns The pack object (for json) or a string (for toon formats).
423
+ */
424
+ export declare function serializeContextPack(pack: ContextPack, format: "json" | "toon" | "toon-compact", tokenCounter?: (text: string) => number, maxTokens?: number): ContextPack | string;
425
+ /**
426
+ * Losslessly shorten a memory ID for the wire.
427
+ *
428
+ * Canonical dashed UUIDs are re-packed as base64url under a `~` marker
429
+ * (36 chars -> 24). Other pure-hex even-length IDs (except 32-hex, which
430
+ * would be indistinguishable from UUID bodies on decode) are packed the
431
+ * same way. Any other shape passes through unchanged; a literal leading
432
+ * `~` is escaped as `~~` so the decoder can always tell encoded from raw.
433
+ *
434
+ * Decode rule: a decoded hex body of exactly 32 chars is re-dashed to the
435
+ * canonical 8-4-4-4-12 UUID form; anything shorter stays plain hex. That
436
+ * is why bare 32-hex IDs are excluded from encoding above.
437
+ */
438
+ export declare function encodeCompactId(id: string): string;
439
+ /**
440
+ * Inverse of {@link encodeCompactId}. Unknown shapes are returned as-is so
441
+ * hand-written or foreign IDs survive untouched.
442
+ */
443
+ export declare function decodeCompactId(wire: string): string;
444
+ /**
445
+ * Serialize a ContextPack to ultra-compact TOON format (v2).
446
+ *
447
+ * Layout:
448
+ * # memos.search.v2|e=<minEpoch>|t=<tagDict>
449
+ * # f=~id|s|t|c|e|g|ct
450
+ * ~Ab3xZ9|950|9|ui|-86400|0;2|User likes dark mode
451
+ * # q=<query> <- pack path only: query trailer for
452
+ * bottom-up readers; skipped by the parser
453
+ *
454
+ * Optimizations vs the v1 compact format:
455
+ * 1. IDs: pure-hex IDs (incl. dashed UUIDs) re-packed to base64url with a
456
+ * `~` prefix (36-char UUID -> 24 chars); other shapes pass through.
457
+ * 2. Timestamps: delta-encoded from a header epoch anchor `e=` (rows with
458
+ * the smallest timestamp store 0).
459
+ * 3. Tags: a per-call dictionary in the header (`t=a,b,c`), rows reference
460
+ * tags by index; falls back to literal tags when the dictionary is not
461
+ * a net win.
462
+ * 4. Carried over from v1: integer scores (x1000), 0-9 trust digit,
463
+ * 2-char source codes, single-char field legend.
464
+ *
465
+ * Round-trip: `parseToonCompact` restores the original IDs (dashed UUIDs
466
+ * re-dashed), absolute timestamps, and tag names exactly.
467
+ *
468
+ * @param pack — The ContextPack to serialize.
469
+ * @param tokenCounter — Optional custom token counter. Used only when
470
+ * `maxTokens` is set, to measure the rendered wire cost.
471
+ * @param maxTokens — Optional hard ceiling on the rendered token count.
472
+ * When the full pack exceeds it, the items are first re-rendered through
473
+ * `compressText` and re-checked: if the compressed pack fits, it is
474
+ * returned whole — COMPRESS BEFORE DROP. Only when compression is not
475
+ * enough are items dropped lowest-score-first until the output fits, and
476
+ * those drops are taken from the ALREADY compressed set, so no fact is
477
+ * ever discarded before it has been given the chance to fit. Trimming is
478
+ * by SCORE, not by list position, so the U-shape pin (second-best item,
479
+ * pinned last) is never the first casualty. If even the single best item
480
+ * is over budget it is still emitted — an over-budget answer carrying
481
+ * the top fact beats an empty evidence block. Omitted (the default)
482
+ * serializes the whole pack, exactly as before.
483
+ * @returns A compact TOON-formatted string.
484
+ */
485
+ export declare function packToToonCompact(pack: ContextPack, tokenCounter?: (text: string) => number, maxTokens?: number): string;
486
+ /**
487
+ * Serialize search results to compact TOON format (v2). See
488
+ * {@link packToToonCompact} for the wire layout.
489
+ */
490
+ export declare function searchResultsToToonCompact(results: ScoredMemory[]): string;
491
+ /**
492
+ * Decode a v2 (or v1) compact TOON string back into ContextPackItem objects.
493
+ *
494
+ * v2 headers carry an epoch anchor (`e=`) and optional tag dictionary
495
+ * (`t=`); rows reference tags by index when the dictionary is present.
496
+ * v1 strings (no `e=` in the header) keep their absolute-epoch semantics.
497
+ *
498
+ * All `#` comment lines are skipped — including the query trailer
499
+ * (`# q=<query>`) that pack serializers append after the last evidence
500
+ * row, so packs round-trip with the trailer intact-but-ignored.
501
+ *
502
+ * @param toon — The compact TOON string (header lines are skipped).
503
+ * @returns Array of decoded ContextPackItem objects.
504
+ */
505
+ export declare function parseToonCompact(toon: string): ContextPackItem[];
506
+ //# sourceMappingURL=context-pack.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"context-pack.d.ts","sourceRoot":"","sources":["../src/context-pack.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,OAAO,KAAK,EACV,6BAA6B,EAC7B,qBAAqB,EACrB,eAAe,EACf,eAAe,EACf,eAAe,EACf,YAAY,EACb,MAAM,YAAY,CAAC;AACpB,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAkBnD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAInD;;;;;;;;;;;;;GAaG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE;IACtC,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACpC,GAAG,eAAe,GAAG,IAAI,CAQzB;AAED,iEAAiE;AACjE,eAAO,MAAM,mBAAmB,kCAAkC,CAAC;AAEnE,kDAAkD;AAClD,MAAM,WAAW,eAAe;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX;;;OAGG;IAC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