@likec4/mcp 1.47.0 → 1.49.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.
Files changed (83) hide show
  1. package/LICENSE +1 -1
  2. package/dist/THIRD-PARTY-LICENSES.md +2417 -0
  3. package/dist/_chunks/libs/@chevrotain/gast.mjs +1 -0
  4. package/dist/_chunks/libs/@chevrotain/regexp-to-ast.mjs +9 -0
  5. package/dist/_chunks/libs/@chevrotain/utils.mjs +1 -0
  6. package/dist/_chunks/libs/@hono/mcp.mjs +34 -0
  7. package/dist/_chunks/libs/@hono/node-server.mjs +1 -0
  8. package/dist/_chunks/libs/@logtape/logtape.mjs +6 -0
  9. package/dist/_chunks/libs/@lume/kiwi.mjs +1 -0
  10. package/dist/_chunks/libs/@mantine/colors-generator.mjs +15 -0
  11. package/dist/_chunks/libs/@modelcontextprotocol/sdk.mjs +12 -0
  12. package/dist/_chunks/libs/@msgpack/msgpack.mjs +1 -0
  13. package/dist/_chunks/libs/@radix-ui/colors.mjs +1 -0
  14. package/dist/_chunks/libs/@smithy/util-base64.mjs +1 -0
  15. package/dist/_chunks/libs/@ungap/structured-clone.mjs +1 -0
  16. package/dist/_chunks/libs/bail.mjs +1 -0
  17. package/dist/_chunks/libs/ccount.mjs +1 -0
  18. package/dist/_chunks/libs/character-entities-html4.mjs +1 -0
  19. package/dist/_chunks/libs/character-entities-legacy.mjs +1 -0
  20. package/dist/_chunks/libs/character-entities.mjs +2 -0
  21. package/dist/_chunks/libs/chevrotain-allstar.mjs +2 -0
  22. package/dist/_chunks/libs/chevrotain.mjs +58 -0
  23. package/dist/_chunks/libs/chokidar.mjs +3 -0
  24. package/dist/_chunks/libs/citty.mjs +5 -0
  25. package/dist/_chunks/libs/comma-separated-tokens.mjs +1 -0
  26. package/dist/_chunks/libs/decode-named-character-reference.mjs +1 -0
  27. package/dist/_chunks/libs/defu.mjs +1 -0
  28. package/dist/_chunks/libs/devlop.mjs +1 -0
  29. package/dist/_chunks/libs/escape-string-regexp.mjs +1 -0
  30. package/dist/_chunks/libs/eventemitter3.mjs +1 -0
  31. package/dist/_chunks/libs/extend.mjs +1 -0
  32. package/dist/_chunks/libs/fast-equals.mjs +1 -0
  33. package/dist/_chunks/libs/fdir.mjs +1 -0
  34. package/dist/_chunks/libs/graphology-dag.mjs +1 -0
  35. package/dist/_chunks/libs/graphology.mjs +1 -0
  36. package/dist/_chunks/libs/hast-util-sanitize.mjs +1 -0
  37. package/dist/_chunks/libs/hast-util-to-html.mjs +9 -0
  38. package/dist/_chunks/libs/immer.mjs +1 -0
  39. package/dist/_chunks/libs/is-error-instance.mjs +1 -0
  40. package/dist/_chunks/libs/is-plain-obj.mjs +1 -0
  41. package/dist/_chunks/libs/json5.mjs +14 -0
  42. package/dist/_chunks/libs/khroma.mjs +1 -0
  43. package/dist/_chunks/libs/langium.mjs +29 -0
  44. package/dist/_chunks/libs/longest-streak.mjs +1 -0
  45. package/dist/_chunks/libs/markdown-table.mjs +2 -0
  46. package/dist/_chunks/libs/mdast-util-find-and-replace.mjs +1 -0
  47. package/dist/_chunks/libs/mdast-util-from-markdown.mjs +3 -0
  48. package/dist/_chunks/libs/mdast-util-gfm.mjs +15 -0
  49. package/dist/_chunks/libs/mdast-util-to-hast.mjs +11 -0
  50. package/dist/_chunks/libs/merge-error-cause.mjs +2 -0
  51. package/dist/_chunks/libs/micromark-extension-gfm.mjs +1 -0
  52. package/dist/_chunks/libs/mnemonist.mjs +1 -0
  53. package/dist/_chunks/libs/natural-compare-lite.mjs +9 -0
  54. package/dist/_chunks/libs/ohash.mjs +1 -0
  55. package/dist/_chunks/libs/p-limit.mjs +1 -0
  56. package/dist/_chunks/libs/p-queue.mjs +1 -0
  57. package/dist/_chunks/libs/parse-ms.mjs +1 -0
  58. package/dist/_chunks/libs/pathe.mjs +1 -0
  59. package/dist/_chunks/libs/pretty-ms.mjs +1 -0
  60. package/dist/_chunks/libs/rehype-sanitize.mjs +1 -0
  61. package/dist/_chunks/libs/rehype-stringify.mjs +1 -0
  62. package/dist/_chunks/libs/remark-gfm.mjs +1 -0
  63. package/dist/_chunks/libs/remark-github-blockquote-alert.mjs +3 -0
  64. package/dist/_chunks/libs/remark-parse.mjs +1 -0
  65. package/dist/_chunks/libs/remark-rehype.mjs +1 -0
  66. package/dist/_chunks/libs/remeda.mjs +1 -0
  67. package/dist/_chunks/libs/safe-stringify.mjs +1 -0
  68. package/dist/_chunks/libs/strip-indent.mjs +1 -0
  69. package/dist/_chunks/libs/trough.mjs +1 -0
  70. package/dist/_chunks/libs/ts-graphviz.mjs +4 -0
  71. package/dist/_chunks/libs/ufo.mjs +1 -0
  72. package/dist/_chunks/libs/unified.mjs +1 -0
  73. package/dist/_chunks/libs/word-wrap.mjs +12 -0
  74. package/dist/_chunks/rolldown-runtime.mjs +1 -0
  75. package/dist/index.mjs +185 -543
  76. package/package.json +27 -22
  77. package/.turbo/turbo-build.log +0 -1350
  78. package/CHANGELOG.md +0 -13
  79. package/build.config.ts +0 -22
  80. package/src/empty.ts +0 -2
  81. package/src/index.ts +0 -99
  82. package/tsconfig.json +0 -24
  83. package/turbo.json +0 -18
