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

fix(agents): send sign-in evidence with agent Git credentials - #2240

Merged
wpfleger96 merged 3 commits into
mainfrom
duncan/agent-git-fi
Nov 3, 2026
Merged

wpfleger96 merged 3 commits into
mainfrom
duncan/agent-git-fi

Conversation

@wpfleger96

@wpfleger96 wpfleger96 commented Nov 3, 2026 •

Copy link
Copy Markdown
Member

Relays that enforce NIP-FI refuse any /git/... request without a Nostr-Federated-Identity header, so agent clones, fetches and pushes through the repo tool got 401: the tool's credentials carried only the NIP-98 Authorization header.

  • app_agent_git_auth now goes through the agent's signer, as the agent's upload and media commands do, checks the evidence before handing it out, and returns the Authorization line plus a Nostr-Federated-Identity line when the community requires sign-in. Without evidence it returns only Authorization, as before.
  • The repo tool prints one -c http.<url>.extraHeader=... per header line, the way the desktop's own Git runner already does.
  • Tests cover both header shapes and the two-flag command.
  • Git asks for evidence valid for at least 70 seconds (the minute the tool promises plus a margin). A cached assertion expiring sooner is re-minted on the existing refresh path; if a freshly minted one is still too short, the command fails with an explicit error that the community's sign-in does not last long enough for Git. Upload, media and posting pass zero and are unchanged.
  • docs/identity.md and the app_agent_git_auth doc comment describe the one exception to assertions staying native: the repo tool's Git headers, with the NIP-98 proof bound to one repository for 60 seconds and the assertion relay-scoped and bound to the agent's key (NIP-FI, Assertion–key binding).
  • Tests cover re-minting a short cached assertion and refusing a short freshly minted one.

@wpfleger96
wpfleger96 requested a review from a team as a code owner November 3, 2026 04:08

@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.

🤖 Two contract corrections: document the exported assertion’s boundary/scope and enforce the requested lifetime for freshly issued evidence.

Comment thread src-tauri/src/app_agents.rs Resolved
Comment thread src-tauri/src/app_agents.rs Resolved

@TheSentinel454 TheSentinel454 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 at db7e855.

wpfleger96 and others added 3 commits November 3, 2026 11:27
The repo tool's Git header carried only the NIP-98 Authorization, so
relays enforcing NIP-FI refused agent clones, fetches and pushes with 401.
app_agent_git_auth now signs through the agent's signer and adds the
Nostr-Federated-Identity line when evidence exists; the tool passes one
extraHeader per line.

Co-authored-by: Duncan <dcfd242e557282d7a1e2cf2e6877522682f1e5c6156dc92ca7d90eaedd3b0f95@buzz.block.builderlab.xyz>
The repo tool promises its headers for 60 seconds, but a cached agent
assertion is reused until 30 seconds before it expires. Git evidence now
requires 70 seconds of life and refreshes a cached assertion that has less.

Co-authored-by: Duncan <dcfd242e557282d7a1e2cf2e6877522682f1e5c6156dc92ca7d90eaedd3b0f95@buzz.block.builderlab.xyz>
… evidence

Co-authored-by: Duncan <dcfd242e557282d7a1e2cf2e6877522682f1e5c6156dc92ca7d90eaedd3b0f95@buzz.block.builderlab.xyz>
@wpfleger96
wpfleger96 merged commit 5adf97f into main Nov 3, 2026
41 checks passed
@wpfleger96
wpfleger96 deleted the duncan/agent-git-fi branch November 3, 2026 16:43
dr0uleau added a commit that referenced this pull request Nov 3, 2026
…xecution-support-for-native-buzz-33ea2bea

