graphcore-kernel 0.2.0__tar.gz → 0.2.2__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 (350) hide show
  1. {graphcore_kernel-0.2.0/graphcore_kernel.egg-info → graphcore_kernel-0.2.2}/PKG-INFO +1 -1
  2. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/agent_frontend/api.py +6 -3
  3. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/agent_frontend/client.py +3 -0
  4. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/agent_frontend/render.py +6 -4
  5. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/agent_frontend/server.py +6 -2
  6. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/agent_frontend/testing.py +2 -2
  7. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/agent_frontend/tests/fakes.py +7 -0
  8. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/agent_frontend/tests/test_frontend.py +39 -0
  9. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/agent_frontend/tools.py +41 -1
  10. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/api/graph_api.py +6 -0
  11. graphcore_kernel-0.2.2/graphcore/api/tests/test_strategy_tokens.py +144 -0
  12. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/auth/authn/README.md +54 -4
  13. graphcore_kernel-0.2.2/graphcore/auth/authn/strategy_tokens.py +38 -0
  14. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/docs/AGENT_FRONTEND_TDD.md +18 -0
  15. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/docs/AUTHORIZATION_TECHNICAL_TDD.md +15 -12
  16. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/execution/tests/support.py +14 -1
  17. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/testing/case.py +24 -2
  18. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/transport/agent_asgi.py +10 -1
  19. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/transport/agent_client.py +15 -3
  20. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/transport/tests/test_api_views.py +34 -0
  21. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/transport/urls.py +1 -0
  22. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/transport/views.py +24 -3
  23. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/types/strategy.py +11 -0
  24. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2/graphcore_kernel.egg-info}/PKG-INFO +1 -1
  25. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore_kernel.egg-info/SOURCES.txt +2 -0
  26. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/pyproject.toml +1 -1
  27. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/LICENSE +0 -0
  28. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/NOTICE +0 -0
  29. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/README.md +0 -0
  30. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/__init__.py +0 -0
  31. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/agent_frontend/__init__.py +0 -0
  32. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/agent_frontend/base/__init__.py +0 -0
  33. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/agent_frontend/base/views.py +0 -0
  34. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/agent_frontend/context.py +0 -0
  35. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/agent_frontend/errors.py +0 -0
  36. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/agent_frontend/loading.py +0 -0
  37. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/agent_frontend/registry.py +0 -0
  38. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/agent_frontend/signatures.py +0 -0
  39. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/agent_frontend/tests/__init__.py +0 -0
  40. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/agent_frontend/tests/test_loading.py +0 -0
  41. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/agent_frontend/tests/test_server.py +0 -0
  42. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/api/__init__.py +0 -0
  43. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/api/predicate_codec.py +0 -0
  44. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/api/tests/__init__.py +0 -0
  45. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/api/tests/test_changed_entities.py +0 -0
  46. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/api/tests/test_graph_api.py +0 -0
  47. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/api/tests/test_graph_api_access.py +0 -0
  48. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/api/tests/test_graph_api_grants.py +0 -0
  49. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/api/tests/test_predicate_codec.py +0 -0
  50. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/api/tests/test_subtree_query.py +0 -0
  51. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/apps.py +0 -0
  52. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/auth/__init__.py +0 -0
  53. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/auth/authn/__init__.py +0 -0
  54. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/auth/authn/authenticator.py +0 -0
  55. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/auth/authn/onboarding.py +0 -0
  56. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/auth/authn/principals.py +0 -0
  57. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/auth/authn/resource_metadata.py +0 -0
  58. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/auth/authn/service_accounts.py +0 -0
  59. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/auth/authn/testing.py +0 -0
  60. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/auth/authn/tests/__init__.py +0 -0
  61. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/auth/authn/tests/test_authenticator.py +0 -0
  62. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/auth/authn/tests/test_onboarding.py +0 -0
  63. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/auth/authn/tests/test_service_accounts.py +0 -0
  64. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/auth/authn/users.py +0 -0
  65. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/auth/authz/__init__.py +0 -0
  66. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/auth/authz/access_port.py +0 -0
  67. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/auth/authz/adapter/__init__.py +0 -0
  68. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/auth/authz/adapter/default_access_adapter.py +0 -0
  69. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/auth/authz/adapter/tests/__init__.py +0 -0
  70. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/auth/authz/adapter/tests/test_default_adapter.py +0 -0
  71. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/auth/authz/adapter/tests/test_entity_write_hooks.py +0 -0
  72. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/auth/authz/adapter/tests/test_group_types.py +0 -0
  73. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/auth/authz/adapter/tests/test_sync_support.py +0 -0
  74. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/auth/authz/defaults.py +0 -0
  75. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/auth/authz/kernel_policy.py +0 -0
  76. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/auth/authz/kernel_writes.py +0 -0
  77. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/auth/authz/lookups.py +0 -0
  78. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/auth/authz/policy.py +0 -0
  79. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/auth/authz/tests/__init__.py +0 -0
  80. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/auth/authz/tests/test_can_contain.py +0 -0
  81. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/auth/authz/tests/test_contained_by.py +0 -0
  82. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/auth/authz/tests/test_creation.py +0 -0
  83. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/auth/authz/tests/test_delete_permission.py +0 -0
  84. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/auth/authz/tests/test_granted_to_me.py +0 -0
  85. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/auth/authz/tests/test_integration.py +0 -0
  86. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/auth/authz/tests/test_invites.py +0 -0
  87. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/auth/authz/tests/test_kernel_policy.py +0 -0
  88. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/auth/authz/tests/test_lockout.py +0 -0
  89. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/auth/authz/tests/test_policy.py +0 -0
  90. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/auth/authz/tests/test_primitives.py +0 -0
  91. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/auth/authz/tests/test_principal_creation.py +0 -0
  92. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/bootstrap/__init__.py +0 -0
  93. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/bootstrap/deployment.py +0 -0
  94. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/bootstrap/signals.py +0 -0
  95. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/bootstrap/tests/__init__.py +0 -0
  96. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/bootstrap/tests/test_deployment_seed.py +0 -0
  97. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/broadcast/__init__.py +0 -0
  98. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/broadcast/broadcaster.py +0 -0
  99. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/broadcast/channels.py +0 -0
  100. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/broadcast/tests/__init__.py +0 -0
  101. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/broadcast/tests/test_broadcaster.py +0 -0
  102. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/celery.py +0 -0
  103. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/docs/ARCHITECTURE_PRINCIPLES.md +0 -0
  104. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/docs/ENTITY_REFERENCE_TDD.md +0 -0
  105. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/docs/GRAPHAPI_FRONT_DOOR.md +0 -0
  106. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/docs/RUNTIME.md +0 -0
  107. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/docs/SCHEDULING_TDD.md +0 -0
  108. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/docs/STRATEGY_EXECUTION_TDD.md +0 -0
  109. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/docs/VIEW_ENTITY_TDD.md +0 -0
  110. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/docs/VIEW_SYSTEM_TDD.md +0 -0
  111. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/docs/__init__.py +0 -0
  112. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/docs/doc_topics.py +0 -0
  113. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/docs/docs_discovery.py +0 -0
  114. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/docs/public_api.py +0 -0
  115. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/domain/__init__.py +0 -0
  116. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/domain/entity/Entity.py +0 -0
  117. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/domain/entity/__init__.py +0 -0
  118. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/domain/entity/deployment/Deployment.py +0 -0
  119. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/domain/entity/deployment/__init__.py +0 -0
  120. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/domain/entity/grant/Grant.py +0 -0
  121. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/domain/entity/grant/__init__.py +0 -0
  122. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/domain/entity/group/Group.py +0 -0
  123. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/domain/entity/group/README.md +0 -0
  124. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/domain/entity/group/__init__.py +0 -0
  125. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/domain/entity/invite/Invite.py +0 -0
  126. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/domain/entity/invite/__init__.py +0 -0
  127. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/domain/entity/request_template/RequestTemplate.py +0 -0
  128. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/domain/entity/request_template/__init__.py +0 -0
  129. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/domain/entity/request_template/tests/__init__.py +0 -0
  130. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/domain/entity/request_template/tests/test_request_template.py +0 -0
  131. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/domain/entity/service_account/ServiceAccount.py +0 -0
  132. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/domain/entity/service_account/__init__.py +0 -0
  133. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/domain/entity/strategy_request/StrategyRequest.py +0 -0
  134. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/domain/entity/strategy_request/__init__.py +0 -0
  135. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/domain/entity/strategy_request/tests/__init__.py +0 -0
  136. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/domain/entity/strategy_request/tests/test_strategy_request_entity.py +0 -0
  137. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/domain/entity/tests/__init__.py +0 -0
  138. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/domain/entity/tests/test_entity.py +0 -0
  139. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/domain/entity/tests/test_grant_group_entities.py +0 -0
  140. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/domain/entity/tests/test_write_once_fields.py +0 -0
  141. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/domain/entity/user/User.py +0 -0
  142. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/domain/entity/user/__init__.py +0 -0
  143. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/domain/entity/user/tests/__init__.py +0 -0
  144. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/domain/entity/user/tests/test_user_entity.py +0 -0
  145. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/domain/entity/view/View.py +0 -0
  146. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/domain/entity/view/__init__.py +0 -0
  147. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/domain/entity/view/position.py +0 -0
  148. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/domain/entity/view/tests/__init__.py +0 -0
  149. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/domain/entity/view/tests/test_position.py +0 -0
  150. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/domain/entity/view/tests/test_view_entity.py +0 -0
  151. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/domain/strategy/BaseStrategy.py +0 -0
  152. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/domain/strategy/DeploymentStrategies.py +0 -0
  153. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/domain/strategy/GrantStrategies.py +0 -0
  154. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/domain/strategy/GroupStrategies.py +0 -0
  155. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/domain/strategy/InviteStrategies.py +0 -0
  156. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/domain/strategy/RequestTemplateStrategies.py +0 -0
  157. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/domain/strategy/ViewStrategies.py +0 -0
  158. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/domain/strategy/__init__.py +0 -0
  159. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/domain/strategy/runner.py +0 -0
  160. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/domain/strategy/session.py +0 -0
  161. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/domain/strategy/tests/BaseStrategyTest.py +0 -0
  162. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/domain/strategy/tests/__init__.py +0 -0
  163. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/domain/strategy/tests/test_BaseStrategies.py +0 -0
  164. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/domain/strategy/tests/test_grant_strategies.py +0 -0
  165. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/domain/strategy/tests/test_group_strategies.py +0 -0
  166. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/domain/strategy/tests/test_runner.py +0 -0
  167. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/domain/strategy/tests/test_strategy_locks.py +0 -0
  168. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/domain/strategy/tests/test_utils.py +0 -0
  169. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/domain/strategy/tests/test_view_strategies.py +0 -0
  170. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/errors.py +0 -0
  171. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/execution/README.md +0 -0
  172. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/execution/StrategyExecutorService.py +0 -0
  173. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/execution/__init__.py +0 -0
  174. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/execution/dispatcher.py +0 -0
  175. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/execution/environments/__init__.py +0 -0
  176. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/execution/environments/celery.py +0 -0
  177. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/execution/environments/in_process.py +0 -0
  178. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/execution/local_session.py +0 -0
  179. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/execution/redis_run_events.py +0 -0
  180. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/execution/requests.py +0 -0
  181. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/execution/run_events.py +0 -0
  182. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/execution/strategy_context.py +0 -0
  183. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/execution/tasks.py +0 -0
  184. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/execution/tests/__init__.py +0 -0
  185. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/execution/tests/contract.py +0 -0
  186. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/execution/tests/test_dispatchers.py +0 -0
  187. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/execution/tests/test_executor.py +0 -0
  188. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/execution/tests/test_local_session.py +0 -0
  189. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/execution/tests/test_reconcile_runs.py +0 -0
  190. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/execution/tests/test_run_events.py +0 -0
  191. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/execution/tests/test_strategy_context.py +0 -0
  192. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/gateway/__init__.py +0 -0
  193. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/gateway/remote.py +0 -0
  194. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/gateway/tests/__init__.py +0 -0
  195. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/gateway/tests/test_remote.py +0 -0
  196. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/graph/EntityService.py +0 -0
  197. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/graph/__init__.py +0 -0
  198. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/graph/entity_cache.py +0 -0
  199. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/graph/tests/__init__.py +0 -0
  200. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/graph/tests/test_EntityService.py +0 -0
  201. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/graph/tests/test_EntityService_list.py +0 -0
  202. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/graph/tests/test_EntityService_model_resolution.py +0 -0
  203. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/graph/tests/test_EntityService_referrers.py +0 -0
  204. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/graph/tests/test_EntityService_routing.py +0 -0
  205. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/graph/tests/test_dependent_on.py +0 -0
  206. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/graph/tests/test_engine_is_type_agnostic.py +0 -0
  207. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/graph/tests/test_engine_resolves_read_permission.py +0 -0
  208. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/graph/tests/test_entity_cache.py +0 -0
  209. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/graph/tests/test_null_entity_cache.py +0 -0
  210. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/management/__init__.py +0 -0
  211. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/management/commands/__init__.py +0 -0
  212. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/management/commands/dev_reset.py +0 -0
  213. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/management/commands/graphcore_createadmin.py +0 -0
  214. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/management/commands/graphcore_policy.py +0 -0
  215. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/management/commands/graphcore_status.py +0 -0
  216. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/management/tests/__init__.py +0 -0
  217. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/management/tests/test_createadmin.py +0 -0
  218. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/management/tests/test_policy_command.py +0 -0
  219. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/management/tests/test_status_command.py +0 -0
  220. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/migrations/0001_initial.py +0 -0
  221. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/migrations/0002_invite.py +0 -0
  222. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/migrations/__init__.py +0 -0
  223. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/models.py +0 -0
  224. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/persistence/ENTITY_REPOSITORY_TECHNICAL_TDD.md +0 -0
  225. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/persistence/__init__.py +0 -0
  226. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/persistence/django/__init__.py +0 -0
  227. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/persistence/django/backends.py +0 -0
  228. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/persistence/django/bindings.py +0 -0
  229. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/persistence/django/cache.py +0 -0
  230. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/persistence/django/compiler.py +0 -0
  231. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/persistence/django/identity.py +0 -0
  232. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/persistence/django/models.py +0 -0
  233. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/persistence/django/repository.py +0 -0
  234. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/persistence/django/tests/__init__.py +0 -0
  235. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/persistence/django/tests/test_backends.py +0 -0
  236. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/persistence/django/tests/test_compiler.py +0 -0
  237. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/persistence/django/tests/test_repository.py +0 -0
  238. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/persistence/django/tests/test_shared_column.py +0 -0
  239. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/persistence/django/tests/test_threads.py +0 -0
  240. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/persistence/django/tests/test_update_shape.py +0 -0
  241. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/persistence/django/threads.py +0 -0
  242. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/persistence/repository.py +0 -0
  243. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/persistence/tests/__init__.py +0 -0
  244. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/persistence/tests/contract.py +0 -0
  245. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/persistence/tests/evaluate.py +0 -0
  246. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/persistence/tests/fixtures.py +0 -0
  247. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/persistence/tests/memory.py +0 -0
  248. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/persistence/tests/test_memory_repository.py +0 -0
  249. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/persistence/tests/test_query_types.py +0 -0
  250. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/public/__init__.py +0 -0
  251. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/public/api.py +0 -0
  252. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/public/apps.py +0 -0
  253. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/public/auth/__init__.py +0 -0
  254. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/public/auth/grants.py +0 -0
  255. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/public/auth/onboarding.py +0 -0
  256. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/public/auth/perms.py +0 -0
  257. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/public/auth/policy.py +0 -0
  258. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/public/auth/roles.py +0 -0
  259. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/public/auth/subjects.py +0 -0
  260. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/public/entities/__init__.py +0 -0
  261. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/public/errors.py +0 -0
  262. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/public/persistence/__init__.py +0 -0
  263. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/public/persistence/django.py +0 -0
  264. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/public/scheduling.py +0 -0
  265. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/public/strategies/__init__.py +0 -0
  266. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/public/test_settings.py +0 -0
  267. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/public/testing.py +0 -0
  268. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/registry/EntityDirectory.py +0 -0
  269. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/registry/README.md +0 -0
  270. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/registry/StrategyDirectory.py +0 -0
  271. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/registry/TYPE_METADATA_PLACEMENT.md +0 -0
  272. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/registry/__init__.py +0 -0
  273. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/registry/app_discovery.py +0 -0
  274. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/registry/decorators.py +0 -0
  275. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/registry/discovery.py +0 -0
  276. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/registry/registry.py +0 -0
  277. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/registry/tests/__init__.py +0 -0
  278. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/registry/tests/test_agent_frontend_discovery.py +0 -0
  279. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/registry/tests/test_app_config.py +0 -0
  280. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/registry/tests/test_discovery.py +0 -0
  281. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/registry/tests/test_entity_directory_storage.py +0 -0
  282. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/registry/tests/test_import_package.py +0 -0
  283. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/registry/tests/test_principal_flag.py +0 -0
  284. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/registry/tests/test_strategy_directory.py +0 -0
  285. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/routes/__init__.py +0 -0
  286. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/routes/tests/__init__.py +0 -0
  287. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/routes/tests/test_routes.py +0 -0
  288. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/runtime.py +0 -0
  289. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/scheduling/__init__.py +0 -0
  290. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/scheduling/beat_scheduler.py +0 -0
  291. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/scheduling/beat_tasks.py +0 -0
  292. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/scheduling/scheduler.py +0 -0
  293. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/scheduling/tests/__init__.py +0 -0
  294. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/scheduling/tests/contract.py +0 -0
  295. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/scheduling/tests/memory.py +0 -0
  296. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/scheduling/tests/test_beat_scheduler.py +0 -0
  297. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/scheduling/tests/test_memory_scheduler.py +0 -0
  298. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/scheduling/tests/test_ticks.py +0 -0
  299. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/tasks.py +0 -0
  300. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/test_settings.py +0 -0
  301. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/testing/__init__.py +0 -0
  302. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/testing/runner.py +0 -0
  303. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/testing/settings.py +0 -0
  304. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/testing/tests/__init__.py +0 -0
  305. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/testing/tests/agent_view_fixture.py +0 -0
  306. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/testing/tests/test_case_and_runner.py +0 -0
  307. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/testing/tests/test_settings_for_apps.py +0 -0
  308. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/tests/__init__.py +0 -0
  309. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/tests/ids.py +0 -0
  310. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/tests/public_api_manifest.py +0 -0
  311. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/tests/runs.py +0 -0
  312. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/tests/test_app_discovery.py +0 -0
  313. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/tests/test_composition_boundaries.py +0 -0
  314. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/tests/test_docs_discovery.py +0 -0
  315. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/tests/test_no_print.py +0 -0
  316. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/tests/test_packaging.py +0 -0
  317. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/tests/test_public_api_boundaries.py +0 -0
  318. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/tests/test_public_api_contract.py +0 -0
  319. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/tests/test_public_api_docs.py +0 -0
  320. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/tests/test_runtime.py +0 -0
  321. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/tests/test_shared_type_boundaries.py +0 -0
  322. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/tests/test_shared_types.py +0 -0
  323. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/tests/test_test_settings.py +0 -0
  324. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/transport/__init__.py +0 -0
  325. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/transport/channel_layer.py +0 -0
  326. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/transport/consumers.py +0 -0
  327. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/transport/routing.py +0 -0
  328. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/transport/tests/__init__.py +0 -0
  329. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/transport/tests/test_agent_client.py +0 -0
  330. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/transport/tests/test_channel_layer.py +0 -0
  331. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/transport/tests/test_consumers.py +0 -0
  332. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/transport/tests/test_resource_metadata.py +0 -0
  333. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/types/__init__.py +0 -0
  334. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/types/access.py +0 -0
  335. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/types/api.py +0 -0
  336. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/types/entities.py +0 -0
  337. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/types/entity_id.py +0 -0
  338. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/types/execution.py +0 -0
  339. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/types/identity.py +0 -0
  340. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/types/onboarding.py +0 -0
  341. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/types/query.py +0 -0
  342. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/types/schedules.py +0 -0
  343. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/types/tests/__init__.py +0 -0
  344. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/types/tests/test_entity_id.py +0 -0
  345. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore/urls.py +0 -0
  346. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore_kernel.egg-info/dependency_links.txt +0 -0
  347. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore_kernel.egg-info/entry_points.txt +0 -0
  348. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore_kernel.egg-info/requires.txt +0 -0
  349. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/graphcore_kernel.egg-info/top_level.txt +0 -0
  350. {graphcore_kernel-0.2.0 → graphcore_kernel-0.2.2}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: graphcore-kernel
