Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions bin/moshcode.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,8 @@ function handledHelp(cmd, rest) {
// `moshcode <command> [verb] --help`, at any depth.
const command = findCommand(cmd);
if (!command) return false;
// `agents c0mpute --help` is the c0mpute agent's own usage, not this table's.
if ((command.name === "agents" || command.name === "start") && isC0mputeAgent(rest[0])) return false;
// `run` claims --help only before the script filename.
if (!wantsHelp(rest, { stopAt: command.name === "run" })) return false;

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "moshcode",
"version": "0.121.0",
"version": "0.121.1",
"type": "module",
"description": "moshcode — a metal wrapper for coding engines and native UGig/CoinPay workflow CLIs, with OpenPRD and moshscript",
"repository": {
Expand Down
3 changes: 2 additions & 1 deletion src/c0agent-repl.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ export function parseArgs(argv) {
else if (a === "--permission-mode") opts.mode = argv[++i];
else if (a === "-C" || a === "--cwd") opts.cwd = argv[++i];
else if (a === "-y" || a === "--yes" || a === "--dangerously-skip-permissions") opts.mode = "yolo";
else if (i === 0 && (a === "agents" || a === "agent")) { opts.manage = argv.slice(1); break; }
// `agents …` as the first word (after any flags) manages definitions; later it's prompt text.
else if (!opts.words.length && opts.print == null && (a === "agents" || a === "agent")) { opts.manage = argv.slice(i + 1); break; }
else opts.words.push(a);
}
if (opts.print === "" && opts.words.length) opts.print = opts.words.join(" ");
Expand Down
2 changes: 2 additions & 0 deletions test/c0agent.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -295,5 +295,7 @@ test("routing: the names that mean the c0mpute agent, and CLI flags", () => {
assert.equal(parseArgs(["-p", "-m", "qwen3:4b"]).model, "qwen3:4b");
assert.equal(parseArgs(["--dangerously-skip-permissions"]).mode, "yolo");
assert.deepEqual(parseArgs(["agents", "show", "plan"]).manage, ["show", "plan"]);
assert.deepEqual(parseArgs(["-C", "/x", "agents", "list"]).manage, ["list"]);
assert.equal(parseArgs(["fix", "the", "agents"]).manage, null);
assert.equal(describeCall({ name: "task", input: { agent: "explore", prompt: "find x" } }), "Task(explore: find x)");
});
Loading