* origin/main: (74 commits)
  feat(host): harden byte lifecycle and add protected image upload (#2199)
  Updated onboarding (#2183)
  perf(relay): read each signed roster once in large channels (#2244)
  AIDA-2346: Keep spoilers hidden in reminder previews (#2261)
  fix: AIDA-2371 Keep sidebar selection pill aligned during resize (#2182)
  fix(relay): skip background rereads of profiles a read found absent (#2147)
  fix: prevent startup logo selection (#1823)
  fix(agents): send sign-in evidence with agent Git credentials (#2240)
  perf(mentions): stop scanning every member on each mention keystroke (#2246)
  fix(attachments): send image dimensions so previews don't shift (#2262)
  feat(shortcuts): add Slack-style hotkeys (#2170)
  perf(plugins): share host request clients across calls (#2243)
  fix(identity): keep federated sessions and agent grants in one keychain item (#2225)
  fix(profiles): evict the least recently requested profile (#2255)
  fix(unread): repair unread from the recovery tick only every 15 minutes (#2252)
  AIDA-2374: Use readable labels in chat titles (#2185)
  perf(profiles): keep verified names checked through a planned renewal (#2234)
  feat(plugins): let a plugin ask Buzz to review an install (#2059)
  fix(identity): sign FI builds in at first run through the native session (FOUNDATION: App.tsx, services.ts) (#2249)
  Place profile verification beside the verified name (#2224)
  ...

Signed-off-by: Daniel Rouleau <drouleau@squareup.com>
dr0uleau added a commit that referenced this pull request Nov 3, 2026
* commit 'c8e882165': (50 commits)
  Scope execution targets by harness session
  Read durable execution state before admission
  feat(host): harden byte lifecycle and add protected image upload (#2199)
  Updated onboarding (#2183)
  perf(relay): read each signed roster once in large channels (#2244)
  AIDA-2346: Keep spoilers hidden in reminder previews (#2261)
  fix: AIDA-2371 Keep sidebar selection pill aligned during resize (#2182)
  fix(relay): skip background rereads of profiles a read found absent (#2147)
  fix: prevent startup logo selection (#1823)
  fix(agents): send sign-in evidence with agent Git credentials (#2240)
  perf(mentions): stop scanning every member on each mention keystroke (#2246)
  fix(attachments): send image dimensions so previews don't shift (#2262)
  feat(shortcuts): add Slack-style hotkeys (#2170)
  perf(plugins): share host request clients across calls (#2243)
  fix(identity): keep federated sessions and agent grants in one keychain item (#2225)
  fix(profiles): evict the least recently requested profile (#2255)
  fix(unread): repair unread from the recovery tick only every 15 minutes (#2252)
  AIDA-2374: Use readable labels in chat titles (#2185)
  perf(profiles): keep verified names checked through a planned renewal (#2234)
  feat(plugins): let a plugin ask Buzz to review an install (#2059)
  ...

Signed-off-by: Daniel Rouleau <drouleau@squareup.com>
Co-authored-by: Codex <noreply@openai.com>
ljknight added a commit to ljknight/buzz-app that referenced this pull request Nov 3, 2026
…ection

* origin/main: (39 commits)
  Authorize local apps to use Buzz MCP tools (block#2211)
  feat(bestie): choose the private channels Bestie can read (block#2036)
  Polish message actions, spacing, and membership notices (block#2258)
  test(unread): prevent startup catch-up in receipt reserve journey (block#2274)
  test(search): wait for rejected join clearance to settle (block#2278)
  test(reactions): provide stable emoji media for icon rendering (block#2279)
  feat(profiles): reserve profile room for an open channel's roster (block#2269)
  feat(host): harden byte lifecycle and add protected image upload (block#2199)
  Updated onboarding (block#2183)
  perf(relay): read each signed roster once in large channels (block#2244)
  AIDA-2346: Keep spoilers hidden in reminder previews (block#2261)
  fix: AIDA-2371 Keep sidebar selection pill aligned during resize (block#2182)
  fix(relay): skip background rereads of profiles a read found absent (block#2147)
  fix: prevent startup logo selection (block#1823)
  fix(agents): send sign-in evidence with agent Git credentials (block#2240)
  perf(mentions): stop scanning every member on each mention keystroke (block#2246)
  fix(attachments): send image dimensions so previews don't shift (block#2262)
  feat(shortcuts): add Slack-style hotkeys (block#2170)
  perf(plugins): share host request clients across calls (block#2243)
  fix(identity): keep federated sessions and agent grants in one keychain item (block#2225)
  ...

# Conflicts:
#	src/features/messages/ThreadPanel.tsx
arividar pushed a commit to minniai/minni-buzz-app that referenced this pull request Nov 4, 2026
…2240)

Relays that enforce NIP-FI refuse any `/git/...` request without a
`Nostr-Federated-Identity` header, so agent clones, fetches and pushes
through the `repo` tool got `401`: the tool's credentials carried only
the NIP-98 `Authorization` header.

- `app_agent_git_auth` now goes through the agent's signer, as the
agent's upload and media commands do, checks the evidence before handing
it out, and returns the `Authorization` line plus a
`Nostr-Federated-Identity` line when the community requires sign-in.
Without evidence it returns only `Authorization`, as before.
- The `repo` tool prints one `-c http.<url>.extraHeader=...` per header
line, the way the desktop's own Git runner already does.
- Tests cover both header shapes and the two-flag command.
- Git asks for evidence valid for at least 70 seconds (the minute the
tool promises plus a margin). A cached assertion expiring sooner is
re-minted on the existing refresh path; if a freshly minted one is still
too short, the command fails with an explicit error that the community's
sign-in does not last long enough for Git. Upload, media and posting
pass zero and are unchanged.
- `docs/identity.md` and the `app_agent_git_auth` doc comment describe
the one exception to assertions staying native: the `repo` tool's Git
headers, with the NIP-98 proof bound to one repository for 60 seconds
and the assertion relay-scoped and bound to the agent's key (NIP-FI,
Assertion–key binding).
- Tests cover re-minting a short cached assertion and refusing a short
freshly minted one.

---------

Co-authored-by: Duncan <dcfd242e557282d7a1e2cf2e6877522682f1e5c6156dc92ca7d90eaedd3b0f95@buzz.block.builderlab.xyz>
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