sky-dev 0.0.6__tar.gz → 0.0.8__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 (49) hide show
  1. {sky_dev-0.0.6 → sky_dev-0.0.8}/CHANGELOG.md +21 -8
  2. {sky_dev-0.0.6 → sky_dev-0.0.8}/PKG-INFO +4 -7
  3. {sky_dev-0.0.6 → sky_dev-0.0.8}/README.md +3 -6
  4. {sky_dev-0.0.6 → sky_dev-0.0.8}/pyproject.toml +1 -1
  5. {sky_dev-0.0.6 → sky_dev-0.0.8}/sky/__init__.py +1 -1
  6. {sky_dev-0.0.6 → sky_dev-0.0.8}/sky/cli.py +50 -19
  7. {sky_dev-0.0.6 → sky_dev-0.0.8}/sky/core/chat.py +5 -0
  8. {sky_dev-0.0.6 → sky_dev-0.0.8}/sky/core/fast_loop.py +6 -6
  9. {sky_dev-0.0.6 → sky_dev-0.0.8}/sky_dev.egg-info/PKG-INFO +4 -7
  10. {sky_dev-0.0.6 → sky_dev-0.0.8}/.env.example +0 -0
  11. {sky_dev-0.0.6 → sky_dev-0.0.8}/CONTRIBUTING.md +0 -0
  12. {sky_dev-0.0.6 → sky_dev-0.0.8}/LICENSE +0 -0
  13. {sky_dev-0.0.6 → sky_dev-0.0.8}/MANIFEST.in +0 -0
  14. {sky_dev-0.0.6 → sky_dev-0.0.8}/SECURITY.md +0 -0
  15. {sky_dev-0.0.6 → sky_dev-0.0.8}/setup.cfg +0 -0
  16. {sky_dev-0.0.6 → sky_dev-0.0.8}/sky/config/__init__.py +0 -0
  17. {sky_dev-0.0.6 → sky_dev-0.0.8}/sky/config/models.yaml +0 -0
  18. {sky_dev-0.0.6 → sky_dev-0.0.8}/sky/config/schema.py +0 -0
  19. {sky_dev-0.0.6 → sky_dev-0.0.8}/sky/core/__init__.py +0 -0
  20. {sky_dev-0.0.6 → sky_dev-0.0.8}/sky/core/approval.py +0 -0
  21. {sky_dev-0.0.6 → sky_dev-0.0.8}/sky/core/benchmark.py +0 -0
  22. {sky_dev-0.0.6 → sky_dev-0.0.8}/sky/core/mode_prompts.py +0 -0
  23. {sky_dev-0.0.6 → sky_dev-0.0.8}/sky/core/router.py +0 -0
  24. {sky_dev-0.0.6 → sky_dev-0.0.8}/sky/core/subagent.py +0 -0
  25. {sky_dev-0.0.6 → sky_dev-0.0.8}/sky/core/workflow.py +0 -0
  26. {sky_dev-0.0.6 → sky_dev-0.0.8}/sky/errors.py +0 -0
  27. {sky_dev-0.0.6 → sky_dev-0.0.8}/sky/memory/__init__.py +0 -0
  28. {sky_dev-0.0.6 → sky_dev-0.0.8}/sky/memory/indexer.py +0 -0
  29. {sky_dev-0.0.6 → sky_dev-0.0.8}/sky/memory/vectorstore.py +0 -0
  30. {sky_dev-0.0.6 → sky_dev-0.0.8}/sky/security/__init__.py +0 -0
  31. {sky_dev-0.0.6 → sky_dev-0.0.8}/sky/security/audit.py +0 -0
  32. {sky_dev-0.0.6 → sky_dev-0.0.8}/sky/security/detection.py +0 -0
  33. {sky_dev-0.0.6 → sky_dev-0.0.8}/sky/security/guardrails.py +0 -0
  34. {sky_dev-0.0.6 → sky_dev-0.0.8}/sky/security/prompts.py +0 -0
  35. {sky_dev-0.0.6 → sky_dev-0.0.8}/sky/security/rate_limit.py +0 -0
  36. {sky_dev-0.0.6 → sky_dev-0.0.8}/sky/security/sanitize.py +0 -0
  37. {sky_dev-0.0.6 → sky_dev-0.0.8}/sky/storage/__init__.py +0 -0
  38. {sky_dev-0.0.6 → sky_dev-0.0.8}/sky/storage/db.py +0 -0
  39. {sky_dev-0.0.6 → sky_dev-0.0.8}/sky/tools/__init__.py +0 -0
  40. {sky_dev-0.0.6 → sky_dev-0.0.8}/sky/tools/fs_tools.py +0 -0
  41. {sky_dev-0.0.6 → sky_dev-0.0.8}/sky/tools/git_tools.py +0 -0
  42. {sky_dev-0.0.6 → sky_dev-0.0.8}/sky/tools/registry.py +0 -0
  43. {sky_dev-0.0.6 → sky_dev-0.0.8}/sky/tools/search_tools.py +0 -0
  44. {sky_dev-0.0.6 → sky_dev-0.0.8}/sky/tools/shell_tools.py +0 -0
  45. {sky_dev-0.0.6 → sky_dev-0.0.8}/sky_dev.egg-info/SOURCES.txt +0 -0
  46. {sky_dev-0.0.6 → sky_dev-0.0.8}/sky_dev.egg-info/dependency_links.txt +0 -0
  47. {sky_dev-0.0.6 → sky_dev-0.0.8}/sky_dev.egg-info/entry_points.txt +0 -0
  48. {sky_dev-0.0.6 → sky_dev-0.0.8}/sky_dev.egg-info/requires.txt +0 -0
  49. {sky_dev-0.0.6 → sky_dev-0.0.8}/sky_dev.egg-info/top_level.txt +0 -0
