netra-zen 1.0.0__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.
- agent_interface/__init__.py +26 -0
- agent_interface/base_agent.py +351 -0
- netra_zen-1.0.0.dist-info/METADATA +576 -0
- netra_zen-1.0.0.dist-info/RECORD +15 -0
- netra_zen-1.0.0.dist-info/WHEEL +5 -0
- netra_zen-1.0.0.dist-info/entry_points.txt +2 -0
- netra_zen-1.0.0.dist-info/licenses/LICENSE.md +1 -0
- netra_zen-1.0.0.dist-info/top_level.txt +4 -0
- token_budget/__init__.py +1 -0
- token_budget/budget_manager.py +200 -0
- token_budget/models.py +74 -0
- token_budget/visualization.py +22 -0
- token_transparency/__init__.py +20 -0
- token_transparency/claude_pricing_engine.py +327 -0
- zen_orchestrator.py +2884 -0
@@ -0,0 +1,576 @@
|
|
1
|
+
Metadata-Version: 2.4
|
2
|
+
Name: netra-zen
|
3
|
+
Version: 1.0.0
|
4
|
+
Summary: Multi-instance Claude orchestrator for parallel task execution
|
5
|
+
Home-page: https://github.com/netra-systems/zen
|
6
|
+
Author: Systems
|
7
|
+
Author-email: Netra Systems <pypi@netrasystems.ai>
|
8
|
+
License: MIT
|
9
|
+
Project-URL: Homepage, https://github.com/netra-systems/zen
|
10
|
+
Project-URL: Documentation, https://github.com/netra-systems/zen#readme
|
11
|
+
Project-URL: Repository, https://github.com/netra-systems/zen.git
|
12
|
+
Project-URL: Bug Tracker, https://github.com/netra-systems/zen/issues
|
13
|
+
Project-URL: Changelog, https://github.com/netra-systems/zen/blob/main/CHANGELOG.md
|
14
|
+
Keywords: claude,ai,orchestration,parallel,automation,llm,anthropic
|
15
|
+
Classifier: Development Status :: 4 - Beta
|
16
|
+
Classifier: Intended Audience :: Developers
|
17
|
+
Classifier: License :: Other/Proprietary License
|
18
|
+
Classifier: Operating System :: OS Independent
|
19
|
+
Classifier: Programming Language :: Python :: 3
|
20
|
+
Classifier: Programming Language :: Python :: 3.8
|
21
|
+
Classifier: Programming Language :: Python :: 3.9
|
22
|
+
Classifier: Programming Language :: Python :: 3.10
|
23
|
+
Classifier: Programming Language :: Python :: 3.11
|
24
|
+
Classifier: Programming Language :: Python :: 3.12
|
25
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
26
|
+
Classifier: Topic :: Software Development :: Quality Assurance
|
27
|
+
Classifier: Topic :: System :: Distributed Computing
|
28
|
+
Requires-Python: >=3.8
|
29
|
+
Description-Content-Type: text/markdown
|
30
|
+
License-File: LICENSE.md
|
31
|
+
Requires-Dist: PyYAML>=6.0
|
32
|
+
Requires-Dist: python-dateutil>=2.8.2
|
33
|
+
Provides-Extra: dev
|
34
|
+
Requires-Dist: pytest>=7.0.0; extra == "dev"
|
35
|
+
Requires-Dist: pytest-asyncio>=0.21.0; extra == "dev"
|
36
|
+
Requires-Dist: pytest-cov>=4.0.0; extra == "dev"
|
37
|
+
Requires-Dist: black>=23.0.0; extra == "dev"
|
38
|
+
Requires-Dist: ruff>=0.1.0; extra == "dev"
|
39
|
+
Requires-Dist: mypy>=1.0.0; extra == "dev"
|
40
|
+
Provides-Extra: netra
|
41
|
+
Requires-Dist: netraoptimizer>=1.0.0; extra == "netra"
|
42
|
+
Dynamic: author
|
43
|
+
Dynamic: home-page
|
44
|
+
Dynamic: license-file
|
45
|
+
Dynamic: requires-python
|
46
|
+
|
47
|
+
# Zen
|
48
|
+
|
49
|
+
Zen runs multiple Code CLI instances for peaceful parallel task execution.
|
50
|
+
|
51
|
+
## What is Zen?
|
52
|
+
|
53
|
+
Zen allows you to:
|
54
|
+
- Run multiple headless Claude Code CLI instances simultaneously.
|
55
|
+
- Calm unified results (status, time, token usage)
|
56
|
+
- Relax **"5-hour limit reached"** lockout fears with easy token budget limits
|
57
|
+
- Get more value out of your Claude MAX subscription
|
58
|
+
with scheduling features. (`--run-at "2am"`)
|
59
|
+
- Learn more about how Claude Code uses tools and other inner workings
|
60
|
+
- Control usage and budget for groups of work or per command
|
61
|
+
|
62
|
+
Example portion of status report:
|
63
|
+
```
|
64
|
+
╔═══ STATUS REPORT [14:25:10] ═══╗
|
65
|
+
║ Total: 5 instances
|
66
|
+
║ Running: 3, Completed: 2, Failed: 0
|
67
|
+
║ Tokens: 32.1K total | Tools: 15
|
68
|
+
║ 💰 Cost: $0.0642 total
|
69
|
+
║
|
70
|
+
║ TOKEN BUDGET STATUS
|
71
|
+
║ Overall: [████████████----] 75% 32.1K/43.0K
|
72
|
+
║
|
73
|
+
║ Status Name Duration Tokens
|
74
|
+
║ ──────── ───────────────── ─────── ──────
|
75
|
+
║ ✅ security-reviewer 2m15s 8.5K
|
76
|
+
║ ✅ performance-analyzer 1m42s 7.2K
|
77
|
+
║ 🏃 architecture-reviewer 1m18s 6.5K
|
78
|
+
║ 🏃 test-coverage-analyst 0m45s 4.8K
|
79
|
+
║ ⏳ quality-synthesizer queued 0K
|
80
|
+
╚════════════════════════════════════════════╝
|
81
|
+
```
|
82
|
+
Here you can see we are running 5 instances of claude.
|
83
|
+
- 2 have completed
|
84
|
+
- 2 are running
|
85
|
+
- 1 is scheduled
|
86
|
+
|
87
|
+
## Inspiration and background
|
88
|
+
While developing Netra Apex (commercial product)
|
89
|
+
our team has been running 100s of parallel claude code instances.
|
90
|
+
During that process we got annoyed at the "cognitive overhead"
|
91
|
+
of each having 10s of terminals open per machine and scrolling mountains of text.
|
92
|
+
Did the `/command` work or not?
|
93
|
+
|
94
|
+
What started as a simple way to make that process more peaceful turned into something we believe will be useful to the community.
|
95
|
+
|
96
|
+
Further, as usage limits become more restrictive, getting up at odd hours just to feed the beast got old fast. So we added scheduling to run it at pre-defined times.
|
97
|
+
|
98
|
+
Surprisingly, the duration that a command ran and it's presumed difficulty, often had little correlation with actual token usage.
|
99
|
+
"Simple" git operations would sometimes eat 10x as many as complex issue resolution commands.
|
100
|
+
|
101
|
+
The market is moving quickly, codex is getting better and other Code CLIs are coming. How effective a code factory is matters. This V1 alpha is just the start of codifying code CLI dev practices and progressing from alchemy to engineering.
|
102
|
+
|
103
|
+
For more power, try Zen with Netra Apex for the most effective usage and control of business AI spend.
|
104
|
+
|
105
|
+
## Limitations
|
106
|
+
|
107
|
+
### Budget Enforcement Behavior
|
108
|
+
|
109
|
+
**Important:**
|
110
|
+
|
111
|
+
- **Local Monitoring Only**: Budgets defined in `json` configs or command-line flags are tracked locally by Zen.
|
112
|
+
Zen cannot prevent the underlying CLI from consuming tokens beyond the limit in some cases.
|
113
|
+
For example if a request is made when it is under budget, that single request may exceed the budget. In `block` mode the *next* request will be stopped.
|
114
|
+
- **Budget Exceeded Behavior**:
|
115
|
+
- `warn` mode: Zen logs warnings but continues execution
|
116
|
+
- `block` mode: Zen prevents running new instances or halts in progress commands, depending on the nature of the budget config.
|
117
|
+
- **Token Counting**: Budget calculations are based on estimates and may not match exact billing from Claude/Codex
|
118
|
+
|
119
|
+
### Target Audience and Use Cases
|
120
|
+
|
121
|
+
Zen is designed for internal developer productivity and automation workflows and is *not* suitable for all use cases.
|
122
|
+
|
123
|
+
It is generally expected that you already familiar with claude code
|
124
|
+
in order to get the most value out of Zen.
|
125
|
+
|
126
|
+
**✅ Supported Use Cases:**
|
127
|
+
- Internal development workflows and automation
|
128
|
+
- Parallel execution of development tasks
|
129
|
+
- CI/CD integration for development teams
|
130
|
+
- Budget and cost control for Claude
|
131
|
+
|
132
|
+
## Installation
|
133
|
+
|
134
|
+
### Default Method: pipx (Recommended for ALL Users)
|
135
|
+
|
136
|
+
Pipx automatically handles PATH configuration and creates an isolated environment, preventing dependency conflicts.
|
137
|
+
|
138
|
+
#### Step 1: Install pipx
|
139
|
+
```bash
|
140
|
+
# Windows
|
141
|
+
pip install --user pipx
|
142
|
+
python -m pipx ensurepath
|
143
|
+
|
144
|
+
# macOS
|
145
|
+
brew install pipx
|
146
|
+
pipx ensurepath
|
147
|
+
|
148
|
+
# Linux (Ubuntu/Debian)
|
149
|
+
sudo apt update
|
150
|
+
sudo apt install pipx
|
151
|
+
pipx ensurepath
|
152
|
+
|
153
|
+
# Linux (Other)
|
154
|
+
pip install --user pipx
|
155
|
+
pipx ensurepath
|
156
|
+
```
|
157
|
+
|
158
|
+
**Note:** Restart your terminal after running `pipx ensurepath`
|
159
|
+
|
160
|
+
#### Step 2: Install zen
|
161
|
+
```bash
|
162
|
+
# From PyPI
|
163
|
+
pipx install netra-zen
|
164
|
+
|
165
|
+
# For local development (editable mode)
|
166
|
+
cd zen/
|
167
|
+
pipx install --editable .
|
168
|
+
|
169
|
+
# Verify installation
|
170
|
+
zen --help
|
171
|
+
```
|
172
|
+
|
173
|
+
### Alternative: pip (Manual PATH Configuration Required)
|
174
|
+
|
175
|
+
⚠️ **Warning:** Using pip directly often results in PATH issues. We strongly recommend pipx instead.
|
176
|
+
|
177
|
+
```bash
|
178
|
+
pip install netra-zen
|
179
|
+
|
180
|
+
# If 'zen' command not found, you'll need to:
|
181
|
+
# Option 1: Use Python module directly
|
182
|
+
python -m zen_orchestrator --help
|
183
|
+
|
184
|
+
# Option 2: Manually add to PATH (see Troubleshooting)
|
185
|
+
```
|
186
|
+
|
187
|
+
## Understanding the Model Column in Status Reports
|
188
|
+
|
189
|
+
### Model Column Behavior
|
190
|
+
|
191
|
+
The **Model** column in Zen's status display shows the **actual model used** by Claude Code for each API response, not necessarily the model you configured in your settings.
|
192
|
+
|
193
|
+
**Key Points:**
|
194
|
+
- **Cost Tracking Value**: Knowing the actual model is critical for accurate cost calculation since different models have vastly different pricing (e.g., Opus costs 5x more than Sonnet)
|
195
|
+
- **Dynamic Detection**: Zen automatically detects the model from Claude's API responses in real-time
|
196
|
+
|
197
|
+
**Example Status Display:**
|
198
|
+
```
|
199
|
+
║ Status Name Model Duration Overall Tokens Budget
|
200
|
+
║ ✅ analyze-code 35sonnet 2m15s 45.2K 2.1K 85% used
|
201
|
+
║ 🏃 optimize-perf opus4 1m30s 12.8K 800 45% used
|
202
|
+
```
|
203
|
+
|
204
|
+
This transparency helps you understand your actual AI spend and make informed decisions about model usage.
|
205
|
+
|
206
|
+
|
207
|
+
### Step 3: Generate with AI
|
208
|
+
|
209
|
+
1. Copy your customized prompt
|
210
|
+
2. Paste it into ChatGPT, Claude, or your preferred LLM
|
211
|
+
3. Save the generated JSON as `customer_feedback.json`
|
212
|
+
4. Run: `zen --config customer_feedback.json`
|
213
|
+
|
214
|
+
## Understanding Configuration Structure
|
215
|
+
|
216
|
+
Every Zen configuration has the same basic structure:
|
217
|
+
|
218
|
+
```json
|
219
|
+
{
|
220
|
+
"// Description": "What this workflow accomplishes",
|
221
|
+
"// Use Case": "When to use this configuration",
|
222
|
+
|
223
|
+
"instances": [
|
224
|
+
{
|
225
|
+
"command": "/command || prompt",
|
226
|
+
"permission_mode": "bypassPermissions", // Default
|
227
|
+
"output_format": "stream-json", // Default
|
228
|
+
"max_tokens_per_command": 12000, // Optional
|
229
|
+
"allowed_tools": ["Read", "Write", "Edit", "Task"], // Optional
|
230
|
+
// Other optional features
|
231
|
+
}//,
|
232
|
+
//{
|
233
|
+
// next instance
|
234
|
+
//}
|
235
|
+
//... series of instances
|
236
|
+
]
|
237
|
+
}
|
238
|
+
```
|
239
|
+
|
240
|
+
### Key Configuration Elements
|
241
|
+
|
242
|
+
| Element | Purpose | Best Practice |
|
243
|
+
|---------|---------|---------------|
|
244
|
+
| `command` | Task specification | Can use existing /commands or any string literal input |
|
245
|
+
| `max_tokens_per_command` | Token budget | Allocate based on complexity |
|
246
|
+
| `allowed_tools` | Tool permissions | Grant minimal necessary tools |
|
247
|
+
|
248
|
+
For Output Truncation control: `--max-console-lines` and `--max-line-length` parameters, or redirect output to files
|
249
|
+
|
250
|
+
### Scheduling
|
251
|
+
|
252
|
+
Schedule to run later.
|
253
|
+
This helps you get the most value out of your claude max subscription.
|
254
|
+
|
255
|
+
```bash
|
256
|
+
# Start in 2 hours
|
257
|
+
zen --config my_config.json --start-at "2h"
|
258
|
+
|
259
|
+
# Start at specific time
|
260
|
+
zen --config my_config.json --start-at "14:30"
|
261
|
+
|
262
|
+
# Start in 30 minutes
|
263
|
+
zen --config my_config.json --start-at "30m"
|
264
|
+
```
|
265
|
+
|
266
|
+
## Expected questions
|
267
|
+
|
268
|
+
### 1. Do I have to use /commands?
|
269
|
+
- No. You can just put your string query (prompt) and it works the same.
|
270
|
+
- It does seem to be a best practice though to version controlled `/commands`.
|
271
|
+
|
272
|
+
### 2. Does this replace using Claude command directly?
|
273
|
+
- No. At least not yet fully.
|
274
|
+
- As we primarily using structured commands, internally we see 80%+ of our usage through Zen.
|
275
|
+
- Ad hoc questions or validating if a command is working as expected for now is better through Claude directly.
|
276
|
+
|
277
|
+
### 3. What does this assume?
|
278
|
+
- You have claude code installed, authenticated, and configured already.
|
279
|
+
|
280
|
+
### 4. How do I know if it's working?
|
281
|
+
- Each command returns fairly clear overall statuses.
|
282
|
+
- Budget states etc. are logged.
|
283
|
+
- You can also see the duration and token usage.
|
284
|
+
- By default, each command outputs a truncated version of the output to the console.
|
285
|
+
- You can optionally choose to save a report of all output to .json
|
286
|
+
- Our usage is heavily integrated with github, we use git issues as the visual output
|
287
|
+
and notification system for most work. This means regardless of where Zen is running
|
288
|
+
you can see the results wherever you access git. This is as easy as adding `gh` instructions (the cli + token assumed to be present) to your commands.
|
289
|
+
|
290
|
+
### 5. Data privacy?
|
291
|
+
At this moment no data is collected.
|
292
|
+
Our intent is to add an optional system where non-PII usage data is sent to Netra for exclusively aggregated metadata level use to help make our spend management system better. (So you can get more from your AI spend!)
|
293
|
+
|
294
|
+
## 6. What about the UI/UX?
|
295
|
+
There is a time and a place for wanting to have multiple windows and git trees open.
|
296
|
+
Zen's intent is the opposite: make running `n` code clis more peaceful.
|
297
|
+
Why activate your "giga-brain" when you can run one command instead?
|
298
|
+
|
299
|
+
|
300
|
+
## Zen --help
|
301
|
+
```zen --help```
|
302
|
+
yields:
|
303
|
+
```
|
304
|
+
usage: zen [-h] [--workspace WORKSPACE] [--config CONFIG] [--dry-run] [--list-commands] [--inspect-command INSPECT_COMMAND]
|
305
|
+
[--output-format {json,stream-json}] [--timeout TIMEOUT] [--max-console-lines MAX_CONSOLE_LINES] [--quiet]
|
306
|
+
[--startup-delay STARTUP_DELAY] [--max-line-length MAX_LINE_LENGTH] [--status-report-interval STATUS_REPORT_INTERVAL]
|
307
|
+
[--start-at START_AT] [--use-cloud-sql] [--overall-token-budget OVERALL_TOKEN_BUDGET] [--command-budget COMMAND_BUDGET]
|
308
|
+
[--budget-enforcement-mode {warn,block}] [--disable-budget-visuals]
|
309
|
+
|
310
|
+
Claude Code Instance Orchestrator
|
311
|
+
|
312
|
+
options:
|
313
|
+
-h, --help show this help message and exit
|
314
|
+
--workspace WORKSPACE
|
315
|
+
Workspace directory (default: current directory)
|
316
|
+
--config CONFIG Custom instance configuration file
|
317
|
+
--dry-run Show commands without running
|
318
|
+
--list-commands List all available slash commands and exit
|
319
|
+
--inspect-command INSPECT_COMMAND
|
320
|
+
Inspect a specific slash command and exit
|
321
|
+
--output-format {json,stream-json}
|
322
|
+
Output format for Claude instances (default: stream-json)
|
323
|
+
--timeout TIMEOUT Timeout in seconds for each instance (default: 10000)
|
324
|
+
--max-console-lines MAX_CONSOLE_LINES
|
325
|
+
Maximum recent lines to show per instance on console (default: 5)
|
326
|
+
--quiet Minimize console output, show only errors and final summaries
|
327
|
+
--startup-delay STARTUP_DELAY
|
328
|
+
Delay in seconds between launching each instance (default: 5.0)
|
329
|
+
--max-line-length MAX_LINE_LENGTH
|
330
|
+
Maximum characters per line in console output (default: 500)
|
331
|
+
--status-report-interval STATUS_REPORT_INTERVAL
|
332
|
+
Seconds between rolling status reports (default: 5)
|
333
|
+
--start-at START_AT Schedule orchestration to start at specific time. Examples: '2h' (2 hours from now), '30m' (30 minutes),
|
334
|
+
'14:30' (2:30 PM today), '1am' (1 AM today/tomorrow)
|
335
|
+
--overall-token-budget OVERALL_TOKEN_BUDGET
|
336
|
+
Global token budget for the entire session.
|
337
|
+
--command-budget COMMAND_BUDGET
|
338
|
+
Per-command budget in format: '/command_name=limit'. Can be used multiple times.
|
339
|
+
--budget-enforcement-mode {warn,block}
|
340
|
+
Action to take when a budget is exceeded: 'warn' (log and continue) or 'block' (prevent new instances).
|
341
|
+
--disable-budget-visuals
|
342
|
+
Disable budget visualization in status reports
|
343
|
+
|
344
|
+
```
|
345
|
+
|
346
|
+
## Requirements
|
347
|
+
|
348
|
+
- Python 3.8+
|
349
|
+
- Claude Code CLI
|
350
|
+
- Dependencies in requirements.txt
|
351
|
+
|
352
|
+
## Logging and Output
|
353
|
+
|
354
|
+
- **Console Output**: All logs and execution results are displayed in the console
|
355
|
+
- **No File Logging**: ZEN does not write logs to files by default
|
356
|
+
- **Capturing Output**: To save execution logs, use output redirection:
|
357
|
+
```bash
|
358
|
+
zen --config tasks.json > execution.log 2>&1
|
359
|
+
```
|
360
|
+
|
361
|
+
## Testing
|
362
|
+
|
363
|
+
```bash
|
364
|
+
cd tests/
|
365
|
+
python test_runner.py
|
366
|
+
```
|
367
|
+
|
368
|
+
## Basic Usage
|
369
|
+
|
370
|
+
### Command Execution
|
371
|
+
Execute commands directly without config files:
|
372
|
+
```bash
|
373
|
+
# Execute a single command directly
|
374
|
+
zen "/my-existing-claude-command"
|
375
|
+
|
376
|
+
# Execute with config (recommended usage pattern)
|
377
|
+
zen --config /my-config.json
|
378
|
+
|
379
|
+
# Execute with custom workspace
|
380
|
+
zen "/analyze-code" --workspace ~/my-project
|
381
|
+
|
382
|
+
# Execute with token budget
|
383
|
+
zen "/complex-analysis" --overall-token-budget 5000
|
384
|
+
|
385
|
+
# Execute with custom instance name
|
386
|
+
zen "/debug-issue" --instance-name "debug-session"
|
387
|
+
|
388
|
+
# Execute with session continuity
|
389
|
+
zen "/optimize-performance" --session-id "perf-session-1"
|
390
|
+
|
391
|
+
# Start in 2 hours
|
392
|
+
zen --config my_config.json --start-at "2h"
|
393
|
+
|
394
|
+
# Start at specific time
|
395
|
+
zen --config my_config.json --start-at "14:30"
|
396
|
+
|
397
|
+
```
|
398
|
+
|
399
|
+
|
400
|
+
### Quick Test
|
401
|
+
```bash
|
402
|
+
# List available commands (auto-detects workspace)
|
403
|
+
zen --list-commands
|
404
|
+
|
405
|
+
# Dry run to see what would be executed (auto-detects workspace)
|
406
|
+
zen --dry-run
|
407
|
+
|
408
|
+
# Run with default configuration (uses actual slash commands from workspace)
|
409
|
+
zen
|
410
|
+
```
|
411
|
+
|
412
|
+
### Workspace Management
|
413
|
+
```bash
|
414
|
+
# Auto-detect workspace (looks for project root with .git, .claude, etc.)
|
415
|
+
zen --dry-run
|
416
|
+
|
417
|
+
# Use specific workspace (override auto-detection)
|
418
|
+
zen --workspace ~/projects/myapp
|
419
|
+
|
420
|
+
# With custom timeout
|
421
|
+
zen --timeout 300 --workspace ~/projects/myapp
|
422
|
+
```
|
423
|
+
|
424
|
+
### Token Budget Control
|
425
|
+
```bash
|
426
|
+
# Set overall budget
|
427
|
+
zen --overall-token-budget 100000
|
428
|
+
|
429
|
+
# Set per-command budgets
|
430
|
+
zen --command-budget "/analyze=50000" --command-budget "/optimize=30000"
|
431
|
+
|
432
|
+
# Budget enforcement modes
|
433
|
+
zen --budget-enforcement-mode block # Stop when exceeded
|
434
|
+
zen --budget-enforcement-mode warn # Warn but continue
|
435
|
+
```
|
436
|
+
|
437
|
+
### Scheduled Execution
|
438
|
+
```bash
|
439
|
+
# Start in 2 hours
|
440
|
+
zen --start-at "2h"
|
441
|
+
|
442
|
+
# Start at specific time
|
443
|
+
zen --start-at "14:30" # 2:30 PM today
|
444
|
+
zen --start-at "1am" # 1 AM tomorrow
|
445
|
+
```
|
446
|
+
|
447
|
+
### Execution Mode Precedence
|
448
|
+
Zen supports three execution modes with clear precedence rules:
|
449
|
+
|
450
|
+
1. **Direct Command** (Highest Priority)
|
451
|
+
```bash
|
452
|
+
zen "/analyze-code" # Executes direct command
|
453
|
+
```
|
454
|
+
|
455
|
+
2. **Config File** (Medium Priority)
|
456
|
+
```bash
|
457
|
+
zen --config my-config.json # Uses config file
|
458
|
+
```
|
459
|
+
|
460
|
+
3. **Default Instances** (Lowest Priority)
|
461
|
+
```bash
|
462
|
+
zen # Uses built-in default commands
|
463
|
+
```
|
464
|
+
|
465
|
+
## Other Features
|
466
|
+
|
467
|
+
### Parallel Execution Control
|
468
|
+
```bash
|
469
|
+
# Control startup delay between instances
|
470
|
+
zen --startup-delay 30.0 # seconds between launches
|
471
|
+
|
472
|
+
# Limit console output
|
473
|
+
zen --max-console-lines 10
|
474
|
+
zen --max-line-length 200
|
475
|
+
```
|
476
|
+
|
477
|
+
### Output Formats
|
478
|
+
```bash
|
479
|
+
# JSON output
|
480
|
+
zen --output-format json
|
481
|
+
|
482
|
+
# Stream JSON (default)
|
483
|
+
zen --output-format stream-json
|
484
|
+
```
|
485
|
+
|
486
|
+
### Quiet Mode
|
487
|
+
```bash
|
488
|
+
# Minimal output - only errors and summary
|
489
|
+
zen --quiet
|
490
|
+
```
|
491
|
+
|
492
|
+
### Status Reporting
|
493
|
+
```bash
|
494
|
+
# Change status report interval
|
495
|
+
zen --status-report-interval 30 # Every 30 seconds
|
496
|
+
```
|
497
|
+
|
498
|
+
## Environment Variables
|
499
|
+
|
500
|
+
```bash
|
501
|
+
# Set default workspace
|
502
|
+
export ZEN_WORKSPACE="~/projects"
|
503
|
+
|
504
|
+
# Set default config
|
505
|
+
export ZEN_CONFIG="~/configs/zen-default.json"
|
506
|
+
|
507
|
+
# Enable debug logging
|
508
|
+
export ZEN_DEBUG="true"
|
509
|
+
```
|
510
|
+
|
511
|
+
## Troubleshooting
|
512
|
+
|
513
|
+
### Command not found
|
514
|
+
|
515
|
+
#### If using pipx (recommended):
|
516
|
+
```bash
|
517
|
+
# Ensure PATH is configured
|
518
|
+
pipx ensurepath
|
519
|
+
|
520
|
+
# Restart terminal, then verify
|
521
|
+
zen --version
|
522
|
+
```
|
523
|
+
|
524
|
+
### Permission denied
|
525
|
+
```bash
|
526
|
+
# Make sure scripts are executable
|
527
|
+
chmod +x $(which zen)
|
528
|
+
```
|
529
|
+
|
530
|
+
### Module not found
|
531
|
+
```bash
|
532
|
+
# Reinstall with dependencies
|
533
|
+
pip install --force-reinstall netra-zen
|
534
|
+
```
|
535
|
+
|
536
|
+
## Getting Help
|
537
|
+
|
538
|
+
```bash
|
539
|
+
# Show help
|
540
|
+
zen --help
|
541
|
+
|
542
|
+
# Inspect specific command
|
543
|
+
zen --inspect-command /analyze
|
544
|
+
|
545
|
+
# Visit documentation
|
546
|
+
# https://github.com/netra-systems/zen
|
547
|
+
```
|
548
|
+
|
549
|
+
### Known Issues
|
550
|
+
|
551
|
+
**Token Budget Accuracy:**
|
552
|
+
- **Problem**: Budget calculations may not exactly match actual API billing
|
553
|
+
- **Cause**: Estimates based on local token counting vs. server-side billing
|
554
|
+
- **Workaround**: Use conservative budget limits and monitor actual usage through provider dashboards
|
555
|
+
|
556
|
+
**Configuration File Validation:**
|
557
|
+
- **Problem**: Limited validation of JSON configuration files
|
558
|
+
- **Impact**: Invalid configurations may cause runtime errors
|
559
|
+
- **Workaround**: Use `--dry-run` to validate configurations before execution
|
560
|
+
|
561
|
+
**Resource Cleanup:**
|
562
|
+
- **Problem**: Interrupted executions may leave background processes running
|
563
|
+
- **Workaround**: Monitor system processes and manually terminate if necessary
|
564
|
+
- **Planned Fix**: Improved signal handling and cleanup in future versions
|
565
|
+
|
566
|
+
## Example Configurations
|
567
|
+
|
568
|
+
See the included example files:
|
569
|
+
- `minimal_config.json` - Basic setup
|
570
|
+
- `config_example.json` - Standard configuration
|
571
|
+
- `netra_apex_tool_example.json` - Advanced integration
|
572
|
+
|
573
|
+
## Support
|
574
|
+
|
575
|
+
- GitHub Issues: https://github.com/netra-systems/zen/issues
|
576
|
+
- Documentation: https://github.com/netra-systems/zen/wiki
|
@@ -0,0 +1,15 @@
|
|
1
|
+
zen_orchestrator.py,sha256=RxOvJPO8gBNRMXj_hOnoiys3G9XVThGDECtvKishBe8,145729
|
2
|
+
agent_interface/__init__.py,sha256=OsbOKzElHsxhVgak87oOx_u46QNgKmz-Reis-plAMwk,525
|
3
|
+
agent_interface/base_agent.py,sha256=GNskG9VaZgno7X24lQTpFdxUoQE0yJHLh0UPFJvOPn4,11098
|
4
|
+
netra_zen-1.0.0.dist-info/licenses/LICENSE.md,sha256=PZrP0UDn58i4LjV4zijIQTnsQPvWm4zq9Fet9i7qgwI,80
|
5
|
+
token_budget/__init__.py,sha256=_2tmi72DGNtbYcZ-rGIxVKMytdkHFjzJaWz8bDhYACc,33
|
6
|
+
token_budget/budget_manager.py,sha256=VRWxKcGDtgJfIRh-ztYQ4-wuhBvddVJJnyoGfxCBlv0,9567
|
7
|
+
token_budget/models.py,sha256=14xFTk2-R1Ql0F9WLDof7vADrKC_5Fj7EE7UmZdoG00,2384
|
8
|
+
token_budget/visualization.py,sha256=SaNnZ15edHXtjDCA5Yfu7w3AztCZRYsYCPGBqzapupY,719
|
9
|
+
token_transparency/__init__.py,sha256=go86Rg4_VYAPLw3myVpLe1s1PbMu1llDTw1wfomP1lA,453
|
10
|
+
token_transparency/claude_pricing_engine.py,sha256=9zWQJS3HJEs_lljil-xT1cUvG-Jf3ykNAninJFyfNSM,12630
|
11
|
+
netra_zen-1.0.0.dist-info/METADATA,sha256=V27iuL9RYqydQRDutVEU4D_VeJyQS8iXi1Kx7dGMiT8,19727
|
12
|
+
netra_zen-1.0.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
13
|
+
netra_zen-1.0.0.dist-info/entry_points.txt,sha256=oDehCnPGZezG0m9ZWspxjHLHyQ3eERX87eojR4ljaRo,45
|
14
|
+
netra_zen-1.0.0.dist-info/top_level.txt,sha256=dHz-hgh_dfiiOUrPf8wW80fA31rfEYDFmA6fpu67Yjk,65
|
15
|
+
netra_zen-1.0.0.dist-info/RECORD,,
|
@@ -0,0 +1 @@
|
|
1
|
+
© Netra Inc. All rights reserved. Use is subject to Netra's Terms of Service.
|
token_budget/__init__.py
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
# Token budget management package
|