raggiecode 0.2.1__py3-none-any.whl

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 (93) hide show
  1. Agent/__init__.py +0 -0
  2. Agent/agent.py +891 -0
  3. Agent/chat_history_db.py +1500 -0
  4. Agent/command.py +49 -0
  5. Agent/config.py +46 -0
  6. Agent/effort_levels.py +33 -0
  7. Agent/git_manager.py +727 -0
  8. Agent/tools.py +35 -0
  9. Commands/__init__.py +18 -0
  10. Commands/effort.py +42 -0
  11. Commands/global_todo.py +23 -0
  12. Commands/help.py +22 -0
  13. Commands/reasoning.py +24 -0
  14. Commands/redo.py +11 -0
  15. Commands/reindex.py +27 -0
  16. Commands/shell.py +28 -0
  17. Commands/stream.py +24 -0
  18. Commands/undo.py +13 -0
  19. Commands/unlimited_effort.py +8 -0
  20. Commands/window_size.py +29 -0
  21. RAG/__init__.py +0 -0
  22. RAG/document.py +119 -0
  23. RAG/find.py +408 -0
  24. RAG/graph.py +231 -0
  25. Tools/GetFileCodeStructure.py +43 -0
  26. Tools/GetSymbolSourceCode.py +27 -0
  27. Tools/__init__.py +39 -0
  28. Tools/ask_user.py +102 -0
  29. Tools/dispatch_subagent.py +215 -0
  30. Tools/document.py +35 -0
  31. Tools/edit_symbol.py +250 -0
  32. Tools/fuzzy_search.py +119 -0
  33. Tools/list_dir.py +51 -0
  34. Tools/read.py +49 -0
  35. Tools/read_image.py +75 -0
  36. Tools/remove.py +75 -0
  37. Tools/replace.py +305 -0
  38. Tools/search.py +41 -0
  39. Tools/shell.py +149 -0
  40. Tools/shell_kill.py +87 -0
  41. Tools/temp_background_service.py +113 -0
  42. Tools/todo_list.py +481 -0
  43. Tools/utils.py +116 -0
  44. Tools/view_changes.py +179 -0
  45. Tools/walk_call_tree.py +30 -0
  46. Tools/web_fetch.py +175 -0
  47. Tools/web_search.py +69 -0
  48. Tools/write.py +48 -0
  49. cli.py +111 -0
  50. config/__init__.py +0 -0
  51. config/coder_system_prompt.md +119 -0
  52. config/roles.json +43 -0
  53. config/tools.json +709 -0
  54. indexing/__init__.py +0 -0
  55. indexing/cli.py +128 -0
  56. indexing/code_index_sdk.py +832 -0
  57. indexing/code_indexer.py +1763 -0
  58. indexing/db_schema.py +396 -0
  59. indexing/export_to_json.py +346 -0
  60. indexing/extractors.py +189 -0
  61. indexing/file_utils.py +97 -0
  62. indexing/frontend/__init__.py +0 -0
  63. indexing/frontend/css_extractor.py +195 -0
  64. indexing/frontend/css_parser.py +387 -0
  65. indexing/frontend/css_selector_utils.py +226 -0
  66. indexing/frontend/edit_safety.py +573 -0
  67. indexing/frontend/graph.py +838 -0
  68. indexing/frontend/html_extractor.py +496 -0
  69. indexing/frontend/html_parser.py +314 -0
  70. indexing/frontend/jsx_extractor.py +1204 -0
  71. indexing/frontend/location_lookup.py +247 -0
  72. indexing/frontend/resolver.py +485 -0
  73. indexing/frontend/runtime_resolver.py +862 -0
  74. indexing/frontend/semantic_output.py +705 -0
  75. indexing/frontend/source_location.py +69 -0
  76. indexing/frontend_config.py +72 -0
  77. indexing/frontend_models.py +347 -0
  78. indexing/language_config.py +360 -0
  79. indexing/models.py +284 -0
  80. indexing/node_utils.py +1112 -0
  81. indexing/parse_worker.py +1082 -0
  82. indexing/queries.py +1542 -0
  83. indexing/sdk_examples.py +426 -0
  84. interactive.py +248 -0
  85. raggie.py +673 -0
  86. raggiecode-0.2.1.dist-info/METADATA +944 -0
  87. raggiecode-0.2.1.dist-info/RECORD +93 -0
  88. raggiecode-0.2.1.dist-info/WHEEL +5 -0
  89. raggiecode-0.2.1.dist-info/entry_points.txt +2 -0
  90. raggiecode-0.2.1.dist-info/top_level.txt +10 -0
  91. skills/__init__.py +3 -0
  92. skills/manager.py +114 -0
  93. skills/tool.py +121 -0
