Add runtime abstraction and agent loop

Co-authored-by: codegirl007 <codegirl-007@users.noreply.github.com>
This commit is contained in:
Cursor Agent
2026-08-17 16:47:22 +00:00
co-authored by codegirl007
parent 54dc5658c6
commit 94146fcae2
17 changed files with 1512 additions and 2 deletions
+28
View File
@@ -0,0 +1,28 @@
package appspec
import (
"os"
"path/filepath"
"testing"
)
func TestResolveDirectoryManifest(t *testing.T) {
directory := t.TempDir()
executable := filepath.Join(directory, "game")
if err := os.WriteFile(executable, []byte("binary"), 0o755); err != nil {
t.Fatal(err)
}
manifest := `{"command":"game","args":["--demo"],"window_title":"Demo"}`
if err := os.WriteFile(filepath.Join(directory, "agentbox.json"), []byte(manifest), 0o644); err != nil {
t.Fatal(err)
}
command, err := Resolve(directory)
if err != nil {
t.Fatal(err)
}
if command.Path != executable || command.WindowTitle != "Demo" ||
len(command.Args) != 1 || command.Args[0] != "--demo" {
t.Fatalf("command = %#v", command)
}
}