@runuai/host 0.9.165 → 0.9.166

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/lib/agent-cli.ts +28 -2
  2. package/package.json +1 -1
package/lib/agent-cli.ts CHANGED
@@ -322,6 +322,29 @@ async function main() {
322
322
  const launch = (a) => a.kind + (a.model ? "/" + a.model : "") + (a.effort ? "/" + a.effort : "");
323
323
  if (action === "list") { out(await api("GET", "/api/agent/crew")); return; }
324
324
  if (action === "status") { out(await api("GET", "/api/agent/crew-status")); return; }
325
+ if (action === "store") { out(await api("GET", "/api/agent/crew-store")); return; }
326
+ if (action === "suggest") {
327
+ // The Astronaut suggests a persona; a person creates it (ADR-157 addendum).
328
+ // From the Store (--template) or from scratch (--name and --brief).
329
+ if (!flags.why || !(flags.template || flags.name)) {
330
+ console.error('uai: crew suggest needs --template <slug> (see crew store), or --name and --brief for a new one, and --why "<reason>"');
331
+ process.exit(1);
332
+ }
333
+ // --skill repeats, and parseFlags keeps only the last, so read them off the raw argv.
334
+ const skills = [];
335
+ for (let i = 0; i < rest.length; i++) {
336
+ if (rest[i] === "--skill" && rest[i + 1]) skills.push(...rest[++i].split(",").filter(Boolean));
337
+ }
338
+ const body = { why: flags.why };
339
+ if (flags.template) body.template = flags.template;
340
+ for (const k of ["name", "role", "summary", "brief", "model", "effort"]) if (flags[k]) body[k] = flags[k];
341
+ if (flags.handle) body.handle = handleOf(flags.handle);
342
+ if (flags.engine) body.engine = flags.engine;
343
+ if (skills.length) body.skills = skills;
344
+ const r = await api("POST", "/api/agent/crew-suggest", body);
345
+ out("suggested " + r.suggestion.name + " (@" + r.suggestion.handle + "). " + r.message);
346
+ return;
347
+ }
325
348
  if (action === "add") {
326
349
  const personaId = pos[0];
327
350
  if (!personaId || !flags.why) {
@@ -367,7 +390,7 @@ async function main() {
367
390
  out("removed @" + id);
368
391
  return;
369
392
  }
370
- console.error("uai: crew commands are list, status, add, model and remove (Astronaut only)");
393
+ console.error("uai: crew commands are list, status, store, suggest, add, model and remove (Astronaut only)");
371
394
  process.exit(1);
372
395
  }
373
396
  const key = group + " " + (action || "");
@@ -572,8 +595,11 @@ async function main() {
572
595
  " uai task history (list your past tasks)",
573
596
  " uai task read <taskId> (full chat of a past task you were on)",
574
597
  ' uai dispatch @agent [@agent…] "instruction" (Secretary only)',
575
- " uai crew list (Astronaut only: personas, engines, models, limits, roster)",
598
+ " uai crew list (Astronaut only: personas with summary, skills and permissions, engines, models, limits, roster)",
576
599
  " uai crew status (Astronaut only: each agent's engine, model, account; account usage; credits)",
600
+ " uai crew store (Astronaut only: the Store's persona and skill templates, names and types only)",
601
+ ' uai crew suggest --template <slug> --why "<reason>" (Astronaut only: propose a persona from the Store; a person creates it)',
602
+ ' uai crew suggest --name <n> --brief <text> [--role <r>] [--summary <s>] [--handle <h>] [--engine <kind>] [--model <m>] [--effort <e>] [--skill <slug|id>]... --why "<reason>"',
577
603
  ' uai crew add <personaId> [--as <handle>] [--engine <kind>] [--model <m>] [--effort <e>] [--account <id|label|default>] --why "<reason>"',
578
604
  ' uai crew model @agent [--engine <kind>] [--model <m|default>] [--effort <e|default>] [--account <id|label|default>] --why "<reason>"',
579
605
  ' uai crew remove @agent --why "<reason>"',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@runuai/host",
3
- "version": "0.9.165",
3
+ "version": "0.9.166",
4
4
  "description": "Uai host — runs ephemeral AI tasks in containers on a machine you control.",
5
5
  "license": "MIT",
6
6
  "author": "Uai Tech <team@runuai.com>",