gdharness 1.3.44 → 1.3.46

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.
@@ -62,7 +62,7 @@ static func under(prefix: String, values: GdhSerialisation) -> Dictionary:
62
62
  var value: Variant = ProjectSettings.get_setting(name)
63
63
  var described: Dictionary = {
64
64
  "setting": name,
65
- "type": type_string(kind),
65
+ "type": type_named(kind, value),
66
66
  "value": values.serialize_value(value),
67
67
  }
68
68
  # As a single get says it, so a family read can be told apart into what the project sets and
@@ -81,6 +81,47 @@ static func under(prefix: String, values: GdhSerialisation) -> Dictionary:
81
81
  return { "prefix": prefix, "count": found.size(), "settings": found }
82
82
 
83
83
 
84
+ ## The type [param kind] names, with what [param value] holds when it is a typed array or
85
+ ## dictionary, as project.godot writes it: a `Dictionary[String, bool]` was answered as Dictionary,
86
+ ## which hides what its keys and values must be.
87
+ static func type_named(kind: int, value: Variant) -> String:
88
+ if kind == TYPE_ARRAY and value is Array:
89
+ var list: Array = value
90
+ if list.is_typed():
91
+ var element: String = _held(
92
+ list.get_typed_builtin(), list.get_typed_class_name(), list.get_typed_script()
93
+ )
94
+ return "Array[%s]" % element
95
+ elif kind == TYPE_DICTIONARY and value is Dictionary:
96
+ var table: Dictionary = value
97
+ if table.is_typed():
98
+ var key: String = _held(
99
+ table.get_typed_key_builtin(),
100
+ table.get_typed_key_class_name(),
101
+ table.get_typed_key_script()
102
+ )
103
+ var held: String = _held(
104
+ table.get_typed_value_builtin(),
105
+ table.get_typed_value_class_name(),
106
+ table.get_typed_value_script()
107
+ )
108
+ return "Dictionary[%s, %s]" % [key, held]
109
+ return type_string(kind)
110
+
111
+
112
+ ## One side of a typed collection: a built-in type, a class, or a script by its class_name.
113
+ static func _held(builtin: int, named: StringName, script: Variant) -> String:
114
+ if builtin == TYPE_NIL:
115
+ return "Variant"
116
+ if builtin != TYPE_OBJECT:
117
+ return type_string(builtin)
118
+ if script is Script:
119
+ var declared: Script = script
120
+ if not declared.get_global_name().is_empty():
121
+ return declared.get_global_name()
122
+ return str(named)
123
+
124
+
84
125
  ## The setting [param setting_path] overrides for builds with one feature, as
85
126
  ## `application/run/max_fps.mobile` does `application/run/max_fps`, or "" for a plain setting.
86
127
  static func override_base(setting_path: String) -> String:
package/build/keeper.js CHANGED
@@ -8895,6 +8895,7 @@ function frameEndLine() {
8895
8895
  return frameEnd;
8896
8896
  }
8897
8897
  var READ_MS = 5000;
8898
+ var EVALUATE_MS = 60000;
8898
8899
  var REPLIES = new Set([
8899
8900
  "debug_enter",
8900
8901
  "debug_exit",
@@ -9478,10 +9479,10 @@ class GameDebugger {
9478
9479
  }
9479
9480
  this.forget("evaluation_return");
9480
9481
  this.send("evaluate", [expression, frame], held.thread);
9481
- const answered = await this.next(GameDebugger.named("evaluation_return"), READ_MS);
9482
+ const answered = await this.next(GameDebugger.named("evaluation_return"), EVALUATE_MS);
9482
9483
  if (answered === null || !("data" in answered)) {
9483
9484
  return {
9484
- refused: `The game worked out nothing for ${expression} within ${READ_MS / 1000}s. Ask again.`
9485
+ refused: `The game worked out nothing for ${expression} within ${EVALUATE_MS / 1000}s. The first expression a game evaluates loads the script of every global class in the project first, static initialisers included, so one of those may still be running. Ask again.`
9485
9486
  };
9486
9487
  }
9487
9488
  const [, , type, value, hint] = answered.data;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gdharness",
3
- "version": "1.3.44",
3
+ "version": "1.3.46",
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",