Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
8 changes: 8 additions & 0 deletions BACKLOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -284,3 +284,11 @@ sourcing the function from `tools/gate.sh` is the obvious shape, and 17's PLAN d
Deliberately cited by **construct, not line number**: both files change under active work, and
a line citation in a file under change is the stale-citation class this repository has already
committed once inside the document recording the fix for it.

## 12. The MCP surface changed in 16j

The MCP surface changed in slice 16j. Changes are pinned by tests in
`apps/hacktui_agent/test/mcp_stdio_framing_test.exs`.

`ping` carrying a `_meta` revision is a known `beam_mcp` defect, tracked as SCR-257, and is
pinned by no test here because a test would pin the defect.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,7 @@ HACKTUI_MCP_STDIO=1 ./bin/hacktui-mcp
## Quick initialize test

```bash
body='{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"demo","version":"0.1"}}}'
body='{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-11-25","capabilities":{},"clientInfo":{"name":"demo","version":"0.1"}}}'
printf '%s\n' "$body" | ./bin/hacktui-mcp
```

Expand Down Expand Up @@ -955,7 +955,7 @@ mix hacktui.tui
And if you want to test MCP:

```bash
body='{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"demo","version":"0.1"}}}'
body='{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-11-25","capabilities":{},"clientInfo":{"name":"demo","version":"0.1"}}}'
printf '%s\n' "$body" | ./bin/hacktui-mcp
```

Expand Down
17 changes: 16 additions & 1 deletion apps/hacktui_agent/lib/hacktui_agent/mcp/dispatch.ex
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,23 @@ defmodule HacktuiAgent.MCP.Dispatch do

def call(:propose_action, action_spec, opts) when is_map(action_spec) do
proposal_service = Keyword.get(opts, :proposal_service, ProposalService)
{:ok, proposal_service.propose_action(action_spec, opts)}
{:ok, proposal_service.propose_action(coerce_action_class(action_spec), opts)}
end

def call(_tool, _args, _opts), do: {:error, :unknown_tool}

# The protocol core hands values through unchanged: turning "contain" into :contain is domain
# knowledge, and a generic MCP layer that guessed at it would be carrying this project's
# vocabulary. The schema's enum is what constrains the value; this maps the three it allows
# and leaves anything else alone for the service to reject.
defp coerce_action_class(%{action_class: value} = spec) when is_binary(value) do
%{spec | action_class: action_class_atom(value)}
end

defp coerce_action_class(spec), do: spec

defp action_class_atom("contain"), do: :contain
defp action_class_atom("observe"), do: :observe
defp action_class_atom("notify_export"), do: :notify_export
defp action_class_atom(other), do: other
end
112 changes: 0 additions & 112 deletions apps/hacktui_agent/lib/hacktui_agent/mcp/schema.ex

This file was deleted.

Loading
Loading