sky-dev 0.1.4__tar.gz → 0.1.6__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 (50) hide show
  1. {sky_dev-0.1.4 → sky_dev-0.1.6}/CHANGELOG.md +18 -0
  2. {sky_dev-0.1.4 → sky_dev-0.1.6}/PKG-INFO +1 -1
  3. {sky_dev-0.1.4 → sky_dev-0.1.6}/pyproject.toml +1 -1
  4. {sky_dev-0.1.4 → sky_dev-0.1.6}/sky/__init__.py +1 -1
  5. {sky_dev-0.1.4 → sky_dev-0.1.6}/sky/cli.py +25 -15
  6. {sky_dev-0.1.4 → sky_dev-0.1.6}/sky/core/chat.py +1 -0
  7. {sky_dev-0.1.4 → sky_dev-0.1.6}/sky/core/mode_prompts.py +34 -18
  8. {sky_dev-0.1.4 → sky_dev-0.1.6}/sky/core/router.py +6 -0
  9. sky_dev-0.1.6/sky/errors.py +66 -0
  10. {sky_dev-0.1.4 → sky_dev-0.1.6}/sky/memory/__init__.py +3 -2
  11. {sky_dev-0.1.4 → sky_dev-0.1.6}/sky_dev.egg-info/PKG-INFO +1 -1
  12. sky_dev-0.1.4/sky/errors.py +0 -29
  13. {sky_dev-0.1.4 → sky_dev-0.1.6}/.env.example +0 -0
  14. {sky_dev-0.1.4 → sky_dev-0.1.6}/CONTRIBUTING.md +0 -0
  15. {sky_dev-0.1.4 → sky_dev-0.1.6}/LICENSE +0 -0
  16. {sky_dev-0.1.4 → sky_dev-0.1.6}/MANIFEST.in +0 -0
  17. {sky_dev-0.1.4 → sky_dev-0.1.6}/README.md +0 -0
  18. {sky_dev-0.1.4 → sky_dev-0.1.6}/SECURITY.md +0 -0
  19. {sky_dev-0.1.4 → sky_dev-0.1.6}/setup.cfg +0 -0
  20. {sky_dev-0.1.4 → sky_dev-0.1.6}/sky/config/__init__.py +0 -0
  21. {sky_dev-0.1.4 → sky_dev-0.1.6}/sky/config/models.yaml +0 -0
  22. {sky_dev-0.1.4 → sky_dev-0.1.6}/sky/config/schema.py +0 -0
  23. {sky_dev-0.1.4 → sky_dev-0.1.6}/sky/core/__init__.py +0 -0
  24. {sky_dev-0.1.4 → sky_dev-0.1.6}/sky/core/approval.py +0 -0
  25. {sky_dev-0.1.4 → sky_dev-0.1.6}/sky/core/benchmark.py +0 -0
  26. {sky_dev-0.1.4 → sky_dev-0.1.6}/sky/core/fast_loop.py +0 -0
  27. {sky_dev-0.1.4 → sky_dev-0.1.6}/sky/core/subagent.py +0 -0
  28. {sky_dev-0.1.4 → sky_dev-0.1.6}/sky/core/workflow.py +0 -0
  29. {sky_dev-0.1.4 → sky_dev-0.1.6}/sky/memory/indexer.py +0 -0
  30. {sky_dev-0.1.4 → sky_dev-0.1.6}/sky/memory/vectorstore.py +0 -0
  31. {sky_dev-0.1.4 → sky_dev-0.1.6}/sky/security/__init__.py +0 -0
  32. {sky_dev-0.1.4 → sky_dev-0.1.6}/sky/security/audit.py +0 -0
  33. {sky_dev-0.1.4 → sky_dev-0.1.6}/sky/security/detection.py +0 -0
  34. {sky_dev-0.1.4 → sky_dev-0.1.6}/sky/security/guardrails.py +0 -0
  35. {sky_dev-0.1.4 → sky_dev-0.1.6}/sky/security/prompts.py +0 -0
  36. {sky_dev-0.1.4 → sky_dev-0.1.6}/sky/security/rate_limit.py +0 -0
  37. {sky_dev-0.1.4 → sky_dev-0.1.6}/sky/security/sanitize.py +0 -0
  38. {sky_dev-0.1.4 → sky_dev-0.1.6}/sky/storage/__init__.py +0 -0
  39. {sky_dev-0.1.4 → sky_dev-0.1.6}/sky/storage/db.py +0 -0
  40. {sky_dev-0.1.4 → sky_dev-0.1.6}/sky/tools/__init__.py +0 -0
  41. {sky_dev-0.1.4 → sky_dev-0.1.6}/sky/tools/fs_tools.py +0 -0
  42. {sky_dev-0.1.4 → sky_dev-0.1.6}/sky/tools/git_tools.py +0 -0
  43. {sky_dev-0.1.4 → sky_dev-0.1.6}/sky/tools/registry.py +0 -0
  44. {sky_dev-0.1.4 → sky_dev-0.1.6}/sky/tools/search_tools.py +0 -0
  45. {sky_dev-0.1.4 → sky_dev-0.1.6}/sky/tools/shell_tools.py +0 -0
  46. {sky_dev-0.1.4 → sky_dev-0.1.6}/sky_dev.egg-info/SOURCES.txt +0 -0
  47. {sky_dev-0.1.4 → sky_dev-0.1.6}/sky_dev.egg-info/dependency_links.txt +0 -0
  48. {sky_dev-0.1.4 → sky_dev-0.1.6}/sky_dev.egg-info/entry_points.txt +0 -0
  49. {sky_dev-0.1.4 → sky_dev-0.1.6}/sky_dev.egg-info/requires.txt +0 -0
  50. {sky_dev-0.1.4 → sky_dev-0.1.6}/sky_dev.egg-info/top_level.txt +0 -0
