holon-sh 0.0.1.dev23__tar.gz → 0.0.1.dev24__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 (26) hide show
  1. {holon_sh-0.0.1.dev23 → holon_sh-0.0.1.dev24}/PKG-INFO +1 -1
  2. {holon_sh-0.0.1.dev23 → holon_sh-0.0.1.dev24}/holon/serve.py +6 -2
  3. {holon_sh-0.0.1.dev23 → holon_sh-0.0.1.dev24}/pyproject.toml +1 -1
  4. {holon_sh-0.0.1.dev23 → holon_sh-0.0.1.dev24}/.gitignore +0 -0
  5. {holon_sh-0.0.1.dev23 → holon_sh-0.0.1.dev24}/LICENSE +0 -0
  6. {holon_sh-0.0.1.dev23 → holon_sh-0.0.1.dev24}/README.md +0 -0
  7. {holon_sh-0.0.1.dev23 → holon_sh-0.0.1.dev24}/holon/client.py +0 -0
  8. {holon_sh-0.0.1.dev23 → holon_sh-0.0.1.dev24}/holon/context.py +0 -0
  9. {holon_sh-0.0.1.dev23 → holon_sh-0.0.1.dev24}/holon/ext/__init__.py +0 -0
  10. {holon_sh-0.0.1.dev23 → holon_sh-0.0.1.dev24}/holon/ext/events/__init__.py +0 -0
  11. {holon_sh-0.0.1.dev23 → holon_sh-0.0.1.dev24}/holon/ext/events/_client.py +0 -0
  12. {holon_sh-0.0.1.dev23 → holon_sh-0.0.1.dev24}/holon/ext/events/_server.py +0 -0
  13. {holon_sh-0.0.1.dev23 → holon_sh-0.0.1.dev24}/holon/ext/events/_wire.py +0 -0
  14. {holon_sh-0.0.1.dev23 → holon_sh-0.0.1.dev24}/holon/ext/files/__init__.py +0 -0
  15. {holon_sh-0.0.1.dev23 → holon_sh-0.0.1.dev24}/holon/ext/files/_client.py +0 -0
  16. {holon_sh-0.0.1.dev23 → holon_sh-0.0.1.dev24}/holon/ext/files/_server.py +0 -0
  17. {holon_sh-0.0.1.dev23 → holon_sh-0.0.1.dev24}/holon/ext/files/_wire.py +0 -0
  18. {holon_sh-0.0.1.dev23 → holon_sh-0.0.1.dev24}/holon/py.typed +0 -0
  19. {holon_sh-0.0.1.dev23 → holon_sh-0.0.1.dev24}/scripts/verify_distribution.py +0 -0
  20. {holon_sh-0.0.1.dev23 → holon_sh-0.0.1.dev24}/tests/fixtures/caller/holon/apps/__init__.py +0 -0
  21. {holon_sh-0.0.1.dev23 → holon_sh-0.0.1.dev24}/tests/test_elicit.py +0 -0
  22. {holon_sh-0.0.1.dev23 → holon_sh-0.0.1.dev24}/tests/test_events.py +0 -0
  23. {holon_sh-0.0.1.dev23 → holon_sh-0.0.1.dev24}/tests/test_files.py +0 -0
  24. {holon_sh-0.0.1.dev23 → holon_sh-0.0.1.dev24}/tests/test_package.py +0 -0
  25. {holon_sh-0.0.1.dev23 → holon_sh-0.0.1.dev24}/tests/test_runtime.py +0 -0
  26. {holon_sh-0.0.1.dev23 → holon_sh-0.0.1.dev24}/tests/test_serve.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: holon-sh
3
- Version: 0.0.1.dev23
3
+ Version: 0.0.1.dev24
4
4
  Summary: Typed MCP clients and the caller of an MCP request
5
5
  Project-URL: Repository, https://github.com/holon-sh/sdk-py
6
6
  License-Expression: Apache-2.0
@@ -34,7 +34,11 @@ from holon.ext.events import Events
34
34
 
35
35
  __all__ = ["App", "load", "serve"]
36
36
 
37
- _MCP = re.compile(r"/mcp(/[^/]+)?")
37
+ # On the path before percent-decoding: a segment that decodes to . or .., holds an encoded slash, or is not valid
38
+ # percent-encoding is not an MCP path.
39
+ _MCP = re.compile(
40
+ rb"/mcp(/(?!(?:\.|%2[Ee]){1,2}\Z)(?:[^/%]|%(?!2[Ff])[0-9A-Fa-f]{2})+)?"
41
+ )
38
42
  _CONTEXT = re.compile(r"[A-Za-z0-9_-]+\.([A-Za-z0-9_-]+)\.[A-Za-z0-9_-]+")
39
43
  _CALLER = re.compile(r"([^/]+)/([^/]+)")
40
44
  _MALFORMED = PlainTextResponse(
@@ -120,7 +124,7 @@ def _asgi(app: App) -> ASGIApp:
120
124
  for name, value in headers
121
125
  if not name.startswith(b"x-holon-") and name != b"authorization"
122
126
  ]
123
- if not _MCP.fullmatch(scope["path"]):
127
+ if not _MCP.fullmatch(scope.get("raw_path") or scope["path"].encode()):
124
128
  frontend = app.frontend if scope["method"] in ("GET", "HEAD") else None
125
129
  await _page(frontend, scope["path"])(scope, receive, send)
126
130
  return
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "holon-sh"
7
- version = "0.0.1.dev23"
7
+ version = "0.0.1.dev24"
8
8
  description = "Typed MCP clients and the caller of an MCP request"
9
9
  readme = "README.md"
10
10
  license = "Apache-2.0"
File without changes
File without changes