gdharness 0.12.11 → 0.12.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.
package/build/cli.js CHANGED
@@ -7583,6 +7583,8 @@ async function runOperation2(engine, operation, params, projectPath) {
7583
7583
  writeFileSync4(paramsFile, JSON.stringify(snakeCased2(params)), "utf8");
7584
7584
  const args = [
7585
7585
  "--headless",
7586
+ "--log-file",
7587
+ join7(paramsDir, "engine.log"),
7586
7588
  "--path",
7587
7589
  projectPath,
7588
7590
  "--script",
@@ -36236,7 +36238,12 @@ function windowsImage(pid) {
36236
36238
  }
36237
36239
  }
36238
36240
  function stillTheRecordedRun(record) {
36239
- const running = runningAs(record.pid);
36241
+ return judgeRun(record, runningAs(record.pid), "confirmed");
36242
+ }
36243
+ function couldStillBeTheRecordedRun(record) {
36244
+ return judgeRun(record, runningAs(record.pid), "possible");
36245
+ }
36246
+ function judgeRun(record, running, needed) {
36240
36247
  if (running === null) {
36241
36248
  return false;
36242
36249
  }
@@ -36246,9 +36253,12 @@ function stillTheRecordedRun(record) {
36246
36253
  if (wanted !== null && !said.includes(wanted)) {
36247
36254
  return false;
36248
36255
  }
36249
- if (running.kind === "image" || record.projectPath === "") {
36256
+ if (record.projectPath === "") {
36250
36257
  return wanted !== null;
36251
36258
  }
36259
+ if (running.kind === "image") {
36260
+ return needed === "possible" && wanted !== null;
36261
+ }
36252
36262
  const project = process.platform === "win32" ? record.projectPath.toLowerCase() : record.projectPath;
36253
36263
  return said.includes(project);
36254
36264
  }
@@ -36322,6 +36332,7 @@ var init_setup = __esm(() => {
36322
36332
 
36323
36333
  // src/server.ts
36324
36334
  import { execFile as execFile5, spawn } from "node:child_process";
36335
+ import { randomUUID as randomUUID2 } from "node:crypto";
36325
36336
  import {
36326
36337
  closeSync,
36327
36338
  existsSync as existsSync13,
@@ -37396,7 +37407,8 @@ class GodotServer {
37396
37407
  if (!classes.ok) {
37397
37408
  return this.answer(classes);
37398
37409
  }
37399
- const reports = "res://.godot/gdharness-reports";
37410
+ const ours = `gdharness-reports/${randomUUID2()}`;
37411
+ const reports = `res://.godot/${ours}`;
37400
37412
  const ignored = readStringArray(args, "ignore") ?? [];
37401
37413
  const asked = readString(contained.value, "path") ?? "res://test";
37402
37414
  const cmdArgs = [
@@ -37433,7 +37445,7 @@ class GodotServer {
37433
37445
  resolve(false);
37434
37446
  });
37435
37447
  });
37436
- const reportsDir = join16(project.value.path, ".godot", "gdharness-reports");
37448
+ const reportsDir = join16(project.value.path, ".godot", ...ours.split("/"));
37437
37449
  let report = null;
37438
37450
  let reportProblem = null;
37439
37451
  try {
@@ -38084,7 +38096,7 @@ class GodotServer {
38084
38096
  brokeOn: null
38085
38097
  };
38086
38098
  this.drainTranscript(adopted);
38087
- if (!alive(record.pid) || !stillTheRecordedRun(record)) {
38099
+ if (!alive(record.pid) || !couldStillBeTheRecordedRun(record)) {
38088
38100
  adopted.log.finish();
38089
38101
  adopted.exitCode = null;
38090
38102
  adopted.endedUnwatched = true;
@@ -39419,6 +39431,8 @@ async function runOperation(engine, operation, params, projectPath) {
39419
39431
  writeFileSync2(paramsFile, JSON.stringify(snakeCased(params)), "utf8");
39420
39432
  const args = [
39421
39433
  "--headless",
39434
+ "--log-file",
39435
+ join4(paramsDir, "engine.log"),
39422
39436
  "--path",
39423
39437
  projectPath,
39424
39438
  "--script",
@@ -39899,9 +39913,12 @@ breakpoint on the line you want instead.
39899
39913
  \`scene_signal\` and \`resource_edit\` change it through the editor, so the files keep their
39900
39914
  formatting. \`script_diagnostics\` and \`script_info\` come from the editor's own language server.
39901
39915
 
39902
- \`project_info\`, \`project_dependencies\`, \`project_import\`, \`project_test\` and
39916
+ \`project_info\`, \`project_dependencies\`, \`project_settings\`, \`project_import\`,
39917
+ \`project_export\`, \`project_test\`, \`script_edit\`, \`script_info structure\` and
39903
39918
  \`editor_classes\` need nothing open: they run a short headless engine and are gone before the
39904
- answer is printed.
39919
+ answer is printed. \`project_settings get\` is on that list too, reading as it does like a look at
39920
+ a config file: it starts an engine so that a setting nobody wrote down still answers with the
39921
+ default the engine registers for it.
39905
39922
 
39906
39923
  Editing a file while a game is running does not change the running game. \`auto_reload\` is an
39907
39924
  editor plugin and reloads into the editor's own process; the game is a separate process holding
package/build/index.js CHANGED
@@ -10132,6 +10132,7 @@ function defectReport(where, error, godotVersion) {
10132
10132
 
10133
10133
  // src/server.ts
10134
10134
  import { execFile as execFile3, spawn } from "node:child_process";
10135
+ import { randomUUID as randomUUID2 } from "node:crypto";
10135
10136
  import {
10136
10137
  closeSync,
10137
10138
  existsSync as existsSync8,
@@ -26299,6 +26300,8 @@ async function runOperation(engine, operation, params, projectPath) {
26299
26300
  writeFileSync3(paramsFile, JSON.stringify(snakeCased(params)), "utf8");
26300
26301
  const args = [
26301
26302
  "--headless",
26303
+ "--log-file",
26304
+ join5(paramsDir, "engine.log"),
26302
26305
  "--path",
26303
26306
  projectPath,
26304
26307
  "--script",
@@ -27916,7 +27919,12 @@ function windowsImage(pid) {
27916
27919
  }
27917
27920
  }
27918
27921
  function stillTheRecordedRun(record) {
27919
- const running = runningAs(record.pid);
27922
+ return judgeRun(record, runningAs(record.pid), "confirmed");
27923
+ }
27924
+ function couldStillBeTheRecordedRun(record) {
27925
+ return judgeRun(record, runningAs(record.pid), "possible");
27926
+ }
27927
+ function judgeRun(record, running, needed) {
27920
27928
  if (running === null) {
27921
27929
  return false;
27922
27930
  }
@@ -27926,9 +27934,12 @@ function stillTheRecordedRun(record) {
27926
27934
  if (wanted !== null && !said.includes(wanted)) {
27927
27935
  return false;
27928
27936
  }
27929
- if (running.kind === "image" || record.projectPath === "") {
27937
+ if (record.projectPath === "") {
27930
27938
  return wanted !== null;
27931
27939
  }
27940
+ if (running.kind === "image") {
27941
+ return needed === "possible" && wanted !== null;
27942
+ }
27932
27943
  const project = process.platform === "win32" ? record.projectPath.toLowerCase() : record.projectPath;
27933
27944
  return said.includes(project);
27934
27945
  }
@@ -30178,7 +30189,8 @@ class GodotServer {
30178
30189
  if (!classes.ok) {
30179
30190
  return this.answer(classes);
30180
30191
  }
30181
- const reports = "res://.godot/gdharness-reports";
30192
+ const ours = `gdharness-reports/${randomUUID2()}`;
30193
+ const reports = `res://.godot/${ours}`;
30182
30194
  const ignored = readStringArray(args, "ignore") ?? [];
30183
30195
  const asked = readString(contained.value, "path") ?? "res://test";
30184
30196
  const cmdArgs = [
@@ -30215,7 +30227,7 @@ class GodotServer {
30215
30227
  resolve(false);
30216
30228
  });
30217
30229
  });
30218
- const reportsDir = join10(project.value.path, ".godot", "gdharness-reports");
30230
+ const reportsDir = join10(project.value.path, ".godot", ...ours.split("/"));
30219
30231
  let report = null;
30220
30232
  let reportProblem = null;
30221
30233
  try {
@@ -30866,7 +30878,7 @@ class GodotServer {
30866
30878
  brokeOn: null
30867
30879
  };
30868
30880
  this.drainTranscript(adopted);
30869
- if (!alive(record.pid) || !stillTheRecordedRun(record)) {
30881
+ if (!alive(record.pid) || !couldStillBeTheRecordedRun(record)) {
30870
30882
  adopted.log.finish();
30871
30883
  adopted.exitCode = null;
30872
30884
  adopted.endedUnwatched = true;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gdharness",
3
- "version": "0.12.11",
3
+ "version": "0.12.13",
4
4
  "mcpName": "io.github.Aureliolo/gdharness",
5
5
  "description": "A harness for driving a Godot 4 project from an agent: editor addons, a runtime bridge into the running game, an MCP server in front of them, and a CLI that installs and diagnoses the Godot side.",
6
6
  "type": "module",