psycgod-sage 2.0.1__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 (109) hide show
  1. psycgod_sage-2.0.1/LICENSE +21 -0
  2. psycgod_sage-2.0.1/PKG-INFO +221 -0
  3. psycgod_sage-2.0.1/README.md +181 -0
  4. psycgod_sage-2.0.1/pyproject.toml +71 -0
  5. psycgod_sage-2.0.1/setup.cfg +4 -0
  6. psycgod_sage-2.0.1/src/psycgod_sage.egg-info/PKG-INFO +221 -0
  7. psycgod_sage-2.0.1/src/psycgod_sage.egg-info/SOURCES.txt +107 -0
  8. psycgod_sage-2.0.1/src/psycgod_sage.egg-info/dependency_links.txt +1 -0
  9. psycgod_sage-2.0.1/src/psycgod_sage.egg-info/entry_points.txt +2 -0
  10. psycgod_sage-2.0.1/src/psycgod_sage.egg-info/requires.txt +20 -0
  11. psycgod_sage-2.0.1/src/psycgod_sage.egg-info/top_level.txt +1 -0
  12. psycgod_sage-2.0.1/src/sage/__init__.py +1 -0
  13. psycgod_sage-2.0.1/src/sage/__main__.py +4 -0
  14. psycgod_sage-2.0.1/src/sage/agents/__init__.py +105 -0
  15. psycgod_sage-2.0.1/src/sage/agents/base_agent.py +158 -0
  16. psycgod_sage-2.0.1/src/sage/agents/communication.py +38 -0
  17. psycgod_sage-2.0.1/src/sage/agents/evaluation.py +319 -0
  18. psycgod_sage-2.0.1/src/sage/agents/executor.py +1052 -0
  19. psycgod_sage-2.0.1/src/sage/agents/orchestrator.py +116 -0
  20. psycgod_sage-2.0.1/src/sage/agents/registry.py +128 -0
  21. psycgod_sage-2.0.1/src/sage/agents/specialized/__init__.py +7 -0
  22. psycgod_sage-2.0.1/src/sage/agents/specialized/code_agent.py +34 -0
  23. psycgod_sage-2.0.1/src/sage/agents/specialized/debug_agent.py +32 -0
  24. psycgod_sage-2.0.1/src/sage/agents/specialized/test_agent.py +32 -0
  25. psycgod_sage-2.0.1/src/sage/agents/task_queue.py +54 -0
  26. psycgod_sage-2.0.1/src/sage/artifacts.py +108 -0
  27. psycgod_sage-2.0.1/src/sage/autofix/__init__.py +5 -0
  28. psycgod_sage-2.0.1/src/sage/autofix/analyzers/__init__.py +27 -0
  29. psycgod_sage-2.0.1/src/sage/autofix/analyzers/javascript_analyzer.py +55 -0
  30. psycgod_sage-2.0.1/src/sage/autofix/analyzers/python_analyzer.py +65 -0
  31. psycgod_sage-2.0.1/src/sage/autofix/engine.py +206 -0
  32. psycgod_sage-2.0.1/src/sage/autofix/fixers/__init__.py +21 -0
  33. psycgod_sage-2.0.1/src/sage/autofix/fixers/dependency_fixer.py +35 -0
  34. psycgod_sage-2.0.1/src/sage/autofix/fixers/import_fixer.py +25 -0
  35. psycgod_sage-2.0.1/src/sage/autofix/knowledge_base.py +110 -0
  36. psycgod_sage-2.0.1/src/sage/classify.py +123 -0
  37. psycgod_sage-2.0.1/src/sage/cli.py +2625 -0
  38. psycgod_sage-2.0.1/src/sage/context/__init__.py +8 -0
  39. psycgod_sage-2.0.1/src/sage/context/benchmarks.py +68 -0
  40. psycgod_sage-2.0.1/src/sage/context/compression.py +445 -0
  41. psycgod_sage-2.0.1/src/sage/context/manager.py +181 -0
  42. psycgod_sage-2.0.1/src/sage/context/tokens.py +74 -0
  43. psycgod_sage-2.0.1/src/sage/context/tracker.py +97 -0
  44. psycgod_sage-2.0.1/src/sage/dashboard/__init__.py +5 -0
  45. psycgod_sage-2.0.1/src/sage/dashboard/api/__init__.py +1 -0
  46. psycgod_sage-2.0.1/src/sage/dashboard/api/agents.py +85 -0
  47. psycgod_sage-2.0.1/src/sage/dashboard/api/commands.py +78 -0
  48. psycgod_sage-2.0.1/src/sage/dashboard/api/metrics.py +88 -0
  49. psycgod_sage-2.0.1/src/sage/dashboard/data.py +89 -0
  50. psycgod_sage-2.0.1/src/sage/dashboard/server.py +173 -0
  51. psycgod_sage-2.0.1/src/sage/dashboard/static/index.html +387 -0
  52. psycgod_sage-2.0.1/src/sage/dashboard/websocket.py +32 -0
  53. psycgod_sage-2.0.1/src/sage/detectors.py +68 -0
  54. psycgod_sage-2.0.1/src/sage/fileops.py +371 -0
  55. psycgod_sage-2.0.1/src/sage/github_oauth.py +311 -0
  56. psycgod_sage-2.0.1/src/sage/global_store/__init__.py +6 -0
  57. psycgod_sage-2.0.1/src/sage/global_store/database.py +164 -0
  58. psycgod_sage-2.0.1/src/sage/global_store/sync.py +32 -0
  59. psycgod_sage-2.0.1/src/sage/install.py +175 -0
  60. psycgod_sage-2.0.1/src/sage/mcp/__init__.py +6 -0
  61. psycgod_sage-2.0.1/src/sage/mcp/client.py +268 -0
  62. psycgod_sage-2.0.1/src/sage/mcp/server.py +178 -0
  63. psycgod_sage-2.0.1/src/sage/mcp/tools.py +604 -0
  64. psycgod_sage-2.0.1/src/sage/ml/__init__.py +25 -0
  65. psycgod_sage-2.0.1/src/sage/ml/family_model.py +386 -0
  66. psycgod_sage-2.0.1/src/sage/ml/family_validation.py +213 -0
  67. psycgod_sage-2.0.1/src/sage/ml/features.py +94 -0
  68. psycgod_sage-2.0.1/src/sage/ml/history_features.py +124 -0
  69. psycgod_sage-2.0.1/src/sage/ml/history_importer.py +313 -0
  70. psycgod_sage-2.0.1/src/sage/ml/model.py +397 -0
  71. psycgod_sage-2.0.1/src/sage/ml/predictor.py +179 -0
  72. psycgod_sage-2.0.1/src/sage/ml/validation.py +186 -0
  73. psycgod_sage-2.0.1/src/sage/nlp/__init__.py +6 -0
  74. psycgod_sage-2.0.1/src/sage/nlp/command_builder.py +51 -0
  75. psycgod_sage-2.0.1/src/sage/nlp/parser.py +98 -0
  76. psycgod_sage-2.0.1/src/sage/reader.py +187 -0
  77. psycgod_sage-2.0.1/src/sage/runner.py +435 -0
  78. psycgod_sage-2.0.1/src/sage/savings.py +46 -0
  79. psycgod_sage-2.0.1/src/sage/searcher.py +189 -0
  80. psycgod_sage-2.0.1/src/sage/security.py +183 -0
  81. psycgod_sage-2.0.1/src/sage/store.py +495 -0
  82. psycgod_sage-2.0.1/src/sage/suggestions.py +63 -0
  83. psycgod_sage-2.0.1/src/sage/telemetry.py +995 -0
  84. psycgod_sage-2.0.1/src/sage/telemetry_sender.py +128 -0
  85. psycgod_sage-2.0.1/src/sage/workflows/__init__.py +6 -0
  86. psycgod_sage-2.0.1/src/sage/workflows/conditions.py +14 -0
  87. psycgod_sage-2.0.1/src/sage/workflows/executor.py +153 -0
  88. psycgod_sage-2.0.1/src/sage/workflows/parser.py +100 -0
  89. psycgod_sage-2.0.1/tests/test_10k_context_compression.py +81 -0
  90. psycgod_sage-2.0.1/tests/test_agent_evaluation.py +73 -0
  91. psycgod_sage-2.0.1/tests/test_agent_execution.py +120 -0
  92. psycgod_sage-2.0.1/tests/test_claude_sage_enforcement.py +64 -0
  93. psycgod_sage-2.0.1/tests/test_cli.py +51 -0
  94. psycgod_sage-2.0.1/tests/test_cli_basic.py +255 -0
  95. psycgod_sage-2.0.1/tests/test_commands_and_telemetry.py +375 -0
  96. psycgod_sage-2.0.1/tests/test_compression_metrics.py +139 -0
  97. psycgod_sage-2.0.1/tests/test_context_compression_roadmap.py +71 -0
  98. psycgod_sage-2.0.1/tests/test_dashboard_render.py +40 -0
  99. psycgod_sage-2.0.1/tests/test_db_storage_migration.py +105 -0
  100. psycgod_sage-2.0.1/tests/test_detectors.py +25 -0
  101. psycgod_sage-2.0.1/tests/test_fileops.py +190 -0
  102. psycgod_sage-2.0.1/tests/test_mcp_sage_tools.py +84 -0
  103. psycgod_sage-2.0.1/tests/test_ml_features.py +111 -0
  104. psycgod_sage-2.0.1/tests/test_ml_validation.py +83 -0
  105. psycgod_sage-2.0.1/tests/test_public_package_metadata.py +13 -0
  106. psycgod_sage-2.0.1/tests/test_public_release_docs.py +58 -0
  107. psycgod_sage-2.0.1/tests/test_roadmap_cli.py +149 -0
  108. psycgod_sage-2.0.1/tests/test_security_privacy.py +59 -0
  109. psycgod_sage-2.0.1/tests/test_suggestions.py +27 -0
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 PsYcGoD (SAGE Project)
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,221 @@
1
+ Metadata-Version: 2.4
2
+ Name: psycgod-sage
3
+ Version: 2.0.1
4
+ Summary: Local-first command wrapper for AI coding agents with compressed terminal output and privacy-safe proof metrics.
5
+ Author: PsYcGoD
6
+ License-Expression: MIT
7
+ Project-URL: Homepage, https://github.com/PsYcGoD/sage
8
+ Project-URL: Repository, https://github.com/PsYcGoD/sage
9
+ Project-URL: Issues, https://github.com/PsYcGoD/sage/issues
10
+ Project-URL: Dashboard, https://psyc-god-sage-api.valan-dj.workers.dev/dashboard
11
+ Keywords: ai,cli,terminal,debugging,local assistant,terminal agent
12
+ Classifier: Development Status :: 4 - Beta
13
+ Classifier: Environment :: Console
14
+ Classifier: Intended Audience :: Developers
15
+ Classifier: Programming Language :: Python :: 3
16
+ Classifier: Topic :: Software Development
17
+ Classifier: Topic :: Utilities
18
+ Requires-Python: >=3.10
19
+ Description-Content-Type: text/markdown
20
+ License-File: LICENSE
21
+ Requires-Dist: joblib>=1.3
22
+ Requires-Dist: keyring>=25
23
+ Requires-Dist: pandas>=2.0
24
+ Requires-Dist: PyYAML>=6
25
+ Requires-Dist: scikit-learn>=1.3
26
+ Requires-Dist: tiktoken>=0.7
27
+ Provides-Extra: ai
28
+ Requires-Dist: anthropic>=0.40; extra == "ai"
29
+ Requires-Dist: boto3>=1.34; extra == "ai"
30
+ Requires-Dist: google-generativeai>=0.8; extra == "ai"
31
+ Requires-Dist: openai>=1.50; extra == "ai"
32
+ Requires-Dist: requests>=2.31; extra == "ai"
33
+ Provides-Extra: all
34
+ Requires-Dist: anthropic>=0.40; extra == "all"
35
+ Requires-Dist: boto3>=1.34; extra == "all"
36
+ Requires-Dist: google-generativeai>=0.8; extra == "all"
37
+ Requires-Dist: openai>=1.50; extra == "all"
38
+ Requires-Dist: requests>=2.31; extra == "all"
39
+ Dynamic: license-file
40
+
41
+ # SAGE
42
+
43
+ [![CI](https://github.com/PsYcGoD/sage/actions/workflows/ci.yml/badge.svg)](https://github.com/PsYcGoD/sage/actions/workflows/ci.yml)
44
+ [![Python](https://img.shields.io/badge/python-3.10%2B-blue.svg)](pyproject.toml)
45
+ [![License](https://img.shields.io/github/license/PsYcGoD/sage.svg)](LICENSE)
46
+ [![Release](https://img.shields.io/github/v/release/PsYcGoD/sage?include_prereleases)](https://github.com/PsYcGoD/sage/releases)
47
+
48
+ SAGE is a local-first command wrapper for AI coding agents that compresses terminal output, preserves raw logs locally, and proves token savings with privacy-safe metrics.
49
+
50
+ The public package is CLI-first. The desktop GUI is not included in this public repository yet.
51
+
52
+ ## Live Public Proof Dashboard
53
+
54
+ Live dashboard: https://psyc-god-sage-api.valan-dj.workers.dev/dashboard
55
+
56
+ ![SAGE Live Public Proof Dashboard](docs/assets/sage-live-dashboard.png)
57
+
58
+ Current public proof includes:
59
+
60
+ - Total commands processed through SAGE
61
+ - Tokens processed, compressed, and saved
62
+ - Estimated savings by AI agent/provider
63
+ - Compression rate and command success rate
64
+ - ML prediction scoring from local command history
65
+
66
+ Latest verified snapshot:
67
+
68
+ | Metric | Value |
69
+ |--------|------:|
70
+ | Commands processed | 4,726 |
71
+ | Tokens processed | 16,870,812 |
72
+ | Tokens compressed | 1,225,605 |
73
+ | Tokens saved | 15,645,207 |
74
+ | Estimated savings | $46.94 |
75
+ | Compression rate | 92.74% |
76
+ | Success rate | 98.03% |
77
+
78
+ These stats reflect the public CLI proof snapshot after the hosted dashboard went live.
79
+ Raw commands, outputs, file paths, and logs stay local by default. Public proof uses aggregate counters only.
80
+
81
+ ## Install From GitHub Until PyPI Is Live
82
+
83
+ PyPI publishing is prepared but still blocked by the Trusted Publisher project-name mismatch. Until the PyPI project is live, install the public CLI directly from GitHub:
84
+
85
+ ```bash
86
+ pip install git+https://github.com/PsYcGoD/sage.git
87
+ sage --version
88
+ ```
89
+
90
+ After PyPI is live, the install command will be:
91
+
92
+ ```bash
93
+ pip install psycgod-sage
94
+ sage --version
95
+ ```
96
+
97
+ For local development:
98
+
99
+ ```bash
100
+ git clone https://github.com/PsYcGoD/sage.git
101
+ cd sage
102
+ pip install -e .
103
+ sage --version
104
+ ```
105
+
106
+ The prepared PyPI distribution is `psycgod-sage`; the installed CLI command is still `sage`.
107
+
108
+ ## Connect Your Account
109
+
110
+ Most public API-backed commands require GitHub OAuth:
111
+
112
+ ```bash
113
+ sage connect
114
+ sage whoami
115
+ sage api status
116
+ ```
117
+
118
+ SAGE stores the API key in the operating system keyring when available. Local command history and raw outputs remain on your machine.
119
+
120
+ ## Bind Agent Instructions
121
+
122
+ Create local SAGE instructions for terminal agents:
123
+
124
+ ```bash
125
+ sage init
126
+ ```
127
+
128
+ This writes `SAGE.md` in the current project. Give that file to your local AI coding agent, or bind the same rule into your `AGENTS.md` / agent instruction file:
129
+
130
+ ```text
131
+ Route every shell command through:
132
+
133
+ sage run -- <command>
134
+ ```
135
+
136
+ ## Run Commands Through SAGE
137
+
138
+ ```bash
139
+ sage run -- python -m pytest
140
+ sage run -- npm test
141
+ sage run -- git status
142
+ ```
143
+
144
+ SAGE stores full raw command output locally, summarizes noisy output for AI context, tracks compression, and sends only allowed aggregate proof metrics to the dashboard.
145
+
146
+ ## Useful CLI Commands
147
+
148
+ ```bash
149
+ sage context stats
150
+ sage context report
151
+ sage history --limit 10
152
+ sage explain
153
+ sage suggest
154
+ sage fix
155
+ sage fix --apply --confidence 0.9
156
+ sage savings --agent claude-sonnet
157
+ sage firewall status
158
+ sage firewall rules list
159
+ sage github-bot comment --kind summary
160
+ sage mcp install
161
+ sage dashboard start --port 8765
162
+ ```
163
+
164
+ ## Team View Preview
165
+
166
+ Team Dashboard is not published yet. It will open by invite after SAGE reaches 100 users.
167
+
168
+ ![SAGE Team View Preview](docs/assets/team-dashboard-preview.png)
169
+
170
+ The planned Team View will show aggregate workspace proof only: tokens saved, success rate, safety events, and protected secrets. It will not publish raw commands, source code, file paths, `.env` data, or raw logs.
171
+
172
+ ## Screenshots
173
+
174
+ | Command | Preview |
175
+ |---|---|
176
+ | `sage run --` | ![sage run terminal capture](docs/assets/sage-run.svg) |
177
+ | `sage context report` | ![sage context report terminal capture](docs/assets/sage-context-report.svg) |
178
+ | `sage mcp install` | ![sage mcp install terminal capture](docs/assets/sage-mcp-install.svg) |
179
+ | Dashboard proof | ![SAGE Live Public Proof Dashboard](docs/assets/sage-live-dashboard.png) |
180
+
181
+ Starter demo GIFs:
182
+
183
+ - [`demo-sage-run.gif`](docs/assets/demo-sage-run.gif)
184
+ - [`demo-sage-savings.gif`](docs/assets/demo-sage-savings.gif)
185
+ - [`demo-github-bot.gif`](docs/assets/demo-github-bot.gif)
186
+
187
+ ## GUI Status
188
+
189
+ The desktop GUI is not available in this public repo right now.
190
+
191
+ ```bash
192
+ sage gui
193
+ ```
194
+
195
+ This command prints the roadmap status instead of launching a desktop app. The GUI will be released later with AI agents and ML workflows after it is stable enough for public use.
196
+
197
+ ## Known Limitations
198
+
199
+ - The GUI is not public yet and is intentionally absent from the CLI package.
200
+ - GitHub OAuth / a SAGE API key is required for most API-backed commands and public proof sync.
201
+ - Telemetry level `0` is local-only; higher levels are opt-in and constrained by account/key policy.
202
+ - The public dashboard is aggregate-only and does not expose raw commands, raw outputs, file paths, or local logs.
203
+ - Local ML and agent features depend on local history volume and optional provider credentials.
204
+
205
+ ## Privacy
206
+
207
+ - Raw commands and full outputs stay local by default.
208
+ - Public dashboard data is aggregate proof only.
209
+ - API connection is handled through GitHub OAuth.
210
+ - Higher telemetry is opt-in.
211
+ - API keys are stored in the OS keyring when available.
212
+
213
+ See [PRIVACY.md](PRIVACY.md) and [SECURITY.md](SECURITY.md) for the detailed data and security model.
214
+
215
+ ## Development
216
+
217
+ ```bash
218
+ python -m pytest -q
219
+ ```
220
+
221
+ The public package is CLI-first. GUI source, GUI tests, and GUI-only dependencies are intentionally not shipped in this repo at this time.
@@ -0,0 +1,181 @@
1
+ # SAGE
2
+
3
+ [![CI](https://github.com/PsYcGoD/sage/actions/workflows/ci.yml/badge.svg)](https://github.com/PsYcGoD/sage/actions/workflows/ci.yml)
4
+ [![Python](https://img.shields.io/badge/python-3.10%2B-blue.svg)](pyproject.toml)
5
+ [![License](https://img.shields.io/github/license/PsYcGoD/sage.svg)](LICENSE)
6
+ [![Release](https://img.shields.io/github/v/release/PsYcGoD/sage?include_prereleases)](https://github.com/PsYcGoD/sage/releases)
7
+
8
+ SAGE is a local-first command wrapper for AI coding agents that compresses terminal output, preserves raw logs locally, and proves token savings with privacy-safe metrics.
9
+
10
+ The public package is CLI-first. The desktop GUI is not included in this public repository yet.
11
+
12
+ ## Live Public Proof Dashboard
13
+
14
+ Live dashboard: https://psyc-god-sage-api.valan-dj.workers.dev/dashboard
15
+
16
+ ![SAGE Live Public Proof Dashboard](docs/assets/sage-live-dashboard.png)
17
+
18
+ Current public proof includes:
19
+
20
+ - Total commands processed through SAGE
21
+ - Tokens processed, compressed, and saved
22
+ - Estimated savings by AI agent/provider
23
+ - Compression rate and command success rate
24
+ - ML prediction scoring from local command history
25
+
26
+ Latest verified snapshot:
27
+
28
+ | Metric | Value |
29
+ |--------|------:|
30
+ | Commands processed | 4,726 |
31
+ | Tokens processed | 16,870,812 |
32
+ | Tokens compressed | 1,225,605 |
33
+ | Tokens saved | 15,645,207 |
34
+ | Estimated savings | $46.94 |
35
+ | Compression rate | 92.74% |
36
+ | Success rate | 98.03% |
37
+
38
+ These stats reflect the public CLI proof snapshot after the hosted dashboard went live.
39
+ Raw commands, outputs, file paths, and logs stay local by default. Public proof uses aggregate counters only.
40
+
41
+ ## Install From GitHub Until PyPI Is Live
42
+
43
+ PyPI publishing is prepared but still blocked by the Trusted Publisher project-name mismatch. Until the PyPI project is live, install the public CLI directly from GitHub:
44
+
45
+ ```bash
46
+ pip install git+https://github.com/PsYcGoD/sage.git
47
+ sage --version
48
+ ```
49
+
50
+ After PyPI is live, the install command will be:
51
+
52
+ ```bash
53
+ pip install psycgod-sage
54
+ sage --version
55
+ ```
56
+
57
+ For local development:
58
+
59
+ ```bash
60
+ git clone https://github.com/PsYcGoD/sage.git
61
+ cd sage
62
+ pip install -e .
63
+ sage --version
64
+ ```
65
+
66
+ The prepared PyPI distribution is `psycgod-sage`; the installed CLI command is still `sage`.
67
+
68
+ ## Connect Your Account
69
+
70
+ Most public API-backed commands require GitHub OAuth:
71
+
72
+ ```bash
73
+ sage connect
74
+ sage whoami
75
+ sage api status
76
+ ```
77
+
78
+ SAGE stores the API key in the operating system keyring when available. Local command history and raw outputs remain on your machine.
79
+
80
+ ## Bind Agent Instructions
81
+
82
+ Create local SAGE instructions for terminal agents:
83
+
84
+ ```bash
85
+ sage init
86
+ ```
87
+
88
+ This writes `SAGE.md` in the current project. Give that file to your local AI coding agent, or bind the same rule into your `AGENTS.md` / agent instruction file:
89
+
90
+ ```text
91
+ Route every shell command through:
92
+
93
+ sage run -- <command>
94
+ ```
95
+
96
+ ## Run Commands Through SAGE
97
+
98
+ ```bash
99
+ sage run -- python -m pytest
100
+ sage run -- npm test
101
+ sage run -- git status
102
+ ```
103
+
104
+ SAGE stores full raw command output locally, summarizes noisy output for AI context, tracks compression, and sends only allowed aggregate proof metrics to the dashboard.
105
+
106
+ ## Useful CLI Commands
107
+
108
+ ```bash
109
+ sage context stats
110
+ sage context report
111
+ sage history --limit 10
112
+ sage explain
113
+ sage suggest
114
+ sage fix
115
+ sage fix --apply --confidence 0.9
116
+ sage savings --agent claude-sonnet
117
+ sage firewall status
118
+ sage firewall rules list
119
+ sage github-bot comment --kind summary
120
+ sage mcp install
121
+ sage dashboard start --port 8765
122
+ ```
123
+
124
+ ## Team View Preview
125
+
126
+ Team Dashboard is not published yet. It will open by invite after SAGE reaches 100 users.
127
+
128
+ ![SAGE Team View Preview](docs/assets/team-dashboard-preview.png)
129
+
130
+ The planned Team View will show aggregate workspace proof only: tokens saved, success rate, safety events, and protected secrets. It will not publish raw commands, source code, file paths, `.env` data, or raw logs.
131
+
132
+ ## Screenshots
133
+
134
+ | Command | Preview |
135
+ |---|---|
136
+ | `sage run --` | ![sage run terminal capture](docs/assets/sage-run.svg) |
137
+ | `sage context report` | ![sage context report terminal capture](docs/assets/sage-context-report.svg) |
138
+ | `sage mcp install` | ![sage mcp install terminal capture](docs/assets/sage-mcp-install.svg) |
139
+ | Dashboard proof | ![SAGE Live Public Proof Dashboard](docs/assets/sage-live-dashboard.png) |
140
+
141
+ Starter demo GIFs:
142
+
143
+ - [`demo-sage-run.gif`](docs/assets/demo-sage-run.gif)
144
+ - [`demo-sage-savings.gif`](docs/assets/demo-sage-savings.gif)
145
+ - [`demo-github-bot.gif`](docs/assets/demo-github-bot.gif)
146
+
147
+ ## GUI Status
148
+
149
+ The desktop GUI is not available in this public repo right now.
150
+
151
+ ```bash
152
+ sage gui
153
+ ```
154
+
155
+ This command prints the roadmap status instead of launching a desktop app. The GUI will be released later with AI agents and ML workflows after it is stable enough for public use.
156
+
157
+ ## Known Limitations
158
+
159
+ - The GUI is not public yet and is intentionally absent from the CLI package.
160
+ - GitHub OAuth / a SAGE API key is required for most API-backed commands and public proof sync.
161
+ - Telemetry level `0` is local-only; higher levels are opt-in and constrained by account/key policy.
162
+ - The public dashboard is aggregate-only and does not expose raw commands, raw outputs, file paths, or local logs.
163
+ - Local ML and agent features depend on local history volume and optional provider credentials.
164
+
165
+ ## Privacy
166
+
167
+ - Raw commands and full outputs stay local by default.
168
+ - Public dashboard data is aggregate proof only.
169
+ - API connection is handled through GitHub OAuth.
170
+ - Higher telemetry is opt-in.
171
+ - API keys are stored in the OS keyring when available.
172
+
173
+ See [PRIVACY.md](PRIVACY.md) and [SECURITY.md](SECURITY.md) for the detailed data and security model.
174
+
175
+ ## Development
176
+
177
+ ```bash
178
+ python -m pytest -q
179
+ ```
180
+
181
+ The public package is CLI-first. GUI source, GUI tests, and GUI-only dependencies are intentionally not shipped in this repo at this time.
@@ -0,0 +1,71 @@
1
+ [build-system]
2
+ requires = ["setuptools>=77"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "psycgod-sage"
7
+ version = "2.0.1"
8
+ description = "Local-first command wrapper for AI coding agents with compressed terminal output and privacy-safe proof metrics."
9
+ readme = "README.md"
10
+ requires-python = ">=3.10"
11
+ dependencies = [
12
+ "joblib>=1.3",
13
+ "keyring>=25",
14
+ "pandas>=2.0",
15
+ "PyYAML>=6",
16
+ "scikit-learn>=1.3",
17
+ "tiktoken>=0.7",
18
+ ]
19
+
20
+ license = "MIT"
21
+ license-files = ["LICENSE*"]
22
+ authors = [
23
+ { name = "PsYcGoD" }
24
+ ]
25
+ keywords = ["ai", "cli", "terminal", "debugging", "local assistant", "terminal agent"]
26
+ classifiers = [
27
+ "Development Status :: 4 - Beta",
28
+ "Environment :: Console",
29
+ "Intended Audience :: Developers",
30
+ "Programming Language :: Python :: 3",
31
+ "Topic :: Software Development",
32
+ "Topic :: Utilities"
33
+ ]
34
+
35
+ [project.optional-dependencies]
36
+ ai = [
37
+ "anthropic>=0.40",
38
+ "boto3>=1.34",
39
+ "google-generativeai>=0.8",
40
+ "openai>=1.50",
41
+ "requests>=2.31",
42
+ ]
43
+ all = [
44
+ "anthropic>=0.40",
45
+ "boto3>=1.34",
46
+ "google-generativeai>=0.8",
47
+ "openai>=1.50",
48
+ "requests>=2.31",
49
+ ]
50
+
51
+ [project.scripts]
52
+ sage = "sage.cli:main"
53
+
54
+ [project.urls]
55
+ Homepage = "https://github.com/PsYcGoD/sage"
56
+ Repository = "https://github.com/PsYcGoD/sage"
57
+ Issues = "https://github.com/PsYcGoD/sage/issues"
58
+ Dashboard = "https://psyc-god-sage-api.valan-dj.workers.dev/dashboard"
59
+
60
+ [tool.setuptools.packages.find]
61
+ where = ["src"]
62
+
63
+ [tool.setuptools.package-data]
64
+ "sage.dashboard" = ["static/*.html"]
65
+
66
+ [tool.pytest.ini_options]
67
+ testpaths = ["tests"]
68
+ addopts = "-m 'not live' --ignore=tests/live --ignore=tests/tests"
69
+ markers = [
70
+ "live: spawns real CLIs or long-running processes; excluded by default and in CI",
71
+ ]
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+