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.
21 lines
1.2 KiB
C++
21 lines
1.2 KiB
C++
#pragma once
|
|
// ShellAdapter: agent::ShellPort over src/shell (RunLive, LiveStream, ShellTargets, Sandbox, LaneBoard).
|
|
#include "../agent/ports.h"
|
|
namespace detz::glue {
|
|
|
|
class ShellAdapter : 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* stream, const agent::AskFn& ask, bool foreground = true) override;
|
|
agent::RunResult run_live_argv(const std::vector<std::string>& argv, agent::LiveStreamPort* stream, const agent::AskFn& ask,
|
|
bool foreground = true) override;
|
|
std::unique_ptr<agent::LiveStreamPort> make_live_stream() override;
|
|
std::vector<std::string> shell_target_paths(const std::string& command, const std::string& workdir) override;
|
|
std::string ensure_box() override;
|
|
llm::ProcResult box_exec(const std::string& engine, const std::vector<std::string>& argv, const std::optional<std::string>& input,
|
|
double timeout_s) override;
|
|
std::unique_ptr<agent::LaneBoardPort> make_lane_board(const std::string& profile) override;
|
|
};
|
|
|
|
} // namespace detz::glue
|