gdharness 0.4.1

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.
Files changed (37) hide show
  1. package/LICENSE +22 -0
  2. package/README.md +125 -0
  3. package/build/cli.js +30353 -0
  4. package/build/godot/addons/auto_reload/auto_reload.gd +89 -0
  5. package/build/godot/addons/auto_reload/plugin.cfg +6 -0
  6. package/build/godot/addons/gdharness_editor/bridge_client.gd +197 -0
  7. package/build/godot/addons/gdharness_editor/plugin.cfg +6 -0
  8. package/build/godot/addons/gdharness_editor/plugin.gd +88 -0
  9. package/build/godot/addons/gdharness_editor/tool_executor.gd +104 -0
  10. package/build/godot/addons/gdharness_editor/tools/animation_tools.gd +397 -0
  11. package/build/godot/addons/gdharness_editor/tools/play_tools.gd +85 -0
  12. package/build/godot/addons/gdharness_editor/tools/resource_tools.gd +427 -0
  13. package/build/godot/addons/gdharness_editor/tools/scene_tools.gd +885 -0
  14. package/build/godot/addons/gdharness_runtime/runtime_autoload.gd +292 -0
  15. package/build/godot/addons/gdharness_runtime/runtime_capture.gd +77 -0
  16. package/build/godot/addons/gdharness_runtime/runtime_input.gd +254 -0
  17. package/build/godot/addons/gdharness_runtime/runtime_queries.gd +283 -0
  18. package/build/godot/addons/gdharness_runtime/runtime_values.gd +169 -0
  19. package/build/godot/addons/gdharness_runtime/runtime_waits.gd +119 -0
  20. package/build/godot/operations/audio_buses.gd +125 -0
  21. package/build/godot/operations/class_cache.gd +180 -0
  22. package/build/godot/operations/classdb_queries.gd +252 -0
  23. package/build/godot/operations/dependencies.gd +293 -0
  24. package/build/godot/operations/file_walk.gd +55 -0
  25. package/build/godot/operations/gdscript_analysis.gd +288 -0
  26. package/build/godot/operations/gdscript_authoring.gd +419 -0
  27. package/build/godot/operations/godot_operations.gd +186 -0
  28. package/build/godot/operations/import_pipeline.gd +390 -0
  29. package/build/godot/operations/input_actions.gd +237 -0
  30. package/build/godot/operations/logger.gd +33 -0
  31. package/build/godot/operations/plugins.gd +159 -0
  32. package/build/godot/operations/project_config.gd +153 -0
  33. package/build/godot/operations/project_diagnostics.gd +159 -0
  34. package/build/godot/operations/resource_files.gd +132 -0
  35. package/build/godot/operations/serialisation.gd +154 -0
  36. package/build/index.js +29252 -0
  37. package/package.json +57 -0
