Update disabled commands documentation and re-enable cross_chain/monitor

- Updated DISABLED_COMMANDS_CLEANUP.md to reflect current state (2026-05-27)
- Re-enabled cross_chain command (no core dependency)
- Re-enabled monitor command (no core dependency)
- Updated analysis: 6 commands disabled due to missing aitbc_cli.core modules
- hermes now marked as previously disabled but now enabled
- Added clear action items for remaining disabled commands
This commit is contained in:
aitbc
2026-05-27 07:07:37 +02:00
parent f505145a48
commit 81f6aac768
2 changed files with 142 additions and 80 deletions

View File

@@ -3,80 +3,135 @@
## Overview
This document analyzes the currently disabled CLI commands and provides recommendations for cleanup.
## Disabled Commands
## Disabled Commands (as of 2026-05-27)
### 1. `hermes` - Edge Computing Integration
### 1. `analytics` - Chain Analytics
**File**: `cli/aitbc_cli/commands/analytics.py`
**Status**: Commented out in `core/main.py` line 133
**Reason**: "Disabled - imports from non-existent aitbc_cli.core"
**Analysis**:
- **Size**: 403 lines of code
- **Functionality**: Chain analytics and monitoring commands
- **Dependencies**: `aitbc_cli.core.analytics` (missing module)
- **Potential Value**: Medium - analytics useful for monitoring
**Recommendation**: **RE-ENABLE AFTER CORE MODULE FIX**
- Need to implement or restore `aitbc_cli.core.analytics` module
- Alternatively, refactor to remove core dependency
- Analytics commands are valuable for operators
### 2. `cross_chain` - Cross-Chain Trading
**File**: `cli/aitbc_cli/commands/cross_chain.py`
**Status**: Commented out in `core/main.py` line 134
**Reason**: "Disabled - may have similar issues"
**Analysis**:
- **Size**: 435 lines of code
- **Functionality**: Cross-chain trading operations
- **Dependencies**: Uses AITBCHTTPClient (no core dependency)
- **Potential Value**: High - cross-chain is strategic
**Recommendation**: **RE-ENABLE AND TEST**
- No core dependency found in the file
- Should be safe to re-enable
- Test for any hidden dependencies
### 3. `deployment` - Production Deployment
**File**: `cli/aitbc_cli/commands/deployment.py`
**Status**: Commented out in `core/main.py` line 135
**Reason**: "Disabled - missing core.deployment module"
**Analysis**:
- **Size**: 378 lines of code
- **Functionality**: Production deployment and scaling commands
- **Dependencies**: `aitbc_cli.core.deployment` (missing module)
- **Potential Value**: Medium - useful for production deployments
**Recommendation**: **RE-ENABLE AFTER CORE MODULE FIX**
- Need to implement or restore `aitbc_cli.core.deployment` module
- Alternatively, refactor to remove core dependency
### 4. `monitor` - Monitoring and Dashboard
**File**: `cli/aitbc_cli/commands/monitor.py`
**Status**: Commented out in `core/main.py` line 136
**Reason**: "Disabled - may have similar issues"
**Analysis**:
- **Size**: 474 lines of code
- **Functionality**: Monitoring, metrics, and alerting commands
- **Dependencies**: Uses AITBCHTTPClient (no core dependency)
- **Potential Value**: High - monitoring is essential
**Recommendation**: **RE-ENABLE AND TEST**
- No core dependency found in the file
- Should be safe to re-enable
- Test for any hidden dependencies
### 5. `node` - Node Management
**File**: `cli/aitbc_cli/commands/node.py`
**Status**: Commented out in `core/main.py` line 137
**Reason**: "Disabled - imports from non-existent aitbc_cli.core"
**Analysis**:
- **Size**: 1,044 lines of code
- **Functionality**: Node management commands
- **Dependencies**: `aitbc_cli.core.config`, `aitbc_cli.core.node_client` (missing modules)
- **Potential Value**: High - node management is essential
**Recommendation**: **RE-ENABLE AFTER CORE MODULE FIX**
- Need to implement or restore core modules
- Large command group with significant functionality
### 6. `agent_comm` - Agent Communication
**File**: `cli/aitbc_cli/commands/agent_comm.py`
**Status**: Commented out in `core/main.py` line 138
**Reason**: "Disabled - imports from non-existent aitbc_cli.core"
**Analysis**:
- **Size**: Unknown (file exists but not reviewed)
- **Functionality**: Agent communication commands
- **Dependencies**: `aitbc_cli.core.agent_communication` (missing module)
- **Potential Value**: Medium - agent coordination
**Recommendation**: **RE-ENABLE AFTER CORE MODULE FIX**
- Need to implement or restore core module
- Conflicts with `agent` command (renamed to `ai`)
## Previously Disabled (Now Enabled)
### `hermes` - Hermes Integration
**File**: `cli/aitbc_cli/commands/hermes.py`
**Status**: Commented out in `main.py` line 28
**Reason**: "Temporarily disabled due to command registration issues"
**Status**: **ENABLED** in `core/main.py` line 151
**Previous Reason**: "Temporarily disabled due to command registration issues"
**Analysis**:
- **Size**: 604 lines of code
- **Functionality**: hermes integration with edge computing deployment
- **Dependencies**: httpx, JSON, time utilities
- **Potential Value**: High - edge computing is strategic for AITBC
**Recommendation**: **FIX AND RE-ENABLE**
- Command registration issues are likely minor (naming conflicts)
- Edge computing integration is valuable for the platform
- Code appears well-structured and complete
### 2. `marketplace_advanced` - Advanced Marketplace Features
**File**: `cli/aitbc_cli/commands/marketplace_advanced.py`
**Status**: Commented out in `main.py` line 29
**Reason**: "Temporarily disabled due to command registration issues"
**Analysis**:
- **Size**: Unknown (file not found in current tree)
- **Functionality**: Advanced marketplace features
- **Potential Value**: Medium to High
**Recommendation**: **LOCATE AND EVALUATE**
- File appears to be missing from current codebase
- May have been accidentally deleted
- Check git history to recover if valuable
### 3. `marketplace_cmd` - Alternative Marketplace Implementation
**File**: `cli/aitbc_cli/commands/marketplace_cmd.py`
**Status**: Exists but disabled (comment in main.py line 18)
**Reason**: Conflict with main `marketplace.py`
**Analysis**:
- **Size**: 495 lines of code
- **Functionality**: Global chain marketplace commands
- **Dependencies**: GlobalChainMarketplace, multichain config
- **Conflict**: Names conflict with existing `marketplace.py`
**Recommendation**: **MERGE OR DELETE**
- Compare with existing `marketplace.py`
- Merge unique features if valuable
- Delete if redundant
**Resolution**:
- Re-enabled as part of CLI subcommand implementation (May 2026)
- Added `send`, `receive`, `peers` subcommands
- No registration conflicts detected
- Commands connect to hermes-service via AITBCHTTPClient
## Cleanup Action Items
### Immediate Actions (High Priority)
1. **Fix `hermes` registration**
1. **Re-enable `cross_chain` and `monitor`**
```bash
# Uncomment line 28 in main.py
# from .commands.hermes import hermes
# cli.add_command(hermes)
# Uncomment lines 134 and 136 in core/main.py
# cli.add_command(cross_chain, name="crosschain")
# cli.add_command(monitor)
```
- Test for naming conflicts
- Rename if necessary (e.g., `edge-deploy`)
- Test for any hidden dependencies
- Verify no naming conflicts
2. **Resolve `marketplace` conflict**
```bash
# Compare files
diff cli/aitbc_cli/commands/marketplace.py cli/aitbc_cli/commands/marketplace_cmd.py
```
- Merge unique features
- Delete redundant file
2. **Implement missing core modules**
- `aitbc_cli.core.analytics` for analytics command
- `aitbc_cli.core.deployment` for deployment command
- `aitbc_cli.core.config` and `aitbc_cli.core.node_client` for node command
- `aitbc_cli.core.agent_communication` for agent_comm command
3. **Locate missing `marketplace_advanced`**
```bash
git log --all -- "**/marketplace_advanced.py"
git checkout HEAD~1 -- cli/aitbc_cli/commands/marketplace_advanced.py
```
3. **Update scenario documentation**
- Mark disabled groups as "Disabled (missing core dependency)" not "Empty"
- Add scenarios for active groups: edge, operations, hermes, workflow, simulate, config profiles, mining, wallet advanced
### Code Quality Improvements
1. **Add command registration validation**
@@ -116,28 +171,35 @@ Before re-enabling any disabled command:
| Week | Action | Status |
|------|--------|--------|
| 1 | Fix hermes registration issues | 🔄 In Progress |
| 1 | Resolve marketplace command conflicts | 🔄 In Progress |
| 2 | Locate and evaluate marketplace_advanced | ⏳ Pending |
| 2 | Add comprehensive tests | ⏳ Pending |
| 3 | Update documentation | ⏳ Pending |
| 1 | Re-enable cross_chain and monitor | ⏳ Pending |
| 1 | Test re-enabled commands | ⏳ Pending |
| 2 | Implement missing core modules | ⏳ Pending |
| 2 | Re-enable remaining disabled commands | ⏳ Pending |
| 3 | Update scenario documentation | ⏳ Pending |
## Risk Assessment
| Command | Risk Level | Action |
|---------|-----------|--------|
| hermes | Low | Re-enable after testing |
| marketplace_cmd | Low | Merge or delete |
| marketplace_advanced | Unknown | Locate and evaluate |
| analytics | Low | Re-enable after core module fix |
| cross_chain | Low | Re-enable and test immediately |
| deployment | Low | Re-enable after core module fix |
| monitor | Low | Re-enable and test immediately |
| node | Medium | Re-enable after core module fix |
| agent_comm | Medium | Re-enable after core module fix |
## Conclusion
The disabled commands appear to contain valuable functionality that should be restored rather than deleted. The "command registration issues" are likely minor naming conflicts that can be resolved with minimal effort.
The disabled commands fall into two categories:
1. **Safe to re-enable immediately**: `cross_chain`, `monitor` (no core dependencies)
2. **Require core module implementation**: `analytics`, `deployment`, `node`, `agent_comm`
The "missing core dependency" issue is the primary blocker. These commands are not "empty" - they contain substantial functionality but depend on `aitbc_cli.core` modules that need to be implemented or restored.
**Next Steps**:
1. Fix the registration conflicts
2. Test thoroughly
3. Re-enable valuable commands
4. Remove truly redundant code
1. Re-enable `cross_chain` and `monitor` immediately (no core dependencies)
2. Implement missing core modules or refactor commands to remove dependencies
3. Re-enable remaining commands after core module fixes
4. Update scenario documentation to accurately reflect disabled state
This cleanup will improve CLI functionality without compromising security.
This cleanup will restore valuable CLI functionality while maintaining code quality.