netra-zen 1.0.9__tar.gz → 1.0.11__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 (66) hide show
  1. {netra_zen-1.0.9 → netra_zen-1.0.11}/LICENSE.md +1 -1
  2. {netra_zen-1.0.9 → netra_zen-1.0.11}/MANIFEST.in +36 -36
  3. {netra_zen-1.0.9/netra_zen.egg-info → netra_zen-1.0.11}/PKG-INFO +36 -15
  4. {netra_zen-1.0.9 → netra_zen-1.0.11}/README.md +938 -917
  5. {netra_zen-1.0.9 → netra_zen-1.0.11}/agent_interface/__init__.py +25 -25
  6. {netra_zen-1.0.9 → netra_zen-1.0.11}/agent_interface/base_agent.py +350 -350
  7. {netra_zen-1.0.9 → netra_zen-1.0.11}/config_example.json +11 -11
  8. {netra_zen-1.0.9 → netra_zen-1.0.11}/docs/CACHE_TOKENS_GUIDE.md +398 -398
  9. {netra_zen-1.0.9 → netra_zen-1.0.11}/docs/Cost_allocation.md +372 -372
  10. {netra_zen-1.0.9 → netra_zen-1.0.11}/docs/DOLLAR_BUDGET_USAGE_EXAMPLES.md +137 -137
  11. {netra_zen-1.0.9 → netra_zen-1.0.11}/docs/EXAMPLES.md +139 -139
  12. {netra_zen-1.0.9 → netra_zen-1.0.11}/docs/MODEL_COLUMN_GUIDE.md +159 -159
  13. {netra_zen-1.0.9 → netra_zen-1.0.11}/docs/apex_integration_test_plan.md +248 -245
  14. {netra_zen-1.0.9 → netra_zen-1.0.11}/docs/zen_agent_cli_parallel_plan.md +150 -150
  15. {netra_zen-1.0.9 → netra_zen-1.0.11/netra_zen.egg-info}/PKG-INFO +36 -15
  16. {netra_zen-1.0.9 → netra_zen-1.0.11}/netra_zen.egg-info/SOURCES.txt +4 -0
  17. {netra_zen-1.0.9 → netra_zen-1.0.11}/prebuilt_commands_example.json +29 -29
  18. {netra_zen-1.0.9 → netra_zen-1.0.11}/pyproject.toml +153 -153
  19. {netra_zen-1.0.9 → netra_zen-1.0.11}/requirements.txt +12 -12
  20. {netra_zen-1.0.9 → netra_zen-1.0.11}/scripts/__init__.py +1 -1
  21. {netra_zen-1.0.9 → netra_zen-1.0.11}/scripts/__main__.py +5 -5
  22. {netra_zen-1.0.9 → netra_zen-1.0.11}/scripts/agent_cli.py +7179 -6948
  23. {netra_zen-1.0.9 → netra_zen-1.0.11}/scripts/agent_logs.py +327 -327
  24. {netra_zen-1.0.9 → netra_zen-1.0.11}/scripts/bump_version.py +137 -137
  25. {netra_zen-1.0.9 → netra_zen-1.0.11}/scripts/demo_log_collection.py +146 -144
  26. {netra_zen-1.0.9 → netra_zen-1.0.11}/scripts/embed_release_credentials.py +75 -75
  27. netra_zen-1.0.11/scripts/test_apex_telemetry_debug.py +221 -0
  28. {netra_zen-1.0.9 → netra_zen-1.0.11}/scripts/verify_log_transmission.py +140 -140
  29. {netra_zen-1.0.9 → netra_zen-1.0.11}/setup.py +60 -60
  30. {netra_zen-1.0.9 → netra_zen-1.0.11}/tests/__init__.py +5 -5
  31. netra_zen-1.0.11/tests/htmlcov/status.json +1 -0
  32. {netra_zen-1.0.9 → netra_zen-1.0.11}/tests/test_agent_interface.py +389 -389
  33. {netra_zen-1.0.9 → netra_zen-1.0.11}/tests/test_agent_logs.py +783 -783
  34. {netra_zen-1.0.9 → netra_zen-1.0.11}/tests/test_apex_integration.py +228 -228
  35. netra_zen-1.0.11/tests/test_apex_telemetry.py +195 -0
  36. {netra_zen-1.0.9 → netra_zen-1.0.11}/tests/test_cli_extensions.py +365 -365
  37. {netra_zen-1.0.9 → netra_zen-1.0.11}/tests/test_cli_integration.py +328 -328
  38. {netra_zen-1.0.9 → netra_zen-1.0.11}/tests/test_dollar_budget_enhancement.py +279 -279
  39. {netra_zen-1.0.9 → netra_zen-1.0.11}/tests/test_permission_fix_windows.py +262 -262
  40. {netra_zen-1.0.9 → netra_zen-1.0.11}/tests/test_pricing_engine.py +373 -373
  41. {netra_zen-1.0.9 → netra_zen-1.0.11}/tests/test_runner.py +118 -118
  42. {netra_zen-1.0.9 → netra_zen-1.0.11}/tests/test_workspace_detection.py +55 -55
  43. {netra_zen-1.0.9 → netra_zen-1.0.11}/tests/test_zen_commands.py +437 -437
  44. {netra_zen-1.0.9 → netra_zen-1.0.11}/tests/test_zen_integration.py +497 -497
  45. {netra_zen-1.0.9 → netra_zen-1.0.11}/tests/test_zen_metrics.py +465 -465
  46. {netra_zen-1.0.9 → netra_zen-1.0.11}/tests/test_zen_unit.py +692 -692
  47. {netra_zen-1.0.9 → netra_zen-1.0.11}/token_budget/budget_manager.py +199 -199
  48. {netra_zen-1.0.9 → netra_zen-1.0.11}/token_budget/models.py +73 -73
  49. {netra_zen-1.0.9 → netra_zen-1.0.11}/token_budget/visualization.py +21 -21
  50. {netra_zen-1.0.9 → netra_zen-1.0.11}/token_transparency/__init__.py +19 -19
  51. {netra_zen-1.0.9 → netra_zen-1.0.11}/token_transparency/claude_pricing_engine.py +326 -326
  52. {netra_zen-1.0.9 → netra_zen-1.0.11}/zen/__init__.py +7 -7
  53. {netra_zen-1.0.9 → netra_zen-1.0.11}/zen/__main__.py +11 -11
  54. {netra_zen-1.0.9 → netra_zen-1.0.11}/zen/telemetry/__init__.py +14 -11
  55. netra_zen-1.0.11/zen/telemetry/apex_telemetry.py +259 -0
  56. {netra_zen-1.0.9 → netra_zen-1.0.11}/zen/telemetry/embedded_credentials.py +59 -59
  57. {netra_zen-1.0.9 → netra_zen-1.0.11}/zen/telemetry/manager.py +249 -249
  58. {netra_zen-1.0.9 → netra_zen-1.0.11}/zen_orchestrator.py +3058 -3008
  59. {netra_zen-1.0.9 → netra_zen-1.0.11}/netra_zen.egg-info/dependency_links.txt +0 -0
  60. {netra_zen-1.0.9 → netra_zen-1.0.11}/netra_zen.egg-info/entry_points.txt +0 -0
  61. {netra_zen-1.0.9 → netra_zen-1.0.11}/netra_zen.egg-info/requires.txt +0 -0
  62. {netra_zen-1.0.9 → netra_zen-1.0.11}/netra_zen.egg-info/top_level.txt +0 -0
  63. {netra_zen-1.0.9 → netra_zen-1.0.11}/requirements-dev.txt +0 -0
  64. {netra_zen-1.0.9 → netra_zen-1.0.11}/setup.cfg +0 -0
  65. {netra_zen-1.0.9 → netra_zen-1.0.11}/tests/test_direct_command_execution.py +0 -0
  66. {netra_zen-1.0.9 → netra_zen-1.0.11}/token_budget/__init__.py +0 -0
