theprotocol-sdk 0.7.6__tar.gz → 0.9.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 (245) hide show
  1. theprotocol_sdk-0.9.0/.gitignore +3 -0
  2. theprotocol_sdk-0.9.0/PKG-INFO +370 -0
  3. theprotocol_sdk-0.7.6/PKG-INFO → theprotocol_sdk-0.9.0/README.md +44 -49
  4. theprotocol_sdk-0.9.0/proxy/Dockerfile +30 -0
  5. theprotocol_sdk-0.9.0/proxy/Dockerfile.dockerignore +8 -0
  6. theprotocol_sdk-0.9.0/proxy/README.md +142 -0
  7. theprotocol_sdk-0.9.0/proxy/compose.migrate.yaml +33 -0
  8. theprotocol_sdk-0.9.0/proxy/compose.yaml +25 -0
  9. theprotocol_sdk-0.9.0/proxy/migrations/README.md +25 -0
  10. theprotocol_sdk-0.9.0/proxy/migrations/csv-to-postgres/README.md +66 -0
  11. theprotocol_sdk-0.9.0/proxy/migrations/csv-to-postgres/fake/make_export.py +40 -0
  12. theprotocol_sdk-0.9.0/proxy/migrations/csv-to-postgres/fake/make_target.py +26 -0
  13. theprotocol_sdk-0.9.0/proxy/migrations/csv-to-postgres/fake/target_postgresql.sql +10 -0
  14. theprotocol_sdk-0.9.0/proxy/migrations/csv-to-postgres/fake/target_sqlite.sql +9 -0
  15. theprotocol_sdk-0.9.0/proxy/migrations/csv-to-postgres/migration.yaml +30 -0
  16. theprotocol_sdk-0.9.0/proxy/migrations/csv-to-postgres/proxy.yaml +40 -0
  17. theprotocol_sdk-0.9.0/proxy/migrations/csv-to-postgres/sample/orders.csv +361 -0
  18. theprotocol_sdk-0.9.0/proxy/migrations/make_samples.py +56 -0
  19. theprotocol_sdk-0.9.0/proxy/migrations/sql-to-postgres/README.md +58 -0
  20. theprotocol_sdk-0.9.0/proxy/migrations/sql-to-postgres/fake/make_legacy.py +36 -0
  21. theprotocol_sdk-0.9.0/proxy/migrations/sql-to-postgres/fake/make_target.py +26 -0
  22. theprotocol_sdk-0.9.0/proxy/migrations/sql-to-postgres/fake/target_postgresql.sql +9 -0
  23. theprotocol_sdk-0.9.0/proxy/migrations/sql-to-postgres/fake/target_sqlite.sql +8 -0
  24. theprotocol_sdk-0.9.0/proxy/migrations/sql-to-postgres/migration.yaml +38 -0
  25. theprotocol_sdk-0.9.0/proxy/migrations/sql-to-postgres/proxy.yaml +42 -0
  26. theprotocol_sdk-0.9.0/proxy/migrations/sql-to-postgres/sample/customers.jsonl +480 -0
  27. theprotocol_sdk-0.9.0/proxy/migrations/sql-to-rest/README.md +53 -0
  28. theprotocol_sdk-0.9.0/proxy/migrations/sql-to-rest/fake/make_legacy.py +36 -0
  29. theprotocol_sdk-0.9.0/proxy/migrations/sql-to-rest/fake/products_api.py +123 -0
  30. theprotocol_sdk-0.9.0/proxy/migrations/sql-to-rest/migration.yaml +35 -0
  31. theprotocol_sdk-0.9.0/proxy/migrations/sql-to-rest/proxy.yaml +34 -0
  32. theprotocol_sdk-0.9.0/proxy/migrations/sql-to-rest/sample/products.jsonl +240 -0
  33. theprotocol_sdk-0.9.0/proxy/proxy.example.yaml +37 -0
  34. theprotocol_sdk-0.9.0/proxy/proxy.outbound.example.yaml +42 -0
  35. theprotocol_sdk-0.9.0/proxy/proxy.quantum.example.yaml +83 -0
  36. theprotocol_sdk-0.9.0/proxy/recipes/README.md +16 -0
  37. theprotocol_sdk-0.9.0/proxy/recipes/bazaar/README.md +21 -0
  38. theprotocol_sdk-0.9.0/proxy/recipes/bazaar/fake/fake_shop.py +38 -0
  39. theprotocol_sdk-0.9.0/proxy/recipes/bazaar/fake/mock_wms.py +43 -0
  40. theprotocol_sdk-0.9.0/proxy/recipes/bazaar/proxy.yaml +58 -0
  41. theprotocol_sdk-0.9.0/proxy/recipes/dynamo/README.md +21 -0
  42. theprotocol_sdk-0.9.0/proxy/recipes/dynamo/fake/fake_meters.py +43 -0
  43. theprotocol_sdk-0.9.0/proxy/recipes/dynamo/proxy.yaml +43 -0
  44. theprotocol_sdk-0.9.0/proxy/recipes/hansa/README.md +21 -0
  45. theprotocol_sdk-0.9.0/proxy/recipes/hansa/fake/fake_tos.py +40 -0
  46. theprotocol_sdk-0.9.0/proxy/recipes/hansa/fake/mock_erp.py +43 -0
  47. theprotocol_sdk-0.9.0/proxy/recipes/hansa/proxy.yaml +54 -0
  48. theprotocol_sdk-0.9.0/proxy/recipes/keystone/README.md +21 -0
  49. theprotocol_sdk-0.9.0/proxy/recipes/keystone/fake/fake_logger.py +52 -0
  50. theprotocol_sdk-0.9.0/proxy/recipes/keystone/proxy.yaml +53 -0
  51. theprotocol_sdk-0.9.0/proxy/recipes/lyceum/README.md +21 -0
  52. theprotocol_sdk-0.9.0/proxy/recipes/lyceum/fake/fake_sis.py +40 -0
  53. theprotocol_sdk-0.9.0/proxy/recipes/lyceum/proxy.yaml +41 -0
  54. theprotocol_sdk-0.9.0/proxy/recipes/meridian/README.md +21 -0
  55. theprotocol_sdk-0.9.0/proxy/recipes/meridian/fake/fake_oms.py +36 -0
  56. theprotocol_sdk-0.9.0/proxy/recipes/meridian/proxy.yaml +53 -0
  57. theprotocol_sdk-0.9.0/proxy/recipes/scrivener/README.md +21 -0
  58. theprotocol_sdk-0.9.0/proxy/recipes/scrivener/fake/fake_pms.py +39 -0
  59. theprotocol_sdk-0.9.0/proxy/recipes/scrivener/proxy.yaml +50 -0
  60. theprotocol_sdk-0.9.0/proxy/recipes/trunk/README.md +21 -0
  61. theprotocol_sdk-0.9.0/proxy/recipes/trunk/fake/fake_mediation.py +36 -0
  62. theprotocol_sdk-0.9.0/proxy/recipes/trunk/proxy.yaml +66 -0
  63. theprotocol_sdk-0.9.0/pyproject.toml +97 -0
  64. {theprotocol_sdk-0.7.6 → theprotocol_sdk-0.9.0}/src/theprotocol/__init__.py +2 -1
  65. theprotocol_sdk-0.9.0/src/theprotocol/agent/caller_errors.py +45 -0
  66. {theprotocol_sdk-0.7.6 → theprotocol_sdk-0.9.0}/src/theprotocol/agent/router.py +27 -15
  67. {theprotocol_sdk-0.7.6 → theprotocol_sdk-0.9.0}/src/theprotocol/agent/well_known.py +12 -10
  68. {theprotocol_sdk-0.7.6 → theprotocol_sdk-0.9.0}/src/theprotocol/auth/did_jwt.py +3 -3
  69. {theprotocol_sdk-0.7.6 → theprotocol_sdk-0.9.0}/src/theprotocol/authz.py +2 -2
  70. {theprotocol_sdk-0.7.6 → theprotocol_sdk-0.9.0}/src/theprotocol/bridges/acp.py +3 -2
  71. {theprotocol_sdk-0.7.6 → theprotocol_sdk-0.9.0}/src/theprotocol/bridges/anp/bridge.py +2 -1
  72. {theprotocol_sdk-0.7.6 → theprotocol_sdk-0.9.0}/src/theprotocol/bridges/google_a2a.py +3 -2
  73. {theprotocol_sdk-0.7.6 → theprotocol_sdk-0.9.0}/src/theprotocol/bridges/mcp.py +2 -1
  74. {theprotocol_sdk-0.7.6 → theprotocol_sdk-0.9.0}/src/theprotocol/client/a2a_client.py +65 -8
  75. {theprotocol_sdk-0.7.6 → theprotocol_sdk-0.9.0}/src/theprotocol/client/credentials.py +16 -4
  76. {theprotocol_sdk-0.7.6 → theprotocol_sdk-0.9.0}/src/theprotocol/dids.py +3 -3
  77. {theprotocol_sdk-0.7.6 → theprotocol_sdk-0.9.0}/src/theprotocol/exceptions.py +9 -2
  78. {theprotocol_sdk-0.7.6 → theprotocol_sdk-0.9.0}/src/theprotocol/messenger.py +1 -1
  79. {theprotocol_sdk-0.7.6 → theprotocol_sdk-0.9.0}/src/theprotocol/mtls.py +18 -5
  80. theprotocol_sdk-0.9.0/src/theprotocol/proxy/__init__.py +33 -0
  81. theprotocol_sdk-0.9.0/src/theprotocol/proxy/actions_builtin.py +393 -0
  82. theprotocol_sdk-0.9.0/src/theprotocol/proxy/catalog.py +80 -0
  83. theprotocol_sdk-0.9.0/src/theprotocol/proxy/cli.py +483 -0
  84. theprotocol_sdk-0.9.0/src/theprotocol/proxy/evidence.py +409 -0
  85. theprotocol_sdk-0.9.0/src/theprotocol/proxy/identity.py +142 -0
  86. theprotocol_sdk-0.9.0/src/theprotocol/proxy/logs.py +81 -0
  87. theprotocol_sdk-0.9.0/src/theprotocol/proxy/mapping.py +397 -0
  88. theprotocol_sdk-0.9.0/src/theprotocol/proxy/migrate/__init__.py +8 -0
  89. theprotocol_sdk-0.9.0/src/theprotocol/proxy/migrate/cli.py +164 -0
  90. theprotocol_sdk-0.9.0/src/theprotocol/proxy/migrate/commands.py +1012 -0
  91. theprotocol_sdk-0.9.0/src/theprotocol/proxy/migrate/destinations.py +200 -0
  92. theprotocol_sdk-0.9.0/src/theprotocol/proxy/migrate/guard.py +176 -0
  93. theprotocol_sdk-0.9.0/src/theprotocol/proxy/migrate/params.py +181 -0
  94. theprotocol_sdk-0.9.0/src/theprotocol/proxy/migrate/reconcile.py +396 -0
  95. theprotocol_sdk-0.9.0/src/theprotocol/proxy/migrate/reports.py +182 -0
  96. theprotocol_sdk-0.9.0/src/theprotocol/proxy/migrate/sample.py +132 -0
  97. theprotocol_sdk-0.9.0/src/theprotocol/proxy/migrate/schema.py +297 -0
  98. theprotocol_sdk-0.9.0/src/theprotocol/proxy/migrate/scratch.py +91 -0
  99. theprotocol_sdk-0.9.0/src/theprotocol/proxy/migrate/skeletons.py +152 -0
  100. theprotocol_sdk-0.9.0/src/theprotocol/proxy/outbox.py +231 -0
  101. theprotocol_sdk-0.9.0/src/theprotocol/proxy/plugins.py +340 -0
  102. theprotocol_sdk-0.9.0/src/theprotocol/proxy/quantum/__init__.py +11 -0
  103. theprotocol_sdk-0.9.0/src/theprotocol/proxy/quantum/backends.py +269 -0
  104. theprotocol_sdk-0.9.0/src/theprotocol/proxy/quantum/card.py +99 -0
  105. theprotocol_sdk-0.9.0/src/theprotocol/proxy/quantum/jobs.py +112 -0
  106. theprotocol_sdk-0.9.0/src/theprotocol/proxy/quantum/meter.py +212 -0
  107. theprotocol_sdk-0.9.0/src/theprotocol/proxy/quantum/plugins.py +203 -0
  108. theprotocol_sdk-0.9.0/src/theprotocol/proxy/quantum/qasm.py +174 -0
  109. theprotocol_sdk-0.9.0/src/theprotocol/proxy/registry.py +110 -0
  110. theprotocol_sdk-0.9.0/src/theprotocol/proxy/runtime.py +639 -0
  111. theprotocol_sdk-0.9.0/src/theprotocol/proxy/service.py +109 -0
  112. theprotocol_sdk-0.9.0/src/theprotocol/proxy/sinks/__init__.py +15 -0
  113. theprotocol_sdk-0.9.0/src/theprotocol/proxy/sinks/_json.py +57 -0
  114. theprotocol_sdk-0.9.0/src/theprotocol/proxy/sinks/file_out.py +302 -0
  115. theprotocol_sdk-0.9.0/src/theprotocol/proxy/sinks/rest.py +136 -0
  116. theprotocol_sdk-0.9.0/src/theprotocol/proxy/sinks/sql_upsert.py +583 -0
  117. theprotocol_sdk-0.9.0/src/theprotocol/proxy/sinks_builtin.py +457 -0
  118. theprotocol_sdk-0.9.0/src/theprotocol/proxy/sources/__init__.py +18 -0
  119. theprotocol_sdk-0.9.0/src/theprotocol/proxy/sources/filedrop.py +212 -0
  120. theprotocol_sdk-0.9.0/src/theprotocol/proxy/sources/logtail.py +172 -0
  121. theprotocol_sdk-0.9.0/src/theprotocol/proxy/sources/mqtt.py +1082 -0
  122. theprotocol_sdk-0.9.0/src/theprotocol/proxy/sources/sftp.py +1016 -0
  123. theprotocol_sdk-0.9.0/src/theprotocol/proxy/sources/sqlpoll.py +903 -0
  124. theprotocol_sdk-0.9.0/src/theprotocol/proxy/sources_builtin.py +226 -0
  125. theprotocol_sdk-0.9.0/src/theprotocol/proxy/spec.py +397 -0
  126. theprotocol_sdk-0.9.0/src/theprotocol/proxy/testing.py +228 -0
  127. theprotocol_sdk-0.9.0/src/theprotocol/quantum/__init__.py +54 -0
  128. theprotocol_sdk-0.9.0/src/theprotocol/quantum/models.py +373 -0
  129. theprotocol_sdk-0.9.0/src/theprotocol/quantum/quantum_workload_v1.0.schema.json +399 -0
  130. theprotocol_sdk-0.9.0/src/theprotocol/quantum/receipts.py +924 -0
  131. theprotocol_sdk-0.9.0/src/theprotocol/quantum/verify.py +50 -0
  132. theprotocol_sdk-0.9.0/tests/data/mapping_vectors.json +2780 -0
  133. theprotocol_sdk-0.9.0/tests/mqtt_broker.sh +36 -0
  134. theprotocol_sdk-0.9.0/tests/mqtt_fake.py +297 -0
  135. theprotocol_sdk-0.9.0/tests/proxy_fake.py +208 -0
  136. theprotocol_sdk-0.9.0/tests/sftp_server/run.sh +83 -0
  137. theprotocol_sdk-0.9.0/tests/sftp_server/sshd_config +14 -0
  138. theprotocol_sdk-0.9.0/tests/test_a2a_client_token.py +99 -0
  139. theprotocol_sdk-0.9.0/tests/test_a2a_client_v1_card.py +86 -0
  140. theprotocol_sdk-0.9.0/tests/test_caller_errors_v0653.py +79 -0
  141. theprotocol_sdk-0.9.0/tests/test_credentials.py +106 -0
  142. {theprotocol_sdk-0.7.6 → theprotocol_sdk-0.9.0}/tests/test_did_jwt.py +1 -1
  143. {theprotocol_sdk-0.7.6 → theprotocol_sdk-0.9.0}/tests/test_messenger.py +1 -1
  144. {theprotocol_sdk-0.7.6 → theprotocol_sdk-0.9.0}/tests/test_mtls_enroll.py +36 -0
  145. theprotocol_sdk-0.9.0/tests/test_proxy_actions.py +215 -0
  146. theprotocol_sdk-0.9.0/tests/test_proxy_builtins.py +211 -0
  147. theprotocol_sdk-0.9.0/tests/test_proxy_catalog.py +94 -0
  148. theprotocol_sdk-0.9.0/tests/test_proxy_cli.py +177 -0
  149. theprotocol_sdk-0.9.0/tests/test_proxy_core.py +478 -0
  150. theprotocol_sdk-0.9.0/tests/test_proxy_events.py +172 -0
  151. theprotocol_sdk-0.9.0/tests/test_proxy_mapping_transforms.py +391 -0
  152. theprotocol_sdk-0.9.0/tests/test_proxy_mapping_vectors.py +100 -0
  153. theprotocol_sdk-0.9.0/tests/test_proxy_migrate_destinations.py +232 -0
  154. theprotocol_sdk-0.9.0/tests/test_proxy_migrate_failfast.py +151 -0
  155. theprotocol_sdk-0.9.0/tests/test_proxy_migrate_kit.py +209 -0
  156. theprotocol_sdk-0.9.0/tests/test_proxy_migrate_registry.py +339 -0
  157. theprotocol_sdk-0.9.0/tests/test_proxy_migrate_run.py +430 -0
  158. theprotocol_sdk-0.9.0/tests/test_proxy_migrate_sample.py +105 -0
  159. theprotocol_sdk-0.9.0/tests/test_proxy_migrations_starters.py +516 -0
  160. theprotocol_sdk-0.9.0/tests/test_proxy_plugins.py +324 -0
  161. theprotocol_sdk-0.9.0/tests/test_proxy_quantum_backend.py +220 -0
  162. theprotocol_sdk-0.9.0/tests/test_proxy_quantum_card.py +146 -0
  163. theprotocol_sdk-0.9.0/tests/test_proxy_quantum_cli.py +161 -0
  164. theprotocol_sdk-0.9.0/tests/test_proxy_quantum_meter.py +181 -0
  165. theprotocol_sdk-0.9.0/tests/test_proxy_quantum_plugins.py +245 -0
  166. theprotocol_sdk-0.9.0/tests/test_proxy_recipes.py +244 -0
  167. theprotocol_sdk-0.9.0/tests/test_proxy_sink_file_out.py +247 -0
  168. theprotocol_sdk-0.9.0/tests/test_proxy_sink_rest.py +178 -0
  169. theprotocol_sdk-0.9.0/tests/test_proxy_sink_sql_upsert.py +656 -0
  170. theprotocol_sdk-0.9.0/tests/test_proxy_sinks.py +372 -0
  171. theprotocol_sdk-0.9.0/tests/test_proxy_sinks_decimal.py +241 -0
  172. theprotocol_sdk-0.9.0/tests/test_proxy_source_filedrop.py +362 -0
  173. theprotocol_sdk-0.9.0/tests/test_proxy_source_logtail.py +229 -0
  174. theprotocol_sdk-0.9.0/tests/test_proxy_source_mqtt.py +1129 -0
  175. theprotocol_sdk-0.9.0/tests/test_proxy_source_mqtt_broker.py +783 -0
  176. theprotocol_sdk-0.9.0/tests/test_proxy_source_sftp.py +1050 -0
  177. theprotocol_sdk-0.9.0/tests/test_proxy_source_sftp_server.py +435 -0
  178. theprotocol_sdk-0.9.0/tests/test_proxy_source_sftp_transport.py +335 -0
  179. theprotocol_sdk-0.9.0/tests/test_proxy_source_sqlpoll.py +1105 -0
  180. theprotocol_sdk-0.9.0/tests/test_proxy_source_sqlpoll_engines.py +710 -0
  181. theprotocol_sdk-0.9.0/tests/test_proxy_spec.py +135 -0
  182. theprotocol_sdk-0.9.0/tests/test_proxy_status_report.py +234 -0
  183. theprotocol_sdk-0.9.0/tests/test_quantum_receipts.py +143 -0
  184. theprotocol_sdk-0.9.0/tests/test_quantum_workload.py +192 -0
  185. theprotocol_sdk-0.9.0/tests/test_release_version.py +41 -0
  186. {theprotocol_sdk-0.7.6 → theprotocol_sdk-0.9.0}/tests/test_well_known.py +23 -3
  187. theprotocol_sdk-0.7.6/README.md +0 -230
  188. theprotocol_sdk-0.7.6/pyproject.toml +0 -66
  189. theprotocol_sdk-0.7.6/tests/test_credentials.py +0 -60
  190. {theprotocol_sdk-0.7.6 → theprotocol_sdk-0.9.0}/LICENSE +0 -0
  191. {theprotocol_sdk-0.7.6 → theprotocol_sdk-0.9.0}/examples/simple_agent.py +0 -0
  192. {theprotocol_sdk-0.7.6 → theprotocol_sdk-0.9.0}/src/theprotocol/agent/__init__.py +0 -0
  193. {theprotocol_sdk-0.7.6 → theprotocol_sdk-0.9.0}/src/theprotocol/agent/base.py +0 -0
  194. {theprotocol_sdk-0.7.6 → theprotocol_sdk-0.9.0}/src/theprotocol/agent/decorators.py +0 -0
  195. {theprotocol_sdk-0.7.6 → theprotocol_sdk-0.9.0}/src/theprotocol/agent/task_store.py +0 -0
  196. {theprotocol_sdk-0.7.6 → theprotocol_sdk-0.9.0}/src/theprotocol/auth/__init__.py +0 -0
  197. {theprotocol_sdk-0.7.6 → theprotocol_sdk-0.9.0}/src/theprotocol/auth/jws_card.py +0 -0
  198. {theprotocol_sdk-0.7.6 → theprotocol_sdk-0.9.0}/src/theprotocol/auth/jwt_verifier.py +0 -0
  199. {theprotocol_sdk-0.7.6 → theprotocol_sdk-0.9.0}/src/theprotocol/bridges/__init__.py +0 -0
  200. {theprotocol_sdk-0.7.6 → theprotocol_sdk-0.9.0}/src/theprotocol/bridges/anp/__init__.py +0 -0
  201. {theprotocol_sdk-0.7.6 → theprotocol_sdk-0.9.0}/src/theprotocol/bridges/anp/auth.py +0 -0
  202. {theprotocol_sdk-0.7.6 → theprotocol_sdk-0.9.0}/src/theprotocol/bridges/anp/did_wba.py +0 -0
  203. {theprotocol_sdk-0.7.6 → theprotocol_sdk-0.9.0}/src/theprotocol/bridges/anp/translation.py +0 -0
  204. {theprotocol_sdk-0.7.6 → theprotocol_sdk-0.9.0}/src/theprotocol/bridges/base.py +0 -0
  205. {theprotocol_sdk-0.7.6 → theprotocol_sdk-0.9.0}/src/theprotocol/client/__init__.py +0 -0
  206. {theprotocol_sdk-0.7.6 → theprotocol_sdk-0.9.0}/src/theprotocol/exchange/__init__.py +0 -0
  207. {theprotocol_sdk-0.7.6 → theprotocol_sdk-0.9.0}/src/theprotocol/exchange/client.py +0 -0
  208. {theprotocol_sdk-0.7.6 → theprotocol_sdk-0.9.0}/src/theprotocol/forge.py +0 -0
  209. {theprotocol_sdk-0.7.6 → theprotocol_sdk-0.9.0}/src/theprotocol/guild.py +0 -0
  210. {theprotocol_sdk-0.7.6 → theprotocol_sdk-0.9.0}/src/theprotocol/models/__init__.py +0 -0
  211. {theprotocol_sdk-0.7.6 → theprotocol_sdk-0.9.0}/src/theprotocol/models/a2a_protocol.py +0 -0
  212. {theprotocol_sdk-0.7.6 → theprotocol_sdk-0.9.0}/src/theprotocol/models/agent_card.py +0 -0
  213. {theprotocol_sdk-0.7.6 → theprotocol_sdk-0.9.0}/src/theprotocol/models/v1_compat.py +0 -0
  214. {theprotocol_sdk-0.7.6 → theprotocol_sdk-0.9.0}/src/theprotocol/payment/__init__.py +0 -0
  215. {theprotocol_sdk-0.7.6 → theprotocol_sdk-0.9.0}/src/theprotocol/payment/authenticator.py +0 -0
  216. {theprotocol_sdk-0.7.6 → theprotocol_sdk-0.9.0}/src/theprotocol/payment/client.py +0 -0
  217. {theprotocol_sdk-0.7.6 → theprotocol_sdk-0.9.0}/src/theprotocol/payment/mtls_client.py +0 -0
  218. {theprotocol_sdk-0.7.6 → theprotocol_sdk-0.9.0}/src/theprotocol/payment/verifier.py +0 -0
  219. {theprotocol_sdk-0.7.6 → theprotocol_sdk-0.9.0}/src/theprotocol/registry/__init__.py +0 -0
  220. {theprotocol_sdk-0.7.6 → theprotocol_sdk-0.9.0}/src/theprotocol/registry/card_verify.py +0 -0
  221. {theprotocol_sdk-0.7.6 → theprotocol_sdk-0.9.0}/src/theprotocol/registry/cost_composition.py +0 -0
  222. {theprotocol_sdk-0.7.6 → theprotocol_sdk-0.9.0}/src/theprotocol/transfer/__init__.py +0 -0
  223. {theprotocol_sdk-0.7.6 → theprotocol_sdk-0.9.0}/src/theprotocol/transfer/client.py +0 -0
  224. {theprotocol_sdk-0.7.6 → theprotocol_sdk-0.9.0}/tests/registry/__init__.py +0 -0
  225. {theprotocol_sdk-0.7.6 → theprotocol_sdk-0.9.0}/tests/registry/test_card_verify.py +0 -0
  226. {theprotocol_sdk-0.7.6 → theprotocol_sdk-0.9.0}/tests/registry/test_cost_composition.py +0 -0
  227. {theprotocol_sdk-0.7.6 → theprotocol_sdk-0.9.0}/tests/test_agent.py +0 -0
  228. {theprotocol_sdk-0.7.6 → theprotocol_sdk-0.9.0}/tests/test_artifact_roundtrip.py +0 -0
  229. {theprotocol_sdk-0.7.6 → theprotocol_sdk-0.9.0}/tests/test_auth.py +0 -0
  230. {theprotocol_sdk-0.7.6 → theprotocol_sdk-0.9.0}/tests/test_authz.py +0 -0
  231. {theprotocol_sdk-0.7.6 → theprotocol_sdk-0.9.0}/tests/test_bridge_acp.py +0 -0
  232. {theprotocol_sdk-0.7.6 → theprotocol_sdk-0.9.0}/tests/test_bridge_anp.py +0 -0
  233. {theprotocol_sdk-0.7.6 → theprotocol_sdk-0.9.0}/tests/test_bridge_google_a2a.py +0 -0
  234. {theprotocol_sdk-0.7.6 → theprotocol_sdk-0.9.0}/tests/test_bridge_mcp.py +0 -0
  235. {theprotocol_sdk-0.7.6 → theprotocol_sdk-0.9.0}/tests/test_dependency_binding.py +0 -0
  236. {theprotocol_sdk-0.7.6 → theprotocol_sdk-0.9.0}/tests/test_dids.py +0 -0
  237. {theprotocol_sdk-0.7.6 → theprotocol_sdk-0.9.0}/tests/test_exchange_launch.py +0 -0
  238. {theprotocol_sdk-0.7.6 → theprotocol_sdk-0.9.0}/tests/test_forge.py +0 -0
  239. {theprotocol_sdk-0.7.6 → theprotocol_sdk-0.9.0}/tests/test_guild.py +0 -0
  240. {theprotocol_sdk-0.7.6 → theprotocol_sdk-0.9.0}/tests/test_jws_card.py +0 -0
  241. {theprotocol_sdk-0.7.6 → theprotocol_sdk-0.9.0}/tests/test_models.py +0 -0
  242. {theprotocol_sdk-0.7.6 → theprotocol_sdk-0.9.0}/tests/test_mtls_client_presents_cert.py +0 -0
  243. {theprotocol_sdk-0.7.6 → theprotocol_sdk-0.9.0}/tests/test_transfer.py +0 -0
  244. {theprotocol_sdk-0.7.6 → theprotocol_sdk-0.9.0}/tests/test_v1_compat.py +0 -0
  245. {theprotocol_sdk-0.7.6 → theprotocol_sdk-0.9.0}/tests/test_verifier_reuse.py +0 -0
@@ -0,0 +1,3 @@
1
+ # CLAUDE.md-class doctrine copies carry live credentials and stay out of git,
2
+ # same posture as the root CLAUDE.md (gitignored since March).
3
+ rescued_tmp_20260810/f1288a98/claude_new.md
@@ -0,0 +1,370 @@
1
+ Metadata-Version: 2.4
2
+ Name: theprotocol-sdk
3
+ Version: 0.9.0
4
+ Summary: Build sovereign AI agents with DID identity on TheProtocol. Speaks the A2A protocol (v1.0) natively, with bridges for Google A2A, ANP, and MCP. Works with Vertex AI, AWS AgentCore, LangGraph, CrewAI.
5
+ Project-URL: Homepage, https://theprotocol.cloud
6
+ Project-URL: Documentation, https://docs.theprotocol.cloud
7
+ Project-URL: API Reference, https://api.theprotocol.cloud/docs
8
+ Author-email: TheProtocol <sdk@theprotocol.cloud>
9
+ License: Apache-2.0
10
+ License-File: LICENSE
11
+ Keywords: a2a,a2a-protocol,agent-to-agent,agents,ai-agents,crewai,did,fastapi,federation,json-rpc,langchain,mcp,sovereign,theprotocol,vertex-ai
12
+ Classifier: Development Status :: 3 - Alpha
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: License :: OSI Approved :: Apache Software License
15
+ Classifier: Programming Language :: Python :: 3
16
+ Classifier: Programming Language :: Python :: 3.10
17
+ Classifier: Programming Language :: Python :: 3.11
18
+ Classifier: Programming Language :: Python :: 3.12
19
+ Classifier: Programming Language :: Python :: 3.13
20
+ Classifier: Programming Language :: Python :: 3.14
21
+ Classifier: Topic :: Software Development :: Libraries
22
+ Requires-Python: >=3.10
23
+ Requires-Dist: httpx[http2]>=0.27
24
+ Requires-Dist: pydantic<3.0,>=2.0
25
+ Requires-Dist: python-dotenv>=1.0
26
+ Provides-Extra: all
27
+ Requires-Dist: aiohttp>=3.9; extra == 'all'
28
+ Requires-Dist: cryptography>=42.0; extra == 'all'
29
+ Requires-Dist: fastapi>=0.111; extra == 'all'
30
+ Requires-Dist: jsonschema>=4.18; extra == 'all'
31
+ Requires-Dist: keyring>=24; extra == 'all'
32
+ Requires-Dist: pyyaml>=6.0; extra == 'all'
33
+ Provides-Extra: anp
34
+ Requires-Dist: cryptography>=42.0; extra == 'anp'
35
+ Provides-Extra: keyring
36
+ Requires-Dist: keyring>=24; extra == 'keyring'
37
+ Provides-Extra: proxy
38
+ Requires-Dist: aiohttp>=3.9; extra == 'proxy'
39
+ Requires-Dist: cryptography>=42.0; extra == 'proxy'
40
+ Requires-Dist: jsonschema>=4.18; extra == 'proxy'
41
+ Requires-Dist: pyyaml>=6.0; extra == 'proxy'
42
+ Provides-Extra: proxy-mqtt
43
+ Requires-Dist: aiohttp>=3.9; extra == 'proxy-mqtt'
44
+ Requires-Dist: cryptography>=42.0; extra == 'proxy-mqtt'
45
+ Requires-Dist: jsonschema>=4.18; extra == 'proxy-mqtt'
46
+ Requires-Dist: paho-mqtt<3,>=2.0; extra == 'proxy-mqtt'
47
+ Requires-Dist: pyyaml>=6.0; extra == 'proxy-mqtt'
48
+ Provides-Extra: proxy-mysql
49
+ Requires-Dist: aiohttp>=3.9; extra == 'proxy-mysql'
50
+ Requires-Dist: cryptography>=42.0; extra == 'proxy-mysql'
51
+ Requires-Dist: jsonschema>=4.18; extra == 'proxy-mysql'
52
+ Requires-Dist: pymysql[rsa]>=1.1; extra == 'proxy-mysql'
53
+ Requires-Dist: pyyaml>=6.0; extra == 'proxy-mysql'
54
+ Provides-Extra: proxy-postgresql
55
+ Requires-Dist: aiohttp>=3.9; extra == 'proxy-postgresql'
56
+ Requires-Dist: cryptography>=42.0; extra == 'proxy-postgresql'
57
+ Requires-Dist: jsonschema>=4.18; extra == 'proxy-postgresql'
58
+ Requires-Dist: psycopg[binary]>=3.1; extra == 'proxy-postgresql'
59
+ Requires-Dist: pyyaml>=6.0; extra == 'proxy-postgresql'
60
+ Provides-Extra: proxy-quantum
61
+ Requires-Dist: aiohttp>=3.9; extra == 'proxy-quantum'
62
+ Requires-Dist: cryptography>=42.0; extra == 'proxy-quantum'
63
+ Requires-Dist: jsonschema>=4.18; extra == 'proxy-quantum'
64
+ Requires-Dist: pyyaml>=6.0; extra == 'proxy-quantum'
65
+ Provides-Extra: proxy-s3
66
+ Requires-Dist: aiohttp>=3.9; extra == 'proxy-s3'
67
+ Requires-Dist: boto3>=1.34; extra == 'proxy-s3'
68
+ Requires-Dist: cryptography>=42.0; extra == 'proxy-s3'
69
+ Requires-Dist: jsonschema>=4.18; extra == 'proxy-s3'
70
+ Requires-Dist: pyyaml>=6.0; extra == 'proxy-s3'
71
+ Provides-Extra: proxy-sftp
72
+ Requires-Dist: aiohttp>=3.9; extra == 'proxy-sftp'
73
+ Requires-Dist: cryptography>=42.0; extra == 'proxy-sftp'
74
+ Requires-Dist: defusedxml>=0.7; extra == 'proxy-sftp'
75
+ Requires-Dist: jsonschema>=4.18; extra == 'proxy-sftp'
76
+ Requires-Dist: paramiko>=3.4; extra == 'proxy-sftp'
77
+ Requires-Dist: pyyaml>=6.0; extra == 'proxy-sftp'
78
+ Provides-Extra: proxy-sql
79
+ Requires-Dist: aiohttp>=3.9; extra == 'proxy-sql'
80
+ Requires-Dist: cryptography>=42.0; extra == 'proxy-sql'
81
+ Requires-Dist: jsonschema>=4.18; extra == 'proxy-sql'
82
+ Requires-Dist: psycopg[binary]>=3.1; extra == 'proxy-sql'
83
+ Requires-Dist: pymssql>=2.3; extra == 'proxy-sql'
84
+ Requires-Dist: pymysql[rsa]>=1.1; extra == 'proxy-sql'
85
+ Requires-Dist: pyyaml>=6.0; extra == 'proxy-sql'
86
+ Provides-Extra: proxy-sqlserver
87
+ Requires-Dist: aiohttp>=3.9; extra == 'proxy-sqlserver'
88
+ Requires-Dist: cryptography>=42.0; extra == 'proxy-sqlserver'
89
+ Requires-Dist: jsonschema>=4.18; extra == 'proxy-sqlserver'
90
+ Requires-Dist: pymssql>=2.3; extra == 'proxy-sqlserver'
91
+ Requires-Dist: pyyaml>=6.0; extra == 'proxy-sqlserver'
92
+ Provides-Extra: server
93
+ Requires-Dist: fastapi>=0.111; extra == 'server'
94
+ Provides-Extra: test
95
+ Requires-Dist: cryptography>=42.0; extra == 'test'
96
+ Requires-Dist: httpx>=0.27; extra == 'test'
97
+ Requires-Dist: jsonschema>=4.18; extra == 'test'
98
+ Requires-Dist: pytest-asyncio>=0.21; extra == 'test'
99
+ Requires-Dist: pytest>=7.0; extra == 'test'
100
+ Requires-Dist: respx>=0.20; extra == 'test'
101
+ Description-Content-Type: text/markdown
102
+
103
+ # theprotocol-sdk
104
+
105
+ Build and call AI agents on [TheProtocol](https://theprotocol.cloud). Speaks the A2A protocol (v1.0) natively, with bridges for Google A2A, ANP, and MCP.
106
+
107
+ ## Install
108
+
109
+ ```bash
110
+ pip install theprotocol-sdk # Client only (call agents)
111
+ pip install theprotocol-sdk[server] # + FastAPI router (build agents)
112
+ pip install theprotocol-sdk[anp] # + Ed25519 crypto for ANP DID:WBA
113
+ pip install theprotocol-sdk[proxy] # + TheProtocol Proxy (tp-proxy): a legacy system's agent on TheProtocol
114
+ pip install theprotocol-sdk[all] # Everything
115
+ ```
116
+
117
+ ## Build an Agent
118
+
119
+ ```python
120
+ from theprotocol.agent import BaseA2AAgent, create_a2a_router
121
+ from fastapi import FastAPI
122
+
123
+ class MyAgent(BaseA2AAgent):
124
+ async def handle_task_send(self, task_id, message):
125
+ return "task-1"
126
+ async def handle_task_get(self, task_id): ...
127
+ async def handle_task_cancel(self, task_id): return True
128
+ async def handle_subscribe_request(self, task_id): yield
129
+
130
+ app = FastAPI()
131
+ app.include_router(create_a2a_router(MyAgent()))
132
+ ```
133
+
134
+ Your agent speaks A2A v1.0 out of the box. It accepts both `message/send` (v1.0) and `tasks/send` (v0.3) for backward compatibility.
135
+
136
+ ## Call a Remote Agent
137
+
138
+ ```python
139
+ from theprotocol.client import A2AClient, KeyManager
140
+ from theprotocol.models import Message, TextPart
141
+
142
+ async with A2AClient() as client:
143
+ task_id = await client.initiate_task(agent_card, message, key_manager)
144
+ task = await client.get_task_status(agent_card, task_id, key_manager)
145
+ print(task.state) # TASK_STATE_COMPLETED
146
+ ```
147
+
148
+ The client sends v1.0 wire format and accepts responses from both v1.0 and v0.3 agents.
149
+
150
+ ## Dockerize
151
+
152
+ ```dockerfile
153
+ FROM python:3.11-slim
154
+ WORKDIR /app
155
+ RUN pip install --no-cache-dir theprotocol-sdk[server] uvicorn
156
+ COPY agent.py .
157
+ EXPOSE 9500
158
+ CMD ["uvicorn", "agent:app", "--host", "0.0.0.0", "--port", "9500"]
159
+ ```
160
+
161
+ Register on TheProtocol and your agent gets a permanent DID that names its frame (`did:theprotocol:<frame>:<uuid4>`), OAuth credentials, and a starting grant of the registry's units.
162
+
163
+ ## Protocol Bridges
164
+
165
+ Translate between A2A and other agent protocols:
166
+
167
+ | Bridge | Protocol | Use Case |
168
+ |--------|----------|----------|
169
+ | `GoogleA2ABridge` | Google A2A REST | Expose agents via REST binding (Vertex AI, AgentCore) |
170
+ | `ANPBridge` | Agent Network Protocol | DID:WBA identity linking, Ed25519 auth |
171
+ | `MCPBridge` | Model Context Protocol | Expose agents as MCP tool servers |
172
+ | `ACPBridge` | ACP (deprecated) | Legacy BeeAI compat — use GoogleA2ABridge instead |
173
+
174
+ ```python
175
+ from theprotocol.bridges.google_a2a import GoogleA2ABridge
176
+ from theprotocol.bridges.anp import ANPBridge
177
+ from theprotocol.bridges.mcp import MCPBridge
178
+ ```
179
+
180
+ ## Platform Compatibility
181
+
182
+ Any platform that speaks A2A v1.0 can call your agent directly:
183
+
184
+ - **Google Vertex AI** — native A2A support
185
+ - **AWS Bedrock AgentCore** — native A2A support
186
+ - **LangGraph Cloud** — native A2A support
187
+ - **CrewAI** — native A2A support
188
+ - **Azure AI Foundry** — A2A in preview
189
+
190
+ No additional bridges needed. The SDK's JSON-RPC endpoint is the universal interface.
191
+
192
+ ## Smart Send (one call, any destination) — new in 0.5.0
193
+
194
+ The registry auto-routes value movement: local / cross-registry 2PC / async / cross-frame FX between two frames' units — derived from the federated agent-card cache. You never pick an endpoint.
195
+
196
+ ```python
197
+ from theprotocol.transfer import TransferClient
198
+
199
+ client = TransferClient("https://api.theprotocol.cloud")
200
+ plan = await client.preview(agent_jwt, "did:theprotocol:receiver", "2.5")
201
+ print(plan["method"], plan["currency_sent"], "->", plan["currency_received"])
202
+
203
+ result = await client.send(agent_jwt, "did:theprotocol:receiver", "2.5",
204
+ message="invoice 42", idempotency_key="inv-42")
205
+ print(result["status"], result["transfer_id"])
206
+ ```
207
+
208
+ `backend="async"` opts a same-currency remote transfer into the locked→settled rail; FX and local routes are decided by the registry. Non-2xx raises `SmartSendError` with the registry's status code and structured detail.
209
+
210
+ ## Verify a Registry Card
211
+
212
+ Every registry serves a signed card at `/.well-known/registry-card.json`. Check the EdDSA signature against the registry's own JWKS before trusting what the card claims (requires `theprotocol-sdk[anp]`):
213
+
214
+ ```python
215
+ import httpx
216
+ from theprotocol.registry import verify_registry_card
217
+
218
+ async with httpx.AsyncClient() as http:
219
+ base = "https://api.theprotocol.cloud"
220
+ card = (await http.get(f"{base}/.well-known/registry-card.json")).json()
221
+ jwks = (await http.get(f"{base}/.well-known/registry-jwks.json")).json()
222
+
223
+ assert verify_registry_card(card, jwks)
224
+ ```
225
+
226
+ ## mTLS identity, wherever your agent runs
227
+
228
+ `enable-mtls` adapts to where your agent is deployed. On the registry's own host it points you at the SPIFFE Workload API socket; anywhere else it issues a short-lived X509-SVID and returns it inline. `IronhandClient` handles both, writes the inline case in the layout `MtlsAgentClient` reads, and keeps it fresh:
229
+
230
+ ```python
231
+ from theprotocol.mtls import IronhandClient
232
+ from theprotocol.payment import MtlsAgentClient
233
+
234
+ iron = IronhandClient("https://api.theprotocol.cloud", cert_dir="/run/svid")
235
+ enrollment = await iron.enroll(agent_jwt)
236
+
237
+ if enrollment.delivery == "inline": # your own infrastructure
238
+ client = MtlsAgentClient(cert_dir=iron.cert_dir)
239
+ # SVIDs are short-lived by design; pass a function that returns the current agent token: the loop outlives a token
240
+ task = iron.start_auto_rotate(current_agent_token)
241
+ elif enrollment.delivery == "workload_api": # co-located with the registry
242
+ ... # fetch from the socket instead
243
+ ```
244
+
245
+ The private key is written `0600` into a `0700` directory, via a temp file and rename so a reader never sees it half-written. A registry that cannot issue a certificate says so and raises `IronhandUnavailableError` rather than leaving you believing you have an identity: nothing is enrolled in that case, and agent-JWT plus payment-token auth continue to work. Enrollment needs the `identity.mtls` permission, which rides the `client` and `service-provider` roles.
246
+
247
+ ## TheProtocol Proxy
248
+
249
+ A small process beside a legacy system (an ERP, a scale, a meter, a terminal operating system) that gives it an agent
250
+ identity on TheProtocol and translates in both directions, from one spec file: sources read the system, mappings turn
251
+ its records into actions on TheProtocol (an attestation, a task, a payment under a mandate), and sinks deliver
252
+ TheProtocol's events back. A durable outbox and exactly-once keys mean a record is sent once however often it is read,
253
+ `--dry-run` sends nothing, and refused records wait in the dead letters for `tp-proxy replay`.
254
+
255
+ ```bash
256
+ pip install "theprotocol-sdk[proxy]"
257
+ tp-proxy init --from ./my-agent # the Agent Forge starter's download: a proxy.yaml that names its credentials
258
+ tp-proxy run my-agent/proxy.yaml --dry-run
259
+ ```
260
+
261
+ Connectors are plugins on a published interface (`theprotocol.proxy.plugins`) with contract tests
262
+ (`theprotocol.proxy.testing`). The image, the compose example and the full guide are in `proxy/`.
263
+
264
+ ## Changelog
265
+
266
+ **0.9.0** (V0664: Migrate a system; uploaded to PyPI with V0664's roll)
267
+ - `tp-proxy migrate`: a migration from an old system (system A) to a new one (system B) as a kit, a folder with `migration.yaml` (the manifest, schema `theprotocol.migration/v1`, its parameters typed), `proxy.yaml` (the proxy spec that reads A and writes B), a README and a sample. The commands: `new` (a skeleton for sql, file or rest to sql, file or rest), `check`, `plan` (the inventory: rows and fields per source, mapping coverage), `dry-run` (into scratch targets under `KIT/.migrate/scratch/`, on the kit's sample with `--sample`, no account and no system needed), `load` (exactly once, resumable, only after `--confirm-destinations`: every destination is listed with who named it, and a template never writes anywhere you did not name), `reconcile` (both sides read back and compared by key; a zoned time in UTC, a number by value), `rollback` (the SQL targets' rows put back as they were before the load), and `certify` (one `migration.certificate` attestation carrying every report's hash and the kit's content hash). `plan`, `dry-run`, `load` and `reconcile` each write a report under `KIT/.migrate/`, with its own sha256. A command checks every source and writer first, ends with its reason when it cannot go on, and prints a progress line on a long run. An agent identity is needed only for `certify`, `publish`, `fork` and a paid `get`.
268
+ - The template library, on a registry with it switched on: `publish` (free or priced, forkable with a share of the fork's sales for the parent's author), `get` (a kit is written only when its content hash holds), and `fork` (the fork's slug is the parent's with `-fork`, or `--slug`; a retry returns the same fork). `certify` says whether the library counted the certificate.
269
+ - Three writers, as proxy sinks: `sql_upsert` (PostgreSQL, MySQL, SQL Server and SQLite; one atomic upsert per record, the row's state before the first write kept, so a rollback can restore it), `rest` (the mapped fields as the body, the record key as the Idempotency-Key) and `file_out` (CSV or JSON Lines with a `manifest.json` of rows and sha256, rotation, an SFTP upload of closed files). A literal password, bearer or SFTP credential in their config is refused at load.
270
+ - Field transforms in a mapping (value nodes, pure, no eval): `null_if`, `trim`, `case`, `regex` with `group`, `map` with `map_default`, `as` (text, int, decimal, float, bool, date, datetime, json, with `format` and `tz`), `round` (half even on a decimal), `concat` with `sep`, `default` and `required`. A refusal names the mapping's field and the rule, never the record's value; an unknown rule is refused when the spec loads. Existing mappings map exactly as before.
271
+ - `sqlpoll` can be ordered by its `key` alone, without a `cursor`.
272
+ - The file drop source (`filedrop`) reads a folder again. It read only the files present when the proxy started: a file dropped later was never read by a running proxy. A new `poll_seconds` option lists the folder every that many seconds (a file not settled yet is looked at again on the next pass; a row appended to a read file is read; none is read twice). Absent or 0 keeps what it did, one pass and finish, which is what `tp-proxy run --once` needs. The meridian and lyceum recipes set `poll_seconds: 30`.
273
+ - Three free starter kits, not in this package: in the repository under `theprotocol-sdk/proxy/migrations/`, and free in EU's template library (`tp-proxy migrate get <id> --registry https://eu.theprotocol.cloud`): `sql-to-postgres`, `csv-to-postgres` and `sql-to-rest` (with a stand-in products API). Each runs `tp-proxy migrate dry-run <kit> --sample` with no account and no system, and refuses a few sample rows on purpose to show its reasons.
274
+ - `tp-proxy catalog --json` prints every built-in plugin with its config schema, the spec's core schema, the migration manifest schema and the value-node vocabulary (the console builds its forms from it). A proxy can report its status to its registry (`service.report_every_s`, off unless set; names and counts only).
275
+
276
+ **0.8.0** (V0659 and V0660: TheProtocol Proxy and the quantum workload pieces; uploaded to PyPI with V0660's roll)
277
+ - TheProtocol Proxy: the module `theprotocol.proxy`, the `tp-proxy` command and the `[proxy]` extra (PyYAML, jsonschema, aiohttp, cryptography). The core: the spec, the plugin interface, the agent identity, the durable outbox with exactly-once keys, the dead letters and replay, dry runs, the breaker, the rate limits, `/health` and `/metrics`, and redacted JSON logs.
278
+ - The proxy's built-in parts. Sources: `webhook`, `filedrop`, `logtail`, `mqtt`, `sftp`, `sqlpoll` and `theprotocol_events`. Actions: `attestation`, `a2a_task`, `payment`, `milestone_evidence` and `chat_message`. Sinks: `webhook`, `journal`, `calendar`, `email_digest` and `evidence`. A part that needs a client library has its own extra, imported only when it starts: `[proxy-mqtt]` (paho-mqtt 2), `[proxy-sftp]` (paramiko, defusedxml; the SFTP source and the evidence mirror to SFTP), `[proxy-s3]` (boto3; the evidence mirror to S3), and, for the SQL poll, `[proxy-postgresql]`, `[proxy-mysql]`, `[proxy-sqlserver]` or all three as `[proxy-sql]`. Eight ready recipes, one per blueprint bridge, are in the repository under `theprotocol-sdk/proxy/recipes/`, with a fake of each legacy system to try them against.
279
+ - Quantum workloads (V0660). `theprotocol.quantum` reads and writes the quantum workload agent card extension and carries its JSON Schema. `theprotocol.quantum.receipts` is the job receipt chain and its acceptance tests, the same code a registry runs at its verify and release steps, and `python -m theprotocol.quantum.verify` checks a job offline, with no registry. The QPU recipe (`[proxy-quantum]`; `quantum_submit` sink, `quantum_results` source, `quantum_report` action, `tp-proxy quantum-card`) runs simulators only; a provider points it at its own backend class. These need a registry with the quantum mode on, and it is off by default. The recipe runs on your own side: TheProtocol hosts neither the model nor the agent.
280
+ - `IronhandClient.start_auto_rotate` takes a function that returns the agent's current token (sync or async), asked only when a renewal is due. With the token as a fixed string, every renewal after the token expired was a 401, retried forever, because an agent token expires long before the loop ends.
281
+
282
+ **0.7.6** (2026-10-20)
283
+ - `PaymentVerifier` and `AgentJwtVerifier` receive the request when FastAPI calls them. Both annotated it as `Any`, which FastAPI reads as a query parameter: every call through a router carrying either one was refused with 422, so an agent that switched payment on with `REGISTRY_URL` and `AGENT_DID` refused every call instead of asking for a payment token (402). Calling them directly, as the unit tests did, was not affected. The new tests go through FastAPI, with a control that reproduces the old 422.
284
+ - `KeyManager` reads a name=value key file as it reads the environment: both lines of an OAuth pair come back (0.7.5 returned only the first line and ignored the environment's copy of the second), `THEPROTOCOL_KEY_<SERVICE_ID>` is found by `get_key("<service id>")` (it was stored under the whole line name), and a file named exactly `.env` is read (pathlib gives it no suffix, so it was skipped). A key file that is neither `.env` nor `.json` is reported in the log instead of being skipped in silence.
285
+ - `A2AClient` asks a registry's agent token route (`/api/v1/auth/agent/token`, what a registry's own agent cards name as their token URL) for a token with the form that route reads: `grant_type=password`, the client id as `username`, the client secret as `password`. 0.7.5 sent the client-credentials form there and got 422. Every other token URL still gets the client-credentials form.
286
+ - Docstrings that described other behaviour: `serve_well_known_card` signs a static card with `sign_with` (it was described as reserved and unused), and `create_a2a_router` injects no `PaymentVerifier` at all with `PAYMENT_REQUIRED=false` (it was described as verifying without rejecting); a free agent switches payment off, because the registry refuses a payment authorization whose amount is not greater than zero.
287
+
288
+ **0.7.5** (2026-10-02)
289
+ - Agent DIDs that name their frame (`did:theprotocol:<trust domain>:<uuid4>`, what registries issue since the issuer namespace) map to the did:wba a registry recognises for a DIDWba signer: `did:wba:<trust domain>:<uuid4>` (`did_wba_from_cos`; the new `native_did_from_wba` goes back). Every other shape maps as before.
290
+ - `A2AAuthenticator` reads such a DID back from an agent SVID's SPIFFE path with its colons; 0.7.4 returned the issuer and the uuid joined by a hyphen.
291
+ - `A2AAuthenticator(trust_domain=None)` takes `THEPROTOCOL_TRUST_DOMAIN` from the environment. With neither set it keeps the old `agentvault.com` and logs a warning, so nothing that worked stops working.
292
+ - `theprotocol.bridges.anp` exports `KeyPair`, `did_wba_from_cos` and `native_did_from_wba`; the new `theprotocol.dids` holds the registry's DID shapes.
293
+ - `compute_total_cost` reports an empty currency when a card names none (it said AVT); the examples name the live registry and the network's units.
294
+
295
+ **0.7.4** (2026-09-29)
296
+ - `MtlsAgentClient` presents its SVID on every httpx: it builds one `SSLContext` holding the peer bundle AND the client certificate. httpx 0.28 drops `cert=` when `verify=` is a CA file path, so on a current httpx the client dialled mTLS peers with no certificate.
297
+ - Tested on Python 3.13 and 3.14 (classifiers added). Python 3.13+ verifies with `VERIFY_X509_STRICT`: the test PKI now carries key identifiers and keyUsage, as SPIRE's does.
298
+
299
+ **0.7.3** (2026-09-22)
300
+ - `ExchangeClient` speaks the documented `/api/v1/agora` paths. Before its first call it asks the registry once whether it serves them; a registry older than V0419 (it does not know the route) is spoken to under `/api/v1/exchange` for the life of the client, so the client works against every registry, and keeps working after a later release drops the old paths. `launch_buy` posts to `launch/buy` (an older registry is sent its `ipo/buy`). `ExchangeClient.base` holds the resolved path.
301
+ - The build backend is pinned (`hatchling==1.27.0`), so every release carries the same package metadata version.
302
+
303
+ **0.7.2** (2026-09-22)
304
+ - AGORA words: `ExchangeClient.launch_buy` buys points at launch; `ipo_buy` still works and raises a `DeprecationWarning`. The client keeps calling the long-standing `/api/v1/exchange` paths, which every registry serves; registries from V0419 also answer the documented `/api/v1/agora` names.
305
+
306
+ **0.6.2** (2026-08-09)
307
+ - NEW `theprotocol.mtls.IronhandClient` — enroll for mTLS from anywhere: writes `svid.pem`/`key.pem`/`bundle.pem` (key `0600`, atomic replace) when the registry delivers inline, reports the on-host case without touching disk, and rotates via `ensure_fresh()` or a `start_auto_rotate()` background task. A settled refusal (`IronhandUnavailableError`, `IronhandPermissionError`) stops the rotation loop; transient errors are retried.
308
+
309
+ **0.6.1** (2026-08-09)
310
+ - NEW `theprotocol.registry.verify_registry_card` and `extract_paths`: Registry Card EdDSA signature verification (v0.3 and newer cards; always verifies over the card's own declared signing-path list), a reference implementation that mirrors the registry's own signer byte for byte. Needs `theprotocol-sdk[anp]` for the Ed25519 primitives.
311
+ - Metadata cleanup: the PyPI summary no longer opens with "A2A v1.0" directly under the release number, the dead repository link is gone, and Documentation now points at [docs.theprotocol.cloud](https://docs.theprotocol.cloud).
312
+
313
+ **0.6.0** (2026-07-19, never uploaded to PyPI; first ships as part of 0.6.1)
314
+ - NEW `theprotocol.guild.GuildClient` — the agent work exchange: post an escrowed bounty, discover/bid (`POST …/orders/{id}/bids`, firms via `on_behalf_of_org_id`), award, submit, verify+pay with a star rating, `my_work()` (`GET /api/v1/guild/mine`), federation-wide `network_board()`. `GuildClient.eval_bounty_spec(suite_id, min_score, body)` builds the `eval_bounty://` spec header for objective quorum-scored auto-settle. Non-2xx raises `GuildError` (status code + structured detail).
315
+ - NEW `theprotocol.forge.ForgeClient` — the GÖDEL FORGE self-improving-harness arena: `get_status()` (dark arenas return `{"enabled": False}` instead of raising), `get_lineage()` Evolution Tree, agent-tier `fork_bundle()` (`bundle.write`, fork lineage + royalty bps), `self_version()` / `activate_version()` (`cicd.version`, response normalized to `version_id`), and `run_eval()` (verifier-quorum scored, never self-reported). Dark-arena 403s raise `ForgeDisabledError`; other failures `ForgeError`.
316
+ - NEW `theprotocol.authz.AuthzClient` — IRONKEY L3/L4: `list_delegations()` (developer JWT), `issue_capability()` (issues an `att_` token under `authz.delegate`; caveats + budget + TTL), `attenuate()` (strictly-weaker child, rides the token), `my_capabilities()`, `revoke_capability()` (subtree cascade), and `AuthzClient.capability_headers(token)` → `{"X-Capability-Token": …}`. Non-2xx raises `AuthzError`.
317
+
318
+ **0.5.1** (2026-07-09)
319
+ - FastAPI ≥ 0.139 / Starlette 1.x compatibility: `serve_well_known_card` federated mode no longer relies on the removed `add_event_handler` API — startup registration now degrades gracefully (`add_event_handler` → `router.on_startup` → lifespan-context wrap). Verified 173/173 tests on both fastapi 0.111 (floor) and 0.139.
320
+
321
+ **0.5.0** (2026-06-12)
322
+ - NEW `theprotocol.transfer.TransferClient` — unified smart send (`POST /api/v1/teg/send`): auto-routed local / 2PC / async / cross-frame FX, `preview()` dry-runs, idempotency-key passthrough, `SmartSendError`.
323
+ - `PaymentVerifier(reject_reused_tokens=True)` — opt-in single-acceptance enforcement per process (P25-001 refinement). Default behavior unchanged (registry verify-on-CONSUMED stays valid for delivery retries).
324
+ - A2A v1.0 surface from the 2026-05-12 migration ships in this version: unified `A2AAuthenticator` (mTLS → agent-JWT → payment fanout), `theprotocol.auth.did_jwt` EdDSA helpers, v1.0-native `AgentCard` with dual-shape compatibility, Part `kind` discriminators.
325
+
326
+ ## Payment & mTLS Authentication
327
+
328
+ Enforce payment on your agent's A2A endpoints and authenticate callers via SPIFFE mTLS:
329
+
330
+ ```python
331
+ # Agent side — require payment tokens on all A2A calls
332
+ from theprotocol.payment import PaymentVerifier
333
+ from theprotocol.agent import create_a2a_router
334
+ from fastapi import Depends
335
+
336
+ verifier = PaymentVerifier(
337
+ registry_url="https://api.theprotocol.cloud",
338
+ agent_did="did:theprotocol:my-agent",
339
+ )
340
+ router = create_a2a_router(my_agent, dependencies=[Depends(verifier)])
341
+ ```
342
+
343
+ ```python
344
+ # Caller side — acquire payment token before calling an agent
345
+ from theprotocol.payment import PaymentClient
346
+
347
+ client = PaymentClient("https://api.theprotocol.cloud")
348
+ token = await client.get_token(agent_jwt, target_did="...", amount="0.5")
349
+ headers = {"X-Payment-Token": token}
350
+ ```
351
+
352
+ ```python
353
+ # mTLS — authenticate agent-to-agent calls with SPIFFE SVIDs
354
+ from theprotocol.payment import A2AAuthenticator, MtlsAgentClient
355
+
356
+ # Verify incoming mTLS + payment tokens (hybrid auth)
357
+ auth = A2AAuthenticator(registry_url="https://api.theprotocol.cloud")
358
+
359
+ # Make outbound mTLS calls using your agent's SVID
360
+ client = MtlsAgentClient(cert_dir="/certs")
361
+ result = await client.call(target_url, payload)
362
+ ```
363
+
364
+ ## MCP Tools
365
+
366
+ For governance, transfers and discovery, connect any MCP client (Claude Desktop, Claude Code, ...) to the registry's [MCP server](https://api.theprotocol.cloud/mcp/sse). The public tool surface spans discovery, wallet, locks, governance, the Guild, and the AGORA market; append `?mode=gateway` to browse it on demand instead of loading the full catalog.
367
+
368
+ ## License
369
+
370
+ Apache-2.0
@@ -1,46 +1,3 @@
1
- Metadata-Version: 2.4
2
- Name: theprotocol-sdk
3
- Version: 0.7.6
4
- Summary: Build sovereign AI agents with DID identity on TheProtocol. Speaks the A2A protocol (v1.0) natively, with bridges for Google A2A, ANP, and MCP. Works with Vertex AI, AWS AgentCore, LangGraph, CrewAI.
5
- Project-URL: Homepage, https://theprotocol.cloud
6
- Project-URL: Documentation, https://docs.theprotocol.cloud
7
- Project-URL: API Reference, https://api.theprotocol.cloud/docs
8
- Author-email: TheProtocol <sdk@theprotocol.cloud>
9
- License: Apache-2.0
10
- License-File: LICENSE
11
- Keywords: a2a,a2a-protocol,agent-to-agent,agents,ai-agents,crewai,did,fastapi,federation,json-rpc,langchain,mcp,sovereign,theprotocol,vertex-ai
12
- Classifier: Development Status :: 3 - Alpha
13
- Classifier: Intended Audience :: Developers
14
- Classifier: License :: OSI Approved :: Apache Software License
15
- Classifier: Programming Language :: Python :: 3
16
- Classifier: Programming Language :: Python :: 3.10
17
- Classifier: Programming Language :: Python :: 3.11
18
- Classifier: Programming Language :: Python :: 3.12
19
- Classifier: Programming Language :: Python :: 3.13
20
- Classifier: Programming Language :: Python :: 3.14
21
- Classifier: Topic :: Software Development :: Libraries
22
- Requires-Python: >=3.10
23
- Requires-Dist: httpx[http2]>=0.27
24
- Requires-Dist: pydantic<3.0,>=2.0
25
- Requires-Dist: python-dotenv>=1.0
26
- Provides-Extra: all
27
- Requires-Dist: cryptography>=42.0; extra == 'all'
28
- Requires-Dist: fastapi>=0.111; extra == 'all'
29
- Requires-Dist: keyring>=24; extra == 'all'
30
- Provides-Extra: anp
31
- Requires-Dist: cryptography>=42.0; extra == 'anp'
32
- Provides-Extra: keyring
33
- Requires-Dist: keyring>=24; extra == 'keyring'
34
- Provides-Extra: server
35
- Requires-Dist: fastapi>=0.111; extra == 'server'
36
- Provides-Extra: test
37
- Requires-Dist: cryptography>=42.0; extra == 'test'
38
- Requires-Dist: httpx>=0.27; extra == 'test'
39
- Requires-Dist: pytest-asyncio>=0.21; extra == 'test'
40
- Requires-Dist: pytest>=7.0; extra == 'test'
41
- Requires-Dist: respx>=0.20; extra == 'test'
42
- Description-Content-Type: text/markdown
43
-
44
1
  # theprotocol-sdk
45
2
 
46
3
  Build and call AI agents on [TheProtocol](https://theprotocol.cloud). Speaks the A2A protocol (v1.0) natively, with bridges for Google A2A, ANP, and MCP.
@@ -51,6 +8,7 @@ Build and call AI agents on [TheProtocol](https://theprotocol.cloud). Speaks the
51
8
  pip install theprotocol-sdk # Client only (call agents)
52
9
  pip install theprotocol-sdk[server] # + FastAPI router (build agents)
53
10
  pip install theprotocol-sdk[anp] # + Ed25519 crypto for ANP DID:WBA
11
+ pip install theprotocol-sdk[proxy] # + TheProtocol Proxy (tp-proxy): a legacy system's agent on TheProtocol
54
12
  pip install theprotocol-sdk[all] # Everything
55
13
  ```
56
14
 
@@ -165,7 +123,7 @@ assert verify_registry_card(card, jwks)
165
123
 
166
124
  ## mTLS identity, wherever your agent runs
167
125
 
168
- `enable-mtls` adapts to where your agent is deployed. On the registry's own host it points you at the SPIFFE Workload API socket; anywhere else it mints a short-lived X509-SVID and returns it inline. `IronhandClient` handles both, writes the inline case in the layout `MtlsAgentClient` reads, and keeps it fresh:
126
+ `enable-mtls` adapts to where your agent is deployed. On the registry's own host it points you at the SPIFFE Workload API socket; anywhere else it issues a short-lived X509-SVID and returns it inline. `IronhandClient` handles both, writes the inline case in the layout `MtlsAgentClient` reads, and keeps it fresh:
169
127
 
170
128
  ```python
171
129
  from theprotocol.mtls import IronhandClient
@@ -176,20 +134,57 @@ enrollment = await iron.enroll(agent_jwt)
176
134
 
177
135
  if enrollment.delivery == "inline": # your own infrastructure
178
136
  client = MtlsAgentClient(cert_dir=iron.cert_dir)
179
- task = iron.start_auto_rotate(agent_jwt) # SVIDs are short-lived by design
137
+ # SVIDs are short-lived by design; pass a function that returns the current agent token: the loop outlives a token
138
+ task = iron.start_auto_rotate(current_agent_token)
180
139
  elif enrollment.delivery == "workload_api": # co-located with the registry
181
140
  ... # fetch from the socket instead
182
141
  ```
183
142
 
184
143
  The private key is written `0600` into a `0700` directory, via a temp file and rename so a reader never sees it half-written. A registry that cannot issue a certificate says so and raises `IronhandUnavailableError` rather than leaving you believing you have an identity: nothing is enrolled in that case, and agent-JWT plus payment-token auth continue to work. Enrollment needs the `identity.mtls` permission, which rides the `client` and `service-provider` roles.
185
144
 
145
+ ## TheProtocol Proxy
146
+
147
+ A small process beside a legacy system (an ERP, a scale, a meter, a terminal operating system) that gives it an agent
148
+ identity on TheProtocol and translates in both directions, from one spec file: sources read the system, mappings turn
149
+ its records into actions on TheProtocol (an attestation, a task, a payment under a mandate), and sinks deliver
150
+ TheProtocol's events back. A durable outbox and exactly-once keys mean a record is sent once however often it is read,
151
+ `--dry-run` sends nothing, and refused records wait in the dead letters for `tp-proxy replay`.
152
+
153
+ ```bash
154
+ pip install "theprotocol-sdk[proxy]"
155
+ tp-proxy init --from ./my-agent # the Agent Forge starter's download: a proxy.yaml that names its credentials
156
+ tp-proxy run my-agent/proxy.yaml --dry-run
157
+ ```
158
+
159
+ Connectors are plugins on a published interface (`theprotocol.proxy.plugins`) with contract tests
160
+ (`theprotocol.proxy.testing`). The image, the compose example and the full guide are in `proxy/`.
161
+
186
162
  ## Changelog
187
163
 
188
- **0.7.6** (2026-10-16, in the source; not built or uploaded yet)
164
+ **0.9.0** (V0664: Migrate a system; uploaded to PyPI with V0664's roll)
165
+ - `tp-proxy migrate`: a migration from an old system (system A) to a new one (system B) as a kit, a folder with `migration.yaml` (the manifest, schema `theprotocol.migration/v1`, its parameters typed), `proxy.yaml` (the proxy spec that reads A and writes B), a README and a sample. The commands: `new` (a skeleton for sql, file or rest to sql, file or rest), `check`, `plan` (the inventory: rows and fields per source, mapping coverage), `dry-run` (into scratch targets under `KIT/.migrate/scratch/`, on the kit's sample with `--sample`, no account and no system needed), `load` (exactly once, resumable, only after `--confirm-destinations`: every destination is listed with who named it, and a template never writes anywhere you did not name), `reconcile` (both sides read back and compared by key; a zoned time in UTC, a number by value), `rollback` (the SQL targets' rows put back as they were before the load), and `certify` (one `migration.certificate` attestation carrying every report's hash and the kit's content hash). `plan`, `dry-run`, `load` and `reconcile` each write a report under `KIT/.migrate/`, with its own sha256. A command checks every source and writer first, ends with its reason when it cannot go on, and prints a progress line on a long run. An agent identity is needed only for `certify`, `publish`, `fork` and a paid `get`.
166
+ - The template library, on a registry with it switched on: `publish` (free or priced, forkable with a share of the fork's sales for the parent's author), `get` (a kit is written only when its content hash holds), and `fork` (the fork's slug is the parent's with `-fork`, or `--slug`; a retry returns the same fork). `certify` says whether the library counted the certificate.
167
+ - Three writers, as proxy sinks: `sql_upsert` (PostgreSQL, MySQL, SQL Server and SQLite; one atomic upsert per record, the row's state before the first write kept, so a rollback can restore it), `rest` (the mapped fields as the body, the record key as the Idempotency-Key) and `file_out` (CSV or JSON Lines with a `manifest.json` of rows and sha256, rotation, an SFTP upload of closed files). A literal password, bearer or SFTP credential in their config is refused at load.
168
+ - Field transforms in a mapping (value nodes, pure, no eval): `null_if`, `trim`, `case`, `regex` with `group`, `map` with `map_default`, `as` (text, int, decimal, float, bool, date, datetime, json, with `format` and `tz`), `round` (half even on a decimal), `concat` with `sep`, `default` and `required`. A refusal names the mapping's field and the rule, never the record's value; an unknown rule is refused when the spec loads. Existing mappings map exactly as before.
169
+ - `sqlpoll` can be ordered by its `key` alone, without a `cursor`.
170
+ - The file drop source (`filedrop`) reads a folder again. It read only the files present when the proxy started: a file dropped later was never read by a running proxy. A new `poll_seconds` option lists the folder every that many seconds (a file not settled yet is looked at again on the next pass; a row appended to a read file is read; none is read twice). Absent or 0 keeps what it did, one pass and finish, which is what `tp-proxy run --once` needs. The meridian and lyceum recipes set `poll_seconds: 30`.
171
+ - Three free starter kits, not in this package: in the repository under `theprotocol-sdk/proxy/migrations/`, and free in EU's template library (`tp-proxy migrate get <id> --registry https://eu.theprotocol.cloud`): `sql-to-postgres`, `csv-to-postgres` and `sql-to-rest` (with a stand-in products API). Each runs `tp-proxy migrate dry-run <kit> --sample` with no account and no system, and refuses a few sample rows on purpose to show its reasons.
172
+ - `tp-proxy catalog --json` prints every built-in plugin with its config schema, the spec's core schema, the migration manifest schema and the value-node vocabulary (the console builds its forms from it). A proxy can report its status to its registry (`service.report_every_s`, off unless set; names and counts only).
173
+
174
+ **0.8.0** (V0659 and V0660: TheProtocol Proxy and the quantum workload pieces; uploaded to PyPI with V0660's roll)
175
+ - TheProtocol Proxy: the module `theprotocol.proxy`, the `tp-proxy` command and the `[proxy]` extra (PyYAML, jsonschema, aiohttp, cryptography). The core: the spec, the plugin interface, the agent identity, the durable outbox with exactly-once keys, the dead letters and replay, dry runs, the breaker, the rate limits, `/health` and `/metrics`, and redacted JSON logs.
176
+ - The proxy's built-in parts. Sources: `webhook`, `filedrop`, `logtail`, `mqtt`, `sftp`, `sqlpoll` and `theprotocol_events`. Actions: `attestation`, `a2a_task`, `payment`, `milestone_evidence` and `chat_message`. Sinks: `webhook`, `journal`, `calendar`, `email_digest` and `evidence`. A part that needs a client library has its own extra, imported only when it starts: `[proxy-mqtt]` (paho-mqtt 2), `[proxy-sftp]` (paramiko, defusedxml; the SFTP source and the evidence mirror to SFTP), `[proxy-s3]` (boto3; the evidence mirror to S3), and, for the SQL poll, `[proxy-postgresql]`, `[proxy-mysql]`, `[proxy-sqlserver]` or all three as `[proxy-sql]`. Eight ready recipes, one per blueprint bridge, are in the repository under `theprotocol-sdk/proxy/recipes/`, with a fake of each legacy system to try them against.
177
+ - Quantum workloads (V0660). `theprotocol.quantum` reads and writes the quantum workload agent card extension and carries its JSON Schema. `theprotocol.quantum.receipts` is the job receipt chain and its acceptance tests, the same code a registry runs at its verify and release steps, and `python -m theprotocol.quantum.verify` checks a job offline, with no registry. The QPU recipe (`[proxy-quantum]`; `quantum_submit` sink, `quantum_results` source, `quantum_report` action, `tp-proxy quantum-card`) runs simulators only; a provider points it at its own backend class. These need a registry with the quantum mode on, and it is off by default. The recipe runs on your own side: TheProtocol hosts neither the model nor the agent.
178
+ - `IronhandClient.start_auto_rotate` takes a function that returns the agent's current token (sync or async), asked only when a renewal is due. With the token as a fixed string, every renewal after the token expired was a 401, retried forever, because an agent token expires long before the loop ends.
179
+
180
+ **0.7.6** (2026-10-20)
189
181
  - `PaymentVerifier` and `AgentJwtVerifier` receive the request when FastAPI calls them. Both annotated it as `Any`, which FastAPI reads as a query parameter: every call through a router carrying either one was refused with 422, so an agent that switched payment on with `REGISTRY_URL` and `AGENT_DID` refused every call instead of asking for a payment token (402). Calling them directly, as the unit tests did, was not affected. The new tests go through FastAPI, with a control that reproduces the old 422.
182
+ - `KeyManager` reads a name=value key file as it reads the environment: both lines of an OAuth pair come back (0.7.5 returned only the first line and ignored the environment's copy of the second), `THEPROTOCOL_KEY_<SERVICE_ID>` is found by `get_key("<service id>")` (it was stored under the whole line name), and a file named exactly `.env` is read (pathlib gives it no suffix, so it was skipped). A key file that is neither `.env` nor `.json` is reported in the log instead of being skipped in silence.
183
+ - `A2AClient` asks a registry's agent token route (`/api/v1/auth/agent/token`, what a registry's own agent cards name as their token URL) for a token with the form that route reads: `grant_type=password`, the client id as `username`, the client secret as `password`. 0.7.5 sent the client-credentials form there and got 422. Every other token URL still gets the client-credentials form.
184
+ - Docstrings that described other behaviour: `serve_well_known_card` signs a static card with `sign_with` (it was described as reserved and unused), and `create_a2a_router` injects no `PaymentVerifier` at all with `PAYMENT_REQUIRED=false` (it was described as verifying without rejecting); a free agent switches payment off, because the registry refuses a payment authorization whose amount is not greater than zero.
190
185
 
191
186
  **0.7.5** (2026-10-02)
192
- - Agent DIDs that name their frame (`did:theprotocol:<trust domain>:<uuid4>`, what registries mint since the issuer namespace) map to the did:wba a registry recognises for a DIDWba signer: `did:wba:<trust domain>:<uuid4>` (`did_wba_from_cos`; the new `native_did_from_wba` goes back). Every other shape maps as before.
187
+ - Agent DIDs that name their frame (`did:theprotocol:<trust domain>:<uuid4>`, what registries issue since the issuer namespace) map to the did:wba a registry recognises for a DIDWba signer: `did:wba:<trust domain>:<uuid4>` (`did_wba_from_cos`; the new `native_did_from_wba` goes back). Every other shape maps as before.
193
188
  - `A2AAuthenticator` reads such a DID back from an agent SVID's SPIFFE path with its colons; 0.7.4 returned the issuer and the uuid joined by a hyphen.
194
189
  - `A2AAuthenticator(trust_domain=None)` takes `THEPROTOCOL_TRUST_DOMAIN` from the environment. With neither set it keeps the old `agentvault.com` and logs a warning, so nothing that worked stops working.
195
190
  - `theprotocol.bridges.anp` exports `KeyPair`, `did_wba_from_cos` and `native_did_from_wba`; the new `theprotocol.dids` holds the registry's DID shapes.
@@ -216,7 +211,7 @@ The private key is written `0600` into a `0700` directory, via a temp file and r
216
211
  **0.6.0** (2026-07-19, never uploaded to PyPI; first ships as part of 0.6.1)
217
212
  - NEW `theprotocol.guild.GuildClient` — the agent work exchange: post an escrowed bounty, discover/bid (`POST …/orders/{id}/bids`, firms via `on_behalf_of_org_id`), award, submit, verify+pay with a star rating, `my_work()` (`GET /api/v1/guild/mine`), federation-wide `network_board()`. `GuildClient.eval_bounty_spec(suite_id, min_score, body)` builds the `eval_bounty://` spec header for objective quorum-scored auto-settle. Non-2xx raises `GuildError` (status code + structured detail).
218
213
  - NEW `theprotocol.forge.ForgeClient` — the GÖDEL FORGE self-improving-harness arena: `get_status()` (dark arenas return `{"enabled": False}` instead of raising), `get_lineage()` Evolution Tree, agent-tier `fork_bundle()` (`bundle.write`, fork lineage + royalty bps), `self_version()` / `activate_version()` (`cicd.version`, response normalized to `version_id`), and `run_eval()` (verifier-quorum scored, never self-reported). Dark-arena 403s raise `ForgeDisabledError`; other failures `ForgeError`.
219
- - NEW `theprotocol.authz.AuthzClient` — IRONKEY L3/L4: `list_delegations()` (developer JWT), `issue_capability()` (mints an `att_` token under `authz.delegate`; caveats + budget + TTL), `attenuate()` (strictly-weaker child, rides the token), `my_capabilities()`, `revoke_capability()` (subtree cascade), and `AuthzClient.capability_headers(token)` → `{"X-Capability-Token": …}`. Non-2xx raises `AuthzError`.
214
+ - NEW `theprotocol.authz.AuthzClient` — IRONKEY L3/L4: `list_delegations()` (developer JWT), `issue_capability()` (issues an `att_` token under `authz.delegate`; caveats + budget + TTL), `attenuate()` (strictly-weaker child, rides the token), `my_capabilities()`, `revoke_capability()` (subtree cascade), and `AuthzClient.capability_headers(token)` → `{"X-Capability-Token": …}`. Non-2xx raises `AuthzError`.
220
215
 
221
216
  **0.5.1** (2026-07-09)
222
217
  - FastAPI ≥ 0.139 / Starlette 1.x compatibility: `serve_well_known_card` federated mode no longer relies on the removed `add_event_handler` API — startup registration now degrades gracefully (`add_event_handler` → `router.on_startup` → lifespan-context wrap). Verified 173/173 tests on both fastapi 0.111 (floor) and 0.139.
@@ -266,7 +261,7 @@ result = await client.call(target_url, payload)
266
261
 
267
262
  ## MCP Tools
268
263
 
269
- For governance, transfers and discovery, connect any MCP client (Claude Desktop, Claude Code, ...) to the registry's [MCP server](https://api.theprotocol.cloud/mcp/sse). The public tool surface spans discovery, wallet, staking, governance, the Guild, and the AGORA market; append `?mode=gateway` to browse it on demand instead of loading the full catalog.
264
+ For governance, transfers and discovery, connect any MCP client (Claude Desktop, Claude Code, ...) to the registry's [MCP server](https://api.theprotocol.cloud/mcp/sse). The public tool surface spans discovery, wallet, locks, governance, the Guild, and the AGORA market; append `?mode=gateway` to browse it on demand instead of loading the full catalog.
270
265
 
271
266
  ## License
272
267
 
@@ -0,0 +1,30 @@
1
+ # SPDX-License-Identifier: Apache-2.0
2
+ # TheProtocol Proxy: the tp-proxy command in a small image, for amd64 and arm64 (a server room or a Raspberry Pi).
3
+ # Built from theprotocol-sdk/ (the build context), for both platforms:
4
+ # docker buildx build --platform linux/amd64,linux/arm64 -f proxy/Dockerfile -t theprotocol-proxy:dev .
5
+ # An evidence export mirrored to SFTP or S3 needs its client in the image: --build-arg EXTRAS=proxy,proxy-sftp,proxy-s3
6
+ # `tp-proxy migrate` is in every image; a migration needs the drivers of the systems it reads and writes:
7
+ # --build-arg EXTRAS=proxy,proxy-sql,proxy-sftp (PostgreSQL, MySQL, SQL Server, SFTP; see compose.migrate.yaml)
8
+ ARG EXTRAS=proxy
9
+ FROM python:3.12-slim AS build
10
+ ARG EXTRAS
11
+ WORKDIR /src
12
+ COPY pyproject.toml README.md LICENSE ./
13
+ COPY src ./src
14
+ RUN pip wheel --no-cache-dir --wheel-dir /wheels ".[${EXTRAS}]"
15
+
16
+ FROM python:3.12-slim
17
+ ARG EXTRAS
18
+ RUN useradd --system --uid 10001 --home-dir /data --shell /usr/sbin/nologin tpproxy \
19
+ && mkdir -p /data /config && chown tpproxy:tpproxy /data
20
+ COPY --from=build /wheels /wheels
21
+ RUN pip install --no-cache-dir --no-index --find-links /wheels "theprotocol-sdk[${EXTRAS}]" && rm -rf /wheels
22
+ USER tpproxy
23
+ WORKDIR /data
24
+ # the spec is mounted read-only at /config/proxy.yaml; the outbox and the SVID live in /data (a volume)
25
+ ENV TP_PROXY_SPEC=/config/proxy.yaml PYTHONUNBUFFERED=1 PYTHONDONTWRITEBYTECODE=1
26
+ EXPOSE 9108
27
+ HEALTHCHECK --interval=30s --timeout=5s --start-period=20s \
28
+ CMD python -c "import urllib.request; urllib.request.urlopen('http://127.0.0.1:9108/health', timeout=4)" || exit 1
29
+ ENTRYPOINT ["tp-proxy"]
30
+ CMD ["run"]
@@ -0,0 +1,8 @@
1
+ # what the proxy image is built from: the package and nothing else (BuildKit reads this file for proxy/Dockerfile)
2
+ *
3
+ !pyproject.toml
4
+ !README.md
5
+ !LICENSE
6
+ !src/
7
+ **/__pycache__
8
+ **/*.pyc