Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .claude/skills/fix/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
name: fix
description: Auto-fix all lint, formatting, and copyright header issues across the workspace. Use when validation (`/verify`) fails or when explicitly requested.
---

Run the full auto-fix suite for the GLSP Client monorepo from the repository root:

```bash
yarn lint:fix && yarn format && yarn headers:fix
```

After fixing, report what changed. If any issues remain that couldn't be auto-fixed, list them and suggest manual fixes.
23 changes: 23 additions & 0 deletions .claude/skills/verify/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
name: verify
description: Run full project validation (lint, format, copyright headers) to catch issues before committing. IMPORTANT - Proactively invoke this skill after completing any code changes (new features, bug fixes, refactors) before reporting completion to the user.
---

Run the full validation suite for the GLSP Client monorepo from the repository root:

```bash
yarn check:all
```

In a parallel task, run the test suite to ensure all tests pass:

```bash
yarn test
```

On failure:

1. Report which checks/tests failed and the specific errors
2. If checks failed, auto-fix by invoking the `/fix` skill
3. In case of previous test failures, re-run the `yarn test` command to confirm all tests now pass
4. Re-run `yarn check:all` to confirm everything passes
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
with:
node-version: 20.x
node-version: 22.x
- name: Build
run: yarn install
- name: Check for uncommitted changes in yarn.lock
Expand All @@ -36,7 +36,7 @@ jobs:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
with:
node-version: 20.x
node-version: 22.x
- name: Install
run: |
yarn install
Expand All @@ -58,7 +58,7 @@ jobs:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
with:
node-version: 20.x
node-version: 22.x
- name: Install
run: |
yarn install
Expand All @@ -79,7 +79,7 @@ jobs:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
with:
node-version: 20.x
node-version: 22.x
- name: Install
run: |
yarn install
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
path: 'glsp-playwright'
- uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
with:
node-version: '20'
node-version: '22'
- name: Install dependencies
run: |
cd glsp-client
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ jobs:
- uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
if: steps.check_changes.outputs.should_publish == 'true'
with:
node-version: 20.x
node-version: 22.x
registry-url: 'https://registry.npmjs.org'

- name: Build
Expand Down
1 change: 1 addition & 0 deletions .mocharc
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"$schema": "https://json.schemastore.org/mocharc",
"extends": "@eclipse-glsp/mocha-config",
"node-option": ["no-experimental-strip-types"],
"require": [
"ts-node/register",
"tsconfig-paths/register",
Expand Down
56 changes: 16 additions & 40 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -1,50 +1,26 @@
# Repository Guidelines
# CLAUDE.md

## Project Structure & Module Organization
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

This repository is a Yarn workspaces/Lerna monorepo.
## Project Overview

- `packages/client`: main GLSP client framework (`src/`, `css/`, unit tests as `*.spec.ts`).
- `packages/protocol`: client-server protocol types and JSON-RPC helpers.
- `packages/glsp-sprotty`: GLSP-specific sprotty re-exports/overrides.
- `examples/workflow-standalone`: browser demo app and example server launcher.
- `examples/workflow-glsp`: workflow diagram example package used by the standalone app.
Eclipse GLSP Client monorepo. Provides the sprotty-based client framework for the Graphical Language Server Platform (GLSP). Contains the core client packages and example applications. Uses Lerna with Yarn workspaces.

Keep new code inside the relevant package `src/` folder and colocate tests with implementation.
## Build & Development

## Build, Test, and Development Commands
- **Package manager**: Yarn 1.x (classic) — do not use Yarn 2+/Berry or npm
- **Build**: `yarn` from root installs and compiles everything
- **Clean**: `yarn clean`

Use Node `>=20` and Yarn `>=1.7.0 <2`.
## Validation

- `yarn install`: install all workspace dependencies.
- `yarn build`: compile TypeScript and bundle the standalone example.
- `yarn compile`: run TypeScript project builds only.
- `yarn lint`: run ESLint on `.ts/.tsx` sources.
- `yarn test`: run package test suites via Lerna.
- `yarn test:coverage`: generate coverage with `nyc` per package.
- `yarn watch`: run TypeScript/watch build flows.
- `yarn start:exampleServer`: download/start workflow example server.
- **Tests**: `yarn test` (Mocha), single test: `yarn test --grep 'test name'`

## Coding Style & Naming Conventions
## Inter-Package Import Rules

Code is TypeScript-first, formatted by Prettier (`@eclipse-glsp/prettier-config`) and linted by ESLint (`@eclipse-glsp`).
These are enforced by ESLint and are easy to get wrong:

- Follow existing formatting (4-space indentation, semicolons, single quotes).
- Use `PascalCase` for classes/types, `camelCase` for functions/variables.
- Use descriptive module filenames in kebab-case where established (e.g., `command-palette-tool.ts`).
- Prefer GLSP re-exports (`@eclipse-glsp/client`) instead of direct `sprotty` imports.

## Testing Guidelines

- Framework: Mocha with `ts-node` (`.mocharc` at repo root).
- Test files: `*.spec.ts` or `*.spec.tsx`, typically next to source files.
- Run targeted tests from a package, e.g. `yarn --cwd packages/client test`.
- Run `yarn test` and `yarn test:coverage` before opening a PR.

## Commit & Pull Request Guidelines

- Open/track an issue first in `https://github.com/eclipse-glsp/glsp`.
- Branch naming: `issues/<issue_number>` (for committers).
- Commit messages should be imperative and focused; reference the issue using an absolute URL (for auto-close).
- PRs should include: problem statement, solution summary, linked issue, and screenshots/GIFs for UI-visible changes.
- Before requesting review, run `yarn check:all`.
- **Never use relative imports** like `../` or `../index` — use package names
- **`@eclipse-glsp/protocol`**: Must NOT import from `sprotty`, `sprotty-protocol`, or `@eclipse-glsp/client`
- **`@eclipse-glsp/sprotty`**: Must NOT import directly from `sprotty-protocol` — use `sprotty` reexports instead
- **`@eclipse-glsp/client`**: Must NOT import directly from `sprotty` or `sprotty-protocol` — use `@eclipse-glsp/sprotty` reexports instead
27 changes: 26 additions & 1 deletion CLAUDE.md
Original file line number Diff line number Diff line change
@@ -1 +1,26 @@
@AGENTS.md
# CLAUDE.md

## Project Overview

Eclipse GLSP Client monorepo. Provides the sprotty-based client framework for the Graphical Language Server Platform (GLSP). Contains the core client packages and example applications. Uses Lerna with Yarn workspaces.

## Build & Development

- **Package manager**: Yarn 1.x (classic) — do not use Yarn 2+/Berry or npm
- **Build**: `yarn` from root installs and compiles everything
- **Clean**: `yarn clean`

## Validation

- **Tests**: `yarn test` (Mocha), single test: `yarn test --grep 'test name'`
- After completing any code changes, always run the `/verify` skill before reporting completion
- If verification fails, run the `/fix` skill to auto-fix issues, then re-run `/verify`

## Inter-Package Import Rules

These are enforced by ESLint and are easy to get wrong:

- **Never use relative imports** like `../` or `../index` — use package names
- **`@eclipse-glsp/protocol`**: Must NOT import from `sprotty`, `sprotty-protocol`, or `@eclipse-glsp/client`
- **`@eclipse-glsp/sprotty`**: Must NOT import directly from `sprotty-protocol` — use `sprotty` reexports instead
- **`@eclipse-glsp/client`**: Must NOT import directly from `sprotty` or `sprotty-protocol` — use `@eclipse-glsp/sprotty` reexports instead
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,14 @@
"devDependencies": {
"@eclipse-glsp/dev": "next",
"@types/lodash": "4.14.191",
"@types/node": "20.x",
"@types/node": "22.x",
"concurrently": "^8.2.2",
"lerna": "^9.0.0",
"mocha-ctrf-json-reporter": "^0.0.9",
"typescript": "^5.9.2"
},
"engines": {
"node": ">=20",
"node": ">=22",
"yarn": ">=1.7.0 <2"
}
}
108 changes: 54 additions & 54 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -256,18 +256,18 @@
resolved "https://registry.yarnpkg.com/@discoveryjs/json-ext/-/json-ext-0.5.7.tgz#1d572bfbbe14b7704e0ba0f39b74815b84870d70"
integrity sha512-dBVuXR082gk3jsFp7Rd/JI4kytwGHecnCoTtXFb7DB6CNHp4rg5k1bhg0nWdLGLnOV71lmDzGQaLMy8iPLY0pw==

"@eclipse-glsp/cli@2.7.0-next.8+b3f9de7":
version "2.7.0-next.8"
resolved "https://registry.yarnpkg.com/@eclipse-glsp/cli/-/cli-2.7.0-next.8.tgz#3c9df4b862153981084c67394275ffb5b8fc915d"
integrity sha512-c9z6F+Z06lzXvO81iAERt68lu9BLd5gzg1cPAZyoyTEimw0vmUq6zN/vZZ19Xvjev5AWiAtRVFYGcmDzIzUEOQ==

"@eclipse-glsp/config-test@2.7.0-next.8+b3f9de7":
version "2.7.0-next.8"
resolved "https://registry.yarnpkg.com/@eclipse-glsp/config-test/-/config-test-2.7.0-next.8.tgz#ea951fc5ddab2ec0e03bbf139068740c39377449"
integrity sha512-OM0BMNHPUqx1zlfv1mo3WYDDYP7jPgTL2+5XC3kq6TPqdQNl3Ogh/QCGjfzAI+fFlC8d/pEAfC9hL2xM7k7NBQ==
dependencies:
"@eclipse-glsp/mocha-config" "2.7.0-next.8+b3f9de7"
"@eclipse-glsp/nyc-config" "2.7.0-next.8+b3f9de7"
"@eclipse-glsp/cli@2.7.0-next.10+743aad5":
version "2.7.0-next.10"
resolved "https://registry.yarnpkg.com/@eclipse-glsp/cli/-/cli-2.7.0-next.10.tgz#75cf853feb77396b534495fd50f31b26b271db0d"
integrity sha512-/r8TGvp8jE0Tdzp4Sl7QJxyGL8OmaCBOcwl6V53F6xnay9WmO/U6LNDDc4RLDXLXzNiUEFy4J2V5+nPcdTa2jg==

"@eclipse-glsp/config-test@2.7.0-next.10+743aad5":
version "2.7.0-next.10"
resolved "https://registry.yarnpkg.com/@eclipse-glsp/config-test/-/config-test-2.7.0-next.10.tgz#aea5b8d3c86027c76b9ee06c42dfbb71746dc22c"
integrity sha512-xhgO3MnDJ5d/xhicXxIQgC6Q5EMXg7pqZfZNdhrhMTmLgx4iR292WAMGNAA8qSVETxddNTaw7zOb8gFoOYXeRA==
dependencies:
"@eclipse-glsp/mocha-config" "2.7.0-next.10+743aad5"
"@eclipse-glsp/nyc-config" "2.7.0-next.10+743aad5"
"@istanbuljs/nyc-config-typescript" "^1.0.2"
"@types/chai" "^4.3.7"
"@types/mocha" "^10.0.2"
Expand All @@ -280,14 +280,14 @@
sinon "^15.1.0"
ts-node "^10.9.1"

"@eclipse-glsp/config@2.7.0-next.8+b3f9de7":
version "2.7.0-next.8"
resolved "https://registry.yarnpkg.com/@eclipse-glsp/config/-/config-2.7.0-next.8.tgz#654000963af07452bdcbc4de106222f2b1c4c0a8"
integrity sha512-xQvNqL+6sl4BZtVf3UcrPKzwneFfiQSnKR21CY39pGMp10NYcQud6heltlHC8U3fZtELp6JzQPaQtqIAlqBWMA==
"@eclipse-glsp/config@2.7.0-next.10+743aad5":
version "2.7.0-next.10"
resolved "https://registry.yarnpkg.com/@eclipse-glsp/config/-/config-2.7.0-next.10.tgz#e6aa4ab50057f828facd521cd2dee198aaf973e9"
integrity sha512-ZqIcL8nPAKLduPsoyOYvUrCb6kRv8YQQ7JXcp831YDzj1Ay3vlOq9yG2My6ytyQvR3hs9MFD09467elgYq9xrw==
dependencies:
"@eclipse-glsp/eslint-config" "2.7.0-next.8+b3f9de7"
"@eclipse-glsp/prettier-config" "2.7.0-next.8+b3f9de7"
"@eclipse-glsp/ts-config" "2.7.0-next.8+b3f9de7"
"@eclipse-glsp/eslint-config" "2.7.0-next.10+743aad5"
"@eclipse-glsp/prettier-config" "2.7.0-next.10+743aad5"
"@eclipse-glsp/ts-config" "2.7.0-next.10+743aad5"
"@eslint/js" "^9.0.0"
"@stylistic/eslint-plugin" "^2.0.0"
"@tony.ganchev/eslint-plugin-header" "^3.1.1"
Expand All @@ -304,40 +304,40 @@
typescript-eslint "^8.0.0"

"@eclipse-glsp/dev@next":
version "2.7.0-next.8"
resolved "https://registry.yarnpkg.com/@eclipse-glsp/dev/-/dev-2.7.0-next.8.tgz#38c3437eb39159de291b0963389f9f8731a52c72"
integrity sha512-Kz/j0loL9HSjt5uWcFOSOyOEL5JBCIqITEprduypzy4PNivApbrTSTxbwOFoJf4uylSWWO7q4fUNqGbzhU5KUQ==
dependencies:
"@eclipse-glsp/cli" "2.7.0-next.8+b3f9de7"
"@eclipse-glsp/config" "2.7.0-next.8+b3f9de7"
"@eclipse-glsp/config-test" "2.7.0-next.8+b3f9de7"

"@eclipse-glsp/eslint-config@2.7.0-next.8+b3f9de7":
version "2.7.0-next.8"
resolved "https://registry.yarnpkg.com/@eclipse-glsp/eslint-config/-/eslint-config-2.7.0-next.8.tgz#e54068d0292c08c925db042d1b422c0545a3f6c2"
integrity sha512-d8ngS4eIEQ/b/KUrWr/iIh6TYdm7kJ9v/Bmmy57+3y6c/FqWY2Gk6yf9yZpDlkxP/JaLwkeYFPIVM4Ch2ThOBQ==

"@eclipse-glsp/mocha-config@2.7.0-next.8+b3f9de7":
version "2.7.0-next.8"
resolved "https://registry.yarnpkg.com/@eclipse-glsp/mocha-config/-/mocha-config-2.7.0-next.8.tgz#3684eda8b5d66fe6426a4de3ff38242029ac0eff"
integrity sha512-4c/LFBNM7bHMXgaazAIMlezVoEqrQvn4MKBgN83WFgRoz6Njp/ybn/1GE9mtuHJIJLbwDmbfrSYmbZNtsGztaA==

"@eclipse-glsp/nyc-config@2.7.0-next.8+b3f9de7":
version "2.7.0-next.8"
resolved "https://registry.yarnpkg.com/@eclipse-glsp/nyc-config/-/nyc-config-2.7.0-next.8.tgz#20cf405340bb318a639ef769f154fd68d0497878"
integrity sha512-h+8uKmmiBUGG4f1D0UKmUSH8HaypeJUHGxWkAKS03VTBIoLb/xlC7AKrBcGaOMLcmYvkjNF15NcTfbet9tY2bA==

"@eclipse-glsp/prettier-config@2.7.0-next.8+b3f9de7":
version "2.7.0-next.8"
resolved "https://registry.yarnpkg.com/@eclipse-glsp/prettier-config/-/prettier-config-2.7.0-next.8.tgz#8f675cd2483c0fa88181b3eb2a3607a8dcc7dadd"
integrity sha512-upb5A7D3mHfMO4gINgKZOoMpFXRKAcjPZ/A9x0lr8+Zmf8ZQE8cr7dGYVHY6oCn7Qs3gZRf7Aw7BtTr08EKsZQ==
version "2.7.0-next.10"
resolved "https://registry.yarnpkg.com/@eclipse-glsp/dev/-/dev-2.7.0-next.10.tgz#81b1b86c2e17d21074c3e6c8fccaf0d396270fad"
integrity sha512-lsYYLkLoj35Q3Q8Uet+WCHJQQANHFGFR9/o6DcSIMdUrRhUkyX1uS7XezQr7u9+GJ76yIwp5Q1yMYrcEBpCuzg==
dependencies:
"@eclipse-glsp/cli" "2.7.0-next.10+743aad5"
"@eclipse-glsp/config" "2.7.0-next.10+743aad5"
"@eclipse-glsp/config-test" "2.7.0-next.10+743aad5"

"@eclipse-glsp/eslint-config@2.7.0-next.10+743aad5":
version "2.7.0-next.10"
resolved "https://registry.yarnpkg.com/@eclipse-glsp/eslint-config/-/eslint-config-2.7.0-next.10.tgz#c3a0bd614f52ca3d3c25f1512b8bd28c30777b9a"
integrity sha512-3bUCnz/qPQbABYimg0Bfo2TFMV5Qsk5tcy2uxs6ZTefX+7+AkUHOc57/A9XgRt/o3ngt3wCD+XdRkosBO/N6vw==

"@eclipse-glsp/mocha-config@2.7.0-next.10+743aad5":
version "2.7.0-next.10"
resolved "https://registry.yarnpkg.com/@eclipse-glsp/mocha-config/-/mocha-config-2.7.0-next.10.tgz#a804c7d3f60974b3df2dc6893efda2e6b1d97c5b"
integrity sha512-mHQh6XCDnSYloOtON4qN1w8N1mSu9siZi32lfXclh2oVRu16ykUn2oaSQ8aXS6HgMK8FoWaItj5HWNP82qmfwg==

"@eclipse-glsp/nyc-config@2.7.0-next.10+743aad5":
version "2.7.0-next.10"
resolved "https://registry.yarnpkg.com/@eclipse-glsp/nyc-config/-/nyc-config-2.7.0-next.10.tgz#c8cf5a3e00020fefb4d8cd2368bc6da458b9dabb"
integrity sha512-aYHgC8vgdGw8iK9ncNUkHgeHi6xaFso+8dECzeoQ+zLAx8aKqmh1//iyHXSWCIzwg1GsU0LkFX8FWdvX866jUg==

"@eclipse-glsp/prettier-config@2.7.0-next.10+743aad5":
version "2.7.0-next.10"
resolved "https://registry.yarnpkg.com/@eclipse-glsp/prettier-config/-/prettier-config-2.7.0-next.10.tgz#da3c8b84b033b4c2c0ee809c29fc650386527d62"
integrity sha512-ovjSsvyt487lbrJ1+s2bTX4X2L5vZHW8gMUT9w18YjzPUQPAN6wCfmCVa5NqA+NP9U9DeDOSFp9G5g+YePdUqA==
dependencies:
prettier-plugin-packagejson "~2.4.6"

"@eclipse-glsp/ts-config@2.7.0-next.8+b3f9de7":
version "2.7.0-next.8"
resolved "https://registry.yarnpkg.com/@eclipse-glsp/ts-config/-/ts-config-2.7.0-next.8.tgz#b972ee70e39cbb6b595ed58686c6be4ccf7a2acb"
integrity sha512-9UOU6JF+KdNGKmxDX++xaVMVCriWYuk03UmgHgMjuH+JIxqI5lY3jV1eywuMEf1pAPiFidMa1cx3CFPp2ApFcg==
"@eclipse-glsp/ts-config@2.7.0-next.10+743aad5":
version "2.7.0-next.10"
resolved "https://registry.yarnpkg.com/@eclipse-glsp/ts-config/-/ts-config-2.7.0-next.10.tgz#b3e4443d720318408ff299b7613521f226b0a2f2"
integrity sha512-Parige4p4pLPt2mlBnH9AKUXOqAQcOSjjQYVJZJ5vVpVIcuVJr7+q8PVyezlQ/8MmHIrCaJ4o+/xcs6Oft+8cg==

"@emnapi/core@^1.1.0":
version "1.5.0"
Expand Down Expand Up @@ -1533,10 +1533,10 @@
dependencies:
undici-types "~5.26.4"

"@types/node@20.x":
version "20.19.11"
resolved "https://registry.yarnpkg.com/@types/node/-/node-20.19.11.tgz#728cab53092bd5f143beed7fbba7ba99de3c16c4"
integrity sha512-uug3FEEGv0r+jrecvUUpbY8lLisvIjg6AAic6a2bSP5OEOLeJsDSnvhCDov7ipFFMXS3orMpzlmi0ZcuGkBbow==
"@types/node@22.x":
version "22.19.15"
resolved "https://registry.yarnpkg.com/@types/node/-/node-22.19.15.tgz#6091d99fdf7c08cb57dc8b1345d407ba9a1df576"
integrity sha512-F0R/h2+dsy5wJAUe3tAU6oqa2qbWY5TpNfL/RGmo1y38hiyO1w3x2jPtt76wmuaJI4DQnOBu21cNXQ2STIUUWg==
dependencies:
undici-types "~6.21.0"

Expand Down
Loading