@yugenlab/vaayu 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.
Files changed (41) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +365 -0
  3. package/chunks/chunk-E5A3SCDJ.js +246 -0
  4. package/chunks/chunk-G5VYCA6O.js +69 -0
  5. package/chunks/chunk-H76V36OF.js +1029 -0
  6. package/chunks/chunk-HAPVUJ6A.js +238 -0
  7. package/chunks/chunk-IEKAYVA3.js +137 -0
  8. package/chunks/chunk-IGKYKEKT.js +43 -0
  9. package/chunks/chunk-IIET2K6D.js +7728 -0
  10. package/chunks/chunk-ITIVYGUG.js +347 -0
  11. package/chunks/chunk-JAWZ7ANC.js +208 -0
  12. package/chunks/chunk-JZU37VQ5.js +714 -0
  13. package/chunks/chunk-KC6NRZ7U.js +198 -0
  14. package/chunks/chunk-KDRROLVN.js +433 -0
  15. package/chunks/chunk-L7JICQBW.js +1006 -0
  16. package/chunks/chunk-MINFB5LT.js +1479 -0
  17. package/chunks/chunk-MJ74G5RB.js +5816 -0
  18. package/chunks/chunk-S4TBVCL2.js +2158 -0
  19. package/chunks/chunk-SMVJRPAH.js +2753 -0
  20. package/chunks/chunk-U6OLJ36B.js +438 -0
  21. package/chunks/chunk-URGEODS5.js +752 -0
  22. package/chunks/chunk-YSU3BWV6.js +123 -0
  23. package/chunks/consolidation-indexer-TOTTDZXW.js +21 -0
  24. package/chunks/day-consolidation-NKO63HZQ.js +24 -0
  25. package/chunks/graphrag-ZI2FSU7S.js +13 -0
  26. package/chunks/hierarchical-temporal-search-ZD46UMKR.js +8 -0
  27. package/chunks/hybrid-search-ZVLZVGFS.js +19 -0
  28. package/chunks/memory-store-KNJPMBLQ.js +17 -0
  29. package/chunks/periodic-consolidation-BPKOZDGB.js +10 -0
  30. package/chunks/postgres-3ZXBYTPC.js +8 -0
  31. package/chunks/recall-GMVHWQWW.js +20 -0
  32. package/chunks/search-7HZETVMZ.js +18 -0
  33. package/chunks/session-store-XKPGKXUS.js +44 -0
  34. package/chunks/sqlite-JPF5TICX.js +152 -0
  35. package/chunks/src-6GVZTUH6.js +12 -0
  36. package/chunks/src-QAXOD5SB.js +273 -0
  37. package/chunks/suncalc-NOHGYHDU.js +186 -0
  38. package/chunks/tree-RSHKDTCR.js +10 -0
  39. package/gateway.js +61944 -0
  40. package/package.json +51 -0
  41. package/pair-cli.js +133 -0
