muse-code-sdk 1.4.8__tar.gz → 1.4.9__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.
- {muse_code_sdk-1.4.8/src/muse_code_sdk.egg-info → muse_code_sdk-1.4.9}/PKG-INFO +1 -1
- {muse_code_sdk-1.4.8 → muse_code_sdk-1.4.9}/pyproject.toml +1 -1
- {muse_code_sdk-1.4.8 → muse_code_sdk-1.4.9}/src/muse_code/__init__.py +2 -2
- {muse_code_sdk-1.4.8 → muse_code_sdk-1.4.9}/src/muse_code/fold/__init__.py +2 -0
- {muse_code_sdk-1.4.8 → muse_code_sdk-1.4.9}/src/muse_code/fold/session_fold.py +19 -0
- {muse_code_sdk-1.4.8 → muse_code_sdk-1.4.9/src/muse_code_sdk.egg-info}/PKG-INFO +1 -1
- {muse_code_sdk-1.4.8 → muse_code_sdk-1.4.9}/tests/test_session_fold.py +23 -0
- {muse_code_sdk-1.4.8 → muse_code_sdk-1.4.9}/LICENSE +0 -0
- {muse_code_sdk-1.4.8 → muse_code_sdk-1.4.9}/README.md +0 -0
- {muse_code_sdk-1.4.8 → muse_code_sdk-1.4.9}/setup.cfg +0 -0
- {muse_code_sdk-1.4.8 → muse_code_sdk-1.4.9}/src/muse_code/connection/__init__.py +0 -0
- {muse_code_sdk-1.4.8 → muse_code_sdk-1.4.9}/src/muse_code/connection/connection.py +0 -0
- {muse_code_sdk-1.4.8 → muse_code_sdk-1.4.9}/src/muse_code/connection/discovery.py +0 -0
- {muse_code_sdk-1.4.8 → muse_code_sdk-1.4.9}/src/muse_code/connection/spawn.py +0 -0
- {muse_code_sdk-1.4.8 → muse_code_sdk-1.4.9}/src/muse_code/connection/validation.py +0 -0
- {muse_code_sdk-1.4.8 → muse_code_sdk-1.4.9}/src/muse_code/errors.py +0 -0
- {muse_code_sdk-1.4.8 → muse_code_sdk-1.4.9}/src/muse_code/facade/__init__.py +0 -0
- {muse_code_sdk-1.4.8 → muse_code_sdk-1.4.9}/src/muse_code/facade/approval.py +0 -0
- {muse_code_sdk-1.4.8 → muse_code_sdk-1.4.9}/src/muse_code/facade/client.py +0 -0
- {muse_code_sdk-1.4.8 → muse_code_sdk-1.4.9}/src/muse_code/facade/discarded.py +0 -0
- {muse_code_sdk-1.4.8 → muse_code_sdk-1.4.9}/src/muse_code/facade/gap_fill.py +0 -0
- {muse_code_sdk-1.4.8 → muse_code_sdk-1.4.9}/src/muse_code/facade/host_death.py +0 -0
- {muse_code_sdk-1.4.8 → muse_code_sdk-1.4.9}/src/muse_code/facade/host_start.py +0 -0
- {muse_code_sdk-1.4.8 → muse_code_sdk-1.4.9}/src/muse_code/facade/session.py +0 -0
- {muse_code_sdk-1.4.8 → muse_code_sdk-1.4.9}/src/muse_code/facade/turn_handle.py +0 -0
- {muse_code_sdk-1.4.8 → muse_code_sdk-1.4.9}/src/muse_code/facade/turn_submit.py +0 -0
- {muse_code_sdk-1.4.8 → muse_code_sdk-1.4.9}/src/muse_code/fold/item_store.py +0 -0
- {muse_code_sdk-1.4.8 → muse_code_sdk-1.4.9}/src/muse_code/fold/state_store.py +0 -0
- {muse_code_sdk-1.4.8 → muse_code_sdk-1.4.9}/src/muse_code/pending/__init__.py +0 -0
- {muse_code_sdk-1.4.8 → muse_code_sdk-1.4.9}/src/muse_code/pending/pending_command_set.py +0 -0
- {muse_code_sdk-1.4.8 → muse_code_sdk-1.4.9}/src/muse_code/py.typed +0 -0
- {muse_code_sdk-1.4.8 → muse_code_sdk-1.4.9}/src/muse_code/replay.py +0 -0
- {muse_code_sdk-1.4.8 → muse_code_sdk-1.4.9}/src/muse_code/sync_facade.py +0 -0
- {muse_code_sdk-1.4.8 → muse_code_sdk-1.4.9}/src/muse_code_sdk.egg-info/SOURCES.txt +0 -0
- {muse_code_sdk-1.4.8 → muse_code_sdk-1.4.9}/src/muse_code_sdk.egg-info/dependency_links.txt +0 -0
- {muse_code_sdk-1.4.8 → muse_code_sdk-1.4.9}/src/muse_code_sdk.egg-info/requires.txt +0 -0
- {muse_code_sdk-1.4.8 → muse_code_sdk-1.4.9}/src/muse_code_sdk.egg-info/top_level.txt +0 -0
- {muse_code_sdk-1.4.8 → muse_code_sdk-1.4.9}/tests/test_asyncio_cancellation.py +0 -0
- {muse_code_sdk-1.4.8 → muse_code_sdk-1.4.9}/tests/test_compatibility_row.py +0 -0
- {muse_code_sdk-1.4.8 → muse_code_sdk-1.4.9}/tests/test_connection.py +0 -0
- {muse_code_sdk-1.4.8 → muse_code_sdk-1.4.9}/tests/test_connection_error_arms.py +0 -0
- {muse_code_sdk-1.4.8 → muse_code_sdk-1.4.9}/tests/test_docs_generation.py +0 -0
- {muse_code_sdk-1.4.8 → muse_code_sdk-1.4.9}/tests/test_external_audience.py +0 -0
- {muse_code_sdk-1.4.8 → muse_code_sdk-1.4.9}/tests/test_facade_approval.py +0 -0
- {muse_code_sdk-1.4.8 → muse_code_sdk-1.4.9}/tests/test_facade_gap_fill.py +0 -0
- {muse_code_sdk-1.4.8 → muse_code_sdk-1.4.9}/tests/test_facade_open_same_chunk.py +0 -0
- {muse_code_sdk-1.4.8 → muse_code_sdk-1.4.9}/tests/test_facade_persistent_approval.py +0 -0
- {muse_code_sdk-1.4.8 → muse_code_sdk-1.4.9}/tests/test_facade_required_selection.py +0 -0
- {muse_code_sdk-1.4.8 → muse_code_sdk-1.4.9}/tests/test_facade_turn.py +0 -0
- {muse_code_sdk-1.4.8 → muse_code_sdk-1.4.9}/tests/test_host_discovery.py +0 -0
- {muse_code_sdk-1.4.8 → muse_code_sdk-1.4.9}/tests/test_item_store.py +0 -0
- {muse_code_sdk-1.4.8 → muse_code_sdk-1.4.9}/tests/test_manifests.py +0 -0
- {muse_code_sdk-1.4.8 → muse_code_sdk-1.4.9}/tests/test_muse_serve_child.py +0 -0
- {muse_code_sdk-1.4.8 → muse_code_sdk-1.4.9}/tests/test_pending_command_corpus.py +0 -0
- {muse_code_sdk-1.4.8 → muse_code_sdk-1.4.9}/tests/test_pending_command_set.py +0 -0
- {muse_code_sdk-1.4.8 → muse_code_sdk-1.4.9}/tests/test_pending_command_wire_binding.py +0 -0
- {muse_code_sdk-1.4.8 → muse_code_sdk-1.4.9}/tests/test_permission_state_wire_types.py +0 -0
- {muse_code_sdk-1.4.8 → muse_code_sdk-1.4.9}/tests/test_public_mirror_text.py +0 -0
- {muse_code_sdk-1.4.8 → muse_code_sdk-1.4.9}/tests/test_publish_shape.py +0 -0
- {muse_code_sdk-1.4.8 → muse_code_sdk-1.4.9}/tests/test_source_closure.py +0 -0
- {muse_code_sdk-1.4.8 → muse_code_sdk-1.4.9}/tests/test_spawn_handshake.py +0 -0
- {muse_code_sdk-1.4.8 → muse_code_sdk-1.4.9}/tests/test_spawn_host_lost.py +0 -0
- {muse_code_sdk-1.4.8 → muse_code_sdk-1.4.9}/tests/test_state_store.py +0 -0
- {muse_code_sdk-1.4.8 → muse_code_sdk-1.4.9}/tests/test_sync_facade.py +0 -0
- {muse_code_sdk-1.4.8 → muse_code_sdk-1.4.9}/tests/test_tolerance_corpus.py +0 -0
- {muse_code_sdk-1.4.8 → muse_code_sdk-1.4.9}/tests/test_transcript_replay.py +0 -0
- {muse_code_sdk-1.4.8 → muse_code_sdk-1.4.9}/tests/test_typing_gates.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: muse-code-sdk
|
|
3
|
-
Version: 1.4.
|
|
3
|
+
Version: 1.4.9
|
|
4
4
|
Summary: Muse Code SDK for MSP: asyncio-first facade over the generated wire types (muse-code-msp), with a thin sync wrapper.
|
|
5
5
|
License-Expression: MIT
|
|
6
6
|
Project-URL: Homepage, https://github.com/meta-models/muse-code-sdk
|
|
@@ -5,7 +5,7 @@ build-backend = "setuptools.build_meta"
|
|
|
5
5
|
|
|
6
6
|
[project]
|
|
7
7
|
name = "muse-code-sdk"
|
|
8
|
-
version = "1.4.
|
|
8
|
+
version = "1.4.9"
|
|
9
9
|
description = "Muse Code SDK for MSP: asyncio-first facade over the generated wire types (muse-code-msp), with a thin sync wrapper."
|
|
10
10
|
readme = "README.md"
|
|
11
11
|
requires-python = ">=3.10"
|
|
@@ -80,7 +80,7 @@ __all__ = [
|
|
|
80
80
|
]
|
|
81
81
|
|
|
82
82
|
EXPECTED_SCHEMA_FINGERPRINT: Final[str] = (
|
|
83
|
-
"sha256:
|
|
83
|
+
"sha256:5d3b43e5ccdb7dc4f5a32c380f5f2cde0f10e3059b93610afb2e73f73b1d914c"
|
|
84
84
|
)
|
|
85
85
|
"""The stable schema-bundle fingerprint this SDK was built against.
|
|
86
86
|
|
|
@@ -92,7 +92,7 @@ Python SDK reds this lane instead of drifting silently.
|
|
|
92
92
|
# The lockstep rule: the release train bumps pyproject.toml, the
|
|
93
93
|
# distribution-metadata authority; this constant is aligned at publication
|
|
94
94
|
# time.
|
|
95
|
-
__version__: Final[str] = "1.4.
|
|
95
|
+
__version__: Final[str] = "1.4.9"
|
|
96
96
|
|
|
97
97
|
# The facade is imported last so the constants above are already bound: the
|
|
98
98
|
# spawn path reads ``EXPECTED_SCHEMA_FINGERPRINT`` (lazily, at initialize
|
|
@@ -21,6 +21,7 @@ from .session_fold import (
|
|
|
21
21
|
LIVE_HOST_STATE_PROJECTIONS,
|
|
22
22
|
VIEW_EVENT_METHODS,
|
|
23
23
|
ApprovalPending,
|
|
24
|
+
ApprovalReviewingNotice,
|
|
24
25
|
ApprovalResolvedFold,
|
|
25
26
|
DeliveryGap,
|
|
26
27
|
FoldItems,
|
|
@@ -48,6 +49,7 @@ __all__ = [
|
|
|
48
49
|
"VIEW_EVENT_METHODS",
|
|
49
50
|
"Appended",
|
|
50
51
|
"ApprovalPending",
|
|
52
|
+
"ApprovalReviewingNotice",
|
|
51
53
|
"ApprovalResolvedFold",
|
|
52
54
|
"BufferedForAbsentItem",
|
|
53
55
|
"DeliveryGap",
|
|
@@ -75,6 +75,9 @@ VIEW_EVENT_METHODS: frozenset[str] = frozenset(
|
|
|
75
75
|
"turn/modelRetryScheduled",
|
|
76
76
|
"turn/unqueued",
|
|
77
77
|
"approval/requested",
|
|
78
|
+
# The reviewer-held twin of `approval/requested`: routed to its own
|
|
79
|
+
# non-storing notice.
|
|
80
|
+
"approval/reviewing",
|
|
78
81
|
"approval/updated",
|
|
79
82
|
"approval/resolved",
|
|
80
83
|
"userInput/requested",
|
|
@@ -281,6 +284,19 @@ class ModelRouteUnservedNotice:
|
|
|
281
284
|
provider_id: str | None
|
|
282
285
|
|
|
283
286
|
|
|
287
|
+
@dataclass(frozen=True)
|
|
288
|
+
class ApprovalReviewingNotice:
|
|
289
|
+
"""The ``approval/reviewing`` typed-activity signal.
|
|
290
|
+
|
|
291
|
+
The host's built-in reviewer holds this approval. A notice, never a
|
|
292
|
+
pending entry: it seeds no store and opens no decision — the approval is
|
|
293
|
+
absent from ``pending_approvals`` until ``approval/requested`` releases it
|
|
294
|
+
to the human (or ``approval/resolved`` settles it) on the same id.
|
|
295
|
+
"""
|
|
296
|
+
|
|
297
|
+
approval_id: str
|
|
298
|
+
|
|
299
|
+
|
|
284
300
|
@dataclass(frozen=True)
|
|
285
301
|
class IgnoredUnrecognizedMethod:
|
|
286
302
|
"""A newer host's method this SDK has never heard of."""
|
|
@@ -330,6 +346,7 @@ FoldOutcome = (
|
|
|
330
346
|
| UserInputSettledFold
|
|
331
347
|
| DeliveryGap
|
|
332
348
|
| ModelRouteUnservedNotice
|
|
349
|
+
| ApprovalReviewingNotice
|
|
333
350
|
| IgnoredUnrecognizedMethod
|
|
334
351
|
| IgnoredMissingParams
|
|
335
352
|
| IgnoredStaleFrame
|
|
@@ -585,6 +602,8 @@ class SessionFold:
|
|
|
585
602
|
return self._turn_foreground_completed(params)
|
|
586
603
|
if method == "approval/requested":
|
|
587
604
|
return self._approval_requested(params)
|
|
605
|
+
if method == "approval/reviewing":
|
|
606
|
+
return ApprovalReviewingNotice(approval_id=str(params["approvalId"]))
|
|
588
607
|
if method == "approval/updated":
|
|
589
608
|
return self._approval_updated(params)
|
|
590
609
|
if method == "approval/resolved":
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: muse-code-sdk
|
|
3
|
-
Version: 1.4.
|
|
3
|
+
Version: 1.4.9
|
|
4
4
|
Summary: Muse Code SDK for MSP: asyncio-first facade over the generated wire types (muse-code-msp), with a thin sync wrapper.
|
|
5
5
|
License-Expression: MIT
|
|
6
6
|
Project-URL: Homepage, https://github.com/meta-models/muse-code-sdk
|
|
@@ -15,6 +15,8 @@ from typing import Any
|
|
|
15
15
|
from muse_code.fold import (
|
|
16
16
|
LIVE_HOST_STATE_PROJECTIONS,
|
|
17
17
|
VIEW_EVENT_METHODS,
|
|
18
|
+
ApprovalPending,
|
|
19
|
+
ApprovalReviewingNotice,
|
|
18
20
|
ApprovalResolvedFold,
|
|
19
21
|
DeliveryGap,
|
|
20
22
|
FoldItems,
|
|
@@ -178,6 +180,13 @@ def approval_requested(
|
|
|
178
180
|
}
|
|
179
181
|
|
|
180
182
|
|
|
183
|
+
def approval_reviewing(approval_id: str, view_cursor: str) -> dict[str, Any]:
|
|
184
|
+
# The reviewer-held twin of `approval/requested`: same params shape,
|
|
185
|
+
# different method.
|
|
186
|
+
event = approval_requested(approval_id, view_cursor)
|
|
187
|
+
return {"method": "approval/reviewing", "params": event["params"]}
|
|
188
|
+
|
|
189
|
+
|
|
181
190
|
def approval_updated(
|
|
182
191
|
approval_id: str, view_cursor: str, source_index: int = 1, command: str | None = None
|
|
183
192
|
) -> dict[str, Any]:
|
|
@@ -1072,6 +1081,19 @@ def test_the_items_surface_is_an_allowlist_pinned_by_member_set() -> None:
|
|
|
1072
1081
|
assert state_public == {"families", "get", "has"}
|
|
1073
1082
|
|
|
1074
1083
|
|
|
1084
|
+
def test_approval_reviewing_is_a_notice_that_opens_no_pending_approval() -> None:
|
|
1085
|
+
# The host's built-in reviewer holds the approval; opening a pending
|
|
1086
|
+
# entry here would defeat the presentation hold. The release arrives as
|
|
1087
|
+
# `approval/requested` on the same id.
|
|
1088
|
+
fold = SessionFold()
|
|
1089
|
+
outcome = fold.apply(approval_reviewing("a-1", "v:s:1"))
|
|
1090
|
+
assert outcome == ApprovalReviewingNotice(approval_id="a-1")
|
|
1091
|
+
assert fold.pending_approvals() == []
|
|
1092
|
+
released = fold.apply(approval_requested("a-1", "v:s:2"))
|
|
1093
|
+
assert isinstance(released, ApprovalPending)
|
|
1094
|
+
assert len(fold.pending_approvals()) == 1
|
|
1095
|
+
|
|
1096
|
+
|
|
1075
1097
|
def test_every_generated_view_notification_is_routed_never_the_default() -> None:
|
|
1076
1098
|
# The runtime twin of the TS AssertNever coverage pins, PLUS the routing
|
|
1077
1099
|
# table: every generated notification except the handshake's
|
|
@@ -1156,6 +1178,7 @@ def test_every_generated_view_notification_is_routed_never_the_default() -> None
|
|
|
1156
1178
|
"turn/foregroundCompleted": foreground_completed("turn-t5", "v:t:23"),
|
|
1157
1179
|
"turn/unqueued": turn_unqueued("turn-t4", "cmd-t4", "v:t:9"),
|
|
1158
1180
|
"approval/requested": approval_requested("a-t", "v:t:10"),
|
|
1181
|
+
"approval/reviewing": approval_reviewing("a-r", "v:t:23"),
|
|
1159
1182
|
"approval/updated": approval_updated("a-t", "v:t:10b"),
|
|
1160
1183
|
"approval/resolved": approval_resolved("a-t", "approved", "v:t:11"),
|
|
1161
1184
|
"userInput/requested": user_input_requested("u-t", "v:t:12"),
|
|
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
|
|
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
|
|
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
|