privateer-agent 0.12.37 → 0.12.38

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/tools/media.ts +17 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "privateer-agent",
3
- "version": "0.12.37",
3
+ "version": "0.12.38",
4
4
  "description": "Privacy-first terminal coding agent — bring your own model across 20 providers (Anthropic, OpenAI, OpenRouter, Google, local Ollama…). Safe-by-default permissions, MCP, sub-agents, workflows, and verifiable TEE inference. Built on the Pi toolkit.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -1143,6 +1143,9 @@ export const generateSpriteToolDefinition = {
1143
1143
  "right-facing ones rather than rendered, which is why eight animations cost five clips and not " +
1144
1144
  "eight. Each clip is charged at the account's video rate, so an eight-way set is genuinely " +
1145
1145
  "expensive; say the total to the user before batching characters.\n" +
1146
+ "TWO models are involved, which matters when one of them is down: an IMAGE model turns the " +
1147
+ "picture to face each direction (only for `directions` 'four' and 'eight'), then a VIDEO model " +
1148
+ "renders the motion per facing. `image_model` and `model` override them separately.\n" +
1146
1149
  "It takes several minutes (the clips render sequentially) and this tool waits. Frame count, cell " +
1147
1150
  "size and frame rate are chosen here and cost nothing extra. AVAILABILITY: this needs a video " +
1148
1151
  "decoder on the Privateer API and some deployments do not have one — call media_capabilities and " +
@@ -1218,13 +1221,25 @@ export const generateSpriteToolDefinition = {
1218
1221
  model: Type.Optional(
1219
1222
  Type.String({ description: "Video model id to render the motion with. Omit for the account default." }),
1220
1223
  ),
1224
+ image_model: Type.Optional(
1225
+ Type.String({
1226
+ description:
1227
+ "Image model id used to TURN the picture to face each direction, e.g. " +
1228
+ "'google/gemini-3.1-flash-image'. Omit for the account default. Only used when " +
1229
+ "`directions` is 'four' or 'eight' — 'one' renders no turns and never touches an image " +
1230
+ "model. Worth setting when a run fails with SPRITE_IMAGE_MODEL_UNAVAILABLE: that is the " +
1231
+ "image provider being down, not the request being wrong, and naming another model here " +
1232
+ "retries the whole run for nothing (the turns are drawn before any clip is billed). " +
1233
+ "media_capabilities lists the account's current image model.",
1234
+ }),
1235
+ ),
1221
1236
  }),
1222
1237
  async execute(
1223
1238
  _toolCallId: string,
1224
1239
  params: {
1225
1240
  image: string; prompt: string; dir: string; action?: string; directions?: string;
1226
1241
  frames?: number; frame_size?: number; fps?: number; loop?: boolean;
1227
- name?: string; res_path?: string; model?: string;
1242
+ name?: string; res_path?: string; model?: string; image_model?: string;
1228
1243
  },
1229
1244
  signal?: AbortSignal,
1230
1245
  _onUpdate?: unknown,
@@ -1264,6 +1279,7 @@ export const generateSpriteToolDefinition = {
1264
1279
  return guessed ? { res_path: guessed } : {};
1265
1280
  })()),
1266
1281
  ...(params.model ? { model: params.model } : {}),
1282
+ ...(params.image_model ? { image_model: params.image_model } : {}),
1267
1283
  },
1268
1284
  });
1269
1285
  if (!submitted.ok) return text(`Sprite generation failed: ${submitted.message}`);