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.
- {holon_sh-0.0.1.dev23 → holon_sh-0.0.1.dev24}/PKG-INFO +1 -1
- {holon_sh-0.0.1.dev23 → holon_sh-0.0.1.dev24}/holon/serve.py +6 -2
- {holon_sh-0.0.1.dev23 → holon_sh-0.0.1.dev24}/pyproject.toml +1 -1
- {holon_sh-0.0.1.dev23 → holon_sh-0.0.1.dev24}/.gitignore +0 -0
- {holon_sh-0.0.1.dev23 → holon_sh-0.0.1.dev24}/LICENSE +0 -0
- {holon_sh-0.0.1.dev23 → holon_sh-0.0.1.dev24}/README.md +0 -0
- {holon_sh-0.0.1.dev23 → holon_sh-0.0.1.dev24}/holon/client.py +0 -0
- {holon_sh-0.0.1.dev23 → holon_sh-0.0.1.dev24}/holon/context.py +0 -0
- {holon_sh-0.0.1.dev23 → holon_sh-0.0.1.dev24}/holon/ext/__init__.py +0 -0
- {holon_sh-0.0.1.dev23 → holon_sh-0.0.1.dev24}/holon/ext/events/__init__.py +0 -0
- {holon_sh-0.0.1.dev23 → holon_sh-0.0.1.dev24}/holon/ext/events/_client.py +0 -0
- {holon_sh-0.0.1.dev23 → holon_sh-0.0.1.dev24}/holon/ext/events/_server.py +0 -0
- {holon_sh-0.0.1.dev23 → holon_sh-0.0.1.dev24}/holon/ext/events/_wire.py +0 -0
- {holon_sh-0.0.1.dev23 → holon_sh-0.0.1.dev24}/holon/ext/files/__init__.py +0 -0
- {holon_sh-0.0.1.dev23 → holon_sh-0.0.1.dev24}/holon/ext/files/_client.py +0 -0
- {holon_sh-0.0.1.dev23 → holon_sh-0.0.1.dev24}/holon/ext/files/_server.py +0 -0
- {holon_sh-0.0.1.dev23 → holon_sh-0.0.1.dev24}/holon/ext/files/_wire.py +0 -0
- {holon_sh-0.0.1.dev23 → holon_sh-0.0.1.dev24}/holon/py.typed +0 -0
- {holon_sh-0.0.1.dev23 → holon_sh-0.0.1.dev24}/scripts/verify_distribution.py +0 -0
- {holon_sh-0.0.1.dev23 → holon_sh-0.0.1.dev24}/tests/fixtures/caller/holon/apps/__init__.py +0 -0
- {holon_sh-0.0.1.dev23 → holon_sh-0.0.1.dev24}/tests/test_elicit.py +0 -0
- {holon_sh-0.0.1.dev23 → holon_sh-0.0.1.dev24}/tests/test_events.py +0 -0
- {holon_sh-0.0.1.dev23 → holon_sh-0.0.1.dev24}/tests/test_files.py +0 -0
- {holon_sh-0.0.1.dev23 → holon_sh-0.0.1.dev24}/tests/test_package.py +0 -0
- {holon_sh-0.0.1.dev23 → holon_sh-0.0.1.dev24}/tests/test_runtime.py +0 -0
- {holon_sh-0.0.1.dev23 → holon_sh-0.0.1.dev24}/tests/test_serve.py +0 -0
|
@@ -34,7 +34,11 @@ from holon.ext.events import Events
|
|
|
34
34
|
|
|
35
35
|
__all__ = ["App", "load", "serve"]
|
|
36
36
|
|
|
37
|
-
|
|
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
|
|
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
|
|
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
|