From 74df75d438b9def4b08e941f24b87402996145bd Mon Sep 17 00:00:00 2001 From: lotherk Date: Tue, 24 Nov 2026 11:46:10 +0000 Subject: [PATCH] no approval gate: splinter runs what the operator's registry offers Konrad, 24.11.: "v1 geht durch ohne irgendwas. ich will auch keine approvals generell. ich will nur das der user mit ask nach sachen gefragt werden kann." Removed the whole approval apparatus, not just the prompt: - agent.c: the decision point (sp_host_gate/approve callbacks), the pause/resume path (has_pending, pending_from, sp_agent_resume), ack_approval, ask_operator and the ack stdin thread are gone. A tool runs; its exit status is the observation. sp_tool_policy (allow/deny per profile) stays - that is the operator's own configuration, not a question to the operator. - engine.c: SP_EV_APPROVAL, sp_engine_approve, the approve_pending condition variable and the `approval`/`approve` protocol commands are gone. - openai_server.c: the v1 endpoint runs gw_* tools without a gate; the autonomous flag is no longer part of sp_gateway_opts. - a2aserver.c: INPUT_REQUIRED and the resume-by-taskId path are gone; CancelTask stays. An A2A caller has no operator sitting in front of a prompt. - mcpserver.c: --autonomous no longer gates mutating tools; the flag and the config key are accepted for compatibility and documented as changing nothing. - telegram.c: tg_approve and the approval callback are gone; ask is the only dialog, and /cancel inside it still ends the turn. - front ends: protocol.c, curses.c, ui_local.c, ui_remote.c, client.c lose the approval event and the waiting flag. - ack.c stays: it is a plugin API (plugins/kids asks its parent through it), not splinter's own gate. --ack is documented as such. Tests: test_pause.c guarded the pause and now guards the opposite (a mutate and a destructive tool run, nothing is asked). test_a2a_input.sh, test_protocol.sh, test_ui.sh, test_agents_ui.sh, test_gateway.sh, test_gateway_openai.sh, test_agent.c and test_mcpsession.sh were rewritten the same way; splinter_approve must now be absent from the MCP tool list. Every rewritten test was run red against the old behaviour where that was possible. make check: all tests passed (428 s) make check-asan: all 47 test binaries clean make check-tsan: all 47 test binaries free of data races --- README.md | 61 ++++---- TODO.md | 6 +- docs/CONFIG.md | 6 +- docs/FRONTENDS.md | 5 +- docs/GATEWAY.md | 10 +- docs/PLUGINS.md | 33 ++-- docs/PROTOCOL.md | 24 ++- docs/ROADMAP.md | 7 +- docs/splinter.1 | 20 +-- include/splinter.h | 38 +---- include/splinter_engine.h | 27 +--- plugins/processes/processes.c | 5 +- share/locale/de.msg | 15 +- share/locale/en.msg | 15 +- share/locale/pt_BR.msg | 15 +- src/backend/a2aserver.c | 236 ++--------------------------- src/backend/agent.c | 277 ++-------------------------------- src/backend/engine.c | 91 +---------- src/backend/mcpserver.c | 34 +---- src/backend/mcpserver.h | 2 +- src/backend/mcpsession.c | 76 ++-------- src/backend/openai_server.c | 18 ++- src/backend/openai_server.h | 1 - src/backend/telegram.c | 211 ++------------------------ src/frontend/client.c | 27 ---- src/frontend/curses.c | 66 +------- src/frontend/protocol.c | 23 +-- src/frontend/ui_backend.h | 4 - src/frontend/ui_local.c | 14 -- src/frontend/ui_remote.c | 53 ------- src/main.c | 18 +-- tests/test_a2a_input.sh | 65 +++----- tests/test_agent.c | 29 +++- tests/test_agents_ui.sh | 19 ++- tests/test_gateway.sh | 20 +-- tests/test_gateway_openai.sh | 13 +- tests/test_mcpsession.sh | 4 +- tests/test_pause.c | 114 +++++++------- tests/test_protocol.sh | 23 +-- tests/test_secrets.c | 4 +- tests/test_ui.sh | 25 ++- 41 files changed, 377 insertions(+), 1377 deletions(-) diff --git a/README.md b/README.md index 49aeec6..01d55c0 100644 --- a/README.md +++ b/README.md @@ -61,7 +61,7 @@ splinter refuses to start rather than pretend it can talk to a model. | `--session DIR`, `--session-id ID` | session directory (default `~/.splinter`) and id (default `sess-