gdharness 0.13.10 → 0.13.11
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 +14 -9
- package/build/index.js +14 -9
- package/package.json +1 -1
package/build/cli.js
CHANGED
|
@@ -14897,10 +14897,10 @@ function isValueComplete(value) {
|
|
|
14897
14897
|
return depth <= 0 && !inString;
|
|
14898
14898
|
}
|
|
14899
14899
|
function settingKeys(content) {
|
|
14900
|
-
const named = new
|
|
14900
|
+
const named = new Map;
|
|
14901
14901
|
for (const [section, entries] of Object.entries(parseProjectGodot(content))) {
|
|
14902
|
-
for (const key of Object.
|
|
14903
|
-
named.
|
|
14902
|
+
for (const [key, value] of Object.entries(entries)) {
|
|
14903
|
+
named.set(`${section}/${key}`, value);
|
|
14904
14904
|
}
|
|
14905
14905
|
}
|
|
14906
14906
|
return named;
|
|
@@ -15787,7 +15787,10 @@ var init_tool_definitions = __esm(() => {
|
|
|
15787
15787
|
summary: "run the project until it quits or is stopped",
|
|
15788
15788
|
requires: ["projectPath"]
|
|
15789
15789
|
},
|
|
15790
|
-
stop: {
|
|
15790
|
+
stop: {
|
|
15791
|
+
summary: "end the run and answer with what it printed last, naming the process ended under endedPid: a game that started processes of its own keeps them",
|
|
15792
|
+
requires: []
|
|
15793
|
+
},
|
|
15791
15794
|
check: {
|
|
15792
15795
|
summary: "boot headless, quit after a few frames, and report the verdict",
|
|
15793
15796
|
requires: ["projectPath"]
|
|
@@ -38030,12 +38033,12 @@ class GodotServer {
|
|
|
38030
38033
|
}
|
|
38031
38034
|
settingKeysOf(projectPath) {
|
|
38032
38035
|
if (projectPath === undefined) {
|
|
38033
|
-
return new
|
|
38036
|
+
return new Map;
|
|
38034
38037
|
}
|
|
38035
38038
|
try {
|
|
38036
38039
|
return settingKeys(readFileSync15(join17(projectPath, "project.godot"), "utf8"));
|
|
38037
38040
|
} catch {
|
|
38038
|
-
return new
|
|
38041
|
+
return new Map;
|
|
38039
38042
|
}
|
|
38040
38043
|
}
|
|
38041
38044
|
async handleRestartEditor() {
|
|
@@ -38067,7 +38070,7 @@ class GodotServer {
|
|
|
38067
38070
|
}
|
|
38068
38071
|
const now = this.godotBridge.getStatus();
|
|
38069
38072
|
const after = this.settingKeysOf(before.projectPath);
|
|
38070
|
-
const dropped = [...settingsBefore].filter((key) => !after.has(key));
|
|
38073
|
+
const dropped = [...settingsBefore].filter(([key]) => !after.has(key));
|
|
38071
38074
|
return this.jsonTextResponse({
|
|
38072
38075
|
restarted: true,
|
|
38073
38076
|
editorPid: now.editorPid,
|
|
@@ -38075,8 +38078,8 @@ class GodotServer {
|
|
|
38075
38078
|
serverVersion: SERVER_VERSION,
|
|
38076
38079
|
addonIsStale: now.addonVersion !== SERVER_VERSION,
|
|
38077
38080
|
staleNote: addonMismatch(now.addonVersion, SERVER_VERSION),
|
|
38078
|
-
settingsDropped: dropped.length > 0 ? dropped : undefined,
|
|
38079
|
-
settingsNote: dropped.length > 0 ?
|
|
38081
|
+
settingsDropped: dropped.length > 0 ? dropped.map(([setting, was]) => ({ setting, was })) : undefined,
|
|
38082
|
+
settingsNote: dropped.length > 0 ? `The editor saved project.godot on its way out and these keys are no longer in it, with the value each one held. Godot writes only what differs from its own defaults, so a key named deliberately at its default value is redundant to the editor and is dropped on save; it will be dropped again on the next restart. If any of them were pinned on purpose, to keep "set to this on purpose" and "not set" apart, project_settings set puts one back: ${dropped.map(([setting, was]) => `setting "${setting}" value ${JSON.stringify(was)}`).join(", ")}. Nothing else will say they have gone until something depends on one.` : undefined,
|
|
38080
38083
|
tookMs: Date.now() - began
|
|
38081
38084
|
});
|
|
38082
38085
|
}
|
|
@@ -38701,11 +38704,13 @@ class GodotServer {
|
|
|
38701
38704
|
return this.jsonTextResponse({
|
|
38702
38705
|
stopped: true,
|
|
38703
38706
|
through: stopped.throughEditor ? "editor" : "gdharness",
|
|
38707
|
+
endedPid: stopped.pid,
|
|
38704
38708
|
exitedBeforeStop: stopped.exitCode !== null,
|
|
38705
38709
|
exitCode: stopped.exitCode,
|
|
38706
38710
|
errors: stopped.log.count("error"),
|
|
38707
38711
|
warnings: stopped.log.count("warning"),
|
|
38708
38712
|
clean: stopped.log.count("error") === 0,
|
|
38713
|
+
note: stopped.throughEditor ? "The editor was asked to stop the scene it is playing. Anything that game started for itself, with OS.create_process or otherwise, is not the editor's to stop and is still running." : "The process named under endedPid was ended. Anything that game started for itself, with OS.create_process or otherwise, is a separate process and is still running.",
|
|
38709
38714
|
entries: forAnswer(stopped.log.select({ severity: "warning", sinceLastCall: false, limit: 200 }).entries)
|
|
38710
38715
|
});
|
|
38711
38716
|
}
|
package/build/index.js
CHANGED
|
@@ -27558,10 +27558,10 @@ function isValueComplete(value) {
|
|
|
27558
27558
|
return depth <= 0 && !inString;
|
|
27559
27559
|
}
|
|
27560
27560
|
function settingKeys(content) {
|
|
27561
|
-
const named = new
|
|
27561
|
+
const named = new Map;
|
|
27562
27562
|
for (const [section, entries] of Object.entries(parseProjectGodot(content))) {
|
|
27563
|
-
for (const key of Object.
|
|
27564
|
-
named.
|
|
27563
|
+
for (const [key, value] of Object.entries(entries)) {
|
|
27564
|
+
named.set(`${section}/${key}`, value);
|
|
27565
27565
|
}
|
|
27566
27566
|
}
|
|
27567
27567
|
return named;
|
|
@@ -28877,7 +28877,10 @@ var TOOL_SPECS = [
|
|
|
28877
28877
|
summary: "run the project until it quits or is stopped",
|
|
28878
28878
|
requires: ["projectPath"]
|
|
28879
28879
|
},
|
|
28880
|
-
stop: {
|
|
28880
|
+
stop: {
|
|
28881
|
+
summary: "end the run and answer with what it printed last, naming the process ended under endedPid: a game that started processes of its own keeps them",
|
|
28882
|
+
requires: []
|
|
28883
|
+
},
|
|
28881
28884
|
check: {
|
|
28882
28885
|
summary: "boot headless, quit after a few frames, and report the verdict",
|
|
28883
28886
|
requires: ["projectPath"]
|
|
@@ -30784,12 +30787,12 @@ class GodotServer {
|
|
|
30784
30787
|
}
|
|
30785
30788
|
settingKeysOf(projectPath) {
|
|
30786
30789
|
if (projectPath === undefined) {
|
|
30787
|
-
return new
|
|
30790
|
+
return new Map;
|
|
30788
30791
|
}
|
|
30789
30792
|
try {
|
|
30790
30793
|
return settingKeys(readFileSync11(join11(projectPath, "project.godot"), "utf8"));
|
|
30791
30794
|
} catch {
|
|
30792
|
-
return new
|
|
30795
|
+
return new Map;
|
|
30793
30796
|
}
|
|
30794
30797
|
}
|
|
30795
30798
|
async handleRestartEditor() {
|
|
@@ -30821,7 +30824,7 @@ class GodotServer {
|
|
|
30821
30824
|
}
|
|
30822
30825
|
const now = this.godotBridge.getStatus();
|
|
30823
30826
|
const after = this.settingKeysOf(before.projectPath);
|
|
30824
|
-
const dropped = [...settingsBefore].filter((key) => !after.has(key));
|
|
30827
|
+
const dropped = [...settingsBefore].filter(([key]) => !after.has(key));
|
|
30825
30828
|
return this.jsonTextResponse({
|
|
30826
30829
|
restarted: true,
|
|
30827
30830
|
editorPid: now.editorPid,
|
|
@@ -30829,8 +30832,8 @@ class GodotServer {
|
|
|
30829
30832
|
serverVersion: SERVER_VERSION,
|
|
30830
30833
|
addonIsStale: now.addonVersion !== SERVER_VERSION,
|
|
30831
30834
|
staleNote: addonMismatch(now.addonVersion, SERVER_VERSION),
|
|
30832
|
-
settingsDropped: dropped.length > 0 ? dropped : undefined,
|
|
30833
|
-
settingsNote: dropped.length > 0 ?
|
|
30835
|
+
settingsDropped: dropped.length > 0 ? dropped.map(([setting, was]) => ({ setting, was })) : undefined,
|
|
30836
|
+
settingsNote: dropped.length > 0 ? `The editor saved project.godot on its way out and these keys are no longer in it, with the value each one held. Godot writes only what differs from its own defaults, so a key named deliberately at its default value is redundant to the editor and is dropped on save; it will be dropped again on the next restart. If any of them were pinned on purpose, to keep "set to this on purpose" and "not set" apart, project_settings set puts one back: ${dropped.map(([setting, was]) => `setting "${setting}" value ${JSON.stringify(was)}`).join(", ")}. Nothing else will say they have gone until something depends on one.` : undefined,
|
|
30834
30837
|
tookMs: Date.now() - began
|
|
30835
30838
|
});
|
|
30836
30839
|
}
|
|
@@ -31455,11 +31458,13 @@ class GodotServer {
|
|
|
31455
31458
|
return this.jsonTextResponse({
|
|
31456
31459
|
stopped: true,
|
|
31457
31460
|
through: stopped.throughEditor ? "editor" : "gdharness",
|
|
31461
|
+
endedPid: stopped.pid,
|
|
31458
31462
|
exitedBeforeStop: stopped.exitCode !== null,
|
|
31459
31463
|
exitCode: stopped.exitCode,
|
|
31460
31464
|
errors: stopped.log.count("error"),
|
|
31461
31465
|
warnings: stopped.log.count("warning"),
|
|
31462
31466
|
clean: stopped.log.count("error") === 0,
|
|
31467
|
+
note: stopped.throughEditor ? "The editor was asked to stop the scene it is playing. Anything that game started for itself, with OS.create_process or otherwise, is not the editor's to stop and is still running." : "The process named under endedPid was ended. Anything that game started for itself, with OS.create_process or otherwise, is a separate process and is still running.",
|
|
31463
31468
|
entries: forAnswer(stopped.log.select({ severity: "warning", sinceLastCall: false, limit: 200 }).entries)
|
|
31464
31469
|
});
|
|
31465
31470
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gdharness",
|
|
3
|
-
"version": "0.13.
|
|
3
|
+
"version": "0.13.11",
|
|
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",
|