Compare commits
4 Commits
e5bd51528a
...
5d470b2de3
| Author | SHA1 | Date |
|---|---|---|
|
|
5d470b2de3 | |
|
|
6f99092be1 | |
|
|
12d4e1ff6e | |
|
|
ba00d43216 |
|
|
@ -1,4 +1,4 @@
|
||||||
<task id="_bmad/core/tasks/workflow.xml" name="Execute Workflow" standalone="false">
|
<task id="_bmad/core/tasks/workflow.xml" name="Execute Workflow" standalone="false" internal="true">
|
||||||
<objective>Execute given workflow by loading its configuration, following instructions, and producing output</objective>
|
<objective>Execute given workflow by loading its configuration, following instructions, and producing output</objective>
|
||||||
|
|
||||||
<llm critical="true">
|
<llm critical="true">
|
||||||
|
|
|
||||||
|
|
@ -385,6 +385,11 @@ class ManifestGenerator {
|
||||||
const filePath = path.join(dirPath, file);
|
const filePath = path.join(dirPath, file);
|
||||||
const content = await fs.readFile(filePath, 'utf8');
|
const content = await fs.readFile(filePath, 'utf8');
|
||||||
|
|
||||||
|
// Skip internal/engine files (not user-facing tasks)
|
||||||
|
if (content.includes('internal="true"')) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
let name = file.replace(/\.(xml|md)$/, '');
|
let name = file.replace(/\.(xml|md)$/, '');
|
||||||
let displayName = name;
|
let displayName = name;
|
||||||
let description = '';
|
let description = '';
|
||||||
|
|
@ -474,6 +479,11 @@ class ManifestGenerator {
|
||||||
const filePath = path.join(dirPath, file);
|
const filePath = path.join(dirPath, file);
|
||||||
const content = await fs.readFile(filePath, 'utf8');
|
const content = await fs.readFile(filePath, 'utf8');
|
||||||
|
|
||||||
|
// Skip internal tools (same as tasks)
|
||||||
|
if (content.includes('internal="true"')) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
let name = file.replace(/\.(xml|md)$/, '');
|
let name = file.replace(/\.(xml|md)$/, '');
|
||||||
let displayName = name;
|
let displayName = name;
|
||||||
let description = '';
|
let description = '';
|
||||||
|
|
|
||||||
|
|
@ -446,6 +446,11 @@ class BaseIdeSetup {
|
||||||
try {
|
try {
|
||||||
const content = await fs.readFile(fullPath, 'utf8');
|
const content = await fs.readFile(fullPath, 'utf8');
|
||||||
|
|
||||||
|
// Skip internal/engine files (not user-facing tasks/tools)
|
||||||
|
if (content.includes('internal="true"')) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
// Check for standalone="true" in XML files
|
// Check for standalone="true" in XML files
|
||||||
if (entry.name.endsWith('.xml')) {
|
if (entry.name.endsWith('.xml')) {
|
||||||
// Look for standalone="true" in the opening tag (task or tool)
|
// Look for standalone="true" in the opening tag (task or tool)
|
||||||
|
|
|
||||||
|
|
@ -66,6 +66,13 @@ class ConfigDrivenIdeSetup extends BaseIdeSetup {
|
||||||
*/
|
*/
|
||||||
async installToTarget(projectDir, bmadDir, config, options) {
|
async installToTarget(projectDir, bmadDir, config, options) {
|
||||||
const { target_dir, template_type, artifact_types } = config;
|
const { target_dir, template_type, artifact_types } = config;
|
||||||
|
|
||||||
|
// Skip targets with explicitly empty artifact_types array
|
||||||
|
// This prevents creating empty directories when no artifacts will be written
|
||||||
|
if (Array.isArray(artifact_types) && artifact_types.length === 0) {
|
||||||
|
return { success: true, results: { agents: 0, workflows: 0, tasks: 0, tools: 0 } };
|
||||||
|
}
|
||||||
|
|
||||||
const targetPath = path.join(projectDir, target_dir);
|
const targetPath = path.join(projectDir, target_dir);
|
||||||
await this.ensureDir(targetPath);
|
await this.ensureDir(targetPath);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -94,9 +94,6 @@ platforms:
|
||||||
- target_dir: .github/agents
|
- target_dir: .github/agents
|
||||||
template_type: copilot_agents
|
template_type: copilot_agents
|
||||||
artifact_types: [agents]
|
artifact_types: [agents]
|
||||||
- target_dir: .vscode
|
|
||||||
template_type: vscode_settings
|
|
||||||
artifact_types: []
|
|
||||||
|
|
||||||
iflow:
|
iflow:
|
||||||
name: "iFlow"
|
name: "iFlow"
|
||||||
|
|
|
||||||
|
|
@ -141,13 +141,24 @@ async function getTasksFromDir(dirPath, moduleName) {
|
||||||
const files = await fs.readdir(dirPath);
|
const files = await fs.readdir(dirPath);
|
||||||
|
|
||||||
for (const file of files) {
|
for (const file of files) {
|
||||||
if (!file.endsWith('.md')) {
|
// Include both .md and .xml task files
|
||||||
|
if (!file.endsWith('.md') && !file.endsWith('.xml')) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const filePath = path.join(dirPath, file);
|
||||||
|
const content = await fs.readFile(filePath, 'utf8');
|
||||||
|
|
||||||
|
// Skip internal/engine files (not user-facing tasks)
|
||||||
|
if (content.includes('internal="true"')) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Remove extension to get task name
|
||||||
|
const ext = file.endsWith('.xml') ? '.xml' : '.md';
|
||||||
tasks.push({
|
tasks.push({
|
||||||
path: path.join(dirPath, file),
|
path: filePath,
|
||||||
name: file.replace('.md', ''),
|
name: file.replace(ext, ''),
|
||||||
module: moduleName,
|
module: moduleName,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -164,7 +164,9 @@ class TaskToolCommandGenerator {
|
||||||
// Extract relative path from absolute paths (Windows or Unix)
|
// Extract relative path from absolute paths (Windows or Unix)
|
||||||
// Look for _bmad/ or bmad/ in the path and extract everything after it
|
// Look for _bmad/ or bmad/ in the path and extract everything after it
|
||||||
// Match patterns like: /_bmad/core/tasks/... or /bmad/core/tasks/...
|
// Match patterns like: /_bmad/core/tasks/... or /bmad/core/tasks/...
|
||||||
const bmadMatch = itemPath.match(/\/_bmad\/(.+)$/) || itemPath.match(/\/bmad\/(.+)$/);
|
// Use [/\\] to handle both Unix forward slashes and Windows backslashes,
|
||||||
|
// and also paths without a leading separator (e.g., C:/_bmad/...)
|
||||||
|
const bmadMatch = itemPath.match(/[/\\]_bmad[/\\](.+)$/) || itemPath.match(/[/\\]bmad[/\\](.+)$/);
|
||||||
if (bmadMatch) {
|
if (bmadMatch) {
|
||||||
// Found /_bmad/ or /bmad/ - use relative path after it
|
// Found /_bmad/ or /bmad/ - use relative path after it
|
||||||
itemPath = `{project-root}/${this.bmadFolderName}/${bmadMatch[1]}`;
|
itemPath = `{project-root}/${this.bmadFolderName}/${bmadMatch[1]}`;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue