Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
4 changes: 2 additions & 2 deletions .github/scripts/discover_changed_workers.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
changed_workers (alias `all`) : all workers with any change
source_changed : workers whose change wasn't only metadata
rust / node / python : language buckets (subset of changed_workers)
vscode_changed : bool, did iii-lsp-vscode/ change
vscode_changed : bool, did lsp-vscode/ change
any : bool, any worker or vscode change
"""
from __future__ import annotations
Expand Down Expand Up @@ -34,7 +34,7 @@
IGNORE_DIRS = {".git", ".github", "registry", "target", "node_modules"}

# Special non-worker dir tracked separately for the vscode-changed gate.
VSCODE_DIR = "iii-lsp-vscode"
VSCODE_DIR = "lsp-vscode"

# Source changes in this worker fan out: every in-repo dep listed in its
# iii.worker.yaml joins the changed-workers matrix so the rust lint+test
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ jobs:

# ──────────────────────────────────────────────────────────────
# PR gates: readme present, manifest version > main, iii.worker.yaml valid.
# Runs once per changed worker (excluding iii-lsp-vscode).
# Runs once per changed worker (excluding lsp-vscode).
# ──────────────────────────────────────────────────────────────
pr-checks:
name: "${{ matrix.worker }}: PR checks"
Expand Down Expand Up @@ -454,16 +454,16 @@ jobs:
run: pytest -q

# ──────────────────────────────────────────────────────────────
# iii-lsp-vscode: special-case (VS Code extension, not a standard worker)
# lsp-vscode: special-case (VS Code extension, not a standard worker)
# ──────────────────────────────────────────────────────────────
iii-lsp-vscode:
name: "iii-lsp-vscode: lint + test"
lsp-vscode:
name: "lsp-vscode: lint + test"
needs: discover
if: needs.discover.outputs.vscode_changed == 'true'
runs-on: ubuntu-latest
defaults:
run:
working-directory: iii-lsp-vscode
working-directory: lsp-vscode
steps:
- uses: actions/checkout@v4

Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/create-tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ on:
- harness
- iii-directory
- lsp
- iii-lsp-vscode
- lsp-vscode
- image-resize
- llm-router
- mcp
Expand Down Expand Up @@ -94,8 +94,8 @@ jobs:
WORKER: ${{ inputs.worker }}
run: |
set -euo pipefail
# iii-lsp-vscode has no iii.worker.yaml (special VS Code extension flow).
if [[ "$WORKER" == "iii-lsp-vscode" ]]; then
# lsp-vscode has no iii.worker.yaml (special VS Code extension flow).
if [[ "$WORKER" == "lsp-vscode" ]]; then
echo "manifest=package.json" >> "$GITHUB_OUTPUT"
exit 0
fi
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
name: Release LSP
name: Release LSP VS Code

on:
push:
tags:
- 'iii-lsp-vscode/v*'
- 'lsp-vscode/v*'
workflow_dispatch:
inputs:
tag:
description: 'Tag to release (e.g., iii-lsp-vscode/v1.0.0)'
description: 'Tag to release (e.g., lsp-vscode/v1.0.0)'
required: true
type: string

Expand Down Expand Up @@ -41,7 +41,7 @@ jobs:
env:
TAG: ${{ steps.resolve.outputs.tag }}
run: |
VERSION="${TAG#iii-lsp-vscode/v}"
VERSION="${TAG#lsp-vscode/v}"

if [[ "$VERSION" =~ -dry-run\.[0-9]+$ ]]; then
echo "dry_run=true" >> "$GITHUB_OUTPUT"
Expand All @@ -55,15 +55,15 @@ jobs:
fi

echo "version=$VERSION" >> "$GITHUB_OUTPUT"
echo "::notice::iii-lsp-vscode release -- tag=$TAG version=$VERSION"
echo "::notice::lsp-vscode release -- tag=$TAG version=$VERSION"

publish:
name: Package & Publish
needs: [setup]
runs-on: ubuntu-latest
defaults:
run:
working-directory: iii-lsp-vscode
working-directory: lsp-vscode
steps:
- uses: actions/checkout@v4

Expand All @@ -86,7 +86,7 @@ jobs:
exit 1
fi

echo "::notice::iii-lsp-vscode package version set to ${ACTUAL_VERSION}"
echo "::notice::lsp-vscode package version set to ${ACTUAL_VERSION}"

- name: Package VSIX
run: npx @vscode/vsce package --out iii-lsp-${{ needs.setup.outputs.version }}.vsix
Expand All @@ -108,8 +108,8 @@ jobs:
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ needs.setup.outputs.tag }}
name: iii-lsp-vscode ${{ needs.setup.outputs.version }}
name: lsp-vscode ${{ needs.setup.outputs.version }}
draft: false
prerelease: ${{ needs.setup.outputs.is_prerelease == 'true' }}
generate_release_notes: true
files: iii-lsp-vscode/iii-lsp-${{ needs.setup.outputs.version }}.vsix
files: lsp-vscode/iii-lsp-${{ needs.setup.outputs.version }}.vsix
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ npx skills add iii-hq/iii --all
| [`database`](database/) | Rust | PostgreSQL, MySQL, and SQLite client — query, execute, transactions, prepared statements, and change feeds. |
| [`iii-directory`](iii-directory/) | Rust | Engine introspection (functions / triggers / workers), workers-registry proxy, and filesystem-backed skill + prompt reader. |
| [`lsp`](lsp/) | Rust | Language Server for iii function ids, trigger configs, and worker discovery. Autocomplete / hover across JS/TS, Python, Rust. |
| [`iii-lsp-vscode`](iii-lsp-vscode/) | Node | VS Code extension that embeds the `lsp` server. |
| [`lsp-vscode`](lsp-vscode/) | Node | VS Code extension package `iii-lsp`, embedding the `lsp` server. |
| [`image-resize`](image-resize/) | Rust | Image resize via channel I/O — JPEG/PNG/WebP with EXIF auto-orient, scale-to-fit / crop-to-fit. |
| [`llm-router`](llm-router/) | Rust | One front door + provider protocol in front of every LLM provider — `router::chat`/`router::complete`, provider registry + credentials, model catalog, and routing. See [`llm-router/README.md`](llm-router/README.md). |
| [`mcp`](mcp/) | Rust | MCP 2025-06-18 Streamable HTTP bridge — exposes iii functions tagged `mcp.expose` as MCP tools. |
Expand Down
File renamed without changes.
File renamed without changes.
12 changes: 6 additions & 6 deletions iii-lsp-vscode/AGENTS.md → lsp-vscode/AGENTS.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# iii-lsp-vscode Agent Notes
# lsp-vscode Agent Notes

Use containers for Node commands. Do not install host-global Node packages.

```bash
cd iii-lsp-vscode
docker build -t iii-lsp-vscode-dev .
docker run --rm -u "$(id -u):$(id -g)" -v "$PWD:/workspace" -w /workspace iii-lsp-vscode-dev npm ci
docker run --rm -u "$(id -u):$(id -g)" -v "$PWD:/workspace" -w /workspace iii-lsp-vscode-dev npm test
docker run --rm -u "$(id -u):$(id -g)" -v "$PWD:/workspace" -w /workspace iii-lsp-vscode-dev npm run package:check
cd lsp-vscode
docker build -t lsp-vscode-dev .
docker run --rm -u "$(id -u):$(id -g)" -v "$PWD:/workspace" -w /workspace lsp-vscode-dev npm ci
docker run --rm -u "$(id -u):$(id -g)" -v "$PWD:/workspace" -w /workspace lsp-vscode-dev npm test
docker run --rm -u "$(id -u):$(id -g)" -v "$PWD:/workspace" -w /workspace lsp-vscode-dev npm run package:check
```
File renamed without changes.
2 changes: 1 addition & 1 deletion iii-lsp-vscode/Makefile → lsp-vscode/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.PHONY: image install test package-check build install-cursor clean

IMAGE ?= iii-lsp-vscode-dev
IMAGE ?= lsp-vscode-dev
VSIX ?= iii-lsp.vsix
NPM_CACHE ?= /tmp/npm-cache

Expand Down
31 changes: 13 additions & 18 deletions iii-lsp-vscode/README.md → lsp-vscode/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@

Autocompletion, hover documentation, and diagnostics for [iii engine](https://github.com/iii-hq/iii) functions and triggers.

![iii LSP demo](https://raw.githubusercontent.com/iii-hq/workers/main/iii-lsp-vscode/images/lsp.gif)
The source directory and release tag namespace are `lsp-vscode`; the Marketplace/OpenVSX package name remains `iii-lsp` for continuity.

![iii LSP demo](https://raw.githubusercontent.com/iii-hq/workers/main/lsp-vscode/images/lsp.gif)

## Supported Languages

Expand All @@ -12,7 +14,7 @@ Autocompletion, hover documentation, and diagnostics for [iii engine](https://gi

## Prerequisites

1. **iii-lsp binary** - The extension downloads and installs the pinned `iii-lsp/v0.1.0` binary on first activation.
1. **lsp binary** - The extension downloads and installs the pinned `lsp/v0.1.3` binary on first activation.

The binary is stored under VS Code's extension global storage directory and the absolute path is saved to `iii-lsp.serverPath` in global settings.

Expand All @@ -22,37 +24,30 @@ Autocompletion, hover documentation, and diagnostics for [iii engine](https://gi

## Installation

After the extension is installed, open a supported TypeScript, TSX, Python, or Rust file to activate it. On first activation, the extension downloads the matching `iii-lsp/v0.1.0` binary, verifies its SHA-256 checksum, installs it under extension global storage, and saves the installed path to `iii-lsp.serverPath`.
After the extension is installed, open a supported TypeScript, TSX, Python, or Rust file to activate it. On first activation, the extension downloads the matching `lsp/v0.1.3` binary, verifies its SHA-256 checksum, installs it under extension global storage, and saves the installed path to `iii-lsp.serverPath`.

If automatic install fails, the extension warns and falls back to the configured `iii-lsp.serverPath` or `iii-lsp` on `PATH`.
If automatic install fails, the extension warns and falls back to the configured `iii-lsp.serverPath` or `lsp` on `PATH`, with `iii-lsp` as a legacy PATH fallback.

### From source (development)

1. Install dependencies:

```bash
cd iii-lsp-vscode
cd lsp-vscode
npm install
```

2. Open VS Code and install the extension locally:

```bash
# From the repo root
code --install-extension iii-lsp-vscode
```

Or, in VS Code:
- Open the Command Palette (`Cmd+Shift+P`)
- Run **Extensions: Install from Location...**
- Select the `iii-lsp-vscode` directory
- Select the `lsp-vscode` directory

### From VSIX package

1. Package the extension:

```bash
cd iii-lsp-vscode
cd lsp-vscode
npm install
npx @vscode/vsce package
```
Expand All @@ -68,15 +63,15 @@ If automatic install fails, the extension warns and falls back to the configured
Build a local VSIX and install it in Cursor:

```bash
cd iii-lsp-vscode
cd lsp-vscode
make build
cursor --install-extension iii-lsp.vsix --force
```

Open a supported file to activate the extension:

```bash
cursor ../iii-lsp/src/main.rs
cursor ../lsp/src/main.rs
```

After activation, `iii-lsp.serverPath` should point to the downloaded binary in Cursor settings. To install the same VSIX in VS Code instead, replace `cursor` with `code`.
Expand All @@ -85,14 +80,14 @@ After activation, `iii-lsp.serverPath` should point to the downloaded binary in

| Setting | Default | Description |
|---------|---------|-------------|
| `iii-lsp.serverPath` | `""` (auto-filled after first activation) | Path to the installed or custom `iii-lsp` binary |
| `iii-lsp.serverPath` | `""` (auto-filled after first activation) | Path to the installed or custom `lsp` binary |
| `iii-lsp.engineUrl` | `ws://127.0.0.1:49134` | WebSocket URL of the iii engine |

Configure via **Settings** > search "iii LSP", or in `settings.json`:

```json
{
"iii-lsp.serverPath": "/path/to/iii-lsp",
"iii-lsp.serverPath": "/path/to/lsp",
"iii-lsp.engineUrl": "ws://127.0.0.1:49134"
}
```
Expand Down
3 changes: 2 additions & 1 deletion iii-lsp-vscode/extension.js → lsp-vscode/extension.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ const { LanguageClient, TransportKind } = require("vscode-languageclient/node");
const { ensureServerBinary } = require("./installer");

let client;
const CONFIG_SECTION = "iii-lsp";
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Resolved

// Resolve the server binary on PATH, preferring the new `lsp` name and
// falling back to the legacy `iii-lsp` name for older installs.
Expand Down Expand Up @@ -39,7 +40,7 @@ function resolvePathBinary() {
}

async function activate(context) {
const config = vscode.workspace.getConfiguration("iii-lsp");
const config = vscode.workspace.getConfiguration(CONFIG_SECTION);
const engineUrl = config.get("engineUrl") || "ws://127.0.0.1:49134";
let serverPath;

Expand Down
File renamed without changes
File renamed without changes
16 changes: 9 additions & 7 deletions iii-lsp-vscode/installer.js → lsp-vscode/installer.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@ const { pipeline } = require('node:stream/promises');
const extractZip = require('extract-zip');
const tar = require('tar');

const SERVER_VERSION = '0.1.2';
const RELEASE_TAG = `iii-lsp/v${SERVER_VERSION}`;
const CONFIG_SECTION = 'iii-lsp';
const SERVER_VERSION = '0.1.3';
const RELEASE_TAG = `lsp/v${SERVER_VERSION}`;
const RELEASE_BASE_URL = `https://github.com/iii-hq/workers/releases/download/${RELEASE_TAG}`;

const PLATFORM_TARGETS = {
Expand All @@ -31,22 +32,22 @@ function getPlatformTarget(platform = process.platform, arch = process.arch) {
const target = PLATFORM_TARGETS[key];

if (!target) {
throw new Error(`Unsupported iii-lsp platform: ${key}`);
throw new Error(`Unsupported lsp platform: ${key}`);
}

return target;
}

function getArchiveName(target, platform = process.platform) {
return `iii-lsp-${target}${platform === 'win32' ? '.zip' : '.tar.gz'}`;
return `lsp-${target}${platform === 'win32' ? '.zip' : '.tar.gz'}`;
}

function getBinaryName(platform = process.platform) {
return platform === 'win32' ? 'iii-lsp.exe' : 'iii-lsp';
return platform === 'win32' ? 'lsp.exe' : 'lsp';
}

function getChecksumName(target) {
return `iii-lsp-${target}.sha256`;
return `lsp-${target}.sha256`;
}

function getDownloadUrl(assetName) {
Expand Down Expand Up @@ -187,7 +188,7 @@ async function ensureServerBinary(context, vscodeApi, options = {}) {
const downloadFileImpl = options.downloadFile ?? downloadFile;
const sha256FileImpl = options.sha256File ?? sha256File;
const extractArchiveImpl = options.extractArchive ?? extractArchive;
const configuration = vscodeApi.workspace.getConfiguration('iii-lsp');
const configuration = vscodeApi.workspace.getConfiguration(CONFIG_SECTION);
const configuredServerPath = configuration.get('serverPath') ?? '';
const installPaths = getInstallPaths(context, platform, arch);

Expand Down Expand Up @@ -232,6 +233,7 @@ module.exports = {
SERVER_VERSION,
RELEASE_TAG,
RELEASE_BASE_URL,
CONFIG_SECTION,
downloadFile,
downloadText,
ensureServerBinary,
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions iii-lsp-vscode/package.json → lsp-vscode/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "iii-lsp",
"displayName": "iii Language Server",
"description": "Autocompletion and hover for iii engine functions and triggers",
"version": "0.1.0",
"version": "0.2.6",
"publisher": "iii-hq",
"engines": {
"vscode": "^1.75.0"
Expand All @@ -25,7 +25,7 @@
"iii-lsp.serverPath": {
"type": "string",
"default": "",
"description": "Path to the iii-lsp binary. If empty, looks for 'iii-lsp' on PATH."
"description": "Path to the lsp binary. If empty, installs lsp or looks for 'lsp' on PATH."
},
"iii-lsp.engineUrl": {
"type": "string",
Expand All @@ -47,6 +47,7 @@
"iii language server",
"language server",
"lsp",
"lsp-vscode",
"autocomplete",
"hover",
"diagnostics"
Expand All @@ -55,7 +56,7 @@
"repository": {
"type": "git",
"url": "https://github.com/iii-hq/workers.git",
"directory": "iii-lsp-vscode"
"directory": "lsp-vscode"
},
"license": "ISC",
"type": "commonjs",
Expand Down
Loading
Loading