agent-fleet (Rust)
Idiomatic Rust port of
@p-vbordei/agent-fleet(on npm as@p-vbordei/agent-fleetv0.1.3). Autonomous OSS-repo health for solo maintainers — one config, one cron, N repos kept reviewed and dep-current. The CLI drives an Anthropic loop (via an injectableAnthropicClienttrait) through a strictgh-only command allowlist gated by a C3 single-issue interlock. 54 tests cover config validation, enroll, sandbox, the tick loop, and S1/S3/S5/S6 security invariants — all with mocked Anthropic +gh.
What's in the box
agent-fleet enroll <name>— bootstrap one repo with the five-filetypescript-buntemplate kit plus a.release-please-manifest.jsonseeded from the target'spackage.json.agent-fleet tick [<name>]— single Anthropic-loop iteration against one or every fleet entry; opens at most one summary issue per repo.agent-fleet(no args) — usage hint; exits64.- Strict
fleet.yamlschema (serde_yamlwith full validation). - Sandbox:
gh-only allowlist with a forbidden-prefix table for mutating subcommands, enforced before every shell call. - DI-friendly:
AnthropicClientis a trait,ExecFnis a boxed closure — no network or realghin tests.
Install
Or build from source:
Quickstart
# Configure one repo:
# Bootstrap the five-file kit + release-please manifest:
# enrolled agent-id: 6 files written
# Run one tick (reads ANTHROPIC_API_KEY from env, calls real gh):
ANTHROPIC_API_KEY=sk-ant-...
# tick agent-id: issue-created https://github.com/yourname/agent-id/issues/42
Library use with no network — both Anthropic and gh are stubbed — see examples/quickstart.rs:
# tick agent-id: issue-created https://github.com/yourname/agent-id/issues/123
How it relates
| Repo | Role |
|---|---|
agent-fleet |
TypeScript reference (npm @p-vbordei/agent-fleet) — source of truth. |
agent-fleet-py |
Python port. |
agent-fleet-rs |
Rust port (this repo). |
Conformance + Security
The 54-test suite covers every clause in SPEC.md:
- C1 — enroll idempotency: second run produces a byte-identical tree.
- C2 — enroll bounded write set: only the five template files (+ release-please manifest) are touched.
- C3 — tick at-most-one issue: the loop refuses a second
gh issue createin the same run. - C4 — tick read-only on code: forbidden-prefix table rejects mutating
gh pr/issue/release/repo/workflow/secret/variable/labelsubcommands. - C5 —
fleet.yamlstrict schema: missing fields, extras, empty list, bad name/template all fail fast. - S1/S6 — secrets never appear in rendered prompts or sandbox rejection reasons.
- S3 — sandbox rejects shell metacharacters (
|&;\$<>(){}\`) before any allowlist check. - S5 —
enrollmakes zero network calls (templates are vendored viaCargo.toml'sinclude).
# 54 passed
See the TS reference's conformance suite for the canonical fixtures.
Architecture
See docs/architecture.md.
Development
License
Apache-2.0 — see LICENSE.