gdharness 0.13.4 → 0.13.5
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
|
@@ -15817,7 +15817,7 @@ var init_tool_definitions = __esm(() => {
|
|
|
15817
15817
|
},
|
|
15818
15818
|
{
|
|
15819
15819
|
name: "editor_rescan",
|
|
15820
|
-
description: "Makes the running editor scan the project filesystem, so files written outside it are picked up. The scan is a change-detecting walk rather than an unconditional reparse, so a file another engine has already imported reads as settled and the walk does not look inside it: its class_name then stays out of the list the editor resolves against, however many times you scan. Any class in that state is named under unseenByEditor, which is what no check on disk can see, since the declaration and the cache are both correct there and only the editor disagrees. The cure
|
|
15820
|
+
description: "Makes the running editor scan the project filesystem, so files written outside it are picked up. The scan is a change-detecting walk rather than an unconditional reparse, so a file another engine has already imported reads as settled and the walk does not look inside it: its class_name then stays out of the list the editor resolves against, however many times you scan. Any class in that state is named under unseenByEditor, which is what no check on disk can see, since the declaration and the cache are both correct there and only the editor disagrees. The cure measured downstream is a change to the declaring script, saved, and then a rescan: the change on its own left every affected file reporting the same errors, and the rescan after it cleared them. Whether a rescan alone would have done it there is not known, because the rescans in that report may have answered before the scan ran, which is the timing this tool no longer has. editor_launch restart also does it, and project_import refresh_classes does not: it rewrites the cache and does not touch what the editor is holding. A scan writes .godot/global_script_class_cache.cfg from the list the editor is holding, so a class the editor cannot resolve can go out of that file with it, which one project saw and two could not reproduce; where it happens the answer names what the file lost under cacheLost, before a fresh engine, a CI run or a clone inherits it. Needs the editor connected.",
|
|
15821
15821
|
parameters: {
|
|
15822
15822
|
projectPath: PROJECT_PATH,
|
|
15823
15823
|
timeoutMs: { type: "number", description: "How long to wait for the scan. Default 30000." }
|
|
@@ -685,7 +685,21 @@ func set_property(params: Dictionary) -> Dictionary:
|
|
|
685
685
|
if not _can_read(holder, named):
|
|
686
686
|
return {"type": "error", "message": _nothing_there(holder, named, str(reached["called"]))}
|
|
687
687
|
var old_value: Variant = _read(holder, named)
|
|
688
|
-
|
|
688
|
+
# The same rule the call path holds: a value that cannot become what the property holds is
|
|
689
|
+
# refused rather than written. Writing it means the engine picks something, and what it picks
|
|
690
|
+
# for a word where a number goes is zero, which the answer then reports as the new value.
|
|
691
|
+
var wanted: int = typeof(old_value)
|
|
692
|
+
var given: Variant = _values.fitted(value, wanted)
|
|
693
|
+
if not Values.acceptable(given, wanted):
|
|
694
|
+
return {
|
|
695
|
+
"type": "error",
|
|
696
|
+
"message":
|
|
697
|
+
(
|
|
698
|
+
"%s.%s holds %s and the value given is %s, which cannot become one."
|
|
699
|
+
% [reached["called"], named, type_string(wanted), type_string(typeof(given))]
|
|
700
|
+
)
|
|
701
|
+
}
|
|
702
|
+
_write(holder, named, given)
|
|
689
703
|
|
|
690
704
|
return {
|
|
691
705
|
"type": "property_set",
|
|
@@ -158,7 +158,13 @@ func fitted(value: Variant, type: int) -> Variant:
|
|
|
158
158
|
if rebuilt is String and type != TYPE_STRING:
|
|
159
159
|
var text: String = rebuilt
|
|
160
160
|
var parsed: Variant = JSON.parse_string(text)
|
|
161
|
-
|
|
162
|
-
|
|
161
|
+
# A string that does not read as the type wanted is handed back as the string it is, so
|
|
162
|
+
# whoever asked can refuse it. type_convert answers 0 for "not an index" and true for any
|
|
163
|
+
# text at all, and a caller who sent a word got back a number they never sent: get_child
|
|
164
|
+
# answered about child 0 with no refusal and no note, which is a halt traded for a plausible
|
|
165
|
+
# wrong answer, and the wrong answer is the worse of the two.
|
|
166
|
+
if typeof(parsed) == TYPE_NIL or typeof(parsed) == TYPE_STRING:
|
|
167
|
+
return rebuilt
|
|
168
|
+
rebuilt = parsed
|
|
163
169
|
|
|
164
170
|
return type_convert(rebuilt, type)
|
package/build/index.js
CHANGED
|
@@ -28831,7 +28831,7 @@ var TOOL_SPECS = [
|
|
|
28831
28831
|
},
|
|
28832
28832
|
{
|
|
28833
28833
|
name: "editor_rescan",
|
|
28834
|
-
description: "Makes the running editor scan the project filesystem, so files written outside it are picked up. The scan is a change-detecting walk rather than an unconditional reparse, so a file another engine has already imported reads as settled and the walk does not look inside it: its class_name then stays out of the list the editor resolves against, however many times you scan. Any class in that state is named under unseenByEditor, which is what no check on disk can see, since the declaration and the cache are both correct there and only the editor disagrees. The cure
|
|
28834
|
+
description: "Makes the running editor scan the project filesystem, so files written outside it are picked up. The scan is a change-detecting walk rather than an unconditional reparse, so a file another engine has already imported reads as settled and the walk does not look inside it: its class_name then stays out of the list the editor resolves against, however many times you scan. Any class in that state is named under unseenByEditor, which is what no check on disk can see, since the declaration and the cache are both correct there and only the editor disagrees. The cure measured downstream is a change to the declaring script, saved, and then a rescan: the change on its own left every affected file reporting the same errors, and the rescan after it cleared them. Whether a rescan alone would have done it there is not known, because the rescans in that report may have answered before the scan ran, which is the timing this tool no longer has. editor_launch restart also does it, and project_import refresh_classes does not: it rewrites the cache and does not touch what the editor is holding. A scan writes .godot/global_script_class_cache.cfg from the list the editor is holding, so a class the editor cannot resolve can go out of that file with it, which one project saw and two could not reproduce; where it happens the answer names what the file lost under cacheLost, before a fresh engine, a CI run or a clone inherits it. Needs the editor connected.",
|
|
28835
28835
|
parameters: {
|
|
28836
28836
|
projectPath: PROJECT_PATH,
|
|
28837
28837
|
timeoutMs: { type: "number", description: "How long to wait for the scan. Default 30000." }
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gdharness",
|
|
3
|
-
"version": "0.13.
|
|
3
|
+
"version": "0.13.5",
|
|
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",
|