@@ -2,17 +2,30 @@
2
2
 
3
3
  All notable changes to Sky will be documented in this file.
4
4
 
5
- ## [0.0.6] - 2026-08-28
5
+ ## [0.0.8] - 2024-05-XX
6
6
 
7
- ### Added
8
- - Comprehensive test suite for core functionality.
9
- - Automated test environment setup script (`setup_test_env.ps1`).
7
+ ### Fixed
8
+ - Fixed critical bug where `sky init` failed to save API keys to `.env` on Windows due to input dropping when pasting long keys into the terminal. Replaced `typer.prompt` with robust standard `input()` mechanism.
9
+
10
+ ## [0.0.7] - 2026-09-01
10
11
 
11
12
  ### Fixed
12
- - Fixed context length limits triggering 400 Invalid Request errors from the Groq API.
13
- - Re-implemented recursive truncation retry in model router for oversized context.
14
- - Fixed UnicodeEncodeError crashing CLI during pytest reporting on Windows.
15
- - Missing imports in semantic context search.
13
+ - `sky init` now creates .env file with API keys
14
+ - Missing `Tuple` import in fast_loop.py (NameError fixed)
15
+ - Infinite tool validation loop (circuit breaker added)
16
+ - `install.py` now properly suppresses pip output
17
+ - `sky ask` no longer crashes on fresh install
18
+ - Fixed context length limits triggering 400 Invalid Request errors from the Groq API
19
+ - Re-implemented recursive truncation retry in model router for oversized context
20
+ - Fixed UnicodeEncodeError crashing CLI during pytest reporting on Windows
21
+ - Missing imports in semantic context search
22
+
23
+ ### Added
24
+ - `sky clean` command to remove all config files
25
+ - `sky reset` alias for `sky clean`
26
+ - API key validation in `sky init`
27
+ - Comprehensive test suite for core functionality
28
+ - Automated test environment setup script (`setup_test_env.ps1`)
16
29
 
17
30
  ## [0.0.5] - 2026-08-27
18
31
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: sky-dev
3
- Version: 0.0.6
3
+ Version: 0.0.8
4
4
  Summary: Sky - Agentic coding assistant. Build without boundaries.
