@koda-sl/baker-cli 0.283.0-dev.cba48e792 → 0.285.0-dev.e3dcdf3eb

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cli.js CHANGED
@@ -29855,7 +29855,7 @@ function creationHints(created, profile) {
29855
29855
  const casting = created.likeness === "synthetic" && created.faceChoice === "auto" ? [
29856
29856
  `No one was asked about this face \u2014 \`--face auto\` cast it and it is kept. Do not tell the user they chose it, and do not offer them a pick you are not going to run. If this should have been theirs, say so and create it again with \`--face ask\`.`
29857
29857
  ] : created.likeness === "synthetic" ? [
29858
- `The user chooses this face, and it only happens if you ask. Use the request_avatar_casting TOOL now \u2014 invoke it the way you invoke Read or Bash, with avatarHandle set to "${created.handle}". It is NOT a shell command: typing it into Bash runs nothing, fails quietly, and leaves the user waiting for a picker that never opens. It shows them real portraits and blocks until they pick, so never stand in a question of your own, which can only offer them words. The sheet building right now is fused from a face nobody has chosen.`
29858
+ `The user is being shown real portraits of @${created.handle} right now, and the turn waits for them to pick \u2014 this happens on its own, triggered by the command you just ran. Do NOT call request_avatar_casting, do not ask about the face in a question of your own, and do not wait or poll: whatever you do next simply runs after they have chosen. Say what you created and get on with the work.`
29859
29859
  ] : [];
29860
29860
  const hints2 = [
29861
29861
  ...casting,
@@ -29925,12 +29925,24 @@ function failValidation2(message, fix) {
29925
29925
  writeJson({ ok: false, error: { code: "VALIDATION_ERROR", message, ...fix ? { fix } : {} } });
29926
29926
  process.exit(1);
29927
29927
  }
29928
- function failAvatarApi(err, handle) {
29929
- if (err instanceof ApiError) {
29930
- const fix = err.code === "NOT_FOUND" ? {
29928
+ function avatarFailureFix(err, handle) {
29929
+ if (err.code === "NOT_FOUND") {
29930
+ return {
29931
29931
  action: "list_avatars",
29932
29932
  explanation: `Run \`baker avatars list\` to see which avatars this company has${handle ? ` \u2014 "${handle}" is not one of them` : ""}. Handles are lowercase letters, numbers and dashes ("maria-founder", not "Maria Founder"). If the roster is empty, create the avatar first with \`baker avatars create\`. Do not abandon the wider job over this \u2014 carry on without the avatar and say so.`
29933
- } : void 0;
29933
+ };
29934
+ }
29935
+ if (err.code === "CONFLICT" && handle) {
29936
+ return {
29937
+ action: "use_the_existing_avatar",
29938
+ explanation: `@${handle} already exists in THIS company \u2014 avatars belong to the company, not to a chat, so one made in an earlier conversation is still here and still castable. If it is the person you want, use it as it is: \`--avatar ${handle}\`. Read it first with \`baker avatars get ${handle} --full\` and say who they already are. Do NOT create the same person under a second name: the user would be told about one avatar and handed another, and the company ends up with duplicates nobody chose a face for. If you genuinely need a different person, ask the user what to call them.`
29939
+ };
29940
+ }
29941
+ return void 0;
29942
+ }
29943
+ function failAvatarApi(err, handle) {
29944
+ if (err instanceof ApiError) {
29945
+ const fix = avatarFailureFix(err, handle);
29934
29946
  writeJson({ ok: false, error: { code: err.code, message: err.message, ...fix ? { fix } : {} } });
29935
29947
  process.exit(1);
29936
29948
  }