Skip to content

feat(run): agent execution contract and bounded multi-host fan-out - #40

Merged
jamiesun merged 1 commit into
mainfrom
feat/agent-execution-contract
Aug 13, 2026
Merged

feat(run): agent execution contract and bounded multi-host fan-out#40
jamiesun merged 1 commit into
mainfrom
feat/agent-execution-contract

Conversation

@jamiesun

Copy link
Copy Markdown
Contributor

Summary

Implements #39: a stable agent execution contract so complex scripts arrive byte-for-byte and the same action can fan out safely across an explicit, bounded host set.

  • Add canonical sshx run with versioned request/result/event models
  • Strict selectors: --target(s), --group, --tag (AND), --all-hosts, --address
  • Byte-preserving --script-file / --script-stdin with SHA-256 + size limits
  • Bounded fan-out (concurrency default 4 / hard max 32), continue|fail_fast, JSONL events
  • Trust hardening: no implicit .env; high-risk env bypasses ignored; SSH login vs sudo key roles split
  • Host inventory: groups / tags / ssh_password_key / sudo_password_key
  • Docs, skill, roadmap matrix, and changelog updated

Compatibility

  • Existing sshx -h=... --json "cmd" single-host paths remain supported
  • Legacy password_key is treated as sudo-only

Test plan

  • go test -race ./internal/...
  • go test ./tests/e2e (includes 32-host concurrency 1/4/8/32)
  • make lint
  • pre-commit / pre-push hooks (fmt, vet, race tests, cross builds)

Release note

Not release-ready as a tag yet: changelog is still under [Unreleased]. After merge, cut v0.3.0 by moving the Unreleased section to a dated version entry and running make tag TAG=v0.3.0.

Closes #39

Implement sshx run as the canonical agent contract: versioned request/result
events, strict host selectors, byte-preserving script payloads, typed
credential roles, explicit trust bypasses, and concurrency-bounded fan-out
with JSONL completion semantics. Closes #39.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@jamiesun
jamiesun merged commit 4492b48 into main Aug 13, 2026
8 checks passed
@jamiesun
jamiesun deleted the feat/agent-execution-contract branch August 13, 2026 09:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[execution] Agent 无法以统一契约保真执行复杂脚本并受控扩散到多主机

1 participant