5
5
  Author-email: Aaditya A <aaditya@corover.ai>
6
6
  License: MIT
@@ -60,20 +60,17 @@ Sky is a local, CLI-based, agentic software development assistant that helps you
60
60
 
61
61
  ## Installation
62
62
 
63
- Choose one of the following installation methods:
64
-
65
- ### Option 1: Quick Install (Standard)
63
+ ### Quick Install
66
64
  ```bash
67
65
  pip install sky-dev
68
66
  ```
69
67
 
70
- ### Option 2: Clean Install (Less Output)
68
+ ### Clean Install (Recommended)
71
69
  ```bash
72
70
  pip install sky-dev --quiet
73
71
  ```
74
72
 
75
- ### Option 3: Branded Install Script
76
- If you have downloaded the repository, you can run:
73
+ ### Branded Install
77
74
  ```bash
78
75
  python install.py
79
76
  ```
@@ -11,20 +11,17 @@ Sky is a local, CLI-based, agentic software development assistant that helps you
11
11
 
12
12
  ## Installation
13
13
 
14
- Choose one of the following installation methods:
15
-
16
- ### Option 1: Quick Install (Standard)
14
+ ### Quick Install
17
15
  ```bash
18
16
  pip install sky-dev
19
17
  ```
20
18
 
21
- ### Option 2: Clean Install (Less Output)
19
+ ### Clean Install (Recommended)
22
20
  ```bash
23
21
  pip install sky-dev --quiet
24
22
  ```
25
23
 
26
- ### Option 3: Branded Install Script
27
- If you have downloaded the repository, you can run:
24
+ ### Branded Install
28
25
  ```bash
29
26
  python install.py
30
27
  ```
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "sky-dev"
7
- version = "0.0.6"
7
+ version = "0.0.8"
8
8
  description = "Sky - Agentic coding assistant. Build without boundaries."
9
9
  readme = "README.md"
10
10
  license = {text = "MIT"}
@@ -1,6 +1,6 @@
1
1
  """Sky - Build without boundaries."""
2
2
 
3
- __version__ = "0.0.6"
3
+ __version__ = "0.0.8"
4
4
  __author__ = "Aaditya A"
5
5
  __author_email__ = "aaditya@corover.ai"
6
6
  __description__ = "Local, CLI-based, agentic software development assistant"
@@ -32,6 +32,15 @@ def version_callback(value: bool) -> None:
32
32
  console.print(f"SKY CLI Version: {__version__}")
33
33
  raise typer.Exit()
34
34
 
35
+ def _handle_error(e):
36
+ if "GROQ_API_KEY" in str(e):
37
+ return "🔑 Missing GROQ_API_KEY. Run 'sky init'."
38
+ if "NVIDIA_NIM_API_KEY" in str(e):
39
+ return "🔑 Missing NVIDIA_NIM_API_KEY. Run 'sky init'."
40
+ if "models.yaml" in str(e):
41
+ return "⚠️ Configuration error. Run 'sky init --force'."
42
+ return f"Error: {e}"
43
+
35
44
 
36
45
  @app.callback()