3
- Version: 0.2.0
3
+ Version: 0.2.2
4
4
  Summary: GraphCore platform kernel (entities, strategies, transport, auth)
5
5
  Author: GraphCore
6
6
  License-Expression: Apache-2.0
@@ -20,18 +20,21 @@ class ToolSpec:
20
20
  bind: Optional[str] = None
21
21
  schema: Optional[dict] = None
22
22
  fn: Optional[Callable] = None
23
+ from_shell: bool = False
23
24
 
24
25
 
25
26
  def strategy_tool(
26
27
  strategy: str, takes_target: bool = True, bind: Optional[str] = None,
27
- name: Optional[str] = None, description: Optional[str] = None,
28
+ name: Optional[str] = None, description: Optional[str] = None, from_shell: bool = False,
28
29
  ) -> ToolSpec:
29
30
  """A view tool that runs the registered strategy named `strategy`. The agent
30
31
  supplies its target; `takes_target=False` runs it untargeted, and `bind`
31
- fixes the target to an entity id."""
32
+ fixes the target to an entity id. With `from_shell`, calling it runs nothing:
33
+ it returns a strategy token the agent's shell runs the strategy with, for
34
+ params too large to pass through the conversation, such as a file's bytes."""
32
35
  return ToolSpec(
33
36
  name=name or _tool_name(strategy), description=description, strategy=strategy,
34
- takes_target=takes_target, bind=bind,
37
+ takes_target=takes_target, bind=bind, from_shell=from_shell,
35
38
  )
