agent-protocols 0.2.3__tar.gz → 0.4.0__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 (24) hide show
  1. {agent_protocols-0.2.3 → agent_protocols-0.4.0}/PKG-INFO +5 -2
  2. {agent_protocols-0.2.3 → agent_protocols-0.4.0}/README.md +3 -1
  3. {agent_protocols-0.2.3 → agent_protocols-0.4.0}/pyproject.toml +6 -2
  4. {agent_protocols-0.2.3 → agent_protocols-0.4.0}/src/agent_protocols/__init__.py +12 -0
  5. agent_protocols-0.4.0/src/agent_protocols/discourse.py +597 -0
  6. {agent_protocols-0.2.3 → agent_protocols-0.4.0}/src/agent_protocols/http_client.py +57 -10
  7. {agent_protocols-0.2.3 → agent_protocols-0.4.0}/src/agent_protocols/identity.py +51 -9
  8. {agent_protocols-0.2.3 → agent_protocols-0.4.0}/src/agent_protocols.egg-info/PKG-INFO +5 -2
  9. {agent_protocols-0.2.3 → agent_protocols-0.4.0}/src/agent_protocols.egg-info/SOURCES.txt +5 -1
  10. {agent_protocols-0.2.3 → agent_protocols-0.4.0}/src/agent_protocols.egg-info/requires.txt +1 -0
  11. agent_protocols-0.4.0/tests/test_discourse.py +406 -0
  12. agent_protocols-0.4.0/tests/test_discourse_coverage.py +197 -0
  13. agent_protocols-0.4.0/tests/test_http_client.py +200 -0
  14. {agent_protocols-0.2.3 → agent_protocols-0.4.0}/tests/test_identity.py +24 -0
  15. agent_protocols-0.4.0/tests/test_identity_coverage.py +221 -0
  16. agent_protocols-0.4.0/tests/test_profile_coverage.py +53 -0
  17. agent_protocols-0.2.3/src/agent_protocols/discourse.py +0 -395
  18. agent_protocols-0.2.3/tests/test_discourse.py +0 -200
  19. {agent_protocols-0.2.3 → agent_protocols-0.4.0}/setup.cfg +0 -0
  20. {agent_protocols-0.2.3 → agent_protocols-0.4.0}/src/agent_protocols/errors.py +0 -0
  21. {agent_protocols-0.2.3 → agent_protocols-0.4.0}/src/agent_protocols/profile.py +0 -0
  22. {agent_protocols-0.2.3 → agent_protocols-0.4.0}/src/agent_protocols.egg-info/dependency_links.txt +0 -0
  23. {agent_protocols-0.2.3 → agent_protocols-0.4.0}/src/agent_protocols.egg-info/top_level.txt +0 -0
  24. {agent_protocols-0.2.3 → agent_protocols-0.4.0}/tests/test_profile.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: agent-protocols
3
- Version: 0.2.3
3
+ Version: 0.4.0
4
4
  Summary: Python SDK for Agent Identity, Agent Profile, and Agent Discourse protocols
5
5
  Author: LDCLabs
6
6
  License: MIT
@@ -8,6 +8,7 @@ Keywords: agent,protocol,ed25519,sdk
8
8
  Requires-Python: >=3.10
9
9
  Description-Content-Type: text/markdown
10
10
  Requires-Dist: cryptography>=42
11
+ Requires-Dist: jsonschema<5,>=4.17
11
12
  Requires-Dist: rfc8785<0.2,>=0.1.4
12
13
  Provides-Extra: http
13
14
  Requires-Dist: requests<3,>=2.31; extra == "http"
@@ -20,7 +21,7 @@ Python SDK for the draft Agent Identity, Agent Profile, and Agent Discourse prot
20
21
 
21
22
  - `agent_protocols.identity`: `did:agent:` encoding, JCS canonicalization, event hashes, Ed25519 signing and verification, live-write nonce checks, request JWT helpers.
22
23
  - `agent_protocols.profile`: `profile.update` payload helpers, validation, materialization.
23
- - `agent_protocols.discourse`: ADP event constants, join request helpers, room-path checks, permission and state helpers.
24
+ - `agent_protocols.discourse`: ADP kernel event constants, the room type system (type definitions, pack imports, type registry, JSON Schema payload validation), join request helpers, room-path checks, kind-based permission and state helpers.
24
25
  - `agent_protocols.http_client`: optional requests-based Profile and Discourse clients. Install with `agent-protocols[http]`.
25
26
 
26
27
  ## Example
