@kynver-app/openclaw-agent-os 0.1.42 → 0.1.43
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/index.js +28 -1
- package/dist/index.js.map +3 -3
- package/openclaw.plugin.json +1 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1009,7 +1009,7 @@ function buildAgentOsContinuityGuidanceContext(config) {
|
|
|
1009
1009
|
"PR landing contract:",
|
|
1010
1010
|
"- Landing tasks are merge-only. Do not edit files, rebase, resolve conflicts, change package versions, or perform implementation work from a landing lane.",
|
|
1011
1011
|
"- For chat-visible PR check polling, prefer `node scripts/agent-os-pr-checks-soft.mjs <pr-number-or-url> --repo <owner/repo>` over raw `gh pr checks`. Raw `gh pr checks` exits nonzero for pending checks and creates false failed-tool alerts in Telegram; the soft wrapper exits nonzero only for real failed checks unless `--fail-on-pending` is explicitly requested.",
|
|
1012
|
-
"- For repo text search, do not pass a single filename (e.g. `package.json`) as ripgrep's path argument \u2014 that is a file, not a directory. Search from the repo root with a glob (`rg -g package.json <pattern> .`) or use `node scripts/agent-os-repo-search.mjs normalize -- '<command>'` before exec. Searching only `package.json` for `agent-os-land-pr` should use `node scripts/agent-os-land-pr.mjs <pr-url>` directly.",
|
|
1012
|
+
"- For repo text search, do not pass a single filename (e.g. `package.json`) as ripgrep's path argument \u2014 that is a file, not a directory. Search from the repo root with a glob (`rg -g package.json <pattern> .`) or use `node scripts/agent-os-repo-search.mjs normalize -- '<command>'` before exec. Exclude scopes like `!node_modules` are not valid path arguments \u2014 use `-g '!node_modules/**'` (trailing `/**` required). Ripgrep exit 1 means no matches, not a tool failure. Searching only `package.json` for `agent-os-land-pr` should use `node scripts/agent-os-land-pr.mjs <pr-url>` directly.",
|
|
1013
1013
|
"- Land PRs only through the repo's narrow landing wrapper: `node scripts/agent-os-land-pr.mjs <pr-number-or-url>`. The wrapper performs live GitHub readiness checks, squash-merges exactly that PR, deletes the branch, and verifies merged state.",
|
|
1014
1014
|
"- If the wrapper rejects a PR as draft, conflicted, non-green, pending checks, or missing an exact PR target, mark the landing task blocked with the exact reason instead of improvising a merge path.",
|
|
1015
1015
|
"- Do not land unmanaged PRs. A PR must carry a hard AgentTask reference in the PR body and the AgentTask must carry `prUrl`; if either side is missing, block it as unmanaged and repair the link before merge.",
|
|
@@ -1349,6 +1349,27 @@ function registerTelegramReplyContextHooks({
|
|
|
1349
1349
|
return true;
|
|
1350
1350
|
}
|
|
1351
1351
|
|
|
1352
|
+
// src/repo-search-failure-rewrite.ts
|
|
1353
|
+
import {
|
|
1354
|
+
classifyRepoSearchMeta,
|
|
1355
|
+
diagnoseRepoSearchFailure,
|
|
1356
|
+
extractSearchMetaFromToolLine,
|
|
1357
|
+
formatRepoSearchGuidance
|
|
1358
|
+
} from "@kynver-app/runtime";
|
|
1359
|
+
function rewriteRepoSearchToolFailureLine(line) {
|
|
1360
|
+
const meta = extractSearchMetaFromToolLine(line);
|
|
1361
|
+
if (!meta) return null;
|
|
1362
|
+
const diagnosis = diagnoseRepoSearchFailure({ meta });
|
|
1363
|
+
if (diagnosis) return diagnosis;
|
|
1364
|
+
const ctx = classifyRepoSearchMeta(meta);
|
|
1365
|
+
const guidance = formatRepoSearchGuidance(ctx);
|
|
1366
|
+
if (guidance) return guidance;
|
|
1367
|
+
if (ctx.pattern) {
|
|
1368
|
+
return `Repo search for "${ctx.pattern}" did not succeed. Try \`rg "${ctx.pattern}" .\` from the repo root.`;
|
|
1369
|
+
}
|
|
1370
|
+
return null;
|
|
1371
|
+
}
|
|
1372
|
+
|
|
1352
1373
|
// src/telegram-tool-error-filter.ts
|
|
1353
1374
|
var DIRECT_CHAT_CHANNEL_IDS = /* @__PURE__ */ new Set(["telegram", "webchat"]);
|
|
1354
1375
|
var RAW_TOOL_ERROR_WARNING_RE = /^⚠️\s*🛠️\s*.+\bfailed\b/ui;
|
|
@@ -1394,6 +1415,12 @@ function filterDirectChatOutboundContent(content) {
|
|
|
1394
1415
|
const kept = [];
|
|
1395
1416
|
let suppressedAny = false;
|
|
1396
1417
|
for (const line of lines) {
|
|
1418
|
+
const rewritten = rewriteRepoSearchToolFailureLine(line);
|
|
1419
|
+
if (rewritten) {
|
|
1420
|
+
kept.push(rewritten);
|
|
1421
|
+
suppressedAny = true;
|
|
1422
|
+
continue;
|
|
1423
|
+
}
|
|
1397
1424
|
if (isRawInternalToolFailureLine(line)) {
|
|
1398
1425
|
suppressedAny = true;
|
|
1399
1426
|
continue;
|