@brain-protocol/mcp 0.4.1 → 0.6.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,163 @@
1
+ /**
2
+ * Fetch consciousness trend from Brain API (cloud mode only).
3
+ * Wraps GET /health/vitals/history.
4
+ */
5
+ export async function getConsciousnessTrend(store, args) {
6
+ if (store.mode !== "cloud") {
7
+ return { error: "Consciousness trend requires cloud mode" };
8
+ }
9
+ const period = args.period || "7d";
10
+ const validPeriods = ["1d", "7d", "30d", "90d"];
11
+ if (!validPeriods.includes(period)) {
12
+ return { error: `Invalid period. Use one of: ${validPeriods.join(", ")}` };
13
+ }
14
+ try {
15
+ // Use the store's HTTP client to fetch vitals history
16
+ const httpStore = store;
17
+ const client = httpStore.client;
18
+ if (client && typeof client.http === "function") {
19
+ const resp = await client.http(`/health/vitals/history?period=${period}`);
20
+ return resp.data;
21
+ }
22
+ // Fallback: return instruction to use direct API
23
+ return {
24
+ info: `Use GET /health/vitals/history?period=${period} to retrieve consciousness trend.`,
25
+ period,
26
+ };
27
+ }
28
+ catch {
29
+ return {
30
+ info: `Use GET /health/vitals/history?period=${period} to retrieve consciousness trend.`,
31
+ period,
32
+ };
33
+ }
34
+ }
35
+ /**
36
+ * Suggest potential connections for an entry by finding similar entries.
37
+ * Wraps the graph enrichment discovery logic.
38
+ */
39
+ export async function suggestConnections(store, args) {
40
+ const entryId = args.entry_id;
41
+ if (!entryId) {
42
+ return { error: "entry_id is required" };
43
+ }
44
+ const limit = Math.min(Math.max(Number(args.limit) || 5, 1), 20);
45
+ try {
46
+ // Get the entry's graph to see existing connections
47
+ const graph = await store.traverseGraph(entryId, 1);
48
+ // Query for similar entries via the store
49
+ const entry = await store.getById(entryId);
50
+ if (!entry) {
51
+ return { error: "Entry not found" };
52
+ }
53
+ // Find entries in the same category that aren't already connected
54
+ const connectedIds = new Set();
55
+ if (graph && typeof graph === "object" && "nodes" in graph) {
56
+ const nodes = graph.nodes;
57
+ for (const node of nodes) {
58
+ connectedIds.add(node.entry.id);
59
+ }
60
+ }
61
+ // Search for similar content
62
+ const similar = await store.query({
63
+ q: entry.content.slice(0, 200),
64
+ category: entry.category,
65
+ limit: limit + connectedIds.size,
66
+ });
67
+ const suggestions = similar.entries
68
+ .filter((e) => !connectedIds.has(e.id) && e.id !== entryId)
69
+ .slice(0, limit)
70
+ .map((e) => ({
71
+ id: e.id,
72
+ category: e.category,
73
+ content_preview: e.content.slice(0, 150),
74
+ confidence: e.confidence,
75
+ suggested_edge_type: inferEdgeType(entry.category, e.category),
76
+ }));
77
+ return {
78
+ entry_id: entryId,
79
+ existing_connections: connectedIds.size - 1, // exclude self
80
+ suggestions,
81
+ };
82
+ }
83
+ catch (error) {
84
+ return { error: `Failed to suggest connections: ${error instanceof Error ? error.message : String(error)}` };
85
+ }
86
+ }
87
+ /**
88
+ * Search with context: combines search results with graph-connected entries.
89
+ * Returns search results enriched with their graph neighbors.
90
+ */
91
+ export async function searchWithContext(store, args) {
92
+ const q = args.q;
93
+ if (!q) {
94
+ return { error: "q (search query) is required" };
95
+ }
96
+ const limit = Math.min(Math.max(Number(args.limit) || 5, 1), 20);
97
+ const graphDepth = Math.min(Math.max(Number(args.graph_depth) || 1, 0), 2);
98
+ try {
99
+ // Step 1: Search
100
+ const searchResults = await store.query({ q, limit });
101
+ if (searchResults.entries.length === 0) {
102
+ return { results: [], total: 0, context_entries: 0 };
103
+ }
104
+ // Step 2: Get graph context for top results (up to 3)
105
+ const topEntries = searchResults.entries.slice(0, 3);
106
+ const contextEntries = new Map();
107
+ if (graphDepth > 0) {
108
+ for (const entry of topEntries) {
109
+ try {
110
+ const graph = await store.traverseGraph(entry.id, graphDepth);
111
+ if (graph && typeof graph === "object" && "nodes" in graph) {
112
+ const nodes = graph.nodes;
113
+ for (const node of nodes) {
114
+ if (node.depth > 0 && !searchResults.entries.some((e) => e.id === node.entry.id)) {
115
+ contextEntries.set(node.entry.id, {
116
+ content_preview: node.entry.content.slice(0, 150),
117
+ category: node.entry.category,
118
+ relation: `connected to "${entry.content.slice(0, 50)}..."`,
119
+ });
120
+ }
121
+ }
122
+ }
123
+ }
124
+ catch {
125
+ // Skip graph traversal errors for individual entries
126
+ }
127
+ }
128
+ }
129
+ // Step 3: Truncate results for token efficiency
130
+ const results = searchResults.entries.map((e) => ({
131
+ id: e.id,
132
+ content: e.content.slice(0, 500),
133
+ category: e.category,
134
+ confidence: e.confidence,
135
+ tags: e.tags,
136
+ }));
137
+ return {
138
+ results,
139
+ total: searchResults.total,
140
+ context_entries: Array.from(contextEntries.entries()).map(([id, ctx]) => ({
141
+ id,
142
+ ...ctx,
143
+ })),
144
+ };
145
+ }
146
+ catch (error) {
147
+ return { error: `Search failed: ${error instanceof Error ? error.message : String(error)}` };
148
+ }
149
+ }
150
+ /** Simple edge type inference for suggestions. */
151
+ function inferEdgeType(sourceCategory, targetCategory) {
152
+ if (sourceCategory === targetCategory)
153
+ return "related_to";
154
+ const map = {
155
+ "pattern→decision": "derives_from",
156
+ "decision→pattern": "implements",
157
+ "security→pattern": "validates",
158
+ "code→pattern": "implements",
159
+ "documentation→code": "documents",
160
+ };
161
+ return map[`${sourceCategory}→${targetCategory}`] || "related_to";
162
+ }
163
+ //# sourceMappingURL=consciousness.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"consciousness.js","sourceRoot":"","sources":["../../src/tools/consciousness.ts"],"names":[],"mappings":"AAkBA;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,qBAAqB,CACzC,KAAmB,EACnB,IAA6B;IAE7B,IAAI,KAAK,CAAC,IAAI,KAAK,OAAO,EAAE,CAAC;QAC3B,OAAO,EAAE,KAAK,EAAE,yCAAyC,EAAE,CAAC;IAC9D,CAAC;IAED,MAAM,MAAM,GAAI,IAAI,CAAC,MAAiB,IAAI,IAAI,CAAC;IAC/C,MAAM,YAAY,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,CAAC,C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AAY,CAAC;AACpE,CAAC"}
@@ -85,6 +85,9 @@ export declare const toolDefinitions: ({
85
85
  ids?: undefined;
86
86
  confidence_max?: undefined;
87
87
  dry_run?: undefined;
88
+ graph_depth?: undefined;
89
+ period?: undefined;
90
+ resolution?: undefined;
88
91
  };
89
92
  required?: undefined;
90
93
  };
