mirror of
https://github.com/block/buzz.git
synced 2026-11-28 20:22:39 +00:00
chore(desktop): merge origin/main into workspace-scoped-agent-store
Adopt spawn_hash → spawn_snapshot rename from main; migrate spawn_config_hash: 0 test fixtures to prospective_spawn_config_snapshot() calls in global_agent_config tests, epoch tests, and runtime_commands tests. Co-authored-by: Will Pfleger <pfleger.will@gmail.com> Signed-off-by: Will Pfleger <pfleger.will@gmail.com>
This commit is contained in:
commit
4634fe1b39
@@ -118,6 +118,8 @@ type RawRelayAgent = {
|
||||
respond_to?: RelayAgent["respondTo"];
|
||||
respond_to_allowlist?: string[];
|
||||
};
|
||||
|
||||
import type { RestartDiffEntry as RawRestartDiffEntry } from "./restartDiff";
|
||||
export type RawManagedAgent = {
|
||||
pubkey: string;
|
||||
name: string;
|
||||
@@ -143,6 +145,7 @@ export type RawManagedAgent = {
|
||||
persona_out_of_date: boolean;
|
||||
persona_orphaned: boolean;
|
||||
needs_restart: boolean;
|
||||
restart_diff?: RawRestartDiffEntry[];
|
||||
env_vars?: Record<string, string>;
|
||||
status: ManagedAgent["status"];
|
||||
pid: number | null;
|
||||
@@ -158,8 +161,7 @@ export type RawManagedAgent = {
|
||||
auto_restart_on_config_change?: boolean;
|
||||
backend: ManagedAgentBackend;
|
||||
backend_agent_id: string | null;
|
||||
// Optional: pre-feature mock fixtures may omit these. Mapped to
|
||||
// `"owner-only"` / `[]` in `fromRawManagedAgent`.
|
||||
// Pre-feature fixtures may omit these; mapped to "owner-only"/[] in fromRawManagedAgent.
|
||||
respond_to?: ManagedAgent["respondTo"];
|
||||
respond_to_allowlist?: string[];
|
||||
};
|
||||
@@ -596,11 +598,11 @@ export async function uploadMedia(
|
||||
isTemp,
|
||||
});
|
||||
}
|
||||
|
||||
export async function pickAndUploadMedia(): Promise<BlobDescriptor[]> {
|
||||
return invokeTauri<BlobDescriptor[]>("pick_and_upload_media", {});
|
||||
export async function pickAndUploadMedia(
|
||||
progressId?: string,
|
||||
): Promise<BlobDescriptor[]> {
|
||||
return invokeTauri<BlobDescriptor[]>("pick_and_upload_media", { progressId });
|
||||
}
|
||||
|
||||
export async function uploadMediaBytes(
|
||||
data: number[],
|
||||
filename?: string,
|
||||
@@ -707,11 +709,11 @@ export function fromRawManagedAgent(agent: RawManagedAgent): ManagedAgent {
|
||||
avatarUrl: agent.avatar_url ?? null,
|
||||
model: agent.model,
|
||||
modelSource: agent.model_source ?? null,
|
||||
// Fallbacks for pre-feature mocks/fixtures. Real records always carry them.
|
||||
provider: agent.provider ?? null,
|
||||
personaOutOfDate: agent.persona_out_of_date ?? false,
|
||||
personaOrphaned: agent.persona_orphaned ?? false,
|
||||
needsRestart: agent.needs_restart ?? false,
|
||||
restartDiff: agent.restart_diff ?? [],
|
||||
envVars: agent.env_vars ?? {},
|
||||
status: agent.status,
|
||||
pid: agent.pid,
|
||||
@@ -727,8 +729,6 @@ export function fromRawManagedAgent(agent: RawManagedAgent): ManagedAgent {
|
||||
autoRestartOnConfigChange: agent.auto_restart_on_config_change ?? true,
|
||||
backend: agent.backend,
|
||||
backendAgentId: agent.backend_agent_id,
|
||||
// Fallbacks for pre-feature mocks/fixtures that don't carry these fields.
|
||||
// Real agent records always include them (defaulted server-side).
|
||||
respondTo: agent.respond_to ?? "owner-only",
|
||||
respondToAllowlist: agent.respond_to_allowlist ?? [],
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user