gdharness 0.13.43 → 0.13.44
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
|
@@ -16155,7 +16155,7 @@ var init_tool_definitions = __esm(() => {
|
|
|
16155
16155
|
says: {
|
|
16156
16156
|
type: "string",
|
|
16157
16157
|
ops: ["find"],
|
|
16158
|
-
description: "find: part of what the node has written on it, case-insensitively, which is how a button is reached by the word on it rather than by a generated path. Its own text, so a row is found by the label in it, and hidden nodes match. A bare word is a contains; write a glob and it is one, matched against the whole of what the node says, the same as namePattern."
|
|
16158
|
+
description: "find: part of what the node has written on it, case-insensitively, which is how a button is reached by the word on it rather than by a generated path. Its own text, so a row is found by the label in it, and hidden nodes match. A bare word is a contains; write a glob and it is one, matched against the whole of what the node says, the same as namePattern. A label with a line break is matched with the break in the words, and a backslash followed by n counts as one."
|
|
16159
16159
|
},
|
|
16160
16160
|
limit: {
|
|
16161
16161
|
type: "number",
|
|
@@ -16373,7 +16373,7 @@ var init_tool_definitions = __esm(() => {
|
|
|
16373
16373
|
says: {
|
|
16374
16374
|
type: "string",
|
|
16375
16375
|
ops: ["until"],
|
|
16376
|
-
description: "until: wait for these words to appear anywhere under nodePath instead of for a property, which is how a panel that rebuilds its labels is waited on at all: the labels are named afresh each redraw and the panel is what stays put. Case-insensitive, part of a line, hidden nodes included. Instead of, not as well as: a call carrying this and a property is refused, because they ask about different things and answering one of them silently is how a caller watches a screen believing they are watching a property."
|
|
16376
|
+
description: "until: wait for these words to appear anywhere under nodePath instead of for a property, which is how a panel that rebuilds its labels is waited on at all: the labels are named afresh each redraw and the panel is what stays put. Case-insensitive, part of a line, hidden nodes included; a label with a line break is matched with the break in the words, and a backslash followed by n counts as one. Instead of, not as well as: a call carrying this and a property is refused, because they ask about different things and answering one of them silently is how a caller watches a screen believing they are watching a property."
|
|
16377
16377
|
},
|
|
16378
16378
|
timeoutMs: {
|
|
16379
16379
|
type: "number",
|
|
@@ -212,7 +212,18 @@ static func _is_literal(pattern: String) -> bool:
|
|
|
212
212
|
## only, a glob matched nothing at all and an empty answer reads as a control that is not on the
|
|
213
213
|
## screen: twice in one session here, over a button that was.
|
|
214
214
|
static func _says(said: String, wanted: String) -> bool:
|
|
215
|
-
|
|
215
|
+
var words: String = as_said(wanted)
|
|
216
|
+
return said.containsn(words) if _is_literal(words) else said.matchn(words)
|
|
217
|
+
|
|
218
|
+
|
|
219
|
+
## [param wanted] as words on a screen: a backslash followed by n is a line break.
|
|
220
|
+
##
|
|
221
|
+
## A button with two lines on it was asked for with the break written as the two characters, the
|
|
222
|
+
## way it is typed into a JSON string one escape short, and was answered as not there: 0 found,
|
|
223
|
+
## which reads as a control that is not on the screen. Nothing on a screen says a backslash and
|
|
224
|
+
## an n, so the two characters mean the break to everybody who writes them.
|
|
225
|
+
static func as_said(wanted: String) -> String:
|
|
226
|
+
return wanted.replace("\\n", "\n")
|
|
216
227
|
|
|
217
228
|
|
|
218
229
|
## Every filter but the name, so a find that came back empty can say how many nodes the name was
|
|
@@ -198,10 +198,11 @@ func wait_until(params: Dictionary) -> Dictionary:
|
|
|
198
198
|
## and the screen is the part that stays put.
|
|
199
199
|
func _wait_until_said(node_path: String, said: String, timeout_ms: int) -> Dictionary:
|
|
200
200
|
var started: int = Time.get_ticks_msec()
|
|
201
|
-
var
|
|
201
|
+
var words: String = Queries.as_said(said)
|
|
202
|
+
var found: bool = _anything_says(node_path, words)
|
|
202
203
|
while not found and Time.get_ticks_msec() - started < timeout_ms:
|
|
203
204
|
await _host.get_tree().process_frame
|
|
204
|
-
found = _anything_says(node_path,
|
|
205
|
+
found = _anything_says(node_path, words)
|
|
205
206
|
|
|
206
207
|
return {
|
|
207
208
|
"type": "condition",
|
package/build/index.js
CHANGED
|
@@ -29770,7 +29770,7 @@ var TOOL_SPECS = [
|
|
|
29770
29770
|
says: {
|
|
29771
29771
|
type: "string",
|
|
29772
29772
|
ops: ["find"],
|
|
29773
|
-
description: "find: part of what the node has written on it, case-insensitively, which is how a button is reached by the word on it rather than by a generated path. Its own text, so a row is found by the label in it, and hidden nodes match. A bare word is a contains; write a glob and it is one, matched against the whole of what the node says, the same as namePattern."
|
|
29773
|
+
description: "find: part of what the node has written on it, case-insensitively, which is how a button is reached by the word on it rather than by a generated path. Its own text, so a row is found by the label in it, and hidden nodes match. A bare word is a contains; write a glob and it is one, matched against the whole of what the node says, the same as namePattern. A label with a line break is matched with the break in the words, and a backslash followed by n counts as one."
|
|
29774
29774
|
},
|
|
29775
29775
|
limit: {
|
|
29776
29776
|
type: "number",
|
|
@@ -29988,7 +29988,7 @@ var TOOL_SPECS = [
|
|
|
29988
29988
|
says: {
|
|
29989
29989
|
type: "string",
|
|
29990
29990
|
ops: ["until"],
|
|
29991
|
-
description: "until: wait for these words to appear anywhere under nodePath instead of for a property, which is how a panel that rebuilds its labels is waited on at all: the labels are named afresh each redraw and the panel is what stays put. Case-insensitive, part of a line, hidden nodes included. Instead of, not as well as: a call carrying this and a property is refused, because they ask about different things and answering one of them silently is how a caller watches a screen believing they are watching a property."
|
|
29991
|
+
description: "until: wait for these words to appear anywhere under nodePath instead of for a property, which is how a panel that rebuilds its labels is waited on at all: the labels are named afresh each redraw and the panel is what stays put. Case-insensitive, part of a line, hidden nodes included; a label with a line break is matched with the break in the words, and a backslash followed by n counts as one. Instead of, not as well as: a call carrying this and a property is refused, because they ask about different things and answering one of them silently is how a caller watches a screen believing they are watching a property."
|
|
29992
29992
|
},
|
|
29993
29993
|
timeoutMs: {
|
|
29994
29994
|
type: "number",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gdharness",
|
|
3
|
-
"version": "0.13.
|
|
3
|
+
"version": "0.13.44",
|
|
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",
|