@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.
- package/LICENSE +1 -1
- package/dist/THIRD-PARTY-LICENSES.md +2417 -0
- package/dist/_chunks/libs/@chevrotain/gast.mjs +1 -0
- package/dist/_chunks/libs/@chevrotain/regexp-to-ast.mjs +9 -0
- package/dist/_chunks/libs/@chevrotain/utils.mjs +1 -0
- package/dist/_chunks/libs/@hono/mcp.mjs +34 -0
- package/dist/_chunks/libs/@hono/node-server.mjs +1 -0
- package/dist/_chunks/libs/@logtape/logtape.mjs +6 -0
- package/dist/_chunks/libs/@lume/kiwi.mjs +1 -0
- package/dist/_chunks/libs/@mantine/colors-generator.mjs +15 -0
- package/dist/_chunks/libs/@modelcontextprotocol/sdk.mjs +12 -0
- package/dist/_chunks/libs/@msgpack/msgpack.mjs +1 -0
- package/dist/_chunks/libs/@radix-ui/colors.mjs +1 -0
- package/dist/_chunks/libs/@smithy/util-base64.mjs +1 -0
- package/dist/_chunks/libs/@ungap/structured-clone.mjs +1 -0
- package/dist/_chunks/libs/bail.mjs +1 -0
- package/dist/_chunks/libs/ccount.mjs +1 -0
- package/dist/_chunks/libs/character-entities-html4.mjs +1 -0
- package/dist/_chunks/libs/character-entities-legacy.mjs +1 -0
- package/dist/_chunks/libs/character-entities.mjs +2 -0
- package/dist/_chunks/libs/chevrotain-allstar.mjs +2 -0
- package/dist/_chunks/libs/chevrotain.mjs +58 -0
- package/dist/_chunks/libs/chokidar.mjs +3 -0
- package/dist/_chunks/libs/citty.mjs +5 -0
- package/dist/_chunks/libs/comma-separated-tokens.mjs +1 -0
- package/dist/_chunks/libs/decode-named-character-reference.mjs +1 -0
- package/dist/_chunks/libs/defu.mjs +1 -0
- package/dist/_chunks/libs/devlop.mjs +1 -0
- package/dist/_chunks/libs/escape-string-regexp.mjs +1 -0
- package/dist/_chunks/libs/eventemitter3.mjs +1 -0
- package/dist/_chunks/libs/extend.mjs +1 -0
- package/dist/_chunks/libs/fast-equals.mjs +1 -0
- package/dist/_chunks/libs/fdir.mjs +1 -0
- package/dist/_chunks/libs/graphology-dag.mjs +1 -0
- package/dist/_chunks/libs/graphology.mjs +1 -0
- package/dist/_chunks/libs/hast-util-sanitize.mjs +1 -0
- package/dist/_chunks/libs/hast-util-to-html.mjs +9 -0
- package/dist/_chunks/libs/immer.mjs +1 -0
- package/dist/_chunks/libs/is-error-instance.mjs +1 -0
- package/dist/_chunks/libs/is-plain-obj.mjs +1 -0
- package/dist/_chunks/libs/json5.mjs +14 -0
- package/dist/_chunks/libs/khroma.mjs +1 -0
- package/dist/_chunks/libs/langium.mjs +29 -0
- package/dist/_chunks/libs/longest-streak.mjs +1 -0
- package/dist/_chunks/libs/markdown-table.mjs +2 -0
- package/dist/_chunks/libs/mdast-util-find-and-replace.mjs +1 -0
- package/dist/_chunks/libs/mdast-util-from-markdown.mjs +3 -0
- package/dist/_chunks/libs/mdast-util-gfm.mjs +15 -0
- package/dist/_chunks/libs/mdast-util-to-hast.mjs +11 -0
- package/dist/_chunks/libs/merge-error-cause.mjs +2 -0
- package/dist/_chunks/libs/micromark-extension-gfm.mjs +1 -0
- package/dist/_chunks/libs/mnemonist.mjs +1 -0
- package/dist/_chunks/libs/natural-compare-lite.mjs +9 -0
- package/dist/_chunks/libs/ohash.mjs +1 -0
- package/dist/_chunks/libs/p-limit.mjs +1 -0
- package/dist/_chunks/libs/p-queue.mjs +1 -0
- package/dist/_chunks/libs/parse-ms.mjs +1 -0
- package/dist/_chunks/libs/pathe.mjs +1 -0
- package/dist/_chunks/libs/pretty-ms.mjs +1 -0
- package/dist/_chunks/libs/rehype-sanitize.mjs +1 -0
- package/dist/_chunks/libs/rehype-stringify.mjs +1 -0
- package/dist/_chunks/libs/remark-gfm.mjs +1 -0
- package/dist/_chunks/libs/remark-github-blockquote-alert.mjs +3 -0
- package/dist/_chunks/libs/remark-parse.mjs +1 -0
- package/dist/_chunks/libs/remark-rehype.mjs +1 -0
- package/dist/_chunks/libs/remeda.mjs +1 -0
- package/dist/_chunks/libs/safe-stringify.mjs +1 -0
- package/dist/_chunks/libs/strip-indent.mjs +1 -0
- package/dist/_chunks/libs/trough.mjs +1 -0
- package/dist/_chunks/libs/ts-graphviz.mjs +4 -0
- package/dist/_chunks/libs/ufo.mjs +1 -0
- package/dist/_chunks/libs/unified.mjs +1 -0
- package/dist/_chunks/libs/word-wrap.mjs +12 -0
- package/dist/_chunks/rolldown-runtime.mjs +1 -0
- package/dist/index.mjs +185 -543
- package/package.json +27 -22
- package/.turbo/turbo-build.log +0 -1350
- package/CHANGELOG.md +0 -13
- package/build.config.ts +0 -22
- package/src/empty.ts +0 -2
- package/src/index.ts +0 -99
- package/tsconfig.json +0 -24
- 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
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