margrete-rpc 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.
Files changed (199) hide show
  1. margrete_rpc-1.0.0/.codex/environments/environment.toml +9 -0
  2. margrete_rpc-1.0.0/.github/workflows/release.yml +117 -0
  3. margrete_rpc-1.0.0/.gitignore +235 -0
  4. margrete_rpc-1.0.0/.gitmodules +3 -0
  5. margrete_rpc-1.0.0/.vscode/launch.json +14 -0
  6. margrete_rpc-1.0.0/.vscode/settings.json +3 -0
  7. margrete_rpc-1.0.0/AGENTS.md +1 -0
  8. margrete_rpc-1.0.0/CLAUDE.md +49 -0
  9. margrete_rpc-1.0.0/PKG-INFO +44 -0
  10. margrete_rpc-1.0.0/README.md +31 -0
  11. margrete_rpc-1.0.0/build.ps1 +211 -0
  12. margrete_rpc-1.0.0/examples/generate/_common.py +109 -0
  13. margrete_rpc-1.0.0/examples/generate/crease.py +117 -0
  14. margrete_rpc-1.0.0/examples/generate/curve.py +233 -0
  15. margrete_rpc-1.0.0/examples/generate/envelop.py +100 -0
  16. margrete_rpc-1.0.0/examples/generate/rain.py +169 -0
  17. margrete_rpc-1.0.0/examples/generate/timing_easing.py +147 -0
  18. margrete_rpc-1.0.0/examples/generate/timing_easing_by_disp.py +126 -0
  19. margrete_rpc-1.0.0/examples/generate/timing_glitch.py +112 -0
  20. margrete_rpc-1.0.0/examples/video-stream/.gitignore +1 -0
  21. margrete_rpc-1.0.0/examples/video-stream/_color.py +159 -0
  22. margrete_rpc-1.0.0/examples/video-stream/_mono.py +35 -0
  23. margrete_rpc-1.0.0/examples/video-stream/_video.py +138 -0
  24. margrete_rpc-1.0.0/examples/video-stream/requirements.txt +5 -0
  25. margrete_rpc-1.0.0/examples/video-stream/stream.py +203 -0
  26. margrete_rpc-1.0.0/format.ps1 +110 -0
  27. margrete_rpc-1.0.0/plugin/.clang-format +3 -0
  28. margrete_rpc-1.0.0/plugin/.gitignore +69 -0
  29. margrete_rpc-1.0.0/plugin/CMakeLists.txt +127 -0
  30. margrete_rpc-1.0.0/plugin/CMakePresets.json +56 -0
  31. margrete_rpc-1.0.0/plugin/config/README-install.txt +14 -0
  32. margrete_rpc-1.0.0/plugin/config/VERSION +1 -0
  33. margrete_rpc-1.0.0/plugin/config/margrete-rpc.ini.in +10 -0
  34. margrete_rpc-1.0.0/plugin/config/meta.h.in +24 -0
  35. margrete_rpc-1.0.0/plugin/config/version.rc.in +34 -0
  36. margrete_rpc-1.0.0/plugin/src/ChartMapper.cpp +240 -0
  37. margrete_rpc-1.0.0/plugin/src/ChartMapper.h +19 -0
  38. margrete_rpc-1.0.0/plugin/src/Config.cpp +180 -0
  39. margrete_rpc-1.0.0/plugin/src/Config.h +29 -0
  40. margrete_rpc-1.0.0/plugin/src/DLLMain.cpp +49 -0
  41. margrete_rpc-1.0.0/plugin/src/Dialog.c +607 -0
  42. margrete_rpc-1.0.0/plugin/src/Dialog.h +13 -0
  43. margrete_rpc-1.0.0/plugin/src/DiscoveryRegistry.cpp +169 -0
  44. margrete_rpc-1.0.0/plugin/src/DiscoveryRegistry.h +28 -0
  45. margrete_rpc-1.0.0/plugin/src/FrameProtocol.cpp +57 -0
  46. margrete_rpc-1.0.0/plugin/src/FrameProtocol.h +16 -0
  47. margrete_rpc-1.0.0/plugin/src/Logger.cpp +40 -0
  48. margrete_rpc-1.0.0/plugin/src/Logger.h +20 -0
  49. margrete_rpc-1.0.0/plugin/src/MargreteSession.cpp +47 -0
  50. margrete_rpc-1.0.0/plugin/src/MargreteSession.h +20 -0
  51. margrete_rpc-1.0.0/plugin/src/NamedPipeServer.cpp +335 -0
  52. margrete_rpc-1.0.0/plugin/src/NamedPipeServer.h +57 -0
  53. margrete_rpc-1.0.0/plugin/src/Plugin.cpp +167 -0
  54. margrete_rpc-1.0.0/plugin/src/Plugin.h +24 -0
  55. margrete_rpc-1.0.0/plugin/src/RequestRouter.cpp +325 -0
  56. margrete_rpc-1.0.0/plugin/src/RequestRouter.h +54 -0
  57. margrete_rpc-1.0.0/plugin/src/RootNoteDeduper.cpp +46 -0
  58. margrete_rpc-1.0.0/plugin/src/RootNoteDeduper.h +9 -0
  59. margrete_rpc-1.0.0/plugin/src/ServerController.cpp +203 -0
  60. margrete_rpc-1.0.0/plugin/src/ServerController.h +62 -0
  61. margrete_rpc-1.0.0/plugin/src/SocketServer.cpp +352 -0
  62. margrete_rpc-1.0.0/plugin/src/SocketServer.h +58 -0
  63. margrete_rpc-1.0.0/plugin/src/TransactionApplier.cpp +413 -0
  64. margrete_rpc-1.0.0/plugin/src/TransactionApplier.h +10 -0
  65. margrete_rpc-1.0.0/plugin/tests/FakeMargrete.h +714 -0
  66. margrete_rpc-1.0.0/plugin/tests/chart_mapper_tests.cpp +99 -0
  67. margrete_rpc-1.0.0/plugin/tests/config_tests.cpp +124 -0
  68. margrete_rpc-1.0.0/plugin/tests/discovery_registry_tests.cpp +99 -0
  69. margrete_rpc-1.0.0/plugin/tests/frame_protocol_tests.cpp +51 -0
  70. margrete_rpc-1.0.0/plugin/tests/request_router_tests.cpp +281 -0
  71. margrete_rpc-1.0.0/plugin/tests/root_note_deduper_tests.cpp +36 -0
  72. margrete_rpc-1.0.0/plugin/tests/smoke_tests.cpp +6 -0
  73. margrete_rpc-1.0.0/plugin/tests/transaction_applier_tests.cpp +358 -0
  74. margrete_rpc-1.0.0/plugin/vcpkg-configuration.json +14 -0
  75. margrete_rpc-1.0.0/plugin/vcpkg-triplets/x64-windows-release.cmake +4 -0
  76. margrete_rpc-1.0.0/plugin/vcpkg-triplets/x64-windows-static-md-release.cmake +4 -0
  77. margrete_rpc-1.0.0/plugin/vcpkg.json +6 -0
  78. margrete_rpc-1.0.0/proto/margrete/rpc/v1/messages.proto +227 -0
  79. margrete_rpc-1.0.0/pyproject.toml +43 -0
  80. margrete_rpc-1.0.0/src/margrete_rpc/__init__.py +34 -0
  81. margrete_rpc-1.0.0/src/margrete_rpc/_endpoint.py +17 -0
  82. margrete_rpc-1.0.0/src/margrete_rpc/_framed_client.py +118 -0
  83. margrete_rpc-1.0.0/src/margrete_rpc/_framing.py +32 -0
  84. margrete_rpc-1.0.0/src/margrete_rpc/_pipe.py +135 -0
  85. margrete_rpc-1.0.0/src/margrete_rpc/_proto/__init__.py +0 -0
  86. margrete_rpc-1.0.0/src/margrete_rpc/_proto/margrete/rpc/v1/messages_pb2.py +93 -0
  87. margrete_rpc-1.0.0/src/margrete_rpc/_proto/margrete/rpc/v1/messages_pb2.pyi +394 -0
  88. margrete_rpc-1.0.0/src/margrete_rpc/_socket.py +52 -0
  89. margrete_rpc-1.0.0/src/margrete_rpc/_transport.py +14 -0
  90. margrete_rpc-1.0.0/src/margrete_rpc/_version.py +41 -0
  91. margrete_rpc-1.0.0/src/margrete_rpc/chart/__init__.py +39 -0
  92. margrete_rpc-1.0.0/src/margrete_rpc/chart/chart.py +120 -0
  93. margrete_rpc-1.0.0/src/margrete_rpc/chart/constants.py +11 -0
  94. margrete_rpc-1.0.0/src/margrete_rpc/chart/diff.py +240 -0
  95. margrete_rpc-1.0.0/src/margrete_rpc/chart/events.py +174 -0
  96. margrete_rpc-1.0.0/src/margrete_rpc/chart/notes/__init__.py +74 -0
  97. margrete_rpc-1.0.0/src/margrete_rpc/chart/notes/air.py +263 -0
  98. margrete_rpc-1.0.0/src/margrete_rpc/chart/notes/color.py +134 -0
  99. margrete_rpc-1.0.0/src/margrete_rpc/chart/notes/direction.py +198 -0
  100. margrete_rpc-1.0.0/src/margrete_rpc/chart/notes/ground.py +235 -0
  101. margrete_rpc-1.0.0/src/margrete_rpc/chart/notes/joint.py +281 -0
  102. margrete_rpc-1.0.0/src/margrete_rpc/chart/notes/long.py +267 -0
  103. margrete_rpc-1.0.0/src/margrete_rpc/chart/notes/raw.py +422 -0
  104. margrete_rpc-1.0.0/src/margrete_rpc/chart/notes/shared.py +314 -0
  105. margrete_rpc-1.0.0/src/margrete_rpc/chart/notes/shift.py +121 -0
  106. margrete_rpc-1.0.0/src/margrete_rpc/chart/notes/transform.py +460 -0
  107. margrete_rpc-1.0.0/src/margrete_rpc/chart/notes/types.py +295 -0
  108. margrete_rpc-1.0.0/src/margrete_rpc/chart/notes/wrap.py +265 -0
  109. margrete_rpc-1.0.0/src/margrete_rpc/chart/time.py +411 -0
  110. margrete_rpc-1.0.0/src/margrete_rpc/chart/util/__init__.py +23 -0
  111. margrete_rpc-1.0.0/src/margrete_rpc/chart/util/crease.py +42 -0
  112. margrete_rpc-1.0.0/src/margrete_rpc/chart/util/curve.py +392 -0
  113. margrete_rpc-1.0.0/src/margrete_rpc/chart/util/easing.py +167 -0
  114. margrete_rpc-1.0.0/src/margrete_rpc/chart/util/envelope.py +37 -0
  115. margrete_rpc-1.0.0/src/margrete_rpc/chart/util/rain.py +78 -0
  116. margrete_rpc-1.0.0/src/margrete_rpc/chart/util/timing.py +156 -0
  117. margrete_rpc-1.0.0/src/margrete_rpc/client.py +252 -0
  118. margrete_rpc-1.0.0/src/margrete_rpc/discovery.py +216 -0
  119. margrete_rpc-1.0.0/src/margrete_rpc/errors.py +67 -0
  120. margrete_rpc-1.0.0/src/margrete_rpc/py.typed +0 -0
  121. margrete_rpc-1.0.0/src/margrete_rpc/trace.py +100 -0
  122. margrete_rpc-1.0.0/src/margrete_rpc/transaction.py +108 -0
  123. margrete_rpc-1.0.0/tests/test_chart_diff.py +120 -0
  124. margrete_rpc-1.0.0/tests/test_chart_objects.py +1534 -0
  125. margrete_rpc-1.0.0/tests/test_chart_time.py +205 -0
  126. margrete_rpc-1.0.0/tests/test_client_transaction.py +431 -0
  127. margrete_rpc-1.0.0/tests/test_curve.py +462 -0
  128. margrete_rpc-1.0.0/tests/test_discovery.py +147 -0
  129. margrete_rpc-1.0.0/tests/test_easing.py +72 -0
  130. margrete_rpc-1.0.0/tests/test_note_shift.py +139 -0
  131. margrete_rpc-1.0.0/tests/test_note_transform.py +487 -0
  132. margrete_rpc-1.0.0/tests/test_position_tick.py +183 -0
  133. margrete_rpc-1.0.0/tests/test_proto_contract.py +134 -0
  134. margrete_rpc-1.0.0/tests/test_public_api.py +24 -0
  135. margrete_rpc-1.0.0/tests/test_socket.py +463 -0
  136. margrete_rpc-1.0.0/tests/test_timing.py +86 -0
  137. margrete_rpc-1.0.0/tests/test_version.py +83 -0
  138. margrete_rpc-1.0.0/website/.gitignore +33 -0
  139. margrete_rpc-1.0.0/website/.oxlintrc.json +17 -0
  140. margrete_rpc-1.0.0/website/.prettierignore +6 -0
  141. margrete_rpc-1.0.0/website/.prettierrc +4 -0
  142. margrete_rpc-1.0.0/website/app/[lang]/(home)/layout.tsx +16 -0
  143. margrete_rpc-1.0.0/website/app/[lang]/(home)/page.tsx +93 -0
  144. margrete_rpc-1.0.0/website/app/[lang]/docs/[[...slug]]/page.tsx +65 -0
  145. margrete_rpc-1.0.0/website/app/[lang]/docs/layout.tsx +21 -0
  146. margrete_rpc-1.0.0/website/app/[lang]/layout.tsx +23 -0
  147. margrete_rpc-1.0.0/website/app/api/search/route.ts +8 -0
  148. margrete_rpc-1.0.0/website/app/global.css +21 -0
  149. margrete_rpc-1.0.0/website/app/llms-full.txt/route.ts +10 -0
  150. margrete_rpc-1.0.0/website/app/llms.mdx/docs/[[...slug]]/route.ts +23 -0
  151. margrete_rpc-1.0.0/website/app/llms.txt/route.ts +9 -0
  152. margrete_rpc-1.0.0/website/app/og/docs/[...slug]/route.tsx +28 -0
  153. margrete_rpc-1.0.0/website/bun.lock +903 -0
  154. margrete_rpc-1.0.0/website/cli.json +14 -0
  155. margrete_rpc-1.0.0/website/components/accordion.tsx +106 -0
  156. margrete_rpc-1.0.0/website/components/files.tsx +68 -0
  157. margrete_rpc-1.0.0/website/components/image-zoom.tsx +54 -0
  158. margrete_rpc-1.0.0/website/components/mdx.tsx +24 -0
  159. margrete_rpc-1.0.0/website/components/tabs.tsx +204 -0
  160. margrete_rpc-1.0.0/website/components/ui/accordion.tsx +86 -0
  161. margrete_rpc-1.0.0/website/components/ui/button.tsx +28 -0
  162. margrete_rpc-1.0.0/website/components/ui/collapsible.tsx +33 -0
  163. margrete_rpc-1.0.0/website/components/ui/tabs.tsx +144 -0
  164. margrete_rpc-1.0.0/website/content/docs/advanced/curve-slides.mdx +159 -0
  165. margrete_rpc-1.0.0/website/content/docs/advanced/easings.mdx +76 -0
  166. margrete_rpc-1.0.0/website/content/docs/advanced/meta.json +5 -0
  167. margrete_rpc-1.0.0/website/content/docs/advanced/slide-util.mdx +59 -0
  168. margrete_rpc-1.0.0/website/content/docs/advanced/timing-util.mdx +137 -0
  169. margrete_rpc-1.0.0/website/content/docs/assets/2-margrete-instance.png +0 -0
  170. margrete_rpc-1.0.0/website/content/docs/assets/activate-the-plugin.png +0 -0
  171. margrete_rpc-1.0.0/website/content/docs/assets/after-quick-start-margrete.png +0 -0
  172. margrete_rpc-1.0.0/website/content/docs/assets/air-crush-interval.png +0 -0
  173. margrete_rpc-1.0.0/website/content/docs/assets/current-tick-playhead.png +0 -0
  174. margrete_rpc-1.0.0/website/content/docs/assets/enable-the-plugin.png +0 -0
  175. margrete_rpc-1.0.0/website/content/docs/assets/extension-to-margrete-rpc.png +0 -0
  176. margrete_rpc-1.0.0/website/content/docs/assets/margrete.ico +0 -0
  177. margrete_rpc-1.0.0/website/content/docs/assets/note-ticks-list.png +0 -0
  178. margrete_rpc-1.0.0/website/content/docs/assets/plugins-folder-location.png +0 -0
  179. margrete_rpc-1.0.0/website/content/docs/assets/positioning-notes-example.png +0 -0
  180. margrete_rpc-1.0.0/website/content/docs/assets/time-signature-changed.png +0 -0
  181. margrete_rpc-1.0.0/website/content/docs/basic/edit-transactions.mdx +240 -0
  182. margrete_rpc-1.0.0/website/content/docs/basic/events.mdx +174 -0
  183. margrete_rpc-1.0.0/website/content/docs/basic/handle-multi-margrete.mdx +42 -0
  184. margrete_rpc-1.0.0/website/content/docs/basic/meta.json +12 -0
  185. margrete_rpc-1.0.0/website/content/docs/basic/note-transforms.mdx +280 -0
  186. margrete_rpc-1.0.0/website/content/docs/basic/notes.mdx +308 -0
  187. margrete_rpc-1.0.0/website/content/docs/basic/time-position.mdx +177 -0
  188. margrete_rpc-1.0.0/website/content/docs/index.mdx +115 -0
  189. margrete_rpc-1.0.0/website/content/docs/limitations.mdx +44 -0
  190. margrete_rpc-1.0.0/website/content/docs/meta.json +12 -0
  191. margrete_rpc-1.0.0/website/next.config.mjs +10 -0
  192. margrete_rpc-1.0.0/website/package.json +48 -0
  193. margrete_rpc-1.0.0/website/postcss.config.mjs +7 -0
  194. margrete_rpc-1.0.0/website/proxy.ts +53 -0
  195. margrete_rpc-1.0.0/website/scripts/generate-docs.mjs +25 -0
  196. margrete_rpc-1.0.0/website/scripts/python-generate.mjs +12 -0
  197. margrete_rpc-1.0.0/website/source.config.ts +28 -0
  198. margrete_rpc-1.0.0/website/styles/image-zoom.css +77 -0
  199. margrete_rpc-1.0.0/website/tsconfig.json +35 -0
