save_code: write the generated script to a file instead of round-tripping it through context
I maintainer di solito rispondono entro 2 giorni
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- Mezza giornata
- Idoneità per principianti
- 65/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- nodejs, typescript
- Ambito
- tooling
Direzione di ricerca
Start from the handler that serves the wdio://session/current/code resource and the {sessionId} template, since save_code must produce the same text; then look at how existing tools are registered and how they resolve the current session. Implement save_code({ path, session? }) so it writes that text with the filesystem API and returns path, line count and step count, with a description noting it only works over stdio. Done when a test writes a script to a temp path and asserts the returned counts; see #178 for the related opt-in file output idea.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Target: main. Standalone: does not wait on #178 or #184.
Problem. To get the generated WebdriverIO script into the user's project, an agent reads wdio://session/current/code (or the {sessionId} template) into its context, then writes the same text out with its own file tool. That pays for the script twice in tokens, and long scripts risk transcription errors. Anthropic's "code execution with MCP" article gives this exact pattern (read a document in, write it back out) as the main waste of passing data through the model.
Proposal. A save_code tool: save_code({ path, overwrite?, session? }) writes the script generated by src/recording/code-generator.ts for the current (or named) session to path and returns the path, the line count and the number of steps. It is session-targeted, not sessionless.
Only meaningful when the server and the agent share a filesystem (stdio). Under --http the path is on the server's disk, and the description should say so.
Related: #178 (opt-in file output for large tool results) is a different case: that one writes tool output, this one writes the session's code.
Acceptance
pathmay be absolute or relative to the server's working directory; the result always reports the resolved absolute path.- Refuses to overwrite an existing file unless
overwrite: true. - Returns path, lines and steps.
- Session-targeted (routed through
withSessionTarget).
- Lingua principale
- TypeScript
- Stelle
- 45
- Fork
- 20
- Merge medio
- 2g 9h
- PR unite (30g)
- 16
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Nessuna guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di webdriverio/mcp
-
Issue templates with a required 'MCP client' fieldForse già presa @Winify l’ha presa 4 giorni fa. Apertaenhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
webdriverio/mcp#208 ·
I maintainer di solito rispondono entro 2 giorni
-
v5: record per-step code from the @wdio/session agent history and drop MCP's per-action templatesAperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 30/100
webdriverio/mcp#214 ·
I maintainer di solito rispondono entro 2 giorni
-
Generated code skips switch_context, rotate_device, hide_keyboard, switch_tab and emulate_deviceForse già presa @VB-Blue l’ha presa 2 giorni fa. Aperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 78/100
webdriverio/mcp#213 ·
I maintainer di solito rispondono entro 2 giorni
-
WDIO_MCP_TOOLS=code: a fixed code-mode tool set (session, navigate, snapshot, query_docs, run_code)Apertaenhancement
Difficoltà 4/5 3-5 giorni Idoneità per principianti 22/100
webdriverio/mcp#212 ·
I maintainer di solito rispondono entro 2 giorni
-
bug
Difficoltà 3/5 1-2 giorni Idoneità per principianti 48/100
webdriverio/mcp#209 · 1 commento ·
I maintainer di solito rispondono entro 2 giorni
Tutte le issue di webdriverio/mcp
Issue simili
-
Postgres upgrade golden leaves fixture URL query parameters in the expected output comparisonAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
garrytan/gbrain#10437 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Bedrock "Too many tokens" throttle is not auto-retried, unlike "Too many requests"Forse già presa @acmerfight l’ha presa oggi. Apertauntriaged
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
earendil-works/pi#12573 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
agentes-chat/agentes-chat#1506 ·
I maintainer di solito rispondono entro 1 giorno
-
comp/desktop desktop/files os/windows P2 type/perf
Difficoltà 2/5 1-3 ore Idoneità per principianti 80/100
NousResearch/hermes-agent#160359 ·
I maintainer di solito rispondono entro 1 giorno
-
Missing repro Platform: Android
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
software-mansion/react-native-reanimated#11554 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno