farseer-cli 1.0.5 → 1.0.8
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/docs/api-reference.md +372 -0
- package/docs/arquero-patterns.md +158 -0
- package/docs/cli-guide.md +160 -0
- package/docs/how-farseer-works.md +113 -0
- package/docs/import-workflows.md +306 -0
- package/docs/model-export.md +95 -0
- package/docs/new-app-template.md +240 -0
- package/docs/query-formulas.md +97 -0
- package/docs/troubleshooting.md +140 -0
- package/package.json +3 -3
- package/dist/commands/app.js +0 -349
- package/dist/commands/app.js.map +0 -7
- package/dist/commands/apps.js +0 -111
- package/dist/commands/apps.js.map +0 -7
- package/dist/commands/checkout.js +0 -166
- package/dist/commands/checkout.js.map +0 -7
- package/dist/commands/config.js +0 -139
- package/dist/commands/config.js.map +0 -7
- package/dist/commands/diff.js +0 -183
- package/dist/commands/diff.js.map +0 -7
- package/dist/commands/dimensions.js +0 -145
- package/dist/commands/dimensions.js.map +0 -7
- package/dist/commands/files.js +0 -99
- package/dist/commands/files.js.map +0 -7
- package/dist/commands/install.js +0 -79
- package/dist/commands/install.js.map +0 -7
- package/dist/commands/list.js +0 -92
- package/dist/commands/list.js.map +0 -7
- package/dist/commands/login.js +0 -134
- package/dist/commands/login.js.map +0 -7
- package/dist/commands/logout.js +0 -59
- package/dist/commands/logout.js.map +0 -7
- package/dist/commands/mcp-server.js +0 -41
- package/dist/commands/mcp-server.js.map +0 -7
- package/dist/commands/model.js +0 -189
- package/dist/commands/model.js.map +0 -7
- package/dist/commands/pull.js +0 -287
- package/dist/commands/pull.js.map +0 -7
- package/dist/commands/push.js +0 -251
- package/dist/commands/push.js.map +0 -7
- package/dist/commands/run.js +0 -288
- package/dist/commands/run.js.map +0 -7
- package/dist/commands/status.js +0 -145
- package/dist/commands/status.js.map +0 -7
- package/dist/commands/variables.js +0 -176
- package/dist/commands/variables.js.map +0 -7
- package/dist/commands/whoami.js +0 -63
- package/dist/commands/whoami.js.map +0 -7
- package/dist/index.js +0 -153
- package/dist/index.js.map +0 -7
- package/dist/mcp/index.js +0 -35
- package/dist/mcp/index.js.map +0 -7
- package/dist/mcp/prompts/workflows.js +0 -437
- package/dist/mcp/prompts/workflows.js.map +0 -7
- package/dist/mcp/resources/documentation.js +0 -167
- package/dist/mcp/resources/documentation.js.map +0 -7
- package/dist/mcp/server.js +0 -52
- package/dist/mcp/server.js.map +0 -7
- package/dist/mcp/tools/appTools.js +0 -377
- package/dist/mcp/tools/appTools.js.map +0 -7
- package/dist/mcp/tools/authTools.js +0 -158
- package/dist/mcp/tools/authTools.js.map +0 -7
- package/dist/mcp/tools/dataTools.js +0 -366
- package/dist/mcp/tools/dataTools.js.map +0 -7
- package/dist/mcp/tools/modelTools.js +0 -331
- package/dist/mcp/tools/modelTools.js.map +0 -7
- package/dist/mcp/tools/runTools.js +0 -231
- package/dist/mcp/tools/runTools.js.map +0 -7
- package/dist/mcp/tools/syncTools.js +0 -382
- package/dist/mcp/tools/syncTools.js.map +0 -7
- package/dist/mcp/utils/helpers.js +0 -113
- package/dist/mcp/utils/helpers.js.map +0 -7
- package/dist/services/appSyncService.js +0 -399
- package/dist/services/appSyncService.js.map +0 -7
- package/dist/services/configService.js +0 -196
- package/dist/services/configService.js.map +0 -7
- package/dist/services/farseerApi.js +0 -426
- package/dist/services/farseerApi.js.map +0 -7
- package/dist/services/farseerFactory.js +0 -231
- package/dist/services/farseerFactory.js.map +0 -7
- package/dist/services/farseerService.js +0 -614
- package/dist/services/farseerService.js.map +0 -7
- package/dist/services/gitService.js +0 -134
- package/dist/services/gitService.js.map +0 -7
- package/dist/services/syncService.js +0 -415
- package/dist/services/syncService.js.map +0 -7
- package/dist/utils/constants.js +0 -49
- package/dist/utils/constants.js.map +0 -7
- package/dist/utils/helpers.js +0 -433
- package/dist/utils/helpers.js.map +0 -7
- package/dist/utils/logger.js +0 -76
- package/dist/utils/logger.js.map +0 -7
|
@@ -1,366 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
var __export = (target, all) => {
|
|
6
|
-
for (var name in all)
|
|
7
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
-
};
|
|
9
|
-
var __copyProps = (to, from, except, desc) => {
|
|
10
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
-
for (let key of __getOwnPropNames(from))
|
|
12
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
-
}
|
|
15
|
-
return to;
|
|
16
|
-
};
|
|
17
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
-
var dataTools_exports = {};
|
|
19
|
-
__export(dataTools_exports, {
|
|
20
|
-
registerDataTools: () => registerDataTools
|
|
21
|
-
});
|
|
22
|
-
module.exports = __toCommonJS(dataTools_exports);
|
|
23
|
-
var import_zod = require("zod");
|
|
24
|
-
var import_farseerFactory = require("../../services/farseerFactory");
|
|
25
|
-
var import_configService = require("../../services/configService");
|
|
26
|
-
var import_helpers = require("../utils/helpers");
|
|
27
|
-
async function extractErrorMessage(error) {
|
|
28
|
-
if (error instanceof Error) return error.message;
|
|
29
|
-
if (error && typeof error === "object" && "status" in error && "statusText" in error) {
|
|
30
|
-
const resp = error;
|
|
31
|
-
const body = resp.text ? await resp.text() : "";
|
|
32
|
-
return `HTTP ${resp.status} ${resp.statusText}${body ? ": " + body : ""}`;
|
|
33
|
-
}
|
|
34
|
-
return String(error);
|
|
35
|
-
}
|
|
36
|
-
const exportVariableDataSchema = {
|
|
37
|
-
tenant: import_zod.z.string().optional().describe("Tenant name (optional if checked out)"),
|
|
38
|
-
variableName: import_zod.z.string().describe("Name of the variable to export"),
|
|
39
|
-
format: import_zod.z.enum(["csv", "json"]).optional().describe("Output format (default: csv)"),
|
|
40
|
-
limit: import_zod.z.number().optional().describe("Maximum number of rows to return")
|
|
41
|
-
};
|
|
42
|
-
const loadVariableDataSchema = {
|
|
43
|
-
tenant: import_zod.z.string().optional().describe("Tenant name (optional if checked out)"),
|
|
44
|
-
variableName: import_zod.z.string().describe("Name of the variable to load"),
|
|
45
|
-
dimensions: import_zod.z.array(import_zod.z.string()).optional().describe("Dimension table names to include as columns in the export")
|
|
46
|
-
};
|
|
47
|
-
const createImportJobSchema = {
|
|
48
|
-
tenant: import_zod.z.string().optional().describe("Tenant name (optional if checked out)"),
|
|
49
|
-
title: import_zod.z.string().describe("Import job title (shown in import history)"),
|
|
50
|
-
columns: import_zod.z.array(import_zod.z.object({
|
|
51
|
-
type: import_zod.z.enum(["DIMENSION_TABLE", "VARIABLE", "DATE", "DESCRIPTION"]).describe("Column type"),
|
|
52
|
-
dimensionTableName: import_zod.z.string().optional().describe("For DIMENSION_TABLE: name of the dimension table"),
|
|
53
|
-
variableName: import_zod.z.string().optional().describe("For VARIABLE: name of the variable"),
|
|
54
|
-
columnName: import_zod.z.string().optional().describe("Column header name"),
|
|
55
|
-
dateFormat: import_zod.z.string().optional().describe("For DATE: date format string"),
|
|
56
|
-
dimensionsNames: import_zod.z.array(import_zod.z.object({
|
|
57
|
-
tableName: import_zod.z.string(),
|
|
58
|
-
memberName: import_zod.z.string()
|
|
59
|
-
})).optional().describe("For VARIABLE: fixed dimension members (filters) for this variable column")
|
|
60
|
-
})).describe("Column definitions matching the data structure"),
|
|
61
|
-
rows: import_zod.z.array(import_zod.z.array(import_zod.z.union([import_zod.z.string(), import_zod.z.number(), import_zod.z.null()]))).describe("Data rows - each row is an array of values matching column order"),
|
|
62
|
-
labels: import_zod.z.array(import_zod.z.string()).optional().describe("Labels for grouping import jobs (used by undoPrevious to revert jobs with same labels)"),
|
|
63
|
-
undoPrevious: import_zod.z.boolean().optional().describe("Revert previous import jobs with the same labels before committing (default: false)"),
|
|
64
|
-
importDimensions: import_zod.z.boolean().optional().describe("Auto-create any missing dimension members before committing (default: false)"),
|
|
65
|
-
overwriteCells: import_zod.z.boolean().optional().describe("Overwrite existing cell values (default: false - adds to existing values)")
|
|
66
|
-
};
|
|
67
|
-
const createFileSchema = {
|
|
68
|
-
tenant: import_zod.z.string().optional().describe("Tenant name (optional if checked out)"),
|
|
69
|
-
fileName: import_zod.z.string().describe("Name of the file to create or update"),
|
|
70
|
-
folderPath: import_zod.z.array(import_zod.z.string()).optional().describe('Folder path as array (e.g., ["Files", "Reports"]). Default: ["Files"]'),
|
|
71
|
-
content: import_zod.z.string().describe("File content as text string")
|
|
72
|
-
};
|
|
73
|
-
function registerDataTools(server) {
|
|
74
|
-
server.tool(
|
|
75
|
-
"farseer_export_variable_data",
|
|
76
|
-
`Export data from a Farseer variable as CSV or JSON.
|
|
77
|
-
|
|
78
|
-
Uses the ExportApi.exportFormula() method to export variable data.
|
|
79
|
-
The variable name is passed as the formula, and the result contains
|
|
80
|
-
all data cells for that variable across all its dimensions.
|
|
81
|
-
|
|
82
|
-
Returns the raw CSV/JSON text inline so you can analyze it directly.
|
|
83
|
-
|
|
84
|
-
Use the 'limit' parameter to restrict row count for large variables.
|
|
85
|
-
|
|
86
|
-
If no tenant is specified, uses the currently checked-out tenant.`,
|
|
87
|
-
exportVariableDataSchema,
|
|
88
|
-
async (params) => {
|
|
89
|
-
const { tenant: tenantArg, variableName, format = "csv", limit } = params;
|
|
90
|
-
const checkout = (0, import_configService.getCurrentCheckout)();
|
|
91
|
-
const tenant = tenantArg || checkout?.tenant;
|
|
92
|
-
const organisation = tenantArg || checkout?.organisation;
|
|
93
|
-
if (!tenant || !organisation) {
|
|
94
|
-
return (0, import_helpers.tenantRequiredResponse)();
|
|
95
|
-
}
|
|
96
|
-
const nativeClient = await (0, import_farseerFactory.getNativeFarseerClient)(organisation, tenant);
|
|
97
|
-
if (!nativeClient) {
|
|
98
|
-
return (0, import_helpers.authRequiredResponse)(tenant);
|
|
99
|
-
}
|
|
100
|
-
try {
|
|
101
|
-
const exportRequest = {
|
|
102
|
-
formula: variableName,
|
|
103
|
-
format
|
|
104
|
-
};
|
|
105
|
-
if (limit) {
|
|
106
|
-
exportRequest.limit = limit;
|
|
107
|
-
}
|
|
108
|
-
const blob = await nativeClient.export.exportFormula(exportRequest);
|
|
109
|
-
const text = await blob.text();
|
|
110
|
-
const lines = text.split("\n").filter((l) => l.trim()).length;
|
|
111
|
-
return (0, import_helpers.successResponse)({
|
|
112
|
-
tenant,
|
|
113
|
-
variable: variableName,
|
|
114
|
-
format,
|
|
115
|
-
rowCount: Math.max(0, lines - 1),
|
|
116
|
-
data: text
|
|
117
|
-
});
|
|
118
|
-
} catch (error) {
|
|
119
|
-
return (0, import_helpers.errorResponse)(
|
|
120
|
-
`Export variable data failed: ${await extractErrorMessage(error)}`,
|
|
121
|
-
"NETWORK_ERROR"
|
|
122
|
-
);
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
);
|
|
126
|
-
server.tool(
|
|
127
|
-
"farseer_load_variable_data",
|
|
128
|
-
`Load data from a Farseer variable into a structured CSV format.
|
|
129
|
-
|
|
130
|
-
Uses the ExportApi.exportFormula() method to export variable data as CSV.
|
|
131
|
-
Returns all data cells for the variable across all its dimensions.
|
|
132
|
-
|
|
133
|
-
You can optionally specify which dimensions to include for documentation,
|
|
134
|
-
but the export returns all dimensions by default.
|
|
135
|
-
|
|
136
|
-
Example usage:
|
|
137
|
-
- Load "Revenue" data
|
|
138
|
-
- Load "Revenue" with dimensions ["Product", "Years", "Months"]
|
|
139
|
-
|
|
140
|
-
If no tenant is specified, uses the currently checked-out tenant.`,
|
|
141
|
-
loadVariableDataSchema,
|
|
142
|
-
async (params) => {
|
|
143
|
-
const { tenant: tenantArg, variableName, dimensions } = params;
|
|
144
|
-
const checkout = (0, import_configService.getCurrentCheckout)();
|
|
145
|
-
const tenant = tenantArg || checkout?.tenant;
|
|
146
|
-
const organisation = tenantArg || checkout?.organisation;
|
|
147
|
-
if (!tenant || !organisation) {
|
|
148
|
-
return (0, import_helpers.tenantRequiredResponse)();
|
|
149
|
-
}
|
|
150
|
-
const nativeClient = await (0, import_farseerFactory.getNativeFarseerClient)(organisation, tenant);
|
|
151
|
-
if (!nativeClient) {
|
|
152
|
-
return (0, import_helpers.authRequiredResponse)(tenant);
|
|
153
|
-
}
|
|
154
|
-
try {
|
|
155
|
-
const blob = await nativeClient.export.exportFormula({
|
|
156
|
-
formula: variableName,
|
|
157
|
-
format: "csv"
|
|
158
|
-
});
|
|
159
|
-
const text = await blob.text();
|
|
160
|
-
const lines = text.split("\n").filter((l) => l.trim()).length;
|
|
161
|
-
const rowCount = Math.max(0, lines - 1);
|
|
162
|
-
return (0, import_helpers.successResponse)({
|
|
163
|
-
tenant,
|
|
164
|
-
variable: variableName,
|
|
165
|
-
dimensions: dimensions || "all",
|
|
166
|
-
rowCount,
|
|
167
|
-
data: text
|
|
168
|
-
});
|
|
169
|
-
} catch (error) {
|
|
170
|
-
return (0, import_helpers.errorResponse)(
|
|
171
|
-
`Load variable data failed: ${await extractErrorMessage(error)}`,
|
|
172
|
-
"NETWORK_ERROR"
|
|
173
|
-
);
|
|
174
|
-
}
|
|
175
|
-
}
|
|
176
|
-
);
|
|
177
|
-
server.tool(
|
|
178
|
-
"farseer_create_import_job",
|
|
179
|
-
`Create and execute a complete data import job on a Farseer instance.
|
|
180
|
-
|
|
181
|
-
This tool handles the full import workflow in a single call:
|
|
182
|
-
1. Builds import metadata from column definitions
|
|
183
|
-
2. Creates the import job
|
|
184
|
-
3. Adds all data rows
|
|
185
|
-
4. Optionally creates missing dimension members (importDimensions)
|
|
186
|
-
5. Optionally reverts previous imports with same labels (undoPrevious)
|
|
187
|
-
6. Commits the import
|
|
188
|
-
|
|
189
|
-
Column types:
|
|
190
|
-
- DIMENSION_TABLE: Maps to a dimension table (e.g., Product, Years, Months)
|
|
191
|
-
- VARIABLE: Maps to a variable that will receive data values
|
|
192
|
-
- Can include dimensionsNames to fix specific dimension members for this column
|
|
193
|
-
- DATE: Date column with format string
|
|
194
|
-
- DESCRIPTION: Cell description/comment
|
|
195
|
-
|
|
196
|
-
The 'labels' parameter is important for the undoPrevious feature:
|
|
197
|
-
when undoPrevious is true, all previously committed imports with the
|
|
198
|
-
same labels will be reverted before this import is committed.
|
|
199
|
-
This is useful for idempotent re-imports.
|
|
200
|
-
|
|
201
|
-
The 'overwriteCells' parameter controls whether existing values are
|
|
202
|
-
overwritten (true) or accumulated (false, default).
|
|
203
|
-
|
|
204
|
-
Example columns for importing revenue data:
|
|
205
|
-
[
|
|
206
|
-
{ "type": "DIMENSION_TABLE", "dimensionTableName": "Product" },
|
|
207
|
-
{ "type": "DIMENSION_TABLE", "dimensionTableName": "Years" },
|
|
208
|
-
{ "type": "DIMENSION_TABLE", "dimensionTableName": "Months" },
|
|
209
|
-
{ "type": "VARIABLE", "variableName": "Revenue",
|
|
210
|
-
"dimensionsNames": [
|
|
211
|
-
{ "tableName": "Versions", "memberName": "Actual" }
|
|
212
|
-
]
|
|
213
|
-
}
|
|
214
|
-
]
|
|
215
|
-
|
|
216
|
-
If no tenant is specified, uses the currently checked-out tenant.`,
|
|
217
|
-
createImportJobSchema,
|
|
218
|
-
async (params) => {
|
|
219
|
-
const {
|
|
220
|
-
tenant: tenantArg,
|
|
221
|
-
title,
|
|
222
|
-
columns,
|
|
223
|
-
rows,
|
|
224
|
-
labels,
|
|
225
|
-
undoPrevious = false,
|
|
226
|
-
importDimensions = false,
|
|
227
|
-
overwriteCells = false
|
|
228
|
-
} = params;
|
|
229
|
-
const checkout = (0, import_configService.getCurrentCheckout)();
|
|
230
|
-
const tenant = tenantArg || checkout?.tenant;
|
|
231
|
-
const organisation = tenantArg || checkout?.organisation;
|
|
232
|
-
if (!tenant || !organisation) {
|
|
233
|
-
return (0, import_helpers.tenantRequiredResponse)();
|
|
234
|
-
}
|
|
235
|
-
const nativeClient = await (0, import_farseerFactory.getNativeFarseerClient)(organisation, tenant);
|
|
236
|
-
if (!nativeClient) {
|
|
237
|
-
return (0, import_helpers.authRequiredResponse)(tenant);
|
|
238
|
-
}
|
|
239
|
-
try {
|
|
240
|
-
await nativeClient.initTagMap();
|
|
241
|
-
const metadataColumns = columns.map((col) => {
|
|
242
|
-
switch (col.type) {
|
|
243
|
-
case "DIMENSION_TABLE":
|
|
244
|
-
return {
|
|
245
|
-
type: "DIMENSION_TABLE",
|
|
246
|
-
dimensionTableName: col.dimensionTableName,
|
|
247
|
-
columnName: col.columnName
|
|
248
|
-
};
|
|
249
|
-
case "VARIABLE":
|
|
250
|
-
return {
|
|
251
|
-
type: "VARIABLE",
|
|
252
|
-
variableName: col.variableName,
|
|
253
|
-
columnName: col.columnName || col.variableName,
|
|
254
|
-
dimensionsNames: col.dimensionsNames
|
|
255
|
-
};
|
|
256
|
-
case "DATE":
|
|
257
|
-
return {
|
|
258
|
-
type: "DATE",
|
|
259
|
-
dateFormat: col.dateFormat,
|
|
260
|
-
columnName: col.columnName
|
|
261
|
-
};
|
|
262
|
-
case "DESCRIPTION":
|
|
263
|
-
return {
|
|
264
|
-
type: "DESCRIPTION",
|
|
265
|
-
columnName: col.columnName
|
|
266
|
-
};
|
|
267
|
-
default:
|
|
268
|
-
return {
|
|
269
|
-
type: "NONE",
|
|
270
|
-
columnName: col.columnName
|
|
271
|
-
};
|
|
272
|
-
}
|
|
273
|
-
});
|
|
274
|
-
const metadata = await nativeClient.buildImportJobMetadata(metadataColumns);
|
|
275
|
-
if (overwriteCells) {
|
|
276
|
-
metadata.overwriteCells = true;
|
|
277
|
-
}
|
|
278
|
-
const importActions = await nativeClient.createImportJob({
|
|
279
|
-
title,
|
|
280
|
-
metadata,
|
|
281
|
-
labels
|
|
282
|
-
});
|
|
283
|
-
await importActions.addRows(rows);
|
|
284
|
-
await importActions.flushRows();
|
|
285
|
-
if (importDimensions) {
|
|
286
|
-
await importActions.importDimensions();
|
|
287
|
-
}
|
|
288
|
-
if (undoPrevious) {
|
|
289
|
-
await importActions.undoPrevious();
|
|
290
|
-
}
|
|
291
|
-
const report = await importActions.commit();
|
|
292
|
-
return (0, import_helpers.successResponse)({
|
|
293
|
-
tenant,
|
|
294
|
-
title,
|
|
295
|
-
rowCount: rows.length,
|
|
296
|
-
labels: labels || [],
|
|
297
|
-
undoPrevious,
|
|
298
|
-
importDimensions,
|
|
299
|
-
overwriteCells,
|
|
300
|
-
commitReport: report
|
|
301
|
-
});
|
|
302
|
-
} catch (error) {
|
|
303
|
-
return (0, import_helpers.errorResponse)(
|
|
304
|
-
`Import job failed: ${await extractErrorMessage(error)}`,
|
|
305
|
-
"NETWORK_ERROR"
|
|
306
|
-
);
|
|
307
|
-
}
|
|
308
|
-
}
|
|
309
|
-
);
|
|
310
|
-
server.tool(
|
|
311
|
-
"farseer_create_file",
|
|
312
|
-
`Create or update a file on a Farseer instance.
|
|
313
|
-
|
|
314
|
-
This creates a file in the specified folder on the Farseer file system.
|
|
315
|
-
If a file with the same name already exists in that folder, it will be updated.
|
|
316
|
-
|
|
317
|
-
The folderPath is an array of folder names, starting from the root.
|
|
318
|
-
Default is ["Files"] which is the standard files folder.
|
|
319
|
-
|
|
320
|
-
Common use cases:
|
|
321
|
-
- Creating CSV report files
|
|
322
|
-
- Uploading configuration files
|
|
323
|
-
- Saving processed data outputs
|
|
324
|
-
|
|
325
|
-
If no tenant is specified, uses the currently checked-out tenant.`,
|
|
326
|
-
createFileSchema,
|
|
327
|
-
async (params) => {
|
|
328
|
-
const { tenant: tenantArg, fileName, folderPath = ["Files"], content } = params;
|
|
329
|
-
const checkout = (0, import_configService.getCurrentCheckout)();
|
|
330
|
-
const tenant = tenantArg || checkout?.tenant;
|
|
331
|
-
const organisation = tenantArg || checkout?.organisation;
|
|
332
|
-
if (!tenant || !organisation) {
|
|
333
|
-
return (0, import_helpers.tenantRequiredResponse)();
|
|
334
|
-
}
|
|
335
|
-
const nativeClient = await (0, import_farseerFactory.getNativeFarseerClient)(organisation, tenant);
|
|
336
|
-
if (!nativeClient) {
|
|
337
|
-
return (0, import_helpers.authRequiredResponse)(tenant);
|
|
338
|
-
}
|
|
339
|
-
try {
|
|
340
|
-
const folder = await nativeClient.getItemByPath(folderPath);
|
|
341
|
-
const buffer = Buffer.from(content, "utf-8");
|
|
342
|
-
await nativeClient.createOrUpdateFarseerFile(
|
|
343
|
-
{ name: fileName, folderId: folder.id },
|
|
344
|
-
buffer
|
|
345
|
-
);
|
|
346
|
-
return (0, import_helpers.successResponse)({
|
|
347
|
-
tenant,
|
|
348
|
-
fileName,
|
|
349
|
-
folderPath,
|
|
350
|
-
size: buffer.length,
|
|
351
|
-
message: `File "${fileName}" created/updated in ${folderPath.join("/")}`
|
|
352
|
-
});
|
|
353
|
-
} catch (error) {
|
|
354
|
-
return (0, import_helpers.errorResponse)(
|
|
355
|
-
`Create file failed: ${await extractErrorMessage(error)}`,
|
|
356
|
-
"NETWORK_ERROR"
|
|
357
|
-
);
|
|
358
|
-
}
|
|
359
|
-
}
|
|
360
|
-
);
|
|
361
|
-
}
|
|
362
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
363
|
-
0 && (module.exports = {
|
|
364
|
-
registerDataTools
|
|
365
|
-
});
|
|
366
|
-
//# sourceMappingURL=dataTools.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/mcp/tools/dataTools.ts"],
|
|
4
|
-
"sourcesContent": ["/**\n * Data Operation Tools\n *\n * MCP tools for data export, import jobs, and file management on Farseer instances.\n * These use the native farseer-client for full API access.\n */\n\nimport { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';\nimport { z } from 'zod';\nimport { getNativeFarseerClient } from '../../services/farseerFactory';\nimport { getCurrentCheckout } from '../../services/configService';\nimport {\n successResponse,\n errorResponse,\n authRequiredResponse,\n tenantRequiredResponse,\n} from '../utils/helpers';\n\nasync function extractErrorMessage(error: unknown): Promise<string> {\n if (error instanceof Error) return error.message;\n if (error && typeof error === 'object' && 'status' in error && 'statusText' in error) {\n const resp = error as { status: number; statusText: string; text?: () => Promise<string> };\n const body = resp.text ? await resp.text() : '';\n return `HTTP ${resp.status} ${resp.statusText}${body ? ': ' + body : ''}`;\n }\n return String(error);\n}\n\n// Define schemas outside of tool registration to avoid deep type instantiation\nconst exportVariableDataSchema = {\n tenant: z.string().optional().describe('Tenant name (optional if checked out)'),\n variableName: z.string().describe('Name of the variable to export'),\n format: z.enum(['csv', 'json']).optional().describe('Output format (default: csv)'),\n limit: z.number().optional().describe('Maximum number of rows to return'),\n};\n\nconst loadVariableDataSchema = {\n tenant: z.string().optional().describe('Tenant name (optional if checked out)'),\n variableName: z.string().describe('Name of the variable to load'),\n dimensions: z.array(z.string()).optional().describe('Dimension table names to include as columns in the export'),\n};\n\nconst createImportJobSchema = {\n tenant: z.string().optional().describe('Tenant name (optional if checked out)'),\n title: z.string().describe('Import job title (shown in import history)'),\n columns: z.array(z.object({\n type: z.enum(['DIMENSION_TABLE', 'VARIABLE', 'DATE', 'DESCRIPTION']).describe('Column type'),\n dimensionTableName: z.string().optional().describe('For DIMENSION_TABLE: name of the dimension table'),\n variableName: z.string().optional().describe('For VARIABLE: name of the variable'),\n columnName: z.string().optional().describe('Column header name'),\n dateFormat: z.string().optional().describe('For DATE: date format string'),\n dimensionsNames: z.array(z.object({\n tableName: z.string(),\n memberName: z.string(),\n })).optional().describe('For VARIABLE: fixed dimension members (filters) for this variable column'),\n })).describe('Column definitions matching the data structure'),\n rows: z.array(z.array(z.union([z.string(), z.number(), z.null()]))).describe('Data rows - each row is an array of values matching column order'),\n labels: z.array(z.string()).optional().describe('Labels for grouping import jobs (used by undoPrevious to revert jobs with same labels)'),\n undoPrevious: z.boolean().optional().describe('Revert previous import jobs with the same labels before committing (default: false)'),\n importDimensions: z.boolean().optional().describe('Auto-create any missing dimension members before committing (default: false)'),\n overwriteCells: z.boolean().optional().describe('Overwrite existing cell values (default: false - adds to existing values)'),\n};\n\nconst createFileSchema = {\n tenant: z.string().optional().describe('Tenant name (optional if checked out)'),\n fileName: z.string().describe('Name of the file to create or update'),\n folderPath: z.array(z.string()).optional().describe('Folder path as array (e.g., [\"Files\", \"Reports\"]). Default: [\"Files\"]'),\n content: z.string().describe('File content as text string'),\n};\n\nexport function registerDataTools(server: McpServer): void {\n // farseer_export_variable_data - Export variable data\n server.tool(\n 'farseer_export_variable_data',\n `Export data from a Farseer variable as CSV or JSON.\n\nUses the ExportApi.exportFormula() method to export variable data.\nThe variable name is passed as the formula, and the result contains\nall data cells for that variable across all its dimensions.\n\nReturns the raw CSV/JSON text inline so you can analyze it directly.\n\nUse the 'limit' parameter to restrict row count for large variables.\n\nIf no tenant is specified, uses the currently checked-out tenant.`,\n exportVariableDataSchema,\n async (params: { tenant?: string; variableName: string; format?: 'csv' | 'json'; limit?: number }) => {\n const { tenant: tenantArg, variableName, format = 'csv', limit } = params;\n const checkout = getCurrentCheckout();\n const tenant = tenantArg || checkout?.tenant;\n const organisation = tenantArg || checkout?.organisation;\n\n if (!tenant || !organisation) {\n return tenantRequiredResponse();\n }\n\n const nativeClient = await getNativeFarseerClient(organisation, tenant);\n if (!nativeClient) {\n return authRequiredResponse(tenant);\n }\n\n try {\n const exportRequest: any = {\n formula: variableName,\n format,\n };\n if (limit) {\n exportRequest.limit = limit;\n }\n\n const blob = await nativeClient.export.exportFormula(exportRequest);\n const text = await blob.text();\n\n const lines = text.split('\\n').filter(l => l.trim()).length;\n\n return successResponse({\n tenant,\n variable: variableName,\n format,\n rowCount: Math.max(0, lines - 1),\n data: text,\n });\n } catch (error) {\n return errorResponse(\n `Export variable data failed: ${await extractErrorMessage(error)}`,\n 'NETWORK_ERROR'\n );\n }\n }\n );\n\n // farseer_load_variable_data - Load variable data with specific dimensions\n server.tool(\n 'farseer_load_variable_data',\n `Load data from a Farseer variable into a structured CSV format.\n\nUses the ExportApi.exportFormula() method to export variable data as CSV.\nReturns all data cells for the variable across all its dimensions.\n\nYou can optionally specify which dimensions to include for documentation,\nbut the export returns all dimensions by default.\n\nExample usage:\n- Load \"Revenue\" data\n- Load \"Revenue\" with dimensions [\"Product\", \"Years\", \"Months\"]\n\nIf no tenant is specified, uses the currently checked-out tenant.`,\n loadVariableDataSchema,\n async (params: { tenant?: string; variableName: string; dimensions?: string[] }) => {\n const { tenant: tenantArg, variableName, dimensions } = params;\n const checkout = getCurrentCheckout();\n const tenant = tenantArg || checkout?.tenant;\n const organisation = tenantArg || checkout?.organisation;\n\n if (!tenant || !organisation) {\n return tenantRequiredResponse();\n }\n\n const nativeClient = await getNativeFarseerClient(organisation, tenant);\n if (!nativeClient) {\n return authRequiredResponse(tenant);\n }\n\n try {\n const blob = await nativeClient.export.exportFormula({\n formula: variableName,\n format: 'csv',\n });\n const text = await blob.text();\n\n const lines = text.split('\\n').filter(l => l.trim()).length;\n const rowCount = Math.max(0, lines - 1);\n\n return successResponse({\n tenant,\n variable: variableName,\n dimensions: dimensions || 'all',\n rowCount,\n data: text,\n });\n } catch (error) {\n return errorResponse(\n `Load variable data failed: ${await extractErrorMessage(error)}`,\n 'NETWORK_ERROR'\n );\n }\n }\n );\n\n // farseer_create_import_job - Create and execute import job\n server.tool(\n 'farseer_create_import_job',\n `Create and execute a complete data import job on a Farseer instance.\n\nThis tool handles the full import workflow in a single call:\n1. Builds import metadata from column definitions\n2. Creates the import job\n3. Adds all data rows\n4. Optionally creates missing dimension members (importDimensions)\n5. Optionally reverts previous imports with same labels (undoPrevious)\n6. Commits the import\n\nColumn types:\n- DIMENSION_TABLE: Maps to a dimension table (e.g., Product, Years, Months)\n- VARIABLE: Maps to a variable that will receive data values\n - Can include dimensionsNames to fix specific dimension members for this column\n- DATE: Date column with format string\n- DESCRIPTION: Cell description/comment\n\nThe 'labels' parameter is important for the undoPrevious feature:\nwhen undoPrevious is true, all previously committed imports with the\nsame labels will be reverted before this import is committed.\nThis is useful for idempotent re-imports.\n\nThe 'overwriteCells' parameter controls whether existing values are\noverwritten (true) or accumulated (false, default).\n\nExample columns for importing revenue data:\n[\n { \"type\": \"DIMENSION_TABLE\", \"dimensionTableName\": \"Product\" },\n { \"type\": \"DIMENSION_TABLE\", \"dimensionTableName\": \"Years\" },\n { \"type\": \"DIMENSION_TABLE\", \"dimensionTableName\": \"Months\" },\n { \"type\": \"VARIABLE\", \"variableName\": \"Revenue\",\n \"dimensionsNames\": [\n { \"tableName\": \"Versions\", \"memberName\": \"Actual\" }\n ]\n }\n]\n\nIf no tenant is specified, uses the currently checked-out tenant.`,\n createImportJobSchema,\n async (params: {\n tenant?: string;\n title: string;\n columns: Array<{\n type: 'DIMENSION_TABLE' | 'VARIABLE' | 'DATE' | 'DESCRIPTION';\n dimensionTableName?: string;\n variableName?: string;\n columnName?: string;\n dateFormat?: string;\n dimensionsNames?: Array<{ tableName: string; memberName: string }>;\n }>;\n rows: Array<Array<string | number | null>>;\n labels?: string[];\n undoPrevious?: boolean;\n importDimensions?: boolean;\n overwriteCells?: boolean;\n }) => {\n const {\n tenant: tenantArg,\n title,\n columns,\n rows,\n labels,\n undoPrevious = false,\n importDimensions = false,\n overwriteCells = false,\n } = params;\n const checkout = getCurrentCheckout();\n const tenant = tenantArg || checkout?.tenant;\n const organisation = tenantArg || checkout?.organisation;\n\n if (!tenant || !organisation) {\n return tenantRequiredResponse();\n }\n\n const nativeClient = await getNativeFarseerClient(organisation, tenant);\n if (!nativeClient) {\n return authRequiredResponse(tenant);\n }\n\n try {\n await nativeClient.initTagMap();\n\n // Build metadata columns\n const metadataColumns = columns.map(col => {\n switch (col.type) {\n case 'DIMENSION_TABLE':\n return {\n type: 'DIMENSION_TABLE' as const,\n dimensionTableName: col.dimensionTableName!,\n columnName: col.columnName,\n };\n case 'VARIABLE':\n return {\n type: 'VARIABLE' as const,\n variableName: col.variableName!,\n columnName: col.columnName || col.variableName!,\n dimensionsNames: col.dimensionsNames,\n };\n case 'DATE':\n return {\n type: 'DATE' as const,\n dateFormat: col.dateFormat!,\n columnName: col.columnName,\n };\n case 'DESCRIPTION':\n return {\n type: 'DESCRIPTION' as const,\n columnName: col.columnName,\n };\n default:\n return {\n type: 'NONE' as const,\n columnName: col.columnName,\n };\n }\n });\n\n // Build metadata\n const metadata = await nativeClient.buildImportJobMetadata(metadataColumns as any);\n\n if (overwriteCells) {\n (metadata as any).overwriteCells = true;\n }\n\n // Create import job\n const importActions = await nativeClient.createImportJob({\n title,\n metadata,\n labels,\n });\n\n // Add rows\n await importActions.addRows(rows as any);\n await importActions.flushRows();\n\n // Import dimensions if needed\n if (importDimensions) {\n await importActions.importDimensions();\n }\n\n // Undo previous if needed\n if (undoPrevious) {\n await importActions.undoPrevious();\n }\n\n // Commit\n const report = await importActions.commit();\n\n return successResponse({\n tenant,\n title,\n rowCount: rows.length,\n labels: labels || [],\n undoPrevious,\n importDimensions,\n overwriteCells,\n commitReport: report,\n });\n } catch (error) {\n return errorResponse(\n `Import job failed: ${await extractErrorMessage(error)}`,\n 'NETWORK_ERROR'\n );\n }\n }\n );\n\n // farseer_create_file - Create or update file on instance\n server.tool(\n 'farseer_create_file',\n `Create or update a file on a Farseer instance.\n\nThis creates a file in the specified folder on the Farseer file system.\nIf a file with the same name already exists in that folder, it will be updated.\n\nThe folderPath is an array of folder names, starting from the root.\nDefault is [\"Files\"] which is the standard files folder.\n\nCommon use cases:\n- Creating CSV report files\n- Uploading configuration files\n- Saving processed data outputs\n\nIf no tenant is specified, uses the currently checked-out tenant.`,\n createFileSchema,\n async (params: {\n tenant?: string;\n fileName: string;\n folderPath?: string[];\n content: string;\n }) => {\n const { tenant: tenantArg, fileName, folderPath = ['Files'], content } = params;\n const checkout = getCurrentCheckout();\n const tenant = tenantArg || checkout?.tenant;\n const organisation = tenantArg || checkout?.organisation;\n\n if (!tenant || !organisation) {\n return tenantRequiredResponse();\n }\n\n const nativeClient = await getNativeFarseerClient(organisation, tenant);\n if (!nativeClient) {\n return authRequiredResponse(tenant);\n }\n\n try {\n const folder = await nativeClient.getItemByPath(folderPath);\n const buffer = Buffer.from(content, 'utf-8');\n\n await nativeClient.createOrUpdateFarseerFile(\n { name: fileName, folderId: folder.id } as any,\n buffer\n );\n\n return successResponse({\n tenant,\n fileName,\n folderPath,\n size: buffer.length,\n message: `File \"${fileName}\" created/updated in ${folderPath.join('/')}`,\n });\n } catch (error) {\n return errorResponse(\n `Create file failed: ${await extractErrorMessage(error)}`,\n 'NETWORK_ERROR'\n );\n }\n }\n );\n}\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAQA,iBAAkB;AAClB,4BAAuC;AACvC,2BAAmC;AACnC,qBAKO;AAEP,eAAe,oBAAoB,OAAiC;AAChE,MAAI,iBAAiB,MAAO,QAAO,MAAM;AACzC,MAAI,SAAS,OAAO,UAAU,YAAY,YAAY,SAAS,gBAAgB,OAAO;AAClF,UAAM,OAAO;AACb,UAAM,OAAO,KAAK,OAAO,MAAM,KAAK,KAAK,IAAI;AAC7C,WAAO,QAAQ,KAAK,MAAM,IAAI,KAAK,UAAU,GAAG,OAAO,OAAO,OAAO,EAAE;AAAA,EAC3E;AACA,SAAO,OAAO,KAAK;AACvB;AAGA,MAAM,2BAA2B;AAAA,EAC7B,QAAQ,aAAE,OAAO,EAAE,SAAS,EAAE,SAAS,uCAAuC;AAAA,EAC9E,cAAc,aAAE,OAAO,EAAE,SAAS,gCAAgC;AAAA,EAClE,QAAQ,aAAE,KAAK,CAAC,OAAO,MAAM,CAAC,EAAE,SAAS,EAAE,SAAS,8BAA8B;AAAA,EAClF,OAAO,aAAE,OAAO,EAAE,SAAS,EAAE,SAAS,kCAAkC;AAC5E;AAEA,MAAM,yBAAyB;AAAA,EAC3B,QAAQ,aAAE,OAAO,EAAE,SAAS,EAAE,SAAS,uCAAuC;AAAA,EAC9E,cAAc,aAAE,OAAO,EAAE,SAAS,8BAA8B;AAAA,EAChE,YAAY,aAAE,MAAM,aAAE,OAAO,CAAC,EAAE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