Skip to content

Add workDoneProgress protocol support#2

Merged
christiankissig merged 1 commit into
masterfrom
add-work-done-progress
Jun 3, 2026
Merged

Add workDoneProgress protocol support#2
christiankissig merged 1 commit into
masterfrom
add-work-done-progress

Conversation

@christiankissig

Copy link
Copy Markdown
Owner

Summary

Adds the Work Done Progress data types from LSP 3.17 to protocol.py:

  • WorkDoneProgressBegin / WorkDoneProgressReport / WorkDoneProgressEnd — the value payloads carried by $/progress notifications, each with a literal kind discriminator (begin/report/end).
  • WorkDoneProgressOptions — the workDoneProgress?: boolean server capability marker.
  • WorkDoneProgressCreateRequest (window/workDoneProgress/create, server→client) and WorkDoneProgressCancelNotification (window/workDoneProgress/cancel, client→server), with their …Params token models.
  • ProgressToken alias (int | str), now shared by ProgressParams and the new params.

The pre-existing WorkDoneProgressParams mixin (workDoneToken) is now also exported from the package root.

All new types follow the existing conventions: BaseModel payloads, BaseRequest/BaseNotification subclasses that hard-code method in __init__ and accept a typed params model (dumped with exclude_none=True), exported via __init__.py.

Testing

  • 7 new protocol tests (26 total) covering each payload's serialization and the create/cancel message shapes.
  • ruff check, ruff format --check, mypy, and full pytest (26 passed) all pass locally.

🤖 Generated with Claude Code

Implements the Work Done Progress data types from LSP 3.17:

- WorkDoneProgressBegin / Report / End — the `value` payloads carried
  by `$/progress` notifications, with a `kind` discriminator.
- WorkDoneProgressOptions — server capability marker.
- WorkDoneProgressCreateRequest (`window/workDoneProgress/create`) and
  WorkDoneProgressCancelNotification (`window/workDoneProgress/cancel`),
  plus their token params.
- ProgressToken alias (int | str) shared by progress/work-done params.

Exports the new types from the package root and adds protocol tests.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@christiankissig christiankissig merged commit 4a5af5d into master Jun 3, 2026
7 checks passed
@christiankissig christiankissig deleted the add-work-done-progress branch June 3, 2026 16:55
christiankissig added a commit that referenced this pull request Jul 7, 2026
Implements the Work Done Progress data types from LSP 3.17:

- WorkDoneProgressBegin / Report / End — the `value` payloads carried
  by `$/progress` notifications, with a `kind` discriminator.
- WorkDoneProgressOptions — server capability marker.
- WorkDoneProgressCreateRequest (`window/workDoneProgress/create`) and
  WorkDoneProgressCancelNotification (`window/workDoneProgress/cancel`),
  plus their token params.
- ProgressToken alias (int | str) shared by progress/work-done params.

Exports the new types from the package root and adds protocol tests.
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.

1 participant