gdharness 0.13.25 → 0.13.27

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
@@ -7620,9 +7620,13 @@ function contradictedDiagnostics(messages, classes, sourceOf) {
7620
7620
  return found;
7621
7621
  }
7622
7622
  function staleAnalysisNote(contradicted, dependsOn) {
7623
+ if (contradicted.length === 0) {
7624
+ return "";
7625
+ }
7626
+ const types = new Set(contradicted.map((one) => one.type));
7623
7627
  const declaring = [...new Set(contradicted.map((one) => one.declaredIn))].sort();
7624
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`;
7625
- return `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. 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; editor_rescan with reloadScript set to ${declaring.join(", ")} ` + `recompiles ${declaring.length === 1 ? "that copy" : "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 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.";
7626
7630
  }
7627
7631
  function cacheWrittenAt(projectPath) {
7628
7632
  const cache = join6(projectPath, ".godot", "global_script_class_cache.cfg");
@@ -15239,6 +15243,13 @@ function argumentsOf(spec, op) {
15239
15243
  function toolsWithoutProjectPath() {
15240
15244
  return TOOL_SPECS.filter((spec) => !Object.hasOwn(spec.parameters, "projectPath")).map((spec) => spec.name).sort();
15241
15245
  }
15246
+ function projectPathSentence(without = toolsWithoutProjectPath()) {
15247
+ if (without.length === 0) {
15248
+ return "Every call takes `projectPath`";
15249
+ }
15250
+ const named = without.map((name) => `\`${name}\``).join(", ");
15251
+ return `Every call takes \`projectPath\` except ${named}, which ${without.length === 1 ? "takes" : "take"} none`;
15252
+ }
15242
15253
  function toolSpec(name) {
15243
15254
  return SPECS_BY_NAME[name];
15244
15255
  }
@@ -15390,9 +15401,9 @@ var init_tool_definitions = __esm(() => {
15390
15401
  button: { type: "number", description: "Mouse: 1 left, 2 right, 3 middle. Joypad: the button index." },
15391
15402
  axis: { type: "number", description: "Joypad axes: the axis index." },
15392
15403
  axisValue: { type: "number", description: "Joypad axes: -1 or 1." },
15393
- ctrl: { type: "boolean" },
15394
- alt: { type: "boolean" },
15395
- shift: { type: "boolean" }
15404
+ ctrl: { type: "boolean", description: "Keys: bind it with Ctrl held." },
15405
+ alt: { type: "boolean", description: "Keys: bind it with Alt held." },
15406
+ shift: { type: "boolean", description: "Keys: bind it with Shift held." }
15396
15407
  },
15397
15408
  required: ["type"],
15398
15409
  additionalProperties: false
@@ -15430,6 +15441,7 @@ var init_tool_definitions = __esm(() => {
15430
15441
  };
15431
15442
  COLOUR = {
15432
15443
  type: "object",
15444
+ description: "set_theme_color: r, g and b from 0 to 1, with a optional and opaque by default.",
15433
15445
  properties: { r: { type: "number" }, g: { type: "number" }, b: { type: "number" }, a: { type: "number" } },
15434
15446
  required: ["r", "g", "b"],
15435
15447
  additionalProperties: false
@@ -15701,9 +15713,9 @@ var init_tool_definitions = __esm(() => {
15701
15713
  projectPath: PROJECT_PATH,
15702
15714
  scenePath: SCENE_PATH,
15703
15715
  sourceNodePath: { type: "string", description: "The node that emits." },
15704
- signalName: { type: "string" },
15716
+ signalName: { type: "string", description: 'The signal it emits, such as "pressed".' },
15705
15717
  targetNodePath: { type: "string", description: "The node whose method is called." },
15706
- methodName: { type: "string" },
15718
+ methodName: { type: "string", description: "The method on that node, called when it emits." },
15707
15719
  flags: { type: "number", description: "connect: Object.ConnectFlags, such as 1 for deferred." },
15708
15720
  nodePath: { type: "string", description: "list: only connections involving this node." }
15709
15721
  },
@@ -15727,7 +15739,10 @@ var init_tool_definitions = __esm(() => {
15727
15739
  projectPath: PROJECT_PATH,
15728
15740
  scenePath: SCENE_PATH,
15729
15741
  playerNodePath: { type: "string", description: "The AnimationPlayer node." },
15730
- animationName: { type: "string" },
15742
+ animationName: {
15743
+ type: "string",
15744
+ description: "The animation in the player. add_state: the one that state plays."
15745
+ },
15731
15746
  length: { type: "number", description: "create: seconds. Default 1." },
15732
15747
  loopMode: {
15733
15748
  type: "string",
@@ -15737,13 +15752,13 @@ var init_tool_definitions = __esm(() => {
15737
15752
  step: { type: "number", description: "create: keyframe snap in seconds. Default 0.1." },
15738
15753
  track: ANIMATION_TRACK,
15739
15754
  animTreePath: { type: "string", description: "The AnimationTree node." },
15740
- stateName: { type: "string" },
15755
+ stateName: { type: "string", description: "add_state: the state to add." },
15741
15756
  stateMachinePath: {
15742
15757
  type: "string",
15743
15758
  description: "add_state: a nested state machine. Default the root."
15744
15759
  },
15745
- fromState: { type: "string" },
15746
- toState: { type: "string" },
15760
+ fromState: { type: "string", description: "connect_states: the state the transition leaves." },
15761
+ toState: { type: "string", description: "connect_states: the state it arrives at." },
15747
15762
  transitionType: {
15748
15763
  type: "string",
15749
15764
  enum: ["immediate", "sync", "at_end"],
@@ -16194,9 +16209,9 @@ var init_tool_definitions = __esm(() => {
16194
16209
  ops: ["choose"],
16195
16210
  description: "choose: the item to take, by where it is in the list, when text will not do."
16196
16211
  },
16197
- shift: { type: "boolean", ops: ["key"] },
16198
- ctrl: { type: "boolean", ops: ["key"] },
16199
- alt: { type: "boolean", ops: ["key"] },
16212
+ shift: { type: "boolean", ops: ["key"], description: "key: hold Shift with it. Default false." },
16213
+ ctrl: { type: "boolean", ops: ["key"], description: "key: hold Ctrl with it. Default false." },
16214
+ alt: { type: "boolean", ops: ["key"], description: "key: hold Alt with it. Default false." },
16200
16215
  x: {
16201
16216
  type: "number",
16202
16217
  ops: ["mouse_click", "mouse_motion"],
@@ -40647,7 +40662,7 @@ function renderToolsMarkdown() {
40647
40662
  `${TOOL_SPECS.length} tools, named \`domain_verb\`. A tool that does several related things takes an`,
40648
40663
  "`op`. An unknown op or argument is refused with the valid set listed. Generated from the server.",
40649
40664
  "",
40650
- `Every call takes \`projectPath\` except ${toolsWithoutProjectPath().map((name) => `\`${name}\``).join(", ")}, which take none: the \`runtime_*\` and \`debug_*\` ones pick between running games`,
40665
+ `${projectPathSentence()}: the \`runtime_*\` and \`debug_*\` ones pick between running games`,
40651
40666
  "instead, and the others answer about the editor on this server. An argument a tool does not",
40652
40667
  "declare is refused rather than ignored. Answers are read from the engine after the change, not",
40653
40668
  "echoed from the request. Engine stderr comes back under `engine_messages`.",
@@ -40675,8 +40690,8 @@ function renderToolsMarkdown() {
40675
40690
  lines.push("Arguments:", "");
40676
40691
  for (const [name, schema] of parameters) {
40677
40692
  const type = namedType(schema["type"]);
40678
- const note = typeof schema["description"] === "string" ? ` ${schema["description"]}` : "";
40679
- lines.push(`- \`${name}\` (${type}):${note}`);
40693
+ const note = typeof schema["description"] === "string" ? `: ${schema["description"]}` : "";
40694
+ lines.push(`- \`${name}\` (${type})${note}`);
40680
40695
  }
40681
40696
  lines.push("");
40682
40697
  }
@@ -40706,7 +40721,7 @@ that is running, and the project on disk. ${TOOL_SPECS.length} tools, named \`do
40706
40721
 
40707
40722
  ## Start here
40708
40723
 
40709
- - Every call takes \`projectPath\` except ${toolsWithoutProjectPath().map((name) => `\`${name}\``).join(", ")}, which take none. The \`runtime_*\` and \`debug_*\` ones pick between running
40724
+ - ${projectPathSentence()}. The \`runtime_*\` and \`debug_*\` ones pick between running
40710
40725
  games instead; the others answer about the editor this server is connected to. There is no
40711
40726
  ambient project, and an argument a tool does not declare is refused rather than ignored.
40712
40727
  - \`editor_status\` says whether an editor is connected and whether its addon matches the server.
package/build/index.js CHANGED
@@ -24880,9 +24880,13 @@ function contradictedDiagnostics(messages, classes, sourceOf) {
24880
24880
  return found;
24881
24881
  }
24882
24882
  function staleAnalysisNote(contradicted, dependsOn) {
24883
+ if (contradicted.length === 0) {
24884
+ return "";
24885
+ }
24886
+ const types = new Set(contradicted.map((one) => one.type));
24883
24887
  const declaring = [...new Set(contradicted.map((one) => one.declaredIn))].sort();
24884
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`;
24885
- return `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. 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; editor_rescan with reloadScript set to ${declaring.join(", ")} ` + `recompiles ${declaring.length === 1 ? "that copy" : "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 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.";
24886
24890
  }
24887
24891
  function cacheWrittenAt(projectPath) {
24888
24892
  const cache = join3(projectPath, ".godot", "global_script_class_cache.cfg");
@@ -28504,9 +28508,9 @@ var INPUT_EVENTS = {
28504
28508
  button: { type: "number", description: "Mouse: 1 left, 2 right, 3 middle. Joypad: the button index." },
28505
28509
  axis: { type: "number", description: "Joypad axes: the axis index." },
28506
28510
  axisValue: { type: "number", description: "Joypad axes: -1 or 1." },
28507
- ctrl: { type: "boolean" },
28508
- alt: { type: "boolean" },
28509
- shift: { type: "boolean" }
28511
+ ctrl: { type: "boolean", description: "Keys: bind it with Ctrl held." },
28512
+ alt: { type: "boolean", description: "Keys: bind it with Alt held." },
28513
+ shift: { type: "boolean", description: "Keys: bind it with Shift held." }
28510
28514
  },
28511
28515
  required: ["type"],
28512
28516
  additionalProperties: false
@@ -28544,6 +28548,7 @@ var TILEMAP_CELLS = {
28544
28548
  };
28545
28549
  var COLOUR = {
28546
28550
  type: "object",
28551
+ description: "set_theme_color: r, g and b from 0 to 1, with a optional and opaque by default.",
28547
28552
  properties: { r: { type: "number" }, g: { type: "number" }, b: { type: "number" }, a: { type: "number" } },
28548
28553
  required: ["r", "g", "b"],
28549
28554
  additionalProperties: false
@@ -28815,9 +28820,9 @@ var TOOL_SPECS = [
28815
28820
  projectPath: PROJECT_PATH,
28816
28821
  scenePath: SCENE_PATH,
28817
28822
  sourceNodePath: { type: "string", description: "The node that emits." },
28818
- signalName: { type: "string" },
28823
+ signalName: { type: "string", description: 'The signal it emits, such as "pressed".' },
28819
28824
  targetNodePath: { type: "string", description: "The node whose method is called." },
28820
- methodName: { type: "string" },
28825
+ methodName: { type: "string", description: "The method on that node, called when it emits." },
28821
28826
  flags: { type: "number", description: "connect: Object.ConnectFlags, such as 1 for deferred." },
28822
28827
  nodePath: { type: "string", description: "list: only connections involving this node." }
28823
28828
  },
@@ -28841,7 +28846,10 @@ var TOOL_SPECS = [
28841
28846
  projectPath: PROJECT_PATH,
28842
28847
  scenePath: SCENE_PATH,
28843
28848
  playerNodePath: { type: "string", description: "The AnimationPlayer node." },
28844
- animationName: { type: "string" },
28849
+ animationName: {
28850
+ type: "string",
28851
+ description: "The animation in the player. add_state: the one that state plays."
28852
+ },
28845
28853
  length: { type: "number", description: "create: seconds. Default 1." },
28846
28854
  loopMode: {
28847
28855
  type: "string",
@@ -28851,13 +28859,13 @@ var TOOL_SPECS = [
28851
28859
  step: { type: "number", description: "create: keyframe snap in seconds. Default 0.1." },
28852
28860
  track: ANIMATION_TRACK,
28853
28861
  animTreePath: { type: "string", description: "The AnimationTree node." },
28854
- stateName: { type: "string" },
28862
+ stateName: { type: "string", description: "add_state: the state to add." },
28855
28863
  stateMachinePath: {
28856
28864
  type: "string",
28857
28865
  description: "add_state: a nested state machine. Default the root."
28858
28866
  },
28859
- fromState: { type: "string" },
28860
- toState: { type: "string" },
28867
+ fromState: { type: "string", description: "connect_states: the state the transition leaves." },
28868
+ toState: { type: "string", description: "connect_states: the state it arrives at." },
28861
28869
  transitionType: {
28862
28870
  type: "string",
28863
28871
  enum: ["immediate", "sync", "at_end"],
@@ -29308,9 +29316,9 @@ var TOOL_SPECS = [
29308
29316
  ops: ["choose"],
29309
29317
  description: "choose: the item to take, by where it is in the list, when text will not do."
29310
29318
  },
29311
- shift: { type: "boolean", ops: ["key"] },
29312
- ctrl: { type: "boolean", ops: ["key"] },
29313
- alt: { type: "boolean", ops: ["key"] },
29319
+ shift: { type: "boolean", ops: ["key"], description: "key: hold Shift with it. Default false." },
29320
+ ctrl: { type: "boolean", ops: ["key"], description: "key: hold Ctrl with it. Default false." },
29321
+ alt: { type: "boolean", ops: ["key"], description: "key: hold Alt with it. Default false." },
29314
29322
  x: {
29315
29323
  type: "number",
29316
29324
  ops: ["mouse_click", "mouse_motion"],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gdharness",
3
- "version": "0.13.25",
3
+ "version": "0.13.27",
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",