dotscope 1.7.3__tar.gz → 1.7.4__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 (162) hide show
  1. {dotscope-1.7.3 → dotscope-1.7.4}/PKG-INFO +1 -1
  2. {dotscope-1.7.3 → dotscope-1.7.4}/dotscope/__init__.py +1 -1
  3. {dotscope-1.7.3 → dotscope-1.7.4}/dotscope/mcp/__init__.py +45 -29
  4. {dotscope-1.7.3 → dotscope-1.7.4}/pyproject.toml +1 -1
  5. {dotscope-1.7.3 → dotscope-1.7.4}/LICENSE +0 -0
  6. {dotscope-1.7.3 → dotscope-1.7.4}/README.md +0 -0
  7. {dotscope-1.7.3 → dotscope-1.7.4}/crates/dotscope-core/Cargo.lock +0 -0
  8. {dotscope-1.7.3 → dotscope-1.7.4}/crates/dotscope-core/Cargo.toml +0 -0
  9. {dotscope-1.7.3 → dotscope-1.7.4}/crates/dotscope-core/build.rs +0 -0
  10. {dotscope-1.7.3 → dotscope-1.7.4}/crates/dotscope-core/src/ast.rs +0 -0
  11. {dotscope-1.7.3 → dotscope-1.7.4}/crates/dotscope-core/src/bin/daemon.rs +0 -0
  12. {dotscope-1.7.3 → dotscope-1.7.4}/crates/dotscope-core/src/daemon.rs +0 -0
  13. {dotscope-1.7.3 → dotscope-1.7.4}/crates/dotscope-core/src/git.rs +0 -0
  14. {dotscope-1.7.3 → dotscope-1.7.4}/crates/dotscope-core/src/graph.rs +0 -0
  15. {dotscope-1.7.3 → dotscope-1.7.4}/crates/dotscope-core/src/ipc.rs +0 -0
  16. {dotscope-1.7.3 → dotscope-1.7.4}/crates/dotscope-core/src/lib.rs +0 -0
  17. {dotscope-1.7.3 → dotscope-1.7.4}/crates/dotscope-core/src/mmap.rs +0 -0
  18. {dotscope-1.7.3 → dotscope-1.7.4}/crates/dotscope-core/src/walk.rs +0 -0
  19. {dotscope-1.7.3 → dotscope-1.7.4}/dotscope/assets/ui/bundle.js +0 -0
  20. {dotscope-1.7.3 → dotscope-1.7.4}/dotscope/assets/ui/index.html +0 -0
  21. {dotscope-1.7.3 → dotscope-1.7.4}/dotscope/cli/__init__.py +0 -0
  22. {dotscope-1.7.3 → dotscope-1.7.4}/dotscope/cli/core.py +0 -0
  23. {dotscope-1.7.3 → dotscope-1.7.4}/dotscope/cli/hooks.py +0 -0
  24. {dotscope-1.7.3 → dotscope-1.7.4}/dotscope/cli/ingest.py +0 -0
  25. {dotscope-1.7.3 → dotscope-1.7.4}/dotscope/cli/observability.py +0 -0
  26. {dotscope-1.7.3 → dotscope-1.7.4}/dotscope/cli/serve.py +0 -0
  27. {dotscope-1.7.3 → dotscope-1.7.4}/dotscope/engine/__init__.py +0 -0
  28. {dotscope-1.7.3 → dotscope-1.7.4}/dotscope/engine/assertions.py +0 -0
  29. {dotscope-1.7.3 → dotscope-1.7.4}/dotscope/engine/composer.py +0 -0
  30. {dotscope-1.7.3 → dotscope-1.7.4}/dotscope/engine/constants.py +0 -0
  31. {dotscope-1.7.3 → dotscope-1.7.4}/dotscope/engine/context.py +0 -0
  32. {dotscope-1.7.3 → dotscope-1.7.4}/dotscope/engine/discovery.py +0 -0
  33. {dotscope-1.7.3 → dotscope-1.7.4}/dotscope/engine/ignore.py +0 -0
  34. {dotscope-1.7.3 → dotscope-1.7.4}/dotscope/engine/matcher.py +0 -0
  35. {dotscope-1.7.3 → dotscope-1.7.4}/dotscope/engine/parser.py +0 -0
  36. {dotscope-1.7.3 → dotscope-1.7.4}/dotscope/engine/resolver.py +0 -0
  37. {dotscope-1.7.3 → dotscope-1.7.4}/dotscope/engine/runtime_overlay.py +0 -0
  38. {dotscope-1.7.3 → dotscope-1.7.4}/dotscope/engine/scanner.py +0 -0
  39. {dotscope-1.7.3 → dotscope-1.7.4}/dotscope/engine/search.py +0 -0
  40. {dotscope-1.7.3 → dotscope-1.7.4}/dotscope/engine/tokens.py +0 -0
  41. {dotscope-1.7.3 → dotscope-1.7.4}/dotscope/engine/utility.py +0 -0
  42. {dotscope-1.7.3 → dotscope-1.7.4}/dotscope/eval/__init__.py +0 -0
  43. {dotscope-1.7.3 → dotscope-1.7.4}/dotscope/eval/bootstrap.py +0 -0
  44. {dotscope-1.7.3 → dotscope-1.7.4}/dotscope/eval/compare.py +0 -0
  45. {dotscope-1.7.3 → dotscope-1.7.4}/dotscope/eval/corpus.py +0 -0
  46. {dotscope-1.7.3 → dotscope-1.7.4}/dotscope/eval/harness.py +0 -0
  47. {dotscope-1.7.3 → dotscope-1.7.4}/dotscope/eval/replay.py +0 -0
  48. {dotscope-1.7.3 → dotscope-1.7.4}/dotscope/generate/__init__.py +0 -0
  49. {dotscope-1.7.3 → dotscope-1.7.4}/dotscope/generate/atlas.py +0 -0
  50. {dotscope-1.7.3 → dotscope-1.7.4}/dotscope/generate/contracts.py +0 -0
  51. {dotscope-1.7.3 → dotscope-1.7.4}/dotscope/generate/engine.py +0 -0
  52. {dotscope-1.7.3 → dotscope-1.7.4}/dotscope/generate/models.py +0 -0
  53. {dotscope-1.7.3 → dotscope-1.7.4}/dotscope/generate/network.py +0 -0
  54. {dotscope-1.7.3 → dotscope-1.7.4}/dotscope/mcp/core.py +0 -0
  55. {dotscope-1.7.3 → dotscope-1.7.4}/dotscope/mcp/hooks.py +0 -0
  56. {dotscope-1.7.3 → dotscope-1.7.4}/dotscope/mcp/ingest.py +0 -0
  57. {dotscope-1.7.3 → dotscope-1.7.4}/dotscope/mcp/logger.py +0 -0
  58. {dotscope-1.7.3 → dotscope-1.7.4}/dotscope/mcp/middleware.py +0 -0
  59. {dotscope-1.7.3 → dotscope-1.7.4}/dotscope/mcp/mvcc.py +0 -0
  60. {dotscope-1.7.3 → dotscope-1.7.4}/dotscope/mcp/observability.py +0 -0
  61. {dotscope-1.7.3 → dotscope-1.7.4}/dotscope/mcp/pipelines.py +0 -0
  62. {dotscope-1.7.3 → dotscope-1.7.4}/dotscope/merge/__init__.py +0 -0
  63. {dotscope-1.7.3 → dotscope-1.7.4}/dotscope/merge/classifier.py +0 -0
  64. {dotscope-1.7.3 → dotscope-1.7.4}/dotscope/merge/composer.py +0 -0
  65. {dotscope-1.7.3 → dotscope-1.7.4}/dotscope/merge/differ.py +0 -0
  66. {dotscope-1.7.3 → dotscope-1.7.4}/dotscope/merge/driver.py +0 -0
  67. {dotscope-1.7.3 → dotscope-1.7.4}/dotscope/merge/imports.py +0 -0
  68. {dotscope-1.7.3 → dotscope-1.7.4}/dotscope/merge/models.py +0 -0
  69. {dotscope-1.7.3 → dotscope-1.7.4}/dotscope/merge/swarm.py +0 -0
  70. {dotscope-1.7.3 → dotscope-1.7.4}/dotscope/models/__init__.py +0 -0
  71. {dotscope-1.7.3 → dotscope-1.7.4}/dotscope/models/core.py +0 -0
  72. {dotscope-1.7.3 → dotscope-1.7.4}/dotscope/models/eval.py +0 -0
  73. {dotscope-1.7.3 → dotscope-1.7.4}/dotscope/models/history.py +0 -0
  74. {dotscope-1.7.3 → dotscope-1.7.4}/dotscope/models/intent.py +0 -0
  75. {dotscope-1.7.3 → dotscope-1.7.4}/dotscope/models/passes.py +0 -0
  76. {dotscope-1.7.3 → dotscope-1.7.4}/dotscope/models/state.py +0 -0
  77. {dotscope-1.7.3 → dotscope-1.7.4}/dotscope/passes/__init__.py +0 -0
  78. {dotscope-1.7.3 → dotscope-1.7.4}/dotscope/passes/ast_analyzer.py +0 -0
  79. {dotscope-1.7.3 → dotscope-1.7.4}/dotscope/passes/backtest.py +0 -0
  80. {dotscope-1.7.3 → dotscope-1.7.4}/dotscope/passes/budget_allocator.py +0 -0
  81. {dotscope-1.7.3 → dotscope-1.7.4}/dotscope/passes/convention_compliance.py +0 -0
  82. {dotscope-1.7.3 → dotscope-1.7.4}/dotscope/passes/convention_discovery.py +0 -0
  83. {dotscope-1.7.3 → dotscope-1.7.4}/dotscope/passes/convention_parser.py +0 -0
  84. {dotscope-1.7.3 → dotscope-1.7.4}/dotscope/passes/graph_builder.py +0 -0
  85. {dotscope-1.7.3 → dotscope-1.7.4}/dotscope/passes/hint_generator.py +0 -0
  86. {dotscope-1.7.3 → dotscope-1.7.4}/dotscope/passes/history_miner.py +0 -0
  87. {dotscope-1.7.3 → dotscope-1.7.4}/dotscope/passes/incremental.py +0 -0
  88. {dotscope-1.7.3 → dotscope-1.7.4}/dotscope/passes/lang/__init__.py +0 -0
  89. {dotscope-1.7.3 → dotscope-1.7.4}/dotscope/passes/lang/_base.py +0 -0
  90. {dotscope-1.7.3 → dotscope-1.7.4}/dotscope/passes/lang/_treesitter.py +0 -0
  91. {dotscope-1.7.3 → dotscope-1.7.4}/dotscope/passes/lang/go.py +0 -0
  92. {dotscope-1.7.3 → dotscope-1.7.4}/dotscope/passes/lang/java.py +0 -0
  93. {dotscope-1.7.3 → dotscope-1.7.4}/dotscope/passes/lang/javascript.py +0 -0
  94. {dotscope-1.7.3 → dotscope-1.7.4}/dotscope/passes/lang/rust.py +0 -0
  95. {dotscope-1.7.3 → dotscope-1.7.4}/dotscope/passes/lang/solidity.py +0 -0
  96. {dotscope-1.7.3 → dotscope-1.7.4}/dotscope/passes/lazy.py +0 -0
  97. {dotscope-1.7.3 → dotscope-1.7.4}/dotscope/passes/preflight.py +0 -0
  98. {dotscope-1.7.3 → dotscope-1.7.4}/dotscope/passes/semantic_diff.py +0 -0
  99. {dotscope-1.7.3 → dotscope-1.7.4}/dotscope/passes/sentinel/__init__.py +0 -0
  100. {dotscope-1.7.3 → dotscope-1.7.4}/dotscope/passes/sentinel/acknowledge.py +0 -0
  101. {dotscope-1.7.3 → dotscope-1.7.4}/dotscope/passes/sentinel/checker.py +0 -0
  102. {dotscope-1.7.3 → dotscope-1.7.4}/dotscope/passes/sentinel/checks/__init__.py +0 -0
  103. {dotscope-1.7.3 → dotscope-1.7.4}/dotscope/passes/sentinel/checks/antipattern.py +0 -0
  104. {dotscope-1.7.3 → dotscope-1.7.4}/dotscope/passes/sentinel/checks/boundary.py +0 -0
  105. {dotscope-1.7.3 → dotscope-1.7.4}/dotscope/passes/sentinel/checks/contracts.py +0 -0
  106. {dotscope-1.7.3 → dotscope-1.7.4}/dotscope/passes/sentinel/checks/convention.py +0 -0
  107. {dotscope-1.7.3 → dotscope-1.7.4}/dotscope/passes/sentinel/checks/direction.py +0 -0
  108. {dotscope-1.7.3 → dotscope-1.7.4}/dotscope/passes/sentinel/checks/intent.py +0 -0
  109. {dotscope-1.7.3 → dotscope-1.7.4}/dotscope/passes/sentinel/checks/network.py +0 -0
  110. {dotscope-1.7.3 → dotscope-1.7.4}/dotscope/passes/sentinel/checks/spatial.py +0 -0
  111. {dotscope-1.7.3 → dotscope-1.7.4}/dotscope/passes/sentinel/checks/stability.py +0 -0
  112. {dotscope-1.7.3 → dotscope-1.7.4}/dotscope/passes/sentinel/checks/voice.py +0 -0
  113. {dotscope-1.7.3 → dotscope-1.7.4}/dotscope/passes/sentinel/constraints.py +0 -0
  114. {dotscope-1.7.3 → dotscope-1.7.4}/dotscope/passes/sentinel/line_filter.py +0 -0
  115. {dotscope-1.7.3 → dotscope-1.7.4}/dotscope/passes/sentinel/models.py +0 -0
  116. {dotscope-1.7.3 → dotscope-1.7.4}/dotscope/passes/spatial_autofix.py +0 -0
  117. {dotscope-1.7.3 → dotscope-1.7.4}/dotscope/passes/virtual.py +0 -0
  118. {dotscope-1.7.3 → dotscope-1.7.4}/dotscope/passes/voice.py +0 -0
  119. {dotscope-1.7.3 → dotscope-1.7.4}/dotscope/passes/voice_defaults.py +0 -0
  120. {dotscope-1.7.3 → dotscope-1.7.4}/dotscope/passes/voice_discovery.py +0 -0
  121. {dotscope-1.7.3 → dotscope-1.7.4}/dotscope/passes/z3_transpiler.py +0 -0
  122. {dotscope-1.7.3 → dotscope-1.7.4}/dotscope/paths/__init__.py +0 -0
  123. {dotscope-1.7.3 → dotscope-1.7.4}/dotscope/paths/repo.py +0 -0
  124. {dotscope-1.7.3 → dotscope-1.7.4}/dotscope/search/__init__.py +0 -0
  125. {dotscope-1.7.3 → dotscope-1.7.4}/dotscope/search/chunker.py +0 -0
  126. {dotscope-1.7.3 → dotscope-1.7.4}/dotscope/search/expander.py +0 -0
  127. {dotscope-1.7.3 → dotscope-1.7.4}/dotscope/search/flattener.py +0 -0
  128. {dotscope-1.7.3 → dotscope-1.7.4}/dotscope/search/models.py +0 -0
  129. {dotscope-1.7.3 → dotscope-1.7.4}/dotscope/search/observation.py +0 -0
  130. {dotscope-1.7.3 → dotscope-1.7.4}/dotscope/search/reranker.py +0 -0
  131. {dotscope-1.7.3 → dotscope-1.7.4}/dotscope/search/retriever.py +0 -0
  132. {dotscope-1.7.3 → dotscope-1.7.4}/dotscope/search/synthesizer.py +0 -0
  133. {dotscope-1.7.3 → dotscope-1.7.4}/dotscope/storage/__init__.py +0 -0
  134. {dotscope-1.7.3 → dotscope-1.7.4}/dotscope/storage/cache.py +0 -0
  135. {dotscope-1.7.3 → dotscope-1.7.4}/dotscope/storage/claude_hooks.py +0 -0
  136. {dotscope-1.7.3 → dotscope-1.7.4}/dotscope/storage/git_hooks.py +0 -0
  137. {dotscope-1.7.3 → dotscope-1.7.4}/dotscope/storage/incremental_state.py +0 -0
  138. {dotscope-1.7.3 → dotscope-1.7.4}/dotscope/storage/mcp_config.py +0 -0
  139. {dotscope-1.7.3 → dotscope-1.7.4}/dotscope/storage/near_miss.py +0 -0
  140. {dotscope-1.7.3 → dotscope-1.7.4}/dotscope/storage/onboarding.py +0 -0
  141. {dotscope-1.7.3 → dotscope-1.7.4}/dotscope/storage/session_manager.py +0 -0
  142. {dotscope-1.7.3 → dotscope-1.7.4}/dotscope/storage/swarm_state.py +0 -0
  143. {dotscope-1.7.3 → dotscope-1.7.4}/dotscope/storage/timing.py +0 -0
  144. {dotscope-1.7.3 → dotscope-1.7.4}/dotscope/ux/__init__.py +0 -0
  145. {dotscope-1.7.3 → dotscope-1.7.4}/dotscope/ux/bench.py +0 -0
  146. {dotscope-1.7.3 → dotscope-1.7.4}/dotscope/ux/counterfactual.py +0 -0
  147. {dotscope-1.7.3 → dotscope-1.7.4}/dotscope/ux/debug.py +0 -0
  148. {dotscope-1.7.3 → dotscope-1.7.4}/dotscope/ux/explain.py +0 -0
  149. {dotscope-1.7.3 → dotscope-1.7.4}/dotscope/ux/formatter.py +0 -0
  150. {dotscope-1.7.3 → dotscope-1.7.4}/dotscope/ux/health.py +0 -0
  151. {dotscope-1.7.3 → dotscope-1.7.4}/dotscope/ux/help.py +0 -0
  152. {dotscope-1.7.3 → dotscope-1.7.4}/dotscope/ux/progress.py +0 -0
  153. {dotscope-1.7.3 → dotscope-1.7.4}/dotscope/ux/textio.py +0 -0
  154. {dotscope-1.7.3 → dotscope-1.7.4}/dotscope/ux/visibility.py +0 -0
  155. {dotscope-1.7.3 → dotscope-1.7.4}/dotscope/workflows/__init__.py +0 -0
  156. {dotscope-1.7.3 → dotscope-1.7.4}/dotscope/workflows/absorber.py +0 -0
  157. {dotscope-1.7.3 → dotscope-1.7.4}/dotscope/workflows/ingest.py +0 -0
  158. {dotscope-1.7.3 → dotscope-1.7.4}/dotscope/workflows/intent.py +0 -0
  159. {dotscope-1.7.3 → dotscope-1.7.4}/dotscope/workflows/lessons.py +0 -0
  160. {dotscope-1.7.3 → dotscope-1.7.4}/dotscope/workflows/refresh.py +0 -0
  161. {dotscope-1.7.3 → dotscope-1.7.4}/dotscope/workflows/regression.py +0 -0
  162. {dotscope-1.7.3 → dotscope-1.7.4}/dotscope/workflows/sync.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: dotscope
