cliara 0.4.2__tar.gz → 0.4.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 (62) hide show
  1. {cliara-0.4.2 → cliara-0.4.3}/PKG-INFO +1 -1
  2. {cliara-0.4.2 → cliara-0.4.3}/cliara/__init__.py +1 -1
  3. {cliara-0.4.2 → cliara-0.4.3}/cliara/auth.py +5 -0
  4. {cliara-0.4.2 → cliara-0.4.3}/cliara/nl_handler.py +3 -2
  5. {cliara-0.4.2 → cliara-0.4.3}/cliara.egg-info/PKG-INFO +1 -1
  6. {cliara-0.4.2 → cliara-0.4.3}/pyproject.toml +1 -1
  7. {cliara-0.4.2 → cliara-0.4.3}/README.md +0 -0
  8. {cliara-0.4.2 → cliara-0.4.3}/cliara/agents/__init__.py +0 -0
  9. {cliara-0.4.2 → cliara-0.4.3}/cliara/agents/commit_and_deploy.py +0 -0
  10. {cliara-0.4.2 → cliara-0.4.3}/cliara/agents/copilot_explain.py +0 -0
  11. {cliara-0.4.2 → cliara-0.4.3}/cliara/agents/explain.py +0 -0
  12. {cliara-0.4.2 → cliara-0.4.3}/cliara/agents/fix.py +0 -0
  13. {cliara-0.4.2 → cliara-0.4.3}/cliara/agents/history_search.py +0 -0
  14. {cliara-0.4.2 → cliara-0.4.3}/cliara/agents/history_summary.py +0 -0
  15. {cliara-0.4.2 → cliara-0.4.3}/cliara/agents/nl_to_commands.py +0 -0
  16. {cliara-0.4.2 → cliara-0.4.3}/cliara/agents/prompts/commit_message.txt +0 -0
  17. {cliara-0.4.2 → cliara-0.4.3}/cliara/agents/prompts/copilot_explain.txt +0 -0
  18. {cliara-0.4.2 → cliara-0.4.3}/cliara/agents/prompts/deploy.txt +0 -0
  19. {cliara-0.4.2 → cliara-0.4.3}/cliara/agents/prompts/explain.txt +0 -0
  20. {cliara-0.4.2 → cliara-0.4.3}/cliara/agents/prompts/fix.txt +0 -0
  21. {cliara-0.4.2 → cliara-0.4.3}/cliara/agents/prompts/history_search.txt +0 -0
  22. {cliara-0.4.2 → cliara-0.4.3}/cliara/agents/prompts/history_summary.txt +0 -0
  23. {cliara-0.4.2 → cliara-0.4.3}/cliara/agents/prompts/nl_to_commands.txt +0 -0
  24. {cliara-0.4.2 → cliara-0.4.3}/cliara/config.py +0 -0
  25. {cliara-0.4.2 → cliara-0.4.3}/cliara/console.py +0 -0
  26. {cliara-0.4.2 → cliara-0.4.3}/cliara/copilot_gate.py +0 -0
  27. {cliara-0.4.2 → cliara-0.4.3}/cliara/cross_platform.py +0 -0
  28. {cliara-0.4.2 → cliara-0.4.3}/cliara/deploy_detector.py +0 -0
  29. {cliara-0.4.2 → cliara-0.4.3}/cliara/deploy_store.py +0 -0
  30. {cliara-0.4.2 → cliara-0.4.3}/cliara/diff_preview.py +0 -0
  31. {cliara-0.4.2 → cliara-0.4.3}/cliara/execution_graph.py +0 -0
  32. {cliara-0.4.2 → cliara-0.4.3}/cliara/highlighting.py +0 -0
  33. {cliara-0.4.2 → cliara-0.4.3}/cliara/icons.py +0 -0
  34. {cliara-0.4.2 → cliara-0.4.3}/cliara/install_logo.py +0 -0
  35. {cliara-0.4.2 → cliara-0.4.3}/cliara/macros.py +0 -0
  36. {cliara-0.4.2 → cliara-0.4.3}/cliara/main.py +0 -0
  37. {cliara-0.4.2 → cliara-0.4.3}/cliara/regression.py +0 -0
  38. {cliara-0.4.2 → cliara-0.4.3}/cliara/safety.py +0 -0
  39. {cliara-0.4.2 → cliara-0.4.3}/cliara/semantic_history.py +0 -0
  40. {cliara-0.4.2 → cliara-0.4.3}/cliara/session_store.py +0 -0
  41. {cliara-0.4.2 → cliara-0.4.3}/cliara/setup_ollama.py +0 -0
  42. {cliara-0.4.2 → cliara-0.4.3}/cliara/setup_wizard.py +0 -0
  43. {cliara-0.4.2 → cliara-0.4.3}/cliara/shell.py +0 -0
  44. {cliara-0.4.2 → cliara-0.4.3}/cliara/storage/__init__.py +0 -0
  45. {cliara-0.4.2 → cliara-0.4.3}/cliara/storage/factory.py +0 -0
  46. {cliara-0.4.2 → cliara-0.4.3}/cliara/storage/json_backend.py +0 -0
  47. {cliara-0.4.2 → cliara-0.4.3}/cliara/storage/postgres_backend.py +0 -0
  48. {cliara-0.4.2 → cliara-0.4.3}/cliara/tools/__init__.py +0 -0
  49. {cliara-0.4.2 → cliara-0.4.3}/cliara/tools/migrate.py +0 -0
  50. {cliara-0.4.2 → cliara-0.4.3}/cliara-cloud/auth_middleware.py +0 -0
  51. {cliara-0.4.2 → cliara-0.4.3}/cliara-cloud/main.py +0 -0
  52. {cliara-0.4.2 → cliara-0.4.3}/cliara-cloud/proxy.py +0 -0
  53. {cliara-0.4.2 → cliara-0.4.3}/cliara-cloud/rate_limit.py +0 -0
  54. {cliara-0.4.2 → cliara-0.4.3}/cliara-cloud/settings.py +0 -0
  55. {cliara-0.4.2 → cliara-0.4.3}/cliara.egg-info/SOURCES.txt +0 -0
  56. {cliara-0.4.2 → cliara-0.4.3}/cliara.egg-info/dependency_links.txt +0 -0
  57. {cliara-0.4.2 → cliara-0.4.3}/cliara.egg-info/entry_points.txt +0 -0
  58. {cliara-0.4.2 → cliara-0.4.3}/cliara.egg-info/requires.txt +0 -0
  59. {cliara-0.4.2 → cliara-0.4.3}/cliara.egg-info/top_level.txt +0 -0
  60. {cliara-0.4.2 → cliara-0.4.3}/setup.cfg +0 -0
  61. {cliara-0.4.2 → cliara-0.4.3}/tests/test_basic.py +0 -0
  62. {cliara-0.4.2 → cliara-0.4.3}/tests/test_copilot_gate.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cliara
