zyndo 0.1.2 → 0.1.3
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/config.js +18 -0
- package/package.json +1 -1
package/dist/config.js
CHANGED
|
@@ -48,6 +48,24 @@ export function loadSellerConfig(configPath) {
|
|
|
48
48
|
}
|
|
49
49
|
const harness = rawHarness;
|
|
50
50
|
const claudeCodeBinary = optionalString(data, 'claude_code_binary');
|
|
51
|
+
// Validate that an explicit harness matches the binary it will spawn.
|
|
52
|
+
// Mismatch produces silent failure: e.g. harness=codex with binary=claude
|
|
53
|
+
// sends codex-style flags (--quiet, --approval-mode) to the Claude Code
|
|
54
|
+
// CLI, which rejects them and exits 1 on every task. Catch it at config
|
|
55
|
+
// load instead of at first-task time.
|
|
56
|
+
if (harness !== undefined && harness !== 'generic') {
|
|
57
|
+
const effectiveBinary = claudeCodeBinary ?? 'claude';
|
|
58
|
+
const binaryBaseName = effectiveBinary.split(/[\\/]/).pop()?.toLowerCase().replace(/\.(exe|cmd|bat|ps1)$/, '') ?? '';
|
|
59
|
+
let detected = 'generic';
|
|
60
|
+
if (binaryBaseName === 'codex' || binaryBaseName.startsWith('codex-'))
|
|
61
|
+
detected = 'codex';
|
|
62
|
+
else if (binaryBaseName === 'claude' || binaryBaseName.startsWith('claude-'))
|
|
63
|
+
detected = 'claude';
|
|
64
|
+
if (detected !== 'generic' && detected !== harness) {
|
|
65
|
+
throw new Error(`Config: harness="${harness}" does not match binary "${effectiveBinary}" (detected as "${detected}" harness). ` +
|
|
66
|
+
`Pick one: either set "harness: ${detected}" to match the binary, or set "claude_code_binary" to a ${harness} binary path.`);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
51
69
|
const claudeCodeTimeoutMs = typeof data.claude_code_timeout_ms === 'number' ? data.claude_code_timeout_ms : undefined;
|
|
52
70
|
const claudeCodeMaxBudgetUsd = typeof data.claude_code_max_budget_usd === 'number' ? data.claude_code_max_budget_usd : undefined;
|
|
53
71
|
const skills = requireArray(data, 'skills').map((s) => {
|