agent-brain-cli 9.2.0__tar.gz → 9.4.0__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.
- {agent_brain_cli-9.2.0 → agent_brain_cli-9.4.0}/PKG-INFO +2 -2
- {agent_brain_cli-9.2.0 → agent_brain_cli-9.4.0}/agent_brain_cli/__init__.py +1 -1
- {agent_brain_cli-9.2.0 → agent_brain_cli-9.4.0}/agent_brain_cli/commands/config.py +182 -2
- {agent_brain_cli-9.2.0 → agent_brain_cli-9.4.0}/agent_brain_cli/commands/start.py +2 -2
- {agent_brain_cli-9.2.0 → agent_brain_cli-9.4.0}/agent_brain_cli/commands/types.py +5 -0
- {agent_brain_cli-9.2.0 → agent_brain_cli-9.4.0}/pyproject.toml +2 -2
- {agent_brain_cli-9.2.0 → agent_brain_cli-9.4.0}/README.md +0 -0
- {agent_brain_cli-9.2.0 → agent_brain_cli-9.4.0}/agent_brain_cli/cli.py +0 -0
- {agent_brain_cli-9.2.0 → agent_brain_cli-9.4.0}/agent_brain_cli/client/__init__.py +0 -0
- {agent_brain_cli-9.2.0 → agent_brain_cli-9.4.0}/agent_brain_cli/client/api_client.py +0 -0
- {agent_brain_cli-9.2.0 → agent_brain_cli-9.4.0}/agent_brain_cli/commands/__init__.py +0 -0
- {agent_brain_cli-9.2.0 → agent_brain_cli-9.4.0}/agent_brain_cli/commands/cache.py +0 -0
- {agent_brain_cli-9.2.0 → agent_brain_cli-9.4.0}/agent_brain_cli/commands/folders.py +0 -0
- {agent_brain_cli-9.2.0 → agent_brain_cli-9.4.0}/agent_brain_cli/commands/index.py +0 -0
- {agent_brain_cli-9.2.0 → agent_brain_cli-9.4.0}/agent_brain_cli/commands/init.py +0 -0
- {agent_brain_cli-9.2.0 → agent_brain_cli-9.4.0}/agent_brain_cli/commands/inject.py +0 -0
- {agent_brain_cli-9.2.0 → agent_brain_cli-9.4.0}/agent_brain_cli/commands/install_agent.py +0 -0
- {agent_brain_cli-9.2.0 → agent_brain_cli-9.4.0}/agent_brain_cli/commands/jobs.py +0 -0
- {agent_brain_cli-9.2.0 → agent_brain_cli-9.4.0}/agent_brain_cli/commands/list_cmd.py +0 -0
- {agent_brain_cli-9.2.0 → agent_brain_cli-9.4.0}/agent_brain_cli/commands/query.py +0 -0
- {agent_brain_cli-9.2.0 → agent_brain_cli-9.4.0}/agent_brain_cli/commands/reset.py +0 -0
- {agent_brain_cli-9.2.0 → agent_brain_cli-9.4.0}/agent_brain_cli/commands/status.py +0 -0
- {agent_brain_cli-9.2.0 → agent_brain_cli-9.4.0}/agent_brain_cli/commands/stop.py +0 -0
- {agent_brain_cli-9.2.0 → agent_brain_cli-9.4.0}/agent_brain_cli/commands/uninstall.py +0 -0
- {agent_brain_cli-9.2.0 → agent_brain_cli-9.4.0}/agent_brain_cli/config.py +0 -0
- {agent_brain_cli-9.2.0 → agent_brain_cli-9.4.0}/agent_brain_cli/migration.py +0 -0
- {agent_brain_cli-9.2.0 → agent_brain_cli-9.4.0}/agent_brain_cli/runtime/__init__.py +0 -0
- {agent_brain_cli-9.2.0 → agent_brain_cli-9.4.0}/agent_brain_cli/runtime/claude_converter.py +0 -0
- {agent_brain_cli-9.2.0 → agent_brain_cli-9.4.0}/agent_brain_cli/runtime/codex_converter.py +0 -0
- {agent_brain_cli-9.2.0 → agent_brain_cli-9.4.0}/agent_brain_cli/runtime/converter_base.py +0 -0
- {agent_brain_cli-9.2.0 → agent_brain_cli-9.4.0}/agent_brain_cli/runtime/gemini_converter.py +0 -0
- {agent_brain_cli-9.2.0 → agent_brain_cli-9.4.0}/agent_brain_cli/runtime/opencode_converter.py +0 -0
- {agent_brain_cli-9.2.0 → agent_brain_cli-9.4.0}/agent_brain_cli/runtime/parser.py +0 -0
- {agent_brain_cli-9.2.0 → agent_brain_cli-9.4.0}/agent_brain_cli/runtime/skill_runtime_converter.py +0 -0
- {agent_brain_cli-9.2.0 → agent_brain_cli-9.4.0}/agent_brain_cli/runtime/tool_maps.py +0 -0
- {agent_brain_cli-9.2.0 → agent_brain_cli-9.4.0}/agent_brain_cli/runtime/types.py +0 -0
- {agent_brain_cli-9.2.0 → agent_brain_cli-9.4.0}/agent_brain_cli/xdg_paths.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: agent-brain-cli
|
|
3
|
-
Version: 9.
|
|
3
|
+
Version: 9.4.0
|
|
4
4
|
Summary: Agent Brain CLI - Command-line interface for managing AI agent memory and knowledge retrieval
|
|
5
5
|
Home-page: https://github.com/SpillwaveSolutions/agent-brain
|
|
6
6
|
License: MIT
|
|
@@ -15,7 +15,7 @@ Classifier: Programming Language :: Python :: 3
|
|
|
15
15
|
Classifier: Programming Language :: Python :: 3.10
|
|
16
16
|
Classifier: Programming Language :: Python :: 3.11
|
|
17
17
|
Classifier: Programming Language :: Python :: 3.12
|
|
18
|
-
Requires-Dist: agent-brain-rag (>=9.
|
|
18
|
+
Requires-Dist: agent-brain-rag (>=9.4.0,<10.0.0)
|
|
19
19
|
Requires-Dist: click (>=8.1.0,<9.0.0)
|
|
20
20
|
Requires-Dist: httpx (>=0.28.0,<0.29.0)
|
|
21
21
|
Requires-Dist: pydantic (>=2.10.0,<3.0.0)
|
|
@@ -2,11 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
import json
|
|
4
4
|
import os
|
|
5
|
+
import socket
|
|
5
6
|
import sys
|
|
6
7
|
from pathlib import Path
|
|
7
8
|
from typing import Any
|
|
8
9
|
|
|
9
10
|
import click
|
|
11
|
+
import yaml
|
|
10
12
|
from rich.console import Console
|
|
11
13
|
from rich.table import Table
|
|
12
14
|
|
|
@@ -15,6 +17,33 @@ from agent_brain_cli.xdg_paths import get_xdg_config_dir
|
|
|
15
17
|
console = Console()
|
|
16
18
|
|
|
17
19
|
|
|
20
|
+
EMBEDDING_DEFAULT_MODELS = {
|
|
21
|
+
"openai": "text-embedding-3-large",
|
|
22
|
+
"ollama": "nomic-embed-text",
|
|
23
|
+
"cohere": "embed-english-v3.0",
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
SUMMARIZATION_DEFAULT_MODELS = {
|
|
27
|
+
"anthropic": "claude-haiku-4-5-20251001",
|
|
28
|
+
"openai": "gpt-5-mini",
|
|
29
|
+
"ollama": "llama3.2:latest",
|
|
30
|
+
"gemini": "gemini-3-flash",
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
def _find_available_api_port(start: int = 8000, end: int = 8300) -> int:
|
|
35
|
+
"""Find an available TCP port in an inclusive range."""
|
|
36
|
+
for port in range(start, end + 1):
|
|
37
|
+
with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as sock:
|
|
38
|
+
sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
|
|
39
|
+
try:
|
|
40
|
+
sock.bind(("127.0.0.1", port))
|
|
41
|
+
except OSError:
|
|
42
|
+
continue
|
|
43
|
+
return port
|
|
44
|
+
raise click.ClickException(f"No available ports found in range {start}-{end}")
|
|
45
|
+
|
|
46
|
+
|
|
18
47
|
def _find_config_file() -> Path | None:
|
|
19
48
|
"""Find the configuration file in standard locations.
|
|
20
49
|
|
|
@@ -91,12 +120,32 @@ def _find_config_file() -> Path | None:
|
|
|
91
120
|
|
|
92
121
|
def _load_yaml(path: Path) -> dict[str, Any]:
|
|
93
122
|
"""Load YAML configuration file."""
|
|
94
|
-
import yaml
|
|
95
|
-
|
|
96
123
|
with open(path) as f:
|
|
97
124
|
return yaml.safe_load(f) or {}
|
|
98
125
|
|
|
99
126
|
|
|
127
|
+
def _resolve_wizard_config_path() -> Path:
|
|
128
|
+
"""Resolve output path for config wizard.
|
|
129
|
+
|
|
130
|
+
Returns:
|
|
131
|
+
Path to .agent-brain/config.yaml in nearest existing state dir,
|
|
132
|
+
or creates .agent-brain/config.yaml in current working directory.
|
|
133
|
+
"""
|
|
134
|
+
current = Path.cwd()
|
|
135
|
+
root = Path(current.anchor)
|
|
136
|
+
|
|
137
|
+
while True:
|
|
138
|
+
state_dir = current / ".agent-brain"
|
|
139
|
+
if state_dir.is_dir():
|
|
140
|
+
return state_dir / "config.yaml"
|
|
141
|
+
|
|
142
|
+
if current == root:
|
|
143
|
+
break
|
|
144
|
+
current = current.parent
|
|
145
|
+
|
|
146
|
+
return Path.cwd() / ".agent-brain" / "config.yaml"
|
|
147
|
+
|
|
148
|
+
|
|
100
149
|
@click.group("config")
|
|
101
150
|
def config_group() -> None:
|
|
102
151
|
"""View and manage Agent Brain configuration.
|
|
@@ -105,10 +154,141 @@ def config_group() -> None:
|
|
|
105
154
|
Commands:
|
|
106
155
|
show - Display active configuration
|
|
107
156
|
path - Show config file location
|
|
157
|
+
wizard - Create/update config interactively
|
|
108
158
|
"""
|
|
109
159
|
pass
|
|
110
160
|
|
|
111
161
|
|
|
162
|
+
@config_group.command("wizard")
|
|
163
|
+
def wizard() -> None:
|
|
164
|
+
"""Interactive configuration wizard for Agent Brain providers."""
|
|
165
|
+
embed_provider: str = click.prompt(
|
|
166
|
+
"Embedding provider",
|
|
167
|
+
type=click.Choice(["openai", "ollama", "cohere"]),
|
|
168
|
+
default="openai",
|
|
169
|
+
)
|
|
170
|
+
embed_model: str = click.prompt(
|
|
171
|
+
"Embedding model",
|
|
172
|
+
default=EMBEDDING_DEFAULT_MODELS[embed_provider],
|
|
173
|
+
)
|
|
174
|
+
|
|
175
|
+
batch_size: str | None = None
|
|
176
|
+
request_delay_ms: int | None = None
|
|
177
|
+
if embed_provider == "ollama":
|
|
178
|
+
batch_size = click.prompt(
|
|
179
|
+
"Batch size",
|
|
180
|
+
type=click.Choice(["1", "5", "10", "20", "50", "100"]),
|
|
181
|
+
default="10",
|
|
182
|
+
)
|
|
183
|
+
request_delay_ms = click.prompt(
|
|
184
|
+
"Request delay between batches (ms, 0=none)",
|
|
185
|
+
type=click.IntRange(min=0),
|
|
186
|
+
default=0,
|
|
187
|
+
)
|
|
188
|
+
|
|
189
|
+
summ_provider: str = click.prompt(
|
|
190
|
+
"Summarization provider",
|
|
191
|
+
type=click.Choice(["anthropic", "openai", "ollama", "gemini"]),
|
|
192
|
+
default="anthropic",
|
|
193
|
+
)
|
|
194
|
+
summ_model: str = click.prompt(
|
|
195
|
+
"Summarization model",
|
|
196
|
+
default=SUMMARIZATION_DEFAULT_MODELS[summ_provider],
|
|
197
|
+
)
|
|
198
|
+
|
|
199
|
+
graphrag_mode: str = click.prompt(
|
|
200
|
+
"GraphRAG mode\n"
|
|
201
|
+
"1) Disabled\n"
|
|
202
|
+
"2) AST for code + LangExtract for docs (recommended for mixed repos)\n"
|
|
203
|
+
"3) Kuzu + AST for code + LangExtract for docs\n"
|
|
204
|
+
"4) AST for code only",
|
|
205
|
+
type=click.Choice(["1", "2", "3", "4"]),
|
|
206
|
+
default="1",
|
|
207
|
+
)
|
|
208
|
+
|
|
209
|
+
suggested_port = _find_available_api_port(8000, 8300)
|
|
210
|
+
click.echo(f"Discovered available API port in 8000-8300 range: {suggested_port}")
|
|
211
|
+
|
|
212
|
+
deployment_mode: str = click.prompt(
|
|
213
|
+
"Deployment mode\n"
|
|
214
|
+
"1) Localhost only (127.0.0.1)\n"
|
|
215
|
+
"2) Network accessible (0.0.0.0 or custom host)\n"
|
|
216
|
+
"3) Custom port on localhost",
|
|
217
|
+
type=click.Choice(["1", "2", "3"]),
|
|
218
|
+
default="1",
|
|
219
|
+
)
|
|
220
|
+
|
|
221
|
+
api_host = "127.0.0.1"
|
|
222
|
+
if deployment_mode == "2":
|
|
223
|
+
host_mode: str = click.prompt(
|
|
224
|
+
"Host selection\n" "1) 0.0.0.0\n" "2) Custom host/IP",
|
|
225
|
+
type=click.Choice(["1", "2"]),
|
|
226
|
+
default="1",
|
|
227
|
+
)
|
|
228
|
+
if host_mode == "1":
|
|
229
|
+
api_host = "0.0.0.0"
|
|
230
|
+
else:
|
|
231
|
+
api_host = click.prompt("Custom host", default="0.0.0.0")
|
|
232
|
+
|
|
233
|
+
api_port: int = click.prompt(
|
|
234
|
+
"API port",
|
|
235
|
+
type=click.IntRange(min=1, max=65535),
|
|
236
|
+
default=suggested_port,
|
|
237
|
+
)
|
|
238
|
+
|
|
239
|
+
config: dict[str, Any] = {
|
|
240
|
+
"embedding": {
|
|
241
|
+
"provider": embed_provider,
|
|
242
|
+
"model": embed_model,
|
|
243
|
+
},
|
|
244
|
+
"summarization": {
|
|
245
|
+
"provider": summ_provider,
|
|
246
|
+
"model": summ_model,
|
|
247
|
+
},
|
|
248
|
+
"graphrag": {
|
|
249
|
+
"enabled": False,
|
|
250
|
+
},
|
|
251
|
+
"api": {
|
|
252
|
+
"host": api_host,
|
|
253
|
+
"port": api_port,
|
|
254
|
+
},
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
if embed_provider == "ollama":
|
|
258
|
+
config["embedding"]["params"] = {
|
|
259
|
+
"batch_size": int(batch_size or "10"),
|
|
260
|
+
"request_delay_ms": int(request_delay_ms or 0),
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
if graphrag_mode == "2":
|
|
264
|
+
config["graphrag"] = {
|
|
265
|
+
"enabled": True,
|
|
266
|
+
"store_type": "simple",
|
|
267
|
+
"use_code_metadata": True,
|
|
268
|
+
"doc_extractor": "langextract",
|
|
269
|
+
}
|
|
270
|
+
elif graphrag_mode == "3":
|
|
271
|
+
config["graphrag"] = {
|
|
272
|
+
"enabled": True,
|
|
273
|
+
"store_type": "kuzu",
|
|
274
|
+
"use_code_metadata": True,
|
|
275
|
+
"doc_extractor": "langextract",
|
|
276
|
+
}
|
|
277
|
+
elif graphrag_mode == "4":
|
|
278
|
+
config["graphrag"] = {
|
|
279
|
+
"enabled": True,
|
|
280
|
+
"store_type": "simple",
|
|
281
|
+
"use_code_metadata": True,
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
config_path = _resolve_wizard_config_path()
|
|
285
|
+
config_path.parent.mkdir(parents=True, exist_ok=True)
|
|
286
|
+
with open(config_path, "w", encoding="utf-8") as f:
|
|
287
|
+
yaml.safe_dump(config, f, default_flow_style=False, sort_keys=False)
|
|
288
|
+
|
|
289
|
+
console.print(f"[green]Config written to {config_path}[/]")
|
|
290
|
+
|
|
291
|
+
|
|
112
292
|
@config_group.command("show")
|
|
113
293
|
@click.option("--json", "json_output", is_flag=True, help="Output as JSON")
|
|
114
294
|
def show_config(json_output: bool) -> None:
|
|
@@ -196,8 +196,8 @@ def update_registry(project_root: Path, state_dir: Path) -> None:
|
|
|
196
196
|
@click.option(
|
|
197
197
|
"--timeout",
|
|
198
198
|
type=int,
|
|
199
|
-
default=
|
|
200
|
-
help="Startup timeout in seconds (default:
|
|
199
|
+
default=120,
|
|
200
|
+
help="Startup timeout in seconds (default: 120)",
|
|
201
201
|
)
|
|
202
202
|
@click.option("--json", "json_output", is_flag=True, help="Output as JSON")
|
|
203
203
|
@click.option(
|
|
@@ -24,6 +24,7 @@ FILE_TYPE_PRESETS: dict[str, list[str]] = {
|
|
|
24
24
|
"rust": ["*.rs"],
|
|
25
25
|
"java": ["*.java"],
|
|
26
26
|
"csharp": ["*.cs"],
|
|
27
|
+
"pascal": ["*.pas", "*.pp", "*.lpr", "*.dpr"],
|
|
27
28
|
"c": ["*.c", "*.h"],
|
|
28
29
|
"cpp": ["*.cpp", "*.hpp", "*.cc", "*.hh"],
|
|
29
30
|
"web": ["*.html", "*.css", "*.scss", "*.jsx", "*.tsx"],
|
|
@@ -44,6 +45,10 @@ FILE_TYPE_PRESETS: dict[str, list[str]] = {
|
|
|
44
45
|
"*.rs",
|
|
45
46
|
"*.java",
|
|
46
47
|
"*.cs",
|
|
48
|
+
"*.pas",
|
|
49
|
+
"*.pp",
|
|
50
|
+
"*.lpr",
|
|
51
|
+
"*.dpr",
|
|
47
52
|
"*.c",
|
|
48
53
|
"*.h",
|
|
49
54
|
"*.cpp",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[tool.poetry]
|
|
2
2
|
name = "agent-brain-cli"
|
|
3
|
-
version = "9.
|
|
3
|
+
version = "9.4.0"
|
|
4
4
|
description = "Agent Brain CLI - Command-line interface for managing AI agent memory and knowledge retrieval"
|
|
5
5
|
authors = ["Spillwave Solutions"]
|
|
6
6
|
readme = "README.md"
|
|
@@ -27,7 +27,7 @@ httpx = "^0.28.0"
|
|
|
27
27
|
rich = "^13.9.0"
|
|
28
28
|
pyyaml = "^6.0.0"
|
|
29
29
|
pydantic = "^2.10.0"
|
|
30
|
-
agent-brain-rag = "^9.
|
|
30
|
+
agent-brain-rag = "^9.4.0"
|
|
31
31
|
|
|
32
32
|
[tool.poetry.group.dev.dependencies]
|
|
33
33
|
pytest = "^8.3.0"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{agent_brain_cli-9.2.0 → agent_brain_cli-9.4.0}/agent_brain_cli/runtime/opencode_converter.py
RENAMED
|
File without changes
|
|
File without changes
|
{agent_brain_cli-9.2.0 → agent_brain_cli-9.4.0}/agent_brain_cli/runtime/skill_runtime_converter.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|