feat(execution): SSH tool execution with connection management and approval routing (PR1)#360
Draft
esafwan wants to merge 4 commits into
Draft
feat(execution): SSH tool execution with connection management and approval routing (PR1)#360esafwan wants to merge 4 commits into
esafwan wants to merge 4 commits into
Conversation
…proval routing (PR1) - SSH Connection + Agent SSH Connection DocTypes with encrypted secrets, host-key pinning, and test/enroll/rotate whitelisted actions - Agent-side allowlisting (allow_ssh + ssh_connections) with registry gating - Paramiko-based one-shot remote execution (no PTY) with bounded timeouts and output limits; approval routing generalized across code_execution and ssh_exec with execution-kind-specific approver capabilities (ssh.approve vs execution.approve) - React agent form: SSH enablement + allowlisted-connection multi-select in advanced settings; Desk DocType UI is the PR1 admin surface - PR1 scope/contract doc: docs/ssh-execution-pr1.md Stacked on feature/python-code-execution (d924ba5).
…tion, host-key, timeouts, truncation)
…; honor per-call output limits in result truncation
…c clock, JSON field parsing); document PR1 known limitations
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
SSH tool execution (PR1)
Draft PR — stacked on
feature/python-code-execution@d924ba5(itself stacked ontridz-dev/huf#298/feature/huf-design-system). Merge only after the base lands.What
First-class SSH execution for Huf agents, per
docs/ssh-execution-pr1.md:SSH Connection+Agent SSH ConnectionDocTypes — encrypted secret storage, host-key pinning with strict verification, whitelisted test/enroll/rotate actions with mocked controller coverage.allow_ssh+ssh_connections; tool registry gates SSH execution on capability, agent flag, and allowlisted+enabled connections.code_executionandssh_exec; SSH approvals require thessh.approvecapability (Python execution stays onexecution.approve).SSH ConnectionDocType UI (PR1 deliberately ships no standalone React management page).Deferred (per PR1 contract)
Interactive PTY sessions, terminal input streaming, shared shell state, first-class durable jobs (see
docs/ssh-execution-pr1.mdfor the tmux/Docker/systemd operator pattern and the PR2/PR3 roadmap).Verification
npm run typecheck+npm run buildgreen.huf-ssh.localhost, fresh site +install-app huf+bench migrate):huf.huf.doctype.ssh_connection.test_ssh_connection✅ (7)huf.huf.doctype.agent.test_agent_ssh✅ (4)huf.ai.tests.test_tool_registry_ssh✅ (6)huf.huf.doctype.agent_execution_approval.test_agent_execution_approval✅ (8)huf.ai.tests.test_ssh_execution✅ (15 — gating, secret redaction, host-key rejection, exec/idle timeouts, output truncation)Known limitations
Deferred PR1 items (truncated-output success semantics,
Killed/Timeoutlabeling, no remote signal on kill, non-atomic Redis concurrency slot) are documented indocs/ssh-execution-pr1.md.Tracked in
Tracks/ResearchExec/ongoing/ssh-implementation/{STATUS,TODO}.md.