inkscape-mcp 1.0.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.
- inkscape_mcp-1.0.0/.github/dependabot.yml +45 -0
- inkscape_mcp-1.0.0/.github/labeler.yml +61 -0
- inkscape_mcp-1.0.0/.github/workflows/ci.yml +59 -0
- inkscape_mcp-1.0.0/.github/workflows/publish.yml +71 -0
- inkscape_mcp-1.0.0/.github/workflows/release.yml +54 -0
- inkscape_mcp-1.0.0/.github/workflows/security.yml +47 -0
- inkscape_mcp-1.0.0/.gitignore +184 -0
- inkscape_mcp-1.0.0/.gitmessage +16 -0
- inkscape_mcp-1.0.0/.markdownlint.json +21 -0
- inkscape_mcp-1.0.0/.pre-commit-config.yaml +44 -0
- inkscape_mcp-1.0.0/CONTRIBUTING.md +30 -0
- inkscape_mcp-1.0.0/LICENSE +21 -0
- inkscape_mcp-1.0.0/NOTICE.md +60 -0
- inkscape_mcp-1.0.0/PKG-INFO +179 -0
- inkscape_mcp-1.0.0/README.md +147 -0
- inkscape_mcp-1.0.0/assets/buymeacoffee-qr.png +0 -0
- inkscape_mcp-1.0.0/docs/API.md +192 -0
- inkscape_mcp-1.0.0/docs/ARCHITECTURE.md +79 -0
- inkscape_mcp-1.0.0/docs/FEATURES.md +82 -0
- inkscape_mcp-1.0.0/docs/INKSCAPE.md +34 -0
- inkscape_mcp-1.0.0/docs/INSTALL.md +54 -0
- inkscape_mcp-1.0.0/docs/README.md +15 -0
- inkscape_mcp-1.0.0/docs/TOOLS.md +130 -0
- inkscape_mcp-1.0.0/docs/TROUBLESHOOTING.md +118 -0
- inkscape_mcp-1.0.0/docs/USAGE.md +52 -0
- inkscape_mcp-1.0.0/docs/reference/inkscape-1.4.4-actions.txt +1071 -0
- inkscape_mcp-1.0.0/docs/reference/inkscape-1.4.4-help.txt +76 -0
- inkscape_mcp-1.0.0/docs/reference/mcp-workflow.md +223 -0
- inkscape_mcp-1.0.0/glama.json +106 -0
- inkscape_mcp-1.0.0/pyproject.toml +120 -0
- inkscape_mcp-1.0.0/pytest.ini +6 -0
- inkscape_mcp-1.0.0/src/inkscape_mcp/__init__.py +22 -0
- inkscape_mcp-1.0.0/src/inkscape_mcp/cli_wrapper.py +357 -0
- inkscape_mcp-1.0.0/src/inkscape_mcp/clipboard.py +147 -0
- inkscape_mcp-1.0.0/src/inkscape_mcp/config.py +433 -0
- inkscape_mcp-1.0.0/src/inkscape_mcp/dbus_client.py +159 -0
- inkscape_mcp-1.0.0/src/inkscape_mcp/extension_bridge.py +193 -0
- inkscape_mcp-1.0.0/src/inkscape_mcp/inkscape_detector.py +41 -0
- inkscape_mcp-1.0.0/src/inkscape_mcp/logging_config.py +271 -0
- inkscape_mcp-1.0.0/src/inkscape_mcp/main.py +493 -0
- inkscape_mcp-1.0.0/src/inkscape_mcp/mcp_tool_types.py +134 -0
- inkscape_mcp-1.0.0/src/inkscape_mcp/plugins/README.md +170 -0
- inkscape_mcp-1.0.0/src/inkscape_mcp/plugins/ag_batch_trace.inx +18 -0
- inkscape_mcp-1.0.0/src/inkscape_mcp/plugins/ag_batch_trace.py +80 -0
- inkscape_mcp-1.0.0/src/inkscape_mcp/plugins/ag_color_quantize.inx +17 -0
- inkscape_mcp-1.0.0/src/inkscape_mcp/plugins/ag_color_quantize.py +167 -0
- inkscape_mcp-1.0.0/src/inkscape_mcp/plugins/ag_layer_animation.inx +23 -0
- inkscape_mcp-1.0.0/src/inkscape_mcp/plugins/ag_layer_animation.py +141 -0
- inkscape_mcp-1.0.0/src/inkscape_mcp/plugins/ag_unity_prep.inx +18 -0
- inkscape_mcp-1.0.0/src/inkscape_mcp/plugins/ag_unity_prep.py +144 -0
- inkscape_mcp-1.0.0/src/inkscape_mcp/plugins/mcp_echo.inx +12 -0
- inkscape_mcp-1.0.0/src/inkscape_mcp/plugins/mcp_echo.py +65 -0
- inkscape_mcp-1.0.0/src/inkscape_mcp/plugins/mcp_edit_xml.inx +12 -0
- inkscape_mcp-1.0.0/src/inkscape_mcp/plugins/mcp_edit_xml.py +198 -0
- inkscape_mcp-1.0.0/src/inkscape_mcp/plugins/mcp_execute.inx +12 -0
- inkscape_mcp-1.0.0/src/inkscape_mcp/plugins/mcp_execute.py +164 -0
- inkscape_mcp-1.0.0/src/inkscape_mcp/plugins/mcp_inspect.inx +12 -0
- inkscape_mcp-1.0.0/src/inkscape_mcp/plugins/mcp_inspect.py +509 -0
- inkscape_mcp-1.0.0/src/inkscape_mcp/plugins/mcp_path_edit.inx +12 -0
- inkscape_mcp-1.0.0/src/inkscape_mcp/plugins/mcp_path_edit.py +350 -0
- inkscape_mcp-1.0.0/src/inkscape_mcp/prefab.py +51 -0
- inkscape_mcp-1.0.0/src/inkscape_mcp/prompts_resources.py +116 -0
- inkscape_mcp-1.0.0/src/inkscape_mcp/py.typed +1 -0
- inkscape_mcp-1.0.0/src/inkscape_mcp/skills/SKILL.md +88 -0
- inkscape_mcp-1.0.0/src/inkscape_mcp/tools/__init__.py +34 -0
- inkscape_mcp-1.0.0/src/inkscape_mcp/tools/_svg_io.py +25 -0
- inkscape_mcp-1.0.0/src/inkscape_mcp/tools/analysis.py +582 -0
- inkscape_mcp-1.0.0/src/inkscape_mcp/tools/extension.py +710 -0
- inkscape_mcp-1.0.0/src/inkscape_mcp/tools/file_operations.py +636 -0
- inkscape_mcp-1.0.0/src/inkscape_mcp/tools/gradient.py +259 -0
- inkscape_mcp-1.0.0/src/inkscape_mcp/tools/live.py +1044 -0
- inkscape_mcp-1.0.0/src/inkscape_mcp/tools/metadata.py +212 -0
- inkscape_mcp-1.0.0/src/inkscape_mcp/tools/system.py +442 -0
- inkscape_mcp-1.0.0/src/inkscape_mcp/tools/tile_clone.py +146 -0
- inkscape_mcp-1.0.0/src/inkscape_mcp/tools/vector_operations.py +1443 -0
- inkscape_mcp-1.0.0/src/inkscape_mcp/transport.py +249 -0
- inkscape_mcp-1.0.0/tests/__init__.py +0 -0
- inkscape_mcp-1.0.0/tests/_helpers.py +12 -0
- inkscape_mcp-1.0.0/tests/conftest.py +71 -0
- inkscape_mcp-1.0.0/tests/fixtures/minimal.svg +12 -0
- inkscape_mcp-1.0.0/tests/fixtures/multi_path.svg +9 -0
- inkscape_mcp-1.0.0/tests/test_auto_save.py +84 -0
- inkscape_mcp-1.0.0/tests/test_clipboard.py +72 -0
- inkscape_mcp-1.0.0/tests/test_dbus_client.py +48 -0
- inkscape_mcp-1.0.0/tests/test_edit_xml.py +186 -0
- inkscape_mcp-1.0.0/tests/test_edit_xml_delete_attr.py +87 -0
- inkscape_mcp-1.0.0/tests/test_extension.py +742 -0
- inkscape_mcp-1.0.0/tests/test_extension_bridge.py +161 -0
- inkscape_mcp-1.0.0/tests/test_inkscape_analysis.py +26 -0
- inkscape_mcp-1.0.0/tests/test_inkscape_file.py +197 -0
- inkscape_mcp-1.0.0/tests/test_inkscape_gradient.py +173 -0
- inkscape_mcp-1.0.0/tests/test_inkscape_live.py +141 -0
- inkscape_mcp-1.0.0/tests/test_inkscape_metadata.py +91 -0
- inkscape_mcp-1.0.0/tests/test_inkscape_system.py +32 -0
- inkscape_mcp-1.0.0/tests/test_inkscape_vector.py +237 -0
- inkscape_mcp-1.0.0/tests/test_inspect.py +154 -0
- inkscape_mcp-1.0.0/tests/test_list_actions.py +161 -0
- inkscape_mcp-1.0.0/tests/test_misc_tools.py +16 -0
- inkscape_mcp-1.0.0/tests/test_path_edit.py +187 -0
- inkscape_mcp-1.0.0/tests/test_phase6.py +325 -0
- inkscape_mcp-1.0.0/tests/test_tile_clone.py +67 -0
- inkscape_mcp-1.0.0/tests/test_window_id_fallback.py +53 -0
- inkscape_mcp-1.0.0/tools/repo_stats.py +227 -0
- inkscape_mcp-1.0.0/uv.lock +1905 -0
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# Dependabot configuration — automated dependency PRs.
|
|
2
|
+
# See: https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
|
|
3
|
+
|
|
4
|
+
version: 2
|
|
5
|
+
updates:
|
|
6
|
+
|
|
7
|
+
# Python deps (pyproject.toml + uv.lock)
|
|
8
|
+
- package-ecosystem: "uv"
|
|
9
|
+
directory: "/"
|
|
10
|
+
schedule:
|
|
11
|
+
interval: "weekly"
|
|
12
|
+
day: "monday"
|
|
13
|
+
time: "06:00"
|
|
14
|
+
timezone: "Etc/UTC"
|
|
15
|
+
open-pull-requests-limit: 5
|
|
16
|
+
labels:
|
|
17
|
+
- "dependencies"
|
|
18
|
+
- "python"
|
|
19
|
+
commit-message:
|
|
20
|
+
prefix: "deps"
|
|
21
|
+
include: "scope"
|
|
22
|
+
# Bundle non-breaking bumps so they land as one PR instead of many.
|
|
23
|
+
groups:
|
|
24
|
+
python-minor-patch:
|
|
25
|
+
update-types:
|
|
26
|
+
- "minor"
|
|
27
|
+
- "patch"
|
|
28
|
+
|
|
29
|
+
# GitHub Actions used in .github/workflows/*.yml
|
|
30
|
+
- package-ecosystem: "github-actions"
|
|
31
|
+
directory: "/"
|
|
32
|
+
schedule:
|
|
33
|
+
interval: "monthly"
|
|
34
|
+
open-pull-requests-limit: 3
|
|
35
|
+
labels:
|
|
36
|
+
- "dependencies"
|
|
37
|
+
- "github-actions"
|
|
38
|
+
commit-message:
|
|
39
|
+
prefix: "ci"
|
|
40
|
+
include: "scope"
|
|
41
|
+
groups:
|
|
42
|
+
actions-minor-patch:
|
|
43
|
+
update-types:
|
|
44
|
+
- "minor"
|
|
45
|
+
- "patch"
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# PR Labeler configuration
|
|
2
|
+
# Automatically labels PRs based on files changed
|
|
3
|
+
|
|
4
|
+
# Code changes
|
|
5
|
+
'source code':
|
|
6
|
+
- src/**
|
|
7
|
+
|
|
8
|
+
'tests':
|
|
9
|
+
- tests/**
|
|
10
|
+
|
|
11
|
+
'documentation':
|
|
12
|
+
- docs/**
|
|
13
|
+
- README.md
|
|
14
|
+
- CHANGELOG.md
|
|
15
|
+
- "*.md"
|
|
16
|
+
|
|
17
|
+
'dependencies':
|
|
18
|
+
- pyproject.toml
|
|
19
|
+
- requirements*.txt
|
|
20
|
+
- poetry.lock
|
|
21
|
+
- Pipfile.lock
|
|
22
|
+
|
|
23
|
+
'ci/cd':
|
|
24
|
+
- .github/**
|
|
25
|
+
|
|
26
|
+
'docker':
|
|
27
|
+
- Dockerfile
|
|
28
|
+
- docker-compose*.yml
|
|
29
|
+
- DOCKER_PLAN.md
|
|
30
|
+
|
|
31
|
+
'security':
|
|
32
|
+
- any:
|
|
33
|
+
- '**/security/**'
|
|
34
|
+
- '**/auth/**'
|
|
35
|
+
- '**/crypto/**'
|
|
36
|
+
|
|
37
|
+
# Extensions and plugins
|
|
38
|
+
'extensions':
|
|
39
|
+
- src/inkscape_mcp/plugins/**
|
|
40
|
+
|
|
41
|
+
# Vector operations
|
|
42
|
+
'vector-graphics':
|
|
43
|
+
- src/inkscape_mcp/tools/vector_operations.py
|
|
44
|
+
|
|
45
|
+
# File operations
|
|
46
|
+
'file-operations':
|
|
47
|
+
- src/inkscape_mcp/tools/file_operations.py
|
|
48
|
+
|
|
49
|
+
# Analysis tools
|
|
50
|
+
'analysis':
|
|
51
|
+
- src/inkscape_mcp/tools/analysis.py
|
|
52
|
+
|
|
53
|
+
# System tools
|
|
54
|
+
'system':
|
|
55
|
+
- src/inkscape_mcp/tools/system.py
|
|
56
|
+
|
|
57
|
+
# Core infrastructure
|
|
58
|
+
'infrastructure':
|
|
59
|
+
- src/inkscape_mcp/server.py
|
|
60
|
+
- src/inkscape_mcp/config.py
|
|
61
|
+
- src/inkscape_mcp/__init__.py
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
paths-ignore:
|
|
7
|
+
- "docs/**"
|
|
8
|
+
- "**.md"
|
|
9
|
+
- ".github/ISSUE_TEMPLATE/**"
|
|
10
|
+
pull_request:
|
|
11
|
+
branches: [main]
|
|
12
|
+
|
|
13
|
+
permissions:
|
|
14
|
+
contents: read
|
|
15
|
+
|
|
16
|
+
concurrency:
|
|
17
|
+
group: ${{ github.workflow }}-${{ github.ref }}
|
|
18
|
+
cancel-in-progress: true
|
|
19
|
+
|
|
20
|
+
jobs:
|
|
21
|
+
test:
|
|
22
|
+
name: Lint + Tests
|
|
23
|
+
runs-on: ubuntu-latest
|
|
24
|
+
timeout-minutes: 10
|
|
25
|
+
steps:
|
|
26
|
+
- uses: actions/checkout@v6
|
|
27
|
+
|
|
28
|
+
- name: Install Inkscape 1.4.x + system headers
|
|
29
|
+
run: |
|
|
30
|
+
sudo apt-get update
|
|
31
|
+
sudo apt-get install -y --no-install-recommends software-properties-common
|
|
32
|
+
sudo add-apt-repository -y ppa:inkscape.dev/stable
|
|
33
|
+
sudo apt-get update
|
|
34
|
+
sudo apt-get install -y --no-install-recommends \
|
|
35
|
+
inkscape \
|
|
36
|
+
libcairo2-dev \
|
|
37
|
+
libgirepository-2.0-dev \
|
|
38
|
+
libgirepository1.0-dev \
|
|
39
|
+
pkg-config \
|
|
40
|
+
python3-dev
|
|
41
|
+
inkscape --version
|
|
42
|
+
|
|
43
|
+
- name: Install uv
|
|
44
|
+
uses: astral-sh/setup-uv@v5
|
|
45
|
+
with:
|
|
46
|
+
python-version: "3.12"
|
|
47
|
+
enable-cache: true
|
|
48
|
+
|
|
49
|
+
- name: Sync project
|
|
50
|
+
run: uv sync --all-extras --dev
|
|
51
|
+
|
|
52
|
+
- name: Ruff lint
|
|
53
|
+
run: uv run ruff check .
|
|
54
|
+
|
|
55
|
+
- name: Ruff format check
|
|
56
|
+
run: uv run ruff format --check .
|
|
57
|
+
|
|
58
|
+
- name: Pytest
|
|
59
|
+
run: uv run pytest tests/ -m "not network" -q --tb=short --ignore=tests/test_inkscape_live.py
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
name: Publish to PyPI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
release:
|
|
5
|
+
types: [published]
|
|
6
|
+
workflow_dispatch:
|
|
7
|
+
|
|
8
|
+
permissions:
|
|
9
|
+
contents: read
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
test:
|
|
13
|
+
name: Re-run tests
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
timeout-minutes: 10
|
|
16
|
+
steps:
|
|
17
|
+
- uses: actions/checkout@v6
|
|
18
|
+
- name: Install Inkscape 1.4.x + system headers
|
|
19
|
+
run: |
|
|
20
|
+
sudo apt-get update
|
|
21
|
+
sudo apt-get install -y --no-install-recommends software-properties-common
|
|
22
|
+
sudo add-apt-repository -y ppa:inkscape.dev/stable
|
|
23
|
+
sudo apt-get update
|
|
24
|
+
sudo apt-get install -y --no-install-recommends \
|
|
25
|
+
inkscape \
|
|
26
|
+
libcairo2-dev \
|
|
27
|
+
libgirepository-2.0-dev \
|
|
28
|
+
libgirepository1.0-dev \
|
|
29
|
+
pkg-config \
|
|
30
|
+
python3-dev
|
|
31
|
+
inkscape --version
|
|
32
|
+
- uses: astral-sh/setup-uv@v5
|
|
33
|
+
with:
|
|
34
|
+
python-version: "3.12"
|
|
35
|
+
enable-cache: true
|
|
36
|
+
- run: uv sync --all-extras --dev
|
|
37
|
+
- run: uv run ruff check .
|
|
38
|
+
- run: uv run pytest tests/ -m "not network" -q --tb=short --ignore=tests/test_inkscape_live.py
|
|
39
|
+
|
|
40
|
+
build:
|
|
41
|
+
name: Build distribution
|
|
42
|
+
needs: test
|
|
43
|
+
runs-on: ubuntu-latest
|
|
44
|
+
timeout-minutes: 5
|
|
45
|
+
steps:
|
|
46
|
+
- uses: actions/checkout@v6
|
|
47
|
+
- uses: astral-sh/setup-uv@v5
|
|
48
|
+
with:
|
|
49
|
+
python-version: "3.12"
|
|
50
|
+
enable-cache: true
|
|
51
|
+
- run: uv build
|
|
52
|
+
- uses: actions/upload-artifact@v4
|
|
53
|
+
with:
|
|
54
|
+
name: dist
|
|
55
|
+
path: dist/
|
|
56
|
+
|
|
57
|
+
publish:
|
|
58
|
+
name: Publish to PyPI (Trusted Publisher / OIDC)
|
|
59
|
+
needs: build
|
|
60
|
+
runs-on: ubuntu-latest
|
|
61
|
+
timeout-minutes: 5
|
|
62
|
+
permissions:
|
|
63
|
+
id-token: write # required for OIDC; no PyPI token needed
|
|
64
|
+
steps:
|
|
65
|
+
- uses: actions/download-artifact@v8
|
|
66
|
+
with:
|
|
67
|
+
name: dist
|
|
68
|
+
path: dist/
|
|
69
|
+
- uses: pypa/gh-action-pypi-publish@release/v1
|
|
70
|
+
with:
|
|
71
|
+
print-hash: true
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
name: Release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- "v*"
|
|
7
|
+
workflow_dispatch:
|
|
8
|
+
inputs:
|
|
9
|
+
tag:
|
|
10
|
+
description: "Tag name to release (e.g. v1.0.0)"
|
|
11
|
+
required: true
|
|
12
|
+
|
|
13
|
+
permissions:
|
|
14
|
+
contents: write
|
|
15
|
+
|
|
16
|
+
jobs:
|
|
17
|
+
release:
|
|
18
|
+
name: GitHub Release
|
|
19
|
+
runs-on: ubuntu-latest
|
|
20
|
+
timeout-minutes: 10
|
|
21
|
+
steps:
|
|
22
|
+
- uses: actions/checkout@v6
|
|
23
|
+
with:
|
|
24
|
+
fetch-depth: 0 # full history so the changelog generator can walk tags
|
|
25
|
+
|
|
26
|
+
- name: Install uv
|
|
27
|
+
uses: astral-sh/setup-uv@v5
|
|
28
|
+
with:
|
|
29
|
+
python-version: "3.12"
|
|
30
|
+
enable-cache: true
|
|
31
|
+
|
|
32
|
+
- name: Build distribution
|
|
33
|
+
run: uv build
|
|
34
|
+
|
|
35
|
+
- name: Resolve tag
|
|
36
|
+
id: tag
|
|
37
|
+
run: |
|
|
38
|
+
TAG="${GITHUB_REF#refs/tags/}"
|
|
39
|
+
if [ -z "$TAG" ] || [ "$TAG" = "$GITHUB_REF" ]; then
|
|
40
|
+
TAG="${{ inputs.tag }}"
|
|
41
|
+
fi
|
|
42
|
+
echo "tag=$TAG" >> "$GITHUB_OUTPUT"
|
|
43
|
+
|
|
44
|
+
- name: Create GitHub Release
|
|
45
|
+
uses: softprops/action-gh-release@v3
|
|
46
|
+
with:
|
|
47
|
+
tag_name: ${{ steps.tag.outputs.tag }}
|
|
48
|
+
name: ${{ steps.tag.outputs.tag }}
|
|
49
|
+
generate_release_notes: true # auto-builds notes from PRs / commits since last tag
|
|
50
|
+
files: |
|
|
51
|
+
dist/*.whl
|
|
52
|
+
dist/*.tar.gz
|
|
53
|
+
draft: false
|
|
54
|
+
prerelease: ${{ contains(steps.tag.outputs.tag, '-') }}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
name: Security
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
schedule:
|
|
5
|
+
- cron: "0 2 * * 1" # weekly, Monday 02:00 UTC — nightly was overkill
|
|
6
|
+
push:
|
|
7
|
+
branches: [main]
|
|
8
|
+
paths:
|
|
9
|
+
- "pyproject.toml"
|
|
10
|
+
- "uv.lock"
|
|
11
|
+
workflow_dispatch:
|
|
12
|
+
|
|
13
|
+
permissions:
|
|
14
|
+
contents: read
|
|
15
|
+
|
|
16
|
+
jobs:
|
|
17
|
+
audit:
|
|
18
|
+
name: Dependency vulnerability scan
|
|
19
|
+
runs-on: ubuntu-latest
|
|
20
|
+
timeout-minutes: 5
|
|
21
|
+
steps:
|
|
22
|
+
- uses: actions/checkout@v6
|
|
23
|
+
|
|
24
|
+
- name: Install system deps for pycairo / pygobject
|
|
25
|
+
run: |
|
|
26
|
+
sudo apt-get update
|
|
27
|
+
sudo apt-get install -y --no-install-recommends \
|
|
28
|
+
libcairo2-dev \
|
|
29
|
+
libgirepository-2.0-dev \
|
|
30
|
+
libgirepository1.0-dev \
|
|
31
|
+
pkg-config \
|
|
32
|
+
python3-dev
|
|
33
|
+
|
|
34
|
+
- name: Install uv
|
|
35
|
+
uses: astral-sh/setup-uv@v5
|
|
36
|
+
with:
|
|
37
|
+
python-version: "3.12"
|
|
38
|
+
enable-cache: true
|
|
39
|
+
|
|
40
|
+
- name: Sync project
|
|
41
|
+
run: uv sync --all-extras
|
|
42
|
+
|
|
43
|
+
- name: pip-audit (third-party deps only)
|
|
44
|
+
run: |
|
|
45
|
+
uv pip install pip-audit
|
|
46
|
+
uv export --no-emit-project --format requirements-txt -o /tmp/requirements.txt
|
|
47
|
+
uv run pip-audit -r /tmp/requirements.txt --disable-pip --strict
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
# Byte-compiled / optimized / DLL files
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*$py.class
|
|
5
|
+
|
|
6
|
+
# C extensions
|
|
7
|
+
*.so
|
|
8
|
+
|
|
9
|
+
# Distribution / packaging
|
|
10
|
+
.Python
|
|
11
|
+
build/
|
|
12
|
+
develop-eggs/
|
|
13
|
+
dist/
|
|
14
|
+
downloads/
|
|
15
|
+
eggs/
|
|
16
|
+
.eggs/
|
|
17
|
+
lib/
|
|
18
|
+
lib64/
|
|
19
|
+
parts/
|
|
20
|
+
sdist/
|
|
21
|
+
var/
|
|
22
|
+
wheels/
|
|
23
|
+
pip-wheel-metadata/
|
|
24
|
+
share/python-wheels/
|
|
25
|
+
*.egg-info/
|
|
26
|
+
.installed.cfg
|
|
27
|
+
*.egg
|
|
28
|
+
MANIFEST
|
|
29
|
+
|
|
30
|
+
# PyInstaller
|
|
31
|
+
# Usually these files are written by a python script from a template
|
|
32
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
33
|
+
*.manifest
|
|
34
|
+
*.spec
|
|
35
|
+
|
|
36
|
+
# Installer logs
|
|
37
|
+
pip-log.txt
|
|
38
|
+
pip-delete-this-directory.txt
|
|
39
|
+
|
|
40
|
+
# Unit test / coverage reports
|
|
41
|
+
htmlcov/
|
|
42
|
+
.tox/
|
|
43
|
+
.nox/
|
|
44
|
+
.coverage
|
|
45
|
+
.coverage.*
|
|
46
|
+
.cache
|
|
47
|
+
nosetests.xml
|
|
48
|
+
coverage.xml
|
|
49
|
+
*.cover
|
|
50
|
+
*.py,cover
|
|
51
|
+
.hypothesis/
|
|
52
|
+
.pytest_cache/
|
|
53
|
+
|
|
54
|
+
# Translations
|
|
55
|
+
*.mo
|
|
56
|
+
*.pot
|
|
57
|
+
|
|
58
|
+
# Django stuff:
|
|
59
|
+
*.log
|
|
60
|
+
local_settings.py
|
|
61
|
+
db.sqlite3
|
|
62
|
+
db.sqlite3-journal
|
|
63
|
+
|
|
64
|
+
# Flask stuff:
|
|
65
|
+
instance/
|
|
66
|
+
.webassets-cache
|
|
67
|
+
|
|
68
|
+
# Scrapy stuff:
|
|
69
|
+
.scrapy
|
|
70
|
+
|
|
71
|
+
# Sphinx documentation
|
|
72
|
+
docs/_build/
|
|
73
|
+
|
|
74
|
+
# PyBuilder
|
|
75
|
+
target/
|
|
76
|
+
|
|
77
|
+
# Jupyter Notebook
|
|
78
|
+
.ipynb_checkpoints
|
|
79
|
+
|
|
80
|
+
# IPython
|
|
81
|
+
profile_default/
|
|
82
|
+
ipython_config.py
|
|
83
|
+
|
|
84
|
+
# pyenv
|
|
85
|
+
.python-version
|
|
86
|
+
|
|
87
|
+
# pipenv
|
|
88
|
+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
|
89
|
+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
|
90
|
+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
|
91
|
+
# install all needed dependencies.
|
|
92
|
+
#Pipfile.lock
|
|
93
|
+
|
|
94
|
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow
|
|
95
|
+
__pypackages__/
|
|
96
|
+
|
|
97
|
+
# Celery stuff
|
|
98
|
+
celerybeat-schedule
|
|
99
|
+
celerybeat.pid
|
|
100
|
+
|
|
101
|
+
# SageMath parsed files
|
|
102
|
+
*.sage.py
|
|
103
|
+
|
|
104
|
+
# Environments
|
|
105
|
+
.env
|
|
106
|
+
.venv
|
|
107
|
+
env/
|
|
108
|
+
venv/
|
|
109
|
+
ENV/
|
|
110
|
+
env.bak/
|
|
111
|
+
venv.bak/
|
|
112
|
+
|
|
113
|
+
# Spyder project settings
|
|
114
|
+
.spyderproject
|
|
115
|
+
.spyproject
|
|
116
|
+
|
|
117
|
+
# Rope project settings
|
|
118
|
+
.ropeproject
|
|
119
|
+
|
|
120
|
+
# mkdocs documentation
|
|
121
|
+
/site
|
|
122
|
+
|
|
123
|
+
# mypy
|
|
124
|
+
.mypy_cache/
|
|
125
|
+
.dmypy.json
|
|
126
|
+
dmypy.json
|
|
127
|
+
|
|
128
|
+
# Pyre type checker
|
|
129
|
+
.pyre/
|
|
130
|
+
|
|
131
|
+
# Ruff
|
|
132
|
+
.ruff_cache/
|
|
133
|
+
|
|
134
|
+
# Node / markdownlint-cli (when run outside pre-commit's managed env)
|
|
135
|
+
node_modules/
|
|
136
|
+
.npm/
|
|
137
|
+
|
|
138
|
+
# uv / pip caches that sometimes land in repo dirs
|
|
139
|
+
.uv-cache/
|
|
140
|
+
pip-cache/
|
|
141
|
+
|
|
142
|
+
# IDEs
|
|
143
|
+
.vscode/
|
|
144
|
+
.idea/
|
|
145
|
+
*.swp
|
|
146
|
+
*.swo
|
|
147
|
+
*~
|
|
148
|
+
|
|
149
|
+
# OS generated files
|
|
150
|
+
.DS_Store
|
|
151
|
+
.DS_Store?
|
|
152
|
+
._*
|
|
153
|
+
.Spotlight-V100
|
|
154
|
+
.Trashes
|
|
155
|
+
ehthumbs.db
|
|
156
|
+
Thumbs.db
|
|
157
|
+
|
|
158
|
+
# Temporary files
|
|
159
|
+
*.tmp
|
|
160
|
+
*.temp
|
|
161
|
+
temp/
|
|
162
|
+
tmp/
|
|
163
|
+
|
|
164
|
+
# Inkscape temporary files
|
|
165
|
+
*.svg.tmp
|
|
166
|
+
*.svg.backup
|
|
167
|
+
|
|
168
|
+
# Test output
|
|
169
|
+
test_output/
|
|
170
|
+
test_results/
|
|
171
|
+
*.png
|
|
172
|
+
*.jpg
|
|
173
|
+
*.pdf
|
|
174
|
+
|
|
175
|
+
# But keep tracked assets (QR codes, logos, etc.) — exception to the broad PNG/JPG rule above.
|
|
176
|
+
!assets/**
|
|
177
|
+
|
|
178
|
+
# Log files
|
|
179
|
+
*.log
|
|
180
|
+
logs/
|
|
181
|
+
|
|
182
|
+
# Configuration overrides
|
|
183
|
+
config.local.yaml
|
|
184
|
+
config.local.yml
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
<type>: <short summary>
|
|
2
|
+
|
|
3
|
+
# ---------------------------------------------------------
|
|
4
|
+
# Types:
|
|
5
|
+
# feat: New features or tools
|
|
6
|
+
# fix: Bug fixes
|
|
7
|
+
# docs: Documentation updates
|
|
8
|
+
# style: Code style/formatting changes
|
|
9
|
+
# refactor: Code refactoring without feature changes
|
|
10
|
+
# test: Testing related changes
|
|
11
|
+
# chore: Maintenance tasks (build, deps, etc.)
|
|
12
|
+
# perf: Performance improvements
|
|
13
|
+
# ci: CI/CD and automation changes
|
|
14
|
+
# ---------------------------------------------------------
|
|
15
|
+
|
|
16
|
+
# Detailed description (Explain the 'Why', not the 'What'):
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"default": true,
|
|
3
|
+
"MD001": false,
|
|
4
|
+
"MD003": { "style": "atx" },
|
|
5
|
+
"MD004": { "style": "dash" },
|
|
6
|
+
"MD007": { "indent": 4 },
|
|
7
|
+
"MD013": false,
|
|
8
|
+
"MD024": false,
|
|
9
|
+
"MD025": { "level": 1 },
|
|
10
|
+
"MD026": false,
|
|
11
|
+
"MD029": { "style": "ordered" },
|
|
12
|
+
"MD030": { "ul_single": 1, "ol_single": 1, "ul_multi": 1, "ol_multi": 1 },
|
|
13
|
+
"MD033": { "allowed_elements": ["br", "kbd", "details", "summary", "sup", "sub", "p", "a", "img"] },
|
|
14
|
+
"MD034": false,
|
|
15
|
+
"MD036": false,
|
|
16
|
+
"MD040": false,
|
|
17
|
+
"MD041": false,
|
|
18
|
+
"MD046": { "style": "fenced" },
|
|
19
|
+
"MD048": { "style": "backtick" },
|
|
20
|
+
"MD060": false
|
|
21
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# Pre-commit hooks — opt-in commit-time checks.
|
|
2
|
+
# Activate locally once with: pre-commit install
|
|
3
|
+
# Run on the whole repo: pre-commit run --all-files
|
|
4
|
+
# Bump pinned versions with: pre-commit autoupdate
|
|
5
|
+
|
|
6
|
+
repos:
|
|
7
|
+
# Ruff: lint + format (mirrors what ci.yml runs).
|
|
8
|
+
- repo: https://github.com/astral-sh/ruff-pre-commit
|
|
9
|
+
rev: v0.15.14
|
|
10
|
+
hooks:
|
|
11
|
+
- id: ruff
|
|
12
|
+
args: [--fix, --exit-non-zero-on-fix]
|
|
13
|
+
- id: ruff-format
|
|
14
|
+
|
|
15
|
+
# Secret scanning — fails the commit if it spots common credential
|
|
16
|
+
# patterns (AWS keys, GitHub tokens, OpenAI keys, private keys,
|
|
17
|
+
# high-entropy strings near suspicious context, etc.).
|
|
18
|
+
- repo: https://github.com/gitleaks/gitleaks
|
|
19
|
+
rev: v8.30.0
|
|
20
|
+
hooks:
|
|
21
|
+
- id: gitleaks
|
|
22
|
+
|
|
23
|
+
# Markdown linting — enforces the rules in .markdownlint.json
|
|
24
|
+
# (heading style, list indent, line length, allowed inline HTML, etc.).
|
|
25
|
+
- repo: https://github.com/igorshubovych/markdownlint-cli
|
|
26
|
+
rev: v0.45.0
|
|
27
|
+
hooks:
|
|
28
|
+
- id: markdownlint
|
|
29
|
+
args: [--config, .markdownlint.json]
|
|
30
|
+
|
|
31
|
+
# Generic file-hygiene checks bundled with pre-commit itself.
|
|
32
|
+
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
33
|
+
rev: v6.0.0
|
|
34
|
+
hooks:
|
|
35
|
+
- id: check-yaml # parses every .yml/.yaml; catches malformed workflows early
|
|
36
|
+
- id: check-toml # parses pyproject.toml etc.
|
|
37
|
+
- id: check-json # parses glama.json etc.
|
|
38
|
+
- id: check-added-large-files
|
|
39
|
+
args: [--maxkb=1024] # 1 MB cap — adjust if you intentionally track bigger assets
|
|
40
|
+
- id: detect-private-key # SSH / PGP / cert keys committed by mistake
|
|
41
|
+
- id: end-of-file-fixer
|
|
42
|
+
- id: trailing-whitespace
|
|
43
|
+
- id: mixed-line-ending
|
|
44
|
+
args: [--fix=lf]
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# Contributing to inkscape_mcp
|
|
2
|
+
|
|
3
|
+
Local Linux fork. PRs are not currently accepted upstream — see the repo `README.md` for context.
|
|
4
|
+
|
|
5
|
+
## Dev setup
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
sudo apt install inkscape libcairo2-dev libgirepository-2.0-dev libgirepository1.0-dev pkg-config python3-dev
|
|
9
|
+
git clone https://github.com/aravindev/inkscape_mcp.git
|
|
10
|
+
cd inkscape_mcp
|
|
11
|
+
uv sync
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
## Workflow
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
uv run pytest -v # MCP-client-driven test suite
|
|
18
|
+
uv run ruff check . # lint
|
|
19
|
+
uv run ruff format . # format
|
|
20
|
+
uv run mypy src/ # type check
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Before opening a branch:
|
|
24
|
+
|
|
25
|
+
- Comments are one-liners that explain _why_. Don't narrate what the code does.
|
|
26
|
+
- Add a test under `tests/` whenever you add or change a tool operation.
|
|
27
|
+
|
|
28
|
+
## License
|
|
29
|
+
|
|
30
|
+
MIT.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Aravind EV
|
|
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.
|