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

tasks/get examples under "Task Execution Errors" use "resultType": "task"; prose and schema require "complete"

Aperta Adatta ai principianti
#23 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
1/5
Tempo stimato
Meno di un'ora
Idoneità per principianti
95/100
Tipo di issue
Documentazione
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
markdown, typescript
Ambito
documentation

Direzione di ricerca

L'issue indica due righe specifiche in specification/2026-07-28/tasks.md e specification/draft/tasks.md in cui gli esempi utilizzano erroneamente "resultType": "task". La correzione consiste nel modificarli in "resultType": "complete" come mostrato nel diff. Verificare le modifiche controllando gli esempi circostanti e il testo normativo. Eseguire eventuali script di linting o validazione della documentazione se presenti.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

What's wrong

Two example responses in Task Execution Errors show a tasks/get result with "resultType": "task":

  • specification/2026-07-28/tasks.md:846, in "Example: Task with JSON-RPC execution error"
  • specification/2026-07-28/tasks.md:870, in "Example: Tool call completed with tool error (isError: true)"

specification/draft/tasks.md has the same text at the same line numbers.

Both are tasks/get responses. The section says so (tasks.md:835: "The tasks/get response SHOULD include a statusMessage…"), and the text after the second example calls it "The tasks/get endpoint" (:889).

The normative text says the opposite:

  • tasks.md:338: "The resultType field MUST be set to "complete" on this object as it is the standard result shape for the tasks/get request."
  • tasks.md:102: "Servers MUST NOT set resultType to "task" on result types other than CreateTaskResult."
  • schema/2026-07-28/schema.ts:224 and schema/draft/schema.ts:224: GetTaskResult has resultType: "complete";.

The other tasks/get examples in the same file already use "complete" (:577, :610, :655, :733, :762).

Why it matters

Implementers copy examples. A client that switches on resultType and treats "task" as "this is a CreateTaskResult, start polling" would handle a terminal tasks/get response as a new task handle. A server built from these examples would break the MUST at :338.

Suggested fix (docs only)
--- a/specification/2026-07-28/tasks.md
+++ b/specification/2026-07-28/tasks.md
@@ -843,7 +843,7 @@
   "jsonrpc": "2.0",
   "id": 4,
   "result": {
-    "resultType": "task",
+    "resultType": "complete",
     "taskId": "786512e2-9e0d-44bd-8f29-789f820fe840",
     "status": "failed",
@@ -867,7 +867,7 @@
   "jsonrpc": "2.0",
   "id": 5,
   "result": {
-    "resultType": "task",
+    "resultType": "complete",
     "taskId": "786512e2-9e0d-44bd-8f29-789f820fe840",
     "status": "completed",

Apply the same two changes to specification/draft/tasks.md (same line numbers). Nothing normative changes.

Lingua principale
TypeScript
Stelle
46
Fork
9
Merge medio
14g 1h
PR unite (30g)
1

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 modelcontextprotocol/ext-tasks

Tutte le issue di modelcontextprotocol/ext-tasks

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.