ctx-sdk 2.0.2__tar.gz → 2.0.3__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 (193) hide show
  1. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/PKG-INFO +1 -1
  2. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/pyproject.toml +1 -1
  3. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/src/ctx/ai/oauth/dynamic.py +8 -4
  4. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/src/ctx/core/README.md +1 -1
  5. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/src/ctx/core/paths.py +7 -8
  6. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/src/ctx/core/version.py +1 -1
  7. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/tests/test_api_key_resolution.py +22 -0
  8. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/.gitignore +0 -0
  9. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/CHANGELOG.md +0 -0
  10. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/README.md +0 -0
  11. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/src/ctx/__init__.py +0 -0
  12. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/src/ctx/agent/README.md +0 -0
  13. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/src/ctx/agent/__init__.py +0 -0
  14. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/src/ctx/agent/agent_runner.py +0 -0
  15. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/src/ctx/agent/agents/__init__.py +0 -0
  16. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/src/ctx/agent/agents/activate.py +0 -0
  17. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/src/ctx/agent/agents/api.py +0 -0
  18. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/src/ctx/agent/agents/discovery.py +0 -0
  19. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/src/ctx/agent/agents/loader.py +0 -0
  20. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/src/ctx/agent/agents/registry.py +0 -0
  21. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/src/ctx/agent/agents/schema.py +0 -0
  22. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/src/ctx/agent/async_utils.py +0 -0
  23. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/src/ctx/agent/background.py +0 -0
  24. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/src/ctx/agent/commands.py +0 -0
  25. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/src/ctx/agent/compaction_check.py +0 -0
  26. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/src/ctx/agent/context/__init__.py +0 -0
  27. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/src/ctx/agent/context/_xml.py +0 -0
  28. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/src/ctx/agent/context/agent_mds.py +0 -0
  29. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/src/ctx/agent/context/git.py +0 -0
  30. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/src/ctx/agent/context/loader.py +0 -0
  31. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/src/ctx/agent/context/skills.py +0 -0
  32. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/src/ctx/agent/context_governance.py +0 -0
  33. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/src/ctx/agent/dispatcher.py +0 -0
  34. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/src/ctx/agent/hooks/__init__.py +0 -0
  35. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/src/ctx/agent/hooks/agent_hook.py +0 -0
  36. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/src/ctx/agent/hooks/bridge.py +0 -0
  37. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/src/ctx/agent/hooks/loader.py +0 -0
  38. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/src/ctx/agent/hooks/registry.py +0 -0
  39. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/src/ctx/agent/hooks/runtime.py +0 -0
  40. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/src/ctx/agent/hooks/types.py +0 -0
  41. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/src/ctx/agent/inbox.py +0 -0
  42. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/src/ctx/agent/loop.py +0 -0
  43. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/src/ctx/agent/prompts/__init__.py +0 -0
  44. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/src/ctx/agent/prompts/builder.py +0 -0
  45. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/src/ctx/agent/prompts/env.py +0 -0
  46. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/src/ctx/agent/prompts/registry.py +0 -0
  47. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/src/ctx/agent/prompts/tooling.py +0 -0
  48. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/src/ctx/agent/revert.py +0 -0
  49. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/src/ctx/agent/runtime.py +0 -0
  50. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/src/ctx/agent/sdk/__init__.py +0 -0
  51. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/src/ctx/agent/sdk/_version.py +0 -0
  52. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/src/ctx/agent/sdk/agent.py +0 -0
  53. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/src/ctx/agent/sdk/approvals.py +0 -0
  54. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/src/ctx/agent/sdk/guardrails/__init__.py +0 -0
  55. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/src/ctx/agent/sdk/guardrails/types.py +0 -0
  56. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/src/ctx/agent/sdk/handoffs.py +0 -0
  57. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/src/ctx/agent/sdk/items.py +0 -0
  58. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/src/ctx/agent/sdk/items_base.py +0 -0
  59. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/src/ctx/agent/sdk/permissions.py +0 -0
  60. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/src/ctx/agent/sdk/results.py +0 -0
  61. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/src/ctx/agent/sdk/run_config.py +0 -0
  62. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/src/ctx/agent/sdk/runner.py +0 -0
  63. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/src/ctx/agent/sdk/sessions.py +0 -0
  64. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/src/ctx/agent/sdk/skills.py +0 -0
  65. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/src/ctx/agent/sdk/tools.py +0 -0
  66. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/src/ctx/agent/session.py +0 -0
  67. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/src/ctx/agent/skills.py +0 -0
  68. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/src/ctx/agent/skills_refresh.py +0 -0
  69. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/src/ctx/agent/snapshot.py +0 -0
  70. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/src/ctx/agent/tools/__init__.py +0 -0
  71. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/src/ctx/agent/tools/base.py +0 -0
  72. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/src/ctx/agent/tools/schema.py +0 -0
  73. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/src/ctx/agent/tools/schema_tool.py +0 -0
  74. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/src/ctx/agent/tools_manager.py +0 -0
  75. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/src/ctx/agent/turn.py +0 -0
  76. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/src/ctx/ai/README.md +0 -0
  77. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/src/ctx/ai/__init__.py +0 -0
  78. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/src/ctx/ai/_httpcore_patch.py +0 -0
  79. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/src/ctx/ai/base.py +0 -0
  80. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/src/ctx/ai/context_length.py +0 -0
  81. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/src/ctx/ai/dynamic_models.py +0 -0
  82. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/src/ctx/ai/model_fetcher.py +0 -0
  83. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/src/ctx/ai/models.py +0 -0
  84. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/src/ctx/ai/oauth/__init__.py +0 -0
  85. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/src/ctx/ai/oauth/cline.py +0 -0
  86. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/src/ctx/ai/oauth/codex.py +0 -0
  87. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/src/ctx/ai/oauth/copilot.py +0 -0
  88. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/src/ctx/ai/oauth/deepai.py +0 -0
  89. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/src/ctx/ai/oauth/devin/__init__.py +0 -0
  90. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/src/ctx/ai/oauth/devin/descriptors.pb +0 -0
  91. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/src/ctx/ai/oauth/devin/proto.py +0 -0
  92. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/src/ctx/ai/oauth/freepi.py +0 -0
  93. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/src/ctx/ai/oauth/junie.py +0 -0
  94. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/src/ctx/ai/phase_parser.py +0 -0
  95. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/src/ctx/ai/provider.yaml +0 -0
  96. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/src/ctx/ai/provider_catalog.py +0 -0
  97. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/src/ctx/ai/provider_hooks.py +0 -0
  98. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/src/ctx/ai/providers/__init__.py +0 -0
  99. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/src/ctx/ai/providers/anthropic_sdk.py +0 -0
  100. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/src/ctx/ai/providers/mock.py +0 -0
  101. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/src/ctx/ai/providers/openai_responses_sdk.py +0 -0
  102. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/src/ctx/ai/providers/openai_sdk.py +0 -0
  103. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/src/ctx/ai/providers/sanitize.py +0 -0
  104. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/src/ctx/ai/py.typed +0 -0
  105. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/src/ctx/ai/rate_limit.py +0 -0
  106. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/src/ctx/ai/sdk/__init__.py +0 -0
  107. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/src/ctx/ai/sdk/_sse.py +0 -0
  108. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/src/ctx/ai/sdk/anthropic.py +0 -0
  109. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/src/ctx/ai/sdk/base.py +0 -0
  110. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/src/ctx/ai/sdk/openai.py +0 -0
  111. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/src/ctx/ai/sdk/openai_responses.py +0 -0
  112. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/src/ctx/ai/streaming_json.py +0 -0
  113. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/src/ctx/ai/thinking.py +0 -0
  114. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/src/ctx/ai/tool_parser.py +0 -0
  115. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/src/ctx/core/__init__.py +0 -0
  116. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/src/ctx/core/bytes_util.py +0 -0
  117. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/src/ctx/core/compaction.py +0 -0
  118. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/src/ctx/core/config.py +0 -0
  119. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/src/ctx/core/defaults/__init__.py +0 -0
  120. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/src/ctx/core/defaults/config.yml +0 -0
  121. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/src/ctx/core/events.py +0 -0
  122. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/src/ctx/core/handoff.py +0 -0
  123. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/src/ctx/core/harness_config.py +0 -0
  124. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/src/ctx/core/image.py +0 -0
  125. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/src/ctx/core/notify.py +0 -0
  126. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/src/ctx/core/permissions.py +0 -0
  127. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/src/ctx/core/py.typed +0 -0
  128. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/src/ctx/core/recap.py +0 -0
  129. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/src/ctx/core/scratchpad.py +0 -0
  130. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/src/ctx/core/session_retention.py +0 -0
  131. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/src/ctx/core/sounds/completion.wav +0 -0
  132. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/src/ctx/core/sounds/error.wav +0 -0
  133. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/src/ctx/core/sounds/permission.wav +0 -0
  134. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/src/ctx/core/store.py +0 -0
  135. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/src/ctx/core/themes.py +0 -0
  136. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/src/ctx/core/token_usage.py +0 -0
  137. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/src/ctx/git/README.md +0 -0
  138. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/src/ctx/git/__init__.py +0 -0
  139. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/src/ctx/git/gh_app.py +0 -0
  140. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/src/ctx/git/gh_cli.py +0 -0
  141. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/src/ctx/git/git_branch.py +0 -0
  142. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/src/ctx/plugins/README.md +0 -0
  143. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/src/ctx/plugins/__init__.py +0 -0
  144. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/src/ctx/plugins/bootstrap.py +0 -0
  145. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/src/ctx/plugins/builtins/__init__.py +0 -0
  146. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/src/ctx/plugins/builtins/commands.py +0 -0
  147. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/src/ctx/plugins/builtins/hooks.py +0 -0
  148. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/src/ctx/plugins/builtins/services/__init__.py +0 -0
  149. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/src/ctx/plugins/builtins/services/agent_instances.py +0 -0
  150. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/src/ctx/plugins/builtins/services/agent_loop.py +0 -0
  151. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/src/ctx/plugins/builtins/services/agents.py +0 -0
  152. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/src/ctx/plugins/builtins/services/compaction.py +0 -0
  153. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/src/ctx/plugins/builtins/services/llm.py +0 -0
  154. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/src/ctx/plugins/builtins/services/permissions.py +0 -0
  155. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/src/ctx/plugins/builtins/services/projections.py +0 -0
  156. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/src/ctx/plugins/builtins/services/prompts.py +0 -0
  157. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/src/ctx/plugins/builtins/services/sessions.py +0 -0
  158. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/src/ctx/plugins/builtins/services/skills.py +0 -0
  159. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/src/ctx/plugins/builtins/services/telemetry.py +0 -0
  160. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/src/ctx/plugins/builtins/services/tool_executor.py +0 -0
  161. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/src/ctx/plugins/builtins/services/tools.py +0 -0
  162. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/src/ctx/plugins/builtins/services/turn_engine.py +0 -0
  163. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/src/ctx/plugins/builtins/tools/__init__.py +0 -0
  164. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/src/ctx/plugins/builtins/tools/_register.py +0 -0
  165. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/src/ctx/plugins/builtins/ui.py +0 -0
  166. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/src/ctx/plugins/bus.py +0 -0
  167. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/src/ctx/plugins/context.py +0 -0
  168. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/src/ctx/plugins/errors.py +0 -0
  169. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/src/ctx/plugins/event_contract.py +0 -0
  170. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/src/ctx/plugins/events.py +0 -0
  171. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/src/ctx/plugins/host.py +0 -0
  172. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/src/ctx/plugins/install.py +0 -0
  173. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/src/ctx/plugins/loader.py +0 -0
  174. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/src/ctx/plugins/plugin.py +0 -0
  175. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/src/ctx/plugins/profile.py +0 -0
  176. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/src/ctx/plugins/services.py +0 -0
  177. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/src/ctx/protocol/README.md +0 -0
  178. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/src/ctx/protocol/__init__.py +0 -0
  179. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/src/ctx/protocol/abc.py +0 -0
  180. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/src/ctx/protocol/errors.py +0 -0
  181. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/src/ctx/protocol/types.py +0 -0
  182. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/src/ctx/sdk/__init__.py +0 -0
  183. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/src/ctx/telemetry/README.md +0 -0
  184. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/src/ctx/telemetry/__init__.py +0 -0
  185. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/src/ctx/telemetry/exporters/__init__.py +0 -0
  186. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/src/ctx/telemetry/exporters/console.py +0 -0
  187. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/src/ctx/telemetry/exporters/jsonl.py +0 -0
  188. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/src/ctx/telemetry/processor.py +0 -0
  189. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/src/ctx/telemetry/tracing_impl.py +0 -0
  190. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/tests/test_model_cache_fallback.py +0 -0
  191. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/tests/test_plugin_install.py +0 -0
  192. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/tests/test_switch_model_closes_provider.py +0 -0
  193. {ctx_sdk-2.0.2 → ctx_sdk-2.0.3}/tests/test_turn_stream_stall.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: ctx-sdk
