mdinject 0.2.3__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 (209) hide show
  1. mdinject-0.2.3/.betterleaks.toml +52 -0
  2. mdinject-0.2.3/.cache/betterleaks-report.json +1 -0
  3. mdinject-0.2.3/.claude/settings.local.json +25 -0
  4. mdinject-0.2.3/.codespellrc +43 -0
  5. mdinject-0.2.3/.envrc +1 -0
  6. mdinject-0.2.3/.gitignore +157 -0
  7. mdinject-0.2.3/.lycheecache +19 -0
  8. mdinject-0.2.3/.lycheeignore +46 -0
  9. mdinject-0.2.3/.pre-commit-config.yaml +37 -0
  10. mdinject-0.2.3/.pyscn/reports/analyze_20260921_060246.json +1622 -0
  11. mdinject-0.2.3/.pyscn/reports/analyze_20260921_062120.json +1622 -0
  12. mdinject-0.2.3/.pyscn/reports/analyze_20260921_063340.json +1622 -0
  13. mdinject-0.2.3/.python-version +1 -0
  14. mdinject-0.2.3/AGENTS.md +54 -0
  15. mdinject-0.2.3/CHANGELOG.md +149 -0
  16. mdinject-0.2.3/CLAUDE.md +116 -0
  17. mdinject-0.2.3/CONTRIBUTING.md +351 -0
  18. mdinject-0.2.3/LICENSE +28 -0
  19. mdinject-0.2.3/PKG-INFO +440 -0
  20. mdinject-0.2.3/QWEN.md +261 -0
  21. mdinject-0.2.3/README.md +406 -0
  22. mdinject-0.2.3/app/IPC_SPEC.md +229 -0
  23. mdinject-0.2.3/app/MdInjectApp/AppDelegate.swift +24 -0
  24. mdinject-0.2.3/app/MdInjectApp/AppState.swift +1856 -0
  25. mdinject-0.2.3/app/MdInjectApp/Ghostty/GhosttyConfig.swift +44 -0
  26. mdinject-0.2.3/app/MdInjectApp/Ghostty/GhosttyConfigWatcher.swift +149 -0
  27. mdinject-0.2.3/app/MdInjectApp/IPC/HelperLauncher.swift +109 -0
  28. mdinject-0.2.3/app/MdInjectApp/IPC/JsonRpcClient.swift +154 -0
  29. mdinject-0.2.3/app/MdInjectApp/IPC/Messages.swift +3 -0
  30. mdinject-0.2.3/app/MdInjectApp/IPC/TokenStore.swift +18 -0
  31. mdinject-0.2.3/app/MdInjectApp/Info.plist +28 -0
  32. mdinject-0.2.3/app/MdInjectApp/MdInjectApp.swift +75 -0
  33. mdinject-0.2.3/app/MdInjectApp/MdInjectApp.xcodeproj/project.pbxproj +516 -0
  34. mdinject-0.2.3/app/MdInjectApp/MdInjectApp.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +24 -0
  35. mdinject-0.2.3/app/MdInjectApp/MdInjectApp.xcodeproj/xcshareddata/xcschemes/MdInjectApp.xcscheme +82 -0
  36. mdinject-0.2.3/app/MdInjectApp/Resources/Assets.xcassets/AppIcon.appiconset/Contents.json +58 -0
  37. mdinject-0.2.3/app/MdInjectApp/Resources/editor.html +152 -0
  38. mdinject-0.2.3/app/MdInjectApp/Resources/helper/README.txt +8 -0
  39. mdinject-0.2.3/app/MdInjectApp/Resources/vendor/all.min.css +9 -0
  40. mdinject-0.2.3/app/MdInjectApp/Resources/vendor/all.min.js +6 -0
  41. mdinject-0.2.3/app/MdInjectApp/Resources/vendor/codemirror.bundle.js +27 -0
  42. mdinject-0.2.3/app/MdInjectApp/Resources/vendor/codemirror.css +8 -0
  43. mdinject-0.2.3/app/MdInjectApp/Resources/vendor/codemirror_adapter.js +34 -0
  44. mdinject-0.2.3/app/MdInjectApp/Resources/vendor/easymde.min.css +7 -0
  45. mdinject-0.2.3/app/MdInjectApp/Resources/vendor/easymde.min.js +7 -0
  46. mdinject-0.2.3/app/MdInjectApp/Resources/vendor/markdown-wysiwyg.css +10 -0
  47. mdinject-0.2.3/app/MdInjectApp/Resources/vendor/markdown-wysiwyg.js +6 -0
  48. mdinject-0.2.3/app/MdInjectApp/Resources/vendor/milkdown.bundle.css +1 -0
  49. mdinject-0.2.3/app/MdInjectApp/Resources/vendor/milkdown.bundle.js +993 -0
  50. mdinject-0.2.3/app/MdInjectApp/Resources/vendor/webfonts/fa-regular-400.woff2 +0 -0
  51. mdinject-0.2.3/app/MdInjectApp/Resources/vendor/webfonts/fa-solid-900.woff2 +0 -0
  52. mdinject-0.2.3/app/MdInjectApp/State/TerminalState.swift +476 -0
  53. mdinject-0.2.3/app/MdInjectApp/Views/BottomBar.swift +30 -0
  54. mdinject-0.2.3/app/MdInjectApp/Views/EditorPane.swift +145 -0
  55. mdinject-0.2.3/app/MdInjectApp/Views/ExternalTerminalPickerView.swift +116 -0
  56. mdinject-0.2.3/app/MdInjectApp/Views/GhosttyTerminalView.swift +236 -0
  57. mdinject-0.2.3/app/MdInjectApp/Views/MdInjectButtonStyle.swift +22 -0
  58. mdinject-0.2.3/app/MdInjectApp/Views/PromptListView.swift +105 -0
  59. mdinject-0.2.3/app/MdInjectApp/Views/RootSplitView.swift +33 -0
  60. mdinject-0.2.3/app/MdInjectApp/Views/StatusBanner.swift +18 -0
  61. mdinject-0.2.3/app/MdInjectApp/Views/TerminalPane.swift +76 -0
  62. mdinject-0.2.3/app/MdInjectApp/Views/TerminalTabsView.swift +92 -0
  63. mdinject-0.2.3/app/MdInjectApp/Views/ToolbarView.swift +22 -0
  64. mdinject-0.2.3/app/MdInjectApp/Views/WidgetEditorView.swift +248 -0
  65. mdinject-0.2.3/app/MdInjectApp/Web/WebView.swift +46 -0
  66. mdinject-0.2.3/app/MdInjectAppTests/AppleScriptBridgeConformanceTests.swift +235 -0
  67. mdinject-0.2.3/app/MdInjectAppTests/Info.plist +10 -0
  68. mdinject-0.2.3/app/MdInjectAppTests/JsonRpcClientTests.swift +63 -0
  69. mdinject-0.2.3/docs/APP_ARCHITECTURE.md +133 -0
  70. mdinject-0.2.3/docs/CLAUDE_DESKTOP_INTEGRATION.md +673 -0
  71. mdinject-0.2.3/docs/PLATFORM_STRATEGY.md +68 -0
  72. mdinject-0.2.3/docs/RELEASE_MACOS.md +150 -0
  73. mdinject-0.2.3/docs/SECURITY_IPC.md +21 -0
  74. mdinject-0.2.3/docs/TERMINAL_SWITCH_PLAN.md +55 -0
  75. mdinject-0.2.3/docs/assets/images/README.md +46 -0
  76. mdinject-0.2.3/docs/superpowers/merges/2026-09-18-ghostty-terminal-port-merge.md +160 -0
  77. mdinject-0.2.3/docs/superpowers/plans/2026-09-16-libghostty-mdinject-port.md +1184 -0
  78. mdinject-0.2.3/docs/superpowers/specs/2026-09-15-libghostty-mdinject-design.md +353 -0
  79. mdinject-0.2.3/examples/01_basic_prompt_management.py +114 -0
  80. mdinject-0.2.3/examples/02_cli_injection_workflow.py +156 -0
  81. mdinject-0.2.3/examples/03_collaborative_planning.py +182 -0
  82. mdinject-0.2.3/examples/04_pro_features_demo.py +61 -0
  83. mdinject-0.2.3/examples/10_animation_glitch_reveal.py +327 -0
  84. mdinject-0.2.3/examples/README.md +466 -0
  85. mdinject-0.2.3/mdinject/__init__.py +7 -0
  86. mdinject-0.2.3/mdinject/__main__.py +270 -0
  87. mdinject-0.2.3/mdinject/adapters/__init__.py +15 -0
  88. mdinject-0.2.3/mdinject/adapters/content_format.py +356 -0
  89. mdinject-0.2.3/mdinject/adapters/export.py +518 -0
  90. mdinject-0.2.3/mdinject/adapters/license.py +929 -0
  91. mdinject-0.2.3/mdinject/adapters/prompt_storage.py +478 -0
  92. mdinject-0.2.3/mdinject/adapters/sqlite_wrapper.py +115 -0
  93. mdinject-0.2.3/mdinject/appserver/__init__.py +5 -0
  94. mdinject-0.2.3/mdinject/appserver/server.py +820 -0
  95. mdinject-0.2.3/mdinject/appserver/token_store.py +24 -0
  96. mdinject-0.2.3/mdinject/assets/examples/templates/api-docs.md +56 -0
  97. mdinject-0.2.3/mdinject/assets/examples/templates/code-review.md +49 -0
  98. mdinject-0.2.3/mdinject/assets/examples/templates/debug-assist.md +47 -0
  99. mdinject-0.2.3/mdinject/assets/examples/templates/general-question.md +25 -0
  100. mdinject-0.2.3/mdinject/assets/prompt_editor.html +92 -0
  101. mdinject-0.2.3/mdinject/assets/terminal.html +107 -0
  102. mdinject-0.2.3/mdinject/assets/vendor/all.min.css +9 -0
  103. mdinject-0.2.3/mdinject/assets/vendor/all.min.js +6 -0
  104. mdinject-0.2.3/mdinject/assets/vendor/easymde.min.css +7 -0
  105. mdinject-0.2.3/mdinject/assets/vendor/easymde.min.js +7 -0
  106. mdinject-0.2.3/mdinject/assets/vendor/markdown-wysiwyg.css +10 -0
  107. mdinject-0.2.3/mdinject/assets/vendor/markdown-wysiwyg.js +6 -0
  108. mdinject-0.2.3/mdinject/assets/vendor/milkdown.bundle.css +1 -0
  109. mdinject-0.2.3/mdinject/assets/vendor/milkdown.bundle.js +993 -0
  110. mdinject-0.2.3/mdinject/assets/vendor/qwebchannel.js +157 -0
  111. mdinject-0.2.3/mdinject/assets/vendor/webfonts/fa-regular-400.woff2 +0 -0
  112. mdinject-0.2.3/mdinject/assets/vendor/webfonts/fa-solid-900.woff2 +0 -0
  113. mdinject-0.2.3/mdinject/assets/vendor/xterm-addon-fit.js +2 -0
  114. mdinject-0.2.3/mdinject/assets/vendor/xterm.css +209 -0
  115. mdinject-0.2.3/mdinject/assets/vendor/xterm.js +2 -0
  116. mdinject-0.2.3/mdinject/config/__init__.py +344 -0
  117. mdinject-0.2.3/mdinject/config/examples/cli_profiles.toml +113 -0
  118. mdinject-0.2.3/mdinject/config/format_config.py +159 -0
  119. mdinject-0.2.3/mdinject/config/loader.py +328 -0
  120. mdinject-0.2.3/mdinject/config/profiles.py +200 -0
  121. mdinject-0.2.3/mdinject/exporters.py +82 -0
  122. mdinject-0.2.3/mdinject/logging/__init__.py +261 -0
  123. mdinject-0.2.3/mdinject/mcp/API.md +935 -0
  124. mdinject-0.2.3/mdinject/mcp/__init__.py +9 -0
  125. mdinject-0.2.3/mdinject/mcp/_app.py +30 -0
  126. mdinject-0.2.3/mdinject/mcp/config/__init__.py +7 -0
  127. mdinject-0.2.3/mdinject/mcp/config/mdinject_mcp.py +99 -0
  128. mdinject-0.2.3/mdinject/mcp/health.py +70 -0
  129. mdinject-0.2.3/mdinject/mcp/models.py +316 -0
  130. mdinject-0.2.3/mdinject/mcp/server.py +169 -0
  131. mdinject-0.2.3/mdinject/mcp/server_core.py +257 -0
  132. mdinject-0.2.3/mdinject/mcp/tools/__init__.py +29 -0
  133. mdinject-0.2.3/mdinject/mcp/tools/collaboration_tools.py +289 -0
  134. mdinject-0.2.3/mdinject/mcp/tools/export_tools.py +170 -0
  135. mdinject-0.2.3/mdinject/mcp/tools/format_tools.py +397 -0
  136. mdinject-0.2.3/mdinject/mcp/tools/license_tools.py +161 -0
  137. mdinject-0.2.3/mdinject/mcp/tools/prompt_tools.py +555 -0
  138. mdinject-0.2.3/mdinject/mcp/tools/terminal_tools.py +241 -0
  139. mdinject-0.2.3/mdinject/mcp/tools/widget_tools.py +271 -0
  140. mdinject-0.2.3/mdinject/profiles.py +204 -0
  141. mdinject-0.2.3/mdinject/pty_process.py +424 -0
  142. mdinject-0.2.3/mdinject/services/__init__.py +37 -0
  143. mdinject-0.2.3/mdinject/services/export_service.py +296 -0
  144. mdinject-0.2.3/mdinject/services/format_conversion_service.py +655 -0
  145. mdinject-0.2.3/mdinject/services/license_service.py +449 -0
  146. mdinject-0.2.3/mdinject/services/orchestrator.py +547 -0
  147. mdinject-0.2.3/mdinject/services/prompt_pane_service.py +306 -0
  148. mdinject-0.2.3/mdinject/services/prompt_storage_service.py +264 -0
  149. mdinject-0.2.3/mdinject/services/terminal_pane_service.py +431 -0
  150. mdinject-0.2.3/mdinject/storage/__init__.py +308 -0
  151. mdinject-0.2.3/mdinject/storage/async_sqlite_store.py +309 -0
  152. mdinject-0.2.3/mdinject/storage/scope.py +145 -0
  153. mdinject-0.2.3/mdinject/storage.py +166 -0
  154. mdinject-0.2.3/mdinject/template_loader.py +261 -0
  155. mdinject-0.2.3/mdinject/templates.py +186 -0
  156. mdinject-0.2.3/mdinject/tools/__init__.py +1 -0
  157. mdinject-0.2.3/mdinject/tools/macos_app.py +147 -0
  158. mdinject-0.2.3/package-lock.json +3965 -0
  159. mdinject-0.2.3/package.json +44 -0
  160. mdinject-0.2.3/pyproject.toml +160 -0
  161. mdinject-0.2.3/scripts/build_codemirror_bundle.js +18 -0
  162. mdinject-0.2.3/scripts/build_macos_app.sh +22 -0
  163. mdinject-0.2.3/scripts/build_milkdown_bundle.js +39 -0
  164. mdinject-0.2.3/scripts/bundle_helper_macos.sh +43 -0
  165. mdinject-0.2.3/scripts/codemirror_entry.js +59 -0
  166. mdinject-0.2.3/scripts/macos_entitlements.plist +12 -0
  167. mdinject-0.2.3/scripts/mdinject_helper_entry.py +15 -0
  168. mdinject-0.2.3/scripts/migrate_to_oneiric.py +194 -0
  169. mdinject-0.2.3/scripts/milkdown_crepe.css +8 -0
  170. mdinject-0.2.3/scripts/milkdown_entry.js +281 -0
  171. mdinject-0.2.3/scripts/notarize_macos_app.sh +28 -0
  172. mdinject-0.2.3/scripts/package_dmg.sh +25 -0
  173. mdinject-0.2.3/scripts/run_macos_app.sh +25 -0
  174. mdinject-0.2.3/scripts/run_macos_app_debug.sh +31 -0
  175. mdinject-0.2.3/scripts/setup_assets.sh +143 -0
  176. mdinject-0.2.3/scripts/sign_macos_app.sh +33 -0
  177. mdinject-0.2.3/scripts/test_backend.py +390 -0
  178. mdinject-0.2.3/scripts/test_pty.py +199 -0
  179. mdinject-0.2.3/scripts/watch_codemirror_bundle.js +20 -0
  180. mdinject-0.2.3/settings/mdinject-mcp.yaml +46 -0
  181. mdinject-0.2.3/tests/conftest.py +40 -0
  182. mdinject-0.2.3/tests/integration/__init__.py +1 -0
  183. mdinject-0.2.3/tests/integration/test_health_degraded.py +133 -0
  184. mdinject-0.2.3/tests/integration/test_health_endpoint.py +168 -0
  185. mdinject-0.2.3/tests/integration/test_migration.py +458 -0
  186. mdinject-0.2.3/tests/integration/test_orchestrator.py +705 -0
  187. mdinject-0.2.3/tests/mcp/README.md +126 -0
  188. mdinject-0.2.3/tests/mcp/__init__.py +56 -0
  189. mdinject-0.2.3/tests/mcp/conftest.py +185 -0
  190. mdinject-0.2.3/tests/mcp/test_health_per_service.py +131 -0
  191. mdinject-0.2.3/tests/mcp/test_prompt_tools.py +329 -0
  192. mdinject-0.2.3/tests/mcp/test_server_integration.py +457 -0
  193. mdinject-0.2.3/tests/test_appserver_ipc.py +52 -0
  194. mdinject-0.2.3/tests/test_appserver_terminal.py +46 -0
  195. mdinject-0.2.3/tests/test_doc_drift.py +134 -0
  196. mdinject-0.2.3/tests/test_jsonrpc_client.py +47 -0
  197. mdinject-0.2.3/tests/test_jsonrpc_client.swift +1 -0
  198. mdinject-0.2.3/tests/unit/__init__.py +1 -0
  199. mdinject-0.2.3/tests/unit/test_adapters/__init__.py +1 -0
  200. mdinject-0.2.3/tests/unit/test_adapters/test_export.py +596 -0
  201. mdinject-0.2.3/tests/unit/test_adapters/test_license.py +851 -0
  202. mdinject-0.2.3/tests/unit/test_adapters/test_prompt_storage.py +744 -0
  203. mdinject-0.2.3/tests/unit/test_config.py +668 -0
  204. mdinject-0.2.3/tests/unit/test_format_conversion.py +344 -0
  205. mdinject-0.2.3/tests/unit/test_profiles.py +392 -0
  206. mdinject-0.2.3/tests/unit/test_scope.py +56 -0
  207. mdinject-0.2.3/tests/unit/test_services.py +1000 -0
  208. mdinject-0.2.3/tests/unit/test_templates.py +554 -0
  209. mdinject-0.2.3/uv.lock +4961 -0
