Skip to content

Commit 92304cc

Browse files
committed
chore: Add lastUpdatedAt to Task
1 parent 36a1cb5 commit 92304cc

File tree

4 files changed

+20
-1
lines changed

4 files changed

+20
-1
lines changed

docs/specification/draft/basic/utilities/tasks.mdx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,7 @@ To create a task, requestors send a request with the `task` field included in th
160160
"status": "working",
161161
"statusMessage": "The operation is now in progress.",
162162
"createdAt": "2025-11-25T10:30:00Z",
163+
"lastUpdatedAt": "2025-11-25T10:40:00Z",
163164
"ttl": 60000,
164165
"pollInterval": 5000
165166
}
@@ -219,6 +220,7 @@ Requestors **SHOULD** continue polling until the task reaches a terminal status
219220
"status": "working",
220221
"statusMessage": "The operation is now in progress.",
221222
"createdAt": "2025-11-25T10:30:00Z",
223+
"lastUpdatedAt": "2025-11-25T10:40:00Z",
222224
"ttl": 30000,
223225
"pollInterval": 5000
224226
}
@@ -291,6 +293,7 @@ When a task status changes, receivers **MAY** send a [`notifications/tasks/statu
291293
"taskId": "786512e2-9e0d-44bd-8f29-789f320fe840",
292294
"status": "completed",
293295
"createdAt": "2025-11-25T10:30:00Z",
296+
"lastUpdatedAt": "2025-11-25T10:50:00Z",
294297
"ttl": 60000,
295298
"pollInterval": 5000
296299
}
@@ -330,13 +333,15 @@ To retrieve a list of tasks, requestors can send a [`tasks/list`](/specification
330333
"taskId": "786512e2-9e0d-44bd-8f29-789f320fe840",
331334
"status": "working",
332335
"createdAt": "2025-11-25T10:30:00Z",
336+
"lastUpdatedAt": "2025-11-25T10:40:00Z",
333337
"ttl": 30000,
334338
"pollInterval": 5000
335339
},
336340
{
337341
"taskId": "abc123-def456-ghi789",
338342
"status": "completed",
339343
"createdAt": "2025-11-25T09:15:00Z",
344+
"lastUpdatedAt": "2025-11-25T10:40:00Z",
340345
"ttl": 60000
341346
}
342347
],
@@ -373,6 +378,7 @@ To explicitly cancel a task, requestors can send a [`tasks/cancel`](/specificati
373378
"status": "cancelled",
374379
"statusMessage": "The task was cancelled by request.",
375380
"createdAt": "2025-11-25T10:30:00Z",
381+
"lastUpdatedAt": "2025-11-25T10:40:00Z",
376382
"ttl": 30000,
377383
"pollInterval": 5000
378384
}
@@ -448,6 +454,7 @@ While this note is not prescriptive regarding the specific usage of SSE streams,
448454
### TTL and Resource Management
449455

450456
1. Receivers **MUST** include a `createdAt` [ISO 8601](https://datatracker.ietf.org/doc/html/rfc3339#section-5)-formatted timestamp in all task responses to indicate when the task was created.
457+
1. Receivers **MUST** include a `lastUpdatedAt` [ISO 8601](https://datatracker.ietf.org/doc/html/rfc3339#section-5)-formatted timestamp in all task responses to indicate when the task was last updated.
451458
1. Receivers **MAY** override the requested `ttl` duration.
452459
1. Receivers **MUST** include the actual `ttl` duration (or `null` for unlimited) in `tasks/get` responses.
453460
1. After a task's `ttl` lifetime has elapsed, receivers **MAY** delete the task and its results, regardless of the task status.
@@ -704,6 +711,7 @@ A task represents the execution state of a request. The task state includes:
704711
- `createdAt`: ISO 8601 timestamp when the task was created
705712
- `ttl`: Time in milliseconds from creation before task may be deleted
706713
- `pollInterval`: Suggested time in milliseconds between status checks
714+
- `lastUpdatedAt`: ISO 8601 timestamp when the task status was last updated
707715

708716
### Task Status
709717

@@ -842,6 +850,7 @@ When the underlying request does not complete successfully, the task moves to th
842850
"taskId": "786512e2-9e0d-44bd-8f29-789f820fe840",
843851
"status": "failed",
844852
"createdAt": "2025-11-25T10:30:00Z",
853+
"lastUpdatedAt": "2025-11-25T10:40:00Z",
845854
"ttl": 30000,
846855
"statusMessage": "Tool execution failed: API rate limit exceeded"
847856
}

docs/specification/draft/schema.mdx

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

schema/draft/schema.json

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

schema/draft/schema.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1360,6 +1360,11 @@ export interface Task {
13601360
*/
13611361
createdAt: string;
13621362

1363+
/**
1364+
* ISO 8601 timestamp when the task was last updated.
1365+
*/
1366+
lastUpdatedAt: string;
1367+
13631368
/**
13641369
* Actual retention duration from creation in milliseconds, null for unlimited.
13651370
*/

0 commit comments

Comments
 (0)