toolbase 0.8.1__tar.gz → 0.9.1__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 (67) hide show
  1. {toolbase-0.8.1 → toolbase-0.9.1}/CHANGELOG.md +22 -0
  2. {toolbase-0.8.1 → toolbase-0.9.1}/PKG-INFO +3 -3
  3. {toolbase-0.8.1 → toolbase-0.9.1}/pyproject.toml +18 -5
  4. {toolbase-0.8.1 → toolbase-0.9.1}/toolbase/cli.py +142 -58
  5. {toolbase-0.8.1 → toolbase-0.9.1}/toolbase/connect/orchestral.py +69 -6
  6. {toolbase-0.8.1 → toolbase-0.9.1}/toolbase/serve/orchestrator.py +115 -16
  7. {toolbase-0.8.1 → toolbase-0.9.1}/toolbase/validation.py +4 -2
  8. {toolbase-0.8.1 → toolbase-0.9.1}/LICENSE +0 -0
  9. {toolbase-0.8.1 → toolbase-0.9.1}/MANIFEST.in +0 -0
  10. {toolbase-0.8.1 → toolbase-0.9.1}/README.md +0 -0
  11. {toolbase-0.8.1 → toolbase-0.9.1}/setup.cfg +0 -0
  12. {toolbase-0.8.1 → toolbase-0.9.1}/toolbase/__init__.py +0 -0
  13. {toolbase-0.8.1 → toolbase-0.9.1}/toolbase/_setup_host.py +0 -0
  14. {toolbase-0.8.1 → toolbase-0.9.1}/toolbase/_toolkit_host.py +0 -0
  15. {toolbase-0.8.1 → toolbase-0.9.1}/toolbase/astro.py +0 -0
  16. {toolbase-0.8.1 → toolbase-0.9.1}/toolbase/auth.py +0 -0
  17. {toolbase-0.8.1 → toolbase-0.9.1}/toolbase/config.py +0 -0
  18. {toolbase-0.8.1 → toolbase-0.9.1}/toolbase/connect/__init__.py +0 -0
  19. {toolbase-0.8.1 → toolbase-0.9.1}/toolbase/connect/base.py +0 -0
  20. {toolbase-0.8.1 → toolbase-0.9.1}/toolbase/connect/claude_code.py +0 -0
  21. {toolbase-0.8.1 → toolbase-0.9.1}/toolbase/connect/codex.py +0 -0
  22. {toolbase-0.8.1 → toolbase-0.9.1}/toolbase/connect/opencode.py +0 -0
  23. {toolbase-0.8.1 → toolbase-0.9.1}/toolbase/envs/__init__.py +0 -0
  24. {toolbase-0.8.1 → toolbase-0.9.1}/toolbase/envs/bundle_deps.py +0 -0
  25. {toolbase-0.8.1 → toolbase-0.9.1}/toolbase/envs/cache.py +0 -0
  26. {toolbase-0.8.1 → toolbase-0.9.1}/toolbase/envs/config.py +0 -0
  27. {toolbase-0.8.1 → toolbase-0.9.1}/toolbase/envs/discovery.py +0 -0
  28. {toolbase-0.8.1 → toolbase-0.9.1}/toolbase/envs/manifest.py +0 -0
  29. {toolbase-0.8.1 → toolbase-0.9.1}/toolbase/envs/paths.py +0 -0
  30. {toolbase-0.8.1 → toolbase-0.9.1}/toolbase/envs/schema.py +0 -0
  31. {toolbase-0.8.1 → toolbase-0.9.1}/toolbase/hep.py +0 -0
  32. {toolbase-0.8.1 → toolbase-0.9.1}/toolbase/ingest.py +0 -0
  33. {toolbase-0.8.1 → toolbase-0.9.1}/toolbase/logging/__init__.py +0 -0
  34. {toolbase-0.8.1 → toolbase-0.9.1}/toolbase/logging/logger.py +0 -0
  35. {toolbase-0.8.1 → toolbase-0.9.1}/toolbase/naming.py +0 -0
  36. {toolbase-0.8.1 → toolbase-0.9.1}/toolbase/neutrino.py +0 -0
  37. {toolbase-0.8.1 → toolbase-0.9.1}/toolbase/quantum.py +0 -0
  38. {toolbase-0.8.1 → toolbase-0.9.1}/toolbase/serve/__init__.py +0 -0
  39. {toolbase-0.8.1 → toolbase-0.9.1}/toolbase/serve/bundles.py +0 -0
  40. {toolbase-0.8.1 → toolbase-0.9.1}/toolbase/serve/config.py +0 -0
  41. {toolbase-0.8.1 → toolbase-0.9.1}/toolbase/serve/profile_scaffold.py +0 -0
  42. {toolbase-0.8.1 → toolbase-0.9.1}/toolbase/serve/profiles.py +0 -0
  43. {toolbase-0.8.1 → toolbase-0.9.1}/toolbase/serve/proxy_tool.py +0 -0
  44. {toolbase-0.8.1 → toolbase-0.9.1}/toolbase/setup/__init__.py +0 -0
  45. {toolbase-0.8.1 → toolbase-0.9.1}/toolbase/setup/_rpc.py +0 -0
  46. {toolbase-0.8.1 → toolbase-0.9.1}/toolbase/setup/context.py +0 -0
  47. {toolbase-0.8.1 → toolbase-0.9.1}/toolbase/setup/declarative.py +0 -0
  48. {toolbase-0.8.1 → toolbase-0.9.1}/toolbase/setup/downloads.py +0 -0
  49. {toolbase-0.8.1 → toolbase-0.9.1}/toolbase/setup/prompts.py +0 -0
  50. {toolbase-0.8.1 → toolbase-0.9.1}/toolbase/setup/runner.py +0 -0
  51. {toolbase-0.8.1 → toolbase-0.9.1}/toolbase/setup/schema.py +0 -0
  52. {toolbase-0.8.1 → toolbase-0.9.1}/toolbase/setup/storage.py +0 -0
  53. {toolbase-0.8.1 → toolbase-0.9.1}/toolbase/setup/validate_cache.py +0 -0
  54. {toolbase-0.8.1 → toolbase-0.9.1}/toolbase/skills.py +0 -0
  55. {toolbase-0.8.1 → toolbase-0.9.1}/toolbase/templates/Dockerfile.template +0 -0
  56. {toolbase-0.8.1 → toolbase-0.9.1}/toolbase/templates/README.md.template +0 -0
  57. {toolbase-0.8.1 → toolbase-0.9.1}/toolbase/templates/__init__.py.template +0 -0
  58. {toolbase-0.8.1 → toolbase-0.9.1}/toolbase/templates/mcp/__init__.py.template +0 -0
  59. {toolbase-0.8.1 → toolbase-0.9.1}/toolbase/templates/mcp/server_stdio.py.template +0 -0
  60. {toolbase-0.8.1 → toolbase-0.9.1}/toolbase/templates/requirements.txt.template +0 -0
  61. {toolbase-0.8.1 → toolbase-0.9.1}/toolbase/templates/setup.py.template +0 -0
  62. {toolbase-0.8.1 → toolbase-0.9.1}/toolbase/templates/skills/example_skill.md +0 -0
  63. {toolbase-0.8.1 → toolbase-0.9.1}/toolbase/templates/tool_example.py +0 -0
  64. {toolbase-0.8.1 → toolbase-0.9.1}/toolbase/templates/toolkit.yaml.template +0 -0
  65. {toolbase-0.8.1 → toolbase-0.9.1}/toolbase/toolkit.py +0 -0
  66. {toolbase-0.8.1 → toolbase-0.9.1}/toolbase/versioning.py +0 -0
  67. {toolbase-0.8.1 → toolbase-0.9.1}/toolbase.egg-info/SOURCES.txt +0 -0