36
39
 
37
40
 
@@ -23,6 +23,9 @@ class GraphClient(Protocol):
23
23
  async def execute(
24
24
  self, principal: Principal, strategy_name: str, target_id: Optional[str], params: dict,
25
25
  ) -> dict: ...
26
+ async def issue_strategy_token(
27
+ self, principal: Principal, strategy_name: str, target_id: str,
28
+ ) -> tuple[str, float]: ...
26
29
  def resolve(self, address: str) -> dict: ...
27
30
  def routes(self) -> list[dict]: ...
28
31
  def entity_types(self) -> list[str]: ...
@@ -120,10 +120,12 @@ async def _tools(fe: Frontend, ctx: Context, view: AgentView, entity: Any) -> li
120
120
  }:
121
121
  continue
122
122
  strategy = info[spec.strategy]
123
- tool = ResolvedTool(
124
- spec.name, spec.description or _one_line(strategy.get('description')),
125
- strategy.get('schema') or {}, spec,
126
- )
123
+ if spec.from_shell:
124
+ description = f"A token to run this from your shell: {strategy.get('description')}"
125
+ schema = {'type': 'object', 'properties': {}}
126
+ else:
127
+ description, schema = strategy.get('description'), strategy.get('schema') or {}
128
+ tool = ResolvedTool(spec.name, spec.description or _one_line(description), schema, spec)
127
129
  resolved.setdefault(tool.name, tool)
128
130
  return list(resolved.values())
129
131
 
@@ -69,9 +69,11 @@ class _BearerAuth:
69
69
  def create_app(
70
70
  client: GraphClient, registry: AgentRegistry, path: str = '/mcp', allowed_origins: Sequence[str] = (),
71
71
  challenge: Callable[[dict], str] = lambda scope: 'Bearer', web_url: str = '',
72
+ execute_url: Callable[[dict], str] = lambda scope: '',
72
73
  ):
73
74
  """``challenge`` builds the 401's ``WWW-Authenticate`` value from the ASGI scope;
74
- ``web_url`` is the web app's URL, which every render then links to."""
75
+ ``web_url`` is the web app's URL, which every render then links to;
76
+ ``execute_url`` builds, from the ASGI scope, the URL a strategy token's requests go to."""
75
77
  fe = Frontend(client, registry, web_url=web_url)
76
78
  mcp = MCPServer('graphcore', instructions=INSTRUCTIONS + (WEB_INSTRUCTIONS if web_url else ''))
77
79
 
@@ -89,7 +91,9 @@ def create_app(
89
91
  seen_version: Optional[str] = None,
90
92
  ) -> Annotated[CallToolResult, str]:
91
93
  # Annotated with `str` so the output schema and structured content stay what a `-> str` tool's are.
