gdharness 0.13.26 → 0.13.28

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
@@ -7626,7 +7626,14 @@ function staleAnalysisNote(contradicted, dependsOn) {
7626
7626
  const types = new Set(contradicted.map((one) => one.type));
7627
7627
  const declaring = [...new Set(contradicted.map((one) => one.declaredIn))].sort();
7628
7628
  const lever = dependsOn.length === 0 ? ", and the named types depend on no other global class, so that lever is not available here. " + "That is the common case rather than the awkward one: an edit near a type that depends on " + "something refreshes it before the fault is noticed, which is why a type with no " + "dependencies is where this turns up" : `, so changing ${[...dependsOn].sort().join(", ")} and rescanning is worth a try`;
7629
- return `The editor is reporting against an older copy of ${types.size === 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. Run editor_rescan first: " + "it costs about half a second, it cleared this in one of five attempts in the project that " + "reported it, and it cleared both reproductions measured in a second project, the scan itself " + "returning in 243ms and 275ms. " + "The fault behind it is that a script the editor has loaded keeps the copy it built, and nothing " + `rebuilds that copy when the file changes; ${declaring.length === 1 ? `editor_rescan with reloadScript set to ${declaring[0]} recompiles that copy` : `reloadScript takes one script, so a call each for ${declaring.join(" and ")} recompiles those copies`} from the file into the same ` + "object and answers with the members it has afterwards under reloadedMethods. Read that and the " + "next diagnostics as two readings rather than one: a built copy has been seen stale here while " + "the diagnostics on it read clean, so the reload is worth doing and is not known to be what " + "clears these. The other lever measured is that a held type is refreshed when something it " + `depends on changes rather than when it changes itself${lever}. editor_launch restart has always ` + "worked and costs a window. project_import refresh_classes does not, and answers added: [] while " + "this is happening.";
7629
+ return `The editor is reporting against an older copy of ${types.size === 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. Run editor_rescan first: " + "it costs about half a second, it cleared this in one of five attempts in the project that " + "reported it, and it cleared both reproductions measured in a second project, the scan itself " + "returning in 243ms and 275ms. " + "The fault behind it is that a script the editor has loaded keeps the copy it built, and nothing " + `rebuilds that copy when the file changes; ${declaring.length === 1 ? `editor_rescan with reloadScript set to ${declaring[0]} recompiles that copy` : `reloadScript takes one script, so a call each for ${declaring.join(" and ")} recompiles those copies`} from the file into the same ` + "object and answers with the members it has afterwards under reloadedMethods. Read that and the " + "next diagnostics as two readings, because they are of two things: measured in one window on " + "one editor, the analyser resolved a call to a newly added method while the built copy of that " + "same script did not have it. So the reload is worth doing and is not what clears these; the " + "scan is. The other lever measured is that a held type is refreshed when something it " + `depends on changes rather than when it changes itself${lever}. editor_launch restart has always ` + "worked and costs a window. project_import refresh_classes does not, and answers added: [] while " + "this is happening.";
7630
+ }
7631
+ function uncachedClassNote(types) {
7632
+ if (types.length === 0) {
7633
+ return "";
7634
+ }
7635
+ const one = types.length === 1;
7636
+ return `${types.join(", ")} ${one ? "is declared" : "are declared"} in this project and missing from ` + `.godot/global_script_class_cache.cfg, so a game launched now would not resolve ${one ? "it" : "them"} ` + "either. Try editor_rescan first: it asks the editor already running and starts nothing, and it " + "cleared this in 314ms in a second project with a 31-worker fan-out still importing. It is not " + "always enough, because a file another engine has already imported reads as settled and the " + "walk does not look inside it. project_import refresh_classes rewrites the cache from the " + "declarations on disk and does reach that case, at the cost of a short headless engine, which " + "is worth knowing when something else is already running against this project.";
7630
7637
  }
7631
7638
  function cacheWrittenAt(projectPath) {
7632
7639
  const cache = join6(projectPath, ".godot", "global_script_class_cache.cfg");
@@ -15401,9 +15408,9 @@ var init_tool_definitions = __esm(() => {
15401
15408
  button: { type: "number", description: "Mouse: 1 left, 2 right, 3 middle. Joypad: the button index." },
15402
15409
  axis: { type: "number", description: "Joypad axes: the axis index." },
15403
15410
  axisValue: { type: "number", description: "Joypad axes: -1 or 1." },
15404
- ctrl: { type: "boolean" },
15405
- alt: { type: "boolean" },
15406
- shift: { type: "boolean" }
15411
+ ctrl: { type: "boolean", description: "Keys: bind it with Ctrl held." },
15412
+ alt: { type: "boolean", description: "Keys: bind it with Alt held." },
15413
+ shift: { type: "boolean", description: "Keys: bind it with Shift held." }
15407
15414
  },
15408
15415
  required: ["type"],
15409
15416
  additionalProperties: false
@@ -15441,6 +15448,7 @@ var init_tool_definitions = __esm(() => {
15441
15448
  };
15442
15449
  COLOUR = {
15443
15450
  type: "object",
15451
+ description: "set_theme_color: r, g and b from 0 to 1, with a optional and opaque by default.",
15444
15452
  properties: { r: { type: "number" }, g: { type: "number" }, b: { type: "number" }, a: { type: "number" } },
15445
15453
  required: ["r", "g", "b"],
15446
15454
  additionalProperties: false
@@ -15712,9 +15720,9 @@ var init_tool_definitions = __esm(() => {
15712
15720
  projectPath: PROJECT_PATH,
15713
15721
  scenePath: SCENE_PATH,
15714
15722
  sourceNodePath: { type: "string", description: "The node that emits." },
15715
- signalName: { type: "string" },
15723
+ signalName: { type: "string", description: 'The signal it emits, such as "pressed".' },
15716
15724
  targetNodePath: { type: "string", description: "The node whose method is called." },
15717
- methodName: { type: "string" },
15725
+ methodName: { type: "string", description: "The method on that node, called when it emits." },
15718
15726
  flags: { type: "number", description: "connect: Object.ConnectFlags, such as 1 for deferred." },
15719
15727
  nodePath: { type: "string", description: "list: only connections involving this node." }
15720
15728
  },
@@ -15738,7 +15746,10 @@ var init_tool_definitions = __esm(() => {
15738
15746
  projectPath: PROJECT_PATH,
15739
15747
  scenePath: SCENE_PATH,
15740
15748
  playerNodePath: { type: "string", description: "The AnimationPlayer node." },
15741
- animationName: { type: "string" },
15749
+ animationName: {
15750
+ type: "string",
15751
+ description: "The animation in the player. add_state: the one that state plays."
15752
+ },
15742
15753
  length: { type: "number", description: "create: seconds. Default 1." },
15743
15754
  loopMode: {
15744
15755
  type: "string",
@@ -15748,13 +15759,13 @@ var init_tool_definitions = __esm(() => {
15748
15759
  step: { type: "number", description: "create: keyframe snap in seconds. Default 0.1." },
15749
15760
  track: ANIMATION_TRACK,
15750
15761
  animTreePath: { type: "string", description: "The AnimationTree node." },
15751
- stateName: { type: "string" },
15762
+ stateName: { type: "string", description: "add_state: the state to add." },
15752
15763
  stateMachinePath: {
15753
15764
  type: "string",
15754
15765
  description: "add_state: a nested state machine. Default the root."
15755
15766
  },
15756
- fromState: { type: "string" },
15757
- toState: { type: "string" },
15767
+ fromState: { type: "string", description: "connect_states: the state the transition leaves." },
15768
+ toState: { type: "string", description: "connect_states: the state it arrives at." },
15758
15769
  transitionType: {
15759
15770
  type: "string",
15760
15771
  enum: ["immediate", "sync", "at_end"],
@@ -16205,9 +16216,9 @@ var init_tool_definitions = __esm(() => {
16205
16216
  ops: ["choose"],
16206
16217
  description: "choose: the item to take, by where it is in the list, when text will not do."
16207
16218
  },
16208
- shift: { type: "boolean", ops: ["key"] },
16209
- ctrl: { type: "boolean", ops: ["key"] },
16210
- alt: { type: "boolean", ops: ["key"] },
16219
+ shift: { type: "boolean", ops: ["key"], description: "key: hold Shift with it. Default false." },
16220
+ ctrl: { type: "boolean", ops: ["key"], description: "key: hold Ctrl with it. Default false." },
16221
+ alt: { type: "boolean", ops: ["key"], description: "key: hold Alt with it. Default false." },
16211
16222
  x: {
16212
16223
  type: "number",
16213
16224
  ops: ["mouse_click", "mouse_motion"],
@@ -38153,7 +38164,7 @@ class GodotServer {
38153
38164
  }
38154
38165
  const uncached = unloaded.filter((type) => !type.inTheClassCache);
38155
38166
  if (uncached.length > 0) {
38156
- notes.push(`${uncached.map((type) => type.type).join(", ")} ${uncached.length === 1 ? "is declared" : "are declared"} in this project and missing from .godot/global_script_class_cache.cfg, so a game launched now would not resolve ${uncached.length === 1 ? "it" : "them"} either. project_import refresh_classes rewrites the cache from the declarations on disk.`);
38167
+ notes.push(uncachedClassNote(uncached.map((type) => type.type)));
38157
38168
  }
38158
38169
  const stale = unloaded.filter((type) => type.inTheClassCache);
38159
38170
  if (stale.length > 0) {
@@ -40686,8 +40697,8 @@ function renderToolsMarkdown() {
40686
40697
  lines.push("Arguments:", "");
40687
40698
  for (const [name, schema] of parameters) {
40688
40699
  const type = namedType(schema["type"]);
40689
- const note = typeof schema["description"] === "string" ? ` ${schema["description"]}` : "";
40690
- lines.push(`- \`${name}\` (${type}):${note}`);
40700
+ const note = typeof schema["description"] === "string" ? `: ${schema["description"]}` : "";
40701
+ lines.push(`- \`${name}\` (${type})${note}`);
40691
40702
  }
40692
40703
  lines.push("");
40693
40704
  }
package/build/index.js CHANGED
@@ -24886,7 +24886,14 @@ function staleAnalysisNote(contradicted, dependsOn) {
24886
24886
  const types = new Set(contradicted.map((one) => one.type));
24887
24887
  const declaring = [...new Set(contradicted.map((one) => one.declaredIn))].sort();
24888
24888
  const lever = dependsOn.length === 0 ? ", and the named types depend on no other global class, so that lever is not available here. " + "That is the common case rather than the awkward one: an edit near a type that depends on " + "something refreshes it before the fault is noticed, which is why a type with no " + "dependencies is where this turns up" : `, so changing ${[...dependsOn].sort().join(", ")} and rescanning is worth a try`;
24889
- return `The editor is reporting against an older copy of ${types.size === 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. Run editor_rescan first: " + "it costs about half a second, it cleared this in one of five attempts in the project that " + "reported it, and it cleared both reproductions measured in a second project, the scan itself " + "returning in 243ms and 275ms. " + "The fault behind it is that a script the editor has loaded keeps the copy it built, and nothing " + `rebuilds that copy when the file changes; ${declaring.length === 1 ? `editor_rescan with reloadScript set to ${declaring[0]} recompiles that copy` : `reloadScript takes one script, so a call each for ${declaring.join(" and ")} recompiles those copies`} from the file into the same ` + "object and answers with the members it has afterwards under reloadedMethods. Read that and the " + "next diagnostics as two readings rather than one: a built copy has been seen stale here while " + "the diagnostics on it read clean, so the reload is worth doing and is not known to be what " + "clears these. The other lever measured is that a held type is refreshed when something it " + `depends on changes rather than when it changes itself${lever}. editor_launch restart has always ` + "worked and costs a window. project_import refresh_classes does not, and answers added: [] while " + "this is happening.";
24889
+ return `The editor is reporting against an older copy of ${types.size === 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. Run editor_rescan first: " + "it costs about half a second, it cleared this in one of five attempts in the project that " + "reported it, and it cleared both reproductions measured in a second project, the scan itself " + "returning in 243ms and 275ms. " + "The fault behind it is that a script the editor has loaded keeps the copy it built, and nothing " + `rebuilds that copy when the file changes; ${declaring.length === 1 ? `editor_rescan with reloadScript set to ${declaring[0]} recompiles that copy` : `reloadScript takes one script, so a call each for ${declaring.join(" and ")} recompiles those copies`} from the file into the same ` + "object and answers with the members it has afterwards under reloadedMethods. Read that and the " + "next diagnostics as two readings, because they are of two things: measured in one window on " + "one editor, the analyser resolved a call to a newly added method while the built copy of that " + "same script did not have it. So the reload is worth doing and is not what clears these; the " + "scan is. The other lever measured is that a held type is refreshed when something it " + `depends on changes rather than when it changes itself${lever}. editor_launch restart has always ` + "worked and costs a window. project_import refresh_classes does not, and answers added: [] while " + "this is happening.";
24890
+ }
24891
+ function uncachedClassNote(types) {
24892
+ if (types.length === 0) {
24893
+ return "";
24894
+ }
24895
+ const one = types.length === 1;
24896
+ return `${types.join(", ")} ${one ? "is declared" : "are declared"} in this project and missing from ` + `.godot/global_script_class_cache.cfg, so a game launched now would not resolve ${one ? "it" : "them"} ` + "either. Try editor_rescan first: it asks the editor already running and starts nothing, and it " + "cleared this in 314ms in a second project with a 31-worker fan-out still importing. It is not " + "always enough, because a file another engine has already imported reads as settled and the " + "walk does not look inside it. project_import refresh_classes rewrites the cache from the " + "declarations on disk and does reach that case, at the cost of a short headless engine, which " + "is worth knowing when something else is already running against this project.";
24890
24897
  }
24891
24898
  function cacheWrittenAt(projectPath) {
24892
24899
  const cache = join3(projectPath, ".godot", "global_script_class_cache.cfg");
@@ -28508,9 +28515,9 @@ var INPUT_EVENTS = {
28508
28515
  button: { type: "number", description: "Mouse: 1 left, 2 right, 3 middle. Joypad: the button index." },
28509
28516
  axis: { type: "number", description: "Joypad axes: the axis index." },
28510
28517
  axisValue: { type: "number", description: "Joypad axes: -1 or 1." },
28511
- ctrl: { type: "boolean" },
28512
- alt: { type: "boolean" },
28513
- shift: { type: "boolean" }
28518
+ ctrl: { type: "boolean", description: "Keys: bind it with Ctrl held." },
28519
+ alt: { type: "boolean", description: "Keys: bind it with Alt held." },
28520
+ shift: { type: "boolean", description: "Keys: bind it with Shift held." }
28514
28521
  },
28515
28522
  required: ["type"],
28516
28523
  additionalProperties: false
@@ -28548,6 +28555,7 @@ var TILEMAP_CELLS = {
28548
28555
  };
28549
28556
  var COLOUR = {
28550
28557
  type: "object",
28558
+ description: "set_theme_color: r, g and b from 0 to 1, with a optional and opaque by default.",
28551
28559
  properties: { r: { type: "number" }, g: { type: "number" }, b: { type: "number" }, a: { type: "number" } },
28552
28560
  required: ["r", "g", "b"],
28553
28561
  additionalProperties: false
@@ -28819,9 +28827,9 @@ var TOOL_SPECS = [
28819
28827
  projectPath: PROJECT_PATH,
28820
28828
  scenePath: SCENE_PATH,
28821
28829
  sourceNodePath: { type: "string", description: "The node that emits." },
28822
- signalName: { type: "string" },
28830
+ signalName: { type: "string", description: 'The signal it emits, such as "pressed".' },
28823
28831
  targetNodePath: { type: "string", description: "The node whose method is called." },
28824
- methodName: { type: "string" },
28832
+ methodName: { type: "string", description: "The method on that node, called when it emits." },
28825
28833
  flags: { type: "number", description: "connect: Object.ConnectFlags, such as 1 for deferred." },
28826
28834
  nodePath: { type: "string", description: "list: only connections involving this node." }
28827
28835
  },
@@ -28845,7 +28853,10 @@ var TOOL_SPECS = [
28845
28853
  projectPath: PROJECT_PATH,
28846
28854
  scenePath: SCENE_PATH,
28847
28855
  playerNodePath: { type: "string", description: "The AnimationPlayer node." },
28848
- animationName: { type: "string" },
28856
+ animationName: {
28857
+ type: "string",
28858
+ description: "The animation in the player. add_state: the one that state plays."
28859
+ },
28849
28860
  length: { type: "number", description: "create: seconds. Default 1." },
28850
28861
  loopMode: {
28851
28862
  type: "string",
@@ -28855,13 +28866,13 @@ var TOOL_SPECS = [
28855
28866
  step: { type: "number", description: "create: keyframe snap in seconds. Default 0.1." },
28856
28867
  track: ANIMATION_TRACK,
28857
28868
  animTreePath: { type: "string", description: "The AnimationTree node." },
28858
- stateName: { type: "string" },
28869
+ stateName: { type: "string", description: "add_state: the state to add." },
28859
28870
  stateMachinePath: {
28860
28871
  type: "string",
28861
28872
  description: "add_state: a nested state machine. Default the root."
28862
28873
  },
28863
- fromState: { type: "string" },
28864
- toState: { type: "string" },
28874
+ fromState: { type: "string", description: "connect_states: the state the transition leaves." },
28875
+ toState: { type: "string", description: "connect_states: the state it arrives at." },
28865
28876
  transitionType: {
28866
28877
  type: "string",
28867
28878
  enum: ["immediate", "sync", "at_end"],
@@ -29312,9 +29323,9 @@ var TOOL_SPECS = [
29312
29323
  ops: ["choose"],
29313
29324
  description: "choose: the item to take, by where it is in the list, when text will not do."
29314
29325
  },
29315
- shift: { type: "boolean", ops: ["key"] },
29316
- ctrl: { type: "boolean", ops: ["key"] },
29317
- alt: { type: "boolean", ops: ["key"] },
29326
+ shift: { type: "boolean", ops: ["key"], description: "key: hold Shift with it. Default false." },
29327
+ ctrl: { type: "boolean", ops: ["key"], description: "key: hold Ctrl with it. Default false." },
29328
+ alt: { type: "boolean", ops: ["key"], description: "key: hold Alt with it. Default false." },
29318
29329
  x: {
29319
29330
  type: "number",
29320
29331
  ops: ["mouse_click", "mouse_motion"],
@@ -30895,7 +30906,7 @@ class GodotServer {
30895
30906
  }
30896
30907
  const uncached = unloaded.filter((type) => !type.inTheClassCache);
30897
30908
  if (uncached.length > 0) {
30898
- notes.push(`${uncached.map((type) => type.type).join(", ")} ${uncached.length === 1 ? "is declared" : "are declared"} in this project and missing from .godot/global_script_class_cache.cfg, so a game launched now would not resolve ${uncached.length === 1 ? "it" : "them"} either. project_import refresh_classes rewrites the cache from the declarations on disk.`);
30909
+ notes.push(uncachedClassNote(uncached.map((type) => type.type)));
30899
30910
  }
30900
30911
  const stale = unloaded.filter((type) => type.inTheClassCache);
30901
30912
  if (stale.length > 0) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gdharness",
3
- "version": "0.13.26",
3
+ "version": "0.13.28",
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",