macp-sdk-python 0.12.0__py3-none-any.whl → 0.12.1__py3-none-any.whl

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.
macp_sdk/handoff.py CHANGED
@@ -30,9 +30,11 @@ class HandoffRecord:
30
30
  declined_by: str | None
31
31
  # True when the acceptance was an implicit accept synthesized by the
32
32
  # runtime (RFC-MACP-0010 §5.1) rather than an explicit client HandoffAccept.
33
- # Runtime >= 0.8.0 emits these automatically for every session (no
34
- # server-side opt-in exists) when an offer's implicit_accept_timeout_ms
35
- # elapses unactioned. Client-submitted accepts are always
33
+ # Runtime >= 0.8.0 emits these only for sessions whose bound governance
34
+ # policy declares a non-zero ``acceptance.implicit_accept_timeout_ms``
35
+ # (RFC-MACP-0010 §5.1, RFC-MACP-0012 §4.5), once that timeout elapses
36
+ # unactioned; with no policy bound the timeout resolves to 0 and no
37
+ # implicit accept ever fires. Client-submitted accepts are always
36
38
  # ``implicit=False`` (the runtime rejects a forged True).
37
39
  implicit: bool = False
38
40
 
@@ -177,9 +179,10 @@ class HandoffProjection(BaseProjection):
177
179
  """True if *handoff_id* was accepted by a runtime implicit accept.
178
180
 
179
181
  Distinguishes a timeout-driven implicit accept (RFC-MACP-0010 §5.1)
180
- from an explicit client ``HandoffAccept``. Runtime >= 0.8.0 emits
181
- these automatically for every session once an offer's
182
- ``implicit_accept_timeout_ms`` elapses unactioned.
182
+ from an explicit client ``HandoffAccept``. Runtime >= 0.8.0 emits one
183
+ only when the session's bound governance policy declares a non-zero
184
+ ``acceptance.implicit_accept_timeout_ms`` and that timeout elapses
185
+ unactioned; sessions with no such policy never see one.
183
186
  """
184
187
  handoff = self.handoffs.get(handoff_id)
185
188
  return handoff is not None and handoff.status == "accepted" and handoff.implicit
@@ -275,7 +278,7 @@ class HandoffSession(BaseSession):
275
278
  # ``implicit=true`` for runtime-synthesized accepts and the runtime
276
279
  # rejects a client-submitted True. Client accepts always leave the
277
280
  # field at its proto3 default (False). See the regression test in
278
- # tests/unit/test_handoff.py.
281
+ # tests/unit/test_absorb_runtime_v050.py.
279
282
  validate_required_field("handoff_id", handoff_id)
280
283
  payload = handoff_pb2.HandoffAcceptPayload(
281
284
  handoff_id=handoff_id,
macp_sdk/proposal.py CHANGED
@@ -27,7 +27,22 @@ class ProposalRecord:
27
27
  summary: str
28
28
  proposer: str
29
29
  supersedes: str # "" if original
30
- status: str # "open" | "accepted" | "rejected" | "withdrawn"
30
+ # Reachable values only. An Accept is recorded on the projection's
31
+ # ``accepts`` list (and surfaced via ``accepted_proposal`` /
32
+ # ``is_accepted``), never on this field -- no code path assigns
33
+ # "accepted" here. A non-terminal Reject likewise leaves this "open";
34
+ # only ``terminal=True`` sets "rejected".
35
+ #
36
+ # That is by design, not an omission (issue #112). Acceptance is a
37
+ # per-sender, supersedable relation (RFC-MACP-0008 §5 rule 5), not a
38
+ # per-proposal fact, so a scalar field here cannot hold it: "alice
39
+ # accepts p2 while bob still accepts p1" is a legal state. This mirrors
40
+ # the runtime, whose ``ProposalDisposition`` is {Live, Withdrawn} with
41
+ # acceptance in a separate ``accepts`` map, and typescript-sdk's
42
+ # ``projections/proposal.ts``, which also never assigns "accepted".
43
+ # ``task.py``/``handoff.py`` do set "accepted" because their acceptance
44
+ # is one actor claiming one slot. See docs/modes/proposal.md.
45
+ status: str # "open" | "rejected" | "withdrawn"
31
46
  tags: list[str]
32
47
 
33
48
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: macp-sdk-python
3
- Version: 0.12.0
3
+ Version: 0.12.1
4
4
  Summary: Python SDK for the MACP Rust runtime
5
5
  Author-email: Multi-Agent Coordination Protocol <macp@multiagentcoordinationprotocol.org>
6
6
  License: Apache-2.0
@@ -9,10 +9,10 @@ macp_sdk/constants.py,sha256=7BaQC6qycmPEc1ChOQVDxlhEBsBdI-RQBT07BQ2Uiis,481
9
9
  macp_sdk/decision.py,sha256=8yU5bv-DUU7eWgioc9CYVSB1sPcO9essiy-jsDQEunc,4792
10
10
  macp_sdk/envelope.py,sha256=_MlJ43Dih3_FcJ4hyrirFqrOvb5RaK9ssQo9Y3kMlF0,9200
11
11
  macp_sdk/errors.py,sha256=19dutKnnl-jtMOWpNBl2UEMCH_Sunz84G05G-wr7w1k,3836
12
- macp_sdk/handoff.py,sha256=vBTRPioXN3JX5v0Uy0A6OAltKsiOcd2hh1jVk71KorI,12505
12
+ macp_sdk/handoff.py,sha256=EEyQkG-TeTF3p09Lotnzm5kPQ-fpIYxWk9jt5VnoCv8,12775
13
13
  macp_sdk/policy.py,sha256=MoyQ9l7zI0vkz_4Ewg8RRr-4DUhFBVPDQ-tn0r94sVw,19815
14
14
  macp_sdk/projections.py,sha256=Vh101rBwtkrbW7WgOY0KJb-O_tS9TE9V41uRZS3xnWU,7278
15
- macp_sdk/proposal.py,sha256=Rf0THG8XhpFBbhv6XkbiZ43vIJiXabq5gxe8KynvvXI,12200
15
+ macp_sdk/proposal.py,sha256=MKWGkQnRbYJ_Yzz54fVXpAD-adH0XIjLGEujmv_kQOg,13167
16
16
  macp_sdk/proto_registry.py,sha256=jgGKE4maGbTejVhYotHFdUnN_ZjZgEqsDWpU8Hh1mN8,17628
17
17
  macp_sdk/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
18
18
  macp_sdk/quorum.py,sha256=Kk7UIs2X07weXNGT9hyVffOpu71_88-jXONyqb_VzzE,10686
@@ -28,8 +28,8 @@ macp_sdk/agent/runner.py,sha256=jFZNVPm4tPuY_yDEsiFFB_FpaX5nMG6__L6xwuo52A8,9013
28
28
  macp_sdk/agent/strategies.py,sha256=8o55FR5a-L2TCX2nCw8L8PO-ucswHniR2m8qVmuP4V0,14665
29
29
  macp_sdk/agent/transports.py,sha256=xKM_cC2Qy3-PwktlZZMcTnbIwGKiXa3PvZmRQXXPDHo,14731
30
30
  macp_sdk/agent/types.py,sha256=wtlF-tTRGnEGHhYknhu-5ZzOBZ1pRQ5GjYLKBR4YzQg,1610
31
- macp_sdk_python-0.12.0.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
32
- macp_sdk_python-0.12.0.dist-info/METADATA,sha256=N8SRZlCcLG8LOJ_5li8OQL4aRF9JfqMr4De_G2xyxp8,7478
33
- macp_sdk_python-0.12.0.dist-info/WHEEL,sha256=YVMoNqKzERt-wjUZwJ33xBGAwnFl-4cqbYkTtWa4itE,91
34
- macp_sdk_python-0.12.0.dist-info/top_level.txt,sha256=AoSstnUrSaVCCQw4KLxLkpO-9BLoVZ230mPBR6z-jh8,9
35
- macp_sdk_python-0.12.0.dist-info/RECORD,,
31
+ macp_sdk_python-0.12.1.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
32
+ macp_sdk_python-0.12.1.dist-info/METADATA,sha256=X6j2ofU6LilgtcHUaifEyp4BsbRTLFE7re-PwwnyXd8,7478
33
+ macp_sdk_python-0.12.1.dist-info/WHEEL,sha256=YVMoNqKzERt-wjUZwJ33xBGAwnFl-4cqbYkTtWa4itE,91
34
+ macp_sdk_python-0.12.1.dist-info/top_level.txt,sha256=AoSstnUrSaVCCQw4KLxLkpO-9BLoVZ230mPBR6z-jh8,9
35
+ macp_sdk_python-0.12.1.dist-info/RECORD,,