sessions: vault discovery tools, shared stdin, ctrl-key fixes

New sessions/session_export tools plus a sessions_block vault map in the system prompt (tai.py, ported to detz); recall/search carry a session footer instead of letting the model grep sealed bytes. write_file refuses new markdown at working/repo roots, and the blanket *.md gitignore is gone so docs stay visible. One LineInput owns fd 0 for every prompt (ask, approvals, shell_ask, secrets), ending phantom-empty answers; Ctrl-C re-prompts (double exits), Ctrl-D exits, Ctrl-Z suspends; mid-turn Ctrl-C announces itself and kills foreground shell children via RunInterrupted. Covered by SessionsTests, repl_keys.py pty checks, agent_diff sessions_block cases.
This commit is contained in:
2026-10-28 13:11:45 +01:00
parent e5a6e05ab5
commit 4eff597be7
50 changed files with 1026 additions and 250 deletions
+2 -2
View File
@@ -92,7 +92,7 @@ class ScriptedTransport : public llm::HttpTransport {
class PopenShell : public agent::ShellPort {
public:
agent::RunResult run_live_shell(const std::string& command, const std::string& cwd, const std::map<std::string, std::string>& extra_env,
agent::LiveStreamPort*, const agent::AskFn&) override {
agent::LiveStreamPort*, const agent::AskFn&, bool = true) override {
std::string env;
for (const auto& kv : extra_env) { env += "export " + kv.first + "='" + kv.second + "'; "; }
std::string full = "cd '" + cwd + "' && " + env + command + " 2>&1";
@@ -107,7 +107,7 @@ class PopenShell : public agent::ShellPort {
r.output = py::utf8_replace(r.output);
return r;
}
agent::RunResult run_live_argv(const std::vector<std::string>&, agent::LiveStreamPort*, const agent::AskFn&) override {
agent::RunResult run_live_argv(const std::vector<std::string>&, agent::LiveStreamPort*, const agent::AskFn&, bool = true) override {
throw agent::PortNotWired("shell argv");
}
std::unique_ptr<agent::LiveStreamPort> make_live_stream() override { return nullptr; }