3
- Version: 2.0.2
3
+ Version: 2.0.3
4
4
  Summary: Minimalist agent harness: agent loop, sessions, tools, plugin composition, 67 LLM providers, and a Python SDK. The coding agent CLI/TUI is a separate package (ctx-agent) built on top.
5
5
  Author: OEvortex
6
6
  License-Expression: Apache-2.0
@@ -20,7 +20,7 @@ artifacts = []
20
20
 
21
21
  [project]
22
22
  name = "ctx-sdk"
23
- version = "2.0.2"
23
+ version = "2.0.3"
24
24
  description = "Minimalist agent harness: agent loop, sessions, tools, plugin composition, 67 LLM providers, and a Python SDK. The coding agent CLI/TUI is a separate package (ctx-agent) built on top."
25
25
  requires-python = ">=3.12"
26
26
  keywords = ["agent", "harness", "llm", "agent-loop", "sdk"]
@@ -59,12 +59,16 @@ def get_dynamic_auth_path() -> Path:
59
59
  """Get the path to the API key storage file.
60
60
 
61
61
  Checks for a YAML key file first (config dir, then the legacy
62
- ``~/ctx`` location), then falls back to the JSON file in the config
63
- dir. ``get_config_dir()`` already honours ``XDG_CONFIG_HOME``, so no
64
- separate XDG branch is needed.
62
+ ``~/ctx`` location), then the JSON file in the config dir, then --
63
+ for keys written while ``XDG_CONFIG_HOME`` still redirected the
64
+ config dir -- the JSON file under ``$XDG_CONFIG_HOME/ctx``.
65
65
  """
66
66
  config_dir = get_config_dir()
67
- for candidate in (config_dir / "dynamic_auth.yml", _legacy_yml_path()):
67
+ candidates = [config_dir / "dynamic_auth.yml", _legacy_yml_path(), config_dir / AUTH_FILENAME]
68
+ xdg = os.environ.get("XDG_CONFIG_HOME")
69
+ if xdg and Path(xdg).is_absolute():
70
+ candidates.append(Path(xdg) / "ctx" / AUTH_FILENAME)
71
+ for candidate in candidates:
68
72
  if candidate.exists():
69
73
  return candidate
70
74
  return config_dir / AUTH_FILENAME
@@ -121,7 +121,7 @@ len(SUMMARY_SECTIONS) # 12
121
121
 
122
122
  ## Paths, scratchpad, notifications
123
123
 
124
- `ctx.core.paths` gives `CONFIG_DIR_NAME = "ctx"` and three resolvers. `get_config_dir()` uses `$XDG_CONFIG_HOME/ctx` only when the variable is explicitly set *and* the result is absolute, otherwise `$HOME/.ctx`, otherwise a `pwd` database, otherwise `cwd/.ctx` - it never writes to `/.ctx`. `get_agents_dir()` is `~/.agents`, and `shorten_path(path)` trims a path for display.
124
+ `ctx.core.paths` gives `CONFIG_DIR_NAME = "ctx"` and three resolvers. `get_config_dir()` is always `$HOME/.ctx` (then a `pwd` database, otherwise `cwd/.ctx`) - it never writes to `/.ctx`, and it deliberately ignores `$XDG_CONFIG_HOME`: GUI terminals export it while shells do not, and honouring it silently split users between `~/.ctx` and `~/.config/ctx` (different DB, config, and API keys depending on launch). `get_agents_dir()` is `~/.agents`, and `shorten_path(path)` trims a path for display.
125
125
 