package/LICENSE ADDED
@@ -0,0 +1,22 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Solomon Elias
4
+ Copyright (c) 2026 Aurelio Amoroso
5
+
6
+ Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ of this software and associated documentation files (the "Software"), to deal
8
+ in the Software without restriction, including without limitation the rights
9
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ copies of the Software, and to permit persons to whom the Software is
11
+ furnished to do so, subject to the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be included in all
14
+ copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,125 @@
1
+ # gdharness
2
+
3
+ [![CI](https://github.com/Aureliolo/gdharness/actions/workflows/ci.yml/badge.svg)](https://github.com/Aureliolo/gdharness/actions/workflows/ci.yml)
4
+ [![Scorecard](https://api.scorecard.dev/projects/github.com/Aureliolo/gdharness/badge)](https://scorecard.dev/viewer/?uri=github.com/Aureliolo/gdharness)
5
+ [![OpenSSF Best Practices](https://www.bestpractices.dev/projects/14619/badge)](https://www.bestpractices.dev/projects/14619)
6
+ [![OpenSSF Baseline](https://www.bestpractices.dev/projects/14619/baseline)](https://www.bestpractices.dev/projects/14619)
7
+ [![SLSA Build 3](https://img.shields.io/badge/SLSA-Build%20L3-2f6f4e?style=flat)](.github/release-process.md#slsa)
8
+ [![SBOM](https://img.shields.io/badge/SBOM-SPDX-2f6f4e?style=flat)](.github/release-process.md#what-a-release-carries)
9
+ [![Signed releases](https://img.shields.io/badge/releases-Sigstore%20signed-2f6f4e?style=flat)](.github/release-process.md#verifying-a-release)
10
+ [![Release](https://img.shields.io/github/v/release/Aureliolo/gdharness?display_name=tag&sort=semver)](https://github.com/Aureliolo/gdharness/releases)
11
+ [![MCP server](https://badge.mcpx.dev?type=server 'MCP Server')](https://modelcontextprotocol.io/introduction)
12
+ [![Made for Godot 4.7+](https://img.shields.io/badge/Made%20for-Godot%204.7%2B-478CBF?style=flat&logo=godot%20engine&logoColor=white)](https://godotengine.org)
13
+ [![Bun](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fraw.githubusercontent.com%2FAureliolo%2Fgdharness%2Fmain%2Fpackage.json&query=%24.engines.bun&label=bun&color=f9f1e1&logo=bun&logoColor=black)](https://bun.sh/)
14
+ [![Licence](https://img.shields.io/github/license/Aureliolo/gdharness)](LICENSE)
15
+
16
+ MCP server and Godot addons for driving a Godot 4 project from an agent: the editor that is open,
17
+ the game that is running, and the project on disk.
18
+
19
+ Requires Godot 4.7.0 or newer, and Node 22 or newer for `npx`. It runs under [Bun](https://bun.sh)
20
+ 1.4.0 or newer too.
21
+
22
+ ```jsonc
23
+ runtime_inspect { "op": "rect", "nodePath": "/root/Hall/Ledger/BuyButton" }
24
+
25
+ {
26
+ "type": "rect",
27
+ "path": "/root/Hall/Ledger/BuyButton",
28
+ "visible": true,
29
+ "canvas": { "position": { "x": 812, "y": 418 }, "size": { "x": 180, "y": 34 } },
30
+ "window": { "position": { "x": 812, "y": 418 }, "size": { "x": 180, "y": 34 } }
31
+ }
32
+ ```
33
+
34
+ **Documentation: [aureliolo.github.io/gdharness](https://aureliolo.github.io/gdharness)**
35
+
36
+ ## Install
37
+
38
+ From the project directory:
39
+
40
+ ```bash
41
+ npx -y gdharness@0.4.1 setup . --runtime
42
+ ```
43
+
44
+ Addons in, editor plugins on, class list rebuilt, and the server written into every agent harness
45
+ found on the machine: Claude Code, Cursor, VS Code, opencode, Codex, Gemini CLI, Windsurf, Hermes
46
+ and the rest. Reconnect the harness, then check `editor_status` answers.
47
+
48
+ [Install](https://aureliolo.github.io/gdharness/install.html) has the rest, including the signed
49
+ archive for a pinned or offline install. To have an agent do it, paste:
50
+
51
+ ```text
52
+ Install gdharness into this project by following
53
+ https://aureliolo.github.io/gdharness/agent.md, then tell me what it asked you to
54
+ recommend back to me.
55
+ ```
56
+
57
+ ## Three parts
58
+
59
+ **Inside Godot.** Addons installed into your project. They make the open editor and the running
60
+ game answerable, and reload the editor's view when files change on disk.
61
+
62
+ **The MCP server.** What your agent calls: thirty-odd tools and four `godot://` resources.
63
+
64
+ **The CLI.** Installs the addons, registers the server with the harnesses on the machine, checks
65
+ them, rebuilds the class cache.
66
+
67
+ [How it works](https://aureliolo.github.io/gdharness/architecture.html) is what connects to what.
68
+
69
+ ## Tools
70
+
71
+ Tools are named `domain_verb`. A tool that does several related things takes an `op`. An unknown op
72
+ or argument is refused with the valid set listed. Answers are read from the engine after the
73
+ change, not echoed from the request.
74
+
75
+ [Reference](https://aureliolo.github.io/gdharness/tools.html), generated from the server.
76
+
77
+ ## Rules
78
+
79
+ - **No fixture, no ship.** Every tool is driven against a pinned Godot in CI before it ships.
80
+ - **A tool fails rather than answers.** No success payload for an empty or partial result.
81
+ - **Every mutation reads back** from the engine.
82
+ - **Strict projects are the baseline.** Everything shipped, and everything the tools write, parses
83
+ with all GDScript warnings as errors.
84
+ - **Few tools, shaped like tasks.** Around thirty, not a hundred.
85
+ - **Answers are sized.** Detail levels by default, pagination where unbounded.
86
+
87
+ [What is proven](https://aureliolo.github.io/gdharness/tested.html) is how to check that.
88
+
89
+ ## Security
90
+
91
+ - The runtime bridge binds `127.0.0.1` and refuses to listen outside a debug build. No exported
92
+ game serves it.
93
+ - Subprocesses are spawned with an argument array, never a shell.
94
+ - Releases carry an SPDX SBOM and a keyless Sigstore build-provenance attestation over the archive,
95
+ its checksum and the SBOM, built by one reusable workflow: [SLSA Build Level
96
+ 3](.github/release-process.md#slsa). Published releases are immutable.
97
+ - Every dependency is an exact version and every action is pinned by commit digest. Nothing
98
+ downloaded in CI runs unless it matches a digest in this repository.
99
+ - `main` takes pull requests only, linear history, signed commits, and every CI job is a required
100
+ check. CodeQL, Scorecard, actionlint, zizmor and secret scanning run on every change.
101
+
102
+ ```bash
103
+ gh attestation verify gdharness-X.Y.Z.tgz --repo Aureliolo/gdharness \
104
+ --signer-workflow Aureliolo/gdharness/.github/workflows/release-build.yml
105
+ ```
106
+
107
+ [SECURITY.md](.github/SECURITY.md) is how to report something.
108
+
109
+ ## Development
110
+
111
+ ```bash
112
+ bun install
113
+ bun run build
114
+ bun run ci
115
+ bun run docs # the site, into site/
116
+ ```
117
+
118
+ [CONTRIBUTING.md](.github/CONTRIBUTING.md) is what a change has to clear.
119
+
120
+ ## Project
121
+
122
+ Fork of [GoPeak](https://github.com/HaD0Yun/Doyunha-Gopeak) v2.3.9, September 2026, MIT, by Solomon
123
+ Elias originally and completely reworked since to be hardened, condensed and more streamlined.
124
+
125
+ Not affiliated with GoPeak or the Godot Foundation.