3
- Version: 1.7.3
3
+ Version: 1.7.4
4
4
  Classifier: Development Status :: 3 - Alpha
5
5
  Classifier: Intended Audience :: Developers
6
6
  Classifier: Topic :: Software Development :: Libraries
@@ -1,3 +1,3 @@
1
1
  """dotscope — Directory-scoped context boundaries for AI coding agents."""
2
2
 
3
- __version__ = "1.7.3"
3
+ __version__ = "1.7.4"
@@ -58,39 +58,27 @@ def main():
58
58
  import sys
59
59
  import contextlib
60
60
 
61
- # 1. Capture the virgin OS-level stdout file descriptor (the JSON pipe)
61
+ # Redirect stray stdout writes (from libraries, print() calls, etc.)
62
+ # to stderr so that only clean JSON-RPC flows over the stdio transport.
63
+ #
64
+ # How it works:
65
+ # 1. Save the real stdout fd (the MCP pipe to the client).
66
+ # 2. Point fd 1 and sys.stdout at stderr (captures stray output).
67
+ # 3. Build an isolated file object from the saved fd.
68
+ # 4. Patch the reference that FastMCP.run_stdio_async actually uses
69
+ # — the local name imported via `from mcp.server.stdio import
70
+ # stdio_server` inside mcp/server/fastmcp/server.py. Patching
71
+ # `mcp.server.stdio.stdio_server` alone has no effect because
72
+ # the `from … import` already bound a direct reference.
73
+ _isolated_stdout = None
62
74
  try:
63
75
  virgin_stdout_fd = os.dup(1)
76
+ os.dup2(2, 1) # fd 1 → stderr
77
+ sys.stdout = sys.stderr # Python-level sync
64
78
 
65
- # 2. Violently overwrite OS-level stdout (1) with stderr (2).
66
- # This physically forces all Rust/C/Python logs into the error stream.
67
- os.dup2(2, 1)
68
-
69
- # 3. Synchronize Python's high-level wrapper
70
- sys.stdout = sys.stderr
71
-
72
- # 4. Construct a completely isolated file object from the virgin FD
73
- isolated_stdout = open(virgin_stdout_fd, "wb", buffering=0)
74
-
75
- # Monkeypatch FastMCP's underlying stdio_server
76
- import mcp.server.stdio
77
- import anyio
78
- from io import TextIOWrapper
79
-
80
- original_stdio_server = mcp.server.stdio.stdio_server
81
-
82
- @contextlib.asynccontextmanager
83
- async def patched_stdio_server(stdin=None, stdout=None):
84
- if stdout is None:
85
- # Enforce usage of the physically isolated OS pipe
86
- stdout = anyio.wrap_file(TextIOWrapper(isolated_stdout, encoding="utf-8"))
87
- async with original_stdio_server(stdin=stdin, stdout=stdout) as streams:
88
- yield streams
89
-
90
- # 5. Lock in the Monkeypatch
91
- mcp.server.stdio.stdio_server = patched_stdio_server
79
+ _isolated_stdout = open(virgin_stdout_fd, "wb", buffering=0)
92
80
  except Exception as e:
