@rustledger/mcp-server 0.2.0 → 0.5.2
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.
- package/README.md +94 -3
- package/dist/__tests__/index.test.d.ts +2 -0
- package/dist/__tests__/index.test.d.ts.map +1 -0
- package/dist/__tests__/index.test.js +585 -0
- package/dist/__tests__/index.test.js.map +1 -0
- package/dist/docs/bql-functions.md +41 -0
- package/dist/docs/bql-tables.md +26 -0
- package/dist/docs/bql.md +62 -0
- package/dist/docs/directives.md +67 -0
- package/dist/docs/validation-errors.md +40 -0
- package/dist/handlers.d.ts +6 -0
- package/dist/handlers.d.ts.map +1 -0
- package/dist/handlers.js +558 -0
- package/dist/handlers.js.map +1 -0
- package/dist/helpers.d.ts +31 -0
- package/dist/helpers.d.ts.map +1 -0
- package/dist/helpers.js +109 -0
- package/dist/helpers.js.map +1 -0
- package/dist/index.js +24 -421
- package/dist/index.js.map +1 -1
- package/dist/prompts.d.ts +24 -0
- package/dist/prompts.d.ts.map +1 -0
- package/dist/prompts.js +122 -0
- package/dist/prompts.js.map +1 -0
- package/dist/resources.d.ts +19 -0
- package/dist/resources.d.ts.map +1 -0
- package/dist/resources.js +94 -0
- package/dist/resources.js.map +1 -0
- package/dist/tools.d.ts +36 -0
- package/dist/tools.d.ts.map +1 -0
- package/dist/tools.js +475 -0
- package/dist/tools.js.map +1 -0
- package/dist/types.d.ts +140 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +3 -0
- package/dist/types.js.map +1 -0
- package/package.json +7 -4
package/dist/tools.js
ADDED
|
@@ -0,0 +1,475 @@
|
|
|
1
|
+
// Tool definitions for the MCP server
|
|
2
|
+
// === Original Tools ===
|
|
3
|
+
export const validateTool = {
|
|
4
|
+
name: "validate",
|
|
5
|
+
description: "Validate a Beancount ledger. Returns validation errors and warnings if any issues are found.",
|
|
6
|
+
inputSchema: {
|
|
7
|
+
type: "object",
|
|
8
|
+
properties: {
|
|
9
|
+
source: {
|
|
10
|
+
type: "string",
|
|
11
|
+
description: "The Beancount ledger source text to validate",
|
|
12
|
+
},
|
|
13
|
+
},
|
|
14
|
+
required: ["source"],
|
|
15
|
+
},
|
|
16
|
+
};
|
|
17
|
+
export const queryTool = {
|
|
18
|
+
name: "query",
|
|
19
|
+
description: "Run a BQL (Beancount Query Language) query on a ledger. Use this for account balances, filtering transactions, aggregations, etc.",
|
|
20
|
+
inputSchema: {
|
|
21
|
+
type: "object",
|
|
22
|
+
properties: {
|
|
23
|
+
source: {
|
|
24
|
+
type: "string",
|
|
25
|
+
description: "The Beancount ledger source text",
|
|
26
|
+
},
|
|
27
|
+
query: {
|
|
28
|
+
type: "string",
|
|
29
|
+
description: 'The BQL query to execute (e.g., "SELECT account, sum(position) GROUP BY account")',
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
required: ["source", "query"],
|
|
33
|
+
},
|
|
34
|
+
};
|
|
35
|
+
export const balancesTool = {
|
|
36
|
+
name: "balances",
|
|
37
|
+
description: "Get account balances from a ledger. This is a shorthand for running a BALANCES query.",
|
|
38
|
+
inputSchema: {
|
|
39
|
+
type: "object",
|
|
40
|
+
properties: {
|
|
41
|
+
source: {
|
|
42
|
+
type: "string",
|
|
43
|
+
description: "The Beancount ledger source text",
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
required: ["source"],
|
|
47
|
+
},
|
|
48
|
+
};
|
|
49
|
+
export const formatTool = {
|
|
50
|
+
name: "format",
|
|
51
|
+
description: "Format a Beancount ledger with consistent alignment and spacing.",
|
|
52
|
+
inputSchema: {
|
|
53
|
+
type: "object",
|
|
54
|
+
properties: {
|
|
55
|
+
source: {
|
|
56
|
+
type: "string",
|
|
57
|
+
description: "The Beancount ledger source text to format",
|
|
58
|
+
},
|
|
59
|
+
},
|
|
60
|
+
required: ["source"],
|
|
61
|
+
},
|
|
62
|
+
};
|
|
63
|
+
export const parseTool = {
|
|
64
|
+
name: "parse",
|
|
65
|
+
description: "Parse a Beancount ledger and return the directives as structured data.",
|
|
66
|
+
inputSchema: {
|
|
67
|
+
type: "object",
|
|
68
|
+
properties: {
|
|
69
|
+
source: {
|
|
70
|
+
type: "string",
|
|
71
|
+
description: "The Beancount ledger source text to parse",
|
|
72
|
+
},
|
|
73
|
+
},
|
|
74
|
+
required: ["source"],
|
|
75
|
+
},
|
|
76
|
+
};
|
|
77
|
+
export const completionsTool = {
|
|
78
|
+
name: "completions",
|
|
79
|
+
description: "Get BQL query completions at a cursor position. Useful for building query editors.",
|
|
80
|
+
inputSchema: {
|
|
81
|
+
type: "object",
|
|
82
|
+
properties: {
|
|
83
|
+
partial_query: {
|
|
84
|
+
type: "string",
|
|
85
|
+
description: "The partial BQL query text",
|
|
86
|
+
},
|
|
87
|
+
cursor_pos: {
|
|
88
|
+
type: "number",
|
|
89
|
+
description: "The cursor position (character offset) in the query",
|
|
90
|
+
},
|
|
91
|
+
},
|
|
92
|
+
required: ["partial_query", "cursor_pos"],
|
|
93
|
+
},
|
|
94
|
+
};
|
|
95
|
+
export const listPluginsTool = {
|
|
96
|
+
name: "list_plugins",
|
|
97
|
+
description: "List available native plugins that can process ledgers.",
|
|
98
|
+
inputSchema: {
|
|
99
|
+
type: "object",
|
|
100
|
+
properties: {},
|
|
101
|
+
required: [],
|
|
102
|
+
},
|
|
103
|
+
};
|
|
104
|
+
export const runPluginTool = {
|
|
105
|
+
name: "run_plugin",
|
|
106
|
+
description: "Run a native plugin on a ledger.",
|
|
107
|
+
inputSchema: {
|
|
108
|
+
type: "object",
|
|
109
|
+
properties: {
|
|
110
|
+
source: {
|
|
111
|
+
type: "string",
|
|
112
|
+
description: "The Beancount ledger source text",
|
|
113
|
+
},
|
|
114
|
+
plugin_name: {
|
|
115
|
+
type: "string",
|
|
116
|
+
description: "The name of the plugin to run (use list_plugins to see available plugins)",
|
|
117
|
+
},
|
|
118
|
+
},
|
|
119
|
+
required: ["source", "plugin_name"],
|
|
120
|
+
},
|
|
121
|
+
};
|
|
122
|
+
// === Editor Tools (LSP-like) ===
|
|
123
|
+
export const editorCompletionsTool = {
|
|
124
|
+
name: "editor_completions",
|
|
125
|
+
description: "Get context-aware completions for Beancount source at a given position. Returns account names, currencies, directives, etc.",
|
|
126
|
+
inputSchema: {
|
|
127
|
+
type: "object",
|
|
128
|
+
properties: {
|
|
129
|
+
source: {
|
|
130
|
+
type: "string",
|
|
131
|
+
description: "The Beancount ledger source text",
|
|
132
|
+
},
|
|
133
|
+
line: {
|
|
134
|
+
type: "number",
|
|
135
|
+
description: "Line number (0-indexed)",
|
|
136
|
+
},
|
|
137
|
+
character: {
|
|
138
|
+
type: "number",
|
|
139
|
+
description: "Character position in the line (0-indexed)",
|
|
140
|
+
},
|
|
141
|
+
},
|
|
142
|
+
required: ["source", "line", "character"],
|
|
143
|
+
},
|
|
144
|
+
};
|
|
145
|
+
export const editorHoverTool = {
|
|
146
|
+
name: "editor_hover",
|
|
147
|
+
description: "Get hover information for a symbol at the given position. Returns documentation for accounts, currencies, and directives.",
|
|
148
|
+
inputSchema: {
|
|
149
|
+
type: "object",
|
|
150
|
+
properties: {
|
|
151
|
+
source: {
|
|
152
|
+
type: "string",
|
|
153
|
+
description: "The Beancount ledger source text",
|
|
154
|
+
},
|
|
155
|
+
line: {
|
|
156
|
+
type: "number",
|
|
157
|
+
description: "Line number (0-indexed)",
|
|
158
|
+
},
|
|
159
|
+
character: {
|
|
160
|
+
type: "number",
|
|
161
|
+
description: "Character position in the line (0-indexed)",
|
|
162
|
+
},
|
|
163
|
+
},
|
|
164
|
+
required: ["source", "line", "character"],
|
|
165
|
+
},
|
|
166
|
+
};
|
|
167
|
+
export const editorDefinitionTool = {
|
|
168
|
+
name: "editor_definition",
|
|
169
|
+
description: "Get the definition location for a symbol (account or currency). Returns the location of the Open or Commodity directive.",
|
|
170
|
+
inputSchema: {
|
|
171
|
+
type: "object",
|
|
172
|
+
properties: {
|
|
173
|
+
source: {
|
|
174
|
+
type: "string",
|
|
175
|
+
description: "The Beancount ledger source text",
|
|
176
|
+
},
|
|
177
|
+
line: {
|
|
178
|
+
type: "number",
|
|
179
|
+
description: "Line number (0-indexed)",
|
|
180
|
+
},
|
|
181
|
+
character: {
|
|
182
|
+
type: "number",
|
|
183
|
+
description: "Character position in the line (0-indexed)",
|
|
184
|
+
},
|
|
185
|
+
},
|
|
186
|
+
required: ["source", "line", "character"],
|
|
187
|
+
},
|
|
188
|
+
};
|
|
189
|
+
export const editorDocumentSymbolsTool = {
|
|
190
|
+
name: "editor_document_symbols",
|
|
191
|
+
description: "Get all symbols in the document for an outline/structure view. Returns all directives with their positions.",
|
|
192
|
+
inputSchema: {
|
|
193
|
+
type: "object",
|
|
194
|
+
properties: {
|
|
195
|
+
source: {
|
|
196
|
+
type: "string",
|
|
197
|
+
description: "The Beancount ledger source text",
|
|
198
|
+
},
|
|
199
|
+
},
|
|
200
|
+
required: ["source"],
|
|
201
|
+
},
|
|
202
|
+
};
|
|
203
|
+
export const editorReferencesTool = {
|
|
204
|
+
name: "editor_references",
|
|
205
|
+
description: "Find all references to a symbol (account, currency, or payee) at the given position. Returns all locations where the symbol is used.",
|
|
206
|
+
inputSchema: {
|
|
207
|
+
type: "object",
|
|
208
|
+
properties: {
|
|
209
|
+
source: {
|
|
210
|
+
type: "string",
|
|
211
|
+
description: "The Beancount ledger source text",
|
|
212
|
+
},
|
|
213
|
+
line: {
|
|
214
|
+
type: "number",
|
|
215
|
+
description: "Line number (0-indexed)",
|
|
216
|
+
},
|
|
217
|
+
character: {
|
|
218
|
+
type: "number",
|
|
219
|
+
description: "Character position in the line (0-indexed)",
|
|
220
|
+
},
|
|
221
|
+
},
|
|
222
|
+
required: ["source", "line", "character"],
|
|
223
|
+
},
|
|
224
|
+
};
|
|
225
|
+
// === Analysis Tools ===
|
|
226
|
+
export const ledgerStatsTool = {
|
|
227
|
+
name: "ledger_stats",
|
|
228
|
+
description: "Get statistics about a ledger: counts of directives, accounts, currencies, date range, etc.",
|
|
229
|
+
inputSchema: {
|
|
230
|
+
type: "object",
|
|
231
|
+
properties: {
|
|
232
|
+
source: {
|
|
233
|
+
type: "string",
|
|
234
|
+
description: "The Beancount ledger source text",
|
|
235
|
+
},
|
|
236
|
+
},
|
|
237
|
+
required: ["source"],
|
|
238
|
+
},
|
|
239
|
+
};
|
|
240
|
+
export const listAccountsTool = {
|
|
241
|
+
name: "list_accounts",
|
|
242
|
+
description: "List all accounts in the ledger with their open/close dates and currencies.",
|
|
243
|
+
inputSchema: {
|
|
244
|
+
type: "object",
|
|
245
|
+
properties: {
|
|
246
|
+
source: {
|
|
247
|
+
type: "string",
|
|
248
|
+
description: "The Beancount ledger source text",
|
|
249
|
+
},
|
|
250
|
+
},
|
|
251
|
+
required: ["source"],
|
|
252
|
+
},
|
|
253
|
+
};
|
|
254
|
+
export const listCommoditiesTool = {
|
|
255
|
+
name: "list_commodities",
|
|
256
|
+
description: "List all currencies/commodities used in the ledger.",
|
|
257
|
+
inputSchema: {
|
|
258
|
+
type: "object",
|
|
259
|
+
properties: {
|
|
260
|
+
source: {
|
|
261
|
+
type: "string",
|
|
262
|
+
description: "The Beancount ledger source text",
|
|
263
|
+
},
|
|
264
|
+
},
|
|
265
|
+
required: ["source"],
|
|
266
|
+
},
|
|
267
|
+
};
|
|
268
|
+
export const accountActivityTool = {
|
|
269
|
+
name: "account_activity",
|
|
270
|
+
description: "Get activity summary for a specific account: first/last transaction, total transactions, currencies used.",
|
|
271
|
+
inputSchema: {
|
|
272
|
+
type: "object",
|
|
273
|
+
properties: {
|
|
274
|
+
source: {
|
|
275
|
+
type: "string",
|
|
276
|
+
description: "The Beancount ledger source text",
|
|
277
|
+
},
|
|
278
|
+
account: {
|
|
279
|
+
type: "string",
|
|
280
|
+
description: "The account name to analyze (e.g., 'Assets:Checking')",
|
|
281
|
+
},
|
|
282
|
+
},
|
|
283
|
+
required: ["source", "account"],
|
|
284
|
+
},
|
|
285
|
+
};
|
|
286
|
+
// === Utility Tools ===
|
|
287
|
+
export const formatCheckTool = {
|
|
288
|
+
name: "format_check",
|
|
289
|
+
description: "Check if a ledger is properly formatted. Returns differences if formatting would change the file.",
|
|
290
|
+
inputSchema: {
|
|
291
|
+
type: "object",
|
|
292
|
+
properties: {
|
|
293
|
+
source: {
|
|
294
|
+
type: "string",
|
|
295
|
+
description: "The Beancount ledger source text",
|
|
296
|
+
},
|
|
297
|
+
},
|
|
298
|
+
required: ["source"],
|
|
299
|
+
},
|
|
300
|
+
};
|
|
301
|
+
export const bqlTablesTool = {
|
|
302
|
+
name: "bql_tables",
|
|
303
|
+
description: "Get documentation for BQL tables (entries, postings, etc.) and their available columns.",
|
|
304
|
+
inputSchema: {
|
|
305
|
+
type: "object",
|
|
306
|
+
properties: {},
|
|
307
|
+
required: [],
|
|
308
|
+
},
|
|
309
|
+
};
|
|
310
|
+
export const directiveAtLineTool = {
|
|
311
|
+
name: "directive_at_line",
|
|
312
|
+
description: "Get the directive at a specific line number in the source.",
|
|
313
|
+
inputSchema: {
|
|
314
|
+
type: "object",
|
|
315
|
+
properties: {
|
|
316
|
+
source: {
|
|
317
|
+
type: "string",
|
|
318
|
+
description: "The Beancount ledger source text",
|
|
319
|
+
},
|
|
320
|
+
line: {
|
|
321
|
+
type: "number",
|
|
322
|
+
description: "Line number (1-indexed)",
|
|
323
|
+
},
|
|
324
|
+
},
|
|
325
|
+
required: ["source", "line"],
|
|
326
|
+
},
|
|
327
|
+
};
|
|
328
|
+
export const findTransactionsTool = {
|
|
329
|
+
name: "find_transactions",
|
|
330
|
+
description: "Find transactions matching criteria: payee, narration, tags, or date range.",
|
|
331
|
+
inputSchema: {
|
|
332
|
+
type: "object",
|
|
333
|
+
properties: {
|
|
334
|
+
source: {
|
|
335
|
+
type: "string",
|
|
336
|
+
description: "The Beancount ledger source text",
|
|
337
|
+
},
|
|
338
|
+
payee: {
|
|
339
|
+
type: "string",
|
|
340
|
+
description: "Filter by payee (substring match)",
|
|
341
|
+
},
|
|
342
|
+
narration: {
|
|
343
|
+
type: "string",
|
|
344
|
+
description: "Filter by narration (substring match)",
|
|
345
|
+
},
|
|
346
|
+
tag: {
|
|
347
|
+
type: "string",
|
|
348
|
+
description: "Filter by tag",
|
|
349
|
+
},
|
|
350
|
+
from_date: {
|
|
351
|
+
type: "string",
|
|
352
|
+
description: "Filter by start date (YYYY-MM-DD)",
|
|
353
|
+
},
|
|
354
|
+
to_date: {
|
|
355
|
+
type: "string",
|
|
356
|
+
description: "Filter by end date (YYYY-MM-DD)",
|
|
357
|
+
},
|
|
358
|
+
limit: {
|
|
359
|
+
type: "number",
|
|
360
|
+
description: "Maximum number of results (default: 50)",
|
|
361
|
+
},
|
|
362
|
+
},
|
|
363
|
+
required: ["source"],
|
|
364
|
+
},
|
|
365
|
+
};
|
|
366
|
+
// === Report Tool ===
|
|
367
|
+
export const reportTool = {
|
|
368
|
+
name: "report",
|
|
369
|
+
description: "Generate financial reports: balance sheet, income statement, holdings, or net worth.",
|
|
370
|
+
inputSchema: {
|
|
371
|
+
type: "object",
|
|
372
|
+
properties: {
|
|
373
|
+
source: {
|
|
374
|
+
type: "string",
|
|
375
|
+
description: "The Beancount ledger source text",
|
|
376
|
+
},
|
|
377
|
+
report_type: {
|
|
378
|
+
type: "string",
|
|
379
|
+
enum: ["balsheet", "income", "balances", "holdings", "networth"],
|
|
380
|
+
description: "Type of report to generate",
|
|
381
|
+
},
|
|
382
|
+
currency: {
|
|
383
|
+
type: "string",
|
|
384
|
+
description: "Convert all amounts to this currency (optional)",
|
|
385
|
+
},
|
|
386
|
+
},
|
|
387
|
+
required: ["source", "report_type"],
|
|
388
|
+
},
|
|
389
|
+
};
|
|
390
|
+
// === File Operation Tools ===
|
|
391
|
+
export const validateFileTool = {
|
|
392
|
+
name: "validate_file",
|
|
393
|
+
description: "Validate a Beancount file from the filesystem. Handles includes automatically.",
|
|
394
|
+
inputSchema: {
|
|
395
|
+
type: "object",
|
|
396
|
+
properties: {
|
|
397
|
+
file_path: {
|
|
398
|
+
type: "string",
|
|
399
|
+
description: "Path to the Beancount file to validate",
|
|
400
|
+
},
|
|
401
|
+
},
|
|
402
|
+
required: ["file_path"],
|
|
403
|
+
},
|
|
404
|
+
};
|
|
405
|
+
export const queryFileTool = {
|
|
406
|
+
name: "query_file",
|
|
407
|
+
description: "Run a BQL query on a Beancount file from the filesystem.",
|
|
408
|
+
inputSchema: {
|
|
409
|
+
type: "object",
|
|
410
|
+
properties: {
|
|
411
|
+
file_path: {
|
|
412
|
+
type: "string",
|
|
413
|
+
description: "Path to the Beancount file",
|
|
414
|
+
},
|
|
415
|
+
query: {
|
|
416
|
+
type: "string",
|
|
417
|
+
description: "The BQL query to execute",
|
|
418
|
+
},
|
|
419
|
+
},
|
|
420
|
+
required: ["file_path", "query"],
|
|
421
|
+
},
|
|
422
|
+
};
|
|
423
|
+
export const formatFileTool = {
|
|
424
|
+
name: "format_file",
|
|
425
|
+
description: "Format a Beancount file. Can optionally write the formatted output back to the file.",
|
|
426
|
+
inputSchema: {
|
|
427
|
+
type: "object",
|
|
428
|
+
properties: {
|
|
429
|
+
file_path: {
|
|
430
|
+
type: "string",
|
|
431
|
+
description: "Path to the Beancount file to format",
|
|
432
|
+
},
|
|
433
|
+
write: {
|
|
434
|
+
type: "boolean",
|
|
435
|
+
description: "If true, write the formatted output back to the file",
|
|
436
|
+
},
|
|
437
|
+
},
|
|
438
|
+
required: ["file_path"],
|
|
439
|
+
},
|
|
440
|
+
};
|
|
441
|
+
// All tools combined
|
|
442
|
+
export const TOOLS = [
|
|
443
|
+
// Original Tools
|
|
444
|
+
validateTool,
|
|
445
|
+
queryTool,
|
|
446
|
+
balancesTool,
|
|
447
|
+
formatTool,
|
|
448
|
+
parseTool,
|
|
449
|
+
completionsTool,
|
|
450
|
+
listPluginsTool,
|
|
451
|
+
runPluginTool,
|
|
452
|
+
// Editor Tools
|
|
453
|
+
editorCompletionsTool,
|
|
454
|
+
editorHoverTool,
|
|
455
|
+
editorDefinitionTool,
|
|
456
|
+
editorDocumentSymbolsTool,
|
|
457
|
+
editorReferencesTool,
|
|
458
|
+
// Analysis Tools
|
|
459
|
+
ledgerStatsTool,
|
|
460
|
+
listAccountsTool,
|
|
461
|
+
listCommoditiesTool,
|
|
462
|
+
accountActivityTool,
|
|
463
|
+
// Utility Tools
|
|
464
|
+
formatCheckTool,
|
|
465
|
+
bqlTablesTool,
|
|
466
|
+
directiveAtLineTool,
|
|
467
|
+
findTransactionsTool,
|
|
468
|
+
// Report Tool
|
|
469
|
+
reportTool,
|
|
470
|
+
// File Operation Tools
|
|
471
|
+
validateFileTool,
|
|
472
|
+
queryFileTool,
|
|
473
|
+
formatFileTool,
|
|
474
|
+
];
|
|
475
|
+
//# sourceMappingURL=tools.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tools.js","sourceRoot":"","sources":["../src/tools.ts"],"names":[],"mappings":"AAAA,sCAAsC;AAYtC,yBAAyB;AAEzB,MAAM,CAAC,MAAM,YAAY,GAAmB;IAC1C,IAAI,EAAE,UAAU;IAChB,WAAW,EACT,8FAA8F;IAChG,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,MAAM,EAAE;gBACN,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,8CAA8C;aAC5D;SACF;QACD,QAAQ,EAAE,CAAC,QAAQ,CAAC;KACrB;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,SAAS,GAAmB;IACvC,IAAI,EAAE,OAAO;IACb,WAAW,EACT,mIAAmI;IACrI,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,MAAM,EAAE;gBACN,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,kCAAkC;aAChD;YACD,KAAK,EAAE;gBACL,IAAI,EAAE,QAAQ;gBACd,WAAW,EACT,mFAAmF;aACtF;SACF;QACD,QAAQ,EAAE,CAAC,QAAQ,EAAE,OAAO,CAAC;KAC9B;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,YAAY,GAAmB;IAC1C,I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nB,oBAAoB;IACpB,cAAc;IACd,UAAU;IACV,uBAAuB;IACvB,gBAAgB;IAChB,aAAa;IACb,cAAc;CACf,CAAC"}
|
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
export interface Amount {
|
|
2
|
+
number: string;
|
|
3
|
+
currency: string;
|
|
4
|
+
}
|
|
5
|
+
export interface Posting {
|
|
6
|
+
account: string;
|
|
7
|
+
units?: Amount;
|
|
8
|
+
}
|
|
9
|
+
export interface BaseDirective {
|
|
10
|
+
type: string;
|
|
11
|
+
date: string;
|
|
12
|
+
}
|
|
13
|
+
export interface TransactionDirective extends BaseDirective {
|
|
14
|
+
type: "transaction";
|
|
15
|
+
flag: string;
|
|
16
|
+
payee?: string;
|
|
17
|
+
narration?: string;
|
|
18
|
+
tags?: string[];
|
|
19
|
+
links?: string[];
|
|
20
|
+
postings: Posting[];
|
|
21
|
+
}
|
|
22
|
+
export interface OpenDirective extends BaseDirective {
|
|
23
|
+
type: "open";
|
|
24
|
+
account: string;
|
|
25
|
+
currencies?: string[];
|
|
26
|
+
booking?: string;
|
|
27
|
+
}
|
|
28
|
+
export interface CloseDirective extends BaseDirective {
|
|
29
|
+
type: "close";
|
|
30
|
+
account: string;
|
|
31
|
+
}
|
|
32
|
+
export interface BalanceDirective extends BaseDirective {
|
|
33
|
+
type: "balance";
|
|
34
|
+
account: string;
|
|
35
|
+
amount: Amount;
|
|
36
|
+
}
|
|
37
|
+
export interface CommodityDirective extends BaseDirective {
|
|
38
|
+
type: "commodity";
|
|
39
|
+
currency: string;
|
|
40
|
+
}
|
|
41
|
+
export interface PriceDirective extends BaseDirective {
|
|
42
|
+
type: "price";
|
|
43
|
+
currency: string;
|
|
44
|
+
amount: Amount;
|
|
45
|
+
}
|
|
46
|
+
export interface EventDirective extends BaseDirective {
|
|
47
|
+
type: "event";
|
|
48
|
+
event_type: string;
|
|
49
|
+
value: string;
|
|
50
|
+
}
|
|
51
|
+
export interface NoteDirective extends BaseDirective {
|
|
52
|
+
type: "note";
|
|
53
|
+
account: string;
|
|
54
|
+
comment: string;
|
|
55
|
+
}
|
|
56
|
+
export interface DocumentDirective extends BaseDirective {
|
|
57
|
+
type: "document";
|
|
58
|
+
account: string;
|
|
59
|
+
path: string;
|
|
60
|
+
}
|
|
61
|
+
export interface PadDirective extends BaseDirective {
|
|
62
|
+
type: "pad";
|
|
63
|
+
account: string;
|
|
64
|
+
source_account: string;
|
|
65
|
+
}
|
|
66
|
+
export interface QueryDirective extends BaseDirective {
|
|
67
|
+
type: "query";
|
|
68
|
+
name: string;
|
|
69
|
+
query_string: string;
|
|
70
|
+
}
|
|
71
|
+
export interface CustomDirective extends BaseDirective {
|
|
72
|
+
type: "custom";
|
|
73
|
+
custom_type: string;
|
|
74
|
+
}
|
|
75
|
+
export type Directive = TransactionDirective | OpenDirective | CloseDirective | BalanceDirective | CommodityDirective | PriceDirective | EventDirective | NoteDirective | DocumentDirective | PadDirective | QueryDirective | CustomDirective;
|
|
76
|
+
export interface DocumentSymbol {
|
|
77
|
+
name: string;
|
|
78
|
+
kind: string;
|
|
79
|
+
detail?: string;
|
|
80
|
+
range: {
|
|
81
|
+
start_line: number;
|
|
82
|
+
end_line: number;
|
|
83
|
+
start_character: number;
|
|
84
|
+
end_character: number;
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
export interface BeancountError {
|
|
88
|
+
message: string;
|
|
89
|
+
line?: number;
|
|
90
|
+
column?: number;
|
|
91
|
+
severity: "error" | "warning";
|
|
92
|
+
}
|
|
93
|
+
export interface QueryResult {
|
|
94
|
+
columns: string[];
|
|
95
|
+
rows: unknown[][];
|
|
96
|
+
errors?: BeancountError[];
|
|
97
|
+
}
|
|
98
|
+
export interface ValidationResult {
|
|
99
|
+
valid: boolean;
|
|
100
|
+
errors: BeancountError[];
|
|
101
|
+
}
|
|
102
|
+
export interface FormatResult {
|
|
103
|
+
formatted?: string;
|
|
104
|
+
errors?: BeancountError[];
|
|
105
|
+
}
|
|
106
|
+
export interface ParseResult {
|
|
107
|
+
ledger?: {
|
|
108
|
+
directives: Directive[];
|
|
109
|
+
};
|
|
110
|
+
errors?: BeancountError[];
|
|
111
|
+
}
|
|
112
|
+
export interface ToolResponse {
|
|
113
|
+
isError?: boolean;
|
|
114
|
+
content: Array<{
|
|
115
|
+
type: "text";
|
|
116
|
+
text: string;
|
|
117
|
+
}>;
|
|
118
|
+
[key: string]: unknown;
|
|
119
|
+
}
|
|
120
|
+
export interface ToolArguments {
|
|
121
|
+
source?: string;
|
|
122
|
+
query?: string;
|
|
123
|
+
partial_query?: string;
|
|
124
|
+
cursor_pos?: number;
|
|
125
|
+
plugin_name?: string;
|
|
126
|
+
line?: number;
|
|
127
|
+
character?: number;
|
|
128
|
+
account?: string;
|
|
129
|
+
payee?: string;
|
|
130
|
+
narration?: string;
|
|
131
|
+
tag?: string;
|
|
132
|
+
from_date?: string;
|
|
133
|
+
to_date?: string;
|
|
134
|
+
limit?: number;
|
|
135
|
+
report_type?: string;
|
|
136
|
+
currency?: string;
|
|
137
|
+
file_path?: string;
|
|
138
|
+
write?: boolean;
|
|
139
|
+
}
|
|
140
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,MAAM;IACrB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,OAAO;IACtB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,oBAAqB,SAAQ,aAAa;IACzD,IAAI,EAAE,aAAa,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM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ources":["../src/types.ts"],"names":[],"mappings":"AAAA,sCAAsC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rustledger/mcp-server",
|
|
3
|
-
"version": "0.2
|
|
3
|
+
"version": "0.5.2",
|
|
4
4
|
"description": "MCP server for rustledger - validate, query, and format Beancount ledgers",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -8,9 +8,11 @@
|
|
|
8
8
|
"rustledger-mcp": "dist/index.js"
|
|
9
9
|
},
|
|
10
10
|
"scripts": {
|
|
11
|
-
"build": "tsc",
|
|
11
|
+
"build": "tsc && cp -r src/docs dist/",
|
|
12
12
|
"dev": "tsc --watch",
|
|
13
13
|
"start": "node dist/index.js",
|
|
14
|
+
"test": "vitest run",
|
|
15
|
+
"test:watch": "vitest",
|
|
14
16
|
"prepublishOnly": "npm run build"
|
|
15
17
|
},
|
|
16
18
|
"keywords": [
|
|
@@ -30,11 +32,12 @@
|
|
|
30
32
|
"homepage": "https://rustledger.github.io",
|
|
31
33
|
"dependencies": {
|
|
32
34
|
"@modelcontextprotocol/sdk": "^1.0.0",
|
|
33
|
-
"@rustledger/wasm": "^0.2
|
|
35
|
+
"@rustledger/wasm": "^0.5.2"
|
|
34
36
|
},
|
|
35
37
|
"devDependencies": {
|
|
36
38
|
"@types/node": "^22.0.0",
|
|
37
|
-
"typescript": "^5.7.0"
|
|
39
|
+
"typescript": "^5.7.0",
|
|
40
|
+
"vitest": "^4.0.17"
|
|
38
41
|
},
|
|
39
42
|
"engines": {
|
|
40
43
|
"node": ">=18"
|