@bgx4k3p/huly-mcp-server 2.1.1 → 2.2.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bgx4k3p/huly-mcp-server",
3
- "version": "2.1.1",
3
+ "version": "2.2.0",
4
4
  "description": "MCP server for Huly issue tracking with stdio and Streamable HTTP transports",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -40,7 +40,8 @@
40
40
  "test:rest": "HULY_TRANSPORT=rest node --test test/integration.test.mjs",
41
41
  "lint": "eslint src/ scripts/",
42
42
  "postinstall": "node scripts/patch-sdk.mjs",
43
- "pack": "node scripts/pack.mjs"
43
+ "pack": "node scripts/pack.mjs",
44
+ "version:sync": "node -e \"const{readFileSync:r,writeFileSync:w}=require('fs');const v=r('VERSION','utf-8').trim();const f='package.json';const j=JSON.parse(r(f,'utf-8'));j.version=v;w(f,JSON.stringify(j,null,2)+'\\n');console.log('Synced version '+v+' to package.json')\""
44
45
  },
45
46
  "dependencies": {
46
47
  "@hcengineering/api-client": "^0.7.3",
package/src/client.mjs CHANGED
@@ -751,7 +751,11 @@ export class HulyClient {
751
751
  if (projectType?.tasks?.length) {
752
752
  const taskTypes = await client.findAll(task.class.TaskType, {});
753
753
  const scoped = taskTypes.filter(tt => projectType.tasks.includes(tt._id));
754
- if (scoped.length) return scoped[0]._id;
754
+ if (scoped.length) {
755
+ // Prefer the type named "Task" (the common default), not the first in list (often Epic)
756
+ const taskType = scoped.find(tt => nameMatch(tt.name || tt._id.split(':').pop(), 'Task'));
757
+ return (taskType || scoped[0])._id;
758
+ }
755
759
  }
756
760
 
757
761
  throw new Error(
package/src/dispatch.mjs CHANGED
@@ -121,7 +121,7 @@ export const workspaceTools = {
121
121
  // Relations
122
122
  add_relation: (a, c) => c.addRelation(a.issueId, a.relatedToIssueId),
123
123
  add_blocked_by: (a, c) => c.addBlockedBy(a.issueId, a.blockedByIssueId),
124
- set_parent: (a, c) => c.setParent(a.issueId, a.parentIssueId),
124
+ set_parent: (a, c) => c.setParent(a.issueId, a.parentId),
125
125
 
126
126
  // Task types & statuses
127
127
  list_task_types: (a, c) => c.listTaskTypes(a.project, { cursor: a.cursor, limit: a.limit }),
package/src/mcpShared.mjs CHANGED
@@ -482,12 +482,12 @@ function getToolDefinitions() {
482
482
  {
483
483
  name: 'create_component',
484
484
  description: 'Create a new component in a project.',
485
- inputSchema: { type: 'object', properties: { project: { type: 'string', description: 'Project identifier' }, name: { type: 'string', description: 'Component name' }, description: { type: 'string', description: 'Component description' }, ...workspaceProp }, required: ['project', 'name'] }
485
+ inputSchema: { type: 'object', properties: { project: { type: 'string', description: 'Project identifier' }, name: { type: 'string', description: 'Component name' }, description: { type: 'string', description: 'Component description' }, lead: { type: 'string', description: 'Lead member name' }, ...workspaceProp }, required: ['project', 'name'] }
486
486
  },
487
487
  {
488
488
  name: 'update_component',
489
- description: 'Update a component\'s name or description.',
490
- inputSchema: { type: 'object', properties: { project: { type: 'string', description: 'Project identifier' }, name: { type: 'string', description: 'Current component name' }, newName: { type: 'string', description: 'New component name' }, description: { type: 'string', description: 'New description' }, ...workspaceProp }, required: ['project', 'name'] }
489
+ description: 'Update a component\'s name, description, or lead.',
490
+ inputSchema: { type: 'object', properties: { project: { type: 'string', description: 'Project identifier' }, name: { type: 'string', description: 'Current component name' }, newName: { type: 'string', description: 'New component name' }, description: { type: 'string', description: 'New description' }, lead: { type: 'string', description: 'Lead member name (empty string to clear)' }, ...workspaceProp }, required: ['project', 'name'] }
491
491
  },
492
492
  {
493
493
  name: 'delete_component',