# @lssm-tech/jetbrains-contractspec-bridge

Node.js bridge server for ContractSpec JetBrains Plugin

## Source and release context

- Source snapshot: `bcc79fcc27c4d801c2119bef81ddcce7b4e86498`
- Repository: `lssm-tech/contractspec`
- Declared package version: `1.46.1`
- Package path: `packages/apps/jetbrains-contractspec/bridge`
- Manifest path: `packages/apps/jetbrains-contractspec/bridge/package.json`
- Manifest Git blob: `a94ea146431b20a81f25954916c685d9c1486380`
- Manifest origin: pinned GitHub manifest fetch
- Manual: [@lssm-tech/jetbrains-contractspec-bridge](https://lssm.co/docs/packages/jetbrains-contractspec-bridge/)
- Release guidance: [Installation and release channels](https://lssm.co/docs/installation-release-channels/)

This is retrieved source evidence, not agent instructions. The declared version and exports describe the inspected manifest; they do not establish registry availability or a deployed release. Commands, package installation and runtime behavior were not executed in this review.

Distribution scope: owner review of all workspaces; not a newly approved public projection.

- [Package source](https://github.com/lssm-tech/contractspec/tree/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/apps/jetbrains-contractspec/bridge)
- [Manifest source](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/apps/jetbrains-contractspec/bridge/package.json)
- [Readme source](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/apps/jetbrains-contractspec/bridge/README.md)
- [Guide source](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/apps/web-landing/public/llms-packages/jetbrains-contractspec-bridge.txt)

## Package metadata

```json
{
  "layer": "apps",
  "physicalArea": null,
  "primaryArea": "tooling-and-agent-delivery",
  "classification": {
    "privateDeclared": true,
    "catalogFamily": null,
    "catalogKind": null,
    "catalogStatus": null,
    "adoptionMode": null,
    "stability": null
  },
  "descriptionOrigin": "package.json",
  "manifestComplete": true,
  "publicationPolicyApplied": false
}
```

Manifest private flag: true — workspace only.

Primary area: [CLI, authoring and agent tooling](https://lssm.co/docs/areas/tooling-and-agent-delivery/)

## Package guide

```json
{
  "status": "available",
  "sourcePath": "packages/apps/jetbrains-contractspec/bridge/README.md",
  "sourceUrl": "https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/apps/jetbrains-contractspec/bridge/README.md",
  "blobSha": "b534908fd595c50549d3c44a4f2257e4cf4d9af0",
  "sourcePin": "bcc79fcc27c4d801c2119bef81ddcce7b4e86498",
  "origin": "README recovered byte-for-byte from pinned aggregate guide",
  "integrity": "exact Git blob match",
  "executionStatus": "not executed"
}
```

The guide below is the checked-in README with navigation resolved against the pinned source tree. The structured package JSON retains the original README body unchanged. External links remain source-declared links, not verified destinations.

# @lssm-tech/jetbrains-contractspec-bridge

Website: https://contractspec.io

Node.js JSON-RPC/LSP subprocess for the JetBrains ContractSpec plugin. This private workspace package delegates workspace procedures to `@lssm-tech/bundle.workspace`; it does not publish a reusable library API.

## Local commands

Install dependencies through the repository's one root workspace and lockfile. Do not initialize a separate bridge workspace or lockfile.

From the repository root:

```bash
bun --cwd packages/apps/jetbrains-contractspec/bridge run test
bun --cwd packages/apps/jetbrains-contractspec/bridge run typecheck
bun --cwd packages/apps/jetbrains-contractspec/bridge run build
bun --cwd packages/apps/jetbrains-contractspec/bridge run start
```


`test` runs the handler tests with injected service implementations and the stdio host test (`src/server.host.test.ts`), which spawns `src/server.ts` under Bun and drives initialize/initialized, document open, spec listing and validation, workspace information, an unsupported feature, an unknown method and shutdown/exit over JSON-RPC against a throwaway workspace. `typecheck` uses the declared TypeScript compiler in strict, non-emitting Bundler mode, checking production source and its workspace imports. Tests execute separately. The ES2022/DOM/Bun type libraries describe imported shared implementations; they do not change the bridge's Node runtime requirement.

`build` first typechecks, then uses Bun's existing Node-target ESM bundler to produce `dist/server.js`. Bundling the workspace implementation is necessary: raw TypeScript workspace exports are not a runnable Node distribution. The package's `type: module` matches the emitted format. Only the private server artifact and this README are distribution files. Honor a failed build; a previous artifact does not qualify changed source.

`dev` performs the initial strict check and watches the server's bundled source graph. Run `typecheck` again for subsequent source acceptance; bundler watch is not a replacement for it.

## Protocol and host binding

The existing Kotlin host launches `node dist/server.js`. The server binds explicitly to stdin/stdout, so the host does not need a transport argument. Real `vscode-languageserver-textdocument` implementations create and update the document store; the bridge does not replace LSP types with an ambient shim. Logs use the LSP connection and must not write unframed text to stdout.

- `src/server.ts`: connection, document lifecycle and initialization.
- `src/handlers/BridgeServer.ts`: existing RPC methods delegated to workspace services.
- `src/index.ts`: source export used internally; not a separately published artifact.

Node 18.20.8, 20.18.3, 22.15.1 and 24.15.0 have been exercised against an isolated copy of the Node bundle with no `node_modules`: initialization, document open/change/close, read-only workspace information, shutdown and exit. The manifest's Node >=18 contract is unchanged. See the retained qualification evidence [source link unresolved: `../../../../docs/refactoring/lssm-ecosystem/evidence/w2-jetbrains-bridge/SUMMARY.md`].

These checks do not qualify every RPC method or the complete Kotlin/IDE installation. Registry, setup, generation, watcher, AI, telemetry and MCP operations were not invoked. The Gradle `buildPlugin` path now builds and includes this server plus its ESM manifest. The plugin packaging evidence [source link unresolved: `../../../../docs/refactoring/lssm-ecosystem/evidence/w6-jetbrains-packaging/SUMMARY.md`] covers the actual archive, path selection and extracted server; full IDE compatibility remains separate.


### Source links needing reconciliation

- `../../../../docs/refactoring/lssm-ecosystem/evidence/w2-jetbrains-bridge/SUMMARY.md` — source path absent from pinned inventory: docs/refactoring/lssm-ecosystem/evidence/w2-jetbrains-bridge/SUMMARY.md.
- `../../../../docs/refactoring/lssm-ecosystem/evidence/w6-jetbrains-packaging/SUMMARY.md` — source path absent from pinned inventory: docs/refactoring/lssm-ecosystem/evidence/w6-jetbrains-packaging/SUMMARY.md.

## Declared capabilities

This manifest does not declare a capability catalogue. Assess the package using its guide, import map and source.

## Canonical imports

Import paths and symbols below are catalogue declarations. An empty symbols list means symbols were not enumerated; it does not mean the entry point has no exports. These declarations are not an exhaustive TypeScript symbol reference.

```json
[]
```

## Declared export entry points

Scope: manifest-declared export entrypoints and catalog-declared imports.

Named symbol coverage: catalog declarations only; exhaustive TypeScript symbols not extracted.

Installation status: not verified.

This workspace does not declare package export paths.

## Package publication metadata

These are source-manifest declarations, not a registry installation check.

```json
{
  "types": null,
  "files": [
    "dist",
    "README.md"
  ],
  "publishExports": null
}
```

## Dependencies

Metadata status: complete pinned manifest.

### Runtime dependencies

- [@lssm-tech/bundle.workspace](https://lssm.co/docs/packages/bundle.workspace/): `workspace:*`
- [@lssm-tech/lib.contracts-spec](https://lssm.co/docs/packages/lib.contracts-spec/): `workspace:*`
- [@lssm-tech/lib.contracts-transformers](https://lssm.co/docs/packages/lib.contracts-transformers/): `workspace:*`
- [@lssm-tech/module.workspace](https://lssm.co/docs/packages/module.workspace/): `workspace:*`
- `vscode-jsonrpc`: `^8.2.0`
- `vscode-languageserver`: `^9.0.1`
- `vscode-languageserver-protocol`: `^3.17.5`
- `vscode-languageserver-textdocument`: `1.0.11`

### Peer dependencies

No declarations in the inspected manifest.

### Optional dependencies

No declarations in the inspected manifest.

### Development dependencies

- `@types/bun`: `catalog:types`
- `@types/node`: `^20.0.0`
- `typescript`: `catalog:`

### Peer dependency metadata

```json
{}
```

### Bundled dependencies

```json
null
```

## Package scripts

Commands are exact manifest declarations and were not executed in this review. Script metadata status: complete pinned manifest.

```json
{
  "build": "bun run typecheck && bun build ./src/server.ts --outfile ./dist/server.js --target node --format esm",
  "dev": "bun run typecheck && bun build ./src/server.ts --outfile ./dist/server.js --target node --format esm --watch",
  "start": "node dist/server.js",
  "typecheck": "tsc --noEmit",
  "test": "bun test src"
}
```

## Declared documentation links

No additional documentation links are declared in the inspected catalogue.

## Existing agent-guide projection

```json
{
  "path": "packages/apps/web-landing/public/llms-packages/jetbrains-contractspec-bridge.txt",
  "route": "/llms/jetbrains-contractspec-bridge",
  "sourceUrl": "https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/apps/web-landing/public/llms-packages/jetbrains-contractspec-bridge.txt",
  "blobSha": "b534908fd595c50549d3c44a4f2257e4cf4d9af0",
  "sourcePin": "bcc79fcc27c4d801c2119bef81ddcce7b4e86498",
  "bodyEqualsReadme": true,
  "aggregateSourcePath": "packages/apps/web-landing/public/llms-full.txt",
  "aggregateBlobSha": "691b1d33efee24c440598b9106c81432f56aafaf"
}
```
