feat(pbs): align typed values and Pad input facade
This commit is contained in:
@@ -284,14 +284,14 @@ class HeadlessMcpDesktopTest {
|
||||
assertTrue(value(call("studio_project_context", args())).path("languages").toString().contains("pbs"));
|
||||
value(call("studio_reference_read", args().put("referenceId", "pbs:quickstart").put("limit", 100)));
|
||||
var sdk = value(call("studio_reference_read", args().put("referenceId", "pbs:sdk:game:1:sdk/input/main.pbs").put("limit", 1000)));
|
||||
assertTrue(sdk.toString().contains("InputPad"), "Consult installed SDK source through the indexed read-only reference");
|
||||
assertTrue(sdk.toString().contains("LowPad"), "Consult installed SDK source through the indexed read-only reference");
|
||||
assertEquals(ControlState.WAITING_FOR_AGENT, project.automation().snapshot().state());
|
||||
task = value(call("studio_control_acquire", args())).path("taskId").asText();
|
||||
assertFalse(task.isBlank());
|
||||
// Agent-native edit of the installed example; SDK remains unchanged.
|
||||
String edited = Files.readString(source).replace("import { Gfx } from @sdk:gfx;",
|
||||
"import { Gfx } from @sdk:gfx;\nimport { Input } from @sdk:input;")
|
||||
.replace("x = x + 1;", "if (Input.pad().right().down()) { x = x + 3; } else { x = x + 1; }");
|
||||
"import { Gfx } from @sdk:gfx;\nimport { Pad, Button, Touch } from @sdk:input;")
|
||||
.replace("x = x + 1;", "if (Pad.down(Button.Right)) { x = x + 3; } else { x = x + 1; }");
|
||||
Files.writeString(source, edited);
|
||||
var query = args().put("operation", "diagnostics"); query.putObject("parameters").put("uri", source.toUri().toString());
|
||||
assertTrue(value(call("studio_language_query", query)).path("result").isEmpty());
|
||||
|
||||
Reference in New Issue
Block a user