@@ -1 +1 @@
1
- © Netra Inc. All rights reserved. Use is subject to Netra's Terms of Service.
1
+ © Netra Inc. All rights reserved. Use is subject to Netra's Terms of Service.
@@ -1,37 +1,37 @@
1
- # Include documentation
2
- include README.md
3
- include LICENSE
4
- include CHANGELOG.md
5
- include PACKAGING.md
6
-
7
- # Include configuration examples
8
- include *.json
9
-
10
- # Include requirements files
11
- include requirements*.txt
12
-
13
- # Include test files
14
- recursive-include tests *.py
15
- recursive-include tests *.json
16
- recursive-include tests *.yaml
17
-
18
- # Include documentation
19
- recursive-include docs *.md
20
- recursive-include docs *.rst
21
-
22
- # Include package data
23
- recursive-include agent_interface *.py
24
- recursive-include token_budget *.py
25
- recursive-include token_transparency *.py
26
-
27
- # Exclude unnecessary files
28
- global-exclude *.pyc
29
- global-exclude *.pyo
30
- global-exclude *.swp
31
- global-exclude .DS_Store
32
- global-exclude __pycache__
33
- exclude .gitignore
34
- exclude .github
35
- exclude tox.ini
36
- exclude .coverage
1
+ # Include documentation
2
+ include README.md
3
+ include LICENSE
4
+ include CHANGELOG.md
5
+ include PACKAGING.md
6
+
7
+ # Include configuration examples
8
+ include *.json
9
+
10
+ # Include requirements files
11
+ include requirements*.txt
12
+
13
+ # Include test files
14
+ recursive-include tests *.py
15
+ recursive-include tests *.json
16
+ recursive-include tests *.yaml
17
+
18
+ # Include documentation
19
+ recursive-include docs *.md
20
+ recursive-include docs *.rst
21
+
22
+ # Include package data
23
+ recursive-include agent_interface *.py
24
+ recursive-include token_budget *.py
25
+ recursive-include token_transparency *.py
26
+
27
+ # Exclude unnecessary files
28
+ global-exclude *.pyc
29
+ global-exclude *.pyo
30
+ global-exclude *.swp
31
+ global-exclude .DS_Store
32
+ global-exclude __pycache__
33
+ exclude .gitignore
34
+ exclude .github
35
+ exclude tox.ini
36
+ exclude .coverage
37
37
  exclude .pytest_cache
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: netra-zen
3
- Version: 1.0.9
3
+ Version: 1.0.11
4
4
  Summary: Multi-instance Claude orchestrator for parallel task execution