@@ -0,0 +1,52 @@
1
+ # betterleaks (gitleaks-schema) allowlist for mdinject.
2
+ #
3
+ # betterleaks reads this file from the git toplevel when invoked by
4
+ # crackerjack — the `[tool.crackerjack.betterleaks]` pyproject block has
5
+ # NO effect (crackerjack __main__.py:291 documents this). Schema lives
6
+ # at https://github.com/betterleaks/betterleaks/blob/main/config.toml
7
+ # (mirrors gitleaks v8).
8
+ #
9
+ # Allowlist rationale:
10
+ #
11
+ # * `mdinject/assets/vendor/` and `app/MdInjectApp/Resources/vendor/` —
12
+ # vendored JS/CSS bundles (xterm.js, milkdown, FontAwesome). Minified
13
+ # code regularly matches the generic-api-key regex on constant
14
+ # strings that aren't actually secrets. Real secret handling happens
15
+ # in our own code, not vendored runtime dependencies.
16
+ #
17
+ # * `dist/` — sdist + wheel output (`python -m build` artifacts).
18
+ # betterleaks recurses into tarballs and finds the same vendor
19
+ # content twice. Excluding `dist/` skips the duplicate scan.
20
+ #
21
+ # * `htmlcov/` — pytest-cov HTML output. Contains verbatim copies of
22
+ # every Python source file in `mdinject/`; any secret in real code
23
+ # would still be caught by betterleaks walking `mdinject/` itself.
24
+ #
25
+ # * `node_modules/` — third-party npm packages, gitignored.
26
+ #
27
+ # * `*worktrees*` — sibling project checkouts (`.worktrees/<name>/`,
28
+ # `.claude/worktrees/<name>/`). Gitignored as of 2026-09-21; the
29
+ # allowlist stays for defense-in-depth in case stale tarballs
30
+ # reference the old gitlink paths.
31
+ #
32
+ # * `.venv/`, `.cache/`, `.crackerjack/`, `.oneiric_cache/`,
33
+ # `mdinject.egg-info/` — generated local artifacts.
34
+
35
+ title = "mdinject betterleaks allowlist"
36
+
37
+ [allowlist]
38
+ description = "Skip vendored JS/CSS, build artifacts, and runtime caches"
39
+ paths = [
40
+ '''mdinject/assets/vendor/''',
41
+ '''app/MdInjectApp/Resources/vendor/''',
42
+ '''dist/''',
43
+ '''htmlcov/''',
44
+ '''node_modules/''',
45
+ '''\.worktrees/''',
46
+ '''\.claude/worktrees/''',
47
+ '''\.venv/''',
48
+ '''\.cache/''',
49
+ '''\.crackerjack/''',
50
+ '''\.oneiric_cache/''',
51
+ '''mdinject\.egg-info/''',
52
+ ]
@@ -0,0 +1 @@
1
+ null
@@ -0,0 +1,25 @@
1
+ {
2
+ "permissions": {
3
+ "allow": [
4
+ "Bash(/Users/les/Projects/mdinject/.venv/bin/python -m pytest:*)",
5
+ "Bash(PYTHONPATH=/Users/les/Projects/mdinject uv run pytest:*)",
6
+ "Bash(PYTHONPATH=/Users/les/Projects/mdinject uv run python:*)",
7
+ "mcp__excalidraw__get_resource",
8
+ "Bash(osascript:*)",
9
+ "Bash(screencapture:*)",
10
+ "mcp__macos_automator__execute_script",
11
+ "Bash(glab auth:*)",
12
+ "Bash(xcodebuild test:*)",
13
+ "Bash(xcodebuild build-for-testing:*)",
14
+ "Bash(git -C /Users/les/Projects/mdinject diff --stat HEAD~10..HEAD)",
15
+ "Bash(git -C /Users/les/Projects/mdinject log:*)",
16
+ "Bash(git -C /Users/les/Projects/mdinject status --porcelain)",
17
+ "Bash(git -C /Users/les/Projects/mdinject diff:*)",
18
+ "Bash(timeout 5 uv run:*)",
19
+ "Bash(uv run:*)",
20
+ "Bash(git commit:*)",
21
+ "Bash(git push:*)",
22
+ "Bash(echo:*)"
23
+ ]
24
+ }
25
+ }
@@ -0,0 +1,43 @@
1
+ [codespell]
2
+ # Skip vendored assets — minified JS/CSS uses short identifiers (te, ot, openEnd)
3
+ # that codespell misidentifies as misspellings but are correct as-is.
4
+ #
5
+ # IMPORTANT — codespell parses ``.codespellrc`` via Python's
6
+ # ``configparser`` then re-emits each key as ``--<key> <value>`` on the
7
+ # command line, where ``--skip`` has ``action="append"``. Two consequences:
8
+ #
9
+ # * Multi-line INI continuation (``skip = a\n b``) is read as ONE
10
+ # value with embedded newlines. codespell's
11
+ # ``flatten_clean_comma_separated_arguments`` then has only ONE
12
+ # element to split on commas — the embedded-newlines pattern never
13
+ # matches anything because paths contain no ``\n``. Verified failure
14
+ # mode on mdinject 2026-09-21: ~4000 vendor hits came back after
15
+ # converting the single-line ``*vendor/*`` into a multi-line entry.
16
+ #
17
+ # * Duplicate ``skip =`` keys raise ``configparser.DuplicateOptionError``
18
+ # at read time, so we can't list each pattern on its own line.
19
+ #
20
+ # The supported format is comma-separated values on a single line. Order
21
+ # doesn't matter; ``fnmatch.fnmatch`` does whole-string matching so the
22
+ # trailing ``*`` after each comma-separated value is the "match anything
23
+ # after" anchor.
24
+ #
25
+ # Vendor — covers both ``mdinject/assets/vendor/...`` and
26
+ # ``app/MdInjectApp/Resources/vendor/...`` (and any future vendor path
27
+ # at any depth) via ``*vendor/*``. ``fnmatch``'s ``*`` matches across
28
+ # ``/``, so the leading ``*`` lets the prefix be anything.
29
+ #
30
+ # Worktrees — ``.worktrees/`` and ``.claude/worktrees/`` host sibling-
31
+ # project checkouts (e.g. ``ghostty-spike``, ``w4-claude-md-breadcrumb``).
32
+ # codespell's vendored JS in their nested ``node_modules/`` produces
33
+ # false-positive misspellings (xterm.js's ``shiftIn`` → ``shifting`` etc.).
34
+ # We exclude the WORKTREE directory roots so ``os.walk()`` calls
35
+ # ``dirs.clear()`` on match and never descends. One pattern per walk
36
+ # depth — first-level dirs (.worktrees, .claude/worktrees) plus their
37
+ # first subdir (*/<name>) — is enough; deeper levels are skipped by
38
+ # ``dirs.clear()`` on the parent match.
39
+ skip = *vendor/*, .worktrees, .worktrees/*, .claude/worktrees, .claude/worktrees/*, package-lock.json, *htmlcov/*
40
+ # Bodai-wide ignore list — kept in sync with mahavishnu/.codespellrc
41
+ # ND = Neighbor Discovery (IPv6 protocol, used in scapy/MCP packet tooling).
42
+ # iTerm = Apple terminal app proper noun.
43
+ ignore-words-list = iTerm, ND, inout
mdinject-0.2.3/.envrc ADDED
@@ -0,0 +1 @@
1
+ layout uv
@@ -0,0 +1,157 @@
1
+ # Python-generated files
2
+ __pycache__/
3
+ *.py[oc]
4
+ build/
5
+ dist/
6
+ wheels/
7
+ *.egg-info
8
+
9
+ # Virtual environments
10
+ .venv
11
+ venv/
12
+ ENV/
13
+ env/
14
+
15
+ # Testing and coverage
16
+ .coverage
17
+ .coverage.*
18
+ htmlcov/
19
+ .pytest_cache/
20
+ .tox/
21
+ .hypothesis/
22
+
23
+ # IDE and editors
24
+ .vscode/
25
+ .idea/
26
+ *.swp
27
+ *.swo
28
+ *~
29
+ .DS_Store
30
+
31
+ # Ruff cache
32
+ .ruff_cache/
33
+
34
+ # MyPy/Pyright cache
35
+ .mypy_cache/
36
+ .pyright/
37
+ .dmypy.json
38
+
39
+ # Environment variables
40
+ .env
41
+ .env.*
42
+ !.env.example
43
+
44
+ # Logs
45
+ *.log
46
+
47
+ # Node.js
48
+ node_modules/
49
+
50
+ # Build artifacts
51
+ .build/
52
+ # Compiled helper binary — 97 MB, regenerated by scripts/build_macos_app.sh.
53
+ # Tracked historically but should not be in git; rebuilt on demand.
54
+ app/MdInjectApp/Resources/helper/mdinject-helper
55
+
56
+ # Database
57
+ *.db
58
+ *.sqlite
59
+ *.sqlite3
60
+
61
+ # Backup Files (added by gitignore audit)
62
+ # ============================================================================
63
+ *.backup
64
+ *.bak
65
+ /.backups/
66
+ /.backup/
67
+ .backups/
68
+ .backup/
69
+
70
+ # Bodai canonical runtime artifacts (added 2026-08-17 cleanup wave)
71
+ .crackerjack/
72
+ .crackerjack/outputs/
73
+ .crackerjack-state/
74
+ .crackerjack-hooks-updated/
75
+ .crackerjack-mcp/
76
+ .oneiric_cache/
77
+ *.bak2
78
+ *.backup.*
79
+ *.backup.json
80
+ .coverage*
81
+ coverage.json
82
+ *.pyc
83
+ *.pyo
84
+ *.pyd
85
+ example.mcp.json
86
+
87
+ # ============================================================================
88
+ # Bodai-wide gitignore patterns (added 2026-09-07; cross-repo cleanup sweep)
89
+ # ============================================================================
90
+ # Editor / pre-edit backups (foo.py.backup, foo.py.backup.json)
91
+ *.backup
92
+ *.backup.*
93
+ *.bak
94
+ *.tmpl
95
+ # XDG mistake dirs (env var expansion failed; literal names)
96
+ ~
97
+ [{]HOME[}]
98
+ [{]XDG_DATA_HOME:-$HOME
99
+ # pytest-benchmark autosave cache (sibling of the tracked `benchmarks/` test suite)
100
+ .benchmarks/
101
+ # Vitest config timestamp cache
102
+ vitest.config.js.timestamp-*.mjs
103
+ # Playwright output cruft
104
+ playwright-junit.xml
105
+ playwright-report/
106
+ playwright-results.json
107
+ test-results/
108
+
109
+
110
+ # >>> bodai-shared-gitignore >>>
111
+ # Source of truth: crackerjack/templates/GITIGNORE_BODAI.md
112
+ # Enforced by: crackerjack check `gitignore-conformance`
113
+ # Fleet list: /Users/les/Projects/mahavishnu/BODAI_REPO_REGISTRY.md
114
+ # Do NOT remove the marker line above — `crackerjack gitignore sync` uses it
115
+ # to detect already-applied state.
116
+
117
+ # Editor / pre-edit backups (foo.py.backup, foo.py.backup.json)
118
+ *.backup
119
+ *.backup.*
120
+ *.bak
121
+ *.tmpl
122
+ # XDG mistake dirs (env var expansion failed; literal names)
123
+ # Note: both `{` and `}` are escaped (`{` -> `[{]`, `}` -> `[}]`)
124
+ # because gitignore parsers interpret `${...}` as a brace-expansion
125
+ # alternate group; escaping only the open brace leaves a stray `}`.
126
+ ~
127
+ [{]HOME[}]
128
+ [{]XDG_DATA_HOME:-$HOME[}]
129
+ # pytest-benchmark autosave cache (sibling of the tracked `benchmarks/` test suite)
130
+ .benchmarks/
131
+ # Vitest config timestamp cache
132
+ vitest.config.js.timestamp-*.mjs
133
+ # Playwright output cruft
134
+ playwright-junit.xml
135
+ playwright-report/
136
+ playwright-results.json
137
+ test-results/
138
+
139
+ # ============================================================================
140
+ # Documentation — image assets
141
+ # ============================================================================
142
+ # Tracked images live under docs/assets/images/. Session scratch outputs
143
+ # (named like "*-v4.png", "*-window.png", or anything dropped in
144
+ # .scratch/) are local-only and must not be committed. The dot-prefix on
145
+ # `.scratch` is load-bearing — the gitignore rule only matches with it.
146
+ docs/assets/images/.scratch/
147
+ docs/assets/images/.scratch/**
148
+ # <<< bodai-shared-gitignore <<<
149
+ # Worktree directories — local checkouts of sibling repos used for
150
+ # cross-project work, sandboxed investigations, or session scratch.
151
+ # As of 2026-09-21 these were dangling ``160000 commit <sha>`` gitlinks
152
+ # in mdinject's index (no ``.gitmodules`` backing). They were removed via
153
+ # ``git rm --cached`` and now exist on disk as untracked working
154
+ # directories — gitignore keeps them out of ``git status`` so they
155
+ # don't shadow mdinject's own change-detection. ``*worktrees/*`` matches
156
+ # both ``.worktrees/<name>/...`` and ``.claude/worktrees/<name>/...``.
157
+ *worktrees/*
@@ -0,0 +1,19 @@
1
+ https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/uv/main/assets/badge/v0.json,200,1789995776
2
+ https://semver.org/spec/v2.0.0.html,200,1789995776
3
+ https://img.shields.io/badge/runtime-oneiric-6e5494,200,1789995776
4
+ https://github.com/lesleslie/crackerjack,200,1789995778
5
+ https://github.com/migueldeicaza/SwiftTerm,200,1789995776
6
+ https://github.com/jlowin/fastmcp,200,1789995776
7
+ https://www.python.org/downloads/,200,1789995776
8
+ https://mitchellh.com/writing/libghostty-is-coming,200,1789995776
9
+ https://ghostty.org/docs/about,200,1789995776
10
+ https://github.com/astral-sh/uv,200,1789995776
11
+ https://github.com/manaflow-ai/cmux,200,1789995776
12
+ https://semver.org/,200,1789995776
13
+ https://raw.githubusercontent.com/manaflow-ai/cmux/main/Packages/macOS/CmuxTerminalCore/Package.swift,200,1789995776
14
+ https://keepachangelog.com/en/1.0.0/,200,1789995776
15
+ https://xtermjs.org/,200,1789995776
16
+ https://github.com/lesleslie/oneiric,200,1789995776
17
+ https://img.shields.io/badge/python-3.14%2B-green,200,1789995776
18
+ https://github.com/Lakr233/libghostty-spm,200,1789995776
19
+ https://img.shields.io/badge/code%20style-crackerjack-000042,200,1789995776
@@ -0,0 +1,46 @@
1
+ # lychee ignore patterns for mdinject (gitignore-like syntax).
2
+ #
3
+ # crackerjack reads this from the repo root (cwd); a
4
+ # `[tool.crackerjack.lychee]` pyproject block has NO effect.
5
+ # See crackerjack __main__.py:291.
6
+
7
+ # CHANGELOG self-references — Keep-a-Changelog footer uses
8
+ # `file://./CHANGELOG.md#<anchor>` which is GitHub-renderable but not
9
+ # a real URL. lychee tries to fetch it as a remote and reports 404.
10
+ file://./CHANGELOG.md#*
11
+
12
+ # Font Awesome CSS — vendored `all.min.css` references eight font
13
+ # files at `../webfonts/fa-*.{ttf,woff2}` but the setup_assets.sh
14
+ # script only ships fa-regular-400.woff2 + fa-solid-900.woff2. The
15
+ # four referenced font faces (fa-brands-*, fa-v4compatibility*) are
16
+ # not used by mdinject; the unused ttf companions exist for legacy
17
+ # browser fallbacks that we don't need. Lychee flags all 8; we
18
+ # ignore all 8 rather than patching the vendored CSS.
19
+ file:///Users/les/Projects/mdinject/mdinject/assets/webfonts/*
20
+ file:///Users/les/Projects/mdinject/app/MdInjectApp/Resources/webfonts/*
21
+
22
+ # editor.html:117 links `milkdown.bundle.css` from
23
+ # `app/MdInjectApp/Resources/`. The file actually lives at
24
+ # `app/MdInjectApp/Resources/vendor/milkdown.bundle.css`. The macOS
25
+ # Xcode build flattens `vendor/` into `Resources/`, so the runtime
26
+ # path resolves correctly, but lychee resolves relative to the
27
+ # HTML file's directory and sees a missing file. Ignore rather than
28
+ # duplicate the bundle or patch the HTML.
29
+ file:///Users/les/Projects/mdinject/app/MdInjectApp/Resources/milkdown.bundle.css
30
+ file:///Users/les/Projects/mdinject/app/MdInjectApp/Resources/milkdown.bundle.js
31
+
32
+ # Same flattening issue for the other vendor JS bundles referenced
33
+ # from editor.html. The paths resolve at runtime in the Xcode bundle
34
+ # but not under lychee's static resolution.
35
+ file:///Users/les/Projects/mdinject/app/MdInjectApp/Resources/codemirror.bundle.js
36
+ file:///Users/les/Projects/mdinject/app/MdInjectApp/Resources/codemirror_adapter.js
37
+ file:///Users/les/Projects/mdinject/app/MdInjectApp/Resources/codemirror.css
38
+ file:///Users/les/Projects/mdinject/app/MdInjectApp/Resources/easymde.min.js
39
+ file:///Users/les/Projects/mdinject/app/MdInjectApp/Resources/easymde.min.css
40
+ file:///Users/les/Projects/mdinject/app/MdInjectApp/Resources/all.min.js
41
+ file:///Users/les/Projects/mdinject/app/MdInjectApp/Resources/all.min.css
42
+ file:///Users/les/Projects/mdinject/app/MdInjectApp/Resources/xterm.js
43
+ file:///Users/les/Projects/mdinject/app/MdInjectApp/Resources/xterm.css
44
+ file:///Users/les/Projects/mdinject/app/MdInjectApp/Resources/xterm-addon-fit.js
45
+ file:///Users/les/Projects/mdinject/app/MdInjectApp/Resources/milkdown.bundle.css
46
+ file:///Users/les/Projects/mdinject/app/MdInjectApp/Resources/milkdown.bundle.js
@@ -0,0 +1,37 @@
1
+ repos:
2
+ - repo: https://github.com/astral-sh/ruff-pre-commit
3
+ rev: v0.8.4
4
+ hooks:
5
+ - id: ruff
6
+ args: [--fix, --exit-non-zero-on-fix]
7
+ - id: ruff-format
8
+
9
+ - repo: https://github.com/pre-commit/pre-commit-hooks
10
+ rev: v5.0.0
11
+ hooks:
12
+ - id: check-yaml
13
+ - id: check-toml
14
+ - id: check-json
15
+ - id: end-of-file-fixer
16
+ - id: trailing-whitespace
17
+ - id: check-added-large-files
18
+ args: [--maxkb=1000]
19
+ - id: check-merge-conflict
20
+ - id: detect-private-key
21
+
22
+ - repo: https://github.com/PyCQA/bandit
23
+ rev: 1.8.0
24
+ hooks:
25
+ - id: bandit
26
+ args: [-r, mdinject/, -ll]
27
+ pass_filenames: false
28
+
29
+ - repo: local
30
+ hooks:
31
+ - id: pytest-check
32
+ name: pytest-check
33
+ entry: uv run pytest
34
+ language: system
35
+ pass_filenames: false
36
+ always_run: true
37
+ args: [-m, "not integration and not slow", --tb=short]