Add preferred runtime onboarding (#2040)

Signed-off-by: Wes <wesbillman@users.noreply.github.com>
Co-authored-by: Pinky <44b8e82baa6e0e254e0208d68f335c283c94e7b78dd1fa10d5a49d3f13dd0435@sprout-oss.stage.blox.sqprod.co>
This commit is contained in:
Wes
2026-07-17 14:19:29 -06:00
committed by GitHub
parent 68e670e001
commit c19e0ce2d4
26 changed files with 1072 additions and 60 deletions

View File

@@ -120,6 +120,23 @@ test("row 3: plain avatar URLs pass through; base64 data URIs upload via the inj
assert.equal(uploads.length, 1, "upload must go through the injected fn");
});
test("row 3: failed persona avatar upload never substitutes the runtime avatar", async () => {
const input = await buildInstanceInputForDefinition(
persona({
id: "builtin:fizz",
displayName: "Fizz",
avatarUrl: "data:image/png;base64,aGk=",
}),
claudeRuntime,
async () => {
throw new Error("upload failed");
},
);
assert.equal(input.avatarUrl, undefined);
assert.notEqual(input.avatarUrl, claudeRuntime.avatarUrl);
});
test("mapping carries the runtime and definition fields", async () => {
const input = await buildInstanceInputForDefinition(persona(), gooseRuntime);
assert.equal(input.name, "Test Agent");