@@ -8,6 +8,28 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/), and this
8
8
 
9
9
  ## [Unreleased]
10
10
 
11
+ ## [0.9.1] — 2026-07-29
12
+
13
+ ### Changed
14
+
15
+ - **The `tb connect orchestral` scaffold now works in `sandbox/` rather than `workspace/`.** Same directory, new name — it sits beside `.toolbase/` and is where both the served toolkits and the scaffold's own file tools resolve relative paths. `sandbox` is the more common convention among toolkits that ship demo agents, and reads as "scratch space the agent owns" rather than "the project". Re-run `tb connect orchestral --force` to pick it up; an existing `workspace/` is left alone, so move or delete it yourself.
16
+
17
+ ### Fixed
18
+
19
+ - **`tb connect` now wires the exact toolbase binary by default.** A bare `toolbase` command is resolved against the `PATH` the harness inherits, and that PATH can differ from the shell that ran `connect`: activating an environment, sourcing an rc file, opening a new tab, or launching a GUI app can change it. The result was a clean connection followed by a failed MCP server, fixable only by reconnecting with `--abspath`.
20
+
21
+ The absolute path is now the default in **every** scope and for every installation, so the harness launches the same toolbase the user connected. `--portable` explicitly writes bare `toolbase` for a committed config that each teammate's PATH should resolve; `--abspath` remains an explicit spelling of the default. This is orthogonal to scope — the command string says how to find the binary, not which sessions get the tools — so project-scoped wiring and per-project curation are unchanged.
22
+
23
+ ## [0.9.0] — 2026-07-29
24
+
25
+ ### Changed
26
+
27
+ - **Toolkit hosts now run on MCP SDK 2.x.** The `mcp` dependency moved from `>=1.0,<2` to `>=2` and `orchestral-ai` from `>=1.4` to `>=1.10`, in both toolbase's own dependencies and the `HOST_RUNTIME_REQUIREMENTS` installed into every toolkit venv. toolbase never imports the SDK itself — it reaches it only through `orchestral.mcp` — so the major orchestral targets is the major toolbase needs, and the two bounds only make sense as a pair. orchestral 1.10 is a clean port to the 2.x API with no 1.x compatibility path and refuses to start against an older SDK; conversely orchestral <1.10 is built on the decorator API (`Server.list_tools` / `Server.call_tool`) that 2.0 removed. Since orchestral-ai declares no `mcp` constraint of its own, pinning both ends is what keeps pip off a mismatched pair.
28
+
29
+ **Existing toolkit venvs were built against mcp 1.x and need `tb install <toolkit> --rebuild`** to pick up the new pair; until then their hosts fail at startup with `'Server' object has no attribute 'list_tools'`, surfacing as `mcp connect failed: unhandled errors in a TaskGroup`.
30
+
31
+ - Toolkit validation now names `orchestral-ai>=1.10.0` as the floor a toolkit's `requirements.txt` should declare. The check itself is unchanged (still presence-only, not a version comparison).
32
+
11
33
  ## [0.8.1] — 2026-07-27
12
34
 
13
35
  ### Fixed
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: toolbase
3
- Version: 0.8.1
3
+ Version: 0.9.1
4
4
  Summary: The community registry and CLI for AI agent toolkits - discover, share, and serve tools to AI agents over MCP
5
5
  Author-email: Alex Roman <toolbase.dev@gmail.com>
6
6
  License: MIT
@@ -27,8 +27,8 @@ Requires-Dist: ruamel.yaml>=0.18
27
27
  Requires-Dist: rich>=13.0
28
28
  Requires-Dist: pydantic>=2.0
29
29
  Requires-Dist: email-validator>=2.0
30
- Requires-Dist: orchestral-ai>=1.4
31
- Requires-Dist: mcp>=1.0
30
+ Requires-Dist: orchestral-ai>=1.10
31
+ Requires-Dist: mcp>=2
32
32
  Requires-Dist: tomlkit>=0.12
33
33
  Provides-Extra: dev
34
34
  Requires-Dist: pytest>=7.0; extra == "dev"
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "toolbase"
7
- version = "0.8.1"
7
+ version = "0.9.1"
8
8
  description = "The community registry and CLI for AI agent toolkits - discover, share, and serve tools to AI agents over MCP"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.12"
@@ -36,10 +36,23 @@ dependencies = [
36
36
  "pydantic>=2.0",
37
37
  # Required by Pydantic's EmailStr at runtime; not imported directly.
38
38
  "email-validator>=2.0",
39
- # 1.4 introduced the `state=[...]` decorator argument that the
40
- # Phase 3C-1 setup system relies on for state-field declaration.
41
- "orchestral-ai>=1.4",
42
- "mcp>=1.0",
39
+ # 1.4 introduced the `state=[...]` decorator argument that the Phase 3C-1
40
+ # setup system relies on for state-field declaration; 1.10 is the first
41
+ # release whose orchestral.mcp is built on MCP SDK 2.x.
42
+ "orchestral-ai>=1.10",
43
+ # We never import the SDK ourselves — the host reaches it only through
44
+ # `orchestral.mcp` — so the major orchestral targets is the major we need,
45
+ # and these two bounds only make sense as a pair. orchestral >=1.10 ported
46
+ # to 2.x with no 1.x compatibility path and refuses to start against an
47
+ # older SDK; orchestral <1.10 is built on the decorator API
48
+ # (`Server.list_tools` / `Server.call_tool`) that 2.0 removed, and dies at
49
+ # startup with `'Server' object has no attribute 'list_tools'` — which
50
+ # reaches the user only as `mcp connect failed: unhandled errors in a
51
+ # TaskGroup`. orchestral-ai declares no mcp constraint of its own, so
52
+ # nothing but this pin keeps pip off a mismatched pair.
53
+ # Keep in sync with HOST_RUNTIME_REQUIREMENTS in cli.py, which applies the
54
+ # same pair to each toolkit's venv.
55
+ "mcp>=2",
43
56
  # Round-trips ~/.codex/config.toml for `tb connect codex` while preserving
44
57
  # the user's comments + formatting. The stdlib only reads TOML (tomllib);
45
58
  # tomlkit is the writer (same role ruamel.yaml plays for our YAML).
@@ -25,6 +25,29 @@ from .config import _api_url
25
25
  console = Console()
26
26
 
27
27
 
28
+ # The runtime every per-toolkit venv needs so ``toolbase._toolkit_host`` can
29
+ # start inside it: orchestral supplies ``@define_tool`` and the tool plumbing,
30
+ # mcp is the wire the host speaks to the orchestrator.
31
+ #
32
+ # Both bounds are load-bearing, not cosmetic, and they have to move as a pair.
33
+ # ``orchestral-ai`` declares no mcp constraint of its own, so pip is free to
34
+ # pick a combination neither side supports:
35
+ #
36
+ # * orchestral <1.10 is written against MCP SDK 1.x. With mcp 2.x resolved,
37
+ # the host dies at startup with `'Server' object has no attribute
38
+ # 'list_tools'` (2.0 dropped the decorator API), which the orchestrator can
39
+ # only report as the opaque `mcp connect failed: unhandled errors in a
40
+ # TaskGroup`.
41
+ # * orchestral >=1.10 is a clean port to 2.x with no 1.x compatibility path.
42
+ # Paired with mcp 1.x its ``_check_mcp_installed`` refuses to start.
43
+ #
44
+ # Either way the venv is born broken and the failure has nothing to do with
45
+ # what the user was doing. Pinning both ends is what keeps that from happening.
46
+ #
47
+ # Keep in sync with the ``orchestral-ai`` and ``mcp`` pins in pyproject.toml.
48
+ HOST_RUNTIME_REQUIREMENTS = ["orchestral-ai>=1.10", "mcp>=2"]
49
+
50
+
28
51
  # ── Agent-friendliness: --yes / --no / --no-input across all commands ──────
29
52
  #
30
53
  # Per STATUS.md §"Named principles" (flag-equivalence) and the Tier-1 polish
@@ -3221,11 +3244,10 @@ def setup_venv_environment(
3221
3244
  )
3222
3245
  console.print("[green]✓ Bundle dependencies installed[/green]")
3223
3246
 
3224
- # Install orchestral-ai + mcp SDK. Both are required: orchestral provides
3225
- # the @define_tool decorator and tool plumbing; mcp is what the per-toolkit
3226
- # subprocess (toolbase serve's host) uses to expose tools over HTTP.
3247
+ # Install the host runtime (orchestral + a compatible mcp) into the venv.
3248
+ # See HOST_RUNTIME_REQUIREMENTS for why the mcp bound matters.
3227
3249
  _run_pip_with_progress(
3228
- [str(pip_path), 'install', 'orchestral-ai', 'mcp'],
3250
+ [str(pip_path), 'install', *HOST_RUNTIME_REQUIREMENTS],
3229
3251
  console,
3230
3252
  "Installing orchestral-ai and mcp",
3231
3253
  )
@@ -3351,7 +3373,7 @@ def setup_conda_environment(
3351
3373
  try:
3352
3374
  _run_pip_with_progress(
3353
3375
  [conda_cmd, 'run', '-n', env_name, 'pip', 'install',
3354
- 'orchestral-ai', 'mcp'],
3376
+ *HOST_RUNTIME_REQUIREMENTS],
3355
3377
  console,
3356
3378
  f"Installing orchestral + mcp in '{env_name}'",
3357
3379
  )
@@ -6852,44 +6874,20 @@ def _toolbase_abspath() -> str:
6852
6874
  return shutil.which("toolbase") or "toolbase"
6853
6875
 
6854
6876
 
6855
- def _toolbase_is_env_installed() -> bool:
6856
- """True when toolbase runs from an isolated env whose ``bin`` a harness
6857
- process likely won't have on PATH — a venv/virtualenv, or a *named*
6858
- (non-base) conda env. Used to warn before writing a bare command that
6859
- may not resolve for the harness."""
6860
- if sys.prefix != getattr(sys, "base_prefix", sys.prefix):
6861
- return True # venv / virtualenv
6862
- conda_env = os.environ.get("CONDA_DEFAULT_ENV")
6863
- return bool(conda_env) and conda_env != "base" # named conda env
6864
-
6865
-
6866
6877
  def _resolve_connect_command(*, abspath: bool, portable: bool, scope: str) -> str:
6867
- """The command string to write into the harness's config, scope-aware.
6868
-
6869
- Default optimizes for the config's shareability: ``user`` scope (``-g``,
6870
- a machine-local config that is never committed) writes the absolute path
6871
- so the harness always finds it; ``project`` scope (git-committed, shared)
6872
- stays bare ``toolbase`` for portability across machines. ``--abspath``
6873
- forces the absolute path in any scope; ``--portable`` forces bare. On a
6874
- project-scope bare write from an isolated env, warn that the harness may
6875
- not resolve a bare command."""
6878
+ """The command string to write into the harness's config.
6879
+
6880
+ The absolute path is the default: a bare ``toolbase`` depends on the PATH
6881
+ inherited by the harness, which can differ from the shell that ran
6882
+ ``connect``. ``--portable`` is the explicit choice for a committed config
6883
+ that each teammate's PATH should resolve; ``--abspath`` remains an
6884
+ explicit spelling of the default. Scope does not affect this choice.
6885
+ """
6876
6886
  if abspath and portable:
6877
6887
  raise click.UsageError("--abspath and --portable are mutually exclusive.")
6878
- use_abspath = abspath or (not portable and scope == "user")
6879
- if use_abspath:
6880
- return _toolbase_abspath()
6881
- if scope != "user" and _toolbase_is_env_installed():
6882
- console.print(
6883
- "[yellow]Note:[/yellow] wrote a bare [cyan]toolbase[/cyan] (portable). "
6884
- "The harness resolves it against its own PATH, and toolbase lives in "
6885
- "an isolated env — so a harness launched outside that env (a desktop "
6886
- "app, or a terminal without the env active) won't find it and the MCP "
6887
- "server will show as failed. Fixes: reconnect with [cyan]--abspath[/cyan] "
6888
- "(machine-specific path), use [cyan]-g[/cyan] (user scope uses the "
6889
- "absolute path by default), or put toolbase on your login PATH "
6890
- "(e.g. [cyan]pipx install toolbase[/cyan]) to keep it bare and portable."
6891
- )
6892
- return "toolbase"
6888
+ if portable:
6889
+ return "toolbase"
6890
+ return _toolbase_abspath()
6893
6891
 
6894
6892
 
6895
6893
  def _activated_toolkit_dirs() -> "dict[str, Path]":
@@ -7005,17 +7003,18 @@ def _unsurface_skills_for_connect(adapter) -> None:
7005
7003
  help='Print the intended write without changing anything.')
7006
7004
  @click.option('--abspath', 'abspath', is_flag=True, default=False,
7007
7005
  help='Force the absolute toolbase binary path (PATH-independent). '
7008
- 'Default for user scope (-g); project scope stays bare.')
7006
+ 'This is the default.')
7009
7007
  @click.option('--portable', 'portable', is_flag=True, default=False,
7010
- help='Force the bare `toolbase` command (portable across machines) '
7011
- 'even for user scope.')
7008
+ help='Force the bare `toolbase` command, resolved via the '
7009
+ "harness's PATH — use for a committed config shared "
7010
+ 'across machines.')
7012
7011
  @click.option('--list', 'do_list', is_flag=True, default=False,
7013
7012
  help='Show where toolbase is wired across harnesses, then exit.')
7014
7013
  @click.option('--harnesses', 'do_harnesses', is_flag=True, default=False,
7015
7014
  help='List supported harnesses and detection status, then exit.')
7016
7015
  @click.option('--out', 'out_path', default=None, metavar='PATH',
7017
7016
  help='(orchestral) Path for the generated agent script '
7018
- '(default: .toolbase/orchestral.py).')
7017
+ '(default: .toolbase/agent.py).')
7019
7018
  @click.option('--force', 'force', is_flag=True, default=False,
7020
7019
  help='(orchestral) Overwrite an existing generated script.')
