clawcompany 0.28.4 → 0.30.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 +44 -6
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -112,7 +112,7 @@ COST AWARENESS: You are the most expensive role. Decompose quickly, then delegat
|
|
|
112
112
|
budgetTier: "earn",
|
|
113
113
|
budgetMonthly: null,
|
|
114
114
|
maxTokensPerTask: null,
|
|
115
|
-
tools: ["http", "filesystem", "web_fetch", "web_search", "price_feed"],
|
|
115
|
+
tools: ["http", "filesystem", "web_fetch", "web_search", "price_feed", "memory_search"],
|
|
116
116
|
skills: [],
|
|
117
117
|
isBuiltin: true,
|
|
118
118
|
isActive: true,
|
|
@@ -242,7 +242,7 @@ RULES: Never fabricate data. If you cannot find information, say so explicitly.`
|
|
|
242
242
|
budgetTier: "earn",
|
|
243
243
|
budgetMonthly: null,
|
|
244
244
|
maxTokensPerTask: null,
|
|
245
|
-
tools: ["http", "filesystem", "web_fetch", "web_search", "price_feed", "browser_use"],
|
|
245
|
+
tools: ["http", "filesystem", "web_fetch", "web_search", "price_feed", "browser_use", "memory_search"],
|
|
246
246
|
skills: [],
|
|
247
247
|
isBuiltin: true,
|
|
248
248
|
isActive: true,
|
|
@@ -276,7 +276,7 @@ RULES: Numbers only. State confidence levels. No speculation without data.`,
|
|
|
276
276
|
budgetTier: "save",
|
|
277
277
|
budgetMonthly: null,
|
|
278
278
|
maxTokensPerTask: null,
|
|
279
|
-
tools: ["http", "filesystem", "code_interpreter", "web_fetch", "web_search", "price_feed"],
|
|
279
|
+
tools: ["http", "filesystem", "code_interpreter", "web_fetch", "web_search", "price_feed", "memory_search"],
|
|
280
280
|
skills: [],
|
|
281
281
|
isBuiltin: true,
|
|
282
282
|
isActive: true,
|
|
@@ -349,7 +349,7 @@ SUBJECT: [mission topic]
|
|
|
349
349
|
budgetTier: "save",
|
|
350
350
|
budgetMonthly: null,
|
|
351
351
|
maxTokensPerTask: null,
|
|
352
|
-
tools: ["http", "filesystem"],
|
|
352
|
+
tools: ["http", "filesystem", "memory_search"],
|
|
353
353
|
skills: [],
|
|
354
354
|
isBuiltin: true,
|
|
355
355
|
isActive: true,
|
|
@@ -382,7 +382,7 @@ RULES: Stay focused on the assigned task. Do not expand scope. If blocked, repor
|
|
|
382
382
|
budgetTier: "save",
|
|
383
383
|
budgetMonthly: null,
|
|
384
384
|
maxTokensPerTask: null,
|
|
385
|
-
tools: ["filesystem", "http", "web_fetch", "web_search", "price_feed"],
|
|
385
|
+
tools: ["filesystem", "http", "web_fetch", "web_search", "price_feed", "memory_search"],
|
|
386
386
|
skills: [],
|
|
387
387
|
isBuiltin: true,
|
|
388
388
|
isActive: true,
|
|
@@ -2149,7 +2149,7 @@ import { join } from "path";
|
|
|
2149
2149
|
import { existsSync, readFileSync, writeFileSync, mkdirSync } from "fs";
|
|
2150
2150
|
function banner() {
|
|
2151
2151
|
console.log("");
|
|
2152
|
-
console.log(" \u{1F99E} ClawCompany v0.
|
|
2152
|
+
console.log(" \u{1F99E} ClawCompany v0.30.0");
|
|
2153
2153
|
console.log(" Build for OPC. Every human being is a chairman.");
|
|
2154
2154
|
console.log("");
|
|
2155
2155
|
}
|
|
@@ -3023,6 +3023,8 @@ var ToolExecutor = class {
|
|
|
3023
3023
|
return this.execPriceFeed(args);
|
|
3024
3024
|
case "browser_use":
|
|
3025
3025
|
return this.execBrowserUse(args);
|
|
3026
|
+
case "memory_search":
|
|
3027
|
+
return this.execMemorySearch(args);
|
|
3026
3028
|
default:
|
|
3027
3029
|
return `Unknown tool: ${toolName}`;
|
|
3028
3030
|
}
|
|
@@ -3252,6 +3254,28 @@ STDERR: ${stderr}` : "");
|
|
|
3252
3254
|
return `Error fetching price: ${err.message}`;
|
|
3253
3255
|
}
|
|
3254
3256
|
}
|
|
3257
|
+
async execMemorySearch(args) {
|
|
3258
|
+
const query = args.query;
|
|
3259
|
+
if (!query) return "Error: query is required";
|
|
3260
|
+
try {
|
|
3261
|
+
const res = await fetch("http://localhost:3200/api/memory/search?q=" + encodeURIComponent(query));
|
|
3262
|
+
const data = await res.json();
|
|
3263
|
+
if (data.totalMatches === 0) return "No matches found for: " + query;
|
|
3264
|
+
let result = `Found ${data.totalMatches} matches:
|
|
3265
|
+
|
|
3266
|
+
`;
|
|
3267
|
+
for (const r of data.results) {
|
|
3268
|
+
result += `[${r.partition}]
|
|
3269
|
+
`;
|
|
3270
|
+
for (const m of r.matches) {
|
|
3271
|
+
result += m.slice(0, 300) + "\n\n";
|
|
3272
|
+
}
|
|
3273
|
+
}
|
|
3274
|
+
return result;
|
|
3275
|
+
} catch {
|
|
3276
|
+
return "Error: memory search unavailable";
|
|
3277
|
+
}
|
|
3278
|
+
}
|
|
3255
3279
|
};
|
|
3256
3280
|
|
|
3257
3281
|
// ../packages/tools/src/index.ts
|
|
@@ -3373,6 +3397,20 @@ var BUILTIN_TOOLS = {
|
|
|
3373
3397
|
}
|
|
3374
3398
|
}
|
|
3375
3399
|
},
|
|
3400
|
+
memory_search: {
|
|
3401
|
+
type: "function",
|
|
3402
|
+
function: {
|
|
3403
|
+
name: "memory_search",
|
|
3404
|
+
description: "Search company memory for relevant information. Searches across all memory partitions (chairman, culture, decisions, learnings, tech-stack) using keyword matching.",
|
|
3405
|
+
parameters: {
|
|
3406
|
+
type: "object",
|
|
3407
|
+
properties: {
|
|
3408
|
+
query: { type: "string", description: 'Search keywords (e.g. "TypeScript deploy", "pricing decision")' }
|
|
3409
|
+
},
|
|
3410
|
+
required: ["query"]
|
|
3411
|
+
}
|
|
3412
|
+
}
|
|
3413
|
+
},
|
|
3376
3414
|
price_feed: {
|
|
3377
3415
|
type: "function",
|
|
3378
3416
|
function: {
|
package/package.json
CHANGED