5
5
  Home-page: https://github.com/netra-systems/zen
6
6
  Author: Systems
@@ -60,39 +60,38 @@ It works by analyzing your usage logs for metadata optimizations. It is focused
60
60
 
61
61
  This is a micro startup effort, aiming to provide real value for individual devs in exchange for feedback. Our intent is to charge businesses for larger scale optimizations.
62
62
 
63
- The process is simple. One time install, then one command. It auto grabs the last 3 log files and provides actionable items to update going forward to get the value of the optimizations.
63
+ The process is simple. One time install, then one command. It analyzes your most recent log file and provides actionable items to update going forward to get the value of the optimizations. For best results, analyze one log file at a time with payloads under 1MB for focused, accurate analysis.
64
64
 
65
65
  ## Quick start
66
66
 
67
67
  1. `pip install netra-zen`
68
- 2. `zen --apex --send-logs`
68
+ 2. `zen --apex` # Logs are now sent by default
69
69
  3. Read the results and update claude settings, prompts, commands, etc. as needed to benefit
70
70
 
71
71
  See detailed install below if needed.
72
72
 
73
73
  ### Log Collection Options
74
74
 
75
- The optimizer analyzes your Claude Code usage logs to identify optimization opportunities. You can customize what logs are sent:
75
+ The optimizer automatically analyzes your Claude Code usage logs to identify optimization opportunities. You can customize the behavior:
76
76
 
