@commonlyai/cli 0.1.28 → 0.1.29
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/package.json +1 -1
- package/src/lib/adapters/claude.js +9 -1
- package/src/lib/environment.js +11 -1
package/package.json
CHANGED
|
@@ -488,7 +488,15 @@ export default {
|
|
|
488
488
|
// present in one but not the other means a retry silently runs a different
|
|
489
489
|
// model than the turn it is replacing — the same drifting-copy shape that
|
|
490
490
|
// has bitten this codebase repeatedly.
|
|
491
|
-
|
|
491
|
+
// `effort` rides in the same array for the same reason: Sam's 2026-09-01
|
|
492
|
+
// order ("flip all fable agents into fable 5.1 with high or above
|
|
493
|
+
// effort") needs both facts to reach every spawn, including the
|
|
494
|
+
// session-recovery retry, or a retry runs at a different effort than the
|
|
495
|
+
// turn it replaces.
|
|
496
|
+
const modelArgs = [
|
|
497
|
+
...(ctx.environment?.model ? ['--model', String(ctx.environment.model)] : []),
|
|
498
|
+
...(ctx.environment?.effort ? ['--effort', String(ctx.environment.effort)] : []),
|
|
499
|
+
];
|
|
492
500
|
const baseArgs = ['-p', fullPrompt, '--output-format', 'text', sessionFlag, sessionId, ...modelArgs];
|
|
493
501
|
|
|
494
502
|
if (ctx.environment && ctx.cwd) {
|
package/src/lib/environment.js
CHANGED
|
@@ -41,7 +41,7 @@ import { homedir } from 'os';
|
|
|
41
41
|
// "persona and runtime are chosen separately" requires to mean anything for a
|
|
42
42
|
// BYO seat, and what lets an identity card answer "what is this running".
|
|
43
43
|
const ALLOWED_TOP_KEYS = new Set([
|
|
44
|
-
'version', 'workspace', 'sandbox', 'skills', 'mcp', 'model',
|
|
44
|
+
'version', 'workspace', 'sandbox', 'skills', 'mcp', 'model', 'effort',
|
|
45
45
|
]);
|
|
46
46
|
const ALLOWED_SANDBOX_MODES = new Set([
|
|
47
47
|
'none', 'workspace', 'read-only', 'bwrap', 'firejail', 'container', 'managed',
|
|
@@ -135,6 +135,16 @@ export const validateEnvironmentSpec = (spec) => {
|
|
|
135
135
|
}
|
|
136
136
|
}
|
|
137
137
|
|
|
138
|
+
// `effort` is the reasoning budget the claude adapter passes to `--effort`.
|
|
139
|
+
// Unlike `model` it IS a closed set — the CLI documents exactly these — so a
|
|
140
|
+
// typo fails here at attach time, not silently at the first spawn.
|
|
141
|
+
if (spec.effort !== undefined) {
|
|
142
|
+
const EFFORTS = ['low', 'medium', 'high', 'xhigh', 'max'];
|
|
143
|
+
if (typeof spec.effort !== 'string' || !EFFORTS.includes(spec.effort)) {
|
|
144
|
+
errors.push(`effort must be one of: ${EFFORTS.join(', ')}`);
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
|
|
138
148
|
if (spec.workspace !== undefined) {
|
|
139
149
|
if (typeof spec.workspace !== 'object' || spec.workspace === null) {
|
|
140
150
|
errors.push('workspace must be an object');
|