calvyn-code 0.14.4 → 0.14.5
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/calvyn.js +10 -2
- package/package.json +1 -1
- package/run_agent.py +26 -6
package/bin/calvyn.js
CHANGED
|
@@ -18,6 +18,12 @@ function resolveCalvynBinary() {
|
|
|
18
18
|
return path.join(packageRoot, ".venv", venvName, filename)
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
+
function resolveVenvPython() {
|
|
22
|
+
return isWindows
|
|
23
|
+
? path.join(packageRoot, ".venv", "Scripts", "python.exe")
|
|
24
|
+
: path.join(packageRoot, ".venv", "bin", "python")
|
|
25
|
+
}
|
|
26
|
+
|
|
21
27
|
function runPostinstallIfNeeded() {
|
|
22
28
|
const calvynBinary = resolveCalvynBinary()
|
|
23
29
|
if (fs.existsSync(calvynBinary)) {
|
|
@@ -50,8 +56,10 @@ function runPostinstallIfNeeded() {
|
|
|
50
56
|
}
|
|
51
57
|
|
|
52
58
|
const args = process.argv.slice(2)
|
|
53
|
-
|
|
54
|
-
const
|
|
59
|
+
runPostinstallIfNeeded()
|
|
60
|
+
const venvPython = resolveVenvPython()
|
|
61
|
+
const cliEntry = path.join(packageRoot, "cli.py")
|
|
62
|
+
const result = spawnSync(venvPython, [cliEntry, ...args], {
|
|
55
63
|
stdio: "inherit",
|
|
56
64
|
shell: false,
|
|
57
65
|
env: {
|
package/package.json
CHANGED
package/run_agent.py
CHANGED
|
@@ -3210,12 +3210,32 @@ class AIAgent:
|
|
|
3210
3210
|
except Exception:
|
|
3211
3211
|
pass
|
|
3212
3212
|
|
|
3213
|
-
def _emit_auxiliary_failure(self, task: str, exc: BaseException) -> None:
|
|
3214
|
-
"""Surface a compact warning for failed auxiliary work."""
|
|
3215
|
-
try:
|
|
3216
|
-
|
|
3217
|
-
|
|
3218
|
-
|
|
3213
|
+
def _emit_auxiliary_failure(self, task: str, exc: BaseException) -> None:
|
|
3214
|
+
"""Surface a compact warning for failed auxiliary work."""
|
|
3215
|
+
try:
|
|
3216
|
+
from agent.auxiliary_client import (
|
|
3217
|
+
_is_not_found_error,
|
|
3218
|
+
_is_payment_error,
|
|
3219
|
+
_is_rate_limit_error,
|
|
3220
|
+
)
|
|
3221
|
+
except Exception:
|
|
3222
|
+
_is_payment_error = _is_rate_limit_error = _is_not_found_error = None
|
|
3223
|
+
|
|
3224
|
+
if task == "title generation":
|
|
3225
|
+
try:
|
|
3226
|
+
if (
|
|
3227
|
+
(_is_payment_error and _is_payment_error(exc))
|
|
3228
|
+
or (_is_rate_limit_error and _is_rate_limit_error(exc))
|
|
3229
|
+
or (_is_not_found_error and _is_not_found_error(exc))
|
|
3230
|
+
):
|
|
3231
|
+
logger.debug("Suppressing auxiliary %s warning: %s", task, exc)
|
|
3232
|
+
return
|
|
3233
|
+
except Exception:
|
|
3234
|
+
pass
|
|
3235
|
+
try:
|
|
3236
|
+
detail = self._summarize_api_error(exc)
|
|
3237
|
+
except Exception:
|
|
3238
|
+
detail = str(exc)
|
|
3219
3239
|
detail = (detail or exc.__class__.__name__).strip()
|
|
3220
3240
|
if len(detail) > 220:
|
|
3221
3241
|
detail = detail[:217].rstrip() + "..."
|