@runuai/host 0.4.1 → 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 +8 -0
- package/lib/orchestrator.ts +3 -1
- package/package.json +1 -1
- package/src/main.ts +5 -0
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);
|
package/lib/orchestrator.ts
CHANGED
|
@@ -923,7 +923,9 @@ export function buildSystemPreamble(
|
|
|
923
923
|
`Your memory handle is \`${agent.id}\` — pass \`--as ${agent.id}\` so`,
|
|
924
924
|
"memories are attributed to you. Recall relevant past work with",
|
|
925
925
|
"`memory search` before you start; save durable learnings with",
|
|
926
|
-
"`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).",
|
|
927
929
|
]
|
|
928
930
|
: []),
|
|
929
931
|
"",
|
package/package.json
CHANGED
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
|
}
|