7021
7020
  @click.option('--no-skills', 'no_skills', is_flag=True, default=False,
@@ -7036,8 +7035,8 @@ def connect(harness, global_scope, local_scope, profile_name, remove, dry_run,
7036
7035
  tb connect claude-code -g # user: ~/.claude.json (every session)
7037
7036
  tb connect claude-code --profile paper
7038
7037
  tb connect claude-code --remove
7039
- tb connect orchestral # write .toolbase/orchestral.py
7040
- tb connect orchestral --profile paper --out agent.py
7038
+ tb connect orchestral # write .toolbase/agent.py
7039
+ tb connect orchestral --profile paper --out my_agent.py
7041
7040
  tb connect --list # where is toolbase wired?
7042
7041
  tb connect --harnesses # which harnesses are supported?
7043
7042
  """
@@ -7218,32 +7217,75 @@ def _connect_print_status(adapters, project_root) -> None:
7218
7217
  )
7219
7218
 
7220
7219
 
7221
- def _orchestral_script_path(out=None):
7220
+ def _orchestral_script_path(out=None, *, accept_legacy=False):
7222
7221
  """Resolve the orchestral launcher path: ``--out`` if given, else
7223
- ``<project-root>/.toolbase/orchestral.py`` (project discovered by walking
7224
- up from the cwd; falls back to the cwd when not in a project)."""
7222
+ ``<project-root>/.toolbase/agent.py`` (project discovered by walking
7223
+ up from the cwd; falls back to the cwd when not in a project).
7224
+
7225
+ ``accept_legacy`` is for the read side (``tb orchestral``, ``--remove``):
7226
+ when the current default doesn't exist but an older
7227
+ ``.toolbase/orchestral.py`` does, return that instead so an existing
7228
+ checkout keeps working. The write side never uses it -- new scaffolds
7229
+ always take the current name (the legacy one shadows the ``orchestral``
7230
+ package; see ``connect/orchestral.py``).
7231
+ """
7225
7232
  from pathlib import Path as _Path
7226
- from .connect.orchestral import DEFAULT_SCRIPT_NAME
7233
+ from .connect.orchestral import DEFAULT_SCRIPT_NAME, LEGACY_SCRIPT_NAME
7227
7234
  from .envs import find_project_root
7228
7235
 
7229
7236
  if out:
7230
7237
  return _Path(out)
7231
7238
  root = find_project_root() or _Path.cwd()
7232
- return root / ".toolbase" / DEFAULT_SCRIPT_NAME
7239
+ path = root / ".toolbase" / DEFAULT_SCRIPT_NAME
7240
+ if accept_legacy and not path.exists():
7241
+ legacy = root / ".toolbase" / LEGACY_SCRIPT_NAME
7242
+ if legacy.exists():
7243
+ return legacy
7244
+ return path
7245
+
7246
+
7247
+ def _warn_if_profile_selects_nothing(profile_name) -> None:
7248
+ """Warn at connect time if the profile the scaffold will serve is empty.
7249
+
7250
+ Without this the user only finds out at launch, as a bare
7251
+ ``RuntimeError: no toolkits could be started`` from deep inside the
7252
+ orchestrator. Best-effort: an unresolvable profile is not a reason to
7253
+ refuse to write the scaffold, so any failure here is silent.
7254
+ """
7255
+ from pathlib import Path as _Path
7256
+ from .envs import find_project_root
7257
+ from .serve.profiles import resolve_profile
7258
+
7259
+ try:
7260
+ root = find_project_root() or _Path.cwd()
7261
+ profile = resolve_profile(root, cli_profile=profile_name)
7262
+ except Exception:
7263
+ return
7264
+ if profile.toolkits:
7265
+ return
7266
+ console.print(
7267
+ f"[yellow]Note: profile '{profile.name}' currently serves no "
7268
+ "toolkits[/yellow] — the agent would start with zero tools."
7269
+ )
7270
+ console.print(
7271
+ " [dim]Activate one with[/dim] [cyan]tb activate <toolkit>[/cyan]"
7272
+ "[dim], then check with[/dim] [cyan]tb serve --dry-run[/cyan][dim].[/dim]"
7273
+ )
7233
7274
 
7234
7275
 
7235
7276
  def _connect_orchestral(*, profile_name, out, force, dry_run, remove) -> None:
7236
7277
  """Handle `tb connect orchestral`: write (or remove) a runnable agent
7237
- script at ``<project>/.toolbase/orchestral.py``. Orchestral is a library
7278
+ script at ``<project>/.toolbase/agent.py``. Orchestral is a library
7238
7279
  harness, not a config-file one, so "connecting" means scaffolding the code
7239
7280
  that hands toolbase's tools to an orchestral Agent -- the user owns the
7240
7281
  agent (LLM, prompt, launch modality). Launch it with `tb orchestral`.
7241
7282
  """
7242
7283
  from .connect.orchestral import (
7243
7284
  agent_script, is_orchestral_available, GENERATED_MARKER,
7285
+ LEGACY_SCRIPT_NAME,
7244
7286
  )
7245
7287
 
7246
- path = _orchestral_script_path(out)
7288
+ path = _orchestral_script_path(out, accept_legacy=remove)
7247
7289
 
7248
7290
  if remove:
7249
7291
  if not path.exists():
@@ -7280,11 +7322,37 @@ def _connect_orchestral(*, profile_name, out, force, dry_run, remove) -> None:
7280
7322
  path.parent.mkdir(parents=True, exist_ok=True)
7281
7323
  path.write_text(content, encoding="utf-8")
7282
7324
  console.print(f"[green]✓[/green] Wrote orchestral agent scaffold to {path}.")
7325
+
7326
+ # A scaffold from 0.8.1 or earlier next to the new one is not just
7327
+ # clutter: it is named `orchestral.py`, sits in the same directory, and
7328
+ # that directory heads `sys.path` at launch -- so it shadows the
7329
+ # `orchestral` package the new script imports. Retire it (marker-checked,
7330
+ # same rule as --remove).
7331
+ legacy = path.parent / LEGACY_SCRIPT_NAME
7332
+ if legacy.exists() and legacy != path:
7333
+ try:
7334
+ first = legacy.read_text(encoding="utf-8").split("\n", 1)[0]
7335
+ except OSError:
7336
+ first = ""
7337
+ if first.startswith(GENERATED_MARKER):
7338
+ legacy.unlink()
7339
+ console.print(
7340
+ f" [dim]Removed the superseded {legacy.name} (it shadowed "
7341
+ "the orchestral package).[/dim]"
7342
+ )
7343
+ else:
7344
+ console.print(
7345
+ f"[yellow]Warning: {legacy} is not toolbase-generated, so it "
7346
+ "was left alone — but it shadows the orchestral package and "
7347
+ "will break this script. Rename it.[/yellow]"
7348
+ )
7349
+
7283
7350
  if not is_orchestral_available():
7284
7351
  console.print(
7285
7352
  "[yellow]Note: the orchestral package isn't importable here; "
7286
7353
  "the script needs it (and an LLM API key) at runtime.[/yellow]"
7287
7354
  )
7355
+ _warn_if_profile_selects_nothing(profile_name)
7288
7356
  console.print(
7289
7357
  "[dim]Configure orchestral (LLM + API key), then launch with "
7290
7358
  "[cyan]tb orchestral[/cyan].[/dim]"
@@ -7356,28 +7424,44 @@ def disconnect(harness, global_scope, local_scope, all_scopes):
7356
7424
 
7357
7425
  @main.command()
7358
7426
  @click.option('--script', 'script', default=None, metavar='PATH',
7359
- help='Path to the agent script (default: .toolbase/orchestral.py).')
7427
+ help='Path to the agent script (default: .toolbase/agent.py).')
7360
7428
  def orchestral(script):
7361
7429
  """Launch your orchestral agent script (the one `tb connect orchestral`
7362
- wrote). This just runs `python .toolbase/orchestral.py` -- the script owns
7430
+ wrote). This just runs `python .toolbase/agent.py` -- the script owns
7363
7431
  the agent (LLM, prompt, launch modality); toolbase only runs it.
7364
7432
 
7365
7433
  \b
7366
7434
  Examples:
7367
- tb connect orchestral # scaffold .toolbase/orchestral.py
7435
+ tb connect orchestral # scaffold .toolbase/agent.py
7368
7436
  tb orchestral # run it
7369
7437
  """
7370
7438
  import subprocess
7371
7439
  from pathlib import Path as _Path
7372
7440
  from .envs import find_project_root
7373
7441
 
7374
- path = _orchestral_script_path(script)
7442
+ from .connect.orchestral import LEGACY_SCRIPT_NAME
7443
+
7444
+ path = _orchestral_script_path(script, accept_legacy=True)
7375
7445
  if not path.exists():
7376
7446
  console.print(
7377
7447
  f"[red]No agent script at {path}.[/red] Create one with "
7378
7448
  "[cyan]tb connect orchestral[/cyan] first."
7379
7449
  )
7380
7450
  sys.exit(1)
7451
+ if path.name == LEGACY_SCRIPT_NAME:
7452
+ # Older scaffold: its own directory heads sys.path at launch, so the
7453
+ # file shadows the `orchestral` package it imports and the run dies
7454
+ # on `from orchestral import Agent`. Say so before it happens.
7455
+ console.print(
7456
+ f"[yellow]{path} is an older scaffold whose filename shadows the "
7457
+ "orchestral package; it cannot import it.[/yellow]"
7458
+ )
7459
+ console.print(
7460
+ " [dim]Re-scaffold with[/dim] [cyan]tb connect orchestral "
7461
+ "--force[/cyan][dim] (your old file is removed) or copy your "
7462
+ "edits into .toolbase/agent.py.[/dim]"
7463
+ )
7464
+ sys.exit(1)
7381
7465
  # Run with the interpreter toolbase runs under (toolbase + orchestral live
7382
7466
  # there), cwd = the project root so the script resolves the active profile
7383
7467
  # and orchestral persists its conversation under the project.
@@ -7587,4 +7671,4 @@ def create_tarball(source_dir: Path, output_path: Path, toolkit_name: str):
7587
7671
 
7588
7672
 
7589
7673
  if __name__ == '__main__':
7590
- main()
7674
+ main()
@@ -43,8 +43,16 @@ from ..serve.orchestrator import DEFAULT_CALL_TIMEOUT_S, Orchestrator
43
43
  # The scaffold ``tb connect orchestral`` writes, relative to a project root.
44
44
  # It lives under ``.toolbase/`` (alongside manifest.yaml / serve.yaml) and is
45
45
  # launched by ``tb orchestral``.
46
- DEFAULT_SCRIPT_NAME = "orchestral.py"
47
- DEFAULT_SCRIPT_RELPATH = ".toolbase/orchestral.py"
46
+ #
47
+ # NOT named ``orchestral.py``: Python puts a script's own directory at the
48
+ # head of ``sys.path``, so a file by that name shadows the ``orchestral``
49
+ # package it imports and every launch dies with "cannot import name 'Agent'
50
+ # from partially initialized module 'orchestral'". That was the 0.8.1 and
51
+ # earlier default; ``LEGACY_SCRIPT_NAME`` exists so the runner and
52
+ # ``--remove`` still find those files.
53
+ DEFAULT_SCRIPT_NAME = "agent.py"
54
+ DEFAULT_SCRIPT_RELPATH = ".toolbase/agent.py"
55
+ LEGACY_SCRIPT_NAME = "orchestral.py"
48
56
 
49
57
  # First line of every generated scaffold. ``tb connect orchestral --remove``
50
58
  # only deletes a file carrying this marker, so it never removes a script the
@@ -183,10 +191,23 @@ def agent_script(profile: Optional[str] = None) -> str:
183
191
  launch modalities -- terminal UI, headless, web GUI -- with the terminal
184
192
  UI active and the other two commented out. The user edits to switch.
185
193
 
194
+ Two things the scaffold does deliberately, because getting them wrong is
195
+ the difference between a working agent and a confusing one:
196
+
197
+ - **One sandbox.** A single ``SANDBOX`` dir is passed to
198
+ ``toolbase_tools(config_overrides=...)`` *and* to orchestral's own file
199
+ tools, so every tool resolves relative paths against the same root.
200
+ Without it, toolbase-served tools write wherever
201
+ ``~/.toolbase/config/<toolkit>.yaml`` points and the agent cannot read
202
+ back its own output.
203
+ - **File tools.** Served toolkits are domain tools; on their own the agent
204
+ has no way to open the files they produce. The scaffold pairs them with
205
+ orchestral's read/write/edit/search/run tools, all scoped to SANDBOX.
206
+
186
207
  Configuring orchestral (the LLM, API keys) is the user's job; the scaffold
187
208
  just shows where their LLM plugs in.
188
209
  """
189
- profile_arg = f'profile="{profile}"' if profile else ""
210
+ profile_arg = f'profile="{profile}", ' if profile else ""
190
211
  profile_note = (
191
212
  f'serving the "{profile}" profile'
192
213
  if profile
@@ -201,16 +222,57 @@ def agent_script(profile: Optional[str] = None) -> str:
201
222
  # Run it: tb orchestral (or: python {DEFAULT_SCRIPT_RELPATH})
202
223
  """Launch an orchestral agent wired with your toolbase tools."""
203
224
 
204
- from toolbase.connect.orchestral import toolbase_tools
225
+ import os
226
+ import sys
227
+ from pathlib import Path
228
+
229
+ # Python puts this script's own directory at the head of `sys.path`, so a
230
+ # sibling module named after a package we import (`orchestral.py`, say) would
231
+ # shadow the real package. Demote our directory to the end: site-packages wins,
232
+ # but local imports still resolve. Drop these lines if you move this script
233
+ # somewhere its directory must take import priority.
234
+ _here = os.path.dirname(os.path.abspath(__file__))
235
+ if sys.path and os.path.abspath(sys.path[0] or ".") == _here:
236
+ sys.path.append(sys.path.pop(0))
237
+
205
238
  from orchestral import Agent
206
239
  from orchestral.llm import Claude # swap for GPT, Gemini, ... as you like
240
+ from orchestral.tools import (
241
+ EditFileTool, FileSearchTool, FindFilesTool, ReadFileTool,
242
+ RunCommandTool, RunPythonTool, WriteFileTool,
243
+ )
244
+
245
+ from toolbase.connect.orchestral import toolbase_tools
246
+
247
+ # The one directory every tool works in -- both the toolbase-served toolkits
248
+ # and the orchestral file tools below. Keeping them on the same root is what
249
+ # lets the agent read back the files its own tools write. Point it anywhere.
250
+ SANDBOX = Path(__file__).resolve().parent.parent / "sandbox"
207
251
 
208
252
 
209
253
  def main():
254
+ SANDBOX.mkdir(parents=True, exist_ok=True)
255
+
210
256
  # `toolbase_tools` spins up one subprocess per served toolkit ({profile_note})
211
257
  # and yields the tools as orchestral BaseTool instances. They are torn
212
- # down when the `with` block exits.
213
- with toolbase_tools({profile_arg}) as tools:
258
+ # down when the `with` block exits. `config_overrides` scopes every served
259
+ # toolkit to SANDBOX, overriding the `base_directory` in
260
+ # ~/.toolbase/config/<toolkit>.yaml for this run only.
261
+ with toolbase_tools(
262
+ {profile_arg}config_overrides={{"base_directory": str(SANDBOX)}},
263
+ ) as served:
264
+ tools = [
265
+ # General-purpose tools, scoped to the same sandbox.
266
+ ReadFileTool(base_directory=str(SANDBOX), show_line_numbers=True),
267
+ WriteFileTool(base_directory=str(SANDBOX)),
268
+ EditFileTool(base_directory=str(SANDBOX)),
269
+ FindFilesTool(base_directory=str(SANDBOX)),
270
+ FileSearchTool(base_directory=str(SANDBOX)),
271
+ RunCommandTool(base_directory=str(SANDBOX)),
272
+ RunPythonTool(base_directory=str(SANDBOX)),
273
+ # Your toolbase toolkits.
274
+ *served,
275
+ ]
214
276
  agent = Agent(llm=Claude(), tools=tools)
215
277
 
216
278
  # -- Pick a launch modality: one is active, the others are commented. --
@@ -238,5 +300,6 @@ __all__ = [
238
300
  "is_orchestral_available",
239
301
  "DEFAULT_SCRIPT_NAME",
240
302
  "DEFAULT_SCRIPT_RELPATH",
303
+ "LEGACY_SCRIPT_NAME",
241
304
  "GENERATED_MARKER",
242
305
  ]
@@ -50,7 +50,7 @@ from typing import Any, Dict, List, Optional, Tuple
50
50
 
51
51
  from rich.console import Console
52
52
 
53
- from ..config import LOGS_DIR, TOOLKITS_DIR
53
+ from ..config import CONFIG_DIR, LOGS_DIR, TOOLKITS_DIR
54
54
  from ..envs.cache import LEGACY_META_FILE
55
55
  from ..logging.logger import ToolLogger, get_logger
56
56
 
@@ -326,6 +326,7 @@ def _legacy_discover_toolkits(toolkits_dir: Path) -> List[ToolkitDiscovery]:
326
326
 
327
327
  def _resolve_state_config(
328
328
  disc: ToolkitDiscovery,
329
+ overrides: Optional[Dict[str, Any]] = None,
329
330
  ) -> Tuple[Optional[Dict[str, Any]], Optional[str]]:
330
331
  """Validate the toolkit's stored config against its declared schema.
331
332
 
@@ -339,6 +340,13 @@ def _resolve_state_config(
339
340
  user hasn't filled in, or stored values fail validation. The
340
341
  orchestrator skips this toolkit with ``reason`` in the banner.
341
342
 
343
+ ``overrides`` is the embedder's ``config_overrides`` (see
344
+ ``Orchestrator.__init__``). A field the embedder supplies counts as
345
+ filled in: it satisfies a required field and clears a stored-but-
346
+ invalid one, because the override is what the host will actually
347
+ receive. Without this a caller could pass the exact value a toolkit
348
+ demands and still watch it get skipped for lacking that value.
349
+
342
350
  Imports the setup module lazily so a malformed ``config:`` block
343
351
  in some other toolkit can't take down the whole orchestrator
344
352
  startup. Per-toolkit failures stay per-toolkit.
@@ -388,6 +396,17 @@ def _resolve_state_config(
388
396
  resolution = load_state_config(
389
397
  disc.name, schema, project_root=project_root,
390
398
  )
399
+ if overrides:
400
+ # Anything the embedder supplies is going to reach the host, so
401
+ # it can't also be "missing" or "invalid". Drop those complaints
402
+ # before the go/no-go check.
403
+ supplied = set(overrides)
404
+ resolution.missing_required = [
405
+ n for n in resolution.missing_required if n not in supplied
406
+ ]
407
+ resolution.invalid = [
408
+ (n, e) for (n, e) in resolution.invalid if n not in supplied
409
+ ]
391
410
  if not resolution.ok:
392
411
  return None, "config incomplete — " + (resolution.skip_reason() or "unknown")
393
412
  state_config = dict(resolution.state_config)
@@ -584,6 +603,7 @@ def _tool_yaml_name_to_mcp_name(class_name: str) -> str:
584
603
 
585
604
  def _resolve_bundle_availability(
586
605
  disc: "ToolkitDiscovery",
606
+ overrides: Optional[Dict[str, Any]] = None,
587
607
  ) -> Tuple[Any, Dict[str, List[str]]]:
588
608
  """Evaluate this toolkit's ``bundles:`` against its resolved config.
589
609
 
@@ -599,6 +619,12 @@ def _resolve_bundle_availability(
599
619
  VALUE>`` sentinel counts as unset, matching the existing
600
620
  state-config gate semantics one level up.
601
621
 
622
+ ``overrides`` (the embedder's ``config_overrides``) is merged last,
623
+ for the same reason the state-config gate honors it: a bundle whose
624
+ ``requires:`` key the embedder supplies in-process is satisfied, so
625
+ gating it on the stored file alone would hide tools the caller just
626
+ configured.
627
+
602
628
  On any read failure (no toolkit.yaml, malformed file, etc.),
603
629
  returns an empty availability that gates nothing — pass-through
604
630
  behavior so a broken yaml doesn't take down all toolkits.
@@ -632,6 +658,9 @@ def _resolve_bundle_availability(
632
658
  # startup over a config-resolution glitch.
633
659
  resolved_config = {}
634
660
 
661
+ if overrides:
662
+ resolved_config = {**resolved_config, **overrides}
663
+
635
664
  availability = evaluate_bundles(bundles_block, resolved_config)
636
665
  return availability, name_to_bundles
637
666
 
@@ -738,6 +767,73 @@ def _strip_caller_env_activation(env: Dict[str, str]) -> Dict[str, str]:
738
767
  return env
739
768
 
740
769
 
770
+ def _toolbase_package_dir() -> Path:
771
+ """Absolute path of the running ``toolbase`` package directory."""
772
+ import toolbase as _tb
773
+ _tb_file = getattr(_tb, "__file__", None)
774
+ if _tb_file:
775
+ return Path(_tb_file).resolve().parent
776
+ # Namespace-package / some editable layouts leave ``__file__`` None;
777
+ # ``__path__`` still points at the package dir.
778
+ return Path(next(iter(_tb.__path__))).resolve()
779
+
780
+
781
+ def _staged_toolbase_path() -> Optional[Path]:
782
+ """Return a directory whose ONLY importable entry is ``toolbase``.
783
+
784
+ This is what the per-toolkit host gets on ``PYTHONPATH``, and the
785
+ "only" is the entire point. ``PYTHONPATH`` entries land ahead of the
786
+ toolkit venv's ``site-packages``, so handing over the directory that
787
+ merely *contains* toolbase means the whole serving environment
788
+ shadows the toolkit's own: under a normal (non-editable) install
789
+ that directory is ``site-packages``, and ``mcp``, ``numpy``,
790
+ ``pydantic`` and ``orchestral`` all resolve to the orchestrator's
791
+ copies instead of the venv's. The per-toolkit venv then supplies only
792
+ what the serving env happens to lack and never wins a conflict --
793
+ which defeats the isolation the subprocess design exists to provide,
794
+ and makes a toolkit's behavior depend on whichever machine serves it.
795
+
796
+ A directory holding a single ``toolbase`` symlink gives the host what
797
+ it needs and nothing more. That is affordable because the host's
798
+ dependency footprint on the toolbase side is pure-Python and tiny:
799
+ ``_toolkit_host`` imports the stdlib, ``orchestral``, and
800
+ ``toolbase.naming`` (via ``toolbase/__init__``) -- no third-party
801
+ package. ``orchestral`` and ``mcp`` come from the venv, where
802
+ ``tb install`` puts them on purpose.
803
+
804
+ Staged under ``~/.toolbase/hostpath/<hash of the package path>`` so
805
+ two toolbase installs (an editable checkout and a released one, say)
806
+ never collide. The symlink is revalidated on every call and replaced
807
+ atomically, so an upgraded or moved install self-heals.
808
+
809
+ Returns ``None`` if the staging directory can't be created (a
810
+ filesystem without symlinks, a read-only home); the caller then falls
811
+ back to the historical leaky-but-working behavior rather than failing
812
+ to serve.
813
+ """
814
+ import hashlib
815
+
816
+ pkg_dir = _toolbase_package_dir()
817
+ key = hashlib.sha256(str(pkg_dir).encode("utf-8")).hexdigest()[:12]
818
+ stage = CONFIG_DIR / "hostpath" / key
819
+ link = stage / "toolbase"
820
+ try:
821
+ # Fast path: already staged and still pointing where we think.
822
+ if link.is_symlink() and Path(os.readlink(link)) == pkg_dir:
823
+ return stage
824
+ stage.mkdir(parents=True, exist_ok=True)
825
+ # Build beside the target and rename over it, so a concurrent serve
826
+ # either sees the old link or the new one -- never a missing one.
827
+ tmp = stage / f".toolbase.{os.getpid()}"
828
+ if tmp.is_symlink() or tmp.exists():
829
+ tmp.unlink()
830
+ tmp.symlink_to(pkg_dir, target_is_directory=True)
831
+ os.replace(tmp, link)
832
+ return stage
833
+ except (OSError, NotImplementedError):
834
+ return None
835
+
836
+
741
837
  def _build_host_env(toolkit_path: Path, toolkit_name: str,
742
838
  *, venv_bin: Optional[str] = None) -> Dict[str, str]:
743
839
  """Compose the subprocess environment for the per-toolkit host.
@@ -748,8 +844,10 @@ def _build_host_env(toolkit_path: Path, toolkit_name: str,
748
844
 
749
845
  The toolkit's interpreter doesn't have ``toolbase`` installed, only
750
846
  ``orchestral-ai`` and ``mcp``. We need ``toolbase._toolkit_host`` to
751
- be importable, so we point ``PYTHONPATH`` at the parent package
752
- location of the running orchestrator.
847
+ be importable, so ``PYTHONPATH`` carries a staged directory holding
848
+ nothing but a ``toolbase`` symlink -- see ``_staged_toolbase_path``
849
+ for why exposing the package's real parent directory instead leaks
850
+ the entire serving environment into the toolkit's venv.
753
851
 
754
852
  The caller's activated-conda/venv pollution is first stripped (see
755
853
  ``_strip_caller_env_activation``) so the toolkit's isolated env is
@@ -764,16 +862,11 @@ def _build_host_env(toolkit_path: Path, toolkit_name: str,
764
862
  plumbing.
765
863
  """
766
864
  env = _strip_caller_env_activation(os.environ.copy())
767
- # Find the directory that contains the ``toolbase`` package.
768
- import toolbase as _tb
769
- _tb_file = getattr(_tb, "__file__", None)
770
- if _tb_file:
771
- pkg_parent = str(Path(_tb_file).resolve().parent.parent)
772
- else:
773
- # Namespace-package / some editable layouts leave ``__file__`` None;
774
- # ``__path__`` still points at the package dir, so its parent is the
775
- # directory that contains the ``toolbase`` package.
776
- pkg_parent = str(Path(next(iter(_tb.__path__))).resolve().parent)
865
+ staged = _staged_toolbase_path()
866
+ # Fall back to the package's real parent when staging is unavailable.
867
+ # That re-leaks the serving env, but a leaky serve beats no serve.
868
+ pkg_parent = str(staged if staged is not None
869
+ else _toolbase_package_dir().parent)
777
870
  existing = env.get("PYTHONPATH", "")
778
871
  env["PYTHONPATH"] = (
779
872
  pkg_parent + (os.pathsep + existing if existing else "")
@@ -1235,7 +1328,9 @@ class Orchestrator:
1235
1328
  """
1236
1329
  # Resolve declarative state-config first. A missing-required-
1237
1330
  # field condition means we never spawn.
1238
- state_config, config_err = _resolve_state_config(disc)
1331
+ state_config, config_err = _resolve_state_config(
1332
+ disc, self._config_overrides,
1333
+ )
1239
1334
  if config_err is not None:
1240
1335
  self.console.print(
1241
1336
  f" [red]✗[/red] [dim]{disc.name:<18}[/dim] "
@@ -1314,7 +1409,9 @@ class Orchestrator:
1314
1409
  message=note, level="warn",
1315
1410
  )
1316
1411
 
1317
- availability, name_to_bundles = _resolve_bundle_availability(disc)
1412
+ availability, name_to_bundles = _resolve_bundle_availability(
1413
+ disc, self._config_overrides,
1414
+ )
1318
1415
  if availability.dropped_bundles:
1319
1416
  for bname, missing in availability.dropped_bundles.items():
1320
1417
  line = format_skip_log_line(disc.name, bname, missing)
@@ -1609,7 +1706,9 @@ class Orchestrator:
1609
1706
  # config file between sessions (the file is canonical; we always
1610
1707
  # read fresh). Same shape as initial launch: a config error here
1611
1708
  # marks the toolkit failed for this restart attempt.
1612
- state_config, config_err = _resolve_state_config(rt.discovery)
1709
+ state_config, config_err = _resolve_state_config(
1710
+ rt.discovery, self._config_overrides,
1711
+ )
1613
1712
  if config_err is not None:
1614
1713
  rt.restart_attempts = attempt
1615
1714
  rt.last_error = config_err
@@ -804,8 +804,10 @@ def validate_toolkit(toolkit_path: Path) -> ValidationResult:
804
804
  ):
805
805
  result.is_valid = False
806
806
  result.errors.append(
807
- "requirements.txt must include 'orchestral-ai>=1.0.0' "
808
- "(required for Orchestral tool framework)"
807
+ "requirements.txt must include 'orchestral-ai>=1.10.0' "
808
+ "(required for Orchestral tool framework; 1.10 is the "
809
+ "first release built on MCP SDK 2.x, which is what the "
810
+ "toolkit host speaks)"
809
811
  )
810
812
 
811
813
  except Exception as e:
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