holon-sh 0.0.1.dev20__tar.gz → 0.0.1.dev21__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.dev20 → holon_sh-0.0.1.dev21}/PKG-INFO +1 -1
- {holon_sh-0.0.1.dev20 → holon_sh-0.0.1.dev21}/holon/ext/events/_client.py +9 -4
- {holon_sh-0.0.1.dev20 → holon_sh-0.0.1.dev21}/pyproject.toml +1 -1
- {holon_sh-0.0.1.dev20 → holon_sh-0.0.1.dev21}/tests/test_events.py +6 -0
- {holon_sh-0.0.1.dev20 → holon_sh-0.0.1.dev21}/.gitignore +0 -0
- {holon_sh-0.0.1.dev20 → holon_sh-0.0.1.dev21}/LICENSE +0 -0
- {holon_sh-0.0.1.dev20 → holon_sh-0.0.1.dev21}/README.md +0 -0
- {holon_sh-0.0.1.dev20 → holon_sh-0.0.1.dev21}/holon/client.py +0 -0
- {holon_sh-0.0.1.dev20 → holon_sh-0.0.1.dev21}/holon/context.py +0 -0
- {holon_sh-0.0.1.dev20 → holon_sh-0.0.1.dev21}/holon/ext/__init__.py +0 -0
- {holon_sh-0.0.1.dev20 → holon_sh-0.0.1.dev21}/holon/ext/events/__init__.py +0 -0
- {holon_sh-0.0.1.dev20 → holon_sh-0.0.1.dev21}/holon/ext/events/_server.py +0 -0
- {holon_sh-0.0.1.dev20 → holon_sh-0.0.1.dev21}/holon/ext/events/_wire.py +0 -0
- {holon_sh-0.0.1.dev20 → holon_sh-0.0.1.dev21}/holon/ext/files/__init__.py +0 -0
- {holon_sh-0.0.1.dev20 → holon_sh-0.0.1.dev21}/holon/ext/files/_client.py +0 -0
- {holon_sh-0.0.1.dev20 → holon_sh-0.0.1.dev21}/holon/ext/files/_server.py +0 -0
- {holon_sh-0.0.1.dev20 → holon_sh-0.0.1.dev21}/holon/ext/files/_wire.py +0 -0
- {holon_sh-0.0.1.dev20 → holon_sh-0.0.1.dev21}/holon/py.typed +0 -0
- {holon_sh-0.0.1.dev20 → holon_sh-0.0.1.dev21}/holon/serve.py +0 -0
- {holon_sh-0.0.1.dev20 → holon_sh-0.0.1.dev21}/scripts/verify_distribution.py +0 -0
- {holon_sh-0.0.1.dev20 → holon_sh-0.0.1.dev21}/tests/fixtures/caller/holon/apps/__init__.py +0 -0
- {holon_sh-0.0.1.dev20 → holon_sh-0.0.1.dev21}/tests/test_context.py +0 -0
- {holon_sh-0.0.1.dev20 → holon_sh-0.0.1.dev21}/tests/test_elicit.py +0 -0
- {holon_sh-0.0.1.dev20 → holon_sh-0.0.1.dev21}/tests/test_files.py +0 -0
- {holon_sh-0.0.1.dev20 → holon_sh-0.0.1.dev21}/tests/test_package.py +0 -0
- {holon_sh-0.0.1.dev20 → holon_sh-0.0.1.dev21}/tests/test_runtime.py +0 -0
- {holon_sh-0.0.1.dev20 → holon_sh-0.0.1.dev21}/tests/test_serve.py +0 -0
|
@@ -141,7 +141,8 @@ class AppEvents:
|
|
|
141
141
|
arguments: The subscription's arguments.
|
|
142
142
|
cursor: Where to resume from. Defaults to now.
|
|
143
143
|
max_age: Seconds; older events are not replayed.
|
|
144
|
-
delivery: ``"push"`` or ``"poll"
|
|
144
|
+
delivery: ``"push"`` or ``"poll"``, which the app refuses when it does not offer it.
|
|
145
|
+
Defaults to push when offered.
|
|
145
146
|
on_gap: Called when events were skipped.
|
|
146
147
|
|
|
147
148
|
Returns:
|
|
@@ -279,10 +280,14 @@ class Subscription(Generic[D]):
|
|
|
279
280
|
self._send.close()
|
|
280
281
|
|
|
281
282
|
async def _follow(self, client: Client) -> None:
|
|
282
|
-
listed = [each for each in await _list(client) if each["name"] == self._name]
|
|
283
|
-
# An unlisted type is left for the app to refuse.
|
|
284
|
-
offered = listed[0].get("delivery", []) if listed else ["poll"]
|
|
285
283
|
wanted: list[Delivery] = [self.delivery] if self.delivery else ["push", "poll"]
|
|
284
|
+
# A named mode, like an unlisted type, is left for the app to refuse.
|
|
285
|
+
offered: list[str] = list(wanted)
|
|
286
|
+
if not self.delivery:
|
|
287
|
+
listed = [
|
|
288
|
+
each for each in await _list(client) if each["name"] == self._name
|
|
289
|
+
]
|
|
290
|
+
offered = listed[0].get("delivery", []) if listed else ["poll"]
|
|
286
291
|
modes = [mode for mode in wanted if mode in offered]
|
|
287
292
|
if not modes:
|
|
288
293
|
raise NoCompatibleDeliveryMode(
|
|
@@ -382,6 +382,12 @@ async def test_the_messages_on_the_wire_are_the_sketchs():
|
|
|
382
382
|
),
|
|
383
383
|
]:
|
|
384
384
|
assert (await call(http, port, method, params))["error"]["code"] == code
|
|
385
|
+
with pytest.raises(MCPError) as refused:
|
|
386
|
+
async with client(port).subscribe(
|
|
387
|
+
"board.locked", {"board": "b1"}, delivery="push"
|
|
388
|
+
):
|
|
389
|
+
pass
|
|
390
|
+
assert refused.value.error.code == -32026
|
|
385
391
|
|
|
386
392
|
url, opened = f"http://127.0.0.1:{port}/mcp", changed.cursor()
|
|
387
393
|
async with http.stream(
|
|
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
|