flist-mcp 0.16.0__tar.gz
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.
- flist_mcp-0.16.0/.github/ISSUE_TEMPLATE/bug_report.yml +48 -0
- flist_mcp-0.16.0/.github/ISSUE_TEMPLATE/config.yml +5 -0
- flist_mcp-0.16.0/.github/ISSUE_TEMPLATE/feature_request.yml +25 -0
- flist_mcp-0.16.0/.github/dependabot.yml +13 -0
- flist_mcp-0.16.0/.github/pull_request_template.md +10 -0
- flist_mcp-0.16.0/.github/workflows/ci.yml +122 -0
- flist_mcp-0.16.0/.github/workflows/release.yml +82 -0
- flist_mcp-0.16.0/.gitignore +12 -0
- flist_mcp-0.16.0/.python-version +1 -0
- flist_mcp-0.16.0/AGENTS.md +37 -0
- flist_mcp-0.16.0/LICENSE +21 -0
- flist_mcp-0.16.0/Makefile +38 -0
- flist_mcp-0.16.0/PKG-INFO +145 -0
- flist_mcp-0.16.0/README.md +119 -0
- flist_mcp-0.16.0/codecov.yml +14 -0
- flist_mcp-0.16.0/docs/CONTRIBUTING.md +19 -0
- flist_mcp-0.16.0/docs/SECURITY.md +16 -0
- flist_mcp-0.16.0/docs/agent-workflow.md +79 -0
- flist_mcp-0.16.0/docs/dependency-graphs.md +53 -0
- flist_mcp-0.16.0/docs/development.md +59 -0
- flist_mcp-0.16.0/docs/examples/README.md +38 -0
- flist_mcp-0.16.0/docs/examples/cva6-acc-dispatcher-external-graph.json +147 -0
- flist_mcp-0.16.0/docs/examples/cva6-compressed-decoder-conflicts.json +164 -0
- flist_mcp-0.16.0/docs/examples/cva6-compressed-decoder-diagnostics.json +85 -0
- flist_mcp-0.16.0/docs/examples/cva6-compressed-decoder-ready.json +23 -0
- flist_mcp-0.16.0/docs/examples/cva6-compressed-decoder-rtl-graph.json +33 -0
- flist_mcp-0.16.0/docs/getting-started.md +66 -0
- flist_mcp-0.16.0/docs/versioning.md +39 -0
- flist_mcp-0.16.0/pyproject.toml +167 -0
- flist_mcp-0.16.0/src/flist_mcp/__init__.py +5 -0
- flist_mcp-0.16.0/src/flist_mcp/api_models.py +298 -0
- flist_mcp-0.16.0/src/flist_mcp/dependency_analysis.py +169 -0
- flist_mcp-0.16.0/src/flist_mcp/dependency_graph.py +384 -0
- flist_mcp-0.16.0/src/flist_mcp/discovery.py +30 -0
- flist_mcp-0.16.0/src/flist_mcp/macro_analysis.py +171 -0
- flist_mcp-0.16.0/src/flist_mcp/mcp_main.py +11 -0
- flist_mcp-0.16.0/src/flist_mcp/model.py +88 -0
- flist_mcp-0.16.0/src/flist_mcp/presentation.py +128 -0
- flist_mcp-0.16.0/src/flist_mcp/py.typed +1 -0
- flist_mcp-0.16.0/src/flist_mcp/server.py +249 -0
- flist_mcp-0.16.0/src/flist_mcp/service.py +481 -0
- flist_mcp-0.16.0/src/flist_mcp/slang.py +424 -0
- flist_mcp-0.16.0/src/flist_mcp/source_location.py +30 -0
- flist_mcp-0.16.0/tests/conftest.py +111 -0
- flist_mcp-0.16.0/tests/test_agent_flow.py +143 -0
- flist_mcp-0.16.0/tests/test_analysis.py +470 -0
- flist_mcp-0.16.0/tests/test_axi_integration.py +102 -0
- flist_mcp-0.16.0/tests/test_conflicts.py +374 -0
- flist_mcp-0.16.0/tests/test_cva6_integration.py +148 -0
- flist_mcp-0.16.0/tests/test_dependency_graph.py +419 -0
- flist_mcp-0.16.0/tests/test_documentation_examples.py +71 -0
- flist_mcp-0.16.0/tests/test_mcp.py +321 -0
- flist_mcp-0.16.0/tests/test_versioning.py +9 -0
- flist_mcp-0.16.0/uv.lock +1998 -0
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
name: Bug report
|
|
2
|
+
description: Report incorrect filelists, diagnostics, conflicts, or dependency graphs.
|
|
3
|
+
title: "[Bug]: "
|
|
4
|
+
labels: [bug]
|
|
5
|
+
body:
|
|
6
|
+
- type: markdown
|
|
7
|
+
attributes:
|
|
8
|
+
value: Do not attach proprietary RTL unless you are authorized to disclose it.
|
|
9
|
+
- type: input
|
|
10
|
+
id: version
|
|
11
|
+
attributes:
|
|
12
|
+
label: flist-mcp version or commit
|
|
13
|
+
placeholder: 0.16.0 or a commit SHA
|
|
14
|
+
validations:
|
|
15
|
+
required: true
|
|
16
|
+
- type: textarea
|
|
17
|
+
id: invocation
|
|
18
|
+
attributes:
|
|
19
|
+
label: Tool invocation
|
|
20
|
+
description: Include top modules, source globs, defines, and resolutions.
|
|
21
|
+
validations:
|
|
22
|
+
required: true
|
|
23
|
+
- type: textarea
|
|
24
|
+
id: reproduction
|
|
25
|
+
attributes:
|
|
26
|
+
label: Minimal reproduction
|
|
27
|
+
description: Provide minimal non-proprietary SystemVerilog sources or a repository link.
|
|
28
|
+
validations:
|
|
29
|
+
required: true
|
|
30
|
+
- type: textarea
|
|
31
|
+
id: observed
|
|
32
|
+
attributes:
|
|
33
|
+
label: Observed result
|
|
34
|
+
validations:
|
|
35
|
+
required: true
|
|
36
|
+
- type: textarea
|
|
37
|
+
id: expected
|
|
38
|
+
attributes:
|
|
39
|
+
label: Expected result
|
|
40
|
+
validations:
|
|
41
|
+
required: true
|
|
42
|
+
- type: textarea
|
|
43
|
+
id: environment
|
|
44
|
+
attributes:
|
|
45
|
+
label: Environment
|
|
46
|
+
description: Operating system, Python version, and uv version.
|
|
47
|
+
validations:
|
|
48
|
+
required: true
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
name: Feature request
|
|
2
|
+
description: Propose a focused improvement to the analysis or MCP contract.
|
|
3
|
+
title: "[Feature]: "
|
|
4
|
+
labels: [enhancement]
|
|
5
|
+
body:
|
|
6
|
+
- type: textarea
|
|
7
|
+
id: problem
|
|
8
|
+
attributes:
|
|
9
|
+
label: Problem
|
|
10
|
+
description: Describe the agent workflow or filelist problem this would solve.
|
|
11
|
+
validations:
|
|
12
|
+
required: true
|
|
13
|
+
- type: textarea
|
|
14
|
+
id: behavior
|
|
15
|
+
attributes:
|
|
16
|
+
label: Proposed behavior
|
|
17
|
+
description: Include expected tool inputs and outputs when relevant.
|
|
18
|
+
validations:
|
|
19
|
+
required: true
|
|
20
|
+
- type: textarea
|
|
21
|
+
id: alternatives
|
|
22
|
+
attributes:
|
|
23
|
+
label: Alternatives considered
|
|
24
|
+
validations:
|
|
25
|
+
required: false
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
## Summary
|
|
2
|
+
|
|
3
|
+
Describe the user-visible behavior and motivation.
|
|
4
|
+
|
|
5
|
+
## Verification
|
|
6
|
+
|
|
7
|
+
- [ ] `make check`
|
|
8
|
+
- [ ] `make check-all` when Slang, discovery, graphs, examples, or real-world behavior changed
|
|
9
|
+
- [ ] Documentation, MCP descriptions, Pydantic schemas, examples, and tests are synchronized
|
|
10
|
+
- [ ] No generated artifacts, caches, downloaded repositories, or proprietary RTL are included
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
workflow_dispatch:
|
|
8
|
+
|
|
9
|
+
permissions:
|
|
10
|
+
contents: read
|
|
11
|
+
|
|
12
|
+
concurrency:
|
|
13
|
+
group: ci-${{ github.workflow }}-${{ github.ref }}
|
|
14
|
+
cancel-in-progress: true
|
|
15
|
+
|
|
16
|
+
jobs:
|
|
17
|
+
quality:
|
|
18
|
+
name: Quality gates
|
|
19
|
+
runs-on: ubuntu-latest
|
|
20
|
+
timeout-minutes: 10
|
|
21
|
+
steps:
|
|
22
|
+
- name: Check out repository
|
|
23
|
+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
24
|
+
with:
|
|
25
|
+
fetch-depth: 0
|
|
26
|
+
- name: Install uv
|
|
27
|
+
uses: astral-sh/setup-uv@bec219d24cd3e171d82865faccec33120bb574f4 # v10.1.0
|
|
28
|
+
with:
|
|
29
|
+
enable-cache: true
|
|
30
|
+
cache-dependency-glob: uv.lock
|
|
31
|
+
- name: Install Python
|
|
32
|
+
run: uv python install 3.10
|
|
33
|
+
- name: Synchronize locked environment
|
|
34
|
+
run: uv sync --python 3.10 --frozen
|
|
35
|
+
- name: Run formatting, lint, typing, and complexity checks
|
|
36
|
+
run: make lock-check format-check lint typecheck complexity
|
|
37
|
+
|
|
38
|
+
unit-tests:
|
|
39
|
+
name: Unit tests and coverage
|
|
40
|
+
runs-on: ubuntu-latest
|
|
41
|
+
timeout-minutes: 10
|
|
42
|
+
permissions:
|
|
43
|
+
contents: read
|
|
44
|
+
id-token: write
|
|
45
|
+
steps:
|
|
46
|
+
- name: Check out repository
|
|
47
|
+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
48
|
+
with:
|
|
49
|
+
fetch-depth: 0
|
|
50
|
+
- name: Install uv
|
|
51
|
+
uses: astral-sh/setup-uv@bec219d24cd3e171d82865faccec33120bb574f4 # v10.1.0
|
|
52
|
+
with:
|
|
53
|
+
enable-cache: true
|
|
54
|
+
cache-dependency-glob: uv.lock
|
|
55
|
+
- name: Install Python
|
|
56
|
+
run: uv python install 3.10
|
|
57
|
+
- name: Synchronize locked environment
|
|
58
|
+
run: uv sync --python 3.10 --frozen
|
|
59
|
+
- name: Run unit tests with branch coverage
|
|
60
|
+
run: make test
|
|
61
|
+
- name: Generate coverage XML
|
|
62
|
+
run: uv run --frozen coverage xml -o coverage.xml
|
|
63
|
+
- name: Upload coverage to Codecov
|
|
64
|
+
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository
|
|
65
|
+
uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0
|
|
66
|
+
with:
|
|
67
|
+
use_oidc: true
|
|
68
|
+
files: ./coverage.xml
|
|
69
|
+
disable_search: true
|
|
70
|
+
flags: unit
|
|
71
|
+
fail_ci_if_error: true
|
|
72
|
+
|
|
73
|
+
real-world:
|
|
74
|
+
name: AXI and CVA6 integration
|
|
75
|
+
runs-on: ubuntu-latest
|
|
76
|
+
timeout-minutes: 20
|
|
77
|
+
steps:
|
|
78
|
+
- name: Check out repository
|
|
79
|
+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
80
|
+
with:
|
|
81
|
+
fetch-depth: 0
|
|
82
|
+
- name: Install uv
|
|
83
|
+
uses: astral-sh/setup-uv@bec219d24cd3e171d82865faccec33120bb574f4 # v10.1.0
|
|
84
|
+
with:
|
|
85
|
+
enable-cache: true
|
|
86
|
+
cache-dependency-glob: uv.lock
|
|
87
|
+
- name: Install Python
|
|
88
|
+
run: uv python install 3.10
|
|
89
|
+
- name: Synchronize locked environment
|
|
90
|
+
run: uv sync --python 3.10 --frozen
|
|
91
|
+
- name: Restore real-world RTL checkouts
|
|
92
|
+
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
|
|
93
|
+
with:
|
|
94
|
+
path: .realworld-cache
|
|
95
|
+
key: realworld-${{ runner.os }}-${{ hashFiles('tests/conftest.py', 'tests/test_*_integration.py') }}
|
|
96
|
+
restore-keys: |
|
|
97
|
+
realworld-${{ runner.os }}-
|
|
98
|
+
- name: Run pinned AXI and CVA6 tests
|
|
99
|
+
run: make test-realworld
|
|
100
|
+
|
|
101
|
+
package:
|
|
102
|
+
name: Build distribution
|
|
103
|
+
runs-on: ubuntu-latest
|
|
104
|
+
timeout-minutes: 10
|
|
105
|
+
steps:
|
|
106
|
+
- name: Check out repository
|
|
107
|
+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
108
|
+
with:
|
|
109
|
+
fetch-depth: 0
|
|
110
|
+
- name: Install uv
|
|
111
|
+
uses: astral-sh/setup-uv@bec219d24cd3e171d82865faccec33120bb574f4 # v10.1.0
|
|
112
|
+
with:
|
|
113
|
+
enable-cache: true
|
|
114
|
+
cache-dependency-glob: uv.lock
|
|
115
|
+
- name: Install Python
|
|
116
|
+
run: uv python install 3.10
|
|
117
|
+
- name: Synchronize locked environment
|
|
118
|
+
run: uv sync --python 3.10 --frozen
|
|
119
|
+
- name: Build wheel and source distribution
|
|
120
|
+
run: uv build
|
|
121
|
+
- name: Verify console entry point
|
|
122
|
+
run: unzip -p dist/*.whl '*/entry_points.txt' | grep -Fx 'flist-mcp = flist_mcp.mcp_main:main'
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
name: Release artifacts
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags: ["v*"]
|
|
6
|
+
|
|
7
|
+
permissions:
|
|
8
|
+
contents: read
|
|
9
|
+
|
|
10
|
+
concurrency:
|
|
11
|
+
group: release-${{ github.ref }}
|
|
12
|
+
cancel-in-progress: false
|
|
13
|
+
|
|
14
|
+
jobs:
|
|
15
|
+
build:
|
|
16
|
+
name: Verify tagged release
|
|
17
|
+
runs-on: ubuntu-latest
|
|
18
|
+
timeout-minutes: 20
|
|
19
|
+
steps:
|
|
20
|
+
- name: Check out tagged commit
|
|
21
|
+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
22
|
+
with:
|
|
23
|
+
fetch-depth: 0
|
|
24
|
+
- name: Install uv
|
|
25
|
+
uses: astral-sh/setup-uv@bec219d24cd3e171d82865faccec33120bb574f4 # v10.1.0
|
|
26
|
+
with:
|
|
27
|
+
enable-cache: true
|
|
28
|
+
cache-dependency-glob: uv.lock
|
|
29
|
+
- name: Install Python
|
|
30
|
+
run: uv python install 3.10
|
|
31
|
+
- name: Synchronize locked environment
|
|
32
|
+
run: uv sync --python 3.10 --frozen
|
|
33
|
+
- name: Run full verification suite
|
|
34
|
+
run: make check-all
|
|
35
|
+
- name: Build wheel and source distribution
|
|
36
|
+
run: uv build
|
|
37
|
+
- name: Verify artifact version matches tag
|
|
38
|
+
run: |
|
|
39
|
+
version="${GITHUB_REF_NAME#v}"
|
|
40
|
+
test -f "dist/flist_mcp-${version}-py3-none-any.whl"
|
|
41
|
+
test -f "dist/flist_mcp-${version}.tar.gz"
|
|
42
|
+
- name: Store verified artifacts
|
|
43
|
+
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
|
|
44
|
+
with:
|
|
45
|
+
name: flist-mcp-${{ github.ref_name }}
|
|
46
|
+
path: dist/*
|
|
47
|
+
if-no-files-found: error
|
|
48
|
+
retention-days: 14
|
|
49
|
+
|
|
50
|
+
publish:
|
|
51
|
+
name: Publish to PyPI
|
|
52
|
+
needs: build
|
|
53
|
+
runs-on: ubuntu-latest
|
|
54
|
+
timeout-minutes: 10
|
|
55
|
+
environment: pypi
|
|
56
|
+
permissions:
|
|
57
|
+
id-token: write
|
|
58
|
+
steps:
|
|
59
|
+
- name: Download verified artifacts
|
|
60
|
+
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
|
|
61
|
+
with:
|
|
62
|
+
name: flist-mcp-${{ github.ref_name }}
|
|
63
|
+
path: dist
|
|
64
|
+
- name: Publish package distributions to PyPI
|
|
65
|
+
uses: pypa/gh-action-pypi-publish@dc37677b2e1c63e2034f94d8a5b11f265b73ba33 # v1.14.2
|
|
66
|
+
|
|
67
|
+
github-release:
|
|
68
|
+
name: Create GitHub Release
|
|
69
|
+
needs: publish
|
|
70
|
+
runs-on: ubuntu-latest
|
|
71
|
+
timeout-minutes: 10
|
|
72
|
+
permissions:
|
|
73
|
+
contents: write
|
|
74
|
+
steps:
|
|
75
|
+
- name: Create release from the published tag
|
|
76
|
+
env:
|
|
77
|
+
GH_TOKEN: ${{ github.token }}
|
|
78
|
+
GH_REPO: ${{ github.repository }}
|
|
79
|
+
run: >-
|
|
80
|
+
gh release create "$GITHUB_REF_NAME"
|
|
81
|
+
--verify-tag --generate-notes
|
|
82
|
+
--title "flist-mcp ${GITHUB_REF_NAME#v}"
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
3.10
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# Repository instructions for coding agents
|
|
2
|
+
|
|
3
|
+
These instructions apply to the entire repository.
|
|
4
|
+
|
|
5
|
+
## Environment and commands
|
|
6
|
+
|
|
7
|
+
- Target CPython 3.10 and use `uv`; do not introduce another environment or dependency manager.
|
|
8
|
+
- Run project tools through `uv run --frozen`. Keep `uv.lock` synchronized with `pyproject.toml`.
|
|
9
|
+
- Use `make check` for every change. Use `make check-all` when changing Slang integration,
|
|
10
|
+
discovery, analysis, graph construction, examples, or real-world tests.
|
|
11
|
+
- Do not weaken Ruff, Pylint, strict mypy, Xenon, warnings-as-errors, branch coverage, or CVA6
|
|
12
|
+
performance gates merely to make a change pass. Document a genuine reason for any adjustment.
|
|
13
|
+
|
|
14
|
+
## Architecture and public contracts
|
|
15
|
+
|
|
16
|
+
- Treat Slang as the sole source of SystemVerilog parsing, elaboration, diagnostics, dependency
|
|
17
|
+
closure, and topological ordering.
|
|
18
|
+
- Do not parse RTL text with regular expressions or implement a separate dependency-order
|
|
19
|
+
algorithm.
|
|
20
|
+
- Preserve the stateful protocol: iterative `analyze_top`, followed by `diagnose_top` and/or
|
|
21
|
+
`get_dependency_graph` after the top is ready.
|
|
22
|
+
- Keep MCP descriptions self-contained. When a public argument or result changes, update the
|
|
23
|
+
Pydantic output models, tool descriptions, documentation, examples, and contract tests together.
|
|
24
|
+
- Keep package files out of `source_order`; preserve Slang order within `package_order` and
|
|
25
|
+
`source_order`.
|
|
26
|
+
- Keep warnings opt-in and undefined design macros advisory unless the public contract is
|
|
27
|
+
deliberately revised.
|
|
28
|
+
|
|
29
|
+
## Repository hygiene
|
|
30
|
+
|
|
31
|
+
- Prefer small typed helpers over broad suppressions. Add focused unit tests for conflict,
|
|
32
|
+
include, diagnostic, and graph edge cases.
|
|
33
|
+
- Do not commit `.venv`, caches, downloaded real-world repositories, coverage data, or build
|
|
34
|
+
artifacts.
|
|
35
|
+
- Keep examples under `docs/examples`, validate them against public output models, and state the
|
|
36
|
+
pinned design revision and call parameters used to produce them.
|
|
37
|
+
- Preserve unrelated user changes and avoid destructive Git operations.
|
flist_mcp-0.16.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Sergey Aparin
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
.PHONY: format format-check lint typecheck complexity test test-realworld lock-check check check-all
|
|
2
|
+
|
|
3
|
+
UV_RUN := uv run --frozen
|
|
4
|
+
RUFF := $(UV_RUN) ruff
|
|
5
|
+
PYLINT := $(UV_RUN) pylint
|
|
6
|
+
MYPY := $(UV_RUN) mypy
|
|
7
|
+
PYTEST := $(UV_RUN) pytest
|
|
8
|
+
XENON := $(UV_RUN) xenon
|
|
9
|
+
|
|
10
|
+
format:
|
|
11
|
+
$(RUFF) format src tests
|
|
12
|
+
$(RUFF) check --fix src tests
|
|
13
|
+
|
|
14
|
+
format-check:
|
|
15
|
+
$(RUFF) format --check src tests
|
|
16
|
+
|
|
17
|
+
lint:
|
|
18
|
+
$(RUFF) check src tests
|
|
19
|
+
$(PYLINT) src tests
|
|
20
|
+
|
|
21
|
+
typecheck:
|
|
22
|
+
$(MYPY) src tests
|
|
23
|
+
|
|
24
|
+
complexity:
|
|
25
|
+
$(XENON) --max-absolute B --max-modules B --max-average A src
|
|
26
|
+
|
|
27
|
+
test:
|
|
28
|
+
$(PYTEST) -m "not integration" --cov=flist_mcp --cov-branch
|
|
29
|
+
|
|
30
|
+
test-realworld:
|
|
31
|
+
FLIST_MCP_REALWORLD=1 $(PYTEST) -m integration
|
|
32
|
+
|
|
33
|
+
lock-check:
|
|
34
|
+
uv lock --check
|
|
35
|
+
|
|
36
|
+
check: lock-check format-check lint typecheck complexity test
|
|
37
|
+
|
|
38
|
+
check-all: check test-realworld
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: flist-mcp
|
|
3
|
+
Version: 0.16.0
|
|
4
|
+
Summary: Slang-backed SystemVerilog filelist analysis over MCP
|
|
5
|
+
Project-URL: Homepage, https://github.com/Bigyin1/flist-mcp
|
|
6
|
+
Project-URL: Documentation, https://github.com/Bigyin1/flist-mcp/tree/main/docs
|
|
7
|
+
Project-URL: Issues, https://github.com/Bigyin1/flist-mcp/issues
|
|
8
|
+
Project-URL: Repository, https://github.com/Bigyin1/flist-mcp
|
|
9
|
+
Author-email: Sergey Aparin <aparin.sv@phystech.edu>
|
|
10
|
+
License-Expression: MIT
|
|
11
|
+
License-File: LICENSE
|
|
12
|
+
Keywords: filelist,mcp,slang,systemverilog,verilog
|
|
13
|
+
Classifier: Development Status :: 4 - Beta
|
|
14
|
+
Classifier: Intended Audience :: Developers
|
|
15
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
16
|
+
Classifier: Programming Language :: Python :: 3
|
|
17
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
19
|
+
Classifier: Topic :: Software Development :: Build Tools
|
|
20
|
+
Classifier: Topic :: Software Development :: Compilers
|
|
21
|
+
Requires-Python: >=3.10
|
|
22
|
+
Requires-Dist: mcp<3,>=2
|
|
23
|
+
Requires-Dist: pydantic<3,>=2.11
|
|
24
|
+
Requires-Dist: pyslang==11.0.0
|
|
25
|
+
Description-Content-Type: text/markdown
|
|
26
|
+
|
|
27
|
+
# flist-mcp
|
|
28
|
+
|
|
29
|
+
[](https://github.com/Bigyin1/flist-mcp/actions/workflows/ci.yml)
|
|
30
|
+
[](https://codecov.io/gh/Bigyin1/flist-mcp)
|
|
31
|
+
[](https://pypi.org/project/flist-mcp/)
|
|
32
|
+
[](https://github.com/Bigyin1/flist-mcp/tags)
|
|
33
|
+
[](https://www.python.org/)
|
|
34
|
+
[](https://docs.astral.sh/uv/)
|
|
35
|
+
[](https://docs.astral.sh/ruff/)
|
|
36
|
+
[](https://mypy-lang.org/)
|
|
37
|
+
[](LICENSE)
|
|
38
|
+
|
|
39
|
+
`flist-mcp` is a Slang-backed MCP server that helps coding agents construct SystemVerilog
|
|
40
|
+
filelists. Given one or more top modules, it discovers the reachable compilation closure, returns
|
|
41
|
+
package and source files in topological order, finds include roots, reports ambiguous definitions,
|
|
42
|
+
and exposes diagnostics and focused dependency graphs.
|
|
43
|
+
|
|
44
|
+
Slang remains the source of truth for parsing, elaboration, diagnostics, and dependency ordering.
|
|
45
|
+
The server does not parse RTL with regular expressions, invent its own topological order, or emit a
|
|
46
|
+
build-system-specific manifest.
|
|
47
|
+
|
|
48
|
+
## Features
|
|
49
|
+
|
|
50
|
+
- Iterative resolution of duplicate module, interface, and package definitions.
|
|
51
|
+
- Automatic discovery of unique repository-local include roots.
|
|
52
|
+
- Explicit resolution when several headers satisfy the same include path.
|
|
53
|
+
- Separate topological `package_order` and `source_order` filelists.
|
|
54
|
+
- Diagnostics, missing includes, undefined design macros, and unresolved external symbols.
|
|
55
|
+
- `full`, elaborated `rtl`, and compact `external` dependency graph views.
|
|
56
|
+
- Strict machine-readable MCP input and output schemas.
|
|
57
|
+
|
|
58
|
+
## Quick start
|
|
59
|
+
|
|
60
|
+
Install and start the latest PyPI release with [uv](https://docs.astral.sh/uv/):
|
|
61
|
+
|
|
62
|
+
```sh
|
|
63
|
+
uvx flist-mcp
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
Example stdio MCP configuration using the published package:
|
|
67
|
+
|
|
68
|
+
```json
|
|
69
|
+
{
|
|
70
|
+
"mcpServers": {
|
|
71
|
+
"flist": {
|
|
72
|
+
"command": "uvx",
|
|
73
|
+
"args": ["flist-mcp"]
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
For a reproducible client configuration, pin a release explicitly:
|
|
80
|
+
|
|
81
|
+
```json
|
|
82
|
+
{
|
|
83
|
+
"command": "uvx",
|
|
84
|
+
"args": ["--from", "flist-mcp==0.16.0", "flist-mcp"]
|
|
85
|
+
}
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
## Platform requirements
|
|
89
|
+
|
|
90
|
+
`flist-mcp` requires CPython 3.10 or newer. CI currently validates CPython 3.10 on Ubuntu. The
|
|
91
|
+
server itself is Python, but `pyslang==11.0.0` is a native extension and determines platform
|
|
92
|
+
availability. Upstream provides wheels for CPython 3.10 through 3.14 on:
|
|
93
|
+
|
|
94
|
+
- Linux with glibc 2.27 or newer, on x86-64 and AArch64.
|
|
95
|
+
- macOS 11 or newer, on Apple Silicon and Intel via universal2 wheels.
|
|
96
|
+
- 64-bit Windows on x86-64.
|
|
97
|
+
|
|
98
|
+
Prebuilt `pyslang` wheels are not available for Alpine/musl Linux, 32-bit systems, Windows ARM64,
|
|
99
|
+
or other architectures; these platforms are outside the tested `flist-mcp` runtime matrix.
|
|
100
|
+
|
|
101
|
+
Git is not required to analyze an existing source directory. It is needed only to clone this
|
|
102
|
+
repository for development and by the real-world integration tests that fetch pinned RTL projects.
|
|
103
|
+
|
|
104
|
+
## Agent flow
|
|
105
|
+
|
|
106
|
+
1. Call `analyze_top(repository, top_modules)`.
|
|
107
|
+
2. If it returns `needs_resolution`, select candidates from
|
|
108
|
+
`required_definition_conflicts` and `required_include_conflicts`, then call `analyze_top` again.
|
|
109
|
+
3. When it returns `ready_for_diagnostics`, use its topologically sorted filelists.
|
|
110
|
+
4. Call `diagnose_top()` for semantic diagnostics or `get_dependency_graph(view=...)` for a focused
|
|
111
|
+
graph. Both reuse one cached semantic analysis.
|
|
112
|
+
|
|
113
|
+
Only one active top is stored in a server process. Changing the repository, top modules, or source
|
|
114
|
+
globs starts a new flow.
|
|
115
|
+
|
|
116
|
+
## Documentation
|
|
117
|
+
|
|
118
|
+
- [Getting started and MCP configuration](docs/getting-started.md)
|
|
119
|
+
- [Agent workflow and result semantics](docs/agent-workflow.md)
|
|
120
|
+
- [Dependency graph views](docs/dependency-graphs.md)
|
|
121
|
+
- [Development and architecture](docs/development.md)
|
|
122
|
+
- [Versioning and release artifacts](docs/versioning.md)
|
|
123
|
+
- [Current CVA6 examples](docs/examples/README.md)
|
|
124
|
+
- [Contributing](docs/CONTRIBUTING.md)
|
|
125
|
+
- [Security policy](docs/SECURITY.md)
|
|
126
|
+
|
|
127
|
+
## Development
|
|
128
|
+
|
|
129
|
+
Development requires Git and uv:
|
|
130
|
+
|
|
131
|
+
```sh
|
|
132
|
+
git clone https://github.com/Bigyin1/flist-mcp.git
|
|
133
|
+
cd flist-mcp
|
|
134
|
+
uv sync --python 3.10 --frozen
|
|
135
|
+
make check
|
|
136
|
+
make check-all
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
`make check` is network-free. `make check-all` additionally downloads pinned sparse checkouts of
|
|
140
|
+
PULP AXI and CVA6 into the ignored `.realworld-cache` directory and runs the integration and
|
|
141
|
+
performance suite.
|
|
142
|
+
|
|
143
|
+
## License
|
|
144
|
+
|
|
145
|
+
Licensed under the [MIT License](LICENSE).
|