@@ -179,6 +182,9 @@ export declare const toolDefinitions: ({
179
182
  ids?: undefined;
180
183
  confidence_max?: undefined;
181
184
  dry_run?: undefined;
185
+ graph_depth?: undefined;
186
+ period?: undefined;
187
+ resolution?: undefined;
182
188
  };
183
189
  required: string[];
184
190
  };
@@ -276,6 +282,9 @@ export declare const toolDefinitions: ({
276
282
  ids?: undefined;
277
283
  confidence_max?: undefined;
278
284
  dry_run?: undefined;
285
+ graph_depth?: undefined;
286
+ period?: undefined;
287
+ resolution?: undefined;
279
288
  };
280
289
  required: string[];
281
290
  };
@@ -346,6 +355,9 @@ export declare const toolDefinitions: ({
346
355
  ids?: undefined;
347
356
  confidence_max?: undefined;
348
357
  dry_run?: undefined;
358
+ graph_depth?: undefined;
359
+ period?: undefined;
360
+ resolution?: undefined;
349
361
  };
350
362
  required: string[];
351
363
  };
@@ -425,6 +437,9 @@ export declare const toolDefinitions: ({
425
437
  ids?: undefined;
426
438
  confidence_max?: undefined;
427
439
  dry_run?: undefined;
440
+ graph_depth?: undefined;
441
+ period?: undefined;
442
+ resolution?: undefined;
428
443
  };
429
444
  required: string[];
430
445
  };
