mirror of
https://github.com/block/buzz.git
synced 2026-11-27 11:41:21 +00:00
- Add PersonaRecord.provider field (types.rs) for LLM inference provider
- Add runtime_metadata_env_vars() in runtime.rs: injects SPROUT_AGENT_MODEL /
SPROUT_AGENT_PROVIDER (or GOOSE_MODEL / GOOSE_PROVIDER) based on discovery
table metadata, placed before build_databricks_defaults() and user env vars
- Add reconcile_provider_mcp_commands() and migrate_persona_provider_to_runtime()
migrations in migration.rs
- Update sprout-persona/resolve.rs: runtime_env_vars() branches on runtime field
to emit runtime-appropriate env var names
- Add e2e_env_flow.rs integration tests for env var emission
- Update PersonaDialog.tsx with provider UI
- Update persona_card.rs to emit llmProvider in exported JSON
- Update personaDialogState.ts + tests for provider round-trip
- Update discovery.rs: model_env_var: Some("SPROUT_AGENT_MODEL") for sprout-agent
- Flatten crates/sprout-agent/src/config/ back to config.rs (remove goose_compat.rs)
- Remove all goose config compat code from sprout-agent (superseded by Wes's #868)
Env var precedence in spawn_agent_child:
parent env
-> runtime_metadata_env_vars() (agent-specific model/provider)
-> build_databricks_defaults() (compile-time Databricks fallback for Block builds)
-> user env vars: persona then agent (last wins -- user intent is authoritative)
50 lines
1.4 KiB
JavaScript
50 lines
1.4 KiB
JavaScript
import path from "node:path";
|
|
import { fileURLToPath } from "node:url";
|
|
import { runFileSizeCheck } from "../../scripts/check-file-sizes-core.mjs";
|
|
|
|
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
const projectRoot = path.resolve(__dirname, "..");
|
|
|
|
const MAX_LINES = 1000;
|
|
|
|
const rules = [
|
|
{ root: "src-tauri/src", extensions: new Set([".rs"]), maxLines: MAX_LINES },
|
|
{
|
|
root: "src/app",
|
|
extensions: new Set([".ts", ".tsx"]),
|
|
maxLines: MAX_LINES,
|
|
},
|
|
{
|
|
root: "src/features",
|
|
extensions: new Set([".ts", ".tsx"]),
|
|
maxLines: MAX_LINES,
|
|
},
|
|
{
|
|
root: "src/shared/api",
|
|
extensions: new Set([".ts", ".tsx"]),
|
|
maxLines: MAX_LINES,
|
|
},
|
|
];
|
|
|
|
// TEMP — these files exceed the 1000-line limit and are queued to be split.
|
|
// Do not add to this list; split the file instead. Remove each entry as its
|
|
// file is broken up. Tracked as a follow-up.
|
|
const overrides = new Map([
|
|
["src-tauri/src/managed_agents/nest.rs", 1420],
|
|
["src-tauri/src/managed_agents/runtime.rs", 1440],
|
|
["src-tauri/src/managed_agents/persona_card.rs", 1050],
|
|
["src-tauri/src/huddle/tts.rs", 1364],
|
|
["src/shared/api/tauri.ts", 1196],
|
|
["src-tauri/src/nostr_convert.rs", 1116],
|
|
["src/shared/api/relayClientSession.ts", 1022],
|
|
["src-tauri/src/migration.rs", 1130],
|
|
]);
|
|
|
|
await runFileSizeCheck({
|
|
projectRoot,
|
|
rules,
|
|
overrides,
|
|
label: "Desktop",
|
|
scriptPath: "desktop/scripts/check-file-sizes.mjs",
|
|
});
|