@likec4/language-server 1.53.0 → 1.55.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -0
- package/bin/likec4-language-server.mjs +1 -1
- package/dist/_chunks/LikeC4FileSystem.mjs +2 -2
- package/dist/_chunks/icons.d.mts +18 -0
- package/dist/_chunks/icons.mjs +2 -0
- package/dist/_chunks/module.d.mts +13 -42
- package/dist/_chunks/module.mjs +20 -20
- package/dist/_chunks/utils.mjs +1 -1
- package/dist/browser/index.d.mts +2 -2
- package/dist/browser/index.mjs +1 -1
- package/dist/browser/worker.mjs +1 -1
- package/dist/filesystem/index.d.mts +1 -1
- package/dist/filesystem/index.mjs +1 -1
- package/dist/icons.d.mts +2 -0
- package/dist/icons.mjs +1 -0
- package/dist/index.d.mts +2 -2
- package/dist/index.mjs +1 -1
- package/dist/likec4lib.d.mts +1 -3
- package/dist/likec4lib.mjs +1 -1
- package/dist/module.d.mts +2 -2
- package/dist/module.mjs +1 -1
- package/icons/package.json +4 -0
- package/package.json +27 -31
- package/src/test/index.ts +1 -0
- package/src/test/testServices.ts +258 -0
- package/dist/_chunks/likec4lib.mjs +0 -2
- package/dist/_chunks/mcp.mjs +0 -1154
- package/dist/_chunks/noop.mjs +0 -1
- package/dist/_chunks/noop2.mjs +0 -1
- package/dist/mcp/index.d.mts +0 -3
- package/dist/mcp/index.mjs +0 -1
- package/mcp/package.json +0 -4
|
@@ -16,10 +16,8 @@ import { CancellationToken, CodeLens, CodeLensParams, Connection, DocumentHighli
|
|
|
16
16
|
import { CodeAction, CodeActionParams, Command } from "vscode-languageserver-protocol";
|
|
17
17
|
import { Fqn as Fqn$1, GuardedBy, LayoutedView as LayoutedView$1, ProjectId as ProjectId$1, ViewId as ViewId$1 } from "@likec4/core/types";
|
|
18
18
|
import { CancellationToken as CancellationToken$1 } from "vscode-jsonrpc";
|
|
19
|
-
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
20
19
|
import * as type_fest0 from "type-fest";
|
|
21
20
|
import { ConditionalPick, MergeExclusive, Simplify, Tagged, ValueOf, Writable } from "type-fest";
|
|
22
|
-
import { ServerOptions } from "@modelcontextprotocol/sdk/server/index.js";
|
|
23
21
|
|
|
24
22
|
//#region src/documentation/documentation-provider.d.ts
|
|
25
23
|
/**
|
|
@@ -93,6 +91,11 @@ declare class ProjectsManager {
|
|
|
93
91
|
*/
|
|
94
92
|
static readonly DefaultProjectId: ProjectId$1;
|
|
95
93
|
constructor(services: LikeC4SharedServices);
|
|
94
|
+
/**
|
|
95
|
+
* Updates the workspace-level exclude patterns from VS Code settings.
|
|
96
|
+
* Called during initial server startup; dynamic changes restart the server.
|
|
97
|
+
*/
|
|
98
|
+
setWorkspaceExcludePatterns(patterns: string[] | undefined): void;
|
|
96
99
|
/**
|
|
97
100
|
* Returns:
|
|
98
101
|
* - configured default project ID if set
|
|
@@ -279,7 +282,7 @@ declare const NoFileSystem: FileSystemModuleContext;
|
|
|
279
282
|
declare const NoLikeC4ManualLayouts: LikeC4ManualLayoutsModuleContext;
|
|
280
283
|
//#endregion
|
|
281
284
|
//#region src/filesystem/LikeC4FileSystem.d.ts
|
|
282
|
-
declare const WithFileSystem: (
|
|
285
|
+
declare const WithFileSystem: (enableWatcher?: boolean) => FileSystemModuleContext;
|
|
283
286
|
//#endregion
|
|
284
287
|
//#region src/filesystem/ChokidarWatcher.d.ts
|
|
285
288
|
declare const WithChokidarWatcher: FileSystemWatcherModuleContext;
|
|
@@ -343,22 +346,6 @@ declare class LikeC4Formatter extends AbstractFormatter {
|
|
|
343
346
|
private onConfigurationUpdate;
|
|
344
347
|
}
|
|
345
348
|
//#endregion
|
|
346
|
-
//#region src/mcp/types.d.ts
|
|
347
|
-
interface LikeC4MCPServer {
|
|
348
|
-
readonly mcp: McpServer;
|
|
349
|
-
readonly isStarted: boolean;
|
|
350
|
-
readonly port: number;
|
|
351
|
-
start(port?: number): Promise<void>;
|
|
352
|
-
stop(): Promise<void>;
|
|
353
|
-
}
|
|
354
|
-
interface LikeC4MCPServerFactory {
|
|
355
|
-
create(options?: ServerOptions): McpServer;
|
|
356
|
-
}
|
|
357
|
-
interface LikeC4MCPServerModuleContext {
|
|
358
|
-
mcpServer: (services: LikeC4Services) => LikeC4MCPServer;
|
|
359
|
-
mcpServerFactory: (services: LikeC4Services) => LikeC4MCPServerFactory;
|
|
360
|
-
}
|
|
361
|
-
//#endregion
|
|
362
349
|
//#region src/generated/ast.d.ts
|
|
363
350
|
type AnyProperty = DynamicViewProperty | ElementProperty | NavigateToProperty | NotationProperty | NotesProperty | RelationProperty | RelationshipStyleProperty | StringProperty | StyleProperty | ViewProperty;
|
|
364
351
|
declare const AnyProperty = "AnyProperty";
|
|
@@ -1894,6 +1881,11 @@ declare class LikeC4WorkspaceManager extends DefaultWorkspaceManager {
|
|
|
1894
1881
|
* First load all project config files, then load all documents in the workspace.
|
|
1895
1882
|
*/
|
|
1896
1883
|
protected performStartup(folders: WorkspaceFolder[]): Promise<LangiumDocument[]>;
|
|
1884
|
+
/**
|
|
1885
|
+
* Read workspace exclude patterns from configuration before workspace scan.
|
|
1886
|
+
* Uses a timeout fallback for third-party IDEs that may not support workspace/configuration.
|
|
1887
|
+
*/
|
|
1888
|
+
private readExcludeConfig;
|
|
1897
1889
|
/**
|
|
1898
1890
|
* Load all additional documents that shall be visible in the context of the given workspace
|
|
1899
1891
|
* folders and add them to the collector. This can be used to include built-in libraries of
|
|
@@ -2221,14 +2213,6 @@ declare class LikeC4ModelLocator {
|
|
|
2221
2213
|
}): Location | null;
|
|
2222
2214
|
}
|
|
2223
2215
|
//#endregion
|
|
2224
|
-
//#region src/mcp/noop.d.ts
|
|
2225
|
-
declare const NoMCPServer: LikeC4MCPServerModuleContext;
|
|
2226
|
-
//#endregion
|
|
2227
|
-
//#region src/mcp/server/WithMCPServer.d.ts
|
|
2228
|
-
declare function WithMCPServer(type?: 'stdio' | 'sse' | {
|
|
2229
|
-
port: number;
|
|
2230
|
-
}): LikeC4MCPServerModuleContext;
|
|
2231
|
-
//#endregion
|
|
2232
2216
|
//#region src/views/LikeC4Views.d.ts
|
|
2233
2217
|
type GraphvizOut = {
|
|
2234
2218
|
readonly dot: string;
|
|
@@ -2359,13 +2343,6 @@ interface StartLanguageServerOptions {
|
|
|
2359
2343
|
* @default true
|
|
2360
2344
|
*/
|
|
2361
2345
|
enableWatcher?: boolean;
|
|
2362
|
-
/**
|
|
2363
|
-
* Whether to enable the MCP server.
|
|
2364
|
-
* @default 'sse'
|
|
2365
|
-
*/
|
|
2366
|
-
enableMCP?: false | 'stdio' | 'sse' | {
|
|
2367
|
-
port: number;
|
|
2368
|
-
};
|
|
2369
2346
|
/**
|
|
2370
2347
|
* Whether to enable manual layouts, stored in json5 files.
|
|
2371
2348
|
* @default true
|
|
@@ -3141,7 +3118,6 @@ interface LikeC4LanguageServices {
|
|
|
3141
3118
|
readonly workspaceUri: URI;
|
|
3142
3119
|
readonly projectsManager: ProjectsManager;
|
|
3143
3120
|
readonly editor: LikeC4ModelChanges;
|
|
3144
|
-
readonly mcpServer: LikeC4MCPServer | null;
|
|
3145
3121
|
/**
|
|
3146
3122
|
* Returns all projects with relevant documents
|
|
3147
3123
|
*/
|
|
@@ -3417,10 +3393,6 @@ interface LikeC4AddedServices {
|
|
|
3417
3393
|
DocumentValidator: LikeC4DocumentValidator;
|
|
3418
3394
|
};
|
|
3419
3395
|
Rpc: Rpc;
|
|
3420
|
-
mcp: {
|
|
3421
|
-
Server: LikeC4MCPServer;
|
|
3422
|
-
ServerFactory: LikeC4MCPServerFactory;
|
|
3423
|
-
};
|
|
3424
3396
|
likec4: {
|
|
3425
3397
|
LanguageServices: LikeC4LanguageServices;
|
|
3426
3398
|
Views: LikeC4Views;
|
|
@@ -3456,7 +3428,7 @@ interface LikeC4AddedServices {
|
|
|
3456
3428
|
};
|
|
3457
3429
|
}
|
|
3458
3430
|
type LikeC4Services = LangiumServices & LikeC4AddedServices;
|
|
3459
|
-
type LikeC4ServicesContext =
|
|
3431
|
+
type LikeC4ServicesContext = LikeC4ViewsModuleContext;
|
|
3460
3432
|
/**
|
|
3461
3433
|
* Most probably you don't need to use this function directly.
|
|
3462
3434
|
* Use {@link createLanguageServices} instead.
|
|
@@ -3471,7 +3443,6 @@ type LanguageServicesContext = LikeC4SharedModuleContext & LikeC4ServicesContext
|
|
|
3471
3443
|
* const { shared, likec4 } = createLanguageServices({
|
|
3472
3444
|
* ...WithFileSystem(enableWatcher = true),
|
|
3473
3445
|
* ...WithLikeC4ManualLayouts(),
|
|
3474
|
-
* ...NoMcpServer(),
|
|
3475
3446
|
* });
|
|
3476
3447
|
* ```
|
|
3477
3448
|
*
|
|
@@ -3509,4 +3480,4 @@ declare function createLanguageServices<I1, I2, I3, I extends I1 & I2 & I3 & Lik
|
|
|
3509
3480
|
*/
|
|
3510
3481
|
declare function createSharedServices(context?: Partial<LanguageServicesContext>): LikeC4SharedServices;
|
|
3511
3482
|
//#endregion
|
|
3512
|
-
export {
|
|
3483
|
+
export { NoFileSystem as A, ManualLayoutsSnapshot as B, LikeC4ModelBuilder as C, WithLikeC4ManualLayouts as D, LangiumDocuments as E, FileSystemProvider$1 as F, ProjectData as H, FileSystemWatcher as I, FileSystemWatcherModuleContext as L, NoLikeC4ManualLayouts as M, FileNode as N, WithChokidarWatcher as O, FileSystemModuleContext as P, LikeC4ManualLayouts as R, ViewLocateResult as S, LikeC4WorkspaceManager as T, ProjectsManager as U, Project as V, LikeC4ViewsModuleContext as _, LikeC4SharedModuleContext as a, LikeC4Views as b, createLikeC4Module as c, LikeC4LanguageServices as d, DocumentParser as f, configureLanguageServerLogger as g, ConfigureLanguageServerLoggerOptions as h, LikeC4ServicesContext as i, NoFileSystemWatcher as j, WithFileSystem as k, createSharedServices as l, startLanguageServer$1 as m, LikeC4AddedServices as n, LikeC4SharedServices as o, LikeC4ModelParser as p, LikeC4Services as r, createLanguageServices as s, LanguageServicesContext as t, FormatOptions as u, WithGraphviz as v, FqnIndex as w, LikeC4ModelLocator as x, WithWasmGraphviz as y, LikeC4ManualLayoutsModuleContext as z };
|