bone-agent 1.3.0

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 (74) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +184 -0
  3. package/bin/npm-wrapper.js +235 -0
  4. package/bin/rg +0 -0
  5. package/bin/rg.exe +0 -0
  6. package/config.yaml.example +133 -0
  7. package/package.json +53 -0
  8. package/requirements.txt +9 -0
  9. package/src/__init__.py +11 -0
  10. package/src/core/__init__.py +1 -0
  11. package/src/core/agentic.py +1054 -0
  12. package/src/core/chat_manager.py +1552 -0
  13. package/src/core/config_manager.py +247 -0
  14. package/src/core/cron.py +527 -0
  15. package/src/core/cron_allowlist.py +118 -0
  16. package/src/core/memory.py +232 -0
  17. package/src/core/retry.py +71 -0
  18. package/src/core/sub_agent.py +326 -0
  19. package/src/core/tool_approval.py +220 -0
  20. package/src/core/tool_feedback.py +778 -0
  21. package/src/exceptions.py +79 -0
  22. package/src/llm/__init__.py +1 -0
  23. package/src/llm/client.py +171 -0
  24. package/src/llm/config.py +466 -0
  25. package/src/llm/prompts.py +735 -0
  26. package/src/llm/providers.py +417 -0
  27. package/src/llm/streaming.py +163 -0
  28. package/src/llm/token_tracker.py +368 -0
  29. package/src/tools/__init__.py +212 -0
  30. package/src/tools/constants.py +59 -0
  31. package/src/tools/create_file.py +136 -0
  32. package/src/tools/directory.py +389 -0
  33. package/src/tools/edit.py +543 -0
  34. package/src/tools/file_reader.py +322 -0
  35. package/src/tools/helpers/__init__.py +105 -0
  36. package/src/tools/helpers/base.py +550 -0
  37. package/src/tools/helpers/converters.py +44 -0
  38. package/src/tools/helpers/file_helpers.py +189 -0
  39. package/src/tools/helpers/formatters.py +411 -0
  40. package/src/tools/helpers/loader.py +231 -0
  41. package/src/tools/helpers/parallel_executor.py +231 -0
  42. package/src/tools/helpers/path_resolver.py +226 -0
  43. package/src/tools/helpers/plugin_manifest.py +156 -0
  44. package/src/tools/obsidian.py +96 -0
  45. package/src/tools/review_sub_agent.py +189 -0
  46. package/src/tools/rg_search.py +393 -0
  47. package/src/tools/search_plugins.py +109 -0
  48. package/src/tools/select_option.py +593 -0
  49. package/src/tools/shell.py +302 -0
  50. package/src/tools/sub_agent.py +139 -0
  51. package/src/tools/task_list.py +269 -0
  52. package/src/tools/web_search.py +61 -0
  53. package/src/ui/__init__.py +1 -0
  54. package/src/ui/banner.py +87 -0
  55. package/src/ui/commands.py +2694 -0
  56. package/src/ui/displays.py +213 -0
  57. package/src/ui/loader.py +284 -0
  58. package/src/ui/main.py +646 -0
  59. package/src/ui/prompt_utils.py +113 -0
  60. package/src/ui/setting_selector.py +590 -0
  61. package/src/ui/setup_wizard.py +294 -0
  62. package/src/ui/sub_agent_panel.py +234 -0
  63. package/src/ui/tool_confirmation.py +215 -0
  64. package/src/utils/__init__.py +1 -0
  65. package/src/utils/citation_parser.py +199 -0
  66. package/src/utils/editor.py +158 -0
  67. package/src/utils/gitignore_filter.py +149 -0
  68. package/src/utils/logger.py +254 -0
  69. package/src/utils/paths.py +30 -0
  70. package/src/utils/result_parsers.py +108 -0
  71. package/src/utils/safe_commands.py +243 -0
  72. package/src/utils/settings.py +174 -0
  73. package/src/utils/validation.py +191 -0
  74. package/src/utils/web_search.py +173 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Vincent Miranda
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.
package/README.md ADDED
@@ -0,0 +1,184 @@
1
+ ## bone-agent
2
+
3
+ A CLI-based AI coding assistant capable of codebase search, file editing, computer use, and web search.
4
+
5
+ <img width="1850" height="396" alt="image" src="https://github.com/user-attachments/assets/4f20cc22-a7d9-4423-afbf-15bbe1e29890" />
6
+
7
+ ## Features
8
+
9
+ - **Multiple LLM Provider Support**: bone-agent (built-in proxy), OpenAI, Anthropic, OpenRouter, GLM, Gemini, Kimi, MiniMax, and local models
10
+ - **Tool-Based Interaction**: Code search (`rg`), file editing, directory operations, and web search
11
+ - **Multiple Modes**: Edit (full access), Plan (read-only), and Learn (documentation style)
12
+ - **Parallel Execution**: Run multiple tools concurrently for efficiency
13
+ - **Conversation History**: Markdown logging with context compaction
14
+ - **Approval Workflows**: Safety checks for dangerous commands
15
+
16
+ ## Installation
17
+
18
+ ### Option 1: npm install (Recommended)
19
+
20
+ ```bash
21
+ # Install globally (requires Python 3.9+)
22
+ npm install -g bone-agent-cli
23
+
24
+ # Run bone-agent
25
+ bone-agent
26
+ ```
27
+
28
+ Or use npx without installing:
29
+
30
+ ```bash
31
+ npx bone-agent-cli
32
+ ```
33
+
34
+ ### What Gets Installed
35
+
36
+ The npm package automatically:
37
+ 1. Checks for Python 3.9+ on your system
38
+ 2. Installs Python dependencies via pip
39
+ 3. Creates `~/.bone/config.yaml` from `config.yaml.example` if missing (persists across updates)
40
+ 4. Sets up the `bone-agent` command globally
41
+
42
+ **Requirements:**
43
+ - Node.js 14+ (for npm)
44
+ - Python 3.9+ (for the application)
45
+ - pip (to install Python dependencies)
46
+
47
+ If Python is not found, the installer will guide you through installing it.
48
+
49
+ ### Option 2: Git Clone
50
+
51
+ ```bash
52
+ # Clone the repository
53
+ git clone https://github.com/vincentm65/bone-agent.git
54
+ cd bone-agent
55
+
56
+ # Install Python dependencies
57
+ pip install -r requirements.txt
58
+
59
+ # Run bone-agent
60
+ python src/ui/main.py
61
+ ```
62
+
63
+ **Requirements:**
64
+ - Python 3.9+
65
+ - pip (to install Python dependencies)
66
+
67
+ ## Configuration
68
+
69
+ ### Setting API Keys
70
+
71
+ You have three options to set your API keys:
72
+
73
+ #### Option 1: Interactive Commands (Recommended)
74
+
75
+ Run the app and use the built-in commands:
76
+ ```
77
+ > /key sk-your-api-key-here
78
+ > /provider openai
79
+ ```
80
+
81
+ #### Option 2: Edit config.yaml Directly
82
+
83
+ Edit `~/.bone/config.yaml` and add your keys:
84
+
85
+ ```yaml
86
+ # OpenAI
87
+ OPENAI_API_KEY: "sk-your-key-here"
88
+ OPENAI_MODEL: gpt-4o-mini
89
+
90
+ # Anthropic (Claude)
91
+ ANTHROPIC_API_KEY: "sk-ant-your-key-here"
92
+ ANTHROPIC_MODEL: claude-3-5-sonnet-20241022
93
+
94
+ # Or any other supported provider...
95
+ ```
96
+
97
+ **Note:** Config is stored at `~/.bone/config.yaml` — it persists across npm updates and is never tracked by git.
98
+
99
+ #### Option 3: Environment Variables
100
+
101
+ Set environment variables (they take precedence over ~/.bone/config.yaml):
102
+
103
+ ```bash
104
+ export OPENAI_API_KEY="sk-your-key-here"
105
+ export ANTHROPIC_API_KEY="sk-ant-your-key-here"
106
+
107
+ bone-agent
108
+ ```
109
+
110
+ ### Available Environment Variables
111
+
112
+ - `ANTHROPIC_API_KEY` - Anthropic (Claude) API key
113
+ - `OPENAI_API_KEY` - OpenAI API key
114
+ - `GLM_API_KEY` - GLM (Zhipu AI) API key
115
+ - `GEMINI_API_KEY` - Google Gemini API key
116
+ - `OPENROUTER_API_KEY` - OpenRouter API key
117
+ - `KIMI_API_KEY` - Kimi (Moonshot AI) API key
118
+ - `MINIMAX_API_KEY` - MiniMax API key
119
+ - `BONE_API_KEY` - bone-agent (proxy) API key (auto-set via `/signup`)
120
+ - `BONE_API_BASE` - bone-agent (proxy) API base URL (default: `https://api.vmcode.dev`)
121
+
122
+ ## Commands
123
+
124
+ - `/provider <name>` - Switch LLM provider
125
+ - `/model <name>` - Set model for current provider
126
+ - `/key <api_key>` - Set API key for current provider
127
+ - `/mode <edit|plan|learn>` - Switch interaction mode
128
+ - `/config` - Show all configuration settings
129
+ - `/signup <email>` - Create a bone-agent account and get API key
130
+ - `/account` - View your bone-agent account and plan details
131
+ - `/plan` - View available plans and pricing
132
+ - `/upgrade` - Upgrade your subscription
133
+ - `/help` - Display all available commands
134
+
135
+ /help Menu:
136
+ <img width="1843" height="1349" alt="image" src="https://github.com/user-attachments/assets/631ab805-f012-4bb6-a031-c82a339e94c5" />
137
+
138
+
139
+ ## Project Structure
140
+
141
+ ```
142
+ bone-agent/
143
+ ├── bin/
144
+ │ ├── npm-wrapper.js # npm entry point
145
+ │ ├── rg # ripgrep binary (Linux/macOS)
146
+ │ └── rg.exe # ripgrep binary (Windows)
147
+ ├── config.yaml.example # Configuration template
148
+ ├── requirements.txt # Python dependencies
149
+ ├── package.json # npm package definition
150
+ ├── .npmignore # npm package exclusions
151
+ ├── .gitignore # git exclusions
152
+ ├── src/
153
+ │ ├── core/ # Core orchestration and state management
154
+ │ ├── llm/ # LLM client and provider configurations
155
+ │ ├── ui/ # CLI interface and commands
156
+ │ └── utils/ # Utilities (file ops, search, validation)
157
+ └── tests/ # Test suite (for development)
158
+ ```
159
+
160
+ ## bone-agent Plan (Built-in Proxy)
161
+
162
+ bone-agent offers a built-in proxy provider for a seamless setup experience. Create an account and start coding without configuring third-party API keys.
163
+
164
+ ```
165
+ > /signup you@example.com
166
+ ```
167
+
168
+ Available plans: **Free**, **Lite**, and **Pro**. Use `/plan` to see details and `/upgrade` to change plans.
169
+
170
+ *Paid plans coming soon.*
171
+
172
+ ## Security
173
+
174
+ - User config lives at `~/.bone/config.yaml` — outside the repo and git, persists across updates
175
+ - Never commit API keys or sensitive configuration
176
+ - Use environment variables for CI/CD or shared environments
177
+
178
+ ## Development
179
+
180
+ bone-agent is currently in active development. Production readiness is in progress with focus on:
181
+ - Comprehensive test coverage
182
+ - Documentation
183
+ - Error handling improvements
184
+ - Performance optimizations
@@ -0,0 +1,235 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * bone-agent - npm wrapper for Python application
4
+ * This script launches the Python bone-agent application
5
+ */
6
+
7
+ const { spawn } = require('child_process');
8
+ const os = require('os');
9
+ const path = require('path');
10
+ const fs = require('fs');
11
+
12
+ // Get the package directory - handle both local and global npm installs
13
+ // For global installs, the wrapper is typically in node_modules/.bin or npm's global bin directory
14
+ let packageDir = __dirname;
15
+
16
+ // First check if package.json exists in current directory (local install)
17
+ if (!fs.existsSync(path.join(packageDir, 'package.json'))) {
18
+ // For global installs: check if we're in node_modules/.bin (go up to node_modules/package-name)
19
+ const nodeModulesBin = path.join(packageDir, '..', 'bone-agent-cli', 'package.json');
20
+ if (fs.existsSync(nodeModulesBin)) {
21
+ packageDir = path.join(packageDir, '..', 'bone-agent-cli');
22
+ } else {
23
+ // Alternative: walk up the directory tree looking for package.json
24
+ let found = false;
25
+ let searchDir = packageDir;
26
+ while (searchDir !== path.dirname(searchDir)) {
27
+ const pkgJson = path.join(searchDir, 'package.json');
28
+ if (fs.existsSync(pkgJson)) {
29
+ packageDir = searchDir;
30
+ found = true;
31
+ break;
32
+ }
33
+ searchDir = path.dirname(searchDir);
34
+ }
35
+ if (!found) {
36
+ console.error('Error: Could not find package.json. Installation may be corrupted.');
37
+ console.error(`Searched from: ${__dirname}`);
38
+ process.exit(1);
39
+ }
40
+ }
41
+ }
42
+
43
+ const pythonScript = path.join(packageDir, 'src', 'ui', 'main.py');
44
+
45
+ function findPython() {
46
+ const possibleCommands = ['python3', 'python', 'python3.9', 'python3.10', 'python3.11', 'python3.12'];
47
+
48
+ for (const cmd of possibleCommands) {
49
+ try {
50
+ const result = spawnSync(cmd, ['--version'], { stdio: 'ignore' });
51
+ if (result.status === 0) {
52
+ return cmd;
53
+ }
54
+ } catch (e) {
55
+ // Continue to next command
56
+ }
57
+ }
58
+
59
+ return null;
60
+ }
61
+
62
+ function spawnSync(command, args, options) {
63
+ const { spawnSync: sync } = require('child_process');
64
+ return sync(command, args, options);
65
+ }
66
+
67
+ function checkPythonDependencies(pythonCmd) {
68
+ // Check if requirements are installed
69
+ const requirementsFile = path.join(packageDir, 'requirements.txt');
70
+
71
+ if (!fs.existsSync(requirementsFile)) {
72
+ return true; // No requirements file, assume OK
73
+ }
74
+
75
+ try {
76
+ // Try importing a key module to check if dependencies are installed
77
+ const result = spawnSync(pythonCmd, ['-c', 'import rich, requests, yaml, readability, html2text, ddgs, pathspec, prompt_toolkit, pygments'], {
78
+ stdio: 'ignore',
79
+ cwd: packageDir
80
+ });
81
+
82
+ return result.status === 0;
83
+ } catch (e) {
84
+ return false;
85
+ }
86
+ }
87
+
88
+ function installPythonDependencies(pythonCmd) {
89
+ console.log('Installing Python dependencies...');
90
+ const requirementsFile = path.join(packageDir, 'requirements.txt');
91
+
92
+ const installProcess = spawn(pythonCmd, ['-m', 'pip', 'install', '-r', requirementsFile], {
93
+ stdio: 'inherit',
94
+ cwd: packageDir
95
+ });
96
+
97
+ return new Promise((resolve, reject) => {
98
+ installProcess.on('close', (code) => {
99
+ if (code === 0) {
100
+ resolve();
101
+ } else {
102
+ reject(new Error(`Failed to install Python dependencies (exit code ${code})`));
103
+ }
104
+ });
105
+ });
106
+ }
107
+
108
+ function showSetupMessage() {
109
+ console.log('\n' + '='.repeat(60));
110
+ console.log('bone-agent - Terminal-based AI coding assistant');
111
+ console.log('='.repeat(60));
112
+ console.log('\nFirst-time setup needed!\n');
113
+ console.log('1. Python is required (3.9 or later)');
114
+ console.log('2. Python dependencies need to be installed\n');
115
+ console.log('To complete setup, run:');
116
+ console.log(' npm run install\n');
117
+ console.log('Or manually:');
118
+ console.log(' python3 -m pip install -r requirements.txt\n');
119
+ console.log('Then run bone-agent again.\n');
120
+ }
121
+
122
+ function ensureUserConfig() {
123
+ // User config lives in ~/.bone/config.yaml (persists across npm updates)
124
+ const boneDir = path.join(os.homedir(), '.bone');
125
+ const configFile = path.join(boneDir, 'config.yaml');
126
+ const configExample = path.join(packageDir, 'config.yaml.example');
127
+
128
+ if (!fs.existsSync(boneDir)) {
129
+ fs.mkdirSync(boneDir, { recursive: true });
130
+ }
131
+
132
+ if (!fs.existsSync(configFile)) {
133
+ if (fs.existsSync(configExample)) {
134
+ try {
135
+ fs.copyFileSync(configExample, configFile);
136
+ console.log('✓ Config created: ~/.bone/config.yaml');
137
+ } catch (e) {
138
+ console.log('Failed to create config:', e.message);
139
+ }
140
+ }
141
+ }
142
+
143
+ return configFile;
144
+ }
145
+
146
+ // Handle subcommands before launching Python
147
+ const subcommand = process.argv[2];
148
+
149
+ if (subcommand === 'update') {
150
+ console.log('Updating bone-agent-cli to latest version...');
151
+ const updateProcess = spawn('npm', ['install', '-g', 'bone-agent-cli@latest'], {
152
+ stdio: 'inherit',
153
+ shell: true
154
+ });
155
+
156
+ updateProcess.on('close', (code) => {
157
+ if (code === 0) {
158
+ console.log('\n✓ bone-agent-cli updated successfully');
159
+ } else {
160
+ console.error('\n❌ Update failed (exit code ' + code + ')');
161
+ console.error('Try running manually: npm install -g bone-agent-cli@latest');
162
+ }
163
+ process.exit(code || 0);
164
+ });
165
+
166
+ updateProcess.on('error', (err) => {
167
+ console.error('❌ Failed to run update:', err.message);
168
+ process.exit(1);
169
+ });
170
+ return;
171
+ }
172
+
173
+ async function main() {
174
+ // Find Python executable
175
+ const pythonCmd = findPython();
176
+
177
+ if (!pythonCmd) {
178
+ console.error('\n❌ Error: Python 3.9+ is not installed or not in PATH');
179
+ console.error('Please install Python from https://python.org\n');
180
+ process.exit(1);
181
+ }
182
+
183
+ console.log(`✓ Using Python: ${pythonCmd}`);
184
+
185
+ // Check and install Python dependencies
186
+ if (!checkPythonDependencies(pythonCmd)) {
187
+ console.log('\n⚠️ Python dependencies not installed');
188
+ try {
189
+ await installPythonDependencies(pythonCmd);
190
+ console.log('✓ Python dependencies installed\n');
191
+ } catch (e) {
192
+ console.error('\n❌ Failed to install dependencies:', e.message);
193
+ console.error('Try running: npm run install\n');
194
+ process.exit(1);
195
+ }
196
+ }
197
+
198
+ // Ensure user config exists in ~/.bone/ (persists across npm updates)
199
+ const userConfigPath = ensureUserConfig();
200
+
201
+ // Run the Python application
202
+ // BONE_CONFIG_PATH points to user's persistent config.yaml in ~/.bone/
203
+ const pythonProcess = spawn(pythonCmd, [pythonScript], {
204
+ stdio: 'inherit',
205
+ cwd: process.cwd(),
206
+ env: {
207
+ ...process.env,
208
+ BONE_CONFIG_PATH: userConfigPath,
209
+ }
210
+ });
211
+
212
+ pythonProcess.on('close', (code) => {
213
+ process.exit(code || 0);
214
+ });
215
+
216
+ pythonProcess.on('error', (err) => {
217
+ console.error('\n❌ Failed to start bone-agent:', err.message);
218
+ process.exit(1);
219
+ });
220
+
221
+ // Forward signals
222
+ process.on('SIGINT', () => {
223
+ pythonProcess.kill('SIGINT');
224
+ });
225
+
226
+ process.on('SIGTERM', () => {
227
+ pythonProcess.kill('SIGTERM');
228
+ });
229
+ }
230
+
231
+ // Run main function
232
+ main().catch(err => {
233
+ console.error('\n❌ Unexpected error:', err);
234
+ process.exit(1);
235
+ });
package/bin/rg ADDED
Binary file
package/bin/rg.exe ADDED
Binary file
@@ -0,0 +1,133 @@
1
+ # bone-agent Configuration
2
+ # Copy to config.yaml and add your API keys.
3
+ # Keys can also be set via environment variables or: /key <api-key> /provider <name>
4
+
5
+ # -- General ------------------------------------------------------------------
6
+
7
+ LAST_PROVIDER: bone
8
+
9
+ # -- Provider API Keys --------------------------------------------------------
10
+
11
+ # OpenAI
12
+ OPENAI_API_KEY: "sk-your-openai-key-here"
13
+ OPENAI_MODEL: gpt-4o-mini
14
+ OPENAI_API_BASE: "https://api.openai.com/v1"
15
+
16
+ # Anthropic
17
+ ANTHROPIC_API_KEY: "sk-ant-your-anthropic-key-here"
18
+ ANTHROPIC_MODEL: claude-3-5-sonnet-20241022
19
+ ANTHROPIC_API_BASE: "https://api.anthropic.com/v1"
20
+
21
+ # Google Gemini
22
+ GEMINI_API_KEY: "your-gemini-key-here"
23
+ GEMINI_MODEL: gemini-1.5-flash
24
+ GEMINI_API_BASE: "https://generativelanguage.googleapis.com/v1beta"
25
+
26
+ # Zhipu AI (GLM)
27
+ GLM_API_KEY: "your-glm-key-here"
28
+ GLM_MODEL: glm-4-flash
29
+ GLM_API_BASE: "https://open.bigmodel.cn/api/paas/v4"
30
+
31
+ # OpenRouter
32
+ OPENROUTER_API_KEY: "sk-or-your-openrouter-key-here"
33
+ OPENROUTER_MODEL: openai/gpt-4o-mini
34
+ OPENROUTER_API_BASE: "https://openrouter.ai/api/v1"
35
+
36
+ # Kimi (Moonshot AI)
37
+ KIMI_API_KEY: "your-kimi-key-here"
38
+ KIMI_MODEL: moonshot-v1-8k
39
+ KIMI_API_BASE: "https://api.moonshot.cn/v1"
40
+
41
+ # MiniMax (Anthropic-compatible API)
42
+ MINIMAX_API_KEY: "your-minimax-key-here"
43
+ MINIMAX_MODEL: "MiniMax-M2"
44
+ MINIMAX_API_BASE: "https://api.minimax.io/anthropic/v1"
45
+
46
+ # bone-agent Proxy (subscription — key from billing portal)
47
+ BONE_PROXY_API_KEY: ""
48
+ BONE_PROXY_MODEL: "openai/gpt-4o-mini"
49
+ BONE_PROXY_API_BASE: "https://api.vmcode.dev"
50
+
51
+ # -- Local Models (llama.cpp) -------------------------------------------------
52
+
53
+ LOCAL_MODEL_PATH: "/path/to/your/model.gguf"
54
+ LOCAL_SERVER_PATH: "/path/to/llama.cpp/build/bin/llama-server"
55
+
56
+ SERVER_SETTINGS:
57
+ ngl_layers: 30
58
+ ctx_size: 8192
59
+ n_predict: 8192
60
+ rope_scale: 1.0
61
+ health_check_timeout_sec: 120
62
+ health_check_interval_sec: 1.0
63
+
64
+ # -- Tool Settings ------------------------------------------------------------
65
+
66
+ TOOL_SETTINGS:
67
+ max_tool_calls: 100
68
+ command_timeout_sec: 30
69
+ enable_parallel_execution: true
70
+ max_parallel_workers: 10
71
+ max_command_output_lines: 100
72
+ max_file_preview_lines: 200
73
+
74
+ # -- File Settings ------------------------------------------------------------
75
+
76
+ FILE_SETTINGS:
77
+ max_file_bytes: 200000
78
+ max_total_bytes: 1500000
79
+ exclude_dirs:
80
+ - .git
81
+ - .venv
82
+ - __pycache__
83
+ - node_modules
84
+ - venv
85
+ - env
86
+
87
+ # -- Context Settings ---------------------------------------------------------
88
+ # compact_trigger_tokens: reactive post-response compaction
89
+ # hard_limit_tokens: proactive pre-send guard (defaults to 90% of max_context_window)
90
+
91
+ CONTEXT_SETTINGS:
92
+ compact_trigger_tokens: 100000
93
+ max_context_window: 200000
94
+ hard_limit_tokens: 180000
95
+ notify_auto_compaction: true
96
+ log_conversations: false
97
+ conversations_dir: conversations
98
+ tool_compaction:
99
+ enable_per_message_compaction: true
100
+ uncompacted_tail_tokens: 40000
101
+ min_tool_blocks: 5
102
+ compact_failed_tools: true
103
+
104
+ # -- Sub-Agent Settings -------------------------------------------------------
105
+
106
+ SUB_AGENT_SETTINGS:
107
+ soft_limit_tokens: 300000
108
+ hard_limit_tokens: 500000
109
+ enable_compaction: false
110
+ dump_context_on_hard_limit: true
111
+
112
+ # -- Status Bar ---------------------------------------------------------------
113
+
114
+ STATUS_BAR_SETTINGS:
115
+ show_curr_tokens: true
116
+ show_in_tokens: true
117
+ show_out_tokens: true
118
+ show_total_tokens: true
119
+ show_cost: true
120
+
121
+ # -- Integrations -------------------------------------------------------------
122
+
123
+ # Obsidian vault (disabled by default — no token cost when off)
124
+ OBSIDIAN_SETTINGS:
125
+ enabled: false
126
+ vault_path: ""
127
+ exclude_folders: ".obsidian,.trash,node_modules,.git,__pycache__"
128
+ project_base: "Dev"
129
+
130
+ # Model pricing overrides (cost per 1M tokens)
131
+ MODEL_PRICES: {}
132
+
133
+ # Keep this file private. Env vars override values here. Run 'bone-agent /help' for reference.
package/package.json ADDED
@@ -0,0 +1,53 @@
1
+ {
2
+ "name": "bone-agent",
3
+ "version": "1.3.0",
4
+ "description": "A terminal-based AI coding assistant powered by OpenAI-style function calling",
5
+ "main": "src/ui/main.py",
6
+ "bin": {
7
+ "bone": "bin/npm-wrapper.js"
8
+ },
9
+ "files": [
10
+ "package.json",
11
+ "LICENSE",
12
+ "README.md",
13
+ "requirements.txt",
14
+ "config.yaml.example",
15
+ "bin/npm-wrapper.js",
16
+ "bin/rg",
17
+ "bin/rg.exe",
18
+ "src/**/*.py"
19
+ ],
20
+ "scripts": {
21
+ "postinstall": "echo 'bone-agent installed! Run with: bone'",
22
+ "start": "node bin/npm-wrapper.js"
23
+ },
24
+ "keywords": [
25
+ "ai",
26
+ "coding-assistant",
27
+ "terminal",
28
+ "llm",
29
+ "function-calling",
30
+ "python",
31
+ "gpt",
32
+ "claude",
33
+ "bone-agent"
34
+ ],
35
+ "author": "Vincent Miranda <vincentmiranda65@gmail.com>",
36
+ "license": "MIT",
37
+ "repository": {
38
+ "type": "git",
39
+ "url": "git+https://github.com/vincentm65/vmCode-CLI.git"
40
+ },
41
+ "bugs": {
42
+ "url": "https://github.com/vincentm65/vmCode-CLI/issues"
43
+ },
44
+ "homepage": "https://github.com/vincentm65/vmCode-CLI",
45
+ "engines": {
46
+ "node": ">=14.0.0"
47
+ },
48
+ "os": [
49
+ "darwin",
50
+ "linux",
51
+ "win32"
52
+ ]
53
+ }
@@ -0,0 +1,9 @@
1
+ requests
2
+ rich
3
+ pathspec
4
+ prompt-toolkit>=3.0.0
5
+ ddgs
6
+ readability-lxml
7
+ html2text
8
+ pyyaml
9
+ pygments
@@ -0,0 +1,11 @@
1
+ """bone-agent - AI-powered coding assistant."""
2
+
3
+ import json
4
+ from pathlib import Path
5
+
6
+ try:
7
+ _pkg_path = Path(__file__).resolve().parent.parent / "package.json"
8
+ with open(_pkg_path) as _f:
9
+ __version__ = json.load(_f)["version"]
10
+ except Exception:
11
+ __version__ = "?.?.?"
@@ -0,0 +1 @@
1
+ """Core business logic for bone-agent."""