@@ -41,3 +42,5 @@ profile = materialize_profile(envelope)
41
42
  ```
42
43
 
43
44
  `username` is provider-confirmed and appears on Profile documents returned by a profile service. Do not put it in agent-submitted `profile.update` payloads.
45
+
46
+ ADP room writes are signed against the current room head. Use `discourse_event` or `type_define_event` with `base_seq` and `base_hash`. Mentions are represented by the event-level `mentions` field, not by `payload.extra`.
@@ -6,7 +6,7 @@ Python SDK for the draft Agent Identity, Agent Profile, and Agent Discourse prot
6
6
 
7
7
  - `agent_protocols.identity`: `did:agent:` encoding, JCS canonicalization, event hashes, Ed25519 signing and verification, live-write nonce checks, request JWT helpers.
8
8
  - `agent_protocols.profile`: `profile.update` payload helpers, validation, materialization.
9
- - `agent_protocols.discourse`: ADP event constants, join request helpers, room-path checks, permission and state helpers.
9
+ - `agent_protocols.discourse`: ADP kernel event constants, the room type system (type definitions, pack imports, type registry, JSON Schema payload validation), join request helpers, room-path checks, kind-based permission and state helpers.
10
10
  - `agent_protocols.http_client`: optional requests-based Profile and Discourse clients. Install with `agent-protocols[http]`.
11
11
 
12
12
  ## Example
@@ -27,3 +27,5 @@ profile = materialize_profile(envelope)
27
27
  ```
28
28
 
29
29
  `username` is provider-confirmed and appears on Profile documents returned by a profile service. Do not put it in agent-submitted `profile.update` payloads.
30
+
31
+ ADP room writes are signed against the current room head. Use `discourse_event` or `type_define_event` with `base_seq` and `base_hash`. Mentions are represented by the event-level `mentions` field, not by `payload.extra`.
@@ -1,13 +1,17 @@
1
1
  [project]
2
2
  name = "agent-protocols"
3
- version = "0.2.3"
3
+ version = "0.4.0"
4
4
  description = "Python SDK for Agent Identity, Agent Profile, and Agent Discourse protocols"
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.10"
7
7
  license = { text = "MIT" }
8
8
  authors = [{ name = "LDCLabs" }]
9
9
  keywords = ["agent", "protocol", "ed25519", "sdk"]
10
- dependencies = ["cryptography>=42", "rfc8785>=0.1.4,<0.2"]
10
+ dependencies = [
11
+ "cryptography>=42",
12
+ "jsonschema>=4.17,<5",
13
+ "rfc8785>=0.1.4,<0.2",
14
+ ]
11
15
 
12
16
  [project.optional-dependencies]
13
17
  http = ["requests>=2.31,<3"]
@@ -11,18 +11,24 @@ from .identity import (
11
11
  create_event,
12
12
  create_request_jwt_claims,
13
13
  event_hash,
14
+ event_hash_bytes,
14
15
  public_key_bytes,
15
16
  sign_event,
17
+ sign_event_hash,
16
18
  unix_ms,
17
19
  unix_secs,
18
20
  validate_agent_id,
19
21
  validate_nonce,
20
22
  verify_envelope,
21
23
  verify_event_hash,
24
+ verify_event_hash_signature,
22
25
  verify_live_envelope,
23
26
  verify_request_jwt,
24
27
  verify_signature,
25
28
  verify_timestamp,
29
+ with_mention,
30
+ with_mentions,
31
+ with_room_head,
26
32
  with_room_id,
27
33
  )
28
34
  from .profile import PROFILE_PROTOCOL, PROFILE_UPDATE, materialize_profile, profile_update_event, validate_profile_update
@@ -42,10 +48,12 @@ __all__ = [
42
48
  "create_event",
43
49
  "create_request_jwt_claims",
44
50
  "event_hash",
51
+ "event_hash_bytes",
45
52
  "materialize_profile",
46
53
  "profile_update_event",
47
54
  "public_key_bytes",
48
55
  "sign_event",
56
+ "sign_event_hash",
49
57
  "unix_ms",
50
58
  "unix_secs",
51
59
  "validate_agent_id",
@@ -53,9 +61,13 @@ __all__ = [
53
61
  "validate_profile_update",
54
62
  "verify_envelope",
55
63
  "verify_event_hash",
64
+ "verify_event_hash_signature",
56
65
  "verify_live_envelope",
57
66
  "verify_request_jwt",
58
67
  "verify_signature",
59
68
  "verify_timestamp",
69
+ "with_mention",
70
+ "with_mentions",
71
+ "with_room_head",
60
72
  "with_room_id",
61
73
  ]