@yugenlab/vaayu 0.1.9 → 0.1.11

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 (43) hide show
  1. package/chunks/{agentic-tool-loop-2FZK72JO.js → agentic-tool-loop-O3NUV7KG.js} +1 -1
  2. package/chunks/{chunk-UZ6OIVEC.js → chunk-2OBLQJYJ.js} +1 -1
  3. package/chunks/{chunk-PJEYJQ2C.js → chunk-3AYSJ7WB.js} +30 -18
  4. package/chunks/{chunk-U62ABYKD.js → chunk-67DXWEKG.js} +3 -3
  5. package/chunks/{chunk-6556EKOB.js → chunk-7AYYXHYZ.js} +25 -24
  6. package/chunks/{chunk-IGBRBFXX.js → chunk-7XV5ISV7.js} +7 -5
  7. package/chunks/{chunk-JAWZ7ANC.js → chunk-A3HOZBC5.js} +11 -7
  8. package/chunks/{chunk-LVE2EOOH.js → chunk-D46QTN3G.js} +126 -136
  9. package/chunks/{chunk-PRXQW76U.js → chunk-EG37M4QL.js} +17 -6
  10. package/chunks/{chunk-7UOXFHEB.js → chunk-F6RNEGFX.js} +480 -432
  11. package/chunks/{chunk-MJ74G5RB.js → chunk-G2QREGXK.js} +2 -2
  12. package/chunks/{chunk-DOQMEQ5S.js → chunk-JZTFJE7M.js} +39 -39
  13. package/chunks/{chunk-S2HDNNC7.js → chunk-LJUEMPLG.js} +638 -679
  14. package/chunks/{chunk-C76USAC5.js → chunk-QFGAB4XD.js} +13 -5
  15. package/chunks/{chunk-D3RVJGO7.js → chunk-QV4GPIPT.js} +118 -135
  16. package/chunks/{chunk-YJRXLRTE.js → chunk-V2ZIKDN4.js} +9 -8
  17. package/chunks/{chunk-YSC77CKZ.js → chunk-VCUJES75.js} +3276 -3526
  18. package/chunks/{chunk-OBYBBGHA.js → chunk-W4PVGBUH.js} +190 -189
  19. package/chunks/chunk-Z576WVLG.js +434 -0
  20. package/chunks/{chunk-NHRBVSN3.js → chunk-ZYY6N3SP.js} +117 -110
  21. package/chunks/{consolidation-indexer-CD6DS2HO.js → consolidation-indexer-VIWOP6VO.js} +8 -8
  22. package/chunks/{day-consolidation-U3X6P4ZG.js → day-consolidation-HMHSXIOM.js} +8 -4
  23. package/chunks/{src-ZAKUL232.js → dist-CY5NX2IK.js} +17 -17
  24. package/chunks/graphrag-T2QWNX57.js +14 -0
  25. package/chunks/{hierarchical-temporal-search-ETXYYJZK.js → hierarchical-temporal-search-U6DG74IR.js} +2 -2
  26. package/chunks/hybrid-search-BYTXCOXP.js +20 -0
  27. package/chunks/{memory-store-A6WOWLWC.js → memory-store-LEERUQGL.js} +3 -3
  28. package/chunks/periodic-consolidation-D6SSKZ7H.js +11 -0
  29. package/chunks/{postgres-WLH3D5HG.js → postgres-7GZDDX77.js} +2 -2
  30. package/chunks/{recall-IUPQCBYP.js → recall-LNRQVATQ.js} +7 -7
  31. package/chunks/search-BIODUW2P.js +19 -0
  32. package/chunks/{session-store-NDUDYAC7.js → session-store-O3TS7DUY.js} +5 -5
  33. package/chunks/{sqlite-DHUQGPR5.js → sqlite-7BC4DJTN.js} +2 -2
  34. package/chunks/vasana-engine-BJFHJVGM.js +30 -0
  35. package/gateway.js +31671 -24786
  36. package/package.json +1 -1
  37. package/pair-cli.js +1 -1
  38. package/chunks/chunk-TEQKXGIK.js +0 -752
  39. package/chunks/graphrag-LAZSXLLI.js +0 -14
  40. package/chunks/hybrid-search-TX6T3KYH.js +0 -20
  41. package/chunks/periodic-consolidation-4MACZE6S.js +0 -11
  42. package/chunks/search-HHSVHBXC.js +0 -19
  43. package/chunks/vasana-engine-G6BPOFX7.js +0 -10
@@ -5803,14 +5803,14 @@ var TwitterAdapter = class {
5803
5803
  };
5804
5804
 
5805
5805
  export {
5806
+ require_lib,
5806
5807
  TelegramAdapter,
5807
5808
  WhatsAppAdapter,
5808
5809
  IMessageAdapter,
5809
5810
  TwitterAdapter,
5810
5811
  generateMantra,
5811
5812
  validateMantra,
5812
- require_lib,
5813
5813
  renderPairDisplay,
5814
5814
  renderPairStatus
5815
5815
  };