@@ -0,0 +1,123 @@
1
+ // ../chitragupta/packages/smriti/src/hierarchical-temporal-search.ts
2
+ var DEPTH_BOOST = {
3
+ yearly: 0.6,
4
+ monthly: 0.8,
5
+ daily: 1
6
+ };
7
+ async function hierarchicalTemporalSearch(query, options) {
8
+ const limit = options?.limit ?? 10;
9
+ const results = [];
10
+ const { searchConsolidationSummaries } = await import("./consolidation-indexer-TOTTDZXW.js");
11
+ const yearlyHits = await searchConsolidationSummaries(query, "yearly", {
12
+ limit: 3,
13
+ project: options?.project
14
+ });
15
+ if (yearlyHits.length === 0) {
16
+ const monthlyHits = await searchConsolidationSummaries(query, "monthly", {
17
+ limit: 6,
18
+ project: options?.project
19
+ });
20
+ if (monthlyHits.length === 0) {
21
+ const dailyHits = await searchConsolidationSummaries(query, "daily", {
22
+ limit,
23
+ project: options?.project
24
+ });
25
+ if (dailyHits.length === 0) return [];
26
+ for (const hit of dailyHits) {
27
+ results.push({
28
+ score: hit.score * DEPTH_BOOST.daily,
29
+ period: hit.period,
30
+ level: "daily",
31
+ snippet: hit.snippet,
32
+ date: hit.period,
33
+ project: hit.project
34
+ });
35
+ }
36
+ return deduplicateAndSort(results, limit);
37
+ }
38
+ for (const monthHit of monthlyHits) {
39
+ results.push({
40
+ score: monthHit.score * DEPTH_BOOST.monthly,
41
+ period: monthHit.period,
42
+ level: "monthly",
43
+ snippet: monthHit.snippet,
44
+ project: monthHit.project
45
+ });
46
+ const dailyHits = await searchConsolidationSummaries(query, "daily", {
47
+ limit: 5,
48
+ project: options?.project
49
+ });
50
+ for (const dayHit of dailyHits) {
51
+ if (dayHit.period.startsWith(monthHit.period)) {
52
+ results.push({
53
+ score: dayHit.score * DEPTH_BOOST.daily,
54
+ period: dayHit.period,
55
+ level: "daily",
56
+ snippet: dayHit.snippet,
57
+ date: dayHit.period,
58
+ project: dayHit.project
59
+ });
60
+ }
61
+ }
62
+ }
63
+ return deduplicateAndSort(results, limit);
64
+ }
65
+ for (const yearHit of yearlyHits) {
66
+ results.push({
67
+ score: yearHit.score * DEPTH_BOOST.yearly,
68
+ period: yearHit.period,
69
+ level: "yearly",
70
+ snippet: yearHit.snippet,
71
+ project: yearHit.project
72
+ });
73
+ const monthlyHits = await searchConsolidationSummaries(query, "monthly", {
74
+ limit: 3,
75
+ project: options?.project
76
+ });
77
+ for (const monthHit of monthlyHits) {
78
+ if (monthHit.period.startsWith(yearHit.period)) {
79
+ results.push({
80
+ score: monthHit.score * DEPTH_BOOST.monthly,
81
+ period: monthHit.period,
82
+ level: "monthly",
83
+ snippet: monthHit.snippet,
84
+ project: monthHit.project
85
+ });
86
+ const dailyHits = await searchConsolidationSummaries(query, "daily", {
87
+ limit: 5,
88
+ project: options?.project
89
+ });
90
+ for (const dayHit of dailyHits) {
91
+ if (dayHit.period.startsWith(monthHit.period)) {
92
+ results.push({
93
+ score: dayHit.score * DEPTH_BOOST.daily,
94
+ period: dayHit.period,
95
+ level: "daily",
96
+ snippet: dayHit.snippet,
97
+ date: dayHit.period,
98
+ project: dayHit.project
99
+ });
100
+ }
101
+ }
102
+ }
103
+ }
104
+ }
105
+ return deduplicateAndSort(results, limit);
106
+ }
107
+ function deduplicateAndSort(results, limit) {
108
+ const seen = /* @__PURE__ */ new Set();
109
+ const unique = [];
110
+ results.sort((a, b) => b.score - a.score);
111
+ for (const r of results) {
112
+ const key = `${r.level}:${r.period}`;
113
+ if (seen.has(key)) continue;
114
+ seen.add(key);
115
+ unique.push(r);
116
+ }
117
+ return unique.slice(0, limit);
118
+ }
119
+
120
+ export {
121
+ hierarchicalTemporalSearch
122
+ };
123
+ //# sourceMappingURL=chunk-YSU3BWV6.js.map
@@ -0,0 +1,21 @@
1
+ import {
2
+ _resetConsolidationIndexer,
3
+ backfillConsolidationIndices,
4
+ extractSummaryText,
5
+ indexConsolidationSummary,
6
+ searchConsolidationSummaries
7
+ } from "./chunk-HAPVUJ6A.js";
8
+ import "./chunk-JZU37VQ5.js";
9
+ import "./chunk-JAWZ7ANC.js";
10
+ import "./chunk-L7JICQBW.js";
11
+ import "./chunk-U6OLJ36B.js";
12
+ import "./chunk-KC6NRZ7U.js";
13
+ import "./chunk-IGKYKEKT.js";
14
+ export {
15
+ _resetConsolidationIndexer,
16
+ backfillConsolidationIndices,
17
+ extractSummaryText,
18
+ indexConsolidationSummary,
19
+ searchConsolidationSummaries
20
+ };
21
+ //# sourceMappingURL=consolidation-indexer-TOTTDZXW.js.map
@@ -0,0 +1,24 @@
1
+ import {
2
+ consolidateDay,
3
+ getDayFilePath,
4
+ getDaysRoot,
5
+ getUnconsolidatedDates,
6
+ isDayConsolidated,
7
+ listDayFiles,
8
+ readDayFile,
9
+ searchDayFiles
10
+ } from "./chunk-H76V36OF.js";
11
+ import "./chunk-JAWZ7ANC.js";
12
+ import "./chunk-KC6NRZ7U.js";
13
+ import "./chunk-IGKYKEKT.js";
14
+ export {
15
+ consolidateDay,
16
+ getDayFilePath,
17
+ getDaysRoot,
18
+ getUnconsolidatedDates,
19
+ isDayConsolidated,
20
+ listDayFiles,
21
+ readDayFile,
22
+ searchDayFiles
23
+ };
24
+ //# sourceMappingURL=day-consolidation-NKO63HZQ.js.map
@@ -0,0 +1,13 @@
1
+ import {
2
+ GraphRAGEngine,
3
+ migrateGraphJson
4
+ } from "./chunk-S4TBVCL2.js";
5
+ import "./chunk-JAWZ7ANC.js";
6
+ import "./chunk-U6OLJ36B.js";
7
+ import "./chunk-KC6NRZ7U.js";
8
+ import "./chunk-IGKYKEKT.js";
9
+ export {
10
+ GraphRAGEngine,
11
+ migrateGraphJson
12
+ };
13
+ //# sourceMappingURL=graphrag-ZI2FSU7S.js.map
@@ -0,0 +1,8 @@
1
+ import {
2
+ hierarchicalTemporalSearch
3
+ } from "./chunk-YSU3BWV6.js";
4
+ import "./chunk-IGKYKEKT.js";
5
+ export {
6
+ hierarchicalTemporalSearch
7
+ };
8
+ //# sourceMappingURL=hierarchical-temporal-search-ZD46UMKR.js.map
@@ -0,0 +1,19 @@
1
+ import {
2
+ HybridSearchEngine,
3
+ HybridWeightLearner,
4
+ PRAMANA_RELIABILITY,
5
+ shouldRetrieve
6
+ } from "./chunk-KDRROLVN.js";
7
+ import "./chunk-ITIVYGUG.js";
8
+ import "./chunk-E5A3SCDJ.js";
9
+ import "./chunk-L7JICQBW.js";
10
+ import "./chunk-U6OLJ36B.js";
11
+ import "./chunk-KC6NRZ7U.js";
12
+ import "./chunk-IGKYKEKT.js";
13
+ export {
14
+ HybridSearchEngine,
15
+ HybridWeightLearner,
16
+ PRAMANA_RELIABILITY,
17
+ shouldRetrieve
18
+ };
19
+ //# sourceMappingURL=hybrid-search-ZVLZVGFS.js.map
@@ -0,0 +1,17 @@
1
+ import {
2
+ appendMemory,
3
+ deleteMemory,
4
+ getMemory,
5
+ listMemoryScopes,
6
+ updateMemory
7
+ } from "./chunk-E5A3SCDJ.js";
8
+ import "./chunk-KC6NRZ7U.js";
9
+ import "./chunk-IGKYKEKT.js";
10
+ export {
11
+ appendMemory,
12
+ deleteMemory,
13
+ getMemory,
14
+ listMemoryScopes,
15
+ updateMemory
16
+ };
17
+ //# sourceMappingURL=memory-store-KNJPMBLQ.js.map
@@ -0,0 +1,10 @@
1
+ import {
2
+ PeriodicConsolidation
3
+ } from "./chunk-URGEODS5.js";
4
+ import "./chunk-U6OLJ36B.js";
5
+ import "./chunk-KC6NRZ7U.js";
6
+ import "./chunk-IGKYKEKT.js";
7
+ export {
8
+ PeriodicConsolidation
9
+ };
10
+ //# sourceMappingURL=periodic-consolidation-BPKOZDGB.js.map
@@ -0,0 +1,8 @@
1
+ import {
2
+ PostgresStorage
3
+ } from "./chunk-MINFB5LT.js";
4
+ import "./chunk-IGKYKEKT.js";
5
+ export {
6
+ PostgresStorage
7
+ };
8
+ //# sourceMappingURL=postgres-3ZXBYTPC.js.map
@@ -0,0 +1,20 @@
1
+ import {
2
+ RecallEngine,
3
+ _resetRecallDbInit,
4
+ blobToVector,
5
+ migrateEmbeddingsJson,
6
+ vectorToBlob
7
+ } from "./chunk-JZU37VQ5.js";
8
+ import "./chunk-JAWZ7ANC.js";
9
+ import "./chunk-L7JICQBW.js";
10
+ import "./chunk-U6OLJ36B.js";
11
+ import "./chunk-KC6NRZ7U.js";
12
+ import "./chunk-IGKYKEKT.js";
13
+ export {
14
+ RecallEngine,
15
+ _resetRecallDbInit,
16
+ blobToVector,
17
+ migrateEmbeddingsJson,
18
+ vectorToBlob
19
+ };
20
+ //# sourceMappingURL=recall-GMVHWQWW.js.map
@@ -0,0 +1,18 @@
1
+ import {
2
+ _resetSearchDbInit,
3
+ sanitizeFts5Query,
4
+ searchMemory,
5
+ searchSessions
6
+ } from "./chunk-ITIVYGUG.js";
7
+ import "./chunk-E5A3SCDJ.js";
8
+ import "./chunk-L7JICQBW.js";
9
+ import "./chunk-U6OLJ36B.js";
10
+ import "./chunk-KC6NRZ7U.js";
11
+ import "./chunk-IGKYKEKT.js";
12
+ export {
13
+ _resetSearchDbInit,
14
+ sanitizeFts5Query,
15
+ searchMemory,
16
+ searchSessions
17
+ };
18
+ //# sourceMappingURL=search-7HZETVMZ.js.map
@@ -0,0 +1,44 @@
1
+ import {
2
+ _getDbStatus,
3
+ _resetDbInit,
4
+ _resetSessionCache,
5
+ addTurn,
6
+ createSession,
7
+ deleteSession,
8
+ findSessionByMetadata,
9
+ getMaxTurnNumber,
10
+ listSessionDates,
11
+ listSessionProjects,
12
+ listSessions,
13
+ listSessionsByDate,
14
+ listSessionsByDateRange,
15
+ listTurnsWithTimestamps,
16
+ loadSession,
17
+ migrateExistingSessions,
18
+ saveSession,
19
+ updateSessionMeta
20
+ } from "./chunk-L7JICQBW.js";
21
+ import "./chunk-U6OLJ36B.js";
22
+ import "./chunk-KC6NRZ7U.js";
23
+ import "./chunk-IGKYKEKT.js";
24
+ export {
25
+ _getDbStatus,
26
+ _resetDbInit,
27
+ _resetSessionCache,
28
+ addTurn,
29
+ createSession,
30
+ deleteSession,
31
+ findSessionByMetadata,
32
+ getMaxTurnNumber,
33
+ listSessionDates,
34
+ listSessionProjects,
35
+ listSessions,
36
+ listSessionsByDate,
37
+ listSessionsByDateRange,
38
+ listTurnsWithTimestamps,
39
+ loadSession,
40
+ migrateExistingSessions,
41
+ saveSession,
42
+ updateSessionMeta
43
+ };
44
+ //# sourceMappingURL=session-store-XKPGKXUS.js.map
@@ -0,0 +1,152 @@
1
+ import {
2
+ SqliteStorage,
3
+ allowChannel,
4
+ appendAudit,
5
+ appendSessionEvent,
6
+ appendTokenUsage,
7
+ clearSessionPrefs,
8
+ countSessionEvents,
9
+ createApprovalRequest,
10
+ createConnection,
11
+ createDevice,
12
+ createFact,
13
+ createMessage,
14
+ createSession,
15
+ createSession2,
16
+ createSummary,
17
+ deleteFact,
18
+ deleteReaction,
19
+ deleteSyncState,
20
+ getActiveSession,
21
+ getApprovalRequest,
22
+ getChannelAllow,
23
+ getDeviceById,
24
+ getDeviceByTokenHash,
25
+ getMemoryStats,
26
+ getReactionByMessageId,
27
+ getSchemaInfo,
28
+ getSessionById,
29
+ getSessionById2,
30
+ getSessionByKey,
31
+ getSessionPrefs,
32
+ getSessionSummary,
33
+ getSummary,
34
+ getSyncState,
35
+ getTokenUsageSummary,
36
+ getToolPolicy,
37
+ incrementPendingChanges,
38
+ initSchema,
39
+ listApprovalRequests,
40
+ listChannelAllows,
41
+ listDevices,
42
+ listFacts,
43
+ listMessages,
44
+ listReactionsBySession,
45
+ listSessionEvents,
46
+ listSessions,
47
+ listSessions2,
48
+ listSyncStates,
49
+ listTokenUsage,
50
+ markDeviceSynced,
51
+ prepareApprovalStatements,
52
+ prepareAuditStatements,
53
+ prepareChannelStatements,
54
+ prepareDeviceStatements,
55
+ prepareMemoryStatements,
56
+ prepareReactionStatements,
57
+ prepareSessionStatements,
58
+ prepareSyncStatements,
59
+ prepareTokenUsageStatements,
60
+ pruneMessages,
61
+ resetMemoryTables,
62
+ revokeChannel,
63
+ revokeDevice,
64
+ searchFacts,
65
+ setReaction,
66
+ setSessionPrefs,
67
+ setSessionSummary,
68
+ setToolPolicy,
69
+ touchDevice,
70
+ updateApprovalRequest,
71
+ updateDevice,
72
+ updateSession,
73
+ updateSession2,
74
+ updateSyncState
75
+ } from "./chunk-SMVJRPAH.js";
76
+ import "./chunk-IGKYKEKT.js";
77
+ export {
78
+ SqliteStorage,
79
+ allowChannel,
80
+ appendAudit,
81
+ appendSessionEvent,
82
+ appendTokenUsage,
83
+ clearSessionPrefs,
84
+ countSessionEvents,
85
+ createApprovalRequest,
86
+ createConnection,
87
+ createDevice,
88
+ createFact as createKnowledgeFact,
89
+ createMessage as createMemoryMessage,
90
+ createSession2 as createMemorySessionRecord,
91
+ createSummary as createMemorySummary,
92
+ createSession,
93
+ deleteFact as deleteKnowledgeFact,
94
+ deleteReaction,
95
+ deleteSyncState,
96
+ getApprovalRequest,
97
+ getChannelAllow,
98
+ getDeviceById,
99
+ getDeviceByTokenHash,
100
+ getActiveSession as getMemoryActiveSession,
101
+ getSessionById2 as getMemorySessionById,
102
+ getMemoryStats,
103
+ getSummary as getMemorySummary,
104
+ getReactionByMessageId,
105
+ getSchemaInfo,
106
+ getSessionById,
107
+ getSessionByKey,
108
+ getSessionPrefs,
109
+ getSessionSummary,
110
+ getSyncState,
111
+ getTokenUsageSummary,
112
+ getToolPolicy,
113
+ incrementPendingChanges,
114
+ initSchema,
115
+ listApprovalRequests,
116
+ listChannelAllows,
117
+ listDevices,
118
+ listFacts as listKnowledgeFacts,
119
+ listMessages as listMemoryMessages,
120
+ listSessions2 as listMemorySessions,
121
+ listReactionsBySession,
122
+ listSessionEvents,
123
+ listSessions,
124
+ listSyncStates,
125
+ listTokenUsage,
126
+ markDeviceSynced,
127
+ prepareApprovalStatements,
128
+ prepareAuditStatements,
129
+ prepareChannelStatements,
130
+ prepareDeviceStatements,
131
+ prepareMemoryStatements,
132
+ prepareReactionStatements,
133
+ prepareSessionStatements,
134
+ prepareSyncStatements,
135
+ prepareTokenUsageStatements,
136
+ pruneMessages as pruneMemoryMessages,
137
+ resetMemoryTables,
138
+ revokeChannel,
139
+ revokeDevice,
140
+ searchFacts as searchKnowledgeFacts,
141
+ setReaction,
142
+ setSessionPrefs,
143
+ setSessionSummary,
144
+ setToolPolicy,
145
+ touchDevice,
146
+ updateApprovalRequest,
147
+ updateDevice,
148
+ updateSession2 as updateMemorySessionRecord,
149
+ updateSession,
150
+ updateSyncState
151
+ };
152
+ //# sourceMappingURL=sqlite-JPF5TICX.js.map
@@ -0,0 +1,12 @@
1
+ import {
2
+ DockerSandboxRunner,
3
+ LocalSandboxRunner,
4
+ createSandboxRunner
5
+ } from "./chunk-IEKAYVA3.js";
6
+ import "./chunk-IGKYKEKT.js";
7
+ export {
8
+ DockerSandboxRunner,
9
+ LocalSandboxRunner,
10
+ createSandboxRunner
11
+ };
12
+ //# sourceMappingURL=src-6GVZTUH6.js.map