aboutsummaryrefslogtreecommitdiff
path: root/crates/dinggerd/src/main.rs
diff options
context:
space:
mode:
authorIgor Soarez <igor@soarez.org>2026-10-23 13:20:11 +0300
committerIgor Soarez <igor@soarez.org>2026-10-23 13:20:11 +0300
commitc082f5044eedd2294d72f920d1018e40d73aab33 (patch)
tree54420e9c0fcb366e8db776c9463c4530737704d7 /crates/dinggerd/src/main.rs
parent0f06b0b15d6b064703fa1166fb8e7ceda209aaa8 (diff)
restore, step 2: resume agents, retype command lines
- the pi extension reports its session file; the daemon keeps it in the pane option @agent_session, and snapshots carry it. restore runs `pi --session <file>` in the rebuilt pane, one agent every 0.5s, then reports which agents run and which were interrupted mid-turn. - other panes: the command line running in them is typed at the new prompt but not run. exactly as typed with the zsh hook (dingger install zsh: preexec/precmd keep @dingger_cmd), else the foreground program's exact argv from the kernel (KERN_PROCARGS2), shell-quoted. - "at a prompt" is the pane's own shell owning the terminal's foreground process group, not a name check: `sh -c ...` is a running program. - an agent or command that exits keeps its place in snapshots for 60s, so a shutdown that stops programs before tmux still restores them. - typing waits for each new prompt (text typed earlier echoes twice). e2e step 16 covers resume with a session path containing a space, the interrupted report, an agent that exits just before the server dies, a quoted command retyped not run, and the hook's text; dropping the grace period, judging prompts by name, running retyped commands, or not storing the session reference each fail it. the test's fake pi is guarded so a real pi never starts.
Diffstat (limited to 'crates/dinggerd/src/main.rs')
-rw-r--r--crates/dinggerd/src/main.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/crates/dinggerd/src/main.rs b/crates/dinggerd/src/main.rs
index 2129bd2..7cf3513 100644
--- a/crates/dinggerd/src/main.rs
+++ b/crates/dinggerd/src/main.rs
@@ -5,6 +5,7 @@ mod integrations;
mod manifest_update;
mod names;
mod notify;
+mod platform;
mod restore;
mod snapshot;
mod tmux;
@@ -72,9 +73,10 @@ enum Command {
#[arg(long = "session")]
sessions: Vec<String>,
},
- /// Install agent integrations (hook extensions that report state).
+ /// Install integrations: an agent's hook extension (state and session
+ /// reports), or `zsh` (command lines for restore to retype).
Install {
- /// Agent to install the integration for.
+ /// `pi`, or `zsh`.
agent: String,
},
}