B5: one create path — behavioral quad activation, backfill, menu collapse, legacy dialog deletion (#1667)

Signed-off-by: Wes <wesbillman@users.noreply.github.com>
Co-authored-by: Brain <21994759fc7a6fa6b965551d35cfd7897d262f2495467f2d78694ddcfa6a5c7e@sprout-oss.stage.blox.sqprod.co>
This commit is contained in:
Wes
2026-07-09 09:10:22 -07:00
committed by GitHub
co-authored by Brain
parent cdba2a08e1
commit 3a7e400278
62 changed files with 4145 additions and 2569 deletions
+12
View File
@@ -2,6 +2,7 @@ import { invokeTauri } from "@/shared/api/tauri";
import type {
AgentPersona,
CreatePersonaInput,
RespondToMode,
UpdatePersonaInput,
} from "@/shared/api/types";
@@ -64,6 +65,10 @@ export type RawPersona = {
is_active?: boolean;
source_team?: string | null;
env_vars?: Record<string, string>;
respond_to?: string | null;
respond_to_allowlist?: string[];
mcp_toolsets?: string | null;
parallelism?: number | null;
created_at: string;
updated_at: string;
};
@@ -82,6 +87,10 @@ export function fromRawPersona(persona: RawPersona): AgentPersona {
isActive: persona.is_active ?? true,
sourceTeam: persona.source_team ?? null,
envVars: persona.env_vars ?? {},
respondTo: (persona.respond_to as RespondToMode | undefined) ?? null,
respondToAllowlist: persona.respond_to_allowlist ?? [],
mcpToolsets: persona.mcp_toolsets ?? null,
parallelism: persona.parallelism ?? null,
createdAt: persona.created_at,
updatedAt: persona.updated_at,
};
@@ -105,6 +114,7 @@ export async function createPersona(
provider: input.provider,
namePool: input.namePool ?? [],
envVars: input.envVars ?? {},
behavior: input.behavior,
},
}),
);
@@ -128,6 +138,8 @@ export async function updatePersona(
// tells the backend "don't touch the stored env vars" so editing
// unrelated fields can't silently wipe saved credentials.
envVars: input.envVars,
// Same absent-vs-present contract as envVars for the behavioral quad.
behavior: input.behavior,
},
}),
);
+19
View File
@@ -718,10 +718,27 @@ export type AgentPersona = {
/** Environment variables injected for agents created from this persona.
* Layered as: desktop parent env < persona envVars < agent envVars. */
envVars: Record<string, string>;
/** NIP-AP behavioral defaults (wire shape). Null/empty = unset. */
respondTo: RespondToMode | null;
respondToAllowlist: string[];
mcpToolsets: string | null;
parallelism: number | null;
createdAt: string;
updatedAt: string;
};
/**
* NIP-AP behavioral quad for a definition, sent as one group: absent = don't
* touch the stored quad (legacy callers), present = replace all four as a
* unit. Mirrors `PersonaBehaviorRequest`.
*/
export type PersonaBehaviorInput = {
respondTo?: RespondToMode;
respondToAllowlist?: string[];
mcpToolsets?: string;
parallelism?: number;
};
export type CreatePersonaInput = {
displayName: string;
avatarUrl?: string;
@@ -731,6 +748,7 @@ export type CreatePersonaInput = {
provider?: string;
namePool?: string[];
envVars?: Record<string, string>;
behavior?: PersonaBehaviorInput;
};
export type UpdatePersonaInput = {
@@ -743,6 +761,7 @@ export type UpdatePersonaInput = {
provider?: string;
namePool?: string[];
envVars?: Record<string, string>;
behavior?: PersonaBehaviorInput;
};
// ── Team types ────────────────────────────────────────────────────────────────