92
- out = await _guard(tools.call)(fe, _principal(ctx), at, tool, params, seen_version)
94
+ out = await _guard(tools.call)(
95
+ fe, _principal(ctx), at, tool, params, seen_version, execute_url(ctx.request_context.request.scope),
96
+ )
93
97
  return CallToolResult(
94
98
  content=[
95
99
  TextContent(type='text', text=out.text),
@@ -40,7 +40,7 @@ async def open_place(fe: Frontend, principal: Principal, at: str) -> Place:
40
40
 
41
41
  async def call_tool(
42
42
  fe: Frontend, principal: Principal, at: str, tool: str, params: Optional[dict] = None,
43
- seen_version: Optional[str] = None,
43
+ seen_version: Optional[str] = None, execute_url: str = '',
44
44
  ) -> dict:
45
- out = await tools.call(fe, principal, to_address(at), tool, params, seen_version)
45
+ out = await tools.call(fe, principal, to_address(at), tool, params, seen_version, execute_url)
46
46
  return {**json.loads(out.text), 'images': list(out.images)}
@@ -44,6 +44,7 @@ class FakeGraphClient:
44
44
  self.by_type = {'t.Note': ['Rename'], 't.Folder': []}
45
45
  self.deployment = ['CreateNote']
46
46
  self.executed: list[tuple] = []
47
+ self.tokens: list[tuple] = []
47
48
  self.tombstones: set[str] = set()
48
49
  self.granted: set[str] = set()
49
50
  self.pages_listed = 0
@@ -96,6 +97,12 @@ class FakeGraphClient:
96
97
  e.version += 1
97
98
  return {'status': 'completed', 'ret_val': {'ok': True}}
98
99
 
100
+ async def issue_strategy_token(self, principal, strategy_name, target_id):
101
+ if target_id not in self.entities:
102
+ raise NotFound(target_id)
103
+ self.tokens.append((strategy_name, target_id))
104
+ return f'gcst.{strategy_name}', 1_800_000_000.0
105
+
99
106
  def resolve(self, address):
100
107
  if address in ('/', ''):
101
108
  return {'view_name': 'home', 'entity_id': None}
@@ -492,6 +492,45 @@ class ToolTests(unittest.TestCase):
492
492
  run(tools.call(fe, PRINCIPAL, '/e/b/2', 'rename_this', {'name': 'X'}))
493
493
  self.assertIn(('Rename', 'gc://b/2', {'name': 'X'}), self.client.executed)
494
494
 
495
+ def _attach_view(self):
496
+ self.client.strategies['Attach'] = {
497
+ 'description': 'Attach a file',
498
+ 'schema': {'type': 'object', 'properties': {
499
+ 'data': {'type': 'string'}, 'name': {'type': 'string'}, 'note': {'type': 'string'}}, 'required': ['data']}}
500
+ self.client.by_type['t.Note'].append('Attach')
501
+
502
+ async def attach(ctx, entity):
503
+ return [strategy_tool('Attach', bind=entity.entity_id, name='attach_files', from_shell=True)]
504
+
505
+ @agent_view('x.attach', default_for=['t.Note'], tools=attach)
506
+ async def v(ctx, entity):
507
+ return []
508
+ reg = load_registry([])
509
+ reg.add(view_of(v))
510
+ return Frontend(self.client, reg)
511
+
512
+ def test_a_from_shell_tool_is_listed_without_params(self):
513
+ r = run(render(self._attach_view(), PRINCIPAL, '/e/b/2'))
514
+ self.assertEqual(r.tools[0].signature, 'attach_files() — A token to run this from your shell: Attach a file')
515
+
516
+ def test_calling_a_from_shell_tool_returns_a_token_and_runs_nothing(self):
517
+ url = 'https://h/graphcore/api/execute_strategy_req/'
518
+ out = json.loads(run(tools.call(self._attach_view(), PRINCIPAL, '/e/b/2', 'attach_files', {}, execute_url=url)).text)
519
+ result = out['result']
520
+ self.assertEqual((result['url'], result['token']), (url, 'gcst.Attach'))
521
+ self.assertEqual(result['request'], {'await_response': True, 'strategy': {
522
+ 'strategy_name': 'Attach', 'target_entity_id': 'gc://b/2', 'param_config': {}}})
523
+ self.assertEqual(result['schema'], self.client.strategies['Attach']['schema'])
524
+ self.assertIn("Bearer gcst.Attach", result['how'])
525
+ self.assertEqual(self.client.tokens, [('Attach', 'gc://b/2')])
526
+ self.assertEqual(self.client.executed, [])
527
+
528
+ def test_a_token_needs_somewhere_to_send_files(self):
529
+ with self.assertRaises(AgentError) as cm:
530
+ run(tools.call(self._attach_view(), PRINCIPAL, '/e/b/2', 'attach_files', {}))
531
+ self.assertEqual(cm.exception.code, 'Unavailable')
532
+ self.assertEqual(self.client.tokens, [])
533
+
495
534
  def test_find_short_type_and_predicate(self):
496
535
  out = run(tools.find(self.fe, PRINCIPAL, 'Note', {'title': 'Hello'}))
497
536
  self.assertIn('Hello · t.Note · /e/b/2', out)
@@ -3,6 +3,7 @@ from __future__ import annotations
3
3
 
4
4
  import json
5
5
  from dataclasses import dataclass
6
+ from datetime import datetime, timezone
6
7
  from typing import Any, Optional
7
8
 
8
9
  import jsonschema
@@ -85,10 +86,43 @@ async def _target_id(fe: Frontend, target: str) -> str:
85
86
  return target
86
87
 
87
88
 
89
+ async def _strategy_token(
90
+ fe: Frontend, principal: Principal, strategy: str, target: Optional[str], execute_url: str,
91
+ ) -> dict:
92
+ """A strategy token for `strategy` on `target`, and how a shell runs the strategy with it."""
93
+ if not execute_url:
94
+ raise AgentError('Unavailable', "This deployment serves no HTTP API to run strategies from a shell")
95
+ if target is None:
96
+ raise AgentError('InvalidRequest', f"A strategy token runs {strategy} on a target")
97
+ try:
98
+ token, expires_at = await fe.client.issue_strategy_token(principal, strategy, target)
99
+ except InvalidRequest as exc:
100
+ raise AgentError('InvalidRequest', str(exc))
101
+ expires = datetime.fromtimestamp(expires_at, timezone.utc).isoformat(timespec='seconds')
102
+ return {
103
+ 'url': execute_url,
104
+ 'token': token,
105
+ 'expires_at': expires,
106
+ 'request': {'await_response': True, 'strategy': {
107
+ 'strategy_name': strategy, 'target_entity_id': target, 'param_config': {}}},
108
+ 'schema': fe.client.strategy_info()[strategy].get('schema') or {},
109
+ 'how': (
110
+ f"From your shell, build `request` with `param_config` as `schema` describes, reading any file it "
111
+ f"takes from disk there, and POST it as JSON to `url` with the header `Authorization: Bearer <token>`, "
112
+ f"once per run: `curl -sS -H 'Authorization: Bearer {token}' -H 'Content-Type: application/json' "
113
+ f"--data-binary @request.json '{execute_url}'`. Files go from disk to the deployment, never through "
114
+ f"this conversation. The token runs only {strategy} on {target} and expires at {expires}; call this "
115
+ f"tool again for a new one."
116
+ ),
117
+ }
118
+
119
+
88
120
  async def call(
89
121
  fe: Frontend, principal: Principal, at: str, tool: str, params: Optional[dict] = None,
90
- seen_version: Optional[str] = None,
122
+ seen_version: Optional[str] = None, execute_url: str = '',
91
123
  ) -> CallResult:
124
+ """`execute_url` is where a shell sends a strategy token's requests: the
125
+ deployment's `execute_strategy_req` as the caller reaches it."""
92
126
  params = params or {}
93
127
  rendered = await render(fe, principal, at)
94
128
  if seen_version is not None and seen_version != rendered.version:
@@ -114,6 +148,12 @@ async def call(
114
148
  result = _take_images(await chosen.spec.fn(ctx, **params), images)
115
149
  else:
116
150
  target = await _target_id(fe, params['target']) if chosen.takes_target else chosen.spec.bind
151
+ if chosen.spec.from_shell:
152
+ result = await _strategy_token(fe, principal, chosen.spec.strategy, target, execute_url)
153
+ return CallResult(_json({
154
+ 'ok': True, 'tool': chosen.name, 'result': result, 'address': rendered.address,
155
+ 'version': rendered.version, 'note': "nothing ran yet; run it from your shell as `how` says",
156
+ }))
117
157
  ctx = Context(principal, rendered.address, rendered.entity, fe.client, Reads(), fe.registry, fe.query_max, fe.web_url)
118
158
  result = await ctx.execute(chosen.spec.strategy, target, _strategy_params(chosen, params))
119
159
  except NotFound as exc:
@@ -25,6 +25,7 @@ from graphcore.errors import (
25
25
  )
26
26
  from graphcore.types.identity import Principal
27
27
  from graphcore.types.api import AccessSummary, StrategyOutcome, StrategyRequestPayload
28
+ from graphcore.types.strategy import StrategyScope
28
29
  from graphcore.types.entities import EntityFilter, EntityPage, EntityResult, Tombstone, view_etag
29
30
  from graphcore.domain.entity.Entity import Entity
30
31
  from graphcore.domain.entity.group.Group import Group
@@ -107,11 +108,16 @@ class GraphAPI:
107
108
  payloads: list[StrategyRequestPayload],
108
109
  wait: bool = False,
109
110
  callback_channel: Optional[str] = None,
111
+ scope: Optional[StrategyScope] = None,
110
112
  ) -> list[StrategyOutcome]:
113
+ """With `scope`, the caller may run only what it covers: a payload
114
+ outside it refuses the whole batch."""
111
115
  if len(payloads) == 0:
112
116
  raise InvalidRequest('strategy list cannot be empty')
113
117
  if len(payloads) > self.max_batch_size:
114
118
  raise InvalidRequest(f'strategy list exceeds the maximum of {self.max_batch_size}')
119
+ if scope is not None and not all(payload.within(scope) for payload in payloads):
120
+ raise Forbidden(f"This caller may run only {scope.strategy_name} on {scope.target_entity_id}")
115
121
 
116
122
  outcomes: list[StrategyOutcome] = []
117
123
  for payload in payloads:
@@ -0,0 +1,144 @@
1
+ """Strategy tokens and scopes: a token reads as its principal and a
2
+ `StrategyScope`, `execute_strategies` runs only what the scope covers, as
3
+ that principal with its access at run time, and only `execute_strategy_req`
4
+ accepts a token."""
5
+ import json
6
+ import time
7
+ from unittest.mock import patch
8
+
9
+ from django.core import signing
10
+ from django.test import SimpleTestCase
11
+
12
+ from graphcore.auth.authn import strategy_tokens
13
+ from graphcore.errors import Forbidden, InvalidRequest, NotFound
14
+ from graphcore.execution.tests.support import ExecutionTestCase
15
+ from graphcore.transport import views
16
+ from graphcore.transport.agent_client import InProcessGraphClient
17
+ from graphcore.transport.tests.test_api_views import MockRequest
18
+ from graphcore.types.api import StrategyRequestPayload
19
+ from graphcore.types.identity import Principal
20
+ from graphcore.types.strategy import StrategyScope
21
+
22
+ ALICE = Principal('gc://u/alice')
23
+ SCOPE = StrategyScope('Attach', 'gc://b/probe')
24
+
25
+
26
+ class StrategyTokenTests(SimpleTestCase):
27
+ def test_a_token_reads_back_as_its_principal_and_scope_until_it_expires(self):
28
+ token, expires_at = strategy_tokens.issue(ALICE, SCOPE)
29
+ self.assertTrue(token.startswith('gcst.'))
30
+ self.assertAlmostEqual(expires_at, time.time() + strategy_tokens.LIFETIME_SECONDS, delta=5)
31
+ self.assertEqual(strategy_tokens.read(token), (ALICE, SCOPE))
32
+ with patch('time.time', return_value=time.time() + strategy_tokens.LIFETIME_SECONDS + 1):
33
+ self.assertIsNone(strategy_tokens.read(token))
34
+
35
+ def test_anything_else_reads_as_none(self):
36
+ token, _ = strategy_tokens.issue(ALICE, SCOPE)
37
+ forged = 'gcst.' + signing.dumps({'p': 'gc://u/mallory', 's': 'Attach', 't': 'gc://b/probe'}, salt='other')
38
+ for other in (None, '', token[:-2] + ('AA' if token[-2:] != 'AA' else 'BB'), forged, token[5:], 'eyJhbGciOi.x.y'):
39
+ self.assertIsNone(strategy_tokens.read(other), other)
40
+
41
+
42
+ class StrategyScopeTests(ExecutionTestCase):
43
+ def payload(self, strategy='Attach', target=None, **extra) -> StrategyRequestPayload:
44
+ return StrategyRequestPayload(
45
+ strategy_name=strategy, target_entity_id=target or self.probe.entity_id,
46
+ param_config={'data': 'aGk=', 'name': 'hi.jpg'}, **extra,
47
+ )
48
+
49
+ def scope(self) -> StrategyScope:
50
+ return StrategyScope('Attach', self.probe.entity_id)
51
+
52
+ async def test_a_scoped_caller_runs_what_its_scope_covers(self):
53
+ await self.seed()
54
+ [outcome] = await self.runtime.graph_api.execute_strategies(
55
+ self.alice, [self.payload()], wait=True, scope=self.scope(),
56
+ )
57
+ self.assertEqual((outcome.status, outcome.ret_val), ('succeeded', {'bytes': 4}))
58
+ request = await self.load(outcome.strategy_request_id)
59
+ self.assertEqual(request.owner, self.alice.principal_entity_id)
60
+ self.assertEqual(request.param_config['data'], {'redacted': True, 'bytes': 4})
61
+ self.assertEqual((await self.load(self.probe.entity_id)).get_attribute('attached'), 'hi.jpg')
62
+
63
+ async def test_a_scoped_caller_runs_nothing_else(self):
64
+ await self.seed()
65
+ scope, other = self.scope(), await self.make_probe(self.alice)
66
+ callback = {'strategy_name': 'Increment', 'target_entity_id': self.probe.entity_id}
67
+ for payload in (
68
+ self.payload('Increment'), self.payload(target=other.entity_id), self.payload(callbacks=[callback]),
69
+ ):
70
+ with self.assertRaises(Forbidden):
71
+ await self.runtime.graph_api.execute_strategies(
72
+ self.alice, [self.payload(), payload], wait=True, scope=scope,
73
+ )
74
+ self.assertEqual(await self.requests(), [])
75
+
76
+ async def test_a_token_runs_with_its_principals_access_at_run_time(self):
77
+ await self.seed()
78
+ api = self.runtime.graph_api
79
+ await api.grant(self.alice, self.probe.entity_id, self.bob.principal_entity_id, 'editor')
80
+ token, _ = await InProcessGraphClient(api).issue_strategy_token(self.bob, 'Attach', self.probe.entity_id)
81
+ principal, scope = strategy_tokens.read(token)
82
+ [granted] = await api.execute_strategies(principal, [self.payload()], wait=True, scope=scope)
83
+ await api.revoke(self.alice, self.probe.entity_id, self.bob.principal_entity_id)
84
+ [revoked] = await api.execute_strategies(principal, [self.payload()], wait=True, scope=scope)
85
+ self.assertEqual(granted.status, 'succeeded')
86
+ self.assertEqual((revoked.status, revoked.error_code), ('failed', 'forbidden'))
87
+
88
+
89
+ class IssueStrategyTokenTests(ExecutionTestCase):
90
+ async def test_a_token_is_for_a_strategy_that_runs_on_the_target(self):
91
+ await self.seed()
92
+ client = InProcessGraphClient(self.runtime.graph_api)
93
+ for strategy in ('Untargeted', 'Nope'):
94
+ with self.assertRaises(InvalidRequest):
95
+ await client.issue_strategy_token(self.alice, strategy, self.probe.entity_id)
96
+
97
+ async def test_no_token_for_a_target_the_principal_cannot_read(self):
98
+ await self.seed()
99
+ with self.assertRaises(NotFound):
100
+ await InProcessGraphClient(self.runtime.graph_api).issue_strategy_token(
101
+ self.bob, 'Attach', self.probe.entity_id,
102
+ )
103
+
104
+
105
+ class ExecuteWithStrategyTokenViewTests(ExecutionTestCase):
106
+ def setUp(self):
107
+ super().setUp()
108
+ patcher = patch('graphcore.transport.views.get_runtime', return_value=self.runtime)
109
+ patcher.start()
110
+ self.addCleanup(patcher.stop)
111
+
112
+ async def token(self) -> str:
113
+ token, _ = strategy_tokens.issue(self.alice, StrategyScope('Attach', self.probe.entity_id))
114
+ return token
115
+
116
+ async def post(self, token: str, strategy: str = 'Attach'):
117
+ body = {'await_response': True, 'strategy': {
118
+ 'strategy_name': strategy, 'target_entity_id': self.probe.entity_id,
119
+ 'param_config': {'data': 'aGk=', 'name': 'hi.jpg'}}}
120
+ request = MockRequest(body=json.dumps(body).encode(), headers={'Authorization': f'Bearer {token}'})
121
+ response = await views.api_execute_strategy_req(request)
122
+ return response.status_code, json.loads(response.content)
123
+
124
+ async def test_the_endpoint_runs_what_the_token_covers(self):
125
+ await self.seed()
126
+ status, data = await self.post(await self.token())
127
+ self.assertEqual((status, data['results'][0]['status']), (200, 'succeeded'))
128
+
129
+ async def test_the_endpoint_refuses_what_the_token_does_not_cover(self):
130
+ await self.seed()
131
+ status, _ = await self.post(await self.token(), 'Increment')
132
+ self.assertEqual(status, 403)
133
+ self.assertEqual(await self.requests(), [])
134
+
135
+ async def test_an_invalid_token_is_unauthenticated(self):
136
+ await self.seed()
137
+ status, _ = await self.post('gcst.not-a-token')
138
+ self.assertEqual(status, 401)
139
+
140
+ async def test_no_other_endpoint_accepts_a_strategy_token(self):
141
+ await self.seed()
142
+ request = MockRequest(method='GET', headers={'Authorization': f'Bearer {await self.token()}'})
143
+ response = await views.api_get_entity(request, self.probe.entity_id)
144
+ self.assertEqual(response.status_code, 401)
@@ -3,8 +3,9 @@
3
3
  How a request becomes a principal. The kernel is an OAuth 2.0 resource
4
4
  server and nothing more: it verifies bearer tokens issued by an OIDC
5
5
  provider it is configured to trust, and maps each token's subject to a
6
- `User` of this deployment. It issues no tokens, keeps no passwords,
7
- shows no login page, and never writes to the issuer. Which issuer a
6
+ `User` of this deployment. It issues no OAuth tokens, keeps no passwords,
7
+ shows no login page, and never writes to the issuer. The one credential it
8
+ signs itself is a strategy token, good for one strategy on one target. Which issuer a
8
9
  deployment trusts, and how that issuer is run, is deployment configuration;
9
10
  the defaults the distro provides are described in
10
11
  `graphcore docs distro/identity-infrastructure`.
@@ -23,6 +24,7 @@ Authorization, what a principal may do, is a separate subsystem:
23
24
  | Trusted issuer | One entry of `GRAPHCORE_TRUSTED_ISSUERS`: an issuer this deployment accepts tokens from, with the audience it requires. |
24
25
  | Protected resource metadata | RFC 9728: the document at `/.well-known/oauth-protected-resource` naming this deployment's trusted issuers. |
25
26
  | Service account | A process an app ships, signing in with a confidential client the app declares (`graphcore_service_clients`). Its principal is a `ServiceAccount`. |
27
+ | Strategy token | A short-lived token the deployment signs, running one strategy on one target as the principal who asked for it. |
26
28
  | First contact | The first authenticated request from an `(iss, sub)` this deployment has not seen. It creates the `User`, or binds the `ServiceAccount` of a declared client. |
27
29
 
28
30
  ## Configuration
@@ -32,6 +34,7 @@ GRAPHCORE_TRUSTED_ISSUERS = [{
32
34
  'issuer': 'https://id.example.com/realms/notes', # public URL; matched against `iss`
33
35
  'audience': 'notes', # required in `aud`
34
36
  'internal_url': 'http://keycloak:8080/realms/notes', # optional: where this process fetches discovery and keys
37
+ 'web_client_id': 'notes-web', # optional: the public client the web frontend signs in as
35
38
  }]
36
39
  GRAPHCORE_PUBLIC_URL = 'https://notes.example.com' # optional: this deployment's origin behind a proxy
37
40
  ```
@@ -43,6 +46,9 @@ GRAPHCORE_PUBLIC_URL = 'https://notes.example.com' # optional: this deplo
43
46
  - `internal_url` changes only where discovery and the JWKS are fetched.
44
47
  `iss` is always matched against the public `issuer`, and a `jwks_uri`
45
48
  under the public URL is rewritten onto the internal one.
49
+ - `web_client_id` (default `graphcore-web`) and the first entry's `issuer`
50
+ are what `GET /graphcore/api/auth/client/` returns, unauthenticated. The
51
+ web frontend signs in with them, so its build names no issuer or client.
46
52
  - Nothing names a provider. Any issuer that publishes OIDC discovery and
47
53
  signs with RS256 works.
48
54
 
@@ -138,6 +144,48 @@ Clients start from this document, never from a configured issuer URL:
138
144
  | `graphcore` CLI | Device authorization grant (RFC 8628); refresh token kept in the deployment's session file |
139
145
  | MCP host | 401 → resource metadata → issuer metadata → dynamic client registration (RFC 7591) → code + PKCE |
140
146
 
147
+ ## Strategy tokens
148
+
149
+ A strategy token lets a shell run a strategy without holding the
150
+ principal's own token. An agent connected over MCP has a shell that can
151
+ read the user's files, but the MCP host holds the user's token, and the
152
+ model never sees it. Sending a file through a tool call would mean writing
153
+ its bytes out as text. So the agent asks for a strategy token, and its
154
+ shell posts each request, with the file's bytes in its params, to
155
+ `execute_strategy_req` with it.
156
+
157
+ ```
158
+ strategy_tokens.issue(principal, StrategyScope(strategy_name, target_id)) -> (token, expires_at)
159
+ strategy_tokens.read(token) -> (principal, scope) | None
160
+ POST /graphcore/api/execute_strategy_req/ Authorization: Bearer gcst.…
161
+ ```
162
+
163
+ Like an issuer token, a strategy token stops at the edge: reading one gives
164
+ a principal and a `StrategyScope` (`graphcore.types.strategy`), and the
165
+ kernel sees only those. `GraphAPI.execute_strategies(..., scope=)` runs a
166
+ batch only when every request is within the scope.
167
+
168
+ - An agent gets one by calling a view's `from_shell` tool
169
+ (`graphcore docs distro/agent-views`), for the tool's strategy on a
170
+ target the principal can read and the strategy runs on.
171
+ - The token is `gcst.` followed by `{principal, strategy, target}` signed
172
+ with `SECRET_KEY` (`django.core.signing`). It expires 15 minutes after it
173
+ is issued, and is stored nowhere, so it cannot be revoked before then;
174
+ rotating `SECRET_KEY` invalidates every one.
175
+ - `execute_strategy_req` is the only endpoint that reads one, and it
176
+ passes the scope to `execute_strategies`. Every other endpoint, the MCP
177
+ endpoint and the WebSocket authenticate through `authenticate()`, which
178
+ accepts only issuer tokens, so a strategy token is unauthenticated there.
179
+ A new endpoint accepts none unless it reads one itself.
180
+ - Each request in the batch must be the scope's strategy on its target,
181
+ with no callbacks, or the whole batch is refused with a 403.
182
+ - The requests run as the principal, with that principal's access when
183
+ they run: a principal who loses access to the target can no longer use
184
+ a token issued before. The principal has no live issuer token then, as
185
+ for a scheduled request, so the strategy cannot make delegated calls.
186
+ - Within its lifetime a token runs any number of requests; the strategy's
187
+ own limits (such as a maximum number of photos) bound what it can do.
188
+
141
189
  ## What the kernel requires of an issuer
142
190
 
143
191
  - OIDC discovery and an RS256 JWKS.
@@ -165,8 +213,10 @@ Clients start from this document, never from a configured issuer URL:
165
213
  `graphcore createadmin`) and only seeding or first contact creates a
166
214
  `ServiceAccount`. No strategy creates or changes either.
167
215
  - A `ServiceAccount` is never onboarded.
168
- - The kernel verifies and maps. It never issues a token, exchanges one on
169
- its own initiative, or writes to an issuer.
216
+ - The kernel verifies and maps issuer tokens. It never issues an OAuth
217
+ token, exchanges one on its own initiative, or writes to an issuer.
218
+ - A strategy token runs one strategy on one target, as its principal, at
219
+ `execute_strategy_req` only.
170
220
  - Authentication decides who; authorization decides what. A valid token
171
221
  grants nothing by itself.
172
222
 
@@ -0,0 +1,38 @@
1
+ """Strategy tokens: short-lived bearer tokens, signed by the deployment, that
2
+ run one strategy on one target as the principal who asked for one. A shell
3
+ runs the strategy with one, sending params too large for a conversation, such
4
+ as a file's bytes, while the principal's own token never leaves its client.
5
+ Reading one gives its principal and its `StrategyScope`; the kernel sees only
6
+ those. See README.md (Strategy tokens)."""
7
+ from __future__ import annotations
8
+
9
+ import time
10
+ from typing import Optional
11
+
12
+ from django.core import signing
13
+
14
+ from graphcore.types.identity import Principal
15
+ from graphcore.types.strategy import StrategyScope
16
+
17
+ PREFIX = 'gcst.'
18
+ LIFETIME_SECONDS = 15 * 60
19
+ _SALT = 'graphcore.auth.strategy-token'
20
+
21
+
22
+ def issue(principal: Principal, scope: StrategyScope) -> tuple[str, float]:
23
+ """The token for `principal` within `scope`, and when it expires."""
24
+ signed = signing.dumps(
25
+ {'p': principal.principal_entity_id, 's': scope.strategy_name, 't': scope.target_entity_id}, salt=_SALT,
26
+ )
27
+ return PREFIX + signed, time.time() + LIFETIME_SECONDS
28
+
29
+
30
+ def read(token: Optional[str]) -> Optional[tuple[Principal, StrategyScope]]:
31
+ """The principal and scope of a valid, unexpired strategy token; None for anything else."""
32
+ if not token or not token.startswith(PREFIX):
33
+ return None
34
+ try:
35
+ data = signing.loads(token[len(PREFIX):], salt=_SALT, max_age=LIFETIME_SECONDS)
36
+ except signing.BadSignature:
37
+ return None
38
+ return Principal(principal_entity_id=data['p']), StrategyScope(data['s'], data['t'])
@@ -328,6 +328,24 @@ Its schema is the strategy's request schema from the registry, with
328
328
  signature; a parameter that is not a scalar shows as `json`, and the full
329
329
  schema is returned in the error when `call` rejects the parameters.
330
330
 
331
+ A strategy tool declared with **`from_shell=True`** is run from the
332
+ agent's shell, for params too large to pass through the conversation,
333
+ such as a file's bytes: the model would have to write them out as text.
334
+ It takes no parameters but `target`, and `call` runs nothing. It returns:
335
+
336
+ | Field | Holds |
337
+ |---|---|
338
+ | `token` | A strategy token for the strategy on the target, as the user (`auth/authn/README.md`, Strategy tokens) |
339
+ | `url` | `execute_strategy_req` at the origin the agent reached `/mcp` on (`GRAPHCORE_PUBLIC_URL` when set) |
340
+ | `expires_at` | When the token expires; calling the tool again issues another |
341
+ | `request` | The request to POST, with the strategy and target set and `param_config` empty |
342
+ | `schema` | The strategy's request schema, which `param_config` follows |
343
+ | `how` | Building the request in the shell and posting it with the token, with an example `curl` |
344
+
345
+ The agent's shell then builds each request, reading any file from disk,
346
+ and posts it, so the file goes from disk to the deployment without passing
347
+ through the conversation.
348
+
331
349
  An **operation** is a function decorated with `@operation`, taking `ctx`
332
350
  and its parameters and declaring its request schema. It performs reads and
333
351
  strategy executions through `ctx`, each checked as the user; it has no
@@ -1151,18 +1151,21 @@ used up, so an invite never downgrades anyone. Every refusal is the same
1151
1151
  the kernel frontend). The token travels in the fragment, so it never
1152
1152
  reaches a server log or a `Referer` header.
1153
1153
 
1154
- **Sign-in and registration.** The kernel frontend's `InviteRoute`, mounted
1155
- at `INVITE_ROUTE` outside any sign-in gate (`GraphCoreApp` does this),
1156
- redeems as soon as a principal is signed in and hands the result to the
1157
- application's `onRedeemed(invite)`, by default opening the resource's
1158
- entity page. Signed out, it starts the ordinary OIDC sign-in, whose
1159
- `returnTo` state carries the full URL, fragment included, back to the route.
1160
- If the issuer's discovery document lists `create` in
1161
- `prompt_values_supported` (OIDC Initiating User Registration), the route
1162
- offers a separate "Create account" that sends `prompt=create`; otherwise it
1163
- offers one "Continue", and the person registers from the issuer's own login
1164
- page. Redemption is the same step for a new and an existing account, and
1165
- nothing about it depends on the identity provider beyond standard OIDC.
1154
+ **Sign-in and registration.** An invite link has no sign-in screen of its
1155
+ own. The kernel frontend's `InviteRoute` is mounted at `INVITE_ROUTE`
1156
+ behind the application's sign-in screen, like any signed-in page
1157
+ (`GraphCoreApp` does this). Signed out, the person sees that screen, which
1158
+ `usePendingInvite()` lets say they were invited; its ordinary OIDC sign-in
1159
+ carries the full URL, fragment included, in its `returnTo` state, so the
1160
+ person comes back to the link signed in. `InviteRoute` then redeems and
1161
+ hands the result to the application's `onRedeemed(invite)`, by default
1162
+ opening the resource's entity page. "Create account" sends `prompt=create`
1163
+ (OIDC Initiating User Registration); a sign-in screen offers it only when
1164
+ the issuer's discovery document lists `create` in `prompt_values_supported`
1165
+ (`useOffersRegistration()`), and otherwise the person registers from the
1166
+ issuer's own login page. Redemption is the same step for a new and an
1167
+ existing account, and nothing about it depends on the identity provider
1168
+ beyond standard OIDC.
1166
1169
 
1167
1170
  Invites always redeem into a grant to a principal. Access without an
1168
1171
  account would need a capability subject on the adapter's read path; see
@@ -135,6 +135,19 @@ class CpuUpload(Upload):
135
135
  workload = Workload.CPU
136
136
 
137
137
 
138
+ class Attach(_ProbeStrategy):
139
+ """Takes a file's bytes, as a strategy token's shell sends them."""
140
+ transient_params = frozenset({'data'})
141
+ param_schema = {'type': 'object', 'properties': {
142
+ 'data': {'type': 'string'}, 'name': {'type': 'string'}, 'note': {'type': 'string'}}, 'required': ['data']}
143
+
144
+ async def apply(self):
145
+ params = self.strategy_request.param_config
146
+ self.entity.set_attribute('attached', params.get('name'))
147
+ self.strategy_request.ret_val = {'bytes': len(params['data'])}
148
+ return self.strategy_request, self.entity
149
+
150
+
138
151
  class NotExecutable(_ProbeStrategy):
139
152
  def verify_executable(self):
140
153
  raise ValueError('probe is not ready')
@@ -209,7 +222,7 @@ class Untargeted(Strategy):
209
222
 
210
223
  PROBE_STRATEGIES = (
211
224
  Increment, CpuIncrement, Fail, CpuFail, Refuse, CpuRefuse, NoChange, ReadOnly, ConflictOnce, AlwaysConflict,
212
- Validated, NotExecutable, Record, Upload, CpuUpload, Nested, CpuNested, WriteOther, SeeContext,
225
+ Validated, NotExecutable, Record, Upload, CpuUpload, Attach, Nested, CpuNested, WriteOther, SeeContext,
213
226
  )
214
227
 
215
228
  TEST_REGISTRY.entities.register_entity(_Probe, app_label='graphcore')