dlw-machine-setup 0.9.8 → 0.11.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.
Files changed (2) hide show
  1. package/bin/installer.js +32 -7
  2. package/package.json +1 -1
package/bin/installer.js CHANGED
@@ -4292,6 +4292,10 @@ var claudeCodeProfile = {
4292
4292
  // Claude exposes a top-level `statusLine` setting in settings.json.
4293
4293
  // Bundles gate statusline-related ops with `when: 'statusline-supported'`.
4294
4294
  statusLineSupported: true,
4295
+ // Claude Code is the only runtime with agent teams. Bundles gate
4296
+ // team-only ops with `when: 'agent-teams-opted-in'`, which also requires
4297
+ // the user's install-time opt-in (ctx.optIns.agentTeams).
4298
+ agentTeamsSupported: true,
4295
4299
  handlers: {
4296
4300
  agent: {
4297
4301
  supported: true,
@@ -4474,6 +4478,7 @@ function runBundleV2(manifest, ctx) {
4474
4478
  for (const op of manifest.ops ?? []) {
4475
4479
  if (op.when === "hooks-supported" && !profile.handlers.hook.supported) continue;
4476
4480
  if (op.when === "statusline-supported" && !profile.statusLineSupported) continue;
4481
+ if (op.when === "agent-teams-opted-in" && !(profile.agentTeamsSupported && ctx.optIns?.agentTeams)) continue;
4477
4482
  const substituted = substituteHookDir(op, profile);
4478
4483
  if (substituted.op === "merge-json") {
4479
4484
  const existing = mergePatches.get(substituted.file);
@@ -4732,7 +4737,7 @@ var fetch_factory_default = defineStep({
4732
4737
  label: "Installing Factory framework",
4733
4738
  when: (ctx) => ctx.config.installFactory && !!ctx.factoryRepo,
4734
4739
  execute: async (ctx) => {
4735
- const result = await fetchFactory(ctx.token, ctx.factoryRepo, ctx.config.projectPath, ctx.config.agent);
4740
+ const result = await fetchFactory(ctx.token, ctx.factoryRepo, ctx.config.projectPath, ctx.config.agent, ctx.config.agentTeams);
4736
4741
  ctx.installed.factoryInstalled = result.success;
4737
4742
  if (result.instructionsSnippet) {
4738
4743
  ctx.installed.factoryInstructionsSnippet = result.instructionsSnippet;
@@ -4790,7 +4795,7 @@ var fetch_factory_default = defineStep({
4790
4795
  }
4791
4796
  }
4792
4797
  });
4793
- async function fetchFactory(token, repo, targetDir, agent) {
4798
+ async function fetchFactory(token, repo, targetDir, agent, agentTeams) {
4794
4799
  const result = {
4795
4800
  success: false,
4796
4801
  filesInstalled: [],
@@ -4825,7 +4830,7 @@ async function fetchFactory(token, repo, targetDir, agent) {
4825
4830
  result.failureReason = "Factory archive has no install.json \u2014 upgrade Factory or downgrade installer";
4826
4831
  return result;
4827
4832
  }
4828
- await installViaBundle(manifestPath, extractedPath, targetDir, agent, result);
4833
+ await installViaBundle(manifestPath, extractedPath, targetDir, agent, agentTeams, result);
4829
4834
  result.success = true;
4830
4835
  } catch (error) {
4831
4836
  result.failureReason = error instanceof Error ? error.message : String(error);
@@ -4834,7 +4839,7 @@ async function fetchFactory(token, repo, targetDir, agent) {
4834
4839
  }
4835
4840
  return result;
4836
4841
  }
4837
- async function installViaBundle(manifestPath, extractedPath, targetDir, agent, result) {
4842
+ async function installViaBundle(manifestPath, extractedPath, targetDir, agent, agentTeams, result) {
4838
4843
  let manifest;
4839
4844
  try {
4840
4845
  manifest = JSON.parse((0, import_fs9.readFileSync)(manifestPath, "utf-8"));
@@ -4847,8 +4852,10 @@ async function installViaBundle(manifestPath, extractedPath, targetDir, agent, r
4847
4852
  projectPath: targetDir,
4848
4853
  agent,
4849
4854
  instructionsFile: target.instructions,
4850
- skipInstructions: true
4855
+ skipInstructions: true,
4851
4856
  // write-instructions.ts commits the snippet for correct ordering
4857
+ optIns: { agentTeams }
4858
+ // gates the experimental agent-teams env-var op
4852
4859
  });
4853
4860
  result.instructionsSnippet = runResult.instructionsSnippet;
4854
4861
  result.filesInstalled = runResult.filesTouched;
@@ -5788,7 +5795,8 @@ async function uninstall() {
5788
5795
  mcpConfig: {},
5789
5796
  releaseVersion: "",
5790
5797
  installFactory: false,
5791
- installAbapHooks: false
5798
+ installAbapHooks: false,
5799
+ agentTeams: false
5792
5800
  },
5793
5801
  token: "",
5794
5802
  repo: "",
@@ -5996,6 +6004,19 @@ async function collectInputs(options, releaseVersion, factoryAvailable = false,
5996
6004
  choices: options.agents,
5997
6005
  loop: false
5998
6006
  });
6007
+ let agentTeams = false;
6008
+ if (factoryAvailable && agent === "claude-code") {
6009
+ const brainstormer = await esm_default6({
6010
+ message: "Brainstorming mode:",
6011
+ default: "solo",
6012
+ choices: [
6013
+ { name: "Default \u2014 solo facilitator (works everywhere, normal cost)", value: "solo" },
6014
+ { name: "Experimental \u2014 agent-team brainstormer (Claude Code only, higher token use)", value: "team" }
6015
+ ],
6016
+ loop: false
6017
+ });
6018
+ agentTeams = brainstormer === "team";
6019
+ }
5999
6020
  const mcpConfig = buildMCPConfiguration(selectedTechnologies, options.baseMcpServers, options.mcpServers);
6000
6021
  let azureDevOpsOrg = "";
6001
6022
  if (mcpConfig["azure-devops"]) {
@@ -6050,7 +6071,8 @@ async function collectInputs(options, releaseVersion, factoryAvailable = false,
6050
6071
  mcpConfig,
6051
6072
  releaseVersion,
6052
6073
  installFactory: factoryAvailable,
6053
- installAbapHooks
6074
+ installAbapHooks,
6075
+ agentTeams
6054
6076
  };
6055
6077
  }
6056
6078
  async function previewAndConfirm(config, options) {
@@ -6078,6 +6100,9 @@ async function previewAndConfirm(config, options) {
6078
6100
  console.log(` Tool ${agentDisplay}`);
6079
6101
  console.log(` Factory ${config.installFactory ? "yes" : "no"}`);
6080
6102
  console.log(` ABAP hooks ${config.installAbapHooks ? "yes" : "no"}`);
6103
+ if (config.installFactory && config.agent === "claude-code") {
6104
+ console.log(` Brainstormer ${config.agentTeams ? "experimental (agent teams)" : "default (solo)"}`);
6105
+ }
6081
6106
  console.log(` Directory ${config.projectPath}`);
6082
6107
  console.log("");
6083
6108
  console.log(` ${dim2("File actions:")}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dlw-machine-setup",
3
- "version": "0.9.8",
3
+ "version": "0.11.0",
4
4
  "description": "One-shot installer for The Machine toolchain",
5
5
  "bin": {
6
6
  "dlw-machine-setup": "bin/installer.js"