@runuai/host 0.4.0 → 0.4.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.
package/lib/agent-cli.ts CHANGED
@@ -193,6 +193,13 @@ async function main() {
193
193
  })).memory);
194
194
  break;
195
195
  }
196
+ case "memory delete": {
197
+ const id = pos[0] || flags.id;
198
+ if (!id) { console.error("uai: memory delete needs an id"); process.exit(1); }
199
+ await api("DELETE", "/api/agent/memory/" + encodeURIComponent(id));
200
+ out("deleted " + id);
201
+ break;
202
+ }
196
203
  case "task create": {
197
204
  out((await api("POST", "/api/agent/tasks", {
198
205
  name: flags.name,
@@ -214,6 +221,7 @@ async function main() {
214
221
  " uai task create --name <n> --prompt <p> [--projects id,id] [--team id] [--agents handle,handle]",
215
222
  " uai memory search <query>",
216
223
  " uai memory save <text> [--project id] [--tags a,b]",
224
+ " uai memory delete <id>",
217
225
  " uai whoami",
218
226
  ].join("\\n"));
219
227
  process.exit(argv.length ? 1 : 0);
@@ -907,8 +907,14 @@ export function buildSystemPreamble(
907
907
  ".",
908
908
  ...(agent.permissions?.includes("tasks.create")
909
909
  ? [
910
- "Tasks you create are DRAFTS a human reviews and starts them;",
911
- "nothing runs (or spends) until then.",
910
+ "**Creating a task in Uai:** when a human asks you to create/file/",
911
+ "queue a Uai task (or plan a backlog of them), you MUST run the",
912
+ `shell command \`node ${CONTAINER_CLI_PATH} task create …\`. Do NOT`,
913
+ "use your built-in TaskCreate / task tools for this — those are just",
914
+ "your own private to-do notes and are invisible to the human in Uai.",
915
+ "Uai tasks you create are DRAFTS — a human reviews and starts them;",
916
+ "nothing runs (or spends) until then. Discover options first with",
917
+ "`projects list` / `people list`.",
912
918
  ]
913
919
  : []),
914
920
  ...(agent.permissions?.includes("memory.read") ||
@@ -917,7 +923,9 @@ export function buildSystemPreamble(
917
923
  `Your memory handle is \`${agent.id}\` — pass \`--as ${agent.id}\` so`,
918
924
  "memories are attributed to you. Recall relevant past work with",
919
925
  "`memory search` before you start; save durable learnings with",
920
- "`memory save` when you finish something worth remembering.",
926
+ "`memory save` when you finish something worth remembering. To fix",
927
+ "or remove one of your own, `memory delete <id>` (there's no update",
928
+ "— delete + save a corrected one).",
921
929
  ]
922
930
  : []),
923
931
  "",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@runuai/host",
3
- "version": "0.4.0",
3
+ "version": "0.4.2",
4
4
  "description": "Uai host — runs ephemeral AI coding tasks in Docker on a machine you control.",
5
5
  "license": "MIT",
6
6
  "author": "Diogo Perillo <diogo.perillo@gmail.com>",
package/src/main.ts CHANGED
@@ -1247,6 +1247,11 @@ function expectTaskCommandTask(value: unknown): TaskCommandTask {
1247
1247
  status: expectStringValue(row.status, "task.status"),
1248
1248
  agents: expectTaskAgents(row.agents),
1249
1249
  };
1250
+ // ADR-048: the cloud-issued per-task cli secret — WITHOUT this the host can't
1251
+ // mint per-agent tokens and the in-container `uai` CLI has no auth.
1252
+ if (typeof row.cliSecret === "string") {
1253
+ out.cliSecret = row.cliSecret;
1254
+ }
1250
1255
  if (typeof row.globalContext === "string") {
1251
1256
  out.globalContext = row.globalContext;
1252
1257
  }