@locusai/cli 0.11.4 → 0.11.6
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/bin/agent/worker.js +16 -7
- package/bin/locus.js +31 -9
- package/package.json +2 -2
package/bin/agent/worker.js
CHANGED
|
@@ -15409,14 +15409,16 @@ class CodexRunner {
|
|
|
15409
15409
|
projectPath;
|
|
15410
15410
|
model;
|
|
15411
15411
|
log;
|
|
15412
|
+
reasoningEffort;
|
|
15412
15413
|
activeProcess = null;
|
|
15413
15414
|
eventEmitter;
|
|
15414
15415
|
currentToolName;
|
|
15415
15416
|
timeoutMs;
|
|
15416
|
-
constructor(projectPath, model = DEFAULT_MODEL[PROVIDER.CODEX], log, timeoutMs) {
|
|
15417
|
+
constructor(projectPath, model = DEFAULT_MODEL[PROVIDER.CODEX], log, timeoutMs, reasoningEffort) {
|
|
15417
15418
|
this.projectPath = projectPath;
|
|
15418
15419
|
this.model = model;
|
|
15419
15420
|
this.log = log;
|
|
15421
|
+
this.reasoningEffort = reasoningEffort;
|
|
15420
15422
|
this.timeoutMs = timeoutMs ?? DEFAULT_TIMEOUT_MS2;
|
|
15421
15423
|
}
|
|
15422
15424
|
setEventEmitter(emitter) {
|
|
@@ -15681,6 +15683,9 @@ class CodexRunner {
|
|
|
15681
15683
|
if (this.model) {
|
|
15682
15684
|
args.push("--model", this.model);
|
|
15683
15685
|
}
|
|
15686
|
+
if (this.reasoningEffort) {
|
|
15687
|
+
args.push("-c", `model_reasoning_effort=${this.reasoningEffort}`);
|
|
15688
|
+
}
|
|
15684
15689
|
args.push("-");
|
|
15685
15690
|
return args;
|
|
15686
15691
|
}
|
|
@@ -15735,7 +15740,7 @@ function createAiRunner(provider, config2) {
|
|
|
15735
15740
|
const model = config2.model ?? DEFAULT_MODEL[resolvedProvider];
|
|
15736
15741
|
switch (resolvedProvider) {
|
|
15737
15742
|
case PROVIDER.CODEX:
|
|
15738
|
-
return new CodexRunner(config2.projectPath, model, config2.log, config2.timeoutMs);
|
|
15743
|
+
return new CodexRunner(config2.projectPath, model, config2.log, config2.timeoutMs, config2.reasoningEffort ?? "high");
|
|
15739
15744
|
default:
|
|
15740
15745
|
return new ClaudeRunner(config2.projectPath, model, config2.log, config2.timeoutMs);
|
|
15741
15746
|
}
|
|
@@ -31405,9 +31410,11 @@ class GitWorkflow {
|
|
|
31405
31410
|
this.branchName = `locus/${suffix}`;
|
|
31406
31411
|
try {
|
|
31407
31412
|
this.gitExec(["checkout", this.branchName]);
|
|
31408
|
-
} catch {
|
|
31409
|
-
|
|
31410
|
-
|
|
31413
|
+
} catch {
|
|
31414
|
+
this.log(`Branch ${this.branchName} does not exist, creating it`, "info");
|
|
31415
|
+
this.gitExec(["checkout", "-b", this.branchName]);
|
|
31416
|
+
this.log(`Created branch: ${this.branchName} (from ${defaultBranch})`, "success");
|
|
31417
|
+
}
|
|
31411
31418
|
return this.branchName;
|
|
31412
31419
|
}
|
|
31413
31420
|
commitAndPush(task2) {
|
|
@@ -31997,7 +32004,8 @@ function parseWorkerArgs(argv) {
|
|
|
31997
32004
|
if (value && !value.startsWith("--"))
|
|
31998
32005
|
i++;
|
|
31999
32006
|
config2.provider = resolveProvider(value);
|
|
32000
|
-
}
|
|
32007
|
+
} else if (arg === "--reasoning-effort")
|
|
32008
|
+
config2.reasoningEffort = args[++i];
|
|
32001
32009
|
}
|
|
32002
32010
|
if (!config2.agentId || !config2.workspaceId || !config2.apiBase || !config2.apiKey || !config2.projectPath) {
|
|
32003
32011
|
console.error("Missing required arguments");
|
|
@@ -32059,7 +32067,8 @@ class AgentWorker {
|
|
|
32059
32067
|
this.aiRunner = createAiRunner(provider, {
|
|
32060
32068
|
projectPath,
|
|
32061
32069
|
model: config2.model,
|
|
32062
|
-
log
|
|
32070
|
+
log,
|
|
32071
|
+
reasoningEffort: config2.reasoningEffort
|
|
32063
32072
|
});
|
|
32064
32073
|
this.taskExecutor = new TaskExecutor({
|
|
32065
32074
|
aiRunner: this.aiRunner,
|
package/bin/locus.js
CHANGED
|
@@ -6603,9 +6603,11 @@ class GitWorkflow {
|
|
|
6603
6603
|
this.branchName = `locus/${suffix}`;
|
|
6604
6604
|
try {
|
|
6605
6605
|
this.gitExec(["checkout", this.branchName]);
|
|
6606
|
-
} catch {
|
|
6607
|
-
|
|
6608
|
-
|
|
6606
|
+
} catch {
|
|
6607
|
+
this.log(`Branch ${this.branchName} does not exist, creating it`, "info");
|
|
6608
|
+
this.gitExec(["checkout", "-b", this.branchName]);
|
|
6609
|
+
this.log(`Created branch: ${this.branchName} (from ${defaultBranch})`, "success");
|
|
6610
|
+
}
|
|
6609
6611
|
return this.branchName;
|
|
6610
6612
|
}
|
|
6611
6613
|
commitAndPush(task) {
|
|
@@ -7505,14 +7507,16 @@ class CodexRunner {
|
|
|
7505
7507
|
projectPath;
|
|
7506
7508
|
model;
|
|
7507
7509
|
log;
|
|
7510
|
+
reasoningEffort;
|
|
7508
7511
|
activeProcess = null;
|
|
7509
7512
|
eventEmitter;
|
|
7510
7513
|
currentToolName;
|
|
7511
7514
|
timeoutMs;
|
|
7512
|
-
constructor(projectPath, model = DEFAULT_MODEL[PROVIDER.CODEX], log, timeoutMs) {
|
|
7515
|
+
constructor(projectPath, model = DEFAULT_MODEL[PROVIDER.CODEX], log, timeoutMs, reasoningEffort) {
|
|
7513
7516
|
this.projectPath = projectPath;
|
|
7514
7517
|
this.model = model;
|
|
7515
7518
|
this.log = log;
|
|
7519
|
+
this.reasoningEffort = reasoningEffort;
|
|
7516
7520
|
this.timeoutMs = timeoutMs ?? DEFAULT_TIMEOUT_MS2;
|
|
7517
7521
|
}
|
|
7518
7522
|
setEventEmitter(emitter) {
|
|
@@ -7777,6 +7781,9 @@ class CodexRunner {
|
|
|
7777
7781
|
if (this.model) {
|
|
7778
7782
|
args.push("--model", this.model);
|
|
7779
7783
|
}
|
|
7784
|
+
if (this.reasoningEffort) {
|
|
7785
|
+
args.push("-c", `model_reasoning_effort=${this.reasoningEffort}`);
|
|
7786
|
+
}
|
|
7780
7787
|
args.push("-");
|
|
7781
7788
|
return args;
|
|
7782
7789
|
}
|
|
@@ -7831,7 +7838,7 @@ function createAiRunner(provider, config) {
|
|
|
7831
7838
|
const model = config.model ?? DEFAULT_MODEL[resolvedProvider];
|
|
7832
7839
|
switch (resolvedProvider) {
|
|
7833
7840
|
case PROVIDER.CODEX:
|
|
7834
|
-
return new CodexRunner(config.projectPath, model, config.log, config.timeoutMs);
|
|
7841
|
+
return new CodexRunner(config.projectPath, model, config.log, config.timeoutMs, config.reasoningEffort ?? "high");
|
|
7835
7842
|
default:
|
|
7836
7843
|
return new ClaudeRunner(config.projectPath, model, config.log, config.timeoutMs);
|
|
7837
7844
|
}
|
|
@@ -38930,7 +38937,8 @@ function parseWorkerArgs(argv) {
|
|
|
38930
38937
|
if (value && !value.startsWith("--"))
|
|
38931
38938
|
i++;
|
|
38932
38939
|
config2.provider = resolveProvider2(value);
|
|
38933
|
-
}
|
|
38940
|
+
} else if (arg === "--reasoning-effort")
|
|
38941
|
+
config2.reasoningEffort = args[++i];
|
|
38934
38942
|
}
|
|
38935
38943
|
if (!config2.agentId || !config2.workspaceId || !config2.apiBase || !config2.apiKey || !config2.projectPath) {
|
|
38936
38944
|
console.error("Missing required arguments");
|
|
@@ -38992,7 +39000,8 @@ class AgentWorker {
|
|
|
38992
39000
|
this.aiRunner = createAiRunner(provider, {
|
|
38993
39001
|
projectPath,
|
|
38994
39002
|
model: config2.model,
|
|
38995
|
-
log
|
|
39003
|
+
log,
|
|
39004
|
+
reasoningEffort: config2.reasoningEffort
|
|
38996
39005
|
});
|
|
38997
39006
|
this.taskExecutor = new TaskExecutor({
|
|
38998
39007
|
aiRunner: this.aiRunner,
|
|
@@ -40327,6 +40336,9 @@ ${c.primary("\uD83E\uDD16 Locus Agent Orchestrator")}`);
|
|
|
40327
40336
|
if (this.config.provider) {
|
|
40328
40337
|
args.push("--provider", this.config.provider);
|
|
40329
40338
|
}
|
|
40339
|
+
if (this.config.reasoningEffort) {
|
|
40340
|
+
args.push("--reasoning-effort", this.config.reasoningEffort);
|
|
40341
|
+
}
|
|
40330
40342
|
if (this.resolvedSprintId) {
|
|
40331
40343
|
args.push("--sprint-id", this.resolvedSprintId);
|
|
40332
40344
|
}
|
|
@@ -43189,6 +43201,7 @@ async function execCommand(args) {
|
|
|
43189
43201
|
options: {
|
|
43190
43202
|
model: { type: "string" },
|
|
43191
43203
|
provider: { type: "string" },
|
|
43204
|
+
"reasoning-effort": { type: "string" },
|
|
43192
43205
|
dir: { type: "string" },
|
|
43193
43206
|
"no-stream": { type: "boolean" },
|
|
43194
43207
|
"no-status": { type: "boolean" },
|
|
@@ -43243,9 +43256,11 @@ async function execCommand(args) {
|
|
|
43243
43256
|
process.exit(1);
|
|
43244
43257
|
}
|
|
43245
43258
|
const useStreaming = !values["no-stream"];
|
|
43259
|
+
const reasoningEffort = values["reasoning-effort"];
|
|
43246
43260
|
const aiRunner = createAiRunner(provider, {
|
|
43247
43261
|
projectPath,
|
|
43248
|
-
model
|
|
43262
|
+
model,
|
|
43263
|
+
reasoningEffort
|
|
43249
43264
|
});
|
|
43250
43265
|
const builder = new PromptBuilder(projectPath);
|
|
43251
43266
|
const fullPrompt = await builder.buildGenericPrompt(promptInput);
|
|
@@ -43362,6 +43377,7 @@ function showHelp2() {
|
|
|
43362
43377
|
${c.header(" OPTIONS ")}
|
|
43363
43378
|
${c.secondary("--help")} Show this help message
|
|
43364
43379
|
${c.secondary("--provider")} <name> AI provider: ${c.dim("claude")} or ${c.dim("codex")} (default: ${c.dim("claude")})
|
|
43380
|
+
${c.secondary("--reasoning-effort")} <level> Codex reasoning effort: ${c.dim("low, medium, high")} (default: model default)
|
|
43365
43381
|
|
|
43366
43382
|
${c.header(" GETTING STARTED ")}
|
|
43367
43383
|
${c.dim("$")} ${c.primary("locus init")}
|
|
@@ -43544,6 +43560,7 @@ async function planCommand(args) {
|
|
|
43544
43560
|
show: { type: "string" },
|
|
43545
43561
|
model: { type: "string" },
|
|
43546
43562
|
provider: { type: "string" },
|
|
43563
|
+
"reasoning-effort": { type: "string" },
|
|
43547
43564
|
"api-key": { type: "string" },
|
|
43548
43565
|
"api-url": { type: "string" },
|
|
43549
43566
|
workspace: { type: "string" },
|
|
@@ -43588,9 +43605,11 @@ async function planCommand(args) {
|
|
|
43588
43605
|
const planSettings = new SettingsManager(projectPath).load();
|
|
43589
43606
|
const provider = resolveProvider3(values.provider || planSettings.provider);
|
|
43590
43607
|
const model = values.model || planSettings.model || DEFAULT_MODEL[provider];
|
|
43608
|
+
const reasoningEffort = values["reasoning-effort"];
|
|
43591
43609
|
const aiRunner = createAiRunner(provider, {
|
|
43592
43610
|
projectPath,
|
|
43593
|
-
model
|
|
43611
|
+
model,
|
|
43612
|
+
reasoningEffort
|
|
43594
43613
|
});
|
|
43595
43614
|
const log = (message, level) => {
|
|
43596
43615
|
const icon = level === "success" ? c.success("✔") : level === "error" ? c.error("✖") : level === "warn" ? c.warning("!") : c.info("●");
|
|
@@ -43975,6 +43994,7 @@ async function runCommand(args) {
|
|
|
43975
43994
|
sprint: { type: "string" },
|
|
43976
43995
|
model: { type: "string" },
|
|
43977
43996
|
provider: { type: "string" },
|
|
43997
|
+
"reasoning-effort": { type: "string" },
|
|
43978
43998
|
"skip-planning": { type: "boolean" },
|
|
43979
43999
|
"api-url": { type: "string" },
|
|
43980
44000
|
dir: { type: "string" }
|
|
@@ -44009,11 +44029,13 @@ async function runCommand(args) {
|
|
|
44009
44029
|
console.error(c.error(error48 instanceof Error ? error48.message : String(error48)));
|
|
44010
44030
|
process.exit(1);
|
|
44011
44031
|
}
|
|
44032
|
+
const reasoningEffort = values["reasoning-effort"];
|
|
44012
44033
|
const orchestrator = new AgentOrchestrator({
|
|
44013
44034
|
workspaceId,
|
|
44014
44035
|
sprintId: values.sprint || "",
|
|
44015
44036
|
model,
|
|
44016
44037
|
provider,
|
|
44038
|
+
reasoningEffort,
|
|
44017
44039
|
apiBase,
|
|
44018
44040
|
maxIterations: 100,
|
|
44019
44041
|
projectPath,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@locusai/cli",
|
|
3
|
-
"version": "0.11.
|
|
3
|
+
"version": "0.11.6",
|
|
4
4
|
"description": "CLI for Locus - AI-native project management platform",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"author": "",
|
|
34
34
|
"license": "MIT",
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@locusai/sdk": "^0.11.
|
|
36
|
+
"@locusai/sdk": "^0.11.6"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {}
|
|
39
39
|
}
|