126
126
  ```python
127
127
  from ctx.core import init_scratchpad, is_scratchpad_path
@@ -5,18 +5,17 @@ CONFIG_DIR_NAME = "ctx"
5
5
 
6
6
 
7
7
  def get_config_dir() -> Path:
8
+ # ~/.ctx is the one config home. XDG_CONFIG_HOME is deliberately not
9
+ # honoured: GUI terminals routinely export it while shell sessions do
10
+ # not, and the flip silently switched users between ~/.ctx and
11
+ # ~/.config/ctx -- different DB, config, and API keys, depending on
12
+ # how ctx happened to be launched.
13
+ #
8
14
  # Be robust when HOME is empty/unset (e.g. `env -i`, some `uv tool`
9
15
  # shims, or sudo without -H). Path.home() then returns `/` and
10
16
  # `/.ctx` is not writable -> `Failed to write model cache for ...:
11
17
  # Permission denied: '/.ctx'` and the user sees "not writing to
12
- # ~/.ctx". Prefer explicit env vars, then HOME, then fallback.
13
- xdg = os.environ.get("XDG_CONFIG_HOME")
14
- if xdg:
15
- # XDG specifies $XDG_CONFIG_HOME/ctx, but we keep ~/.ctx for
16
- # backwards compat - only use XDG when explicitly set.
17
- p = Path(xdg)
18
- if p.is_absolute():
19
- return p / CONFIG_DIR_NAME
18
+ # ~/.ctx". Prefer HOME, then fallbacks.
20
19
  home = os.environ.get("HOME")
