@ordewell/cli 0.6.4 → 0.7.0
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/main.js +45 -11
- package/package.json +3 -3
package/dist/main.js
CHANGED
|
@@ -139,7 +139,7 @@ Planner, models and runners:
|
|
|
139
139
|
ordewell key [set <p> <key>] Show which providers have a key, or store one
|
|
140
140
|
ordewell runners [<id> on|off] Enable or disable runners (claude-code, opencode, codex)
|
|
141
141
|
ordewell allowlist set|clear|show Limit which models a runner may use
|
|
142
|
-
ordewell auto [full|
|
|
142
|
+
ordewell auto [full|guarded] Autonomy level for new sessions: Full or Guarded
|
|
143
143
|
ordewell transport [terminal|structured] Structured (default) or terminal task transport, from the next run
|
|
144
144
|
ordewell parallel [<n>] How many AI tasks run at once (default 3; applies to a live run)
|
|
145
145
|
ordewell refresh Re-discover runners and model catalogs
|
|
@@ -213,7 +213,7 @@ Environment:
|
|
|
213
213
|
ORDEWELL_PLANNER_EFFORT Thinking effort for a coding-agent planner
|
|
214
214
|
ORCHESTRATOR_MODEL Default: deepseek/deepseek-v4-flash
|
|
215
215
|
OPENROUTER_BASE_URL Default: https://openrouter.ai/api/v1
|
|
216
|
-
ORDEWELL_AUTONOMOUS_MODE true: Full
|
|
216
|
+
ORDEWELL_AUTONOMOUS_MODE true: Full, false: Guarded, for new sessions (see "ordewell auto")
|
|
217
217
|
ORDEWELL_PORT Daemon port CLI commands target (default: 3742)
|
|
218
218
|
ORDEWELL_DIRENV false: agents skip the project's direnv .envrc
|
|
219
219
|
ORDEWELL_RESEARCH_ENABLED true (default) or false
|
|
@@ -3305,7 +3305,7 @@ async function handleRunners(subArgs, injectedApi) {
|
|
|
3305
3305
|
await api.setRunnerEnabled(runner, enabled);
|
|
3306
3306
|
console.log(`${runner} ${enabled ? "enabled" : "disabled"}.`);
|
|
3307
3307
|
}
|
|
3308
|
-
var AUTO_USAGE = "Usage: ordewell auto [full|
|
|
3308
|
+
var AUTO_USAGE = "Usage: ordewell auto [full|guarded]";
|
|
3309
3309
|
function handleAuto(subArgs) {
|
|
3310
3310
|
const [arg] = positionals(subArgs);
|
|
3311
3311
|
const currentRaw = process.env.ORDEWELL_AUTONOMOUS_MODE;
|
|
@@ -3855,7 +3855,7 @@ var SLASH_COMMANDS = [
|
|
|
3855
3855
|
{ name: "key", usage: "/key [set <provider> <key>]", description: "Configure API provider keys", category: "models" },
|
|
3856
3856
|
{ name: "allowlist", usage: "/allowlist [set <runner> <ids> | clear <runner>]", description: "Limit which models a runner may use", category: "models" },
|
|
3857
3857
|
{ name: "runners", usage: "/runners [<id> on|off]", description: "Enable or disable runners (claude-code, opencode, codex)", category: "models" },
|
|
3858
|
-
{ name: "auto", usage: "/auto [full|
|
|
3858
|
+
{ name: "auto", usage: "/auto [full|guarded]", description: "Autonomy level for new plans: Full or Guarded", category: "models" },
|
|
3859
3859
|
{ name: "transport", usage: "/transport [terminal|structured]", description: "Drive tasks through each runner's protocol (structured) or a terminal, from the next run", category: "models" },
|
|
3860
3860
|
{ name: "parallel", usage: "/parallel [<n>]", description: "How many AI tasks run at once (applies to a live run)", category: "models" },
|
|
3861
3861
|
{ name: "refresh", usage: "/refresh", description: "Re-discover runners and model catalogs", category: "models" },
|
|
@@ -4119,6 +4119,17 @@ function commandMark(block) {
|
|
|
4119
4119
|
if (block.status === "pending") return style.grey("\u25CB");
|
|
4120
4120
|
return (unsettledOutcome(block)?.paint ?? style.green)("\u25CF");
|
|
4121
4121
|
}
|
|
4122
|
+
var PATH_LIKE = /^(?![a-z][a-z0-9+.-]*:\/\/)\S*\/\S*$/i;
|
|
4123
|
+
function truncatePath(path, max) {
|
|
4124
|
+
if (width(path) <= max) return path;
|
|
4125
|
+
let tail = "";
|
|
4126
|
+
for (const char of Array.from(path).reverse()) {
|
|
4127
|
+
if (width(char + tail) > max - 1) break;
|
|
4128
|
+
tail = char + tail;
|
|
4129
|
+
}
|
|
4130
|
+
const slash = tail.indexOf("/");
|
|
4131
|
+
return `\u2026${slash > 0 ? tail.slice(slash) : tail}`;
|
|
4132
|
+
}
|
|
4122
4133
|
function commandHeader(block, cols, detailAll) {
|
|
4123
4134
|
const name = sanitize(block.headline.name);
|
|
4124
4135
|
const keyArg = sanitize(block.headline.keyArg);
|
|
@@ -4127,7 +4138,8 @@ function commandHeader(block, cols, detailAll) {
|
|
|
4127
4138
|
}
|
|
4128
4139
|
const open = `\u25CF ${name}(`;
|
|
4129
4140
|
const room = cols - width(open) - 1;
|
|
4130
|
-
const
|
|
4141
|
+
const cut = PATH_LIKE.test(keyArg) ? truncatePath(keyArg, room) : truncate(keyArg, room);
|
|
4142
|
+
const text = room > 1 ? `${open}${cut})` : truncate(`${open}${keyArg})`, cols);
|
|
4131
4143
|
return [`${commandMark(block)}${text.slice(1)}`];
|
|
4132
4144
|
}
|
|
4133
4145
|
function argumentLines(args) {
|
|
@@ -4163,10 +4175,32 @@ function resultLines(block, room, detailAll) {
|
|
|
4163
4175
|
const more = hiddenLineCount > 0 ? [`\u2026 +${countOf(hiddenLineCount, "line")} (ctrl+o to expand)`] : [];
|
|
4164
4176
|
return [...lines.map(sanitize), ...more].map((line) => style.grey(truncate(line, room)));
|
|
4165
4177
|
}
|
|
4178
|
+
var DIFF_PREVIEW_ROWS = 10;
|
|
4179
|
+
var DIFF_PAINT = {
|
|
4180
|
+
added: style.green,
|
|
4181
|
+
removed: style.red,
|
|
4182
|
+
context: style.grey,
|
|
4183
|
+
gap: style.grey
|
|
4184
|
+
};
|
|
4185
|
+
var DIFF_SIGN = { added: "+", removed: "-", context: " ", gap: "" };
|
|
4186
|
+
function diffLines(block, diff, room, detailAll) {
|
|
4187
|
+
const rows = (0, import_core21.diffRows)(block.output);
|
|
4188
|
+
const gutter = Math.max(0, ...rows.map((row) => String(row.line ?? "").length));
|
|
4189
|
+
const draw = (row) => {
|
|
4190
|
+
const text = row.kind === "gap" ? `${" ".repeat(gutter)} \u22EE` : `${String(row.line ?? "").padStart(gutter)} ${DIFF_SIGN[row.kind]} ${sanitize(row.text)}`;
|
|
4191
|
+
return (detailAll ? wrap(text, room) : [truncate(text, room)]).map(DIFF_PAINT[row.kind]);
|
|
4192
|
+
};
|
|
4193
|
+
const shown = detailAll ? rows : rows.slice(0, DIFF_PREVIEW_ROWS);
|
|
4194
|
+
const hidden = rows.length - shown.length;
|
|
4195
|
+
const more = hidden > 0 ? [style.grey(`\u2026 +${countOf(hidden, "line")} (ctrl+o to expand)`)] : [];
|
|
4196
|
+
return [(0, import_core21.diffSummary)(diff), ...shown.flatMap(draw), ...more];
|
|
4197
|
+
}
|
|
4166
4198
|
function toolLines(block, cols, detailAll) {
|
|
4167
4199
|
const room = Math.max(1, cols - OUTPUT_INDENT.length);
|
|
4168
|
-
const
|
|
4169
|
-
|
|
4200
|
+
const diff = block.diff && block.status === "ok" ? block.diff : null;
|
|
4201
|
+
const args = detailAll && !diff ? argumentLines(block.args).flatMap((line) => wrap(line, room)).map((line) => OUTPUT_INDENT + style.grey(line)) : [];
|
|
4202
|
+
const result = diff ? diffLines(block, diff, room, detailAll) : resultLines(block, room, detailAll);
|
|
4203
|
+
return [...commandHeader(block, cols, detailAll), ...args, ...underHeader(result)];
|
|
4170
4204
|
}
|
|
4171
4205
|
var SUBAGENT_PAINT = {
|
|
4172
4206
|
running: style.yellow,
|
|
@@ -4821,7 +4855,7 @@ function taskLines(state, row, index, cols) {
|
|
|
4821
4855
|
lines.push(...taskText("Forced", `Started before the work of ${task.forcedPastGate.join(", ")} was merged into your branch.`, cols, bodyPad));
|
|
4822
4856
|
}
|
|
4823
4857
|
if (modeInfo?.autonomous) {
|
|
4824
|
-
lines.push(...taskText("Autonomy", "Runs without permission prompts (Full
|
|
4858
|
+
lines.push(...taskText("Autonomy", "Runs without permission prompts (Full). Change the level with /auto.", cols, bodyPad));
|
|
4825
4859
|
}
|
|
4826
4860
|
const editableSeed = task.prompt ?? task.description ?? task.title;
|
|
4827
4861
|
if (task.description && task.description !== task.title && task.description !== editableSeed) {
|
|
@@ -4990,7 +5024,7 @@ function renderSkills(state, cols) {
|
|
|
4990
5024
|
const badges = SKILL_IDS.map(
|
|
4991
5025
|
(id) => state.skills[id] ? style.green(`\u25CF ${id}`) : style.grey(`\u25CB ${id}`)
|
|
4992
5026
|
);
|
|
4993
|
-
const auto = state.autonomous ? style.yellow("\u25CF Full
|
|
5027
|
+
const auto = state.autonomous ? style.yellow("\u25CF Full") : style.green("\u25CF Guarded");
|
|
4994
5028
|
const terminal = state.runnerTransport === "terminal" ? [style.yellow("\u25CF terminal")] : [];
|
|
4995
5029
|
return truncate([...badges, auto, ...terminal].join(" "), cols);
|
|
4996
5030
|
}
|
|
@@ -6404,9 +6438,9 @@ function setMaxParallel(state, arg) {
|
|
|
6404
6438
|
return step({ ...state, maxParallel: limit }, [{ type: "setMaxParallel", limit }]);
|
|
6405
6439
|
}
|
|
6406
6440
|
function setAutonomous(state, arg) {
|
|
6407
|
-
if (arg === void 0) return step(say(state, "system", `Autonomy level: ${(0, import_core28.autonomyLevelLabel)(state.autonomous)} \u2014 /auto full or /auto
|
|
6441
|
+
if (arg === void 0) return step(say(state, "system", `Autonomy level: ${(0, import_core28.autonomyLevelLabel)(state.autonomous)} \u2014 /auto full or /auto guarded changes it for new plans.`));
|
|
6408
6442
|
const enabled = (0, import_core28.parseAutonomyLevel)(arg);
|
|
6409
|
-
if (enabled === null) return fail3(state, "Usage: /auto [full|
|
|
6443
|
+
if (enabled === null) return fail3(state, "Usage: /auto [full|guarded]");
|
|
6410
6444
|
return step({ ...state, autonomous: enabled }, [{ type: "setAutonomous", enabled }]);
|
|
6411
6445
|
}
|
|
6412
6446
|
function setTransport(state, arg) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ordewell/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"description": "Ordewell CLI and TUI — plan, run and verify coding-agent tasks from the terminal.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "Alessandro Costanzo Ciano",
|
|
@@ -49,8 +49,8 @@
|
|
|
49
49
|
"typecheck": "tsc --noEmit"
|
|
50
50
|
},
|
|
51
51
|
"dependencies": {
|
|
52
|
-
"@ordewell/core": "^0.
|
|
53
|
-
"@ordewell/web": "^0.
|
|
52
|
+
"@ordewell/core": "^0.7.0",
|
|
53
|
+
"@ordewell/web": "^0.7.0",
|
|
54
54
|
"string-width": "^7.2.0",
|
|
55
55
|
"ws": "^8.18.0"
|
|
56
56
|
},
|