substrate-ai 0.4.0 → 0.4.1

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.
Files changed (2) hide show
  1. package/dist/cli/index.js +14 -4
  2. package/package.json +1 -1
package/dist/cli/index.js CHANGED
@@ -473,10 +473,20 @@ async function scaffoldClaudeCommands(projectRoot, outputFormat) {
473
473
  } catch (compileErr) {
474
474
  logger$18.warn({ err: compileErr }, "Agent compilation failed; agent commands may be incomplete");
475
475
  }
476
- const { AgentCommandGenerator } = _require(join(installerLibPath, "ide", "shared", "agent-command-generator.js"));
477
- const { WorkflowCommandGenerator } = _require(join(installerLibPath, "ide", "shared", "workflow-command-generator.js"));
478
- const { TaskToolCommandGenerator } = _require(join(installerLibPath, "ide", "shared", "task-tool-command-generator.js"));
479
- const { ManifestGenerator } = _require(join(installerLibPath, "core", "manifest-generator.js"));
476
+ const resolveExport = (mod, name) => {
477
+ if (typeof mod[name] === "function") return mod[name];
478
+ const def = mod.default;
479
+ if (def && typeof def[name] === "function") return def[name];
480
+ throw new Error(`${name} is not a constructor`);
481
+ };
482
+ const agentMod = _require(join(installerLibPath, "ide", "shared", "agent-command-generator.js"));
483
+ const AgentCommandGenerator = resolveExport(agentMod, "AgentCommandGenerator");
484
+ const workflowMod = _require(join(installerLibPath, "ide", "shared", "workflow-command-generator.js"));
485
+ const WorkflowCommandGenerator = resolveExport(workflowMod, "WorkflowCommandGenerator");
486
+ const taskToolMod = _require(join(installerLibPath, "ide", "shared", "task-tool-command-generator.js"));
487
+ const TaskToolCommandGenerator = resolveExport(taskToolMod, "TaskToolCommandGenerator");
488
+ const manifestMod = _require(join(installerLibPath, "core", "manifest-generator.js"));
489
+ const ManifestGenerator = resolveExport(manifestMod, "ManifestGenerator");
480
490
  const nonCoreModules = scanBmadModules(bmadDir);
481
491
  const allModules = ["core", ...nonCoreModules];
482
492
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "substrate-ai",
3
- "version": "0.4.0",
3
+ "version": "0.4.1",
4
4
  "description": "Substrate — multi-agent orchestration daemon for AI coding agents",
5
5
  "type": "module",
6
6
  "license": "MIT",