@plaiful/cli 0.17.0 → 0.17.2

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/cli.js +15 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plaiful/cli",
3
- "version": "0.17.0",
3
+ "version": "0.17.2",
4
4
  "description": "The Plaiful CLI: work on your Plaiful product from your game repo, with no AWS access",
5
5
  "bin": {
6
6
  "plaiful": "bin/plaiful.js"
package/src/cli.js CHANGED
@@ -197,7 +197,7 @@ function parse(argv) {
197
197
  for (let i = 0; i < argv.length; i += 1) {
198
198
  const a = argv[i];
199
199
  if (['--json', '--no-browser', '--help', '-h', '--version', '--apply', '--reset', '--rows', '--no-install', '--no-open', '--copies', '--no-render', '--wait', '--force', '--fountain', '--vo', '--all', '--retire', '--known', '--model', '--yes', '--dry-run', '--no-wait'].includes(a)) flags[a.replace(/^-+/, '')] = true;
200
- else if (['--product', '--api', '--dir', '--dest', '--count', '--base', '--per-effort', '--track', '--series', '--state', '--limit', '--section', '--since', '--note', '--out', '--style', '--aspect', '--frame', '--title', '--description', '--category', '--order', '--directives', '--narrative', '--hint', '--rarity', '--statement', '--name', '--reason', '--type', '--homeland', '--scope', '--status', '--steps', '--files', '--role', '--exclude', '--source', '--licence', '--releases', '--code', '--entry', '--data', '--snapshot', '--gpu', '--machine', '--hours', '--image', '--project', '--region', '--bucket', '--studio', '--products', '--before', '--to', '--into', '--games', '--caption'].includes(a)) {
200
+ else if (['--product', '--api', '--dir', '--dest', '--count', '--base', '--per-effort', '--track', '--series', '--state', '--limit', '--section', '--since', '--note', '--out', '--style', '--aspect', '--frame', '--title', '--description', '--category', '--order', '--directives', '--narrative', '--hint', '--rarity', '--statement', '--name', '--reason', '--type', '--homeland', '--scope', '--status', '--steps', '--files', '--role', '--exclude', '--source', '--licence', '--releases', '--code', '--entry', '--data', '--snapshot', '--gpu', '--machine', '--hours', '--image', '--project', '--region', '--bucket', '--studio', '--products', '--before', '--to', '--into', '--games', '--caption', '--cadence', '--window'].includes(a)) {
201
201
  if (argv[i + 1] === undefined) throw new UsageError(`${a} needs a value`);
202
202
  flags[a.slice(2)] = argv[i += 1];
203
203
  } else if (a === '--area') { // repeatable: --area art=edit --area content=view
@@ -1148,6 +1148,19 @@ function agentFiles(ctx, r, files) {
1148
1148
  return found;
1149
1149
  }
1150
1150
 
1151
+ /** What an agent's records get made into: its generation pathway and art style (plaiful styles show <id>). */
1152
+ function makesText(a) {
1153
+ if (((a.metadata || {}).business_purpose) === 'data') return 'records only (a data agent)';
1154
+ const g = a.generation;
1155
+ if (!g || !g.pathway) {
1156
+ const wf = ((a.system_fields || {}).workflow || {}).value;
1157
+ return wf ? `images via runpod, workflow ${wf}` : 'no image generation set (renders fall back to RunPod: set a style in SmartBuilder)';
1158
+ }
1159
+ const what = g.kind === 'image' || !g.kind ? 'images' : g.kind;
1160
+ if (g.pathway === 'runpod') return `${what} via runpod${g.runpod && g.runpod.workflow ? `, workflow ${g.runpod.workflow}` : ''}`;
1161
+ return `${what} via ${g.pathway}, ${g.style_ref ? `style ${g.style_ref}` : 'no style (the engine default)'}`;
1162
+ }
1163
+
1151
1164
  async function agents(ctx, [sub, name, ...rest]) {
1152
1165
  const r = repo(ctx);
1153
1166
  if (!sub) {
@@ -1168,6 +1181,7 @@ async function agents(ctx, [sub, name, ...rest]) {
1168
1181
  ` fields ${(a.output_fields || []).join(', ')}`,
1169
1182
  ` lists ${Object.entries(a.ssm_parameters || {}).map(([k, v]) => `${k} ← ${listSource(v)}`).join('; ') || 'none'}`,
1170
1183
  ` dedup ${a.duplicate_detection && a.duplicate_detection.enabled !== false ? `on ${[].concat(a.duplicate_detection.field || 'name').join(', ')}` : 'off'}`,
1184
+ ` makes ${makesText(a)}`,
1171
1185
  ' (--json prints the whole config)'];
1172
1186
  ctx.out(lines.join('\n'), data);
1173
1187
  return 0;