@zudello/modelcontextprotocol 1.0.0 → 1.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.
- package/README.md +115 -512
- package/dist/services/zudello/admin.d.ts +124 -74
- package/dist/services/zudello/admin.d.ts.map +1 -1
- package/dist/services/zudello/admin.js +443 -112
- package/dist/services/zudello/admin.js.map +1 -1
- package/dist/services/zudello/document-context.js +2 -2
- package/dist/services/zudello/document-context.js.map +1 -1
- package/dist/services/zudello/inboxes.d.ts +88 -7
- package/dist/services/zudello/inboxes.d.ts.map +1 -1
- package/dist/services/zudello/inboxes.js +317 -34
- package/dist/services/zudello/inboxes.js.map +1 -1
- package/dist/services/zudello/users.d.ts +36 -6
- package/dist/services/zudello/users.d.ts.map +1 -1
- package/dist/services/zudello/users.js +183 -82
- package/dist/services/zudello/users.js.map +1 -1
- package/dist/tools/admin/datasets/create-dataset.d.ts +35 -7
- package/dist/tools/admin/datasets/create-dataset.d.ts.map +1 -1
- package/dist/tools/admin/datasets/create-dataset.js +25 -18
- package/dist/tools/admin/datasets/create-dataset.js.map +1 -1
- package/dist/tools/admin/datasets/get-dataset.d.ts +1 -1
- package/dist/tools/admin/datasets/list-datasets.d.ts +2 -4
- package/dist/tools/admin/datasets/list-datasets.d.ts.map +1 -1
- package/dist/tools/admin/datasets/list-datasets.js +11 -8
- package/dist/tools/admin/datasets/list-datasets.js.map +1 -1
- package/dist/tools/admin/datasets/update-dataset.d.ts +39 -6
- package/dist/tools/admin/datasets/update-dataset.d.ts.map +1 -1
- package/dist/tools/admin/datasets/update-dataset.js +27 -15
- package/dist/tools/admin/datasets/update-dataset.js.map +1 -1
- package/dist/tools/admin/fields/create-field.d.ts +7 -17
- package/dist/tools/admin/fields/create-field.d.ts.map +1 -1
- package/dist/tools/admin/fields/create-field.js +15 -26
- package/dist/tools/admin/fields/create-field.js.map +1 -1
- package/dist/tools/admin/fields/get-field.d.ts +1 -1
- package/dist/tools/admin/fields/list-fields.d.ts +3 -5
- package/dist/tools/admin/fields/list-fields.d.ts.map +1 -1
- package/dist/tools/admin/fields/list-fields.js +14 -12
- package/dist/tools/admin/fields/list-fields.js.map +1 -1
- package/dist/tools/admin/fields/update-field.d.ts +11 -6
- package/dist/tools/admin/fields/update-field.d.ts.map +1 -1
- package/dist/tools/admin/fields/update-field.js +20 -16
- package/dist/tools/admin/fields/update-field.js.map +1 -1
- package/dist/tools/admin/quick-actions/create-quick-action.d.ts +9 -9
- package/dist/tools/admin/quick-actions/create-quick-action.d.ts.map +1 -1
- package/dist/tools/admin/quick-actions/create-quick-action.js +18 -18
- package/dist/tools/admin/quick-actions/create-quick-action.js.map +1 -1
- package/dist/tools/admin/quick-actions/get-quick-action.d.ts +1 -1
- package/dist/tools/admin/quick-actions/list-quick-actions.d.ts +4 -3
- package/dist/tools/admin/quick-actions/list-quick-actions.d.ts.map +1 -1
- package/dist/tools/admin/quick-actions/list-quick-actions.js +11 -10
- package/dist/tools/admin/quick-actions/list-quick-actions.js.map +1 -1
- package/dist/tools/admin/quick-actions/trigger-quick-action.d.ts +4 -6
- package/dist/tools/admin/quick-actions/trigger-quick-action.d.ts.map +1 -1
- package/dist/tools/admin/quick-actions/trigger-quick-action.js +15 -9
- package/dist/tools/admin/quick-actions/trigger-quick-action.js.map +1 -1
- package/dist/tools/admin/quick-actions/update-quick-action.d.ts +11 -6
- package/dist/tools/admin/quick-actions/update-quick-action.d.ts.map +1 -1
- package/dist/tools/admin/quick-actions/update-quick-action.js +19 -14
- package/dist/tools/admin/quick-actions/update-quick-action.js.map +1 -1
- package/dist/tools/inboxes/create-inbox-template.d.ts +1 -1
- package/dist/tools/inboxes/create-inbox.d.ts +1 -1
- package/dist/tools/inboxes/fetch-inbox.d.ts +1 -1
- package/dist/tools/inboxes/list-inbox-templates.d.ts +1 -1
- package/dist/tools/inboxes/list-inboxes.d.ts +1 -1
- package/dist/tools/inboxes/update-inbox-template.d.ts +1 -1
- package/dist/tools/inboxes/update-inbox.d.ts +1 -1
- package/dist/tools/inboxes/update-inbox.d.ts.map +1 -1
- package/dist/tools/inboxes/update-inbox.js +3 -2
- package/dist/tools/inboxes/update-inbox.js.map +1 -1
- package/package.json +1 -1
|
@@ -5,7 +5,7 @@ export const zudelloCreateDataset = {
|
|
|
5
5
|
description: `Create a new dataset.
|
|
6
6
|
|
|
7
7
|
Datasets define data sources and collections. Use this to set up new data structures.
|
|
8
|
-
Requires name
|
|
8
|
+
Requires name and column definitions. Optional dataset type and dimension mismatch handling.`,
|
|
9
9
|
inputSchema: {
|
|
10
10
|
type: "object",
|
|
11
11
|
properties: {
|
|
@@ -13,30 +13,37 @@ Requires name, model type, and optional description and configuration.`,
|
|
|
13
13
|
type: "string",
|
|
14
14
|
description: "Name of the dataset"
|
|
15
15
|
},
|
|
16
|
-
|
|
17
|
-
type: "
|
|
18
|
-
description: "
|
|
16
|
+
columnDefs: {
|
|
17
|
+
type: "array",
|
|
18
|
+
description: "Array of column definitions with id, name, type, and optional required/options",
|
|
19
|
+
items: {
|
|
20
|
+
type: "object",
|
|
21
|
+
properties: {
|
|
22
|
+
id: { type: "string", description: "Column identifier" },
|
|
23
|
+
name: { type: "string", description: "Column display name" },
|
|
24
|
+
type: { type: "string", description: "Column data type" },
|
|
25
|
+
required: { type: "boolean", description: "Whether column is required" },
|
|
26
|
+
options: { type: "object", description: "Additional column options" }
|
|
27
|
+
},
|
|
28
|
+
required: ["id", "name", "type"]
|
|
29
|
+
}
|
|
19
30
|
},
|
|
20
|
-
|
|
31
|
+
datasetType: {
|
|
21
32
|
type: "string",
|
|
22
|
-
description: "Optional:
|
|
33
|
+
description: "Optional: Type categorization for the dataset"
|
|
23
34
|
},
|
|
24
|
-
|
|
25
|
-
type: "
|
|
26
|
-
|
|
35
|
+
onDimensionMismatch: {
|
|
36
|
+
type: "string",
|
|
37
|
+
enum: ["fail_sentence", "skip_sentence", "skip_line"],
|
|
38
|
+
description: "Optional: How to handle dimension mismatches"
|
|
27
39
|
}
|
|
28
40
|
},
|
|
29
|
-
required: ["name", "
|
|
41
|
+
required: ["name", "columnDefs"]
|
|
30
42
|
},
|
|
31
43
|
execute: async (input, authContext) => {
|
|
32
44
|
try {
|
|
33
|
-
logger.info("zudelloCreateDataset executed", input);
|
|
34
|
-
const response = await createZudelloDataset(authContext,
|
|
35
|
-
name: input.name,
|
|
36
|
-
model: input.model,
|
|
37
|
-
description: input.description,
|
|
38
|
-
configuration: input.configuration
|
|
39
|
-
});
|
|
45
|
+
logger.info("zudelloCreateDataset executed", { name: input.name, columnCount: input.columnDefs.length });
|
|
46
|
+
const response = await createZudelloDataset(authContext, input.name, input.columnDefs, input.datasetType || "", input.onDimensionMismatch);
|
|
40
47
|
if (!response.success) {
|
|
41
48
|
throw new Error(response.error || "Failed to create dataset");
|
|
42
49
|
}
|
|
@@ -47,7 +54,7 @@ Requires name, model type, and optional description and configuration.`,
|
|
|
47
54
|
};
|
|
48
55
|
}
|
|
49
56
|
catch (error) {
|
|
50
|
-
logger.error("zudelloCreateDataset error", input, error);
|
|
57
|
+
logger.error("zudelloCreateDataset error", { name: input.name }, error);
|
|
51
58
|
return {
|
|
52
59
|
success: false,
|
|
53
60
|
error: error.message
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-dataset.js","sourceRoot":"","sources":["../../../../src/tools/admin/datasets/create-dataset.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAClD,OAAO,EAAE,oBAAoB,EAAE,MAAM,oCAAoC,CAAC;
|
|
1
|
+
{"version":3,"file":"create-dataset.js","sourceRoot":"","sources":["../../../../src/tools/admin/datasets/create-dataset.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAClD,OAAO,EAAE,oBAAoB,EAAE,MAAM,oCAAoC,CAAC;AAI1E,MAAM,CAAC,MAAM,oBAAoB,GAAG;IAClC,IAAI,EAAE,sBAAsB;IAC5B,W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M,EAAE,CAAC,CAAC;YAEzG,MAAM,QAAQ,GAAG,MAAM,oBAAoB,CACzC,WAAW,EACX,KAAK,CAAC,IAAI,EACV,KAAK,CAAC,UAAU,EAChB,KAAK,CAAC,WAAW,IAAI,EAAE,EACvB,KAAK,CAAC,mBAAmB,CAC1B,CAAC;YAEF,IAAI,CAAC,QAAQ,CAAC,OAAO,EAAE,CAAC;gBACtB,MAAM,IAAI,KAAK,CAAC,QAAQ,CAAC,KAAK,IAAI,0BAA0B,CAAC,CAAC;YAChE,CAAC;YAED,OAAO;gBACL,OAAO,EAAE,IAAI;gBACb,OAAO,EAAE,QAAQ,CAAC,IAAI;gBACtB,OAAO,EAAE,YAAY,KAAK,CAAC,IAAI,wBAAwB;aACxD,CAAC;QACJ,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,MAAM,CAAC,KAAK,CAAC,4BAA4B,EAAE,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,EAAE,EAAE,KAAc,CAAC,CAAC;YACjF,OAAO;gBACL,OAAO,EAAE,KAAK;gBACd,KAAK,EAAG,KAAe,CAAC,OAAO;aAChC,CAAC;QACJ,CAAC;IACH,CAAC;CACF,CAAC"}
|
|
@@ -16,7 +16,7 @@ export declare const zudelloGetDataset: {
|
|
|
16
16
|
uuid: string;
|
|
17
17
|
}, authContext: AuthContext) => Promise<{
|
|
18
18
|
success: boolean;
|
|
19
|
-
dataset: import("../../../services/zudello/admin.js").
|
|
19
|
+
dataset: import("../../../services/zudello/admin.js").ZudelloDataset | undefined;
|
|
20
20
|
error?: undefined;
|
|
21
21
|
} | {
|
|
22
22
|
success: boolean;
|
|
@@ -18,10 +18,8 @@ export declare const zudelloListDatasets: {
|
|
|
18
18
|
datasets: {
|
|
19
19
|
uuid: string;
|
|
20
20
|
name: string;
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
createdAt: string;
|
|
24
|
-
updatedAt: string;
|
|
21
|
+
datasetType: string;
|
|
22
|
+
columnDefs: import("../../../services/zudello/admin.js").DatasetColumnDef[] | undefined;
|
|
25
23
|
}[];
|
|
26
24
|
count: number;
|
|
27
25
|
error?: undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list-datasets.d.ts","sourceRoot":"","sources":["../../../../src/tools/admin/datasets/list-datasets.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAE5D,eAAO,MAAM,mBAAmB;;;;;;;;;;;;qBAgBrB;QAAE,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,eACZ,WAAW
|
|
1
|
+
{"version":3,"file":"list-datasets.d.ts","sourceRoot":"","sources":["../../../../src/tools/admin/datasets/list-datasets.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAE5D,eAAO,MAAM,mBAAmB;;;;;;;;;;;;qBAgBrB;QAAE,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,eACZ,WAAW;;;;;;;;;;;;;;;;CAwC3B,CAAC"}
|
|
@@ -17,27 +17,30 @@ Returns dataset names, models, descriptions, and configuration details.`,
|
|
|
17
17
|
},
|
|
18
18
|
execute: async (input, authContext) => {
|
|
19
19
|
try {
|
|
20
|
-
logger.debug("zudelloListDatasets executed", input);
|
|
21
|
-
|
|
20
|
+
logger.debug("zudelloListDatasets executed", { model: input.model });
|
|
21
|
+
// Note: The API doesn't support model filtering, but we can filter client-side if needed
|
|
22
|
+
const response = await listZudelloDatasets(authContext, { includeColumns: true });
|
|
22
23
|
if (!response.success) {
|
|
23
24
|
throw new Error(response.error || "Failed to list datasets");
|
|
24
25
|
}
|
|
25
|
-
|
|
26
|
+
let datasets = response.data || [];
|
|
27
|
+
// Client-side filtering if model is specified
|
|
28
|
+
if (input.model) {
|
|
29
|
+
datasets = datasets.filter((d) => d.datasetType?.toLowerCase().includes(input.model.toLowerCase()));
|
|
30
|
+
}
|
|
26
31
|
return {
|
|
27
32
|
success: true,
|
|
28
33
|
datasets: datasets.map((d) => ({
|
|
29
34
|
uuid: d.uuid,
|
|
30
35
|
name: d.name,
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
createdAt: d.createdAt,
|
|
34
|
-
updatedAt: d.updatedAt,
|
|
36
|
+
datasetType: d.datasetType,
|
|
37
|
+
columnDefs: d.columnDefs,
|
|
35
38
|
})),
|
|
36
39
|
count: datasets.length,
|
|
37
40
|
};
|
|
38
41
|
}
|
|
39
42
|
catch (error) {
|
|
40
|
-
logger.error("zudelloListDatasets error", input, error);
|
|
43
|
+
logger.error("zudelloListDatasets error", { model: input.model }, error);
|
|
41
44
|
return {
|
|
42
45
|
success: false,
|
|
43
46
|
error: error.message,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list-datasets.js","sourceRoot":"","sources":["../../../../src/tools/admin/datasets/list-datasets.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAClD,OAAO,EAAE,mBAAmB,EAAE,MAAM,oCAAoC,CAAC;AAGzE,MAAM,CAAC,MAAM,mBAAmB,GAAG;IACjC,IAAI,EAAE,qBAAqB;IAC3B,WAAW,EAAE;;;wEAGyD;IACtE,WAAW,EAAE;QACX,IAAI,EAAE,QAAiB;QACvB,UAAU,EAAE;YACV,KAAK,EAAE;gBACL,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,yCAAyC;aACvD;SACF;KACF;IACD,OAAO,EAAE,KAAK,EACZ,KAAyB,EACzB,WAAwB,EACxB,EAAE;QACF,IAAI,CAAC;YACH,MAAM,CAAC,KAAK,CAAC,8BAA8B,EAAE,KAAK,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"list-datasets.js","sourceRoot":"","sources":["../../../../src/tools/admin/datasets/list-datasets.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAClD,OAAO,EAAE,mBAAmB,EAAE,MAAM,o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BAC1B,UAAU,EAAE,CAAC,CAAC,UAAU;iBACzB,CAAC,CAAC;gBACH,KAAK,EAAE,QAAQ,CAAC,MAAM;aACvB,CAAC;QACJ,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,MAAM,CAAC,KAAK,CAAC,2BAA2B,EAAE,EAAE,KAAK,EAAE,KAAK,CAAC,KAAK,EAAE,EAAE,KAAc,CAAC,CAAC;YAClF,OAAO;gBACL,OAAO,EAAE,KAAK;gBACd,KAAK,EAAG,KAAe,CAAC,OAAO;gBAC/B,QAAQ,EAAE,EAAE;aACb,CAAC;QACJ,CAAC;IACH,CAAC;CACF,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { AuthContext } from "../../../context/auth.js";
|
|
2
|
+
import type { DatasetColumnDef } from "../../../services/zudello/admin.js";
|
|
2
3
|
export declare const zudelloUpdateDataset: {
|
|
3
4
|
name: string;
|
|
4
5
|
description: string;
|
|
@@ -13,25 +14,57 @@ export declare const zudelloUpdateDataset: {
|
|
|
13
14
|
type: string;
|
|
14
15
|
description: string;
|
|
15
16
|
};
|
|
16
|
-
|
|
17
|
+
columnDefs: {
|
|
17
18
|
type: string;
|
|
18
19
|
description: string;
|
|
20
|
+
items: {
|
|
21
|
+
type: string;
|
|
22
|
+
properties: {
|
|
23
|
+
id: {
|
|
24
|
+
type: string;
|
|
25
|
+
description: string;
|
|
26
|
+
};
|
|
27
|
+
name: {
|
|
28
|
+
type: string;
|
|
29
|
+
description: string;
|
|
30
|
+
};
|
|
31
|
+
type: {
|
|
32
|
+
type: string;
|
|
33
|
+
description: string;
|
|
34
|
+
};
|
|
35
|
+
required: {
|
|
36
|
+
type: string;
|
|
37
|
+
description: string;
|
|
38
|
+
};
|
|
39
|
+
options: {
|
|
40
|
+
type: string;
|
|
41
|
+
description: string;
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
required: string[];
|
|
45
|
+
};
|
|
19
46
|
};
|
|
20
|
-
|
|
47
|
+
datasetType: {
|
|
21
48
|
type: string;
|
|
22
49
|
description: string;
|
|
23
50
|
};
|
|
51
|
+
onDimensionMismatch: {
|
|
52
|
+
type: string;
|
|
53
|
+
enum: string[];
|
|
54
|
+
description: string;
|
|
55
|
+
};
|
|
24
56
|
};
|
|
25
57
|
required: string[];
|
|
26
58
|
};
|
|
27
59
|
execute: (input: {
|
|
28
60
|
uuid: string;
|
|
29
|
-
name
|
|
30
|
-
|
|
31
|
-
|
|
61
|
+
name: string;
|
|
62
|
+
columnDefs: DatasetColumnDef[];
|
|
63
|
+
datasetType?: string;
|
|
64
|
+
onDimensionMismatch?: "fail_sentence" | "skip_sentence" | "skip_line";
|
|
32
65
|
}, authContext: AuthContext) => Promise<{
|
|
33
66
|
success: boolean;
|
|
34
|
-
dataset: import("../../../services/zudello/admin.js").
|
|
67
|
+
dataset: import("../../../services/zudello/admin.js").ZudelloDataset | undefined;
|
|
35
68
|
message: string;
|
|
36
69
|
error?: undefined;
|
|
37
70
|
} | {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"update-dataset.d.ts","sourceRoot":"","sources":["../../../../src/tools/admin/datasets/update-dataset.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"update-dataset.d.ts","sourceRoot":"","sources":["../../../../src/tools/admin/datasets/update-dataset.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AAE3E,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBA6CtB;QACL,IAAI,EAAE,MAAM,CAAC;QACb,IAAI,EAAE,MAAM,CAAC;QACb,UAAU,EAAE,gBAAgB,EAAE,CAAC;QAC/B,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,mBAAmB,CAAC,EAAE,eAAe,GAAG,eAAe,GAAG,WAAW,CAAC;KACvE,eACY,WAAW;;;;;;;;;;;CA+B3B,CAAC"}
|
|
@@ -4,7 +4,7 @@ export const zudelloUpdateDataset = {
|
|
|
4
4
|
name: "zudelloUpdateDataset",
|
|
5
5
|
description: `Update an existing dataset.
|
|
6
6
|
|
|
7
|
-
Modify dataset name,
|
|
7
|
+
Modify dataset name, column definitions, or configuration settings.
|
|
8
8
|
Changes affect how data is structured and accessed.`,
|
|
9
9
|
inputSchema: {
|
|
10
10
|
type: "object",
|
|
@@ -15,27 +15,39 @@ Changes affect how data is structured and accessed.`,
|
|
|
15
15
|
},
|
|
16
16
|
name: {
|
|
17
17
|
type: "string",
|
|
18
|
-
description: "
|
|
18
|
+
description: "Name for the dataset"
|
|
19
19
|
},
|
|
20
|
-
|
|
20
|
+
columnDefs: {
|
|
21
|
+
type: "array",
|
|
22
|
+
description: "Array of column definitions with id, name, type, and optional required/options",
|
|
23
|
+
items: {
|
|
24
|
+
type: "object",
|
|
25
|
+
properties: {
|
|
26
|
+
id: { type: "string", description: "Column identifier" },
|
|
27
|
+
name: { type: "string", description: "Column display name" },
|
|
28
|
+
type: { type: "string", description: "Column data type" },
|
|
29
|
+
required: { type: "boolean", description: "Whether column is required" },
|
|
30
|
+
options: { type: "object", description: "Additional column options" }
|
|
31
|
+
},
|
|
32
|
+
required: ["id", "name", "type"]
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
datasetType: {
|
|
21
36
|
type: "string",
|
|
22
|
-
description: "Optional:
|
|
37
|
+
description: "Optional: Type categorization for the dataset"
|
|
23
38
|
},
|
|
24
|
-
|
|
25
|
-
type: "
|
|
26
|
-
|
|
39
|
+
onDimensionMismatch: {
|
|
40
|
+
type: "string",
|
|
41
|
+
enum: ["fail_sentence", "skip_sentence", "skip_line"],
|
|
42
|
+
description: "Optional: How to handle dimension mismatches"
|
|
27
43
|
}
|
|
28
44
|
},
|
|
29
|
-
required: ["uuid"]
|
|
45
|
+
required: ["uuid", "name", "columnDefs"]
|
|
30
46
|
},
|
|
31
47
|
execute: async (input, authContext) => {
|
|
32
48
|
try {
|
|
33
|
-
logger.info("zudelloUpdateDataset executed", input);
|
|
34
|
-
const response = await updateZudelloDataset(authContext, input.uuid,
|
|
35
|
-
name: input.name,
|
|
36
|
-
description: input.description,
|
|
37
|
-
configuration: input.configuration
|
|
38
|
-
});
|
|
49
|
+
logger.info("zudelloUpdateDataset executed", { uuid: input.uuid, name: input.name });
|
|
50
|
+
const response = await updateZudelloDataset(authContext, input.uuid, input.name, input.columnDefs, input.datasetType || "", input.onDimensionMismatch);
|
|
39
51
|
if (!response.success) {
|
|
40
52
|
throw new Error(response.error || "Failed to update dataset");
|
|
41
53
|
}
|
|
@@ -46,7 +58,7 @@ Changes affect how data is structured and accessed.`,
|
|
|
46
58
|
};
|
|
47
59
|
}
|
|
48
60
|
catch (error) {
|
|
49
|
-
logger.error("zudelloUpdateDataset error", input, error);
|
|
61
|
+
logger.error("zudelloUpdateDataset error", { uuid: input.uuid }, error);
|
|
50
62
|
return {
|
|
51
63
|
success: false,
|
|
52
64
|
error: error.message
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"update-dataset.js","sourceRoot":"","sources":["../../../../src/tools/admin/datasets/update-dataset.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAClD,OAAO,EAAE,oBAAoB,EAAE,MAAM,oCAAoC,CAAC;
|
|
1
|
+
{"version":3,"file":"update-dataset.js","sourceRoot":"","sources":["../../../../src/tools/admin/datasets/update-dataset.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAClD,OAAO,EAAE,oBAAoB,EAAE,MAAM,oCAAoC,CAAC;AAI1E,MAAM,CAAC,MAAM,oBAAoB,GAAG;IAClC,IAAI,EAAE,sBAAsB;IAC5B,WAAW,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,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC;YAErF,MAAM,QAAQ,GAAG,MAAM,oBAAoB,CACzC,WAAW,EACX,KAAK,CAAC,IAAI,EACV,KAAK,CAAC,IAAI,EACV,KAAK,CAAC,UAAU,EAChB,KAAK,CAAC,WAAW,IAAI,EAAE,EACvB,KAAK,CAAC,mBAAmB,CAC1B,CAAC;YAEF,IAAI,CAAC,QAAQ,CAAC,OAAO,EAAE,CAAC;gBACtB,MAAM,IAAI,KAAK,CAAC,QAAQ,CAAC,KAAK,IAAI,0BAA0B,CAAC,CAAC;YAChE,CAAC;YAED,OAAO;gBACL,OAAO,EAAE,IAAI;gBACb,OAAO,EAAE,QAAQ,CAAC,IAAI;gBACtB,OAAO,EAAE,8BAA8B;aACxC,CAAC;QACJ,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,MAAM,CAAC,KAAK,CAAC,4BAA4B,EAAE,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,EAAE,EAAE,KAAc,CAAC,CAAC;YACjF,OAAO;gBACL,OAAO,EAAE,KAAK;gBACd,KAAK,EAAG,KAAe,CAAC,OAAO;aAChC,CAAC;QACJ,CAAC;IACH,CAAC;CACF,CAAC"}
|
|
@@ -5,7 +5,7 @@ export declare const zudelloCreateField: {
|
|
|
5
5
|
inputSchema: {
|
|
6
6
|
type: "object";
|
|
7
7
|
properties: {
|
|
8
|
-
|
|
8
|
+
path: {
|
|
9
9
|
type: string;
|
|
10
10
|
description: string;
|
|
11
11
|
};
|
|
@@ -13,19 +13,11 @@ export declare const zudelloCreateField: {
|
|
|
13
13
|
type: string;
|
|
14
14
|
description: string;
|
|
15
15
|
};
|
|
16
|
-
|
|
16
|
+
model_name: {
|
|
17
17
|
type: string;
|
|
18
18
|
description: string;
|
|
19
19
|
};
|
|
20
|
-
|
|
21
|
-
type: string;
|
|
22
|
-
description: string;
|
|
23
|
-
};
|
|
24
|
-
required: {
|
|
25
|
-
type: string;
|
|
26
|
-
description: string;
|
|
27
|
-
};
|
|
28
|
-
options: {
|
|
20
|
+
context: {
|
|
29
21
|
type: string;
|
|
30
22
|
description: string;
|
|
31
23
|
};
|
|
@@ -33,15 +25,13 @@ export declare const zudelloCreateField: {
|
|
|
33
25
|
required: string[];
|
|
34
26
|
};
|
|
35
27
|
execute: (input: {
|
|
36
|
-
|
|
28
|
+
path: string;
|
|
37
29
|
label: string;
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
required?: boolean;
|
|
41
|
-
options?: Record<string, unknown>;
|
|
30
|
+
model_name: string;
|
|
31
|
+
context?: Record<string, string[]>;
|
|
42
32
|
}, authContext: AuthContext) => Promise<{
|
|
43
33
|
success: boolean;
|
|
44
|
-
field: import("../../../services/zudello/admin.js").
|
|
34
|
+
field: import("../../../services/zudello/admin.js").ZudelloFieldSettings | undefined;
|
|
45
35
|
message: string;
|
|
46
36
|
error?: undefined;
|
|
47
37
|
} | {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-field.d.ts","sourceRoot":"","sources":["../../../../src/tools/admin/fields/create-field.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAE5D,eAAO,MAAM,kBAAkB
|
|
1
|
+
{"version":3,"file":"create-field.d.ts","sourceRoot":"","sources":["../../../../src/tools/admin/fields/create-field.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAE5D,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;qBA6BpB;QACL,IAAI,EAAE,MAAM,CAAC;QACb,KAAK,EAAE,MAAM,CAAC;QACd,UAAU,EAAE,MAAM,CAAC;QACnB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;KACpC,eACY,WAAW;;;;;;;;;;;CAgC3B,CAAC"}
|
|
@@ -1,52 +1,41 @@
|
|
|
1
1
|
import { logger } from "../../../utils/logger.js";
|
|
2
|
-
import {
|
|
2
|
+
import { createZudelloFieldSettings } from "../../../services/zudello/admin.js";
|
|
3
3
|
export const zudelloCreateField = {
|
|
4
4
|
name: "zudelloCreateField",
|
|
5
5
|
description: `Create a new custom field.
|
|
6
6
|
|
|
7
|
-
Define a new field with
|
|
7
|
+
Define a new field with path, label, and model_name.
|
|
8
8
|
Fields extend data models with custom attributes.`,
|
|
9
9
|
inputSchema: {
|
|
10
10
|
type: "object",
|
|
11
11
|
properties: {
|
|
12
|
-
|
|
12
|
+
path: {
|
|
13
13
|
type: "string",
|
|
14
|
-
description: "Field
|
|
14
|
+
description: "Field path (internal identifier)"
|
|
15
15
|
},
|
|
16
16
|
label: {
|
|
17
17
|
type: "string",
|
|
18
18
|
description: "Display label for the field"
|
|
19
19
|
},
|
|
20
|
-
|
|
20
|
+
model_name: {
|
|
21
21
|
type: "string",
|
|
22
|
-
description: "
|
|
22
|
+
description: "Model name this field belongs to"
|
|
23
23
|
},
|
|
24
|
-
|
|
25
|
-
type: "string",
|
|
26
|
-
description: "Model type this field belongs to"
|
|
27
|
-
},
|
|
28
|
-
required: {
|
|
29
|
-
type: "boolean",
|
|
30
|
-
description: "Optional: Whether field is required"
|
|
31
|
-
},
|
|
32
|
-
options: {
|
|
24
|
+
context: {
|
|
33
25
|
type: "object",
|
|
34
|
-
description: "Optional:
|
|
26
|
+
description: "Optional: Module/submodule context mapping (e.g., {PURCHASING: ['INVOICE']})"
|
|
35
27
|
}
|
|
36
28
|
},
|
|
37
|
-
required: ["
|
|
29
|
+
required: ["path", "label", "model_name"]
|
|
38
30
|
},
|
|
39
31
|
execute: async (input, authContext) => {
|
|
40
32
|
try {
|
|
41
|
-
logger.info("zudelloCreateField executed", input);
|
|
42
|
-
const response = await
|
|
43
|
-
|
|
33
|
+
logger.info("zudelloCreateField executed", { path: input.path, label: input.label, model_name: input.model_name });
|
|
34
|
+
const response = await createZudelloFieldSettings(authContext, {
|
|
35
|
+
path: input.path,
|
|
44
36
|
label: input.label,
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
required: input.required,
|
|
48
|
-
options: input.options
|
|
49
|
-
});
|
|
37
|
+
model_name: input.model_name,
|
|
38
|
+
}, input.context || {});
|
|
50
39
|
if (!response.success) {
|
|
51
40
|
throw new Error(response.error || "Failed to create field");
|
|
52
41
|
}
|
|
@@ -57,7 +46,7 @@ Fields extend data models with custom attributes.`,
|
|
|
57
46
|
};
|
|
58
47
|
}
|
|
59
48
|
catch (error) {
|
|
60
|
-
logger.error("zudelloCreateField error", input, error);
|
|
49
|
+
logger.error("zudelloCreateField error", { path: input.path }, error);
|
|
61
50
|
return {
|
|
62
51
|
success: false,
|
|
63
52
|
error: error.message
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-field.js","sourceRoot":"","sources":["../../../../src/tools/admin/fields/create-field.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAClD,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"create-field.js","sourceRoot":"","sources":["../../../../src/tools/admin/fields/create-field.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAClD,OAAO,EAAE,0BAA0B,EAAE,MAAM,oCAAoC,CAAC;AAGhF,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAChC,IAAI,EAAE,oBAAoB;IAC1B,WAAW,EAAE;;;kDAGmC;IAChD,WAAW,EAAE;QACX,IAAI,EAAE,QAAiB;QACvB,UAAU,EAAE;YACV,IAAI,EAAE;gBACJ,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,kCAAkC;aAChD;YACD,KAAK,EAAE;gBACL,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,6BAA6B;aAC3C;YACD,UAAU,EAAE;gBACV,IAAI,EAAE,QAAQ;gBACd,WAAW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
|
16
16
|
uuid: string;
|
|
17
17
|
}, authContext: AuthContext) => Promise<{
|
|
18
18
|
success: boolean;
|
|
19
|
-
field: import("../../../services/zudello/admin.js").
|
|
19
|
+
field: import("../../../services/zudello/admin.js").ZudelloFieldSettings | undefined;
|
|
20
20
|
error?: undefined;
|
|
21
21
|
} | {
|
|
22
22
|
success: boolean;
|
|
@@ -17,12 +17,10 @@ export declare const zudelloListFields: {
|
|
|
17
17
|
success: boolean;
|
|
18
18
|
fields: {
|
|
19
19
|
uuid: string;
|
|
20
|
-
|
|
20
|
+
path: string;
|
|
21
21
|
label: string;
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
required: boolean;
|
|
25
|
-
options: Record<string, unknown> | undefined;
|
|
22
|
+
model_name: string;
|
|
23
|
+
context: Record<string, string[]>;
|
|
26
24
|
}[];
|
|
27
25
|
count: number;
|
|
28
26
|
error?: undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list-fields.d.ts","sourceRoot":"","sources":["../../../../src/tools/admin/fields/list-fields.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"list-fields.d.ts","sourceRoot":"","sources":["../../../../src/tools/admin/fields/list-fields.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAG5D,eAAO,MAAM,iBAAiB;;;;;;;;;;;;qBAgBnB;QAAE,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,eACZ,WAAW;;;;;;;;;;;;;;;;;CAwC3B,CAAC"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { logger } from "../../../utils/logger.js";
|
|
2
|
-
import {
|
|
2
|
+
import { listZudelloFieldSettings } from "../../../services/zudello/admin.js";
|
|
3
3
|
export const zudelloListFields = {
|
|
4
4
|
name: "zudelloListFields",
|
|
5
5
|
description: `List all custom field configurations.
|
|
6
6
|
|
|
7
|
-
Returns field definitions including
|
|
8
|
-
Fields can be filtered by model type.`,
|
|
7
|
+
Returns field definitions including path, label, model_name, and context.
|
|
8
|
+
Fields can be filtered by model type client-side.`,
|
|
9
9
|
inputSchema: {
|
|
10
10
|
type: "object",
|
|
11
11
|
properties: {
|
|
@@ -17,28 +17,30 @@ Fields can be filtered by model type.`,
|
|
|
17
17
|
},
|
|
18
18
|
execute: async (input, authContext) => {
|
|
19
19
|
try {
|
|
20
|
-
logger.debug("zudelloListFields executed", input);
|
|
21
|
-
const response = await
|
|
20
|
+
logger.debug("zudelloListFields executed", { model: input.model });
|
|
21
|
+
const response = await listZudelloFieldSettings(authContext, { fullObject: false });
|
|
22
22
|
if (!response.success) {
|
|
23
23
|
throw new Error(response.error || "Failed to list fields");
|
|
24
24
|
}
|
|
25
|
-
|
|
25
|
+
let fields = (response.data || []);
|
|
26
|
+
// Client-side filtering if model is specified
|
|
27
|
+
if (input.model) {
|
|
28
|
+
fields = fields.filter((f) => f.model_name?.toLowerCase().includes(input.model.toLowerCase()));
|
|
29
|
+
}
|
|
26
30
|
return {
|
|
27
31
|
success: true,
|
|
28
32
|
fields: fields.map((f) => ({
|
|
29
33
|
uuid: f.uuid,
|
|
30
|
-
|
|
34
|
+
path: f.path,
|
|
31
35
|
label: f.label,
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
required: f.required,
|
|
35
|
-
options: f.options,
|
|
36
|
+
model_name: f.model_name,
|
|
37
|
+
context: f.context,
|
|
36
38
|
})),
|
|
37
39
|
count: fields.length,
|
|
38
40
|
};
|
|
39
41
|
}
|
|
40
42
|
catch (error) {
|
|
41
|
-
logger.error("zudelloListFields error", input, error);
|
|
43
|
+
logger.error("zudelloListFields error", { model: input.model }, error);
|
|
42
44
|
return {
|
|
43
45
|
success: false,
|
|
44
46
|
error: error.message,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list-fields.js","sourceRoot":"","sources":["../../../../src/tools/admin/fields/list-fields.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAClD,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"list-fields.js","sourceRoot":"","sources":["../../../../src/tools/admin/fields/list-fields.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAClD,OAAO,EAAE,wBAAwB,EAAE,MAAM,oCAAoC,CAAC;AAI9E,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,IAAI,EAAE,mBAAmB;IACzB,WAAW,EAAE;;;kDAGmC;IAChD,WAAW,EAAE;QACX,IAAI,EAAE,QAAiB;QACvB,UAAU,EAAE;YACV,KAAK,EAAE;gBACL,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,uCAAuC;aACrD;SACF;KACF;IACD,OAAO,EAAE,KAAK,EACZ,KAAyB,EACzB,WAAwB,EACxB,EAAE;QACF,IAAI,CAAC;YACH,MAAM,CAAC,KAAK,CAAC,4BAA4B,EAAE,EAAE,KAAK,EAAE,KAAK,CAAC,KAAK,EAAE,CAAC,CAAC;YAEnE,MAAM,QAAQ,GAAG,MAAM,wBAAwB,CAAC,WAAW,EAAE,EAAE,UAAU,EAAE,KAAK,EAAE,CAAC,CAAC;YAEpF,IAAI,CAAC,QAAQ,CAAC,OAAO,EAAE,CAAC;gBACtB,MAAM,IAAI,KAAK,CAAC,QAAQ,CAAC,KAAK,IAAI,uBAAuB,CAAC,CAAC;YAC7D,CAAC;YAED,IAAI,MAAM,GAAG,CAAC,QAAQ,CAAC,IAAI,IAAI,EAAE,CAA2B,CAAC;YAE7D,8CAA8C;YAC9C,IAAI,KAAK,CAAC,KAAK,EAAE,CAAC;gBAChB,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAC3B,CAAC,CAAC,UAAU,EAAE,WAAW,EAAE,CAAC,QAAQ,CAAC,KAAK,CAAC,KAAM,CAAC,WAAW,EAAE,CAAC,CACjE,CAAC;YACJ,CAAC;YAED,OAAO;gBACL,OAAO,EAAE,IAAI;gBACb,MAAM,EAAE,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;oBACzB,IAAI,EAAE,CAAC,CAAC,IAAI;oBACZ,IAAI,EAAE,CAAC,CAAC,IAAI;oBACZ,KAAK,EAAE,CAAC,CAAC,KAAK;oBACd,UAAU,EAAE,CAAC,CAAC,UAAU;oBACxB,OAAO,EAAE,CAAC,CAAC,OAAO;iBACnB,CAAC,CAAC;gBACH,KAAK,EAAE,MAAM,CAAC,MAAM;aACrB,CAAC;QACJ,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,MAAM,CAAC,KAAK,CAAC,yBAAyB,EAAE,EAAE,KAAK,EAAE,KAAK,CAAC,KAAK,EAAE,EAAE,KAAc,CAAC,CAAC;YAChF,OAAO;gBACL,OAAO,EAAE,KAAK;gBACd,KAAK,EAAG,KAAe,CAAC,OAAO;gBAC/B,MAAM,EAAE,EAAE;aACX,CAAC;QACJ,CAAC;IACH,CAAC;CACF,CAAC"}
|
|
@@ -9,15 +9,19 @@ export declare const zudelloUpdateField: {
|
|
|
9
9
|
type: string;
|
|
10
10
|
description: string;
|
|
11
11
|
};
|
|
12
|
+
path: {
|
|
13
|
+
type: string;
|
|
14
|
+
description: string;
|
|
15
|
+
};
|
|
12
16
|
label: {
|
|
13
17
|
type: string;
|
|
14
18
|
description: string;
|
|
15
19
|
};
|
|
16
|
-
|
|
20
|
+
model_name: {
|
|
17
21
|
type: string;
|
|
18
22
|
description: string;
|
|
19
23
|
};
|
|
20
|
-
|
|
24
|
+
context: {
|
|
21
25
|
type: string;
|
|
22
26
|
description: string;
|
|
23
27
|
};
|
|
@@ -26,12 +30,13 @@ export declare const zudelloUpdateField: {
|
|
|
26
30
|
};
|
|
27
31
|
execute: (input: {
|
|
28
32
|
uuid: string;
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
33
|
+
path: string;
|
|
34
|
+
label: string;
|
|
35
|
+
model_name: string;
|
|
36
|
+
context?: Record<string, string[]>;
|
|
32
37
|
}, authContext: AuthContext) => Promise<{
|
|
33
38
|
success: boolean;
|
|
34
|
-
field: import("../../../services/zudello/admin.js").
|
|
39
|
+
field: import("../../../services/zudello/admin.js").ZudelloFieldSettings | undefined;
|
|
35
40
|
message: string;
|
|
36
41
|
error?: undefined;
|
|
37
42
|
} | {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"update-field.d.ts","sourceRoot":"","sources":["../../../../src/tools/admin/fields/update-field.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAE5D,eAAO,MAAM,kBAAkB
|
|
1
|
+
{"version":3,"file":"update-field.d.ts","sourceRoot":"","sources":["../../../../src/tools/admin/fields/update-field.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAE5D,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAiCpB;QACL,IAAI,EAAE,MAAM,CAAC;QACb,IAAI,EAAE,MAAM,CAAC;QACb,KAAK,EAAE,MAAM,CAAC;QACd,UAAU,EAAE,MAAM,CAAC;QACnB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;KACpC,eACY,WAAW;;;;;;;;;;;CAiC3B,CAAC"}
|