21
20
  if home:
22
21
  p = Path(home)
@@ -14,7 +14,7 @@ def _get_project_metadata() -> tuple[str, str]:
14
14
  return project["name"], project["version"]
15
15
  except Exception:
16
16
  pass
17
- return "ctx-sdk", "2.0.2"
17
+ return "ctx-sdk", "2.0.3"
18
18
 
19
19
 
20
20
  PACKAGE_NAME, _FALLBACK_VERSION = _get_project_metadata()
@@ -104,3 +104,25 @@ class TestAuthPath:
104
104
  dyn.save_api_key("kilo", "secret-key")
105
105
  assert dyn.load_api_key("kilo") == "secret-key"
106
106
  assert (cfg / "dynamic_auth.json").exists()
107
+
108
+ def test_xdg_stored_key_still_read(self, monkeypatch, tmp_path):
109
+ # Keys written while XDG_CONFIG_HOME redirected the config dir
110
+ # live under $XDG_CONFIG_HOME/ctx; canonical ~/.ctx is empty.
111
+ cfg = tmp_path / "cfg"
112
+ xdg = tmp_path / "xdg"
113
+ (xdg / "ctx").mkdir(parents=True)
114
+ (xdg / "ctx" / "dynamic_auth.json").write_text('{"kilo": "xdg-key"}')
115
+ monkeypatch.setattr(dyn, "get_config_dir", lambda: cfg)
116
+ monkeypatch.setattr(dyn, "_legacy_yml_path", lambda: tmp_path / "nope.yml")
117
+ monkeypatch.setenv("XDG_CONFIG_HOME", str(xdg))
118
+ assert dyn.load_api_key("kilo") == "xdg-key"
119
+
120
+
121
+ class TestConfigDir:
122
+ def test_home_wins_over_xdg(self, monkeypatch, tmp_path):
123
+ from ctx.core.paths import get_config_dir
124
+
125
+ home = tmp_path / "home"
126
+ monkeypatch.setenv("HOME", str(home))
127
+ monkeypatch.setenv("XDG_CONFIG_HOME", str(tmp_path / "xdg"))
128
+ assert get_config_dir() == home / ".ctx"
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes