gdharness 1.1.54 → 1.1.55
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 +29 -1
- package/build/index.js +29 -1
- package/package.json +1 -1
package/build/cli.js
CHANGED
|
@@ -38515,7 +38515,7 @@ var init_godot_bridge = __esm(() => {
|
|
|
38515
38515
|
case "godot_ready":
|
|
38516
38516
|
if (this.connectionInfo) {
|
|
38517
38517
|
if (this.belongsElsewhere(message.project_path)) {
|
|
38518
|
-
this.
|
|
38518
|
+
this.elsewhereUnlessOneShot(message.project_path, message.editor_pid, message.opened_by_a_server === true);
|
|
38519
38519
|
return;
|
|
38520
38520
|
}
|
|
38521
38521
|
this.connectionInfo.projectPath = message.project_path;
|
|
@@ -38626,6 +38626,34 @@ var init_godot_bridge = __esm(() => {
|
|
|
38626
38626
|
const fits = closeReason(said, "start") === said;
|
|
38627
38627
|
stranger?.close(OTHER_PROJECT_CLOSE_CODE, fits ? said : closeReason(`this server serves ${this.ownProject ?? ""}`, "end"));
|
|
38628
38628
|
}
|
|
38629
|
+
elsewhereUnlessOneShot(theirProject, pid, openedByAServer) {
|
|
38630
|
+
const known = pid === undefined ? undefined : this.oneShots.get(pid);
|
|
38631
|
+
if (pid !== undefined && known !== undefined) {
|
|
38632
|
+
this.turnAway(pid, known);
|
|
38633
|
+
return;
|
|
38634
|
+
}
|
|
38635
|
+
const info = this.connectionInfo;
|
|
38636
|
+
const socket = this.socket;
|
|
38637
|
+
const reader = this.oneShotReader;
|
|
38638
|
+
if (pid === undefined || openedByAServer || info === null || reader === null) {
|
|
38639
|
+
this.sendElsewhere(theirProject);
|
|
38640
|
+
return;
|
|
38641
|
+
}
|
|
38642
|
+
info.identifying = true;
|
|
38643
|
+
reader(pid).catch(() => {
|
|
38644
|
+
return;
|
|
38645
|
+
}).then((option) => {
|
|
38646
|
+
if (this.socket !== socket || this.connectionInfo !== info) {
|
|
38647
|
+
return;
|
|
38648
|
+
}
|
|
38649
|
+
if (typeof option === "string") {
|
|
38650
|
+
this.oneShots.set(pid, option);
|
|
38651
|
+
this.turnAway(pid, option);
|
|
38652
|
+
return;
|
|
38653
|
+
}
|
|
38654
|
+
this.sendElsewhere(theirProject);
|
|
38655
|
+
});
|
|
38656
|
+
}
|
|
38629
38657
|
identify(pid) {
|
|
38630
38658
|
const known = this.oneShots.get(pid);
|
|
38631
38659
|
if (known !== undefined) {
|
package/build/index.js
CHANGED
|
@@ -28570,7 +28570,7 @@ class GodotBridge extends EventEmitter {
|
|
|
28570
28570
|
case "godot_ready":
|
|
28571
28571
|
if (this.connectionInfo) {
|
|
28572
28572
|
if (this.belongsElsewhere(message.project_path)) {
|
|
28573
|
-
this.
|
|
28573
|
+
this.elsewhereUnlessOneShot(message.project_path, message.editor_pid, message.opened_by_a_server === true);
|
|
28574
28574
|
return;
|
|
28575
28575
|
}
|
|
28576
28576
|
this.connectionInfo.projectPath = message.project_path;
|
|
@@ -28681,6 +28681,34 @@ class GodotBridge extends EventEmitter {
|
|
|
28681
28681
|
const fits = closeReason(said, "start") === said;
|
|
28682
28682
|
stranger?.close(OTHER_PROJECT_CLOSE_CODE, fits ? said : closeReason(`this server serves ${this.ownProject ?? ""}`, "end"));
|
|
28683
28683
|
}
|
|
28684
|
+
elsewhereUnlessOneShot(theirProject, pid, openedByAServer) {
|
|
28685
|
+
const known = pid === undefined ? undefined : this.oneShots.get(pid);
|
|
28686
|
+
if (pid !== undefined && known !== undefined) {
|
|
28687
|
+
this.turnAway(pid, known);
|
|
28688
|
+
return;
|
|
28689
|
+
}
|
|
28690
|
+
const info = this.connectionInfo;
|
|
28691
|
+
const socket = this.socket;
|
|
28692
|
+
const reader = this.oneShotReader;
|
|
28693
|
+
if (pid === undefined || openedByAServer || info === null || reader === null) {
|
|
28694
|
+
this.sendElsewhere(theirProject);
|
|
28695
|
+
return;
|
|
28696
|
+
}
|
|
28697
|
+
info.identifying = true;
|
|
28698
|
+
reader(pid).catch(() => {
|
|
28699
|
+
return;
|
|
28700
|
+
}).then((option) => {
|
|
28701
|
+
if (this.socket !== socket || this.connectionInfo !== info) {
|
|
28702
|
+
return;
|
|
28703
|
+
}
|
|
28704
|
+
if (typeof option === "string") {
|
|
28705
|
+
this.oneShots.set(pid, option);
|
|
28706
|
+
this.turnAway(pid, option);
|
|
28707
|
+
return;
|
|
28708
|
+
}
|
|
28709
|
+
this.sendElsewhere(theirProject);
|
|
28710
|
+
});
|
|
28711
|
+
}
|
|
28684
28712
|
identify(pid) {
|
|
28685
28713
|
const known = this.oneShots.get(pid);
|
|
28686
28714
|
if (known !== undefined) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gdharness",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.55",
|
|
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",
|