gufi-cli 0.1.33 → 0.1.35
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/dist/mcp.js +9 -5
- package/package.json +1 -1
package/dist/mcp.js
CHANGED
|
@@ -391,9 +391,10 @@ const TOOLS = [
|
|
|
391
391
|
items: {
|
|
392
392
|
type: "object",
|
|
393
393
|
properties: {
|
|
394
|
-
op: { type: "string", description: "Operation:
|
|
394
|
+
op: { type: "string", description: "Operation: add_module, remove_module, add_submodule, remove_submodule, add_entity, update_entity, remove_entity, add_field, update_field, remove_field" },
|
|
395
395
|
entity: { type: "string", description: "Entity reference: id, name, or 'module.entity'" },
|
|
396
|
-
module: { type: "string", description: "Module reference
|
|
396
|
+
module: { type: "string", description: "Module reference or definition { name, label }" },
|
|
397
|
+
submodule: { type: "string", description: "Submodule reference or definition { name, label }" },
|
|
397
398
|
field: { type: "object", description: "Field definition (for add_field)" },
|
|
398
399
|
field_name: { type: "string", description: "Field name (for update_field, remove_field)" },
|
|
399
400
|
changes: { type: "object", description: "Changes to apply (for update_*)" },
|
|
@@ -521,6 +522,7 @@ Example: gufi_view_pull({ view_id: 13 })`,
|
|
|
521
522
|
type: "object",
|
|
522
523
|
properties: {
|
|
523
524
|
view_id: { type: "number", description: "View ID to pull" },
|
|
525
|
+
company_id: { type: "string", description: "Company ID (required for company-specific views)" },
|
|
524
526
|
},
|
|
525
527
|
required: ["view_id"],
|
|
526
528
|
},
|
|
@@ -1093,10 +1095,12 @@ const toolHandlers = {
|
|
|
1093
1095
|
// ─────────────────────────────────────────────────────────────────────────
|
|
1094
1096
|
async gufi_view_pull(params) {
|
|
1095
1097
|
const viewId = params.view_id;
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
+
const companyId = params.company_id;
|
|
1099
|
+
// Get view info for package_id (pass company_id for access check)
|
|
1100
|
+
const viewResponse = await apiRequest(`/api/marketplace/views/${viewId}`, {}, companyId);
|
|
1098
1101
|
const view = viewResponse.data || viewResponse;
|
|
1099
|
-
|
|
1102
|
+
// 💜 Backend returns pk_id, not id
|
|
1103
|
+
if (!view || !view.pk_id) {
|
|
1100
1104
|
return { error: `View ${viewId} not found` };
|
|
1101
1105
|
}
|
|
1102
1106
|
const viewKey = `view_${viewId}`;
|