93
- print(f"dotscope warning: OS-level isolation failed: {e}", file=sys.stderr)
81
+ print(f"dotscope warning: stdout isolation failed: {e}", file=sys.stderr)
94
82
 
95
83
  try:
96
84
  from mcp.server.fastmcp import FastMCP
@@ -109,6 +97,34 @@ def main():
109
97
  known, _remaining = parser.parse_known_args()
110
98
  _cli_root = known.root
111
99
 
100
+ # Patch the stdio_server reference that FastMCP.run_stdio_async actually
101
+ # calls. The module does `from mcp.server.stdio import stdio_server` so
102
+ # we must overwrite that *local* name, not the module-level attribute.
103
+ if _isolated_stdout is not None:
104
+ try:
105
+ import mcp.server.stdio as _mcp_stdio
106
+ import mcp.server.fastmcp.server as _fastmcp_mod
107
+ import anyio
108
+ from io import TextIOWrapper
109
+
110
+ _original_stdio_server = _mcp_stdio.stdio_server
111
+
112
+ @contextlib.asynccontextmanager
113
+ async def _patched_stdio_server(stdin=None, stdout=None):
114
+ if stdout is None:
115
+ stdout = anyio.wrap_file(
116
+ TextIOWrapper(_isolated_stdout, encoding="utf-8")
117
+ )
118
+ async with _original_stdio_server(stdin=stdin, stdout=stdout) as streams:
119
+ yield streams
120
+
121
+ # Patch both: the module attr (for anyone else importing it) and
122
+ # the local name inside fastmcp.server (the one that matters).
123
+ _mcp_stdio.stdio_server = _patched_stdio_server
124
+ _fastmcp_mod.stdio_server = _patched_stdio_server
125
+ except Exception as e:
126
+ print(f"dotscope warning: stdio patch failed: {e}", file=sys.stderr)
127
+
112
128
  mcp = FastMCP("dotscope")
113
129
 
114
130
  # Session-level tracker (lives across tool calls in a single MCP session)
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "dotscope"
3
- version = "1.7.3"
3
+ version = "1.7.4"
4
4
  description = "Agents see files. You see architecture. dotscope gives agents the architecture."
5
5
  readme = "README.md"
6
6
  license = "MIT"
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes