mirror of
https://github.com/block/buzz.git
synced 2026-11-13 04:41:12 +00:00
fix(desktop): enforce shared agent access across devices (#6086)
## Summary - discover shared managed agents from authenticated relay directory records instead of treating channel membership as sufficient proof - publish and refresh access-policy changes immediately so running clients converge across machines without a restart or five-minute poll - route profile edits through the exact managed instance and stop/restart runtimes around access changes so unrelated edits cannot silently widen access - keep mention send-time revalidation and Block owner-only build enforcement fail closed - explain invalid custom provider/model configuration instead of leaving Save silently disabled ### Related issue Fixes #3204 ### Known residuals - a brand-new remote agent's first policy record can wait for the bounded directory poll when no authenticated directory coordinate exists yet; send-time mention revalidation remains fail closed - a failed remote-provider policy redeploy is recorded but cannot undeploy the older provider instance until the provider protocol gains the destructor tracked by #5570 ### Testing - full Desktop unit suite: 4,961 tests passed - focused profile editor Playwright workflow passed, including Customize access edits and prompt-only edits after tightening an instance - Desktop TypeScript, Biome formatting, file-size ratchet, Tauri checks, and pre-push suites passed - independently reviewed for authenticated directory trust, live subscription teardown, runtime revocation ordering, fail-open edit paths, and per-agent provider deployment serialization --------- Signed-off-by: Wes <wesbillman@users.noreply.github.com> Signed-off-by: Brain <21994759fc7a6fa6b965551d35cfd7897d262f2495467f2d78694ddcfa6a5c7e@buzz.block.builderlab.xyz> Co-authored-by: diegorumo <diegorumo@gmail.com> Co-authored-by: Carl <c7ebe626f000404285d3686e1dc74cc07cc60a9754a150041ba132e14bd3e2ec@buzz.block.builderlab.xyz> Co-authored-by: Brain <21994759fc7a6fa6b965551d35cfd7897d262f2495467f2d78694ddcfa6a5c7e@buzz.block.builderlab.xyz>
This commit is contained in:
@@ -100,6 +100,7 @@ type RawSearchResponse = {
|
||||
|
||||
type RawRelayAgent = {
|
||||
pubkey: string;
|
||||
owner_pubkey?: string | null;
|
||||
name: string;
|
||||
agent_type: string;
|
||||
channels: string[];
|
||||
@@ -109,7 +110,6 @@ type RawRelayAgent = {
|
||||
respond_to?: RelayAgent["respondTo"];
|
||||
respond_to_allowlist?: string[];
|
||||
};
|
||||
|
||||
import type { RestartDiffEntry as RawRestartDiffEntry } from "./restartDiff";
|
||||
export type RawManagedAgent = {
|
||||
pubkey: string;
|
||||
@@ -652,10 +652,10 @@ export async function createAuthEvent(input: {
|
||||
const eventJson = await invokeTauri<string>("create_auth_event", input);
|
||||
return JSON.parse(eventJson) as RelayEvent;
|
||||
}
|
||||
|
||||
function fromRawRelayAgent(agent: RawRelayAgent): RelayAgent {
|
||||
return {
|
||||
pubkey: agent.pubkey,
|
||||
ownerPubkey: agent.owner_pubkey ?? null,
|
||||
name: agent.name,
|
||||
agentType: agent.agent_type,
|
||||
channels: agent.channels,
|
||||
|
||||
@@ -266,9 +266,9 @@ export type RelayMember = {
|
||||
addedBy: string | null;
|
||||
createdAt: string;
|
||||
};
|
||||
|
||||
export type RelayAgent = {
|
||||
pubkey: string;
|
||||
ownerPubkey: string | null;
|
||||
name: string;
|
||||
agentType: string;
|
||||
channels: string[];
|
||||
|
||||
Reference in New Issue
Block a user