package/CHANGELOG.md DELETED
@@ -1,13 +0,0 @@
1
- # @likec4/mcp
2
-
3
- ## 1.47.0
4
-
5
- ### Patch Changes
6
-
7
- - [`be5326a`](https://github.com/likec4/likec4/commit/be5326a029c4f295cdd2bcf34dfa4a928dd9b948) Thanks [@davydkov](https://github.com/davydkov)! - Updated MCP SDK
8
-
9
- ## 1.46.4
10
-
11
- ## 1.46.3
12
-
13
- ## 1.46.2
package/build.config.ts DELETED
@@ -1,22 +0,0 @@
1
- import { resolve } from 'node:path'
2
- import { defineBuildConfig } from 'unbuild'
3
-
4
- export default defineBuildConfig({
5
- clean: true,
6
- stub: false,
7
- declaration: false,
8
- alias: {
9
- 'raw-body': resolve('./src/empty.ts'),
10
- 'content-type': resolve('./src/empty.ts'),
11
- },
12
- rollup: {
13
- esbuild: {
14
- minify: true,
15
- },
16
- emitCJS: false,
17
- inlineDependencies: true,
18
- resolve: {
19
- exportConditions: ['sources'],
20
- },
21
- },
22
- })
package/src/empty.ts DELETED
@@ -1,2 +0,0 @@
1
- // Just an empty placeholder to reduce bundle size (see build.config.ts)
2
- export default {}
package/src/index.ts DELETED
@@ -1,99 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- import { createLanguageServices, LikeC4FileSystem, WithMCPServer } from '@likec4/language-server'
4
- import {
5
- configureLogger,
6
- getAnsiColorFormatter,
7
- getConsoleStderrSink,
8
- logger,
9
- } from '@likec4/log'
10
- import { defineCommand, runMain } from 'citty'
11
- import { resolve } from 'node:path'
12
- import { isColorSupported } from 'std-env'
13
- import { URI } from 'vscode-uri'
14
-
15
- const main = defineCommand({
16
- meta: {
17
- name: 'likec4-mcp-server',
18
- description: 'LikeC4 MCP server',
19
- },
20
- args: {
21
- stdio: {
22
- type: 'boolean',
23
- description: 'use stdio transport (this is default)',
24
- required: false,
25
- },
26
- http: {
27
- type: 'boolean',
28
- description: 'use streamable http transport',
29
- required: false,
30
- },
31
- port: {
32
- type: 'string',
33
- description: 'change http port (default: 33335)',
34
- valueHint: 'number',
35
- required: false,
36
- },
37
- watch: {
38
- type: 'boolean',
39
- description: 'disable watch for changes (consume less resources if you have static workspace)',
40
- default: true,
41
- required: false,
42
- },
43
- workspace: {
44
- type: 'positional',
45
- description: 'change workspace, defaults to current directory, can be set by LIKEC4_WORKSPACE env',
46
- valueHint: 'directory',
47
- required: false,
48
- default: process.env['LIKEC4_WORKSPACE'] || '.',
49
- },
50
- },
51
- setup({ args }) {
52
- if (args.stdio && (args.http || args.port)) {
53
- throw new Error('stdio and http are mutually exclusive')
54
- }
55
- },
56
- async run({ args }) {
57
- const useStdio = args.stdio || (!args.http && !args.port)
58
-
59
- configureLogger({
60
- sinks: {
61
- console: getConsoleStderrSink(
62
- isColorSupported && !useStdio ? { formatter: getAnsiColorFormatter() } : undefined,
63
- ),
64
- },
65
- })
66
- process.on('uncaughtException', (err) => {
67
- logger.error('uncaughtException', { err })
68
- })
69
-
70
- process.on('unhandledRejection', (err) => {
71
- logger.error('unhandledRejection', { err })
72
- })
73
-
74
- const port = args.port ? parseInt(args.port) : 33335
75
- const workspace = resolve(args.workspace || '.')
76
- logger.info`Loading LikeC4 from workspace: ${workspace}`
77
-
78
- if (args.watch) {
79
- logger.warn`watch for changes enabled, use ${'--no-watch'} to consume less resources`
80
- }
81
-
82
- const langium = createLanguageServices({
83
- ...LikeC4FileSystem(args.watch),
84
- ...WithMCPServer(useStdio ? 'stdio' : { port }),
85
- })
86
-
87
- await langium.shared.workspace.WorkspaceManager.initializeWorkspace([{
88
- uri: URI.file(workspace).toString(),
89
- name: 'workspace',
90
- }])
91
-
92
- await langium.likec4.mcp.Server.start()
93
- },
94
- })
95
-
96
- runMain(main).catch(err => {
97
- logger.error(err)
98
- process.exit(1)
99
- })
package/tsconfig.json DELETED
@@ -1,24 +0,0 @@
1
- {
2
- "extends": "@likec4/tsconfig/base.json",
3
- "compilerOptions": {
4
- "rootDirs": [
5
- "src",
6
- "."
7
- ],
8
- "types": [
9
- "node"
10
- ]
11
- },
12
- "include": [
13
- "src",
14
- "build.config.ts"
15
- ],
16
- "references": [
17
- {
18
- "path": "../core/tsconfig.json"
19
- },
20
- {
21
- "path": "../language-server/tsconfig.json"
22
- }
23
- ]
24
- }
package/turbo.json DELETED
@@ -1,18 +0,0 @@
1
- {
2
- "$schema": "https://turbo.build/schema.json",
3
- "extends": [
4
- "//"
5
- ],
6
- "tasks": {
7
- "build": {
8
- "dependsOn": [
9
- "^generate",
10
- "^build"
11
- ],
12
- "outputs": [
13
- "dist/**"
14
- ],
15
- "outputLogs": "new-only"
16
- }
17
- }
18
- }