mdan-method 2.7.2 → 2.7.4
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
|
@@ -161,6 +161,7 @@ class ManifestGenerator {
|
|
|
161
161
|
} else if (
|
|
162
162
|
entry.name === 'workflow.yaml' ||
|
|
163
163
|
entry.name === 'workflow.md' ||
|
|
164
|
+
entry.name === 'wizard.md' ||
|
|
164
165
|
(entry.name.startsWith('workflow-') && entry.name.endsWith('.md'))
|
|
165
166
|
) {
|
|
166
167
|
// Parse workflow file (both YAML and MD formats)
|
|
@@ -119,11 +119,18 @@ async function getAgentsFromDir(dirPath, moduleName, relativePath = '') {
|
|
|
119
119
|
continue;
|
|
120
120
|
}
|
|
121
121
|
|
|
122
|
+
// Extract description from capabilities or title in the compiled agent XML
|
|
123
|
+
const capMatch = content.match(/capabilities="([^"]+)"/);
|
|
124
|
+
const titleMatch = content.match(/title="([^"]+)"/);
|
|
125
|
+
const roleMatch = content.match(/<role>([^<]+)<\/role>/);
|
|
126
|
+
const description = capMatch ? capMatch[1] : (titleMatch ? titleMatch[1] : (roleMatch ? roleMatch[1] : ''));
|
|
127
|
+
|
|
122
128
|
agents.push({
|
|
123
129
|
path: fullPath,
|
|
124
130
|
name: entry.name.replace('.md', ''),
|
|
125
131
|
module: moduleName,
|
|
126
132
|
relativePath: newRelativePath, // Keep the .md extension for the full path
|
|
133
|
+
description: description,
|
|
127
134
|
});
|
|
128
135
|
}
|
|
129
136
|
}
|
|
@@ -125,7 +125,7 @@ class WorkflowCommandGenerator {
|
|
|
125
125
|
*/
|
|
126
126
|
async generateCommandContent(workflow, mdanDir) {
|
|
127
127
|
// Determine template based on workflow file type
|
|
128
|
-
const isMarkdownWorkflow = workflow.path.endsWith('workflow.md');
|
|
128
|
+
const isMarkdownWorkflow = workflow.path.endsWith('workflow.md') || workflow.path.endsWith('wizard.md');
|
|
129
129
|
const templateName = isMarkdownWorkflow ? 'workflow-commander.md' : 'workflow-command-template.md';
|
|
130
130
|
const templatePath = path.join(path.dirname(this.templatePath), templateName);
|
|
131
131
|
|
|
@@ -80,7 +80,10 @@ class ModuleManager {
|
|
|
80
80
|
const sourcePath = path.join(sourceDir, entry.name);
|
|
81
81
|
const targetPath = path.join(targetDir, entry.name);
|
|
82
82
|
|
|
83
|
-
|
|
83
|
+
// Follow symlinks
|
|
84
|
+
const isDir = entry.isDirectory() || (entry.isSymbolicLink() && (await fs.stat(sourcePath)).isDirectory());
|
|
85
|
+
|
|
86
|
+
if (isDir) {
|
|
84
87
|
await this.copyDirectoryWithPlaceholderReplacement(sourcePath, targetPath, overwrite);
|
|
85
88
|
} else {
|
|
86
89
|
await this.copyFileWithPlaceholderReplacement(sourcePath, targetPath, overwrite);
|
|
@@ -1505,7 +1508,10 @@ class ModuleManager {
|
|
|
1505
1508
|
for (const entry of entries) {
|
|
1506
1509
|
const fullPath = path.join(dir, entry.name);
|
|
1507
1510
|
|
|
1508
|
-
if
|
|
1511
|
+
// Follow symlinks: check if entry is a directory or a symlink to a directory
|
|
1512
|
+
const isDir = entry.isDirectory() || (entry.isSymbolicLink() && (await fs.stat(fullPath)).isDirectory());
|
|
1513
|
+
|
|
1514
|
+
if (isDir) {
|
|
1509
1515
|
const subFiles = await this.getFileList(fullPath, baseDir);
|
|
1510
1516
|
files.push(...subFiles);
|
|
1511
1517
|
} else {
|