Skip to content

feat(cli): add fullsend agent subcommand (ADR 0058 Phase 2) - #3

Closed
ggallen wants to merge 2 commits into
agent-registration-config-schemafrom
agent-cli-subcommand
Closed

feat(cli): add fullsend agent subcommand (ADR 0058 Phase 2)#3
ggallen wants to merge 2 commits into
agent-registration-config-schemafrom
agent-cli-subcommand

Conversation

@ggallen

@ggallen ggallen commented Jun 30, 2026

Copy link
Copy Markdown
Owner

Summary

  • Adds fullsend agent CLI subcommand with add, list, update, remove for managing agent registrations in config (ADR 0058 Phase 2)
  • agent add pins URLs to a commit SHA with integrity hash and auto-updates allowed_remote_resources
  • agent update re-pins a URL agent to a new commit SHA (explicit or default branch HEAD)
  • agent remove cleans up unused allowlist prefixes when the last agent using a prefix is removed
  • Adds GetBranchRef to forge.Client interface for resolving branch HEAD SHAs

Test plan

  • All existing internal/cli tests pass
  • All existing internal/forge tests pass
  • Full go build ./... succeeds
  • make go-test passes (all packages)
  • make go-vet clean
  • New tests cover: local path add, URL add with pinned SHA, URL add with hash mismatch, allowlist auto-update, --name flag, duplicate rejection (case-insensitive), path traversal rejection, list empty/populated/hash-stripped, update re-pin with default branch, update with explicit SHA, update rejects local path, update rejects invalid SHA, remove with allowlist cleanup, remove preserves allowlist when other agents share prefix, per-repo config support, helper function unit tests

🤖 Generated with Claude Code

ggallen and others added 2 commits June 29, 2026 22:53
Implements Phase 1 of ADR 0058 (agent registration). Adds AgentEntry
type with custom YAML unmarshaler supporting both string shorthand and
object form, validation for URL integrity hashes, allowlist membership,
path traversal, and name uniqueness. Seeds default AllowedRemoteResources
in NewPerRepoConfig. Legacy role/name/slug agent entries are now rejected
with a clear error instead of silently ignored.

Signed-off-by: Greg Allen <gallen@redhat.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Greg Allen <gallen@redhat.com>
…ions

Add `fullsend agent` CLI with add/list/update/remove subcommands for
managing agent entries in org and per-repo config (ADR 0058 Phase 2).

- `agent add <url-or-path>` pins URLs to a commit SHA with integrity
  hash and auto-updates allowed_remote_resources
- `agent list` displays registered agents with their sources
- `agent update <name> [sha]` re-pins a URL agent to a new commit
- `agent remove <name>` removes an agent and cleans up unused
  allowlist prefixes

Also adds GetBranchRef to the forge.Client interface for resolving
branch HEAD SHAs, used by add and update for commit pinning.

Signed-off-by: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Greg Allen <gallen@redhat.com>
@ggallen
ggallen force-pushed the agent-registration-config-schema branch from 00fca1e to 4c09de0 Compare June 30, 2026 03:28
@ggallen ggallen closed this Jun 30, 2026
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.

1 participant