@@ -498,6 +513,9 @@ export declare const toolDefinitions: ({
498
513
  ids?: undefined;
499
514
  confidence_max?: undefined;
500
515
  dry_run?: undefined;
516
+ graph_depth?: undefined;
517
+ period?: undefined;
518
+ resolution?: undefined;
501
519
  };
502
520
  required: string[];
503
521
  };
@@ -565,6 +583,9 @@ export declare const toolDefinitions: ({
565
583
  ids?: undefined;
566
584
  confidence_max?: undefined;
567
585
  dry_run?: undefined;
586
+ graph_depth?: undefined;
587
+ period?: undefined;
588
+ resolution?: undefined;
568
589
  };
569
590
  required?: undefined;
570
591
  };
@@ -635,6 +656,9 @@ export declare const toolDefinitions: ({
635
656
  ids?: undefined;
636
657
  confidence_max?: undefined;
637
658
  dry_run?: undefined;
659
+ graph_depth?: undefined;
660
+ period?: undefined;
661
+ resolution?: undefined;
638
662
  };
639
663
  required: string[];
640
664
  };
@@ -705,6 +729,9 @@ export declare const toolDefinitions: ({
705
729
  ids?: undefined;
706
730
  confidence_max?: undefined;
707
731
  dry_run?: undefined;
732
+ graph_depth?: undefined;
733
+ period?: undefined;
734
+ resolution?: undefined;
708
735
  };
709
736
  required?: undefined;
710
737
  };
@@ -784,6 +811,9 @@ export declare const toolDefinitions: ({
784
811
  ids?: undefined;
785
812
  confidence_max?: undefined;
786
813
  dry_run?: undefined;
814
+ graph_depth?: undefined;
815
+ period?: undefined;
816
+ resolution?: undefined;
787
817
  };
788
818
  required: string[];
789
819
  };
@@ -884,6 +914,9 @@ export declare const toolDefinitions: ({
884
914
  ids?: undefined;
885
915
  confidence_max?: undefined;
886
916
  dry_run?: undefined;
917
+ graph_depth?: undefined;
918
+ period?: undefined;
919
+ resolution?: undefined;
887
920
  };
888
921
  required: string[];
889
922
  };
@@ -957,6 +990,9 @@ export declare const toolDefinitions: ({
957
990
  ids?: undefined;
958
991
  confidence_max?: undefined;
959
992
  dry_run?: undefined;
993
+ graph_depth?: undefined;
994
+ period?: undefined;
995
+ resolution?: undefined;
960
996
  };
961
997
  required: string[];
962
998
  };
@@ -1030,6 +1066,9 @@ export declare const toolDefinitions: ({
1030
1066
  ids?: undefined;
1031
1067
  confidence_max?: undefined;
1032
1068
  dry_run?: undefined;
1069
+ graph_depth?: undefined;
1070
+ period?: undefined;
1071
+ resolution?: undefined;
1033
1072
  };
1034
1073
  required: string[];
1035
1074
  };
@@ -1100,6 +1139,9 @@ export declare const toolDefinitions: ({
1100
1139
  ids?: undefined;
1101
1140
  confidence_max?: undefined;
1102
1141
  dry_run?: undefined;
1142
+ graph_depth?: undefined;
1143
+ period?: undefined;
1144
+ resolution?: undefined;
1103
1145
  };
1104
1146
  required?: undefined;
1105
1147
  };
@@ -1216,6 +1258,9 @@ export declare const toolDefinitions: ({
1216
1258
  ids?: undefined;
1217
1259
  confidence_max?: undefined;
1218
1260
  dry_run?: undefined;
1261
+ graph_depth?: undefined;
1262
+ period?: undefined;
1263
+ resolution?: undefined;
1219
1264
  };
1220
1265
  required: string[];
1221
1266
  };