37
46
  def main(
@@ -652,23 +661,22 @@ def init(
652
661
  console.print("[bold blue]Initializing SKY Project...[/bold blue]")
653
662
 
654
663
  # 1. Ask for NIM API Key
655
- nim_key = typer.prompt("Enter your NVIDIA NIM API Key (or press Enter to skip)", default="", show_default=False)
656
- groq_key = typer.prompt("Enter your GROQ API Key (or press Enter to skip)", default="", show_default=False)
664
+ nim_key = console.input("Enter your NVIDIA NIM API Key (or press Enter to skip): ").strip()
665
+ groq_key = console.input("Enter your GROQ API Key (or press Enter to skip): ").strip()
657
666
 
658
- env_content = ""
659
- env_path = Path(".env")
660
- if env_path.exists():
661
- env_content = env_path.read_text()
662
-
663
- if nim_key and "NIM_API_KEY" not in env_content:
664
- with open(env_path, "a") as f:
665
- f.write(f"\nNIM_API_KEY={nim_key}\n")
666
- console.print("[green]Added NIM_API_KEY to .env[/green]")
667
+ if groq_key and not groq_key.startswith("gsk_"):
668
+ console.print("[red]⚠️ Groq API key should start with 'gsk_'[/red]")
669
+ groq_key = Prompt.ask("Re-enter Groq API key")
667
670
 
668
- if groq_key and "GROQ_API_KEY" not in env_content:
669
- with open(env_path, "a") as f:
670
- f.write(f"\nGROQ_API_KEY={groq_key}\n")
671
- console.print("[green]Added GROQ_API_KEY to .env[/green]")
671
+ def _save_env(groq_key: str, nim_key: str):
672
+ with open(".env", "w") as f:
673
+ if groq_key:
674
+ f.write(f"GROQ_API_KEY={groq_key}\n")
675
+ if nim_key:
676
+ f.write(f"NVIDIA_NIM_API_KEY={nim_key}\n")
677
+ console.print("[green]✅ API keys saved to .env[/green]")
678
+
679
+ _save_env(groq_key, nim_key)
672
680
 
673
681
  # 2. Generate local models.yaml
674
682
  models_yaml_path = Path("models.yaml")
@@ -835,7 +843,8 @@ def check_providers():
835
843
  from sky.errors import ProviderError, SkyError
836
844
  import pydantic
837
845
 
838
- load_dotenv()
846
+ load_dotenv(override=True)
847
+ console.print(f"DEBUG: NVIDIA_NIM_API_KEY={os.getenv('NVIDIA_NIM_API_KEY')}")
839
848
  console.print("[bold blue]Checking Providers...[/bold blue]\n")
840
849
 
841
850
  try:
@@ -875,7 +884,8 @@ def check_providers():
875
884
  )
876
885
  else:
877
886
  try:
878
- nim_base = models_config.providers.get("nim").base_url if models_config.providers.get("nim") else "https://integrate.api.nvidia.com/v1"
887
+ nim_provider = models_config.providers.get("nim")
888
+ nim_base = nim_provider.base_url if (nim_provider and nim_provider.base_url) else "https://integrate.api.nvidia.com/v1"
879
889
  res = httpx.get(f"{nim_base.rstrip('/')}/models", headers={"Authorization": f"Bearer {nim_key}"})
880
890
  if res.status_code == 200:
881
891
  print_provider_info("nim", "✅ [green]Connected[/green]")
@@ -897,7 +907,8 @@ def check_providers():
897
907
  )
898
908
  else:
899
909
  try:
900
- groq_base = models_config.providers.get("groq").base_url if models_config.providers.get("groq") else "https://api.groq.com/openai/v1"
910
+ groq_provider = models_config.providers.get("groq")
911
+ groq_base = groq_provider.base_url if (groq_provider and groq_provider.base_url) else "https://api.groq.com/openai/v1"
901
912
  res = httpx.get(f"{groq_base.rstrip('/')}/models", headers={"Authorization": f"Bearer {groq_key}"})
902
913
  if res.status_code == 200:
903
914
  print_provider_info("groq", "✅ [green]Connected[/green]")
@@ -919,5 +930,25 @@ def check_providers():
919
930
  import sys
920
931
  sys.exit(1)
921
932
 
933
+ @app.command("clean")
934
+ def clean():
935
+ """Remove all Sky configuration files."""
936
+ from rich.prompt import Confirm
937
+ import shutil
938
+ if Confirm.ask("Delete all Sky configuration files (.env, models.yaml, .sky/)?", default=False):
939
+ for f in [".env", "models.yaml", ".sky/"]:
940
+ if Path(f).exists():
941
+ shutil.rmtree(f) if Path(f).is_dir() else Path(f).unlink()
942
+ console.print("[green]✅ Sky configuration cleaned.[/green]")
943
+
944
+ @app.command("reset")
945
+ def reset():
946
+ """Reset Sky configuration (same as sky clean)."""
947
+ clean()
948
+
922
949
  if __name__ == "__main__":
