gdharness 1.1.39 → 1.1.40
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 +25 -5
- package/build/index.js +25 -5
- package/package.json +1 -1
package/build/cli.js
CHANGED
|
@@ -17399,7 +17399,7 @@ var init_tool_definitions = __esm(() => {
|
|
|
17399
17399
|
},
|
|
17400
17400
|
{
|
|
17401
17401
|
name: "project_settings",
|
|
17402
|
-
description: "Reads or writes project.godot: settings, autoloads, the main scene, input actions, plugins and audio buses. A write with an editor open on the project is handed to the editor, which takes the settings the write changed from the file (named under editorAdopted), or reloads the bus layout, so it answers the new values and does not save the old ones back over them. editorNote is an editor that could not take the write, one on an addon from before this, which still holds the old values until editor_launch restart. An enabled plugin's code still loads on the editor's next start.",
|
|
17402
|
+
description: "Reads or writes project.godot: settings, autoloads, the main scene, input actions, plugins and audio buses. A write with an editor open on the project is handed to the editor, which takes the settings the write changed or names from the file (named under editorAdopted), including a setting the file already held, since the editor can hold another value after the file was put back, or reloads the bus layout, so it answers the new values and does not save the old ones back over them. editorNote is an editor that could not take the write, one on an addon from before this, which still holds the old values until editor_launch restart. An enabled plugin's code still loads on the editor's next start.",
|
|
17403
17403
|
parameters: {
|
|
17404
17404
|
projectPath: PROJECT_PATH,
|
|
17405
17405
|
setting: { type: "string", description: 'Setting path, such as "display/window/size/viewport_width".' },
|
|
@@ -17769,7 +17769,7 @@ var init_tool_definitions = __esm(() => {
|
|
|
17769
17769
|
},
|
|
17770
17770
|
{
|
|
17771
17771
|
name: "script_edit",
|
|
17772
|
-
description: "Creates a GDScript file, or adds functions, variables and signals to one. Every declaration written carries a type. Both load what they wrote under the project's own warning settings and answer with parses; the engine's reasons for a refusal come back under engine_messages. create answers with the extends and class_name the engine read, and a script declaring a class_name is put in the project's class list, with registered saying whether it is there. modify makes every addition or none, and answers with the line each one is on in the file written. rename renames a class or a member wherever the engine uses it and writes every file or none. A new name already taken is refused with nothing written, a member's included when a class inheriting it already uses the name in code, as a local or a parameter. changed lists each file with its changed lines as they now read, and leftAlone lists every other whole-word occurrence of the old name with what the tokenizer makes of it (code, string, comment, doc, nodePath, scene, text, or ignored for a file under a .gdignore directory, which is never changed) and, where it is not plain, why: a string that is the old name whole, such as find_children's type or a call's method name, which nothing renames or compiles and which is listed first; a node named like the class; a call on a value whose type the analyser could not tell. A member rename answers under languageServer how many requests it made and how long they took. A comment, documentation line, string or text file line with nothing more to say is given under leftAloneInProse by file, kind and line instead, and code that is certainly another symbol of the same name, a bare name in a file where nothing inherits the member or one the language server resolved to another declaration, under leftAloneOtherSymbols as each why with the files and lines it covers. summary.leftAlone counts each of the three lists beside the total. When those two grouped lists run past 300 lines, they are written with each line's text to a file under the project's .godot directory instead, and leftAloneDetail names the file and counts what is in it. Read both before calling the rename done; nothing in them was changed. Afterwards an open editor scans the changed files and reloads every changed script, which is also the compile check, and its answer comes back under editor; with no editor the class cache is rebuilt and the changed scripts are compiled in a fresh engine, under classCache and compiled. written is true once the files are written, and ok is false when what came after the write failed: the files are left changed, and note says so.",
|
|
17772
|
+
description: "Creates a GDScript file, or adds functions, variables and signals to one. Every declaration written carries a type. Both load what they wrote under the project's own warning settings and answer with parses; the engine's reasons for a refusal come back under engine_messages. create answers with the extends and class_name the engine read, and a script declaring a class_name is put in the project's class list, with registered saying whether it is there. modify makes every addition or none, and answers with the line each one is on in the file written. rename renames a class or a member wherever the engine uses it and writes every file or none. A new name already taken is refused with nothing written, a member's included when a class inheriting it already uses the name in code, as a local or a parameter. changed lists each file with its changed lines as they now read, and leftAlone lists every other whole-word occurrence of the old name with what the tokenizer makes of it (code, string, comment, doc, nodePath, scene, text, or ignored for a file under a .gdignore directory, which is never changed) and, where it is not plain, why: a string that is the old name whole, such as find_children's type or a call's method name, which nothing renames or compiles and which is listed first; a node named like the class; a call on a value whose type the analyser could not tell. A member rename answers under languageServer how many requests it made and how long they took. A comment, documentation line, string or text file line with nothing more to say is given under leftAloneInProse by file, kind and line instead, and code that is certainly another symbol of the same name, a bare name in a file where nothing inherits the member or one the language server resolved to another declaration, under leftAloneOtherSymbols as each why with the files and lines it covers. summary.leftAlone counts each of the three lists beside the total. When those two grouped lists run past 300 lines, they are written with each line's text to a file under the project's .godot directory instead, of which the newest ten are kept, and leftAloneDetail names the file and counts what is in it. Read both before calling the rename done; nothing in them was changed. Afterwards an open editor scans the changed files and reloads every changed script, which is also the compile check, and its answer comes back under editor; with no editor the class cache is rebuilt and the changed scripts are compiled in a fresh engine, under classCache and compiled. written is true once the files are written, and ok is false when what came after the write failed: the files are left changed, and note says so.",
|
|
17773
17773
|
parameters: {
|
|
17774
17774
|
projectPath: PROJECT_PATH,
|
|
17775
17775
|
scriptPath: SCRIPT_PATH,
|
|
@@ -40178,7 +40178,7 @@ function planMemberRename(args) {
|
|
|
40178
40178
|
} else if (occurrence.kind === "doc" && docLinkAt(script.text, one.offset) !== null) {
|
|
40179
40179
|
plan.edit(one.file, one.offset, "doc link");
|
|
40180
40180
|
} else {
|
|
40181
|
-
plan.mention(one.file, script.lines, one.offset, occurrence.kind, `the language server resolved this to the ${kind === "func" ? "method" : "member"},
|
|
40181
|
+
plan.mention(one.file, script.lines, one.offset, occurrence.kind, `the language server resolved this word to the ${kind === "func" ? "method" : "member"}, but it is inside ${occurrence.kind === "string" ? "a string" : occurrence.kind === "nodePath" ? "a node path" : "a comment"}, which no rename changes: read it, and change the word by hand if it names the ${kind === "func" ? "method" : "member"}`);
|
|
40182
40182
|
}
|
|
40183
40183
|
}
|
|
40184
40184
|
for (const script of scripts.values()) {
|
|
@@ -41977,6 +41977,25 @@ function changedSettings(before, after) {
|
|
|
41977
41977
|
const names = new Set([...before.keys(), ...after.keys()]);
|
|
41978
41978
|
return [...names].filter((name) => JSON.stringify(before.get(name)) !== JSON.stringify(after.get(name))).sort();
|
|
41979
41979
|
}
|
|
41980
|
+
function settingsNamedBy(op, args) {
|
|
41981
|
+
const text = (key) => readString(args, key) ?? "";
|
|
41982
|
+
switch (op) {
|
|
41983
|
+
case "set":
|
|
41984
|
+
return text("setting") === "" ? [] : [text("setting")];
|
|
41985
|
+
case "add_autoload":
|
|
41986
|
+
case "remove_autoload":
|
|
41987
|
+
return text("name") === "" ? [] : [`autoload/${text("name")}`];
|
|
41988
|
+
case "set_main_scene":
|
|
41989
|
+
return ["application/run/main_scene"];
|
|
41990
|
+
case "add_input_action":
|
|
41991
|
+
return text("actionName") === "" ? [] : [`input/${text("actionName")}`];
|
|
41992
|
+
case "enable_plugin":
|
|
41993
|
+
case "disable_plugin":
|
|
41994
|
+
return ["editor_plugins/enabled"];
|
|
41995
|
+
default:
|
|
41996
|
+
return [];
|
|
41997
|
+
}
|
|
41998
|
+
}
|
|
41980
41999
|
function scriptErrorsNote(errors) {
|
|
41981
42000
|
const causes = new Map;
|
|
41982
42001
|
for (const error of errors) {
|
|
@@ -43199,7 +43218,8 @@ class GodotServer {
|
|
|
43199
43218
|
if (AUDIO_BUS_OPS.has(op)) {
|
|
43200
43219
|
return this.jsonTextResponse({ ...answer, ...await this.editorTakes("adopt_audio_bus_layout", {}) });
|
|
43201
43220
|
}
|
|
43202
|
-
const
|
|
43221
|
+
const diffed = changedSettings(before, this.settingKeysOf(projectPath));
|
|
43222
|
+
const changed = diffed === null ? null : [...new Set([...diffed, ...settingsNamedBy(op, args)])].sort();
|
|
43203
43223
|
if (changed === null) {
|
|
43204
43224
|
return this.jsonTextResponse({
|
|
43205
43225
|
...answer,
|
|
@@ -46172,7 +46192,7 @@ class GodotServer {
|
|
|
46172
46192
|
const folded = asParams(outcome.report["leftAloneDetail"]);
|
|
46173
46193
|
outcome.report["leftAloneDetail"] = {
|
|
46174
46194
|
file,
|
|
46175
|
-
note: `Too many lines were left alone to list here, and none of them is a use: every comment, documentation line, string and text file line that only shares the word, and every other symbol of the same name, is in ${file} with its text.`,
|
|
46195
|
+
note: `Too many lines were left alone to list here, and none of them is a use: every comment, documentation line, string and text file line that only shares the word, and every other symbol of the same name, is in ${file} with its text. The newest ten of these files are kept and older ones removed as new ones are written.`,
|
|
46176
46196
|
...folded
|
|
46177
46197
|
};
|
|
46178
46198
|
}
|
package/build/index.js
CHANGED
|
@@ -30900,7 +30900,7 @@ function planMemberRename(args) {
|
|
|
30900
30900
|
} else if (occurrence.kind === "doc" && docLinkAt(script.text, one.offset) !== null) {
|
|
30901
30901
|
plan.edit(one.file, one.offset, "doc link");
|
|
30902
30902
|
} else {
|
|
30903
|
-
plan.mention(one.file, script.lines, one.offset, occurrence.kind, `the language server resolved this to the ${kind === "func" ? "method" : "member"},
|
|
30903
|
+
plan.mention(one.file, script.lines, one.offset, occurrence.kind, `the language server resolved this word to the ${kind === "func" ? "method" : "member"}, but it is inside ${occurrence.kind === "string" ? "a string" : occurrence.kind === "nodePath" ? "a node path" : "a comment"}, which no rename changes: read it, and change the word by hand if it names the ${kind === "func" ? "method" : "member"}`);
|
|
30904
30904
|
}
|
|
30905
30905
|
}
|
|
30906
30906
|
for (const script of scripts.values()) {
|
|
@@ -32820,7 +32820,7 @@ var TOOL_SPECS = [
|
|
|
32820
32820
|
},
|
|
32821
32821
|
{
|
|
32822
32822
|
name: "project_settings",
|
|
32823
|
-
description: "Reads or writes project.godot: settings, autoloads, the main scene, input actions, plugins and audio buses. A write with an editor open on the project is handed to the editor, which takes the settings the write changed from the file (named under editorAdopted), or reloads the bus layout, so it answers the new values and does not save the old ones back over them. editorNote is an editor that could not take the write, one on an addon from before this, which still holds the old values until editor_launch restart. An enabled plugin's code still loads on the editor's next start.",
|
|
32823
|
+
description: "Reads or writes project.godot: settings, autoloads, the main scene, input actions, plugins and audio buses. A write with an editor open on the project is handed to the editor, which takes the settings the write changed or names from the file (named under editorAdopted), including a setting the file already held, since the editor can hold another value after the file was put back, or reloads the bus layout, so it answers the new values and does not save the old ones back over them. editorNote is an editor that could not take the write, one on an addon from before this, which still holds the old values until editor_launch restart. An enabled plugin's code still loads on the editor's next start.",
|
|
32824
32824
|
parameters: {
|
|
32825
32825
|
projectPath: PROJECT_PATH,
|
|
32826
32826
|
setting: { type: "string", description: 'Setting path, such as "display/window/size/viewport_width".' },
|
|
@@ -33190,7 +33190,7 @@ var TOOL_SPECS = [
|
|
|
33190
33190
|
},
|
|
33191
33191
|
{
|
|
33192
33192
|
name: "script_edit",
|
|
33193
|
-
description: "Creates a GDScript file, or adds functions, variables and signals to one. Every declaration written carries a type. Both load what they wrote under the project's own warning settings and answer with parses; the engine's reasons for a refusal come back under engine_messages. create answers with the extends and class_name the engine read, and a script declaring a class_name is put in the project's class list, with registered saying whether it is there. modify makes every addition or none, and answers with the line each one is on in the file written. rename renames a class or a member wherever the engine uses it and writes every file or none. A new name already taken is refused with nothing written, a member's included when a class inheriting it already uses the name in code, as a local or a parameter. changed lists each file with its changed lines as they now read, and leftAlone lists every other whole-word occurrence of the old name with what the tokenizer makes of it (code, string, comment, doc, nodePath, scene, text, or ignored for a file under a .gdignore directory, which is never changed) and, where it is not plain, why: a string that is the old name whole, such as find_children's type or a call's method name, which nothing renames or compiles and which is listed first; a node named like the class; a call on a value whose type the analyser could not tell. A member rename answers under languageServer how many requests it made and how long they took. A comment, documentation line, string or text file line with nothing more to say is given under leftAloneInProse by file, kind and line instead, and code that is certainly another symbol of the same name, a bare name in a file where nothing inherits the member or one the language server resolved to another declaration, under leftAloneOtherSymbols as each why with the files and lines it covers. summary.leftAlone counts each of the three lists beside the total. When those two grouped lists run past 300 lines, they are written with each line's text to a file under the project's .godot directory instead, and leftAloneDetail names the file and counts what is in it. Read both before calling the rename done; nothing in them was changed. Afterwards an open editor scans the changed files and reloads every changed script, which is also the compile check, and its answer comes back under editor; with no editor the class cache is rebuilt and the changed scripts are compiled in a fresh engine, under classCache and compiled. written is true once the files are written, and ok is false when what came after the write failed: the files are left changed, and note says so.",
|
|
33193
|
+
description: "Creates a GDScript file, or adds functions, variables and signals to one. Every declaration written carries a type. Both load what they wrote under the project's own warning settings and answer with parses; the engine's reasons for a refusal come back under engine_messages. create answers with the extends and class_name the engine read, and a script declaring a class_name is put in the project's class list, with registered saying whether it is there. modify makes every addition or none, and answers with the line each one is on in the file written. rename renames a class or a member wherever the engine uses it and writes every file or none. A new name already taken is refused with nothing written, a member's included when a class inheriting it already uses the name in code, as a local or a parameter. changed lists each file with its changed lines as they now read, and leftAlone lists every other whole-word occurrence of the old name with what the tokenizer makes of it (code, string, comment, doc, nodePath, scene, text, or ignored for a file under a .gdignore directory, which is never changed) and, where it is not plain, why: a string that is the old name whole, such as find_children's type or a call's method name, which nothing renames or compiles and which is listed first; a node named like the class; a call on a value whose type the analyser could not tell. A member rename answers under languageServer how many requests it made and how long they took. A comment, documentation line, string or text file line with nothing more to say is given under leftAloneInProse by file, kind and line instead, and code that is certainly another symbol of the same name, a bare name in a file where nothing inherits the member or one the language server resolved to another declaration, under leftAloneOtherSymbols as each why with the files and lines it covers. summary.leftAlone counts each of the three lists beside the total. When those two grouped lists run past 300 lines, they are written with each line's text to a file under the project's .godot directory instead, of which the newest ten are kept, and leftAloneDetail names the file and counts what is in it. Read both before calling the rename done; nothing in them was changed. Afterwards an open editor scans the changed files and reloads every changed script, which is also the compile check, and its answer comes back under editor; with no editor the class cache is rebuilt and the changed scripts are compiled in a fresh engine, under classCache and compiled. written is true once the files are written, and ok is false when what came after the write failed: the files are left changed, and note says so.",
|
|
33194
33194
|
parameters: {
|
|
33195
33195
|
projectPath: PROJECT_PATH,
|
|
33196
33196
|
scriptPath: SCRIPT_PATH,
|
|
@@ -34517,6 +34517,25 @@ function changedSettings(before, after) {
|
|
|
34517
34517
|
const names = new Set([...before.keys(), ...after.keys()]);
|
|
34518
34518
|
return [...names].filter((name) => JSON.stringify(before.get(name)) !== JSON.stringify(after.get(name))).sort();
|
|
34519
34519
|
}
|
|
34520
|
+
function settingsNamedBy(op, args) {
|
|
34521
|
+
const text = (key) => readString(args, key) ?? "";
|
|
34522
|
+
switch (op) {
|
|
34523
|
+
case "set":
|
|
34524
|
+
return text("setting") === "" ? [] : [text("setting")];
|
|
34525
|
+
case "add_autoload":
|
|
34526
|
+
case "remove_autoload":
|
|
34527
|
+
return text("name") === "" ? [] : [`autoload/${text("name")}`];
|
|
34528
|
+
case "set_main_scene":
|
|
34529
|
+
return ["application/run/main_scene"];
|
|
34530
|
+
case "add_input_action":
|
|
34531
|
+
return text("actionName") === "" ? [] : [`input/${text("actionName")}`];
|
|
34532
|
+
case "enable_plugin":
|
|
34533
|
+
case "disable_plugin":
|
|
34534
|
+
return ["editor_plugins/enabled"];
|
|
34535
|
+
default:
|
|
34536
|
+
return [];
|
|
34537
|
+
}
|
|
34538
|
+
}
|
|
34520
34539
|
var STALLED_AFTER_MS = 30000;
|
|
34521
34540
|
var DEPENDED_FAILED = "Failed to compile depended scripts";
|
|
34522
34541
|
function scriptErrorsNote(errors) {
|
|
@@ -35773,7 +35792,8 @@ class GodotServer {
|
|
|
35773
35792
|
if (AUDIO_BUS_OPS.has(op)) {
|
|
35774
35793
|
return this.jsonTextResponse({ ...answer, ...await this.editorTakes("adopt_audio_bus_layout", {}) });
|
|
35775
35794
|
}
|
|
35776
|
-
const
|
|
35795
|
+
const diffed = changedSettings(before, this.settingKeysOf(projectPath));
|
|
35796
|
+
const changed = diffed === null ? null : [...new Set([...diffed, ...settingsNamedBy(op, args)])].sort();
|
|
35777
35797
|
if (changed === null) {
|
|
35778
35798
|
return this.jsonTextResponse({
|
|
35779
35799
|
...answer,
|
|
@@ -38746,7 +38766,7 @@ class GodotServer {
|
|
|
38746
38766
|
const folded = asParams(outcome.report["leftAloneDetail"]);
|
|
38747
38767
|
outcome.report["leftAloneDetail"] = {
|
|
38748
38768
|
file,
|
|
38749
|
-
note: `Too many lines were left alone to list here, and none of them is a use: every comment, documentation line, string and text file line that only shares the word, and every other symbol of the same name, is in ${file} with its text.`,
|
|
38769
|
+
note: `Too many lines were left alone to list here, and none of them is a use: every comment, documentation line, string and text file line that only shares the word, and every other symbol of the same name, is in ${file} with its text. The newest ten of these files are kept and older ones removed as new ones are written.`,
|
|
38750
38770
|
...folded
|
|
38751
38771
|
};
|
|
38752
38772
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gdharness",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.40",
|
|
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",
|