5816
- //# sourceMappingURL=chunk-MJ74G5RB.js.map
5816
+ //# sourceMappingURL=chunk-G2QREGXK.js.map
@@ -1,20 +1,20 @@
1
1
  import {
2
2
  blobToVector,
3
3
  vectorToBlob
4
- } from "./chunk-LVE2EOOH.js";
4
+ } from "./chunk-D46QTN3G.js";
5
5
  import {
6
6
  EmbeddingService,
7
7
  cosineSimilarity,
8
8
  fallbackEmbedding
9
- } from "./chunk-JAWZ7ANC.js";
9
+ } from "./chunk-A3HOZBC5.js";
10
10
  import {
11
11
  initVectorsSchema
12
- } from "./chunk-YJRXLRTE.js";
12
+ } from "./chunk-V2ZIKDN4.js";
13
13
  import {
14
14
  DatabaseManager
15
- } from "./chunk-U62ABYKD.js";
15
+ } from "./chunk-67DXWEKG.js";
16
16
 
17
- // ../chitragupta/packages/smriti/src/consolidation-indexer.ts
17
+ // ../chitragupta/packages/smriti/dist/consolidation-indexer.js
18
18
  var _embeddingService = null;
19
19
  function getEmbeddingService() {
20
20
  if (!_embeddingService) {
@@ -76,16 +76,21 @@ function extractSummaryText(markdown, level) {
76
76
  } else if (trimmed.startsWith("- **Sessions**:") || trimmed.startsWith("- **Turns**:") || trimmed.startsWith("- **Estimated Cost**:")) {
77
77
  parts.push(trimmed.replace(/^-\s*/, "").replace(/\*\*/g, ""));
78
78
  }
79
- if (trimmed === "## Recommendations") inRecommendations = true;
80
- else if (trimmed.startsWith("## ") && inRecommendations) inRecommendations = false;
79
+ if (trimmed === "## Recommendations")
80
+ inRecommendations = true;
81
+ else if (trimmed.startsWith("## ") && inRecommendations)
82
+ inRecommendations = false;
81
83
  if (inRecommendations && trimmed.startsWith("- ")) {
82
84
  parts.push(trimmed.replace(/^-\s*/, ""));
83
85
  }
84
- if (trimmed === "## Vasanas Crystallized") inVasanas = true;
85
- else if (trimmed.startsWith("## ") && trimmed !== "## Vasanas Crystallized") inVasanas = false;
86
+ if (trimmed === "## Vasanas Crystallized")
87
+ inVasanas = true;
88
+ else if (trimmed.startsWith("## ") && trimmed !== "## Vasanas Crystallized")
89
+ inVasanas = false;
86
90
  if (inVasanas && trimmed.startsWith("|") && !trimmed.startsWith("|--") && !trimmed.startsWith("| Tendency")) {
87
91
  const cells = trimmed.split("|").filter(Boolean).map((c) => c.trim());
88
- if (cells[0]) parts.push(`Vasana: ${cells[0]}`);
92
+ if (cells[0])
93
+ parts.push(`Vasana: ${cells[0]}`);
89
94
  }
90
95
  }
91
96
  } else {
@@ -97,8 +102,10 @@ function extractSummaryText(markdown, level) {
97
102
  } else if (trimmed.startsWith("- **Sessions**:") || trimmed.startsWith("- **Vasanas Crystallized**:")) {
98
103
  parts.push(trimmed.replace(/^-\s*/, "").replace(/\*\*/g, ""));
99
104
  }
100
- if (trimmed === "## Trends") inTrends = true;
101
- else if (trimmed.startsWith("## ") && trimmed !== "## Trends") inTrends = false;
105
+ if (trimmed === "## Trends")
106
+ inTrends = true;
107
+ else if (trimmed.startsWith("## ") && trimmed !== "## Trends")
108
+ inTrends = false;
102
109
  if (inTrends && trimmed.startsWith("- ")) {
103
110
  parts.push(trimmed.replace(/^-\s*/, ""));
104
111
  }
@@ -108,7 +115,8 @@ function extractSummaryText(markdown, level) {
108
115
  }
109
116
  async function indexConsolidationSummary(level, period, markdown, project) {
110
117
  const summaryText = extractSummaryText(markdown, level);
111
- if (!summaryText || summaryText.length < 10) return;
118
+ if (!summaryText || summaryText.length < 10)
119
+ return;
112
120
  let embedding;
113
121
  try {
114
122
  const svc = getEmbeddingService();
@@ -124,16 +132,7 @@ async function indexConsolidationSummary(level, period, markdown, project) {
124
132
  db.prepare(`
125
133
  INSERT OR REPLACE INTO embeddings (id, vector, text, source_type, source_id, dimensions, metadata, created_at)
126
134
  VALUES (?, ?, ?, ?, ?, ?, ?, ?)
127
- `).run(
128
- id,
129
- vectorToBlob(embedding),
130
- summaryText.slice(0, 5e3),
131
- sourceType,
132
- sourceId,
133
- embedding.length,
134
- JSON.stringify({ level, period, project: project ?? null }),
135
- Date.now()
136
- );
135
+ `).run(id, vectorToBlob(embedding), summaryText.slice(0, 5e3), sourceType, sourceId, embedding.length, JSON.stringify({ level, period, project: project ?? null }), Date.now());
137
136
  } catch {
138
137
  }
139
138
  }
@@ -149,10 +148,8 @@ async function searchConsolidationSummaries(query, level, options) {
149
148
  const sourceType = `${level}_summary`;
150
149
  try {
151
150
  const db = getVectorsDb();
152
- const rows = db.prepare(
153
- `SELECT id, vector, text, source_type, source_id, metadata
154
- FROM embeddings WHERE source_type = ?`
155
- ).all(sourceType);
151
+ const rows = db.prepare(`SELECT id, vector, text, source_type, source_id, metadata
152
+ FROM embeddings WHERE source_type = ?`).all(sourceType);
156
153
  const scored = [];
157
154
  for (const row of rows) {
158
155
  let meta = {};
@@ -160,7 +157,8 @@ async function searchConsolidationSummaries(query, level, options) {
160
157
  meta = JSON.parse(row.metadata ?? "{}");
161
158
  } catch {
162
159
  }
163
- if (options?.project && meta.project && meta.project !== options.project) continue;
160
+ if (options?.project && meta.project && meta.project !== options.project)
161
+ continue;
164
162
  const vector = blobToVector(row.vector);
165
163
  const score = cosineSimilarity(queryEmbedding, vector);
166
164
  if (score > 0.1) {
@@ -182,15 +180,14 @@ async function backfillConsolidationIndices() {
182
180
  const counts = { daily: 0, monthly: 0, yearly: 0 };
183
181
  try {
184
182
  const db = getVectorsDb();
185
- const existing = new Set(
186
- db.prepare("SELECT id FROM embeddings WHERE source_type IN ('daily_summary', 'monthly_summary', 'yearly_summary')").all().map((r) => r.id)
187
- );
183
+ const existing = new Set(db.prepare("SELECT id FROM embeddings WHERE source_type IN ('daily_summary', 'monthly_summary', 'yearly_summary')").all().map((r) => r.id));
188
184
  try {
189
- const { listDayFiles, readDayFile } = await import("./day-consolidation-U3X6P4ZG.js");
185
+ const { listDayFiles, readDayFile } = await import("./day-consolidation-HMHSXIOM.js");
190
186
  const dayFiles = listDayFiles();
191
187
  for (const date of dayFiles) {
192
188
  const id = buildEmbeddingId("daily", date);
193
- if (existing.has(id)) continue;
189
+ if (existing.has(id))
190
+ continue;
194
191
  const content = readDayFile(date);
195
192
  if (content && content.length > 20) {
196
193
  await indexConsolidationSummary("daily", date, content);
@@ -200,8 +197,8 @@ async function backfillConsolidationIndices() {
200
197
  } catch {
201
198
  }
202
199
  try {
203
- const { PeriodicConsolidation } = await import("./periodic-consolidation-4MACZE6S.js");
204
- const { listSessionProjects } = await import("./session-store-NDUDYAC7.js");
200
+ const { PeriodicConsolidation } = await import("./periodic-consolidation-D6SSKZ7H.js");
201
+ const { listSessionProjects } = await import("./session-store-O3TS7DUY.js");
205
202
  const projectEntries = listSessionProjects();
206
203
  for (const entry of projectEntries) {
207
204
  const project = entry.project;
@@ -210,14 +207,17 @@ async function backfillConsolidationIndices() {
210
207
  for (const report of reports) {
211
208
  const level = report.type === "monthly" ? "monthly" : "yearly";
212
209
  const id = buildEmbeddingId(level, report.period, project);
213
- if (existing.has(id)) continue;
210
+ if (existing.has(id))
211
+ continue;
214
212
  try {
215
213
  const fs = await import("node:fs");
216
214
  const content = fs.readFileSync(report.path, "utf-8");
217
215
  if (content && content.length > 20) {
218
216
  await indexConsolidationSummary(level, report.period, content, project);
219
- if (level === "monthly") counts.monthly++;
220
- else counts.yearly++;
217
+ if (level === "monthly")
218
+ counts.monthly++;
219
+ else
220
+ counts.yearly++;
221
221
  }
222
222
  } catch {
223
223
  }
@@ -237,4 +237,4 @@ export {
237
237
  searchConsolidationSummaries,
238
238
  backfillConsolidationIndices
239
239
  };
240
- //# sourceMappingURL=chunk-DOQMEQ5S.js.map
240
+ //# sourceMappingURL=chunk-JZTFJE7M.js.map