coreloop 0.1.5__tar.gz → 0.1.6__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.
- {coreloop-0.1.5 → coreloop-0.1.6}/PKG-INFO +1 -1
- {coreloop-0.1.5 → coreloop-0.1.6}/pyproject.toml +1 -1
- {coreloop-0.1.5 → coreloop-0.1.6}/pyproject.toml.orig +1 -1
- {coreloop-0.1.5 → coreloop-0.1.6}/src/coreloop/.coreloop.toml +1 -1
- {coreloop-0.1.5 → coreloop-0.1.6}/src/coreloop/cli/__init__.py +7 -5
- {coreloop-0.1.5 → coreloop-0.1.6}/src/coreloop/cli/_tools.py +1 -2
- {coreloop-0.1.5 → coreloop-0.1.6}/src/coreloop/config.py +1 -0
- {coreloop-0.1.5 → coreloop-0.1.6}/src/coreloop/profiles.py +1 -4
- {coreloop-0.1.5 → coreloop-0.1.6}/src/coreloop/web_tools.py +4 -2
- {coreloop-0.1.5 → coreloop-0.1.6}/LICENSE +0 -0
- {coreloop-0.1.5 → coreloop-0.1.6}/README.md +0 -0
- {coreloop-0.1.5 → coreloop-0.1.6}/src/coreloop/__init__.py +0 -0
- {coreloop-0.1.5 → coreloop-0.1.6}/src/coreloop/__main__.py +0 -0
- {coreloop-0.1.5 → coreloop-0.1.6}/src/coreloop/_api_client.py +0 -0
- {coreloop-0.1.5 → coreloop-0.1.6}/src/coreloop/_cache.py +0 -0
- {coreloop-0.1.5 → coreloop-0.1.6}/src/coreloop/_logging.py +0 -0
- {coreloop-0.1.5 → coreloop-0.1.6}/src/coreloop/_tool_execution.py +0 -0
- {coreloop-0.1.5 → coreloop-0.1.6}/src/coreloop/agent.py +0 -0
- {coreloop-0.1.5 → coreloop-0.1.6}/src/coreloop/cli/_run.py +0 -0
- {coreloop-0.1.5 → coreloop-0.1.6}/src/coreloop/complete.py +0 -0
- {coreloop-0.1.5 → coreloop-0.1.6}/src/coreloop/hooks.py +0 -0
- {coreloop-0.1.5 → coreloop-0.1.6}/src/coreloop/py.typed +0 -0
- {coreloop-0.1.5 → coreloop-0.1.6}/src/coreloop/structured.py +0 -0
- {coreloop-0.1.5 → coreloop-0.1.6}/src/coreloop/tool_registry.py +0 -0
- {coreloop-0.1.5 → coreloop-0.1.6}/src/coreloop/tools/__init__.py +0 -0
- {coreloop-0.1.5 → coreloop-0.1.6}/src/coreloop/tools/_shared.py +0 -0
- {coreloop-0.1.5 → coreloop-0.1.6}/src/coreloop/tools/bash.py +0 -0
- {coreloop-0.1.5 → coreloop-0.1.6}/src/coreloop/tools/edit.py +0 -0
- {coreloop-0.1.5 → coreloop-0.1.6}/src/coreloop/tools/grep.py +0 -0
- {coreloop-0.1.5 → coreloop-0.1.6}/src/coreloop/tools/ls.py +0 -0
- {coreloop-0.1.5 → coreloop-0.1.6}/src/coreloop/tools/read.py +0 -0
- {coreloop-0.1.5 → coreloop-0.1.6}/src/coreloop/types.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: coreloop
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.6
|
|
4
4
|
Summary: A lightweight async tool-calling agent for any OpenAI-compatible API, usable as a library or CLI
|
|
5
5
|
Keywords: llm,agent,tool-calling,openai,ollama,cli,async,streaming,hooks,httpx,local-models
|
|
6
6
|
Author: Chris Kilner
|
|
@@ -162,10 +162,10 @@ def main(
|
|
|
162
162
|
Edit it to set your provider credentials and default tools.
|
|
163
163
|
|
|
164
164
|
[bold]Examples[/bold]
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
165
|
+
core REPL with default profile (Ollama)
|
|
166
|
+
core --profile openai -p "Hello" one-shot with a named profile
|
|
167
|
+
core -m gpt-4o --tools read,ls,grep --root . override model and add file tools
|
|
168
|
+
core --base-url http://localhost:11434/v1 -m qwen direct endpoint, no config needed
|
|
169
169
|
"""
|
|
170
170
|
if ctx.invoked_subcommand is not None:
|
|
171
171
|
return
|
|
@@ -234,7 +234,9 @@ def main(
|
|
|
234
234
|
built_tools = build_tools(tools_opt, agent_cfg.root, searxng_url, raw)
|
|
235
235
|
|
|
236
236
|
if max_turns is None:
|
|
237
|
-
max_turns = int(
|
|
237
|
+
max_turns = int(
|
|
238
|
+
get_config("ui.core.max_turns", raw) or get_config("ui.ma.max_turns", raw, 20)
|
|
239
|
+
)
|
|
238
240
|
|
|
239
241
|
try:
|
|
240
242
|
agent = Agent.from_config(agent_cfg, hooks=MaxTurnsHook(max_turns), tools=built_tools)
|
|
@@ -72,8 +72,7 @@ def build_tools(
|
|
|
72
72
|
web_tools = make_web_tools(searxng_url=searxng_url)
|
|
73
73
|
except ImportError:
|
|
74
74
|
typer.echo(
|
|
75
|
-
"To use web_search or web_fetch, install web extras: "
|
|
76
|
-
"pip install coreloop[web]",
|
|
75
|
+
"To use web_search or web_fetch, install web extras: pip install coreloop[web]",
|
|
77
76
|
err=True,
|
|
78
77
|
)
|
|
79
78
|
raise typer.Exit(1)
|
|
@@ -57,10 +57,7 @@ _CONFIG_PATH = _find_config_path()
|
|
|
57
57
|
def _load_config(path: Path | None = None) -> dict[str, Any]:
|
|
58
58
|
p = path or _CONFIG_PATH
|
|
59
59
|
if not p.exists():
|
|
60
|
-
msg =
|
|
61
|
-
f"Config file not found at {p}. "
|
|
62
|
-
f"Create ~/{_CONFIG_FILENAME} or set CORELOOP_CONFIG."
|
|
63
|
-
)
|
|
60
|
+
msg = f"Config file not found at {p}. Create ~/{_CONFIG_FILENAME} or set CORELOOP_CONFIG."
|
|
64
61
|
raise FileNotFoundError(msg)
|
|
65
62
|
return tomllib.loads(p.read_bytes().decode("utf-8"))
|
|
66
63
|
|
|
@@ -32,12 +32,14 @@ def _metadata(html_content: str) -> str:
|
|
|
32
32
|
meta["title"] = _html.unescape(m.group(1).strip())
|
|
33
33
|
if m := re.search(
|
|
34
34
|
r'<meta[^>]*name=["\']description["\'][^>]*content=["\']([^"\']*)["\']',
|
|
35
|
-
html_content,
|
|
35
|
+
html_content,
|
|
36
|
+
re.IGNORECASE,
|
|
36
37
|
):
|
|
37
38
|
meta["description"] = _html.unescape(m.group(1).strip())
|
|
38
39
|
for prop, value in re.findall(
|
|
39
40
|
r'<meta[^>]*property=["\']og:(\w+)["\'][^>]*content=["\']([^"\']*)["\']',
|
|
40
|
-
html_content,
|
|
41
|
+
html_content,
|
|
42
|
+
re.IGNORECASE,
|
|
41
43
|
):
|
|
42
44
|
meta[f"og_{prop}"] = _html.unescape(value.strip())
|
|
43
45
|
return "\n".join(f"{k}: {v}" for k, v in meta.items())
|
|
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
|