@@ -1298,6 +1343,9 @@ export declare const toolDefinitions: ({
1298
1343
  ids?: undefined;
1299
1344
  confidence_max?: undefined;
1300
1345
  dry_run?: undefined;
1346
+ graph_depth?: undefined;
1347
+ period?: undefined;
1348
+ resolution?: undefined;
1301
1349
  };
1302
1350
  required?: undefined;
1303
1351
  };
@@ -1374,6 +1422,9 @@ export declare const toolDefinitions: ({
1374
1422
  ids?: undefined;
1375
1423
  confidence_max?: undefined;
1376
1424
  dry_run?: undefined;
1425
+ graph_depth?: undefined;
1426
+ period?: undefined;
1427
+ resolution?: undefined;
1377
1428
  };
1378
1429
  required: string[];
1379
1430
  };
@@ -1480,6 +1531,9 @@ export declare const toolDefinitions: ({
1480
1531
  ids?: undefined;
1481
1532
  confidence_max?: undefined;
1482
1533
  dry_run?: undefined;
1534
+ graph_depth?: undefined;
1535
+ period?: undefined;
1536
+ resolution?: undefined;
1483
1537
  };
1484
1538
  required: string[];
1485
1539
  };
@@ -1556,6 +1610,9 @@ export declare const toolDefinitions: ({
1556
1610
  ids?: undefined;
1557
1611
  confidence_max?: undefined;
1558
1612
  dry_run?: undefined;
1613
+ graph_depth?: undefined;
1614
+ period?: undefined;
1615
+ resolution?: undefined;
1559
1616
  };
1560
1617
  required: string[];
1561
1618
  };
@@ -1647,9 +1704,316 @@ export declare const toolDefinitions: ({
1647
1704
  rationale?: undefined;
1648
1705
  chain_id?: undefined;
1649
1706
  task_description?: undefined;
1707
+ graph_depth?: undefined;
1708
+ period?: undefined;
1709
+ resolution?: undefined;
1650
1710
  };
1651
1711
  required?: undefined;
1652
1712
  };