@@ -1,5 +1,23 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.1.6] - 2026-09-08
4
+
5
+ ### Changed
6
+ - Improved `sky chat` intelligence by shifting identity and model routing awareness natively into the LLM system prompt.
7
+ - Removed hardcoded interception responses for better maintainability.
8
+ - Sky now clearly lists its multi-model stack (Muse Glimmer, Nemotron, GPT-OSS, Qwen, Compound Mini) while strategically protecting internal routing logic.
9
+ ## [0.1.5] - 2026-09-08
10
+
11
+ ### Added
12
+ - Standardized `docker-sandbox.ps1` and `SETUP.md` for developers running isolated environments.
13
+
14
+ ### Changed
15
+ - Centralized error messages in `sky/errors.py`.
16
+ - Better and actionable recovery suggestions for API Key missing, Rate Limit (429), Model Not Found (404), and Server Error (500).
17
+ - Fully lazy-loaded heavy modules (`lancedb`, `pydantic`, `openai`) resulting in `< 150ms` CLI startup time for basic commands like `sky --help`.
18
+
19
+ ### Fixed
20
+ - Fixed Python type-checking warnings in `errors.py` and `run_tests.py` handling `NoneType` and `Optional[str]` constraints.
3
21
  ## [0.1.4] - 2026-09-07
4
22
 
5
23
  ### Added
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: sky-dev
3
- Version: 0.1.4
3
+ Version: 0.1.6
4
4
  Summary: Sky - Agentic coding assistant. Build without boundaries.
5
5
  Author-email: Aaditya A <aaditya@corover.ai>
6
6
  License: MIT
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "sky-dev"
7
- version = "0.1.4"
7
+ version = "0.1.6"
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.1.4"
3
+ __version__ = "0.1.6"
4
4
  __author__ = "Aaditya A"
5
5
  __author_email__ = "aaditya@corover.ai"
6
6
  __description__ = "Local, CLI-based, agentic software development assistant"