@@ -0,0 +1,9 @@
1
+ # THIS IS AUTOGENERATED. DO NOT EDIT MANUALLY
2
+ version = 1
3
+ name = "margrete-rpc"
4
+
5
+ [setup]
6
+ script = '''
7
+ cd "$CODEX_WORKTREE_PATH"
8
+ git submodule update --init
9
+ '''
@@ -0,0 +1,117 @@
1
+ name: Release
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - "v*.*.*"
7
+
8
+ permissions:
9
+ contents: read
10
+
11
+ jobs:
12
+ client:
13
+ name: Client package
14
+ runs-on: ubuntu-latest
15
+ steps:
16
+ - uses: actions/checkout@v6
17
+ - uses: astral-sh/setup-uv@v8.2.0
18
+ - name: Sync dependencies
19
+ run: uv sync --extra dev
20
+ - name: Lint
21
+ run: |
22
+ uv run ruff check .
23
+ uv run ruff format --check .
24
+ - name: Typecheck
25
+ run: uv run pyright
26
+ - name: Tests
27
+ run: uv run pytest
28
+ - name: Build distributions
29
+ run: uv build
30
+ - name: Check distributions
31
+ run: uv run --with twine twine check dist/*
32
+ - uses: actions/upload-artifact@v7
33
+ with:
34
+ name: python-dist
35
+ path: dist/*
36
+ if-no-files-found: error
37
+
38
+ plugin:
39
+ name: Plugin artifact
40
+ runs-on: windows-latest
41
+ steps:
42
+ - uses: actions/checkout@v6
43
+ with:
44
+ submodules: recursive
45
+ - uses: ilammy/msvc-dev-cmd@v1
46
+ - name: Prepare vcpkg binary cache
47
+ shell: pwsh
48
+ env:
49
+ VCPKG_DEFAULT_BINARY_CACHE: ${{ runner.temp }}\vcpkg-bincache
50
+ run: New-Item -ItemType Directory -Force -Path $env:VCPKG_DEFAULT_BINARY_CACHE | Out-Null
51
+ - uses: actions/cache@v5
52
+ with:
53
+ path: ${{ runner.temp }}\vcpkg-bincache
54
+ key: vcpkg-${{ runner.os }}-${{ hashFiles('plugin/vcpkg.json', 'plugin/vcpkg-configuration.json', 'plugin/vcpkg-triplets/*.cmake') }}
55
+ restore-keys: |
56
+ vcpkg-${{ runner.os }}-
57
+ - name: Build, test, and stage plugin
58
+ shell: pwsh
59
+ env:
60
+ VCPKG_DEFAULT_BINARY_CACHE: ${{ runner.temp }}\vcpkg-bincache
61
+ run: |
62
+ if (-not $env:VCPKG_ROOT -and $env:VCPKG_INSTALLATION_ROOT) {
63
+ $env:VCPKG_ROOT = $env:VCPKG_INSTALLATION_ROOT
64
+ }
65
+ if (-not $env:VCPKG_ROOT -and (Test-Path -LiteralPath 'C:\vcpkg')) {
66
+ $env:VCPKG_ROOT = 'C:\vcpkg'
67
+ }
68
+ ./build.ps1 -Configuration Release -Test -Publish -SkipVcVars -ConfigurePreset windows-x64-cicd -BuildPreset windows-x64-release-cicd
69
+ - name: Create release archive
70
+ shell: pwsh
71
+ run: |
72
+ $tag = "${{ github.ref_name }}"
73
+ $archive = "margrete-rpc-plugin-$tag-windows-x64.zip"
74
+ Compress-Archive -Path publish\* -DestinationPath $archive -Force
75
+ $hash = Get-FileHash -Algorithm SHA256 -LiteralPath $archive
76
+ "$($hash.Hash.ToLowerInvariant()) $archive" | Set-Content -Encoding ascii SHA256SUMS.txt
77
+ - uses: actions/upload-artifact@v7
78
+ with:
79
+ name: plugin-release
80
+ path: |
81
+ margrete-rpc-plugin-${{ github.ref_name }}-windows-x64.zip
82
+ SHA256SUMS.txt
83
+ if-no-files-found: error
84
+
85
+ publish-pypi:
86
+ name: Publish to PyPI
87
+ needs: [client, plugin]
88
+ runs-on: ubuntu-latest
89
+ environment: pypi
90
+ permissions:
91
+ id-token: write
92
+ steps:
93
+ - uses: actions/download-artifact@v8
94
+ with:
95
+ name: python-dist
96
+ path: dist
97
+ - uses: pypa/gh-action-pypi-publish@release/v1
98
+
99
+ github-release:
100
+ name: GitHub release
101
+ needs: [client, plugin]
102
+ runs-on: ubuntu-latest
103
+ permissions:
104
+ contents: write
105
+ steps:
106
+ - uses: actions/download-artifact@v8
107
+ with:
108
+ name: plugin-release
109
+ path: release-assets
110
+ - name: Create release
111
+ env:
112
+ GH_TOKEN: ${{ github.token }}
113
+ run: |
114
+ gh release create "${{ github.ref_name }}" \
115
+ release-assets/* \
116
+ --verify-tag \
117
+ --generate-notes
@@ -0,0 +1,235 @@
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[codz]
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
+ share/python-wheels/
24
+ *.egg-info/
25
+ .installed.cfg
26
+ *.egg
27
+ MANIFEST
28
+
29
+ # PyInstaller
30
+ # Usually these files are written by a python script from a template
31
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
32
+ *.manifest
33
+ *.spec
34
+
35
+ # Installer logs
36
+ pip-log.txt
37
+ pip-delete-this-directory.txt
38
+
39
+ # Unit test / coverage reports
40
+ htmlcov/
41
+ .tox/
42
+ .nox/
43
+ .coverage
44
+ .coverage.*
45
+ .cache
46
+ nosetests.xml
47
+ coverage.xml
48
+ *.cover
49
+ *.py.cover
50
+ *.lcov
51
+ .hypothesis/
52
+ .pytest_cache/
53
+ cover/
54
+
55
+ # Translations
56
+ *.mo
57
+ *.pot
58
+
59
+ # Django stuff:
60
+ *.log
61
+ local_settings.py
62
+ db.sqlite3
63
+ db.sqlite3-journal
64
+
65
+ # Flask stuff:
66
+ instance/
67
+ .webassets-cache
68
+
69
+ # Scrapy stuff:
70
+ .scrapy
71
+
72
+ # Sphinx documentation
73
+ docs/_build/
74
+
75
+ # PyBuilder
76
+ .pybuilder/
77
+ target/
78
+
79
+ # Jupyter Notebook
80
+ .ipynb_checkpoints
81
+
82
+ # IPython
83
+ profile_default/
84
+ ipython_config.py
85
+
86
+ # pyenv
87
+ # For a library or package, you might want to ignore these files since the code is
88
+ # intended to run in multiple environments; otherwise, check them in:
89
+ # .python-version
90
+
91
+ # pipenv
92
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
93
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
94
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
95
+ # install all needed dependencies.
96
+ # Pipfile.lock
97
+
98
+ # UV
99
+ # Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
100
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
101
+ # commonly ignored for libraries.
102
+ uv.lock
103
+
104
+ # poetry
105
+ # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
106
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
107
+ # commonly ignored for libraries.
108
+ # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
109
+ # poetry.lock
110
+ # poetry.toml
111
+
112
+ # pdm
113
+ # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
114
+ # pdm recommends including project-wide configuration in pdm.toml, but excluding .pdm-python.
115
+ # https://pdm-project.org/en/latest/usage/project/#working-with-version-control
116
+ # pdm.lock
117
+ # pdm.toml
118
+ .pdm-python
119
+ .pdm-build/
120
+
121
+ # pixi
122
+ # Similar to Pipfile.lock, it is generally recommended to include pixi.lock in version control.
123
+ # pixi.lock
124
+ # Pixi creates a virtual environment in the .pixi directory, just like venv module creates one
125
+ # in the .venv directory. It is recommended not to include this directory in version control.
126
+ .pixi/*
127
+ !.pixi/config.toml
128
+
129
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
130
+ __pypackages__/
131
+
132
+ # Celery stuff
133
+ celerybeat-schedule*
134
+ celerybeat.pid
135
+
136
+ # Redis
137
+ *.rdb
138
+ *.aof
139
+ *.pid
140
+
141
+ # RabbitMQ
142
+ mnesia/
143
+ rabbitmq/
144
+ rabbitmq-data/
145
+
146
+ # ActiveMQ
147
+ activemq-data/
148
+
149
+ # SageMath parsed files
150
+ *.sage.py
151
+
152
+ # Environments
153
+ .env
154
+ .envrc
155
+ .venv
156
+ env/
157
+ venv/
158
+ ENV/
159
+ env.bak/
160
+ venv.bak/
161
+
162
+ # Spyder project settings
163
+ .spyderproject
164
+ .spyproject
165
+
166
+ # Rope project settings
167
+ .ropeproject
168
+
169
+ # mkdocs documentation
170
+ /site
171
+
172
+ # mypy
173
+ .mypy_cache/
174
+ .dmypy.json
175
+ dmypy.json
176
+
177
+ # Pyre type checker
178
+ .pyre/
179
+
180
+ # pytype static type analyzer
181
+ .pytype/
182
+
183
+ # Cython debug symbols
184
+ cython_debug/
185
+
186
+ # PyCharm
187
+ # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
188
+ # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
189
+ # and can be added to the global gitignore or merged into this file. For a more nuclear
190
+ # option (not recommended) you can uncomment the following to ignore the entire idea folder.
191
+ # .idea/
192
+
193
+ # Abstra
194
+ # Abstra is an AI-powered process automation framework.
195
+ # Ignore directories containing user credentials, local state, and settings.
196
+ # Learn more at https://abstra.io/docs
197
+ .abstra/
198
+
199
+ # Visual Studio Code
200
+ # Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore
201
+ # that can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
202
+ # and can be added to the global gitignore or merged into this file. However, if you prefer,
203
+ # you could uncomment the following to ignore the entire vscode folder
204
+ # .vscode/
205
+ # Temporary file for partial code execution
206
+ tempCodeRunnerFile.py
207
+
208
+ # Ruff stuff:
209
+ .ruff_cache/
210
+
211
+ # PyPI configuration file
212
+ .pypirc
213
+
214
+ # Marimo
215
+ marimo/_static/
216
+ marimo/_lsp/
217
+ __marimo__/
218
+
219
+ # Streamlit
220
+ .streamlit/secrets.toml
221
+
222
+ # User-specific files
223
+ draft/
224
+ publish/
225
+
226
+ # Github worktrees
227
+ .worktrees/
228
+
229
+ # Agent artifacts
230
+ .claude/skills
231
+ .codex/skills
232
+ .agents/skills
233
+ !.agents/skills/umiguri-charter
234
+ skills-lock.json
235
+ plans/
@@ -0,0 +1,3 @@
1
+ [submodule "MargretePluginSDK"]
2
+ path = plugin/margrete
3
+ url = https://github.com/MargreteSDK/MargretePluginSDK.git
@@ -0,0 +1,14 @@
1
+ {
2
+ "version": "0.2.0",
3
+ "configurations": [
4
+ {
5
+ "name": "Python Debugger: Current File",
6
+ "type": "debugpy",
7
+ "request": "launch",
8
+ "program": "${file}",
9
+ "cwd": "${workspaceFolder}",
10
+ "console": "integratedTerminal",
11
+ "python": "${workspaceFolder}/.venv/Scripts/python.exe"
12
+ }
13
+ ]
14
+ }
@@ -0,0 +1,3 @@
1
+ {
2
+ "python.defaultInterpreterPath": "${workspaceFolder}/.venv/Scripts/python.exe"
3
+ }
@@ -0,0 +1 @@
1
+ CLAUDE.md
@@ -0,0 +1,49 @@
1
+ # CLAUDE.md
2
+
3
+ This file provides guidance to agents when working with code in this repository.
4
+
5
+ ## What this is
6
+
7
+ - **`plugin/`** — C++ Margrete plugin that runs a TCP/protobuf RPC **server** inside Margrete
8
+ - **`src/margrete_rpc/`** — Python **client** package that connects to the plugin
9
+ - **`proto/`** — protobuf definitions shared by both
10
+ - **`website/`** — Fumadocs documentation site; auto-generates API reference from the Python package
11
+
12
+ ## Client (Python) commands
13
+
14
+ All commands use `uv` as the project tool (the `.venv` does not have pip/pytest directly):
15
+
16
+ ```bash
17
+ uv run --extra dev pytest # run all tests
18
+ uv run --extra dev pytest tests/test_chart_time.py # run a single test file
19
+ uv run --extra dev pytest tests/test_foo.py::test_bar # run a single test
20
+ uv run --extra dev pyright # type checking
21
+ uv run --extra dev ruff check src/ # lint
22
+ uv run --extra dev ruff format src/ # format
23
+ ```
24
+
25
+ The `proto/` generated files (`src/margrete_rpc/_proto/`) are excluded from ruff and pyright — don't edit them.
26
+
27
+ ## Plugin (C++) commands
28
+
29
+ Prerequisites: MSVC, vcpkg with `VCPKG_ROOT` set, Visual Studio 2026 generator.
30
+
31
+ ```bash
32
+ cd plugin
33
+
34
+ # First time: configure (from plugin/ directory)
35
+ cmake --preset windows-x64
36
+
37
+ # Build the DLL (no vcvars needed, VS generator handles it)
38
+ cmake --build build --config Release
39
+
40
+ # Build + run C++ tests without touching the deployed DLL
41
+ cmake --build build --config Release --target plugin_tests
42
+ ctest --test-dir build -C Release --output-on-failure
43
+ ```
44
+
45
+ Output DLL: `plugin/build/Release/margrete-rpc.dll`.
46
+
47
+ ## Development Notes
48
+
49
+ - Follow conventional commit style: `feat:`, `fix:`, `refactor:`, `chore:`, `docs:`.
@@ -0,0 +1,44 @@
1
+ Metadata-Version: 2.4
2
+ Name: margrete-rpc
3
+ Version: 1.0.0
4
+ Summary: Python client package for the Margrete RPC plugin
5
+ Requires-Python: >=3.13
6
+ Requires-Dist: protobuf<8,>=7.35.0
7
+ Requires-Dist: pywin32>=311; sys_platform == 'win32'
8
+ Provides-Extra: dev
9
+ Requires-Dist: pyright<2,>=1.1.0; extra == 'dev'
10
+ Requires-Dist: pytest<10,>=9.0.3; extra == 'dev'
11
+ Requires-Dist: ruff<1,>=0.15.16; extra == 'dev'
12
+ Description-Content-Type: text/markdown
13
+
14
+ # Margrete RPC
15
+
16
+ **Margrete RPC** is a [UMIGURI/Margrete](https://umgr.inonote.jp/en/margrete) plugin plus a Python client package that lets you script **charting**.
17
+
18
+ ## Documentation
19
+
20
+ For installation instructions and usage examples of this project, see:
21
+ https://mg.foahh.com
22
+
23
+ 关于此项目的安装说明和使用示例请见:
24
+ https://mg.foahh.com
25
+
26
+ ## Motivation
27
+
28
+ Existing tooling (including my earlier project, [margrete-air-curve-converter](https://github.com/Foahh/margrete-air-curve-converter)) can be useful for
29
+ specific transforms, but it can also feel brittle when you want to:
30
+
31
+ - generate / adjust **complex pattern**
32
+ - apply **chart edits** programmatically
33
+ - iterate quickly with small patterns instead of manual editing
34
+ - leverage agentic charting using Codex / Claude Code
35
+
36
+ ## Core repository content
37
+
38
+ - **[`plugin/`](plugin/)**: C++ Margrete plugin that hosts the local protobuf RPC **server** over TCP, Windows named pipes, or both
39
+
40
+ - **[`src/margrete_rpc`](src/margrete_rpc)**: Python **client** controlling the Margrete plugin
41
+
42
+ - **[`proto/`](proto/)**: protobuf definitions shared by the plugin and the Python client
43
+
44
+ - **[`website/`](website/)**: Fumadocs documentation site; auto-generates API reference from the Python package
@@ -0,0 +1,31 @@
1
+ # Margrete RPC
2
+
3
+ **Margrete RPC** is a [UMIGURI/Margrete](https://umgr.inonote.jp/en/margrete) plugin plus a Python client package that lets you script **charting**.
4
+
5
+ ## Documentation
6
+
7
+ For installation instructions and usage examples of this project, see:
8
+ https://mg.foahh.com
9
+
10
+ 关于此项目的安装说明和使用示例请见:
11
+ https://mg.foahh.com
12
+
13
+ ## Motivation
14
+
15
+ Existing tooling (including my earlier project, [margrete-air-curve-converter](https://github.com/Foahh/margrete-air-curve-converter)) can be useful for
16
+ specific transforms, but it can also feel brittle when you want to:
17
+
18
+ - generate / adjust **complex pattern**
19
+ - apply **chart edits** programmatically
20
+ - iterate quickly with small patterns instead of manual editing
21
+ - leverage agentic charting using Codex / Claude Code
22
+
23
+ ## Core repository content
24
+
25
+ - **[`plugin/`](plugin/)**: C++ Margrete plugin that hosts the local protobuf RPC **server** over TCP, Windows named pipes, or both
26
+
27
+ - **[`src/margrete_rpc`](src/margrete_rpc)**: Python **client** controlling the Margrete plugin
28
+
29
+ - **[`proto/`](proto/)**: protobuf definitions shared by the plugin and the Python client
30
+
31
+ - **[`website/`](website/)**: Fumadocs documentation site; auto-generates API reference from the Python package