77
77
  ```bash
78
- # Send logs from the 3 most recent files (default)
79
- zen --apex --send-logs
80
-
81
- # Send logs from more files for deeper analysis
82
- zen --apex --send-logs --logs-count 5
78
+ # Send logs from the most recent file (default behavior)
79
+ zen --apex
83
80
 
84
81
  # Send logs from a specific project
85
- zen --apex --send-logs --logs-project "my-project-name"
82
+ zen --apex --logs-project "my-project-name"
86
83
 
87
84
  # Send logs from a custom location
88
- zen --apex --send-logs --logs-path "/path/to/.claude/Projects"
85
+ zen --apex --logs-path "/path/to/.claude/Projects"
89
86
 
90
- # Combine options for targeted analysis
91
- zen --apex --send-logs --logs-count 3 --logs-project "production-app"
87
+ # Advanced: Send multiple files (use with caution)
88
+ zen --apex --logs-count 2
92
89
  ```
93
90
 
94
91
  **Important:**
95
- - `--logs-count` specifies the number of **files** to read, not entries
92
+ - `--logs-count` default is **1** for current Alpha release limitations.
93
+ - For optimal analysis, use **1 log file at a time** and keep payload under 1MB
94
+ - Multiple log files can dilute the analysis and reduce accuracy
96
95
  - Each file may contain many log entries
97
96
  - The tool will display exactly how many entries from how many files are being sent
98
97
 
@@ -110,7 +109,7 @@ This was just changing a few small lines on a 400 line command.
110
109
 
111
110
  ## Example output from single file
112
111
  ```
113
- zen --apex --send-logs --logs-path /Users/user/.claude/projects/-Users-Desktop-netra-apex/7ac6d7ac-abc3-4903-a482-......-1.jsonl
112
+ zen --apex --logs-path /Users/user/.claude/projects/-Users-Desktop-netra-apex/7ac6d7ac-abc3-4903-a482-......-1.jsonl
114
113
 
115
114
  SUCCESS: WebSocket connected successfully!
116
115
 
@@ -237,6 +236,28 @@ Receiving events...
237
236
  📊 Received 8 events
238
237
  ```
239
238
 
239
+ # Another example
240
+ ```
241
+ "issue": "Confused execution path and backtracking", │
242
+
243
+ "evidence": "The model initially assumes a JavaScript/TypeScript frontend based on the term
244
+ │ \"client side\", leading to incorrect file searches. After realizing it's a Python project, it gets stuck
245
+ │ repeatedly grepping `scripts/agent_cli.py` and requires multiple user interventions to be redirected to
246
+ │ the actual root cause in `zen_orchestrator.py` and `zen/telemetry/apex_telemetry.py`", ... │
247
+ │ "token_waste": "8000-10000", │
248
+ │ "fix": "When an initial search term (e.g., 'ultrathink') fails, the model should prioritize │
249
+ │ understanding the project's overall structure and language (`ls -R` or `find . -type f | head -n 20`) │
250
+ │ before making assumptions. For regressions, `git log` should be used earlier in the process to identify │
251
+ │ recent, relevant changes that could have introduced the bug.",
252
+
253
+ │ "ideal prompt": "There's a regression where events are batched instead of streamed. The user │
254
+ │ mentioned 'client side ultrathink', but that could be a red herring. Start by checking the project │
255
+ │ structure and language, then review the git history for recent changes related to event handling, │
256
+ │ streaming, telemetry, or subprocess execution before deep-diving into code.", │
257
+ │ "priority": "high" │
258
+ │ }
259
+ ```
260
+
240
261
  # Advanced features & detailed install guide
241
262
 
242
263
  In addition to optimizing your costs and latency,