923
- app()
950
+ try:
951
+ app()
952
+ except Exception as e:
953
+ console.print(f"[bold red]{_handle_error(e)}[/bold red]")
954
+ sys.exit(1)
@@ -66,6 +66,11 @@ class ChatEngine:
66
66
 
67
67
  def run(self, initial_prompt: Optional[str] = None):
68
68
  """Run the chat loop."""
69
+ import os
70
+ if not os.getenv("GROQ_API_KEY") and not os.getenv("NVIDIA_NIM_API_KEY"):
71
+ self.console.print("[yellow]⚠️ No API keys found. Run 'sky init' first.[/yellow]")
72
+ return
73
+
69
74
  self.console.print(Panel(
70
75
  Markdown(self.get_welcome_message()),
71
76
  title="☁️ Sky Chat",
@@ -2,7 +2,7 @@
2
2
 
3
3
  import asyncio
4
4
  import json
5
- from typing import Any, AsyncIterator, Dict, List, Optional
5
+ from typing import Any, AsyncIterator, Dict, List, Optional, Tuple
6
6
 
7
7
  from sky.config import DexProjectConfig
8
8
  from sky.core.approval import ApprovalGate
@@ -121,7 +121,7 @@ class FastLoopEngine:
121
121
  "content": result_str,
122
122
  }
123
123
 
124
- def _validate_tool_calls(self, tool_calls: List[Dict[str, Any]]) -> Tuple[List[Dict[str, Any]], List[Dict[str, Any]]]:
124
+ def _validate_tool_calls(self, tool_calls: List[Dict[str, Any]]) -> tuple[List[Dict[str, Any]], List[Dict[str, Any]]]:
125
125
  """Validate that tool calls are well-formed JSON. Returns (valid_calls, error_results)."""
126
126
  valid_calls = []
127
127
  error_results = []
@@ -215,7 +215,7 @@ class FastLoopEngine:
215
215
  if not context:
216
216
  return ""
217
217
 
218
- return context
218
+ return str(context)
219
219
  MAX_MESSAGES = 10
220
220
  MAX_MESSAGE_LENGTH = 2000
221
221
 
@@ -313,9 +313,9 @@ class FastLoopEngine:
313
313
 
314
314
  if "tool call validation failed" in error_str or "invalid_request_error" in error_str or "400" in error_str:
315
315
  consecutive_tool_failures += 1
316
- if consecutive_tool_failures > 2:
317
- yield {"type": "error", "content": "Model failed to format tool calls correctly multiple times. Aborting."}
318
- break
316
+ if consecutive_tool_failures >= 2:
317
+ yield {"type": "error", "error": "Model stuck in tool validation loop. Aborting.", "suggestion": "Try rephrasing your request."}
318
+ return
319
319
 
320
320
  from rich.console import Console
321
321
  Console().print(f"[yellow]Model tool validation failed: {error_str}. Feeding error back to model...[/yellow]")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: sky-dev
3
- Version: 0.0.6
3
+ Version: 0.0.8
4
4
  Summary: Sky - Agentic coding assistant. Build without boundaries.
5
5
  Author-email: Aaditya A <aaditya@corover.ai>
6
6
  License: MIT
@@ -60,20 +60,17 @@ Sky is a local, CLI-based, agentic software development assistant that helps you
60
60
 
61
61
  ## Installation
62
62
 
63
- Choose one of the following installation methods:
64
-
65
- ### Option 1: Quick Install (Standard)
63
+ ### Quick Install
66
64
  ```bash
67
65
  pip install sky-dev
68
66
  ```
69
67
 
70
- ### Option 2: Clean Install (Less Output)
68
+ ### Clean Install (Recommended)
71
69
  ```bash
72
70
  pip install sky-dev --quiet
73
71
  ```
74
72
 
75
- ### Option 3: Branded Install Script
76
- If you have downloaded the repository, you can run:
73
+ ### Branded Install
77
74
  ```bash
78
75
  python install.py
79
76
  ```
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