gdharness 0.13.18 → 0.13.20

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
@@ -7625,6 +7625,10 @@ function staleClassNames(projectPath) {
7625
7625
  const cached = cachedClasses(projectPath);
7626
7626
  return cached === null ? [...declaredClasses(projectPath).keys()] : staleAgainst(cached, projectPath);
7627
7627
  }
7628
+ function heldButGone(projectPath, editorHolds) {
7629
+ const declared = declaredClasses(projectPath);
7630
+ return editorHolds.filter((name) => !declared.has(name)).sort();
7631
+ }
7628
7632
  function unseenByEditor(projectPath, editorHolds) {
7629
7633
  const held = new Set(editorHolds);
7630
7634
  return [...declaredClasses(projectPath)].filter(([name]) => !held.has(name)).map(([className, path]) => ({ className, path }));
@@ -38101,7 +38105,7 @@ class GodotServer {
38101
38105
  const unloaded = messages.some((message) => unknownTypeIn(message) !== null) ? unloadedTypes(messages, declaredClasses(projectPath), cached) : [];
38102
38106
  const notes = [];
38103
38107
  if (contradicted.length > 0) {
38104
- notes.push(`The editor is reporting against an older copy of ${contradicted.length === 1 ? "a type" : "some types"} named under contradictedByTheFile. Each member listed is declared in the file the class cache points at, so those diagnostics are wrong however the code is written. Try editor_rescan first: it costs about half a second and cleared this in one of five measured attempts. If it does not, changing anything the named type itself depends on and rescanning again has cleared it every time that was tried. editor_launch restart is the only remedy that has always worked. project_import refresh_classes does not, and answers added: [] while this is happening.`);
38108
+ notes.push(`The editor is reporting against an older copy of ${contradicted.length === 1 ? "a type" : "some types"} named under contradictedByTheFile. Each member listed is declared in the file the class cache points at, so those diagnostics are wrong however the code is written. Try editor_rescan first: it costs about half a second and cleared this in one of five measured attempts. If it does not, changing anything the named type itself depends on and rescanning again cleared it on the one occasion that has been tried. editor_launch restart is the only remedy that has always worked, and is the one to reach for when the count above is not good enough odds. project_import refresh_classes does not, and answers added: [] while this is happening.`);
38105
38109
  }
38106
38110
  const uncached = unloaded.filter((type) => !type.inTheClassCache);
38107
38111
  if (uncached.length > 0) {
@@ -38986,14 +38990,23 @@ class GodotServer {
38986
38990
  return answered;
38987
38991
  }
38988
38992
  const checked = await this.classesTheEditorCannotSee(args);
38989
- if (checked.unseen.length === 0 && checked.unchecked === undefined) {
38993
+ const stillHeld = checked.stillHeld ?? [];
38994
+ if (checked.unseen.length === 0 && stillHeld.length === 0 && checked.unchecked === undefined) {
38990
38995
  return answered;
38991
38996
  }
38997
+ const notes = [];
38998
+ if (checked.unseen.length > 0) {
38999
+ notes.push("The cache on disk is right now, and the editor holding this project is still not resolving these: rewriting the file does not reach the list it already loaded. editor_rescan does, on its own and with no change to the declaring script; editor_launch restart also does, and costs more.");
39000
+ }
39001
+ if (stillHeld.length > 0) {
39002
+ notes.push(`The editor is still holding ${stillHeld.join(", ")}, which this project no longer declares, and it will write that list back over the cache this call just corrected. The entry returns pointing at a script that is gone, and the next engine to walk get_global_class_list() dies on "File not found". A rescan does not clear this one: it picks up a class that has appeared and does not drop one that has gone. editor_launch restart does.`);
39003
+ }
38992
39004
  return this.jsonTextResponse({
38993
39005
  ...asParams(JSON.parse(first.text)),
38994
39006
  unseenByEditor: checked.unseen.length > 0 ? checked.unseen : undefined,
39007
+ stillHeldByEditor: stillHeld.length > 0 ? stillHeld : undefined,
38995
39008
  classesUnchecked: checked.unchecked,
38996
- note: checked.unseen.length > 0 ? "The cache on disk is right now, and the editor holding this project is still not resolving these: rewriting the file does not reach the list it already loaded. editor_rescan does, on its own and with no change to the declaring script; editor_launch restart also does, and costs more." : undefined
39009
+ note: notes.length > 0 ? notes.join(" ") : undefined
38997
39010
  });
38998
39011
  }
38999
39012
  async classesTheEditorCannotSee(args) {
@@ -39020,7 +39033,8 @@ class GodotServer {
39020
39033
  if (!Array.isArray(held["classes"])) {
39021
39034
  return { unseen: [], unchecked: "the editor answered without a class list in it" };
39022
39035
  }
39023
- return { unseen: unseenByEditor(projectPath, held["classes"].map(String)) };
39036
+ const holds = held["classes"].map(String);
39037
+ return { unseen: unseenByEditor(projectPath, holds), stillHeld: heldButGone(projectPath, holds) };
39024
39038
  }
39025
39039
  async handleViaBridge(toolName, args) {
39026
39040
  if (!this.godotBridge.isConnected()) {
package/build/index.js CHANGED
@@ -24885,6 +24885,10 @@ function staleClassNames(projectPath) {
24885
24885
  const cached = cachedClasses(projectPath);
24886
24886
  return cached === null ? [...declaredClasses(projectPath).keys()] : staleAgainst(cached, projectPath);
24887
24887
  }
24888
+ function heldButGone(projectPath, editorHolds) {
24889
+ const declared = declaredClasses(projectPath);
24890
+ return editorHolds.filter((name) => !declared.has(name)).sort();
24891
+ }
24888
24892
  function unseenByEditor(projectPath, editorHolds) {
24889
24893
  const held = new Set(editorHolds);
24890
24894
  return [...declaredClasses(projectPath)].filter(([name]) => !held.has(name)).map(([className, path]) => ({ className, path }));
@@ -30853,7 +30857,7 @@ class GodotServer {
30853
30857
  const unloaded = messages.some((message) => unknownTypeIn(message) !== null) ? unloadedTypes(messages, declaredClasses(projectPath), cached) : [];
30854
30858
  const notes = [];
30855
30859
  if (contradicted.length > 0) {
30856
- notes.push(`The editor is reporting against an older copy of ${contradicted.length === 1 ? "a type" : "some types"} named under contradictedByTheFile. Each member listed is declared in the file the class cache points at, so those diagnostics are wrong however the code is written. Try editor_rescan first: it costs about half a second and cleared this in one of five measured attempts. If it does not, changing anything the named type itself depends on and rescanning again has cleared it every time that was tried. editor_launch restart is the only remedy that has always worked. project_import refresh_classes does not, and answers added: [] while this is happening.`);
30860
+ notes.push(`The editor is reporting against an older copy of ${contradicted.length === 1 ? "a type" : "some types"} named under contradictedByTheFile. Each member listed is declared in the file the class cache points at, so those diagnostics are wrong however the code is written. Try editor_rescan first: it costs about half a second and cleared this in one of five measured attempts. If it does not, changing anything the named type itself depends on and rescanning again cleared it on the one occasion that has been tried. editor_launch restart is the only remedy that has always worked, and is the one to reach for when the count above is not good enough odds. project_import refresh_classes does not, and answers added: [] while this is happening.`);
30857
30861
  }
30858
30862
  const uncached = unloaded.filter((type) => !type.inTheClassCache);
30859
30863
  if (uncached.length > 0) {
@@ -31738,14 +31742,23 @@ class GodotServer {
31738
31742
  return answered;
31739
31743
  }
31740
31744
  const checked = await this.classesTheEditorCannotSee(args);
31741
- if (checked.unseen.length === 0 && checked.unchecked === undefined) {
31745
+ const stillHeld = checked.stillHeld ?? [];
31746
+ if (checked.unseen.length === 0 && stillHeld.length === 0 && checked.unchecked === undefined) {
31742
31747
  return answered;
31743
31748
  }
31749
+ const notes = [];
31750
+ if (checked.unseen.length > 0) {
31751
+ notes.push("The cache on disk is right now, and the editor holding this project is still not resolving these: rewriting the file does not reach the list it already loaded. editor_rescan does, on its own and with no change to the declaring script; editor_launch restart also does, and costs more.");
31752
+ }
31753
+ if (stillHeld.length > 0) {
31754
+ notes.push(`The editor is still holding ${stillHeld.join(", ")}, which this project no longer declares, and it will write that list back over the cache this call just corrected. The entry returns pointing at a script that is gone, and the next engine to walk get_global_class_list() dies on "File not found". A rescan does not clear this one: it picks up a class that has appeared and does not drop one that has gone. editor_launch restart does.`);
31755
+ }
31744
31756
  return this.jsonTextResponse({
31745
31757
  ...asParams(JSON.parse(first.text)),
31746
31758
  unseenByEditor: checked.unseen.length > 0 ? checked.unseen : undefined,
31759
+ stillHeldByEditor: stillHeld.length > 0 ? stillHeld : undefined,
31747
31760
  classesUnchecked: checked.unchecked,
31748
- note: checked.unseen.length > 0 ? "The cache on disk is right now, and the editor holding this project is still not resolving these: rewriting the file does not reach the list it already loaded. editor_rescan does, on its own and with no change to the declaring script; editor_launch restart also does, and costs more." : undefined
31761
+ note: notes.length > 0 ? notes.join(" ") : undefined
31749
31762
  });
31750
31763
  }
31751
31764
  async classesTheEditorCannotSee(args) {
@@ -31772,7 +31785,8 @@ class GodotServer {
31772
31785
  if (!Array.isArray(held["classes"])) {
31773
31786
  return { unseen: [], unchecked: "the editor answered without a class list in it" };
31774
31787
  }
31775
- return { unseen: unseenByEditor(projectPath, held["classes"].map(String)) };
31788
+ const holds = held["classes"].map(String);
31789
+ return { unseen: unseenByEditor(projectPath, holds), stillHeld: heldButGone(projectPath, holds) };
31776
31790
  }
31777
31791
  async handleViaBridge(toolName, args) {
31778
31792
  if (!this.godotBridge.isConnected()) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gdharness",
3
- "version": "0.13.18",
3
+ "version": "0.13.20",
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",