Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Expose backend discovery/capabilities for workspace.runtime.exec

Aperta
#50 5 commenti 0 reazioni 0 assegnatari Vedi su GitHub

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

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

enhancement

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

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di cloudflare/computer

Tutte le issue di cloudflare/computer

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.