gdharness 0.13.32 → 0.13.33

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
@@ -38870,6 +38870,10 @@ class GodotServer {
38870
38870
  nothingOfOursIsRunning() {
38871
38871
  const status = this.godotBridge.getStatus();
38872
38872
  const noEditor = !status.connected ? " No editor is connected, so a game the editor is playing cannot be seen from here at all:" + " editor_status says whether one is on its way, and a run of yours that is still up is" + " reachable again once it is." : "";
38873
+ const live = this.aRuntimeOfOursIsAnswering();
38874
+ if (live !== null) {
38875
+ return `A game is running for ${live.project.path} and has announced its runtime on port ${live.port}, pid ${live.pid},` + " but this server did not start it and cannot reach it through the editor, so editor_run and" + " editor_output have nothing to answer about. The runtime_* tools reach it now." + " Do not start another: editor_run start replaces the game that is playing rather than" + " adding one, so it would end this one." + (this.godotBridge.getStatus().connected ? "" : " editor_status says whether an editor is on its way, and editor_run can end it once one is.");
38876
+ }
38873
38877
  const record = readRunRecord();
38874
38878
  if (record === null) {
38875
38879
  return `No game is running.${noEditor} Start one with editor_run.`;
@@ -38879,6 +38883,14 @@ class GodotServer {
38879
38883
  const ours = mine === null ? "this server was started without GDHARNESS_PROJECT and has no editor connected, so it cannot say whose that run is" : `this server serves ${mine}`;
38880
38884
  return `No game of this server's is running.${noEditor} A run started from ${whose} is recorded on this machine, and ${ours}, so it is not this server's to answer for or to end. Start one with editor_run.`;
38881
38885
  }
38886
+ aRuntimeOfOursIsAnswering() {
38887
+ const status = this.godotBridge.getStatus();
38888
+ const mine = this.ownProject ?? (status.connected ? status.projectPath ?? null : null);
38889
+ if (mine === null) {
38890
+ return null;
38891
+ }
38892
+ return discoverRuntimes().find((one) => one.project.path !== "" && isSameDirectory(mine, one.project.path)) ?? null;
38893
+ }
38882
38894
  couldBeOurs(project) {
38883
38895
  const status = this.godotBridge.getStatus();
38884
38896
  const mine = this.ownProject ?? (status.connected ? status.projectPath ?? null : null);
package/build/index.js CHANGED
@@ -31610,6 +31610,10 @@ class GodotServer {
31610
31610
  nothingOfOursIsRunning() {
31611
31611
  const status = this.godotBridge.getStatus();
31612
31612
  const noEditor = !status.connected ? " No editor is connected, so a game the editor is playing cannot be seen from here at all:" + " editor_status says whether one is on its way, and a run of yours that is still up is" + " reachable again once it is." : "";
31613
+ const live = this.aRuntimeOfOursIsAnswering();
31614
+ if (live !== null) {
31615
+ return `A game is running for ${live.project.path} and has announced its runtime on port ${live.port}, pid ${live.pid},` + " but this server did not start it and cannot reach it through the editor, so editor_run and" + " editor_output have nothing to answer about. The runtime_* tools reach it now." + " Do not start another: editor_run start replaces the game that is playing rather than" + " adding one, so it would end this one." + (this.godotBridge.getStatus().connected ? "" : " editor_status says whether an editor is on its way, and editor_run can end it once one is.");
31616
+ }
31613
31617
  const record = readRunRecord();
31614
31618
  if (record === null) {
31615
31619
  return `No game is running.${noEditor} Start one with editor_run.`;
@@ -31619,6 +31623,14 @@ class GodotServer {
31619
31623
  const ours = mine === null ? "this server was started without GDHARNESS_PROJECT and has no editor connected, so it cannot say whose that run is" : `this server serves ${mine}`;
31620
31624
  return `No game of this server's is running.${noEditor} A run started from ${whose} is recorded on this machine, and ${ours}, so it is not this server's to answer for or to end. Start one with editor_run.`;
31621
31625
  }
31626
+ aRuntimeOfOursIsAnswering() {
31627
+ const status = this.godotBridge.getStatus();
31628
+ const mine = this.ownProject ?? (status.connected ? status.projectPath ?? null : null);
31629
+ if (mine === null) {
31630
+ return null;
31631
+ }
31632
+ return discoverRuntimes().find((one) => one.project.path !== "" && isSameDirectory(mine, one.project.path)) ?? null;
31633
+ }
31622
31634
  couldBeOurs(project) {
31623
31635
  const status = this.godotBridge.getStatus();
31624
31636
  const mine = this.ownProject ?? (status.connected ? status.projectPath ?? null : null);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gdharness",
3
- "version": "0.13.32",
3
+ "version": "0.13.33",
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",