1713
+ } | {
1714
+ name: string;
1715
+ description: string;
1716
+ inputSchema: {
1717
+ type: "object";
1718
+ properties: {
1719
+ q: {
1720
+ type: string;
1721
+ description: string;
1722
+ };
1723
+ limit: {
1724
+ type: string;
1725
+ description: string;
1726
+ };
1727
+ graph_depth: {
1728
+ type: string;
1729
+ description: string;
1730
+ };
1731
+ category?: undefined;
1732
+ author?: undefined;
1733
+ tags?: undefined;
1734
+ offset?: undefined;
1735
+ brain_id?: undefined;
1736
+ content?: undefined;
1737
+ content_type?: undefined;
1738
+ confidence?: undefined;
1739
+ is_public?: undefined;
1740
+ id?: undefined;
1741
+ source_id?: undefined;
1742
+ target_id?: undefined;
1743
+ edge_type?: undefined;
1744
+ entry_id?: undefined;
1745
+ depth?: undefined;
1746
+ format?: undefined;
1747
+ entries?: undefined;
1748
+ edges?: undefined;
1749
+ agent_name?: undefined;
1750
+ task_type?: undefined;
1751
+ model?: undefined;
1752
+ provider?: undefined;
1753
+ prompt_tokens?: undefined;
1754
+ completion_tokens?: undefined;
1755
+ total_tokens?: undefined;
1756
+ cost_usd?: undefined;
1757
+ latency_ms?: undefined;
1758
+ status?: undefined;
1759
+ metadata?: undefined;
1760
+ code?: undefined;
1761
+ file_type?: undefined;
1762
+ context?: undefined;
1763
+ days?: undefined;
1764
+ proof_id?: undefined;
1765
+ model_id?: undefined;
1766
+ version_id?: undefined;
1767
+ input_hash?: undefined;
1768
+ output_value?: undefined;
1769
+ proof_tx?: undefined;
1770
+ verified?: undefined;
1771
+ timestamp?: undefined;
1772
+ attester_signatures?: undefined;
1773
+ description?: undefined;
1774
+ proof_entry_id?: undefined;
1775
+ target_entry_id?: undefined;
1776
+ decision?: undefined;
1777
+ options?: undefined;
1778
+ chosen?: undefined;
1779
+ rationale?: undefined;
1780
+ chain_id?: undefined;
1781
+ task_description?: undefined;
1782
+ date_before?: undefined;
1783
+ date_after?: undefined;
1784
+ ids?: undefined;
1785
+ confidence_max?: undefined;
1786
+ dry_run?: undefined;
1787
+ period?: undefined;
1788
+ resolution?: undefined;
1789
+ };
1790
+ required: string[];
1791
+ };
1792
+ } | {
1793
+ name: string;
1794
+ description: string;
1795
+ inputSchema: {
1796
+ type: "object";
1797
+ properties: {
1798
+ period: {
1799
+ type: string;
1800
+ description: string;
1801
+ };
1802
+ q?: undefined;
1803
+ category?: undefined;
1804
+ author?: undefined;
1805
+ tags?: undefined;
1806
+ limit?: undefined;
1807
+ offset?: undefined;
1808
+ brain_id?: undefined;
1809
+ content?: undefined;
1810
+ content_type?: undefined;
1811
+ confidence?: undefined;
1812
+ is_public?: undefined;
1813
+ id?: undefined;
1814
+ source_id?: undefined;
1815
+ target_id?: undefined;
1816
+ edge_type?: undefined;
1817
+ entry_id?: undefined;
1818
+ depth?: undefined;
1819
+ format?: undefined;
1820
+ entries?: undefined;
1821
+ edges?: undefined;
1822
+ agent_name?: undefined;
1823
+ task_type?: undefined;
1824
+ model?: undefined;
1825
+ provider?: undefined;
1826
+ prompt_tokens?: undefined;
1827
+ completion_tokens?: undefined;
1828
+ total_tokens?: undefined;
1829
+ cost_usd?: undefined;
1830
+ latency_ms?: undefined;
1831
+ status?: undefined;
1832
+ metadata?: undefined;
1833
+ code?: undefined;
1834
+ file_type?: undefined;
1835
+ context?: undefined;
1836
+ days?: undefined;
1837
+ proof_id?: undefined;
1838
+ model_id?: undefined;
1839
+ version_id?: undefined;
1840
+ input_hash?: undefined;
1841
+ output_value?: undefined;
1842
+ proof_tx?: undefined;
1843
+ verified?: undefined;
1844
+ timestamp?: undefined;
1845
+ attester_signatures?: undefined;
1846
+ description?: undefined;
1847
+ proof_entry_id?: undefined;
1848
+ target_entry_id?: undefined;
1849
+ decision?: undefined;
1850
+ options?: undefined;
1851
+ chosen?: undefined;
1852
+ rationale?: undefined;
1853
+ chain_id?: undefined;
1854
+ task_description?: undefined;
1855
+ date_before?: undefined;
1856
+ date_after?: undefined;
1857
+ ids?: undefined;
1858
+ confidence_max?: undefined;
1859
+ dry_run?: undefined;
1860
+ graph_depth?: undefined;
1861
+ resolution?: undefined;
1862
+ };
1863
+ required?: undefined;
1864
+ };
1865
+ } | {
1866
+ name: string;
1867
+ description: string;
1868
+ inputSchema: {
1869
+ type: "object";
1870
+ properties: {
1871
+ entry_id: {
1872
+ type: string;
1873
+ description: string;
1874
+ };
1875
+ limit: {
1876
+ type: string;
1877
+ description: string;
1878
+ };
1879
+ q?: undefined;
1880
+ category?: undefined;
1881
+ author?: undefined;
1882
+ tags?: undefined;
1883
+ offset?: undefined;
1884
+ brain_id?: undefined;
1885
+ content?: undefined;
1886
+ content_type?: undefined;
1887
+ confidence?: undefined;
1888
+ is_public?: undefined;
1889
+ id?: undefined;
1890
+ source_id?: undefined;
1891
+ target_id?: undefined;
1892
+ edge_type?: undefined;
1893
+ depth?: undefined;
1894
+ format?: undefined;
1895
+ entries?: undefined;
1896
+ edges?: undefined;
1897
+ agent_name?: undefined;
1898
+ task_type?: undefined;
1899
+ model?: undefined;
1900
+ provider?: undefined;
1901
+ prompt_tokens?: undefined;
1902
+ completion_tokens?: undefined;
1903
+ total_tokens?: undefined;
1904
+ cost_usd?: undefined;
1905
+ latency_ms?: undefined;
1906
+ status?: undefined;
1907
+ metadata?: undefined;
1908
+ code?: undefined;
1909
+ file_type?: undefined;
1910
+ context?: undefined;
1911
+ days?: undefined;
1912
+ proof_id?: undefined;
1913
+ model_id?: undefined;
1914
+ version_id?: undefined;
1915
+ input_hash?: undefined;
1916
+ output_value?: undefined;
1917
+ proof_tx?: undefined;
1918
+ verified?: undefined;
1919
+ timestamp?: undefined;
1920
+ attester_signatures?: undefined;
1921
+ description?: undefined;
1922
+ proof_entry_id?: undefined;
1923
+ target_entry_id?: undefined;
1924
+ decision?: undefined;
1925
+ options?: undefined;
1926
+ chosen?: undefined;
1927
+ rationale?: undefined;
1928
+ chain_id?: undefined;
1929
+ task_description?: undefined;
1930
+ date_before?: undefined;
1931
+ date_after?: undefined;
1932
+ ids?: undefined;
1933
+ confidence_max?: undefined;
1934
+ dry_run?: undefined;
1935
+ graph_depth?: undefined;
1936
+ period?: undefined;
1937
+ resolution?: undefined;
1938
+ };
1939
+ required: string[];
1940
+ };
1941
+ } | {
1942
+ name: string;
1943
+ description: string;
1944
+ inputSchema: {
1945
+ type: "object";
1946
+ properties: {
1947
+ entry_id: {
1948
+ type: string;
1949
+ description: string;
1950
+ };
1951
+ resolution: {
1952
+ type: string;
1953
+ description: string;
1954
+ };
1955
+ q?: undefined;
1956
+ category?: undefined;
1957
+ author?: undefined;
1958
+ tags?: undefined;
1959
+ limit?: undefined;
1960
+ offset?: undefined;
1961
+ brain_id?: undefined;
1962
+ content?: undefined;
1963
+ content_type?: undefined;
1964
+ confidence?: undefined;
1965
+ is_public?: undefined;
1966
+ id?: undefined;
1967
+ source_id?: undefined;
1968
+ target_id?: undefined;
1969
+ edge_type?: undefined;
1970
+ depth?: undefined;
1971
+ format?: undefined;
1972
+ entries?: undefined;
1973
+ edges?: undefined;
1974
+ agent_name?: undefined;
1975
+ task_type?: undefined;
1976
+ model?: undefined;
1977
+ provider?: undefined;
1978
+ prompt_tokens?: undefined;
1979
+ completion_tokens?: undefined;
1980
+ total_tokens?: undefined;
1981
+ cost_usd?: undefined;
1982
+ latency_ms?: undefined;
1983
+ status?: undefined;
1984
+ metadata?: undefined;
1985
+ code?: undefined;
1986
+ file_type?: undefined;
1987
+ context?: undefined;
1988
+ days?: undefined;
1989
+ proof_id?: undefined;
1990
+ model_id?: undefined;
1991
+ version_id?: undefined;
1992
+ input_hash?: undefined;
1993
+ output_value?: undefined;
1994
+ proof_tx?: undefined;
1995
+ verified?: undefined;
1996
+ timestamp?: undefined;
1997
+ attester_signatures?: undefined;
1998
+ description?: undefined;
1999
+ proof_entry_id?: undefined;
2000
+ target_entry_id?: undefined;
2001
+ decision?: undefined;
2002
+ options?: undefined;
2003
+ chosen?: undefined;
2004
+ rationale?: undefined;
2005
+ chain_id?: undefined;
2006
+ task_description?: undefined;
2007
+ date_before?: undefined;
2008
+ date_after?: undefined;
2009
+ ids?: undefined;
2010
+ confidence_max?: undefined;
2011
+ dry_run?: undefined;
2012
+ graph_depth?: undefined;
2013
+ period?: undefined;
2014
+ };
2015
+ required: string[];
2016
+ };
1653
2017
  })[];
1654
2018
  export declare function handleTool(store: StoreAdapter, name: string, args: Record<string, unknown>): Promise<unknown>;
1655
2019
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAmBxD,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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