@hasna/todos 0.10.21 → 0.10.22
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/dist/cli/index.js +57 -0
- package/dist/mcp/index.js +27 -0
- package/package.json +1 -1
package/dist/cli/index.js
CHANGED
|
@@ -12652,6 +12652,33 @@ ID: ${updated.id}`
|
|
|
12652
12652
|
}
|
|
12653
12653
|
});
|
|
12654
12654
|
}
|
|
12655
|
+
if (shouldRegisterTool("update_agent")) {
|
|
12656
|
+
server.tool("update_agent", "Update an agent's description, role, title, or other metadata. Resolve by id or name.", {
|
|
12657
|
+
id: exports_external.string().optional(),
|
|
12658
|
+
name: exports_external.string().optional(),
|
|
12659
|
+
description: exports_external.string().optional(),
|
|
12660
|
+
role: exports_external.string().optional(),
|
|
12661
|
+
title: exports_external.string().optional(),
|
|
12662
|
+
level: exports_external.string().optional(),
|
|
12663
|
+
capabilities: exports_external.array(exports_external.string()).optional(),
|
|
12664
|
+
permissions: exports_external.array(exports_external.string()).optional(),
|
|
12665
|
+
metadata: exports_external.record(exports_external.unknown()).optional()
|
|
12666
|
+
}, async ({ id, name, ...updates }) => {
|
|
12667
|
+
try {
|
|
12668
|
+
if (!id && !name) {
|
|
12669
|
+
return { content: [{ type: "text", text: "Provide either id or name." }], isError: true };
|
|
12670
|
+
}
|
|
12671
|
+
const agent = id ? getAgent(id) : getAgentByName(name);
|
|
12672
|
+
if (!agent) {
|
|
12673
|
+
return { content: [{ type: "text", text: `Agent not found: ${id || name}` }], isError: true };
|
|
12674
|
+
}
|
|
12675
|
+
const updated = updateAgent(agent.id, updates);
|
|
12676
|
+
return { content: [{ type: "text", text: `Agent updated: ${updated.name} (${updated.id.slice(0, 8)})` }] };
|
|
12677
|
+
} catch (e) {
|
|
12678
|
+
return { content: [{ type: "text", text: formatError(e) }], isError: true };
|
|
12679
|
+
}
|
|
12680
|
+
});
|
|
12681
|
+
}
|
|
12655
12682
|
if (shouldRegisterTool("delete_agent")) {
|
|
12656
12683
|
server.tool("delete_agent", "Archive an agent (soft delete). The agent is hidden from list_agents but preserved for task history. Use unarchive_agent to restore. Resolve by id or name.", {
|
|
12657
12684
|
id: exports_external.string().optional(),
|
|
@@ -19236,6 +19263,36 @@ program2.command("agents").description("List registered agents").action(() => {
|
|
|
19236
19263
|
handleError(e);
|
|
19237
19264
|
}
|
|
19238
19265
|
});
|
|
19266
|
+
program2.command("agent-update <name>").alias("agents-update").description("Update an agent's description, role, or other fields").option("--description <text>", "New description").option("--role <role>", "New role").option("--title <title>", "New title").action((name, opts) => {
|
|
19267
|
+
const globalOpts = program2.opts();
|
|
19268
|
+
try {
|
|
19269
|
+
const { getAgentByName: findByName, updateAgent: doUpdate } = (init_agents(), __toCommonJS(exports_agents));
|
|
19270
|
+
const agent = findByName(name);
|
|
19271
|
+
if (!agent) {
|
|
19272
|
+
console.error(chalk.red(`Agent not found: ${name}`));
|
|
19273
|
+
process.exit(1);
|
|
19274
|
+
}
|
|
19275
|
+
const updates = {};
|
|
19276
|
+
if (opts.description !== undefined)
|
|
19277
|
+
updates.description = opts.description;
|
|
19278
|
+
if (opts.role !== undefined)
|
|
19279
|
+
updates.role = opts.role;
|
|
19280
|
+
if (opts.title !== undefined)
|
|
19281
|
+
updates.title = opts.title;
|
|
19282
|
+
const updated = doUpdate(agent.id, updates);
|
|
19283
|
+
if (globalOpts.json) {
|
|
19284
|
+
output(updated, true);
|
|
19285
|
+
} else {
|
|
19286
|
+
console.log(chalk.green(`Updated agent: ${updated.name} (${updated.id.slice(0, 8)})`));
|
|
19287
|
+
if (updated.description)
|
|
19288
|
+
console.log(chalk.dim(` Description: ${updated.description}`));
|
|
19289
|
+
if (updated.role)
|
|
19290
|
+
console.log(chalk.dim(` Role: ${updated.role}`));
|
|
19291
|
+
}
|
|
19292
|
+
} catch (e) {
|
|
19293
|
+
handleError(e);
|
|
19294
|
+
}
|
|
19295
|
+
});
|
|
19239
19296
|
program2.command("agent <name>").description("Show all info about an agent: tasks, status, last seen, stats").option("--json", "Output as JSON").action((name, opts) => {
|
|
19240
19297
|
const globalOpts = program2.opts();
|
|
19241
19298
|
const { getAgentByName: findByName } = (init_agents(), __toCommonJS(exports_agents));
|
package/dist/mcp/index.js
CHANGED
|
@@ -10464,6 +10464,33 @@ ID: ${updated.id}`
|
|
|
10464
10464
|
}
|
|
10465
10465
|
});
|
|
10466
10466
|
}
|
|
10467
|
+
if (shouldRegisterTool("update_agent")) {
|
|
10468
|
+
server.tool("update_agent", "Update an agent's description, role, title, or other metadata. Resolve by id or name.", {
|
|
10469
|
+
id: exports_external.string().optional(),
|
|
10470
|
+
name: exports_external.string().optional(),
|
|
10471
|
+
description: exports_external.string().optional(),
|
|
10472
|
+
role: exports_external.string().optional(),
|
|
10473
|
+
title: exports_external.string().optional(),
|
|
10474
|
+
level: exports_external.string().optional(),
|
|
10475
|
+
capabilities: exports_external.array(exports_external.string()).optional(),
|
|
10476
|
+
permissions: exports_external.array(exports_external.string()).optional(),
|
|
10477
|
+
metadata: exports_external.record(exports_external.unknown()).optional()
|
|
10478
|
+
}, async ({ id, name, ...updates }) => {
|
|
10479
|
+
try {
|
|
10480
|
+
if (!id && !name) {
|
|
10481
|
+
return { content: [{ type: "text", text: "Provide either id or name." }], isError: true };
|
|
10482
|
+
}
|
|
10483
|
+
const agent = id ? getAgent(id) : getAgentByName(name);
|
|
10484
|
+
if (!agent) {
|
|
10485
|
+
return { content: [{ type: "text", text: `Agent not found: ${id || name}` }], isError: true };
|
|
10486
|
+
}
|
|
10487
|
+
const updated = updateAgent(agent.id, updates);
|
|
10488
|
+
return { content: [{ type: "text", text: `Agent updated: ${updated.name} (${updated.id.slice(0, 8)})` }] };
|
|
10489
|
+
} catch (e) {
|
|
10490
|
+
return { content: [{ type: "text", text: formatError(e) }], isError: true };
|
|
10491
|
+
}
|
|
10492
|
+
});
|
|
10493
|
+
}
|
|
10467
10494
|
if (shouldRegisterTool("delete_agent")) {
|
|
10468
10495
|
server.tool("delete_agent", "Archive an agent (soft delete). The agent is hidden from list_agents but preserved for task history. Use unarchive_agent to restore. Resolve by id or name.", {
|
|
10469
10496
|
id: exports_external.string().optional(),
|