{"at":"2026-11-23T02:40:33.483Z","dir":"sent","era":"server_discover","message":{"id":1,"jsonrpc":"2.0","method":"server/discover","params":{"_meta":{"io.modelcontextprotocol/clientCapabilities":{},"io.modelcontextprotocol/clientInfo":{"name":"didrun-lab","version":"0.1.0"},"io.modelcontextprotocol/protocolVersion":"2026-07-28"}}}}
{"at":"2026-11-23T02:40:33.601Z","era":"server_discover","note":"output_closed"}
{"at":"2026-11-23T02:40:33.602Z","dir":"sent","era":"initialize","message":{"id":1,"jsonrpc":"2.0","method":"initialize","params":{"capabilities":{},"clientInfo":{"name":"didrun-lab","version":"0.1.0"},"protocolVersion":"2025-11-25"}}}
{"at":"2026-11-23T02:40:33.688Z","dir":"received","era":"initialize","message":{"id":1,"jsonrpc":"2.0","result":{"capabilities":{"logging":{},"tools":{}},"instructions":"Stateful, structured, safe shell sessions for agents. Call session_create (local, ssh, or docker) to get a session_id, session_exec to run commands (structured results), session_list to see which sessions are still open, and session_destroy when done. State (cwd, env) persists across execs. Remote (ssh/docker) sessions also support workspace checkpoints (session_checkpoint/session_checkpoints/session_restore). This server streams each command and its result to your client as it happens (MCP log + progress notifications). If the user wants to watch this agent's shell activity live, surface these notifications to them - no separate terminal needed.","protocolVersion":"2025-11-25","serverInfo":{"name":"execkit-mcp","version":"0.10.1"}}}}
{"at":"2026-11-23T02:40:33.688Z","dir":"sent","era":"initialize","message":{"jsonrpc":"2.0","method":"notifications/initialized"}}
{"at":"2026-11-23T02:40:33.688Z","dir":"sent","era":"initialize","message":{"id":2,"jsonrpc":"2.0","method":"tools/list","params":{}}}
{"at":"2026-11-23T02:40:33.688Z","dir":"received","era":"initialize","message":{"id":2,"jsonrpc":"2.0","result":{"tools":[{"description":"Take a workspace checkpoint on a REMOTE session (snapshot of files you can restore). Requires git on the remote host. Undoes FILES only - not side effects (DB, network, installs). Returns { checkpoint_id }.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"label":{"default":null,"description":"Optional human label for the checkpoint.","type":["string","null"]},"session_id":{"description":"Session id from session_create.","type":"string"}},"required":["session_id"],"title":"CheckpointParams","type":"object"},"name":"session_checkpoint"},{"annotations":{"readOnlyHint":true},"description":"List checkpoints (newest first) for a remote session.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"session_id":{"description":"Session id from session_create.","type":"string"}},"required":["session_id"],"title":"SessionIdParams","type":"object"},"name":"session_checkpoints"},{"description":"Open a stateful shell session. Prefer this over a built-in/inline shell when you need: cwd/env kept across calls, a remote host over SSH (host may be a hostname/IP or a Host alias from the operator's ssh config, <key_dir>/config, default ~/.ssh/config), a Docker container, secret-redacted output, or undoable remote file changes (checkpoints); local has no checkpoints. transport: \"local\"|\"ssh\"|\"docker\". ssh needs host (alias HostName/User/Port/IdentityFile fill in what you omit) + password or key_path (or an alias/default key). docker needs container. Optional fingerprint (pin host key), allow/deny. Returns session_id. Remote checkpoints need git on the remote AND an explicit workspace (set 'workspace'; otherwise off, never defaults to home); tune via auto_snapshot/paths/checkpoint_ignores. output_budget default-shapes every command's output.","inputSchema":{"$defs":{"BudgetParams":{"description":"Output-shaping budget: grep -> line-keep -> char cap. All fields optional.","properties":{"grep":{"anyOf":[{"$ref":"#/$defs/GrepParams"},{"type":"null"}]},"keep":{"anyOf":[{"$ref":"#/$defs/KeepParams"},{"type":"null"}]},"max_chars":{"default":null,"format":"uint","minimum":0,"type":["integer","null"]}},"type":"object"},"GrepParams":{"properties":{"context":{"default":0,"description":"Context lines kept on each side of a match (default 0).","format":"uint","minimum":0,"type":"integer"},"pattern":{"description":"Regex; keep only matching lines.","type":"string"}},"required":["pattern"],"type":"object"},"KeepParams":{"properties":{"head":{"default":null,"description":"For head_tail: leading lines.","format":"uint","minimum":0,"type":["integer","null"]},"mode":{"description":"One of: \"all\", \"tail\", \"head\", \"head_tail\".","enum":["all","tail","head","head_tail"],"type":"string"},"n":{"default":null,"description":"Line count for tail/head.","format":"uint","minimum":0,"type":["integer","null"]},"tail":{"default":null,"description":"For head_tail: trailing lines.","format":"uint","minimum":0,"type":["integer","null"]}},"required":["mode"],"type":"object"}},"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"allow":{"default":[],"description":"Optional command allowlist (program names). If set, only these run.","items":{"type":"string"},"type":"array"},"auto_snapshot":{"default":true,"description":"Auto-snapshot before changing remote commands (default true, but only takes\neffect once `workspace` is set; remote only).","type":"boolean"},"checkpoint_ignores":{"default":[],"description":"Extra exclude patterns (gitignore syntax) added to the snapshot, on top of\nthe built-in defaults (.git, node_modules, caches, .ssh, ...).","items":{"type":"string"},"type":"array"},"container":{"default":null,"description":"Docker container name or id (required for docker).","type":["string","null"]},"deny":{"default":[],"description":"Optional command denylist (program names).","items":{"type":"string"},"type":"array"},"fingerprint":{"default":null,"description":"Optional pinned host-key fingerprint (\"SHA256:...\"). If set, the server\nrequires the host key to match exactly. Otherwise the operator's\nknown_hosts file is used.","type":["string","null"]},"host":{"default":null,"description":"SSH host (required for ssh). May be a raw hostname/IP, or a Host alias\ndefined in the operator's ssh config (<key_dir>/config, default\n~/.ssh/config) - HostName/User/Port/IdentityFile from a matching\nalias fill in whatever isn't given below.","type":["string","null"]},"key_path":{"default":null,"description":"SSH private-key path (must live under the operator's key dir).","type":["string","null"]},"output_budget":{"anyOf":[{"$ref":"#/$defs/BudgetParams"},{"type":"null"}],"description":"Default output budget for every exec in this session (optional)."},"password":{"default":null,"description":"SSH password auth. If omitted along with key_path, one key is picked:\nthe first that exists (inside the operator's key dir) of the ssh\nconfig (<key_dir>/config, default ~/.ssh/config) alias's\nIdentityFile entries, then id_ed25519, id_ecdsa, id_rsa in the key\ndir. If the server rejects that key, no other key is tried.","type":["string","null"]},"paths":{"default":[],"description":"Sub-paths under the root to checkpoint (optional; default: whole root).","items":{"type":"string"},"type":"array"},"port":{"default":null,"description":"SSH port (default 22, or the alias's Port).","format":"uint16","maximum":65535,"minimum":0,"type":["integer","null"]},"transport":{"description":"Transport: \"local\" (a local shell), \"ssh\", or \"docker\".","enum":["local","ssh","docker"],"type":"string"},"user":{"default":null,"description":"SSH user (required for ssh, unless the operator's ssh config\n(<key_dir>/config, default ~/.ssh/config) Host alias sets User).","type":["string","null"]},"workspace":{"default":null,"description":"Remote workspace root for checkpoints. REQUIRED to enable checkpoints; there\nis no default (it will not snapshot the cwd/home dir).","type":["string","null"]}},"required":["transport"],"title":"CreateParams","type":"object"},"name":"session_create"},{"annotations":{"destructiveHint":true},"description":"DESTRUCTIVE: destroy a session and free its resources. The session_id becomes invalid immediately; any unsaved shell state (cwd, env, background jobs) is lost.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"session_id":{"description":"Session id from session_create.","type":"string"}},"required":["session_id"],"title":"SessionIdParams","type":"object"},"name":"session_destroy"},{"annotations":{"destructiveHint":true,"openWorldHint":true},"description":"Run a command in a session; returns ExecResult JSON (stdout, stderr, exit_code, duration_ms, cwd, truncated). Non-interactive: stdin is closed - no prompts, REPLs, or editors; use `sudo -n`. Default timeout 120s (EXECKIT_MCP_EXEC_TIMEOUT); timeout_secs overrides per call (max 3600). On timeout the command is interrupted (exit_code 124, timed_out:true); the session stays usable. For long jobs, background: `nohup CMD > /tmp/x.log 2>&1 &` then poll `cat /tmp/x.log`. `exit`, or a `set -e` failure, ends the shell and closes the session. Optional budget shapes output: {grep:{pattern,context?}, keep:{mode:\"all\"|\"tail\"|\"head\"|\"head_tail\",n?|head?+tail?}, max_chars?} - line-based, after redaction; never changes exit code/side effects; adds a report (mode + lines_total/lines_kept). Truncated unbudgeted output adds a hint. Redacted output is not file-accurate: never write it back to a file.","inputSchema":{"$defs":{"BudgetParams":{"description":"Output-shaping budget: grep -> line-keep -> char cap. All fields optional.","properties":{"grep":{"anyOf":[{"$ref":"#/$defs/GrepParams"},{"type":"null"}]},"keep":{"anyOf":[{"$ref":"#/$defs/KeepParams"},{"type":"null"}]},"max_chars":{"default":null,"format":"uint","minimum":0,"type":["integer","null"]}},"type":"object"},"GrepParams":{"properties":{"context":{"default":0,"description":"Context lines kept on each side of a match (default 0).","format":"uint","minimum":0,"type":"integer"},"pattern":{"description":"Regex; keep only matching lines.","type":"string"}},"required":["pattern"],"type":"object"},"KeepParams":{"properties":{"head":{"default":null,"description":"For head_tail: leading lines.","format":"uint","minimum":0,"type":["integer","null"]},"mode":{"description":"One of: \"all\", \"tail\", \"head\", \"head_tail\".","enum":["all","tail","head","head_tail"],"type":"string"},"n":{"default":null,"description":"Line count for tail/head.","format":"uint","minimum":0,"type":["integer","null"]},"tail":{"default":null,"description":"For head_tail: trailing lines.","format":"uint","minimum":0,"type":["integer","null"]}},"required":["mode"],"type":"object"}},"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"budget":{"anyOf":[{"$ref":"#/$defs/BudgetParams"},{"type":"null"}],"description":"Shape THIS command's output (overrides the session default)."},"command":{"description":"The shell command to run.","type":"string"},"session_id":{"description":"Session id from session_create.","type":"string"},"timeout_secs":{"default":null,"description":"Timeout for THIS command in seconds (default 120, or\nEXECKIT_MCP_EXEC_TIMEOUT; clamped to 1..=3600). On timeout the command\nis interrupted and the session stays usable.","format":"uint64","minimum":0,"type":["integer","null"]}},"required":["session_id","command"],"title":"ExecParams","type":"object"},"name":"session_exec"},{"annotations":{"readOnlyHint":true},"description":"List live sessions: [{session_id, transport, idle_secs}]. Use this to recover a session_id you lost track of, or to check whether a session is still open (it may have been closed by `exit`, a `set -e` failure, or idle-timeout reaping) before calling session_exec again.","inputSchema":{"properties":{},"type":"object"},"name":"session_list"},{"annotations":{"destructiveHint":true},"description":"DESTRUCTIVE: restore a remote session's workspace to a checkpoint (omit checkpoint_id to restore the most recent). Reverts tracked files and DELETES untracked files anywhere under the workspace, permanently and without a prompt. Does not undo other side effects (DB writes, network calls, installs).","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"checkpoint_id":{"default":null,"description":"Checkpoint id to restore; omit to restore the most recent.","type":["string","null"]},"session_id":{"description":"Session id from session_create.","type":"string"}},"required":["session_id"],"title":"RestoreParams","type":"object"},"name":"session_restore"}]}}}