indexing/__init__.py ADDED
File without changes
indexing/cli.py ADDED
@@ -0,0 +1,128 @@
1
+ """
2
+ CLI argument parsing for the code indexer.
3
+ """
4
+
5
+ import argparse
6
+ from indexing.language_config import LANGUAGE_CONFIG, is_language_available
7
+
8
+
9
+ FRONTEND_LANGUAGES = ["html", "css", "tsx", "javascript"]
10
+
11
+
12
+ def create_argument_parser():
13
+ """Create and configure the argument parser."""
14
+ parser = argparse.ArgumentParser(
15
+ description="Code Indexer - Index source code files using tree-sitter",
16
+ formatter_class=argparse.RawDescriptionHelpFormatter,
17
+ epilog="""
18
+ Supported languages:
19
+ python, go, csharp, javascript, typescript, rust, zig, elixir, cpp
20
+ Frontend: html, css, tsx (jsx via javascript)
21
+
22
+ Examples:
23
+ python code_indexer.py . # Index all supported languages
24
+ python code_indexer.py . -l python,go # Index only Python and Go files
25
+ python code_indexer.py . -o my_index.json # Save to custom output file
26
+ python code_indexer.py . --frontend # Enable frontend indexing
27
+ python code_indexer.py . --no-frontend # Disable frontend indexing
28
+ python code_indexer.py --list-frontend-languages # List frontend languages
29
+ """
30
+ )
31
+
32
+ parser.add_argument(
33
+ "directory",
34
+ nargs='?',
35
+ help="Directory to index (required for indexing mode)"
36
+ )
37
+
38
+ parser.add_argument(
39
+ "-l", "--languages",
40
+ help="Languages to index (comma-separated, default: all supported languages)"
41
+ )
42
+
43
+ parser.add_argument(
44
+ "-o", "--output",
45
+ default="code_index.db",
46
+ help="Output SQLite database file (default: code_index.db)"
47
+ )
48
+
49
+ parser.add_argument(
50
+ "--list-languages",
51
+ action="store_true",
52
+ help="List all supported languages and exit"
53
+ )
54
+
55
+ parser.add_argument(
56
+ "--list-frontend-languages",
57
+ action="store_true",
58
+ help="List supported frontend languages and exit"
59
+ )
60
+
61
+ frontend_group = parser.add_mutually_exclusive_group()
62
+ frontend_group.add_argument(
63
+ "--frontend",
64
+ action="store_true",
65
+ default=True,
66
+ help="Enable frontend indexing (HTML, CSS, JSX/TSX) (default: enabled)"
67
+ )
68
+ frontend_group.add_argument(
69
+ "--no-frontend",
70
+ action="store_false",
71
+ dest="frontend",
72
+ help="Disable frontend indexing"
73
+ )
74
+
75
+ parser.add_argument(
76
+ "--export-json",
77
+ metavar="JSON_FILE",
78
+ help="Export SQLite database to JSON file"
79
+ )
80
+
81
+ parser.add_argument(
82
+ "--force",
83
+ action="store_true",
84
+ help="Force reindexing of all files, ignoring hash checks"
85
+ )
86
+
87
+ parser.add_argument(
88
+ "--graph",
89
+ metavar="FILE_PATH",
90
+ help="View dependency graph for a specific file (relative path)"
91
+ )
92
+
93
+ parser.add_argument(
94
+ "-v", "--verbose",
95
+ action="store_true",
96
+ help="Print detailed timing and progress information"
97
+ )
98
+
99
+ return parser
100
+
101
+
102
+ def parse_arguments(args=None):
103
+ """Parse command line arguments."""
104
+ parser = create_argument_parser()
105
+ return parser.parse_args(args)
106
+
107
+
108
+ def list_supported_languages():
109
+ """Print all supported languages and their status."""
110
+ print("Supported languages:")
111
+ for lang in LANGUAGE_CONFIG.keys():
112
+ config = LANGUAGE_CONFIG[lang]
113
+ status = "ok" if is_language_available(lang) else "disabled (not installed)"
114
+ print(f" {lang:12} {status}")
115
+ print(f" Extensions: {', '.join(config['extensions'])}")
116
+
117
+
118
+ def list_frontend_languages():
119
+ """Print supported frontend languages and their status."""
120
+ print("Supported frontend languages:")
121
+ for lang in FRONTEND_LANGUAGES:
122
+ if lang in LANGUAGE_CONFIG:
123
+ config = LANGUAGE_CONFIG[lang]
124
+ status = "ok" if is_language_available(lang) else "disabled (not installed)"
125
+ print(f" {lang:12} {status}")
126
+ print(f" Extensions: {', '.join(config['extensions'])}")
127
+ else:
128
+ print(f" {lang:12} not configured")