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.
Files changed (32) hide show
  1. {coreloop-0.1.5 → coreloop-0.1.6}/PKG-INFO +1 -1
  2. {coreloop-0.1.5 → coreloop-0.1.6}/pyproject.toml +1 -1
  3. {coreloop-0.1.5 → coreloop-0.1.6}/pyproject.toml.orig +1 -1
  4. {coreloop-0.1.5 → coreloop-0.1.6}/src/coreloop/.coreloop.toml +1 -1
  5. {coreloop-0.1.5 → coreloop-0.1.6}/src/coreloop/cli/__init__.py +7 -5
  6. {coreloop-0.1.5 → coreloop-0.1.6}/src/coreloop/cli/_tools.py +1 -2
  7. {coreloop-0.1.5 → coreloop-0.1.6}/src/coreloop/config.py +1 -0
  8. {coreloop-0.1.5 → coreloop-0.1.6}/src/coreloop/profiles.py +1 -4
  9. {coreloop-0.1.5 → coreloop-0.1.6}/src/coreloop/web_tools.py +4 -2
  10. {coreloop-0.1.5 → coreloop-0.1.6}/LICENSE +0 -0
  11. {coreloop-0.1.5 → coreloop-0.1.6}/README.md +0 -0
  12. {coreloop-0.1.5 → coreloop-0.1.6}/src/coreloop/__init__.py +0 -0
  13. {coreloop-0.1.5 → coreloop-0.1.6}/src/coreloop/__main__.py +0 -0
  14. {coreloop-0.1.5 → coreloop-0.1.6}/src/coreloop/_api_client.py +0 -0
  15. {coreloop-0.1.5 → coreloop-0.1.6}/src/coreloop/_cache.py +0 -0
  16. {coreloop-0.1.5 → coreloop-0.1.6}/src/coreloop/_logging.py +0 -0
  17. {coreloop-0.1.5 → coreloop-0.1.6}/src/coreloop/_tool_execution.py +0 -0
  18. {coreloop-0.1.5 → coreloop-0.1.6}/src/coreloop/agent.py +0 -0
  19. {coreloop-0.1.5 → coreloop-0.1.6}/src/coreloop/cli/_run.py +0 -0
  20. {coreloop-0.1.5 → coreloop-0.1.6}/src/coreloop/complete.py +0 -0
  21. {coreloop-0.1.5 → coreloop-0.1.6}/src/coreloop/hooks.py +0 -0
  22. {coreloop-0.1.5 → coreloop-0.1.6}/src/coreloop/py.typed +0 -0
  23. {coreloop-0.1.5 → coreloop-0.1.6}/src/coreloop/structured.py +0 -0
  24. {coreloop-0.1.5 → coreloop-0.1.6}/src/coreloop/tool_registry.py +0 -0
  25. {coreloop-0.1.5 → coreloop-0.1.6}/src/coreloop/tools/__init__.py +0 -0
  26. {coreloop-0.1.5 → coreloop-0.1.6}/src/coreloop/tools/_shared.py +0 -0
  27. {coreloop-0.1.5 → coreloop-0.1.6}/src/coreloop/tools/bash.py +0 -0
  28. {coreloop-0.1.5 → coreloop-0.1.6}/src/coreloop/tools/edit.py +0 -0
  29. {coreloop-0.1.5 → coreloop-0.1.6}/src/coreloop/tools/grep.py +0 -0
  30. {coreloop-0.1.5 → coreloop-0.1.6}/src/coreloop/tools/ls.py +0 -0
  31. {coreloop-0.1.5 → coreloop-0.1.6}/src/coreloop/tools/read.py +0 -0
  32. {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.5
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
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "coreloop"
3
- version = "0.1.5"
3
+ version = "0.1.6"
4
4
  description = "A lightweight async tool-calling agent for any OpenAI-compatible API, usable as a library or CLI"
5
5
  readme = "README.md"
6
6
  license = "MIT"
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "coreloop"
3
- version = "0.1.5"
3
+ version = "0.1.6"
4
4
  description = "A lightweight async tool-calling agent for any OpenAI-compatible API, usable as a library or CLI"
5
5
  readme = "README.md"
6
6
  license = "MIT"
@@ -96,6 +96,6 @@ max_timeout = 300
96
96
  # [config.tool.web_search]
97
97
  # url = "http://localhost:8888"
98
98
 
99
- [config.ui.ma]
99
+ [config.ui.core]
100
100
  max_turns = 20
101
101
  tool_result_preview = 300
@@ -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
- ma REPL with default profile (Ollama)
166
- ma --profile openai -p "Hello" one-shot with a named profile
167
- ma -m gpt-4o --tools read,ls,grep --root . override model and add file tools
168
- ma --base-url http://localhost:11434/v1 -m qwen direct endpoint, no config needed
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(get_config("ui.ma.max_turns", raw, 20))
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)
@@ -20,6 +20,7 @@ from typing import Any
20
20
  @dataclass
21
21
  class AgentConfig:
22
22
  """Portable, serialisable bundle of Agent constructor parameters."""
23
+
23
24
  model: str
24
25
  base_url: str = "http://localhost:11434/v1"
25
26
  api_key: str | None = None
@@ -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, re.IGNORECASE,
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, re.IGNORECASE,
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