Expose backend discovery/capabilities for workspace.runtime.exec
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 35/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Tranquilla
- Stack tecnologico
- typescript
- Ambito
- api, backend-api-design
Direzione di ricerca
Inizia dalle sezioni del README che descrivono workspace.runtime.exec e i backend registrati, quindi segui l’entry point di workspace.runtime.exec. Chiarisci se la discovery debba enumerare i backend, descrivere la compatibilità del sorgente, segnalare lo stato di disponibilità o fare tutte e tre le cose. Done dovrebbe includere un’API concordata con copertura per i backend registrati e la documentazione che mostri come i chiamanti scelgono un backend compatibile.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
I was reading through the README and trying to think about how an agent would safely choose between registered backends. workspace.runtime.exec(source, { backend }) is a nice single entry point, but the README notes that the selected backend determines whether source is a shell command or an ECMAScript module.
From the caller's perspective, it looks like you need to already know that one backend ID is shell-like and another is JS-like. If a Workspace has multiple backends registered, there doesn't seem to be a documented way to ask the runtime what backends exist, whether they're connected/lazy, or what kind of source/result they accept.
This becomes a papercut when the caller is an agent or a generic UI: it can easily pick a backend ID and pass the wrong source type, then fail only when the backend connects/executes. A small introspection API would make this much easier to use, something like:
const backends = await workspace.runtime.listBackends();
// [{ id: 'container', kind: 'shell', ready: false }, { id: 'js', kind: 'module', ready: true }]
or even just:
const info = await workspace.runtime.describeBackend('container');
if (info.source === 'shell') { ... }
That would also give a natural place to expose backend-specific limits later, such as network access, filesystem write access, or allowed imports, without changing exec itself. If this already exists somewhere, it might be worth calling it out in the README because it's key to using multiple backends safely.
- Lingua principale
- TypeScript
- Stelle
- 9.2k
- Fork
- 525
- Merge medio
- 3g 12h
- PR unite (30g)
- 18
Guida per i contributori
Apri la 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 cloudflare/computer
-
enhancement
cloudflare/computer#129 · 1 assegnatario ·
-
bug
Difficoltà 3/5 1-2 giorni Idoneità per principianti 65/100
cloudflare/computer#106 · 3 commenti ·
-
enhancement
Difficoltà 5/5 Più di una settimana Idoneità per principianti 45/100
cloudflare/computer#68 · 1 commento ·
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 45/100
cloudflare/computer#67 · 1 commento ·
-
bug
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
cloudflare/computer#52 · 3 commenti ·
Tutte le issue di cloudflare/computer
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
mksglu/context-mode#1200 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
jaegertracing/jaeger-ui#4506 ·
-
area:desktop area:ui bug platform:macos
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
anthropics/claude-code#96687 ·
-
good first issue
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 95/100
AOSSIE-Org/DebateAI#582 · 2 commenti ·