
ggoggam/vitre
Developer tools이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요. 원문 보기
Kotlin 멀티플랫폼을 위한 WebView 자동화. Android, iOS, 데스크톱에서 임베디드 WebView에서 페이지 워크플로우를 앱, 테스트, 또는 MCP 또는 Koog를 통한 LLM 에이전트를 통해 실행할 수 있습니다.
개요
페이지에 원하는 작업을 단계별 목록으로 설명한 후, Android, iOS, 데스크톱에서 임베디드 WebView 안에서 실행하세요: 앱에서, 테스트에서, 또는 모델 컨텍스트 프로토콜이나 Koog를 통한 LLM 에이전트에서 실행할 수 있습니다. 동일한 어휘는 네 가지 방식으로 제공됩니다: 위의 Kotlin DSL처럼, 화면에 던져지는 Compose 컴포저블, 그리고 페이지를 본 적 없는 에이전트를 위한 MCP 도구나 Koog 도구로도 사용할 수 있습니다. 이 두 가지는 하나의 의미론 집합을 두 가지 구현한 형태로 전달한 것입니다. 이 블록은 스크립트가 아니라 빌더입니다. 한 번, 처음에 실행되어 WorkflowEngine이 이동하는 단계 목록을 조립하므로, 내부 일반 Kotlin이 워크플로우에 포함된 내용을 선택합니다. 결정이 런에 속할 때는 — 가끔만 존재하는 요소, 이전 단계에서 추출한 값 — runIf가 해당 단계를 덧붙여 페이지에 대해 평가합니다.
개요(AI 번역)
Kotlin 멀티플랫폼용 WebView 자동화. 페이지에 대해 원하는 작업을 다음과 같이 설명하세요 단계별 단계를 거쳐 Android, iOS, 데스크톱에서 임베디드 WebView 안에서 실행합니다: 앱에서, 테스트 또는 모델 컨텍스트 프로토콜(Koog)을 통한 LLM 에이전트가 수행하는 경우도 있습니다.
같은 어휘는 네 가지 방식으로 제공됩니다: 위의 Kotlin DSL처럼, Compose 조합 가능한 경우, 화면에 드롭되고, 한 번도 페이지를 본 적 없는 에이전트에게는 MCP 도구나 Koog 도구로 사용할 수 있습니다. 마지막 두 개는 두 가지 구현이 아니라 하나의 의미론 집합을 두 번 전달한 것입니다.
블록은 스크립트가 아니라 빌더입니다. 한 번, 처음에 실행되어 다음 단계별 목록을 조립합니다.
WorkflowEngine는 이동하므로, 일반 Kotlin if가 워크플로우가 포함하는 내용을 선택합니다.
결정이 런에 속할 때, 즉 가끔만 존재하는 요소, 값
이전에 추출한 단계 — runIf는 엔진이 페이지에 대해 평가하는 단계를 추가합니다. 그
WorkflowStep 구성자는 공개적이고 동등하게 유지됩니다; 이들은 vitre-mcp가 사용하는 것입니다.
에이전트의 스텝은 Kotlin 대신 JSON 형태로 도착합니다.
왜
이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요.
README
원문 README의 일부입니다. 원문 보기.
Vitre
WebView automation for Kotlin Multiplatform. Describe what you want done to a page as a list of steps, then run it inside an embedded WebView on Android, iOS and the desktop: from your app, from a test, or from an LLM agent over the Model Context Protocol or Koog.
val workflow = workflow("hn-top-story", "Hacker News top story") {
navigate("https://news.ycombinator.com/")
waitFor(".titleline > a", timeoutMs = 15_000)
extract(".titleline > a", into = "headline")
extract(".titleline > a", into = "url", from = Source.Attribute("href"))
}
WorkflowEngine(controller).run(workflow).collect { event ->
if (event is WorkflowEvent.Completed) println(event.variables["headline"])
}
The same vocabulary is available four ways: as the Kotlin DSL above, as a Compose composable you drop into a screen, and, for an agent that has never seen the page, as MCP tools or as Koog tools. Those last two are two deliveries of one set of semantics rather than two implementations of them.
The block is a builder rather than a script. It runs once, up front, to assemble the step list that
WorkflowEngine then walks, so ordinary Kotlin if inside it chooses what the workflow contains.
When the decision belongs to the run instead — an element that is only sometimes there, a value an
earlier step extracted — runIf appends a step the engine evaluates against the page. The
WorkflowStep constructors remain public and equivalent; they are what vitre-mcp uses, since
an agent’s steps arrive as JSON rather than as Kotlin.
Why
Mobile apps already embed WebViews, and everything people want to do with them (read a page, fill a
form, talk to the page’s own script, scrape a table, run four sites at once) ends up as one-off
evaluateJavascript calls glued to a callback. Those calls race each other, they race the UI, and
none of it is shared between Android, iOS and the desktop.
Vitre makes the page something you can drive: one ordering guarantee, one step vocabulary, one codebase for every platform, and a snapshot format an agent can read.
- The steps are declarative:
Navigate,LoadHtml,WaitFor,Click,Input,Extract,ExtractRows,Snapshot,EvaluateJs,PostMessage,AwaitMessage,Iffor the branches the page decides rather than the builder, andForEachto visit every page an earlier step found — search results in, one product page each out. - Elements are addressed three ways: CSS, XPath, and handles issued by a page snapshot.
evaluateJsreturns a script’s result JSON-encoded on every platform, so
설치
This server does not publish a one-line install command.
Open the repository installation guide MCP 초보자라면? mcpskill.org 가이드부터 시작하세요 →