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
sp_agent_run can stop before a mutating tool when an approval callback
returns 2; the assistant call is in the conversation, no observation is.
sp_agent_resume(decision) runs the pending calls, adds the observations
and continues the model loop. Normal callers are unchanged: the ack, UI
and gateway paths still return 0/1.
The A2A server pauses as TASK_STATE_INPUT_REQUIRED, keeps the task and
its context, and resumes on SendMessage with the same taskId and
yes/no. CancelTask cancels a paused task. SendStreamingMessage has no
resume point and denies mutating tools instead.
test_pause covers allow/deny in the agent; test_a2a_input covers the
whole HTTP flow (yes, no, cancel). Full make check green (33 C tests).