3
- Version: 0.4.2
3
+ Version: 0.4.3
4
4
  Summary: An AI-powered shell that understands natural language and macros
5
5
  Author: Cliara Contributors
6
6
  License: MIT
@@ -8,7 +8,7 @@ A shell wrapper that lets you:
8
8
  - Save command history as macros
9
9
  """
10
10
 
11
- __version__ = "0.4.2"
11
+ __version__ = "0.4.3"
12
12
  __author__ = "Cliara Contributors"
13
13
 
14
14
  from cliara.shell import CliaraShell
@@ -55,6 +55,11 @@ _CALLBACK_TIMEOUT = 120 # seconds to wait for the browser callback
55
55
  _TOKEN_REFRESH_BUFFER = 60 # refresh token when < 60 seconds until expiry
56
56
 
57
57
 
58
+ def get_gateway_url() -> str:
59
+ """Return the Cliara Cloud gateway URL (single source of truth for API calls)."""
60
+ return _CLIARA_GATEWAY_URL
61
+
62
+
58
63
  # ---------------------------------------------------------------------------
59
64
  # PKCE helpers (stdlib only — no extra dependencies)
60
65
  # ---------------------------------------------------------------------------
@@ -13,6 +13,7 @@ from typing import List, Tuple, Optional, Dict, Any, Callable
13
13
 
14
14
  from cliara.safety import SafetyChecker, DangerLevel
15
15
  from cliara.agents import AGENT_REGISTRY
16
+ from cliara.auth import get_gateway_url
16
17
 
17
18
  EMBEDDING_MODEL = "text-embedding-3-small"
18
19
 
@@ -30,11 +31,11 @@ _PROVIDER_DEFAULT_MODELS: Dict[str, str] = {
30
31
  _OPENAI_COMPAT_PROVIDERS = frozenset({"openai", "ollama", "groq", "gemini", "cliara"})
31
32
 
32
33
  # Base URLs for OpenAI-compatible cloud providers (not ollama — that's dynamic)
33
- # The "cliara" URL is overridable via CLIARA_GATEWAY_URL for dev/staging environments.
34
+ # Cliara URL comes from auth.py (single source of truth; respects CLIARA_GATEWAY_URL env).
34
35
  _PROVIDER_BASE_URLS: Dict[str, str] = {
35
36
  "groq": "https://api.groq.com/openai/v1",
36
37
  "gemini": "https://generativelanguage.googleapis.com/v1beta/openai/",
37
- "cliara": os.getenv("CLIARA_GATEWAY_URL", "https://api.cliara.dev/v1"),
38
+ "cliara": get_gateway_url(),
38
39
  }
39
40
 
40
41
  # Agents whose output is plain text and can be streamed token-by-token to the
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cliara
3
- Version: 0.4.2
3
+ Version: 0.4.3
4
4
  Summary: An AI-powered shell that understands natural language and macros
5
5
  Author: Cliara Contributors
6
6
  License: MIT
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "cliara"
7
- version = "0.4.2"
7
+ version = "0.4.3"
8
8
  description = "An AI-powered shell that understands natural language and macros"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.8"
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