Compare commits

..

1 Commits

Author SHA1 Message Date
will.anderson 53fb75353f fix(chat): remove duplicate web_search tool in agentic_tools_all
Neuron Soul CI / build (pull_request) Failing after 5m24s
agentic_tools_literal() already contains a custom web_search tool.
agentic_tools_with_web() adds the Anthropic server-side web_search_20250305
tool (also named web_search). Combining them caused Anthropic to reject
every agentic request with 'Tool names must be unique.'

agentic_tools_all() now calls agentic_tools_literal() directly. Connector
tools splice in as before. The web_search-only variant (agentic_tools_with_web)
is unchanged for callers that specifically want native search without connectors.
2026-06-17 14:11:50 -05:00
2 changed files with 6 additions and 24 deletions
+6 -3
View File
@@ -317,10 +317,13 @@ fn connector_tools_json() -> String {
return arr
}
// Built-in tools + native web_search + every connector tool, as one tools array.
// Splices connector tools in before the closing bracket of the base array.
// Built-in tools + every connector tool, as one tools array.
// Uses agentic_tools_literal (not agentic_tools_with_web) to avoid a duplicate
// "web_search" name the literal already includes a custom web_search handler,
// and adding the Anthropic server-side web_search_20250305 (same name) causes
// Anthropic to reject with "Tool names must be unique."
fn agentic_tools_all() -> String {
let base: String = agentic_tools_with_web()
let base: String = agentic_tools_literal()
let conn: String = connector_tools_json()
let conn_inner: String = str_slice(conn, 1, str_len(conn) - 1)
if str_eq(conn_inner, "") {
-21
View File
@@ -95,24 +95,6 @@ fn init_soul_edges() -> Void {
engram_connect(val_hope, val_trust, el_from_float(0.7), "co-value")
}
// ensure_self_canonical_bridge link the public self anchor (the graph API's
// traversal_root, kn-efeb4a5b, which carries only incidental tag edges) to the
// curated self node (015644f5, where the real identity / value / co-value edges
// live). Without this, public self-traversal (name=self / neuron) reaches tags
// instead of the curated identity. Idempotent: connects only if the edge is
// missing, so it is safe to run every boot including on an already-populated
// graph where init_soul_edges() is skipped by the <100-edge gate.
fn ensure_self_canonical_bridge() -> Void {
let pub_self: String = "kn-efeb4a5b-5aff-4759-8a97-7233099be6ee"
let curated_self: String = "015644f5-8194-4af0-800d-dd4a0cd71396"
let nbrs: String = engram_neighbors_json(pub_self, 1, "out")
if !str_contains(nbrs, curated_self) {
engram_connect(pub_self, curated_self, el_from_float(0.95), "canonical-self")
engram_connect(curated_self, pub_self, el_from_float(0.95), "canonical-self")
println("[soul] canonical-self bridge built: kn-efeb4a5b <-> 015644f5")
}
}
// load_identity_context pull key identity nodes from engram into working state.
// Called at boot after engram_load. These nodes contain values, intellectual-dna,
// memory-philosophy the graph-stored self that chat.el can include in prompts.
@@ -416,9 +398,6 @@ if is_genesis && safe_to_seed {
} else {
println("[soul] edges already present (" + int_to_str(edge_count_now) + ") - skipping init")
}
// Canonical-self bridge is idempotent run it regardless of edge count so an
// already-populated graph still gets the public->curated self link.
ensure_self_canonical_bridge()
// Genesis saves to its local snapshot file (it manages its own Engram).
state_set("soul_snapshot_path", snapshot)
engram_save(snapshot)