clawcompany 0.25.0 → 0.27.0
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 +20 -7
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -395,7 +395,13 @@ RULES: Stay focused on the assigned task. Do not expand scope. If blocked, repor
|
|
|
395
395
|
id: "fallback_a",
|
|
396
396
|
name: "Fallback A",
|
|
397
397
|
description: "Low-balance fallback.",
|
|
398
|
-
systemPrompt: `Fallback agent. Low-balance mode. Be concise. Output only what's needed
|
|
398
|
+
systemPrompt: `Fallback agent. Low-balance mode. Be concise. Output only what's needed.
|
|
399
|
+
|
|
400
|
+
## SOP
|
|
401
|
+
1. Receive task \u2192 classify urgency.
|
|
402
|
+
2. If simple \u2192 answer directly (\u2264100 words).
|
|
403
|
+
3. If complex \u2192 summarise what's needed and escalate.
|
|
404
|
+
4. Never exceed token budget.`,
|
|
399
405
|
model: "gpt-oss-120b",
|
|
400
406
|
provider: "clawapi",
|
|
401
407
|
reportsTo: null,
|
|
@@ -416,7 +422,12 @@ RULES: Stay focused on the assigned task. Do not expand scope. If blocked, repor
|
|
|
416
422
|
id: "fallback_b",
|
|
417
423
|
name: "Fallback B",
|
|
418
424
|
description: "Minimum cost, last resort.",
|
|
419
|
-
systemPrompt: `Last-resort agent. Extremely low balance. Classification, tagging, yes/no only
|
|
425
|
+
systemPrompt: `Last-resort agent. Extremely low balance. Classification, tagging, yes/no only.
|
|
426
|
+
|
|
427
|
+
## SOP
|
|
428
|
+
1. Receive task \u2192 classify as yes/no/tag.
|
|
429
|
+
2. Output one-line answer only.
|
|
430
|
+
3. Never generate long text \u2014 budget is near zero.`,
|
|
420
431
|
model: "gpt-oss-20b",
|
|
421
432
|
provider: "clawapi",
|
|
422
433
|
reportsTo: null,
|
|
@@ -1929,7 +1940,7 @@ import { join } from "path";
|
|
|
1929
1940
|
import { existsSync, readFileSync, writeFileSync, mkdirSync } from "fs";
|
|
1930
1941
|
function banner() {
|
|
1931
1942
|
console.log("");
|
|
1932
|
-
console.log(" \u{1F99E} ClawCompany v0.
|
|
1943
|
+
console.log(" \u{1F99E} ClawCompany v0.27.0");
|
|
1933
1944
|
console.log(" Build for OPC. Every human being is a chairman.");
|
|
1934
1945
|
console.log("");
|
|
1935
1946
|
}
|
|
@@ -2905,15 +2916,17 @@ ${text.slice(0, 5e3)}`;
|
|
|
2905
2916
|
}
|
|
2906
2917
|
const html = await response.text();
|
|
2907
2918
|
const results = [];
|
|
2908
|
-
const resultBlocks = html.split(
|
|
2919
|
+
const resultBlocks = html.split(/result__body">/);
|
|
2909
2920
|
for (let i = 1; i < resultBlocks.length && results.length < limit; i++) {
|
|
2910
2921
|
const block = resultBlocks[i];
|
|
2911
|
-
const
|
|
2912
|
-
|
|
2922
|
+
const prevTail = resultBlocks[i - 1].slice(-300);
|
|
2923
|
+
if (prevTail.includes("result--ad")) continue;
|
|
2924
|
+
const titleMatch = block.match(/class="result__a"[^>]*>([^<]+)/);
|
|
2925
|
+
const title = titleMatch?.[1]?.replace(/&/g, "&")?.replace(/"/g, '"')?.replace(/'/g, "'")?.trim() ?? "";
|
|
2913
2926
|
const urlMatch = block.match(/href="\/\/duckduckgo\.com\/l\/\?[^"]*uddg=([^&"]+)/);
|
|
2914
2927
|
const url = urlMatch?.[1] ? decodeURIComponent(urlMatch[1]) : "";
|
|
2915
2928
|
const snippetMatch = block.match(/class="result__snippet"[^>]*>([\s\S]*?)<\/a>/);
|
|
2916
|
-
const snippet = snippetMatch?.[1]?.replace(/<[^>]+>/g, "")?.replace(/\s+/g, " ")?.trim() ?? "";
|
|
2929
|
+
const snippet = snippetMatch?.[1]?.replace(/<[^>]+>/g, "")?.replace(/"/g, '"')?.replace(/'/g, "'")?.replace(/&/g, "&")?.replace(/\s+/g, " ")?.trim() ?? "";
|
|
2917
2930
|
if (title && url) {
|
|
2918
2931
|
results.push({ title, url, snippet });
|
|
2919
2932
|
}
|
package/package.json
CHANGED