Skip to content

feat: add view field and list and get task requests (#2010) - #2399

Merged
darrelmiller merged 11 commits into
dev-1.1from
feat/get-task-include-artifacts
Dec 1, 2026
Merged

darrelmiller merged 11 commits into
dev-1.1from
feat/get-task-include-artifacts

Conversation

@yarolegovich

@yarolegovich yarolegovich commented Oct 27, 2026 •

Copy link
Copy Markdown
Member

Clients polling a task after SendMessage with return_immediately have no way to skip artifacts on GetTask, so every poll can carry the full artifact payload. A plain bool defaulting to false keeps today's behavior (artifacts included) for every client and SDK, including those that ignore field presence.

Closes #2010

@yarolegovich
yarolegovich requested a review from a team as a code owner October 27, 2026 16:07
@Tehsmash Tehsmash changed the title feat: add include_artifacts to GetTaskRequest (#2010) feat: add exclude_artifacts to GetTaskRequest (#2010) Nov 3, 2026
@Tehsmash Tehsmash linked an issue Nov 3, 2026 that may be closed by this pull request
1 task done
Clients polling a task after SendMessage with return_immediately have no
way to skip artifacts on GetTask, so every poll can carry the full artifact
payload. Reuse the include_artifacts name from ListTasksRequest, relying on
field presence so an unset value keeps today's behavior (artifacts included).
A plain bool whose zero value means "include artifacts" keeps today's
GetTask behavior for clients and SDKs that ignore field presence, which
an optional include_artifacts defaulting to true does not guarantee.
@Tehsmash
Tehsmash force-pushed the feat/get-task-include-artifacts branch from e206be2 to cd135f0 Compare November 3, 2026 12:31

@sugandhrakha sugandhrakha left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.
Approving based on the TSC review meeting.

@herczyn

herczyn commented Nov 3, 2026

Copy link
Copy Markdown
Member

discussed during the TSC, the consensus seems to be:

  • remove timeline_length (added during 1.1 so safe to delete)
  • add view field to get/list tasks with possible values: full/metadata. if not set act in the current way for backwards compat, if set: full has all fields, metadata - everything except artifacts/history/timeline/something added in the future
    this does mean that the current behaviour for list will not be covered by any of the views (+history -timeline -artifacts), but we need to live with this for compat

…stTasks

Applies the TSC consensus on #2399. A `view` field on GetTaskRequest and
ListTasksRequest selects the returned Task fields: TASK_VIEW_FULL returns
everything, TASK_VIEW_METADATA omits artifacts, history and timeline (and
may omit future additions). Leaving `view` unset keeps each method's
existing behavior for compatibility, which for ListTasks (history, no
timeline, artifacts only via include_artifacts) matches no view.

timeline_length is removed from SendMessageConfiguration, GetTaskRequest
and ListTasksRequest: it was added during 1.1 and never released. Its field
numbers are reserved so pre-release implementations cannot misread them.
No code was generated from the 1.1 draft protos, so timeline_length is
removed outright and `view` takes its field numbers. The spec text is cut
down to what readers need.
@yarolegovich yarolegovich changed the title feat: add exclude_artifacts to GetTaskRequest (#2010) feat: add view field and list and get task requests (#2010) Nov 3, 2026
Comment thread specification/a2a.proto Resolved
Comment thread specification/a2a.proto Resolved
Comment thread docs/specification.md Resolved
Comment thread specification/a2a.proto Resolved
Comment thread specification/a2a.proto Resolved
polchernikova-w added a commit to a2aproject/a2a-go that referenced this pull request Nov 29, 2026
…re types (#642)

Target: `release/v1.1`

Part of the A2A v1.1 work see the implementation breakdowns for
[generation +
timeline](#612) and
[bidi live](#619). This
PR contains core types only, no behavior changes.

This PR addresses the following from the [v1.1
spec](https://github.com/a2aproject/A2A/blob/dev-1.1/docs/specification.md):

- [§3.2.7 Task Generation
Semantics](https://github.com/a2aproject/A2A/blob/dev-1.1/docs/specification.md#327-task-generation-semantics):
`Task.Generation`, and `Generation` on `TaskStatusUpdateEvent` and
`TaskArtifactUpdateEvent`.
- [§3.2.8 Task Timeline
Semantics](https://github.com/a2aproject/A2A/blob/dev-1.1/docs/specification.md#328-task-timeline-semantics),
[§4.1.8
TimelineEntry](https://github.com/a2aproject/A2A/blob/dev-1.1/docs/specification.md#418-timelineentry),
[§4.1.7
Artifact](https://github.com/a2aproject/A2A/blob/dev-1.1/docs/specification.md#417-artifact):
`Task.Timeline`, `TimelineEntry` (entries of unknown kinds are kept with
only their generation), `Artifact.StartGeneration` / `EndGeneration`.
- [§3.2.8 Task Timeline Semantics,
Timestamps](https://github.com/a2aproject/A2A/blob/dev-1.1/docs/specification.md#328-task-timeline-semantics)
([A2A#2426](a2aproject/A2A#2426)):
`Task.CreatedAt` / `UpdatedAt` ([§4.1.1
Task](https://github.com/a2aproject/A2A/blob/dev-1.1/docs/specification.md#411-task)),
`Artifact.UpdatedAt` ([§4.1.7
Artifact](https://github.com/a2aproject/A2A/blob/dev-1.1/docs/specification.md#417-artifact)),
`TimelineEntry.Timestamp` ([§4.1.8
TimelineEntry](https://github.com/a2aproject/A2A/blob/dev-1.1/docs/specification.md#418-timelineentry)),
`Timestamp` on `TaskStatusUpdateEvent`
([§4.2.1](https://github.com/a2aproject/A2A/blob/dev-1.1/docs/specification.md#421-taskstatusupdateevent))
and `TaskMessageUpdateEvent`
([§4.2.3](https://github.com/a2aproject/A2A/blob/dev-1.1/docs/specification.md#423-taskmessageupdateevent)).
`TaskStatus.Timestamp` ([§4.1.2
TaskStatus](https://github.com/a2aproject/A2A/blob/dev-1.1/docs/specification.md#412-taskstatus))
and `ListTasksRequest.StatusTimestampAfter` ([§3.1.4 List
Tasks](https://github.com/a2aproject/A2A/blob/dev-1.1/docs/specification.md#314-list-tasks))
are marked `Deprecated`.
- [§4.2.3
TaskMessageUpdateEvent](https://github.com/a2aproject/A2A/blob/dev-1.1/docs/specification.md#423-taskmessageupdateevent):
`TaskMessageUpdateEvent`, `NewMessageUpdateEvent`, and the
`messageUpdate` case of `StreamResponse`.
- [§3.2.2
SendMessageConfiguration](https://github.com/a2aproject/A2A/blob/dev-1.1/docs/specification.md#322-sendmessageconfiguration):
`SendMessageConfig.IfGenerationMatch`.
- [§3.1.3 Get
Task](https://github.com/a2aproject/A2A/blob/dev-1.1/docs/specification.md#313-get-task):
`GetTaskRequest.CurrentGeneration`.
- [§3.1.6 Subscribe to
Task](https://github.com/a2aproject/A2A/blob/dev-1.1/docs/specification.md#316-subscribe-to-task):
`SubscribeToTaskRequest.LastSeenGeneration`.
- [§3.3.2 Error
Handling](https://github.com/a2aproject/A2A/blob/dev-1.1/docs/specification.md#332-error-handling):
`ErrTaskGenerationMismatch` (`TASK_GENERATION_MISMATCH`).
- [§3.2.4 History Length
Semantics](https://github.com/a2aproject/A2A/blob/dev-1.1/docs/specification.md#324-history-length-semantics):
`Task.History` and `HistoryLength` on all requests are marked
`Deprecated`.
- Task View from [A2A#2399](a2aproject/A2A#2399)
(not merged yet): `TaskView` (`TASK_VIEW_FULL`, `TASK_VIEW_SUMMARY`),
`View` on `GetTaskRequest` and `ListTasksRequest`, `TaskView` on
`SendMessageConfig`. `ListTasksRequest.IncludeArtifacts` is marked
`Deprecated`, and the `HistoryLength` deprecation notes point to `View`
/ `TaskView`.

Generation fields use the new `TaskGeneration` type. It encodes as a
ProtoJSON `int64` (a decimal string) and decodes from both strings and
numbers. The encoding sits on the field type, not on the structs, so
integrator structs that embed SDK types keep encoding their own fields.

The 6 new timestamp fields use the new `Timestamp` type (`struct{
time.Time }`) the same way. Embedding keeps all `time.Time` methods, and
`Equal(Timestamp)` makes `cmp` work. Two existing timestamps keep the
old way: `TaskStatus.Timestamp` and
`ListTasksRequest.StatusTimestampAfter` stay `*time.Time` with their
per-struct `MarshalJSON` from #452, because changing their type would
break users. Both are deprecated in v1.1 and removed in 2.0, so after
that `Timestamp` is the only timestamp type. On the wire all timestamps
look the same.

Backward compatibility: only new fields, types and an error are added.
All new fields are optional and omitted when empty, so requests and
responses are unchanged.
polchernikova-w added a commit to a2aproject/a2a-go that referenced this pull request Nov 29, 2026
… transports (#646)

Depends on #644. Part of the A2A v1.1 work on `release/v1.1`.

Carries the v1.1 core types over gRPC and REST, and maps the new error
on every transport. No behavior changes: the SDK does not set or use the
new fields yet.

This PR addresses the following from the [v1.1
spec](https://github.com/a2aproject/A2A/blob/dev-1.1/docs/specification.md):

-
[§3.2.7](https://github.com/a2aproject/A2A/blob/dev-1.1/docs/specification.md#327-task-generation-semantics),
[§3.2.8](https://github.com/a2aproject/A2A/blob/dev-1.1/docs/specification.md#328-task-timeline-semantics),
[§4.2.3](https://github.com/a2aproject/A2A/blob/dev-1.1/docs/specification.md#423-taskmessageupdateevent):
pbconv maps generation, timeline, timestamps, artifact start/end
generation, and the `messageUpdate` stream payload in both directions.
-
[§3.2.2](https://github.com/a2aproject/A2A/blob/dev-1.1/docs/specification.md#322-sendmessageconfiguration),
[§3.1.3](https://github.com/a2aproject/A2A/blob/dev-1.1/docs/specification.md#313-get-task),
[§3.1.6](https://github.com/a2aproject/A2A/blob/dev-1.1/docs/specification.md#316-subscribe-to-task),
Task View ([A2A#2399](a2aproject/A2A#2399)):
pbconv maps `ifGenerationMatch`, `taskView`, `currentGeneration`,
`view`, `lastSeenGeneration`.
- [§11.5 Query Parameter
Naming](https://github.com/a2aproject/A2A/blob/dev-1.1/docs/specification.md#115-query-parameter-naming-for-request-parameters):
REST client and server pass `currentGeneration`, `view` and
`lastSeenGeneration` as query params; the REST stream parser reads
`messageUpdate`.
- [§5.4 Error Code
Mappings](https://github.com/a2aproject/A2A/blob/dev-1.1/docs/specification.md#54-error-code-mappings):
`ErrTaskGenerationMismatch` maps to JSON-RPC `-32010`, gRPC `ABORTED`,
HTTP `409`, and is added to the errors whose message the server returns
to clients.

Backward compatibility: with 1.0 peers nothing changes on the wire. Our
server never sets the new fields, so proto3 and JSON omit them, and 1.0
clients never send the new params. One edge case: a gRPC `ABORTED`
without A2A error details now maps to `ErrTaskGenerationMismatch`
instead of `ErrInternalError` (same code-only fallback as the other
mappings). 1.0 servers do not return `ABORTED`.
@darrelmiller
darrelmiller merged commit 304b996 into dev-1.1 Dec 1, 2026
3 checks passed
@darrelmiller
darrelmiller deleted the feat/get-task-include-artifacts branch December 1, 2026 17:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feat]: Add excludeArtifacts bool to GetTask request

5 participants