Some checks failed
PR Check / check (pull_request) Failing after 33s
New feature: give Studio's AI control of any browser tab to test buttons,
read the console, and report which buttons work / fail.
Backend (internal/api/browser_test.go, ~480 LOC):
- WebSocket endpoint /api/ws/browser-test, auth by single-use 5-min token
- BrowserTestStore: session map (capped at 16, LRU evict), token store
- REST: /api/test/snippet (issues token + JS snippet), /api/test/sessions,
/api/test/console/{id}
- Agent tool 'browser_test' wired into the registry, with actions:
list_clickables / click / eval / console / current_url / type / wait /
summary. click returns the console_delta produced during the click.
- Embedded JS runner: opens WS, hooks console + window.onerror +
unhandledrejection, dispatches dispatcher commands, replies with
correlation IDs, watches for URL changes.
Frontend:
- New Tests tab (web/src/components/Tests.jsx): snippet copy + connected
sessions list + live console viewer
- App.jsx: 5th tab + Ctrl+4 shortcut (Config moves to Ctrl+5)
- api/client.js: getTestSnippet / getTestSessions / getTestConsole
Studio prompt:
- internal/agent/prompts/studio_system.md: added browser_test entry to the
tools table + <browser_test_strategy> section explaining the recommended
loop (summary → list_clickables → click → check console_delta → report)
Versioning:
- v0.6.0 → v0.7.0
- CHANGELOG.md: full entry under v0.7.0
34 lines
670 B
Go
34 lines
670 B
Go
package version
|
|
|
|
import (
|
|
"fmt"
|
|
"runtime"
|
|
)
|
|
|
|
const (
|
|
Name = "muyue"
|
|
Version = "0.7.0"
|
|
Author = "La Légion de Muyue"
|
|
)
|
|
|
|
var (
|
|
// BuildDate is set at build time
|
|
BuildDate = ""
|
|
)
|
|
|
|
func FullVersion() string {
|
|
return Name + " v" + Version
|
|
}
|
|
|
|
// FullInfo returns full version information.
|
|
func FullInfo() string {
|
|
info := fmt.Sprintf("%-12s %s\n", "Version:", Version)
|
|
info += fmt.Sprintf("%-12s %s\n", "Author:", Author)
|
|
info += fmt.Sprintf("%-12s %s\n", "Go:", runtime.Version())
|
|
info += fmt.Sprintf("%-12s %s\n", "Platform:", runtime.GOOS+"/"+runtime.GOARCH)
|
|
if BuildDate != "" {
|
|
info += fmt.Sprintf("%-12s %s\n", "Build:", BuildDate)
|
|
}
|
|
return info
|
|
}
|