@mmerterden/multi-agent-pipeline 24.3.1 → 24.4.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.
@@ -92,8 +92,15 @@ export function locate(target) {
92
92
  } catch {
93
93
  return null;
94
94
  }
95
+ // Two seconds, because this runs inside a tool call and a hook that makes the
96
+ // user wait is worse than a hook that says nothing. The bound is a product
97
+ // decision, so it is not a number a test should depend on: a busy machine
98
+ // pushes a plain `rev-parse` past it, the lookup returns nothing, and the
99
+ // context silently shrinks. MULTI_AGENT_FILE_CONTEXT_GIT_MS lets a test ask
100
+ // for a bound it can meet; nothing else sets it.
101
+ const budget = Number(process.env.MULTI_AGENT_FILE_CONTEXT_GIT_MS) || 2000;
95
102
  const git = (args) =>
96
- spawnSync("git", ["-C", dir, ...args], { encoding: "utf8", timeout: 2000 }).stdout?.trim();
103
+ spawnSync("git", ["-C", dir, ...args], { encoding: "utf8", timeout: budget }).stdout?.trim();
97
104
  const top = git(["rev-parse", "--show-toplevel"]);
98
105
  if (!top) return null;
99
106
  const common = git(["rev-parse", "--path-format=absolute", "--git-common-dir"]) || "";
@@ -868,6 +868,19 @@ export function toolkitDoc() {
868
868
  return JSON.stringify({ toolkitVersion: v }, null, 2) + "\n";
869
869
  }
870
870
 
871
+ // What draws the floor. floor-model.js carries the numbers and the rules every
872
+ // renderer shares, so it comes first and the renderers read it as top-level
873
+ // names.
874
+ export const RENDER_MODULES = [
875
+ "floor-model.js",
876
+ "portraits.js",
877
+ "world.js",
878
+ "gl.js",
879
+ "models.js",
880
+ "city.js",
881
+ "world3d.js",
882
+ ];
883
+
871
884
  // The panel around the floor, one file per concern, concatenated in this order
872
885
  // into the same scope as world.js. Order matters only for top-level code that
873
886
  // runs at load: a module may call a function declared in a later one, but a
@@ -1028,7 +1041,7 @@ export function build() {
1028
1041
  `const EMPLOYEES = ${JSON.stringify(staff.people)};`,
1029
1042
  `const COMMAND_ROUTES = ${JSON.stringify(JSON.parse(read("command-routes.json")))};`,
1030
1043
  'const spriteUrl = (name) => "/office/assets/" + name + ".png";',
1031
- read("world.js").trim(),
1044
+ ...RENDER_MODULES.map((f) => read(f).replace(LINT_DIRECTIVES, "").trim()),
1032
1045
  appSource(),
1033
1046
  "})();",
1034
1047
  ].join("\n");