Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
fdad961
feat(registry): add ToolCategory::from_category_str (#230)
emesal Mar 18, 2026
22a773b
feat(synthesised): expand define-tool syntax-rules for category/summa…
emesal Mar 18, 2026
08e3b08
feat(synthesised): extract_multi_tools reads category and summary_par…
emesal Mar 18, 2026
b6f1ce9
feat(synthesised): extract_single_tool reads category and summary_par…
emesal Mar 18, 2026
99b1dad
fmt
emesal Mar 18, 2026
dd3c453
docs(hooks): update PreFetchUrl metadata for no_url variant (#230)
emesal Mar 18, 2026
aed6869
feat(send): network category no-URL fallback uses summary_params (#230)
emesal Mar 18, 2026
06c829a
refactor(synthesised): load_tools_from_source takes &ToolsConfig (#230)
emesal Mar 18, 2026
82e53b6
fmt
emesal Mar 18, 2026
83fd7eb
feat(config): add HttpConfig, HttpAllow types and ToolsConfig fields …
emesal Mar 18, 2026
2e2c91b
feat(config): resolve_http_allow with longest-prefix match (#230)
emesal Mar 18, 2026
664167b
feat(synthesised): thread http_prefixes through build_tein_context (#…
emesal Mar 18, 2026
4291b2d
feat(config): resolve_env with longest-prefix match (#230)
emesal Mar 18, 2026
915c069
feat(synthesised): thread env_vars through build_tein_context (#230)
emesal Mar 18, 2026
11ded5a
feat(config): resolve_http_allow_with_declared for trust delegation (…
emesal Mar 18, 2026
6c99f8e
feat(synthesised): two-phase load for trust-declared HTTP prefixes (#…
emesal Mar 18, 2026
4b9cee7
docs: update AGENTS.md with sandbox extension quirks (#230)
emesal Mar 18, 2026
0dbbbcf
fmt
emesal Mar 18, 2026
a696a82
docs+test: address code review findings (#230)
emesal Mar 18, 2026
41f763c
fmt
emesal Mar 18, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@ LLM communication is delegated to ratatoskr; `gateway.rs` bridges chibi's types
- Synthesised tools: `(harness tools)` module provides `call-tool` and `define-tool`. `(harness hooks)` module provides `register-hook`. `HARNESS_PREAMBLE` defines `%tool-registry%`, `%hook-registry%`, `define-tool`, and `register-hook` at top level (not inside the library) so `set!` can mutate them and rust can read them post-eval.
- `ToolImpl::Synthesised` has `exec_binding` field: `"tool-execute"` for convention format, `"%tool-execute-{name}%"` for `define-tool` multi-tool files.
- `reload_tool_from_content` and `scan_and_register` require `&ToolsConfig` for tier resolution. Pass `&ToolsConfig::default()` when no tier overrides needed.
- `load_tools_from_source` takes `&ToolsConfig` (not a tier param). Tests use `&ToolsConfig::default()` for sandboxed, or `config_with_tier(path, 2)` for unsandboxed. `load_tool_from_source` (singular) still takes no config param — uses default internally.
- `ToolCategory::from_category_str` maps category strings from scheme tools to variants. Unknown strings → `Synthesised`.
- `HttpAllowResult::NeedDeclared` triggers two-phase context build: phase 1 evaluates source without HTTP to read `tool-http-allow`, phase 2 rebuilds with trusted prefixes.
- `PreFetchUrl` hook fires with `safety: "no_url"` and `summary` field (no `url`/`reason`) for network-category tools without a URL parameter.
- `call-tool` bridge uses one global mutex: `BRIDGE_CALL_CTX` (set/cleared per execute via `CallContextGuard`). Registry is embedded in `ToolImpl::Synthesised` and passed through `execute_synthesised` — no longer a separate global. Reason: tein runs scheme on a dedicated worker thread; thread-locals set on the caller thread would be invisible there.
- `ToolImpl::Synthesised` carries `registry: Arc<RwLock<ToolRegistry>>` so `call-tool` can dispatch to any registered tool from the tein worker thread without thread-local state.
- Harness also exposes `%context-name%` (mutable binding, injected per call), `(generate-id)` (8 hex chars, uuid v4), and `(current-timestamp)` (`YYYYMMDD-HHMMz` UTC).
Expand Down
116 changes: 79 additions & 37 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion crates/chibi-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ hostname = "0.4"
ignore = "0.4"
indexmap = { version = "2", features = ["serde"] }
ratatoskr.workspace = true
tein = { git = "https://github.com/emesal/tein", branch = "main", features = ["json", "regex"], optional = true }
tein = { git = "https://github.com/emesal/tein", branch = "main", features = ["json", "regex", "http"], optional = true }
tein-sexp = { git = "https://github.com/emesal/tein", branch = "main" }
url = "2"
rusqlite = { version = "0.32", features = ["bundled"] }
Expand Down
Loading
Loading