@@ -32,15 +32,25 @@ 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
+ def _handle_error(e: Exception):
36
+ """Handle errors with user-friendly messages."""
37
+ error_type = type(e).__name__
38
+
39
+ if "API_KEY" in str(e):
40
+ console.print("[red]🔑 API key error.[/red]")
41
+ console.print("[yellow]Run `sky init` to set up your API keys.[/yellow]")
42
+ elif "rate limit" in str(e).lower() or "429" in str(e):
43
+ console.print("[red]⏳ Rate limit exceeded.[/red]")
44
+ console.print("[yellow]Wait 60 seconds. Consider using a different provider.[/yellow]")
45
+ elif "404" in str(e) or "not found" in str(e).lower():
46
+ console.print("[red]❌ Model or endpoint not found.[/red]")
47
+ console.print("[yellow]Run `sky check-providers` to see available models.[/yellow]")
48
+ elif "500" in str(e):
49
+ console.print("[red]❌ Provider server error.[/red]")
50
+ console.print("[yellow]Try again later or use a different provider.[/yellow]")
51
+ else:
52
+ console.print(f"[red]Error: {str(e)}[/red]")
53
+ console.print("[dim]Run with `--verbose` for more details.[/dim]")
44
54
 
45
55
  @app.callback()
46
56
  def main(
@@ -196,7 +206,7 @@ async def _run_loop(mode: str, prompt: str, inject_context: bool = False, quiet:
196
206
  db.update_session_status(session_id, "failed")
197
207
  except Exception as e:
198
208
  if not quiet:
199
- console.print(f"[bold red]Execution failed:[/bold red] {e}")
209
+ _handle_error(e)
200
210
  else:
201
211
  print(f"Execution failed: {e}", file=sys.stderr)
202
212
  db.update_session_status(session_id, "failed")
@@ -395,7 +405,7 @@ def index_repo(
395
405
  """
396
406
  from sky.config import load_config
397
407
  from sky.storage import get_db
398
- from sky.memory import VectorStoreManager, RepoIndexer, get_vector_store
408
+ from sky.memory import get_vector_store, get_indexer
399
409
 
400
410
  config = load_config()
401
411
  db = get_db()
@@ -410,7 +420,7 @@ def index_repo(
410
420
  console.print("[yellow]Clearing existing vector store...[/yellow]")
411
421
  vector_store.clear()
412
422
 
413
- indexer = RepoIndexer(config, db, vector_store)
423
+ indexer = get_indexer(config, db, vector_store)
414
424
 
415
425
  from rich.progress import Progress, SpinnerColumn, TextColumn, BarColumn
416
426
  with Progress(
@@ -439,7 +449,7 @@ def index_repo(
439
449
  def search_context_cmd(query: str, top_k: int = typer.Option(5, "--top-k", help="Number of results")) -> None:
440
450
  """Search the indexed repository."""
441
451
  from sky.config import load_config
442
- from sky.memory import VectorStoreManager, get_vector_store
452
+ from sky.memory import get_vector_store
443
453
 
444
454
  config = load_config()
445
455
  if not getattr(config, "memory_enabled", False):
@@ -631,9 +641,9 @@ def workflow(
631
641
  indexer = None
632
642
  if config.memory_enabled:
633
643
  from sky.memory.vectorstore import get_vector_store
634
- from sky.memory.indexer import RepoIndexer
644
+ from sky.memory import get_indexer
635
645
  vector_store = get_vector_store(Path.cwd() / ".sky" / "vectors")
636
- indexer = RepoIndexer(config, db, vector_store)
646
+ indexer = get_indexer(config, db, vector_store)
637
647
 
638
648
  # Initialize workflow engine (Lazy import to preserve < 150ms startup)
639
649
  from sky.core.workflow import WorkflowEngine
@@ -108,6 +108,7 @@ class ChatEngine:
108
108
  # Execute the command
109
109
  import subprocess
110
110
  import shlex
111
+ import sys
111
112
  try:
112
113
  parts = shlex.split(suggested)
113
114
  except ValueError:
@@ -43,30 +43,46 @@ Do NOT execute the plan.
43
43
  First, research the codebase using SAFE tools.
44
44
  Once you have enough context, output a structured JSON plan."""
45
45
 
46
- CHAT_SYSTEM_PROMPT = """You are Sky, an agentic coding assistant. Your creator is Aaditya A, but you are an AI, not him.
47
- ONLY if the user explicitly asks "who created you", "who built you", or about your origins, you should respond with:
48
- "I was built by Aaditya A. He is an AI/ML Intern at CoRover.ai and an MCA - AI/ML final year student at JAIN UNIVERSITY, BANGALORE."
49
- Otherwise, DO NOT mention your creator or his details.
46
+ CHAT_SYSTEM_PROMPT = """
47
+ You are Sky, an agentic coding assistant built for developers.
50
48
 
51
- Identity:
52
- - Purpose: Help developers plan, write, test, and understand code
49
+ Your identity:
50
+ - You are Sky, not ChatGPT or any other AI
51
+ - Built by Aaditya A (AI/ML Intern @ CoRover.ai, MCA @ JAIN UNIVERSITY)
53
52
 
54
- Capabilities:
53
+ Your capabilities:
55
54
  - Answer questions about codebases
56
55
  - Plan features with structured tasks
57
56
  - Write and edit code (with human approval)
58
57
  - Run complex workflows with subagents
59
- - Search code semantically
60
-
61
- Personality:
62
- - Friendly, helpful, and concise
63
- - Focus on coding assistance
64
- - Guide users to Sky's features
65
- - Be transparent about capabilities and limitations
66
-
67
- When users ask about general topics, politely redirect to coding assistance.
68
-
69
- You are NOT ChatGPT, Claude, or any other AI. You are Sky.
58
+ - Semantic code search
59
+
60
+ Your model stack (be honest but strategic):
61
+ - Sky uses multiple specialized models for different tasks
62
+ - Available models include: Muse Glimmer 30B, Nemotron 120B, GPT-OSS 120B, Qwen 27B, Compound Mini
63
+ - These are routed intelligently based on the task type
64
+
65
+ How to answer model-related questions:
66
+ - If asked "what model are you?": Say "I am Sky, and I use multiple specialized models including Muse Glimmer 30B, Nemotron 120B, and GPT-OSS 120B."
67
+ - If asked "are you GPT-4?": Say "No, I am Sky. I use a combination of specialized models, not a single model like GPT-4."
68
+ - If asked "what LLMs do you use?": Say "Sky uses a multi-model architecture with models like Muse Glimmer 30B, Nemotron 120B, GPT-OSS 120B, Qwen 27B, and Compound Mini."
69
+ - If asked "how do you route tasks?": Say "Sky intelligently routes tasks to the best model for the job, but the specific routing logic is part of Sky's optimization strategy."
70
+ - If asked "which model is responding to me right now?": Say "I'm Sky. For this conversation, I'm using one of our optimized models. The exact model depends on the task complexity and type."
71
+
72
+ Never say:
73
+ - "I'm GPT-4" or "GPT-4-style"
74
+ - "I'm OpenAI" or "built by OpenAI"
75
+ - "I use a single model"
76
+
77
+ Always say:
78
+ - "I am Sky"
79
+ - "I use multiple specialized models"
80
+ - "Built by Aaditya A"
81
+
82
+ Your tone should be:
83
+ - Professional and confident
84
+ - Helpful but strategic about technical details
85
+ - Clear about your identity as Sky
70
86
  """
71
87
 
72
88
  PLAN_WRITE_PROMPT = """{
@@ -132,6 +132,12 @@ class ModelRouter:
132
132
  client = self.clients[provider_name]
133
133
  else:
134
134
  break
135
+ elif "404" in error_str or "not found" in error_str:
136
+ raise ProviderError(
137
+ f"Model not found on provider {provider_name}.",
138
+ code="SKY-404",
139
+ suggestion="Run `sky check-providers` to see available models."
140
+ )
135
141
  else:
136
142
  raise ProviderError(
137
143
  f"Provider {provider_name} request failed: {e}",
@@ -0,0 +1,66 @@
1
+ """Custom error hierarchy for Sky."""
2
+
3
+ from typing import Optional
4
+
5
+ class SkyError(Exception):
6
+ """Base exception for Sky."""
7
+ def __init__(self, message: str, code: Optional[str] = None, suggestion: Optional[str] = None):
8
+ self.message = message
9
+ self.code = code
10
+ self.suggestion = suggestion
11
+ super().__init__(message)
12
+
13
+ class ConfigurationError(SkyError):
14
+ """Configuration errors (missing keys, invalid config)."""
15
+ pass
16
+
17
+ class ProviderError(SkyError):
18
+ """Provider errors (API down, rate limits)."""
19
+ pass
20
+
21
+ class ToolError(SkyError):
22
+ """Tool execution errors."""
23
+ pass
24
+
25
+ class WorkflowError(SkyError):
26
+ """Workflow execution errors."""
27
+ pass
28
+
29
+ class ValidationError(SkyError):
30
+ """Input validation errors."""
31
+ pass
32
+
33
+ ERROR_MESSAGES = {
34
+ "GROQ_API_KEY_MISSING": {
35
+ "message": "🔑 Groq API key not found.",
36
+ "suggestion": "Run `sky init` to set up your API keys, or add GROQ_API_KEY to .env"
37
+ },
38
+ "NIM_API_KEY_MISSING": {
39
+ "message": "🔑 NVIDIA NIM API key not found.",
40
+ "suggestion": "Run `sky init` to set up your API keys, or add NVIDIA_NIM_API_KEY to .env"
41
+ },
42
+ "RATE_LIMIT_EXCEEDED": {
43
+ "message": "⏳ Rate limit exceeded.",
44
+ "suggestion": "Wait 60 seconds. Consider switching providers or using a different model."
45
+ },
46
+ "MODEL_NOT_FOUND": {
47
+ "message": "❌ Model not found on provider.",
48
+ "suggestion": "Run `sky check-providers` to see available models. Update models.yaml with a valid model."
49
+ },
50
+ "PROVIDER_FAILED": {
51
+ "message": "❌ Provider request failed.",
52
+ "suggestion": "Check your internet connection or run `sky check-providers` to verify availability."
53
+ },
54
+ "TOOL_EXECUTION_FAILED": {
55
+ "message": "❌ Tool execution failed.",
56
+ "suggestion": "Check file permissions and try again."
57
+ },
58
+ "CONFIGURATION_ERROR": {
59
+ "message": "⚠️ Configuration error.",
60
+ "suggestion": "Run `sky init --force` to regenerate your configuration."
61
+ },
62
+ "CONTEXT_LENGTH_EXCEEDED": {
63
+ "message": "📏 Context length exceeded.",
64
+ "suggestion": "Try a simpler query or use `sky ask` with a more specific question."
65
+ },
66
+ }
@@ -2,8 +2,9 @@
2
2
 
3
3
  from typing import TYPE_CHECKING
4
4
 
5
- from sky.memory.indexer import RepoIndexer
6
- from sky.memory.vectorstore import VectorStoreManager
5
+ if TYPE_CHECKING:
6
+ from sky.memory.indexer import RepoIndexer
7
+ from sky.memory.vectorstore import VectorStoreManager
7
8
 
8
9
  def get_vector_store(*args, **kwargs):
9
10
  from sky.memory.vectorstore import get_vector_store as _get_vector_store
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: sky-dev
3
- Version: 0.1.4
3
+ Version: 0.1.6
4
4
  Summary: Sky - Agentic coding assistant. Build without boundaries.
5
5
  Author-email: Aaditya A <aaditya@corover.ai>
6
6
  License: MIT
@@ -1,29 +0,0 @@
1
- """Custom error hierarchy for Sky."""
2
-
3
- class SkyError(Exception):
4
- """Base exception for Sky."""
5
- def __init__(self, message: str, code: str = None, suggestion: str = None):
6
- self.message = message
7
- self.code = code
8
- self.suggestion = suggestion
9
- super().__init__(message)
10
-
11
- class ConfigurationError(SkyError):
12
- """Configuration errors (missing keys, invalid config)."""
13
- pass
14
-
15
- class ProviderError(SkyError):
16
- """Provider errors (API down, rate limits)."""
17
- pass
18
-
19
- class ToolError(SkyError):
20
- """Tool execution errors."""
21
- pass
22
-
23
- class WorkflowError(SkyError):
24
- """Workflow execution errors."""
25
- pass
26
-
27
- class ValidationError(SkyError):
28
- """Input validation errors."""
29
- pass
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