镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

FOR OCT 22: let agents clone and push their channel's repository - #1324

Merged
morgmart merged 4 commits into
mainfrom
morgan/hive-agent-git
Oct 20, 2026
Merged

morgmart merged 4 commits into
mainfrom
morgan/hive-agent-git

Conversation

@morgmart

Copy link
Copy Markdown
Contributor

Summary

This lets agents work in a channel's Git repository with no Git knowledge needed from the people involved. Ask an agent to build something, and it can find the repository bound to the channel or create one, then clone and push to it.

  • New repo tool for agents. It looks up the repository bound to a channel, or creates one when asked. The new repository is protected against force pushes and branch deletion. The tool returns a clone command that includes a short-lived Git header.
  • Only the channel's leads are trusted. Any member can bind a repository to a channel, so lookup counts only repositories announced by the channel's owners or admins, or by agents attested to them through NIP-OA. Creating a repository is refused unless the agent or its owner leads the channel. The tool also refuses a name the agent already uses, because announcing it again would move that repository.
  • The app signs the Git header natively. A new native command signs a NIP-98 header scoped to one repository URL in the agent's own community. The agent's key never leaves the app, and the header is valid for about a minute.
  • Agents may publish repository announcements. The agent controller now allows kind 30617.

Screenshots

This change adds no interface. It is an agent tool plus native signing, so there is nothing visual to capture.

Testing

  • Rust agent-controller tests pass (61), including a new test that the Git header is signed for one repository in the agent's own community.
  • src/buzz-mcp Vitest passes (120). It covers trusted lookup that ignores impostor and other-channel repositories, choosing among several repositories, protected create, refusal of a duplicate name or a second repository, lead-only create, and refusal without a key.
  • tsc is clean, and design-system and clippy pre-push lanes pass.
  • In the full local pre-push run, 7 unrelated UI and relay tests timed out because the machine was under load. All 6 of those files pass when run alone (390 tests).

Not yet verified live: that the relay's repos:write scope accepts an announcement signed by an agent, and a push from two agents. Codex pins its tool list per thread, so a Codex agent needs a fresh thread to see repo.

🤖 Generated with Claude Code

@morgmart morgmart changed the title feat(agents): let agents clone and push their channel's repository FOR OCT 22: let agents clone and push their channel's repository Oct 20, 2026
@morgmart
morgmart marked this pull request as ready for review October 20, 2026 06:29
@morgmart
morgmart requested review from a team as code owners October 20, 2026 06:29

@wesbillman wesbillman left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 Star Lord’s automated source review via Wes’s account.

Reviewed head a941228cc56f31de05d1ce578e221ae359ce3822, base/merge-base 7d50425b7fda7c0bfdccb897df0507a286d6bbac.

8/10: three P2 correctness findings inline. Native signing, repository URL scoping, NIP-OA ownership checks and the intentional owner/admin trust policy are consistent with the inspected contracts. The findings concern branch protection coverage, incomplete discovery and create’s no-move guarantee.

Optional wording improvements: describe create explicitly as the new repository’s name; distinguish “no trusted repository” from “no repository”; and tell callers to retry without create if publication succeeded but obtaining the Git header failed. These do not require changing the deliberate trust policy.

Coverage: Rocket systems/performance/lifecycle and Git transport; Mantis correctness/security/concurrency; Groot product and tool error/retry flows; integrated by Star Lord. Reviewed all 18 changed files, supported callers, public description and feature commit messages. No attached images or actionable public-disclosure finding. No rendered UI changed; focus/accessibility behavior was not exercised. Supplemental relay contracts were inspected at block/buzz revisions d051350f693bfb158bbb560299d5764991b2e98b and 6e6173acd58029bac800583c4cc7482dafed693a; these are source references, not deployment evidence.

Source-only: no PR code, tests, builds, app launches or live Git operations executed. Current CI was not checked. Live announcement acceptance, two-agent clone/push, replica/concurrent-create recovery, performance and human acceptance remain unverified. This is a non-blocking COMMENT review, not approval or merge authorization.

Comment thread src/buzz-mcp/tools.ts Resolved
Comment thread src/buzz-mcp/tools.ts Resolved
Comment thread src/buzz-mcp/tools.ts Resolved
@morgmart
morgmart force-pushed the morgan/hive-agent-git branch from a941228 to 1442e08 Compare October 20, 2026 20:39
morgmart and others added 4 commits October 20, 2026 13:50
Agents get a `repo` tool: it finds the repository bound to a channel
(first `buzz-channel` tag), or creates one protected against force
pushes and deletion, and returns its URL with a Git header the app
signs natively for that one repository. The key never leaves the app;
the header is honored for a minute.

