Skip to content

fix: /stats namespace query (#382) + init --agent hermes (#384) - #391

Merged
ajianaz merged 1 commit into
developfrom
fix/382-384-server-bugs
Jun 19, 2026
Merged

ajianaz merged 1 commit into
developfrom
fix/382-384-server-bugs

Conversation

@ajianaz

@ajianaz ajianaz commented Jun 19, 2026

Copy link
Copy Markdown
Collaborator

Fixes

#382 — /stats?namespace= returns 404

GET /stats?namespace=<name> returned {"error":"Not found"} because the handler hardcoded uteke.stats(None). Fix: parse ?namespace= query parameter.

#384 — uteke init --agent hermes not recognized

Added init_hermes() which generates a complete uteke-tool plugin directory (plugin.yaml, tool.py, README.md) matching the format in docs/integrations/hermes.md.

Also fixed CLI help text: removed nonexistent 'copilot, codex' agents, added 'hermes'.

#383 — Port 8888 vs 8767

Already fixed in codebase — config template already uses 8767. No code change needed.

Test plan

  • cargo build --workspace
  • cargo test (282 pass)
  • cargo clippy (clean)
  • cargo fmt (clean)

#382: GET /stats?namespace=<name> returned 404 because the handler
hardcoded uteke.stats(None). Fix: parse ?namespace= query parameter
and pass to stats() for scoped results.

#384: 'uteke init --agent hermes' was not recognized. Added init_hermes()
which generates a complete uteke-tool plugin directory (plugin.yaml,
tool.py, README.md) matching the Hermes plugin format documented in
docs/integrations/hermes.md.

Also fixed CLI help text: removed nonexistent 'copilot, codex' agents,
added 'hermes'.

#383 (port 8888 vs 8767): already fixed in codebase — config template
uses 8767. No code change needed.
@ajianaz ajianaz added bug Something isn't working scope:cli CLI and UX scope:server uteke-server / uteke-mcp binaries labels Jun 19, 2026
"limit": limit,
"namespace": namespace
})
results = resp.json()
// Parse ?namespace= query parameter for scoped stats (#382).
let query = req.url().split('?').nth(1).unwrap_or("");
let params: std::collections::HashMap<String, String> = query
.split('&')
@github-actions

Copy link
Copy Markdown

🔍 Cora AI Code Review

❌ Blocked — critical issues found.

🔴 Error (2)

  • crates/uteke-server/src/main.rs:735 — The new /stats GET handler parses req.url() manually with split('?'), split('&'), and splitn(2, '='), then passes the raw value from params.get("namespace") into uteke.stats(ns_param). This never percent-decodes the query string, so a request like /stats?namespace=my%20space or any namespace containing reserved characters will be looked up under the literal encoded text instead of the intended namespace. That can make valid names unreachable through the new endpoint.
  • crates/uteke-cli/src/init.rs:232 — The generated tool.py code issues requests.post(...) and requests.get(...) calls, but the returned resp is either ignored or immediately parsed with resp.json() without any status check or exception handling. For example, the recall branch does results = resp.json() and the stats branch returns json.dumps(resp.json(), indent=2). If the uteke server is down, returns non-JSON, or responds with an error status, the plugin will raise at runtime instead of returning a controlled error message.

Review powered by cora-cli · BYOK · MIT

@ajianaz
ajianaz merged commit bb240fc into develop Jun 19, 2026
8 of 9 checks passed
@ajianaz
ajianaz deleted the fix/382-384-server-bugs branch July 9, 2026 14:28
ajianaz added a commit that referenced this pull request Aug 13, 2026
#382: GET /stats?namespace=<name> returned 404 because the handler
hardcoded uteke.stats(None). Fix: parse ?namespace= query parameter
and pass to stats() for scoped results.

#384: 'uteke init --agent hermes' was not recognized. Added init_hermes()
which generates a complete uteke-tool plugin directory (plugin.yaml,
tool.py, README.md) matching the Hermes plugin format documented in
docs/integrations/hermes.md.

Also fixed CLI help text: removed nonexistent 'copilot, codex' agents,
added 'hermes'.

#383 (port 8888 vs 8767): already fixed in codebase — config template
uses 8767. No code change needed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working scope:cli CLI and UX scope:server uteke-server / uteke-mcp binaries

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants