dlw-machine-setup 0.5.12 → 0.5.13

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/bin/installer.js +43 -12
  2. package/package.json +1 -1
package/bin/installer.js CHANGED
@@ -3786,7 +3786,7 @@ var fetch_factory_default = defineStep({
3786
3786
  label: "Installing Factory framework",
3787
3787
  when: (ctx) => ctx.config.installFactory && !!ctx.factoryRepo,
3788
3788
  execute: async (ctx) => {
3789
- const result = await fetchFactory(ctx.token, ctx.factoryRepo, ctx.config.projectPath);
3789
+ const result = await fetchFactory(ctx.token, ctx.factoryRepo, ctx.config.projectPath, ctx.config.agent);
3790
3790
  ctx.installed.factoryInstalled = result.success;
3791
3791
  if (!result.success) {
3792
3792
  return { status: "failed", detail: result.failureReason };
@@ -3794,7 +3794,38 @@ var fetch_factory_default = defineStep({
3794
3794
  return { status: "success", message: result.filesInstalled.join(", ") };
3795
3795
  }
3796
3796
  });
3797
- async function fetchFactory(token, repo, targetDir) {
3797
+ function getAgentPaths(agent, targetDir) {
3798
+ const claudeDir = (0, import_path3.join)(targetDir, ".claude");
3799
+ const githubDir = (0, import_path3.join)(targetDir, ".github");
3800
+ switch (agent) {
3801
+ case "github-copilot":
3802
+ return {
3803
+ agentsDir: (0, import_path3.join)(githubDir, "agents"),
3804
+ hooksDir: (0, import_path3.join)(claudeDir, "hooks"),
3805
+ // Copilot reads .claude/hooks/ natively
3806
+ skillsDir: (0, import_path3.join)(githubDir, "prompts"),
3807
+ // Copilot uses .github/prompts/ for slash commands
3808
+ settingsDir: claudeDir,
3809
+ // Copilot reads .claude/settings.json natively
3810
+ agentsLabel: ".github/agents/",
3811
+ hooksLabel: ".claude/hooks/",
3812
+ skillsLabel: ".github/prompts/",
3813
+ settingsLabel: ".claude/settings.json"
3814
+ };
3815
+ default:
3816
+ return {
3817
+ agentsDir: (0, import_path3.join)(claudeDir, "agents"),
3818
+ hooksDir: (0, import_path3.join)(claudeDir, "hooks"),
3819
+ skillsDir: (0, import_path3.join)(claudeDir, "skills"),
3820
+ settingsDir: claudeDir,
3821
+ agentsLabel: ".claude/agents/",
3822
+ hooksLabel: ".claude/hooks/",
3823
+ skillsLabel: ".claude/skills/",
3824
+ settingsLabel: ".claude/settings.json"
3825
+ };
3826
+ }
3827
+ }
3828
+ async function fetchFactory(token, repo, targetDir, agent) {
3798
3829
  const result = { success: false, filesInstalled: [] };
3799
3830
  const tarCheck = (0, import_child_process2.spawnSync)("tar", ["--version"], { stdio: "ignore" });
3800
3831
  if (tarCheck.status !== 0) {
@@ -3863,22 +3894,22 @@ async function fetchFactory(token, repo, targetDir) {
3863
3894
  return result;
3864
3895
  }
3865
3896
  const extractedPath = (0, import_path3.join)(tempDir, extractedFolder);
3866
- const claudeDir = (0, import_path3.join)(targetDir, ".claude");
3897
+ const paths = getAgentPaths(agent, targetDir);
3867
3898
  const factoryDir = (0, import_path3.join)(targetDir, "factory");
3868
3899
  const agentsSrc = (0, import_path3.join)(extractedPath, "agents");
3869
3900
  if ((0, import_fs3.existsSync)(agentsSrc)) {
3870
- copyDirectory2(agentsSrc, (0, import_path3.join)(claudeDir, "agents"));
3871
- result.filesInstalled.push(".claude/agents/");
3901
+ copyDirectory2(agentsSrc, paths.agentsDir);
3902
+ result.filesInstalled.push(paths.agentsLabel);
3872
3903
  }
3873
3904
  const hooksSrc = (0, import_path3.join)(extractedPath, "hooks");
3874
3905
  if ((0, import_fs3.existsSync)(hooksSrc)) {
3875
- copyDirectory2(hooksSrc, (0, import_path3.join)(claudeDir, "hooks"));
3876
- result.filesInstalled.push(".claude/hooks/");
3906
+ copyDirectory2(hooksSrc, paths.hooksDir);
3907
+ result.filesInstalled.push(paths.hooksLabel);
3877
3908
  }
3878
3909
  const skillsSrc = (0, import_path3.join)(extractedPath, "skills");
3879
3910
  if ((0, import_fs3.existsSync)(skillsSrc)) {
3880
- copyDirectory2(skillsSrc, (0, import_path3.join)(claudeDir, "skills"));
3881
- result.filesInstalled.push(".claude/skills/");
3911
+ copyDirectory2(skillsSrc, paths.skillsDir);
3912
+ result.filesInstalled.push(paths.skillsLabel);
3882
3913
  }
3883
3914
  const workflowSrc = (0, import_path3.join)(extractedPath, "workflow");
3884
3915
  if ((0, import_fs3.existsSync)(workflowSrc)) {
@@ -3903,8 +3934,8 @@ async function fetchFactory(token, repo, targetDir) {
3903
3934
  result.filesInstalled.push(`factory/${entry.name}`);
3904
3935
  }
3905
3936
  }
3906
- configureSettings(claudeDir);
3907
- result.filesInstalled.push(".claude/settings.json");
3937
+ configureSettings(paths.settingsDir);
3938
+ result.filesInstalled.push(paths.settingsLabel);
3908
3939
  result.success = true;
3909
3940
  } catch (error) {
3910
3941
  result.failureReason = error instanceof Error ? error.message : String(error);
@@ -4375,7 +4406,7 @@ var update_gitignore_default = defineStep({
4375
4406
  var import_fs7 = require("fs");
4376
4407
  var import_path7 = require("path");
4377
4408
  var import_os2 = require("os");
4378
- var INSTALLER_VERSION = "0.5.12";
4409
+ var INSTALLER_VERSION = "0.5.13";
4379
4410
  var write_state_default = defineStep({
4380
4411
  name: "write-state",
4381
4412
  label: "Saving installation state",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dlw-machine-setup",
3
- "version": "0.5.12",
3
+ "version": "0.5.13",
4
4
  "description": "One-shot installer for The Machine toolchain",
5
5
  "bin": {
6
6
  "dlw-machine-setup": "bin/installer.js"