Co-authored-by: Carl <c217fe6b9d958f41c3a5e030dccc7f626775a923089cb6491305eade75ea1f1b@buzz.block.builderlab.xyz>
Signed-off-by: morgmart <98432065+morgmart@users.noreply.github.com>
Any member can bind a repository to a channel, so the repo tool now
counts only those announced by the channel's owners or admins, or by
their NIP-OA-attested agents. create refuses a name the agent already
uses, since announcing it again would move that repository, and the
Git header is scoped to the repository URL.

Co-authored-by: Carl <c217fe6b9d958f41c3a5e030dccc7f626775a923089cb6491305eade75ea1f1b@buzz.block.builderlab.xyz>
Signed-off-by: morgmart <98432065+morgmart@users.noreply.github.com>
Check that the agent or its owner leads the channel before announcing
its repository, instead of announcing one that lookup then ignores.

Co-authored-by: Carl <c217fe6b9d958f41c3a5e030dccc7f626775a923089cb6491305eade75ea1f1b@buzz.block.builderlab.xyz>
Signed-off-by: morgmart <98432065+morgmart@users.noreply.github.com>
… page

Protect nested branches too, read every page of a channel's repository
announcements before trusting absence, and start one repository at a
time per agent from the relay's writer, confirming the binding after.

Co-authored-by: Carl <c217fe6b9d958f41c3a5e030dccc7f626775a923089cb6491305eade75ea1f1b@buzz.block.builderlab.xyz>
Signed-off-by: morgmart <98432065+morgmart@users.noreply.github.com>
@morgmart
morgmart force-pushed the morgan/hive-agent-git branch from 1442e08 to 64a1aa3 Compare October 20, 2026 20:50

@wesbillman wesbillman left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 Star Lord’s automated source review via Wes’s account.

Reviewed head 64a1aa3e058561cab52e29f1afe03d9f8aa11d19, base f63082f7124f5d1f900180dd887c2498159d3d9a, merge-base abdc0e4913952690644e6b645e7ae1152c8ad3be.

9/10: no new actionable findings in this follow-up. The three P2s from the previous review are addressed in source: recursive branch protection, bounded discovery that preserves incomplete results, and serialized same-agent creation with writer-backed checks and binding confirmation. The rebased native/tool integration preserves the inspected contracts.

The serialization guarantee covers the supported Desktop host: Claude, Goose and Codex route tools through the shared app implementation. It does not establish coordination between separate devices using the same identity. Relay pagination, writer routing and recursive ref matching were checked against source references d051350f693bfb158bbb560299d5764991b2e98b and 6e6173acd58029bac800583c4cc7482dafed693a, not a deployed relay.

Optional wording refinements in src/buzz-mcp/tools.ts: after an accepted announcement whose confirmation read fails, suggest retrying lookup without create; distinguish an absent confirmation from a confirmed different binding (lines 1805–1811). When the five-page budget is exhausted, explain that limit so an unchanged retry is not presented as the only remedy (lines 1063–1066, 1771–1774). These are optional improvements, not required changes.

Coverage: Rocket systems/performance/lifecycle and native/Git boundaries; Mantis correctness/security/concurrency; Groot product and error/retry flows; integrated by Star Lord. Reviewed the public description and feature commit messages: no attachments or actionable disclosure finding. No rendered UI changed.

Source-only: no PR code, tests, builds, apps or live Git operations executed. One hosted-check snapshot showed JavaScript, Rust and browser jobs still running, with Windows skipped; it was not a final CI result. Live create/clone/push, deployed-relay behavior, performance and human acceptance remain unverified. This is a non-blocking COMMENT review, not approval or merge authorization.

@kalvinnchau kalvinnchau left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 Approved: no actionable findings in the reviewed changes. The repository creation serialization, pagination and recursive branch protection repairs address the prior findings within a single app instance. Cross-host creation exclusion and native/live-relay Git integration remain unverified. The failing WebKit CI job still needs resolution before merge.

@morgmart
morgmart merged commit 1dec9c9 into main Oct 20, 2026
69 of 71 checks passed
@morgmart
morgmart deleted the morgan/hive-agent-git branch October 20, 2026 22:05
wpfleger96 pushed a commit that referenced this pull request Oct 20, 2026
…-sessions

* origin/main: (23 commits)
  Add Marketplace tab and shared agent profile panels (#1411)
  fix: publish scoped typing indicators from conversation composers (#1435)
  feat: add configurable composer and pane focus shortcuts (#1418)
  perf(messages): reuse captured video opening frames on remount (#1437)
  FOR OCT 22: let agents clone and push their channel's repository (#1324)
  perf(relay): keep row profile map identity while new authors load (#1431)
  perf: avoid redundant relay channel derivation (#1412)
  Normalize dialog sizing, headers, spacing, and motion (#1403)
  Polish agent activity pills and popover actions (#1429)
  feat(agents): ask to resume claude and codex turns stopped by reload or quit (#1235)
  test(sign-out): join listed paths with / so the tests pass on Windows (#1247)
  fix(deps): remove distrusted emsign certificate roots (#1436)
  fix(plugins): distinguish usage and costs from agent activity (#1392)
  refactor(design-system): extract named Appearance palettes and revise plugin gradients (#1339)
  fix(channels): cancel inert activity popover opens (#1426)
  fix(codex): set up Codex in a dialog from the agent creation card, as Claude does (#1419)
  Add community-local settings (#1363)
  Fix sidebar and pane header alignment (#1409)
  Show recorded Codex scripts in Activity (#1413)
  fix(agents): restore emoji avatars in the agent avatar picker (#1404)
  ...

# Conflicts:
#	crates/agent-controller/src/app_agent.rs
wpfleger96 added a commit that referenced this pull request Oct 20, 2026
…-sessions

* origin/main: (23 commits)
  Add Marketplace tab and shared agent profile panels (#1411)
  fix: publish scoped typing indicators from conversation composers (#1435)
  feat: add configurable composer and pane focus shortcuts (#1418)
  perf(messages): reuse captured video opening frames on remount (#1437)
  FOR OCT 22: let agents clone and push their channel's repository (#1324)
  perf(relay): keep row profile map identity while new authors load (#1431)
  perf: avoid redundant relay channel derivation (#1412)
  Normalize dialog sizing, headers, spacing, and motion (#1403)
  Polish agent activity pills and popover actions (#1429)
  feat(agents): ask to resume claude and codex turns stopped by reload or quit (#1235)
  test(sign-out): join listed paths with / so the tests pass on Windows (#1247)
  fix(deps): remove distrusted emsign certificate roots (#1436)
  fix(plugins): distinguish usage and costs from agent activity (#1392)
  refactor(design-system): extract named Appearance palettes and revise plugin gradients (#1339)
  fix(channels): cancel inert activity popover opens (#1426)
  fix(codex): set up Codex in a dialog from the agent creation card, as Claude does (#1419)
  Add community-local settings (#1363)
  Fix sidebar and pane header alignment (#1409)
  Show recorded Codex scripts in Activity (#1413)
  fix(agents): restore emoji avatars in the agent avatar picker (#1404)
  ...

Co-authored-by: Will Pfleger <wpfleger@block.xyz>
Signed-off-by: Will Pfleger <wpfleger@block.xyz>
ngoodger-block added a commit to ngoodger-block/buzz-app that referenced this pull request Oct 21, 2026
* origin/main: (56 commits)
  Polish huddle portraits and thread layout (block#1406)
  fix(goose): keep long model names inside the Settings model row (block#1432)
  feat(agents): show a timestamp on each activity feed entry (block#1443)
  feat(agents): add buttons to compact and start new session (block#1434)
  feat(activity): request and show Claude Code and Codex thinking (block#1452)
  add inline renaming for Solo sidebar chats (block#1345)
  fix(goose): say why the profile has no model to choose (block#1445)
  Add Marketplace tab and shared agent profile panels (block#1411)
  fix: publish scoped typing indicators from conversation composers (block#1435)
  feat: add configurable composer and pane focus shortcuts (block#1418)
  perf(messages): reuse captured video opening frames on remount (block#1437)
  FOR OCT 22: let agents clone and push their channel's repository (block#1324)
  perf(relay): keep row profile map identity while new authors load (block#1431)
  perf: avoid redundant relay channel derivation (block#1412)
  Normalize dialog sizing, headers, spacing, and motion (block#1403)
  Polish agent activity pills and popover actions (block#1429)
  feat(agents): ask to resume claude and codex turns stopped by reload or quit (block#1235)
  test(sign-out): join listed paths with / so the tests pass on Windows (block#1247)
  fix(deps): remove distrusted emsign certificate roots (block#1436)
  fix(plugins): distinguish usage and costs from agent activity (block#1392)
  ...

Signed-off-by: Nikolaj Goodger <ngoodger@squareup.com>
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.

3 participants