gdharness 0.13.23 → 0.13.24
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 +12 -7
- package/build/index.js +2 -2
- package/package.json +1 -1
package/build/cli.js
CHANGED
|
@@ -15231,6 +15231,9 @@ function opTakes(spec, op, name) {
|
|
|
15231
15231
|
function argumentsOf(spec, op) {
|
|
15232
15232
|
return Object.keys(spec.parameters).filter((name) => opTakes(spec, op, name));
|
|
15233
15233
|
}
|
|
15234
|
+
function toolsWithoutProjectPath() {
|
|
15235
|
+
return TOOL_SPECS.filter((spec) => !Object.hasOwn(spec.parameters, "projectPath")).map((spec) => spec.name).sort();
|
|
15236
|
+
}
|
|
15234
15237
|
function toolSpec(name) {
|
|
15235
15238
|
return SPECS_BY_NAME[name];
|
|
15236
15239
|
}
|
|
@@ -15961,7 +15964,7 @@ var init_tool_definitions = __esm(() => {
|
|
|
15961
15964
|
},
|
|
15962
15965
|
{
|
|
15963
15966
|
name: "editor_rescan",
|
|
15964
|
-
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
|
|
15967
|
+
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 is this call on its own, with no change to the declaring script: measured against a real editor on three platforms, with idle waits of the same length ruled out so the scan is credited rather than the time it takes, and reproduced in a second project against its own reproduction in 203ms. editor_launch restart also does it and costs a window, 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 goes out of that file with it. That is not a reason to refuse the scan, because on a class the editor has merely not walked yet the scan is the cure; what the answer does instead is name the loss under cacheLost and rebuild the cache from the files, naming what came back under cacheRestored, so no fresh engine, CI run or clone inherits the short file. An editor that lost classes is still holding the short list, so the note says to restart it before scanning again. Needs the editor connected.",
|
|
15965
15968
|
parameters: {
|
|
15966
15969
|
projectPath: PROJECT_PATH,
|
|
15967
15970
|
timeoutMs: { type: "number", description: "How long to wait for the scan. Default 30000." },
|
|
@@ -39020,7 +39023,7 @@ class GodotServer {
|
|
|
39020
39023
|
cacheLost: lost.length > 0 ? lost : undefined,
|
|
39021
39024
|
cacheRestored: restored.length > 0 ? restored : undefined,
|
|
39022
39025
|
classesUnchecked: checked.unchecked,
|
|
39023
|
-
note: busy ? "The editor was still scanning or importing when the wait ran out, so new files may not be visible yet." : stillGone.length > 0 ? "The scan wrote the class cache from the list this editor is holding, that list is shorter than the file was, and rebuilding the cache from the files did not bring these back. Every engine that reads the cache next, including a test run, will report them as unknown identifiers. Restart the editor with editor_launch restart before scanning again." : lost.length > 0 ? "The scan wrote the class cache from the list this editor is holding, which is shorter than the file was, so the cache was rebuilt from the files and these classes are back in it. Nothing was lost, but this editor is still holding the short list: do not rescan again until it has been restarted with editor_launch restart, because it will write the same list over the file each time." : unseen.length > 0 ? "The scan finished and these classes are still not in the list the editor resolves against, so every use of them reads as an unknown identifier. Its walk skips a file another engine has already imported.
|
|
39026
|
+
note: busy ? "The editor was still scanning or importing when the wait ran out, so new files may not be visible yet." : stillGone.length > 0 ? "The scan wrote the class cache from the list this editor is holding, that list is shorter than the file was, and rebuilding the cache from the files did not bring these back. Every engine that reads the cache next, including a test run, will report them as unknown identifiers. Restart the editor with editor_launch restart before scanning again." : lost.length > 0 ? "The scan wrote the class cache from the list this editor is holding, which is shorter than the file was, so the cache was rebuilt from the files and these classes are back in it. Nothing was lost, but this editor is still holding the short list: do not rescan again until it has been restarted with editor_launch restart, because it will write the same list over the file each time." : unseen.length > 0 ? "The scan finished and these classes are still not in the list the editor resolves against, so every use of them reads as an unknown identifier. Its walk skips a file another engine has already imported. Rescan again on its own, which is the measured cure and needs no change to the declaring script, or restart the editor with editor_launch restart." : undefined
|
|
39024
39027
|
});
|
|
39025
39028
|
}
|
|
39026
39029
|
async rebuildCacheAfterLoss(projectPath, lost) {
|
|
@@ -40639,9 +40642,10 @@ function renderToolsMarkdown() {
|
|
|
40639
40642
|
`${TOOL_SPECS.length} tools, named \`domain_verb\`. A tool that does several related things takes an`,
|
|
40640
40643
|
"`op`. An unknown op or argument is refused with the valid set listed. Generated from the server.",
|
|
40641
40644
|
"",
|
|
40642
|
-
|
|
40643
|
-
"
|
|
40644
|
-
"
|
|
40645
|
+
`Every call takes \`projectPath\` except ${toolsWithoutProjectPath().map((name) => `\`${name}\``).join(", ")}, which take none: the \`runtime_*\` and \`debug_*\` ones pick between running games`,
|
|
40646
|
+
"instead, and the others answer about the editor on this server. An argument a tool does not",
|
|
40647
|
+
"declare is refused rather than ignored. Answers are read from the engine after the change, not",
|
|
40648
|
+
"echoed from the request. Engine stderr comes back under `engine_messages`.",
|
|
40645
40649
|
"",
|
|
40646
40650
|
...headlessSection()
|
|
40647
40651
|
];
|
|
@@ -40697,8 +40701,9 @@ that is running, and the project on disk. ${TOOL_SPECS.length} tools, named \`do
|
|
|
40697
40701
|
|
|
40698
40702
|
## Start here
|
|
40699
40703
|
|
|
40700
|
-
- Every call takes \`projectPath
|
|
40701
|
-
|
|
40704
|
+
- Every call takes \`projectPath\` except ${toolsWithoutProjectPath().map((name) => `\\\`${name}\\\``).join(", ")}, which take none. The \`runtime_*\` and \`debug_*\` ones pick between running
|
|
40705
|
+
games instead; the others answer about the editor this server is connected to. There is no
|
|
40706
|
+
ambient project, and an argument a tool does not declare is refused rather than ignored.
|
|
40702
40707
|
- \`editor_status\` says whether an editor is connected and whether its addon matches the server.
|
|
40703
40708
|
\`addonIsStale\` means they differ, and \`staleNote\` says which half is behind: an editor that
|
|
40704
40709
|
needs restarting, or a server that needs reconnecting in your harness. Every answer that came
|
package/build/index.js
CHANGED
|
@@ -29078,7 +29078,7 @@ var TOOL_SPECS = [
|
|
|
29078
29078
|
},
|
|
29079
29079
|
{
|
|
29080
29080
|
name: "editor_rescan",
|
|
29081
|
-
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
|
|
29081
|
+
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 is this call on its own, with no change to the declaring script: measured against a real editor on three platforms, with idle waits of the same length ruled out so the scan is credited rather than the time it takes, and reproduced in a second project against its own reproduction in 203ms. editor_launch restart also does it and costs a window, 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 goes out of that file with it. That is not a reason to refuse the scan, because on a class the editor has merely not walked yet the scan is the cure; what the answer does instead is name the loss under cacheLost and rebuild the cache from the files, naming what came back under cacheRestored, so no fresh engine, CI run or clone inherits the short file. An editor that lost classes is still holding the short list, so the note says to restart it before scanning again. Needs the editor connected.",
|
|
29082
29082
|
parameters: {
|
|
29083
29083
|
projectPath: PROJECT_PATH,
|
|
29084
29084
|
timeoutMs: { type: "number", description: "How long to wait for the scan. Default 30000." },
|
|
@@ -31772,7 +31772,7 @@ class GodotServer {
|
|
|
31772
31772
|
cacheLost: lost.length > 0 ? lost : undefined,
|
|
31773
31773
|
cacheRestored: restored.length > 0 ? restored : undefined,
|
|
31774
31774
|
classesUnchecked: checked.unchecked,
|
|
31775
|
-
note: busy ? "The editor was still scanning or importing when the wait ran out, so new files may not be visible yet." : stillGone.length > 0 ? "The scan wrote the class cache from the list this editor is holding, that list is shorter than the file was, and rebuilding the cache from the files did not bring these back. Every engine that reads the cache next, including a test run, will report them as unknown identifiers. Restart the editor with editor_launch restart before scanning again." : lost.length > 0 ? "The scan wrote the class cache from the list this editor is holding, which is shorter than the file was, so the cache was rebuilt from the files and these classes are back in it. Nothing was lost, but this editor is still holding the short list: do not rescan again until it has been restarted with editor_launch restart, because it will write the same list over the file each time." : unseen.length > 0 ? "The scan finished and these classes are still not in the list the editor resolves against, so every use of them reads as an unknown identifier. Its walk skips a file another engine has already imported.
|
|
31775
|
+
note: busy ? "The editor was still scanning or importing when the wait ran out, so new files may not be visible yet." : stillGone.length > 0 ? "The scan wrote the class cache from the list this editor is holding, that list is shorter than the file was, and rebuilding the cache from the files did not bring these back. Every engine that reads the cache next, including a test run, will report them as unknown identifiers. Restart the editor with editor_launch restart before scanning again." : lost.length > 0 ? "The scan wrote the class cache from the list this editor is holding, which is shorter than the file was, so the cache was rebuilt from the files and these classes are back in it. Nothing was lost, but this editor is still holding the short list: do not rescan again until it has been restarted with editor_launch restart, because it will write the same list over the file each time." : unseen.length > 0 ? "The scan finished and these classes are still not in the list the editor resolves against, so every use of them reads as an unknown identifier. Its walk skips a file another engine has already imported. Rescan again on its own, which is the measured cure and needs no change to the declaring script, or restart the editor with editor_launch restart." : undefined
|
|
31776
31776
|
});
|
|
31777
31777
|
}
|
|
31778
31778
|
async rebuildCacheAfterLoss(projectPath, lost) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gdharness",
|
|
3
|
-
"version": "0.13.
|
|
3
|
+
"version": "0.13.24",
|
|
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",
|