rentabots-sdk 1.3.9 → 1.4.1
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/cli.js +1 -1
- package/init.js +10 -7
- package/package.json +3 -2
package/cli.js
CHANGED
package/init.js
CHANGED
|
@@ -98,7 +98,11 @@ async function main() {
|
|
|
98
98
|
main: "agent.js",
|
|
99
99
|
scripts: {
|
|
100
100
|
"start": "node agent.js",
|
|
101
|
-
"deploy": "pm2 start agent.js --name my-rentabot-agent"
|
|
101
|
+
"deploy": "pm2 start agent.js --name my-rentabot-agent",
|
|
102
|
+
"status": "cat RENTABOT_STATUS.md",
|
|
103
|
+
"logs": "pm2 logs my-rentabot-agent",
|
|
104
|
+
"stop": "pm2 stop my-rentabot-agent",
|
|
105
|
+
"restart": "pm2 restart my-rentabot-agent"
|
|
102
106
|
},
|
|
103
107
|
dependencies
|
|
104
108
|
};
|
|
@@ -165,7 +169,6 @@ async function main() {
|
|
|
165
169
|
|
|
166
170
|
// 1. AUTO-PILOT (Scout & Bid)
|
|
167
171
|
queen.startAutopilot({
|
|
168
|
-
keywords: ['python', 'script', 'scraper', 'react', 'fix', 'automation'],
|
|
169
172
|
minBudget: 1,
|
|
170
173
|
scoutingInterval: 60000
|
|
171
174
|
});
|
|
@@ -260,13 +263,13 @@ async function main() {
|
|
|
260
263
|
await agent.sendMessage(job.id, "🛠️ MISSION START: Running initial analysis and development...");
|
|
261
264
|
await agent.setProgress(job.id, 25);
|
|
262
265
|
|
|
263
|
-
const taskPrompt =
|
|
264
|
-
Work in current directory:
|
|
266
|
+
const taskPrompt = \`Mission: "\${job.title}". Description: "\${job.description}".
|
|
267
|
+
Work in current directory: \${workspacePath}.
|
|
265
268
|
Write code, test it, and fix any errors.
|
|
266
|
-
Once complete, create a file named 'COMPLETED.md' with a summary
|
|
269
|
+
Once complete, create a file named 'COMPLETED.md' with a summary.\`;
|
|
267
270
|
|
|
268
271
|
// Spawning real hands via OpenClaw
|
|
269
|
-
const { exitCode, output } = await agent.execute(job.id,
|
|
272
|
+
const { exitCode, output } = await agent.execute(job.id, \`openclaw agent "\${taskPrompt}"\`);
|
|
270
273
|
|
|
271
274
|
if (exitCode === 0) {
|
|
272
275
|
await agent.setProgress(job.id, 90);
|
|
@@ -282,7 +285,7 @@ async function main() {
|
|
|
282
285
|
process.exit(0);
|
|
283
286
|
}
|
|
284
287
|
} else {
|
|
285
|
-
await agent.notifyOwner(
|
|
288
|
+
await agent.notifyOwner(\`Worker failed on Job \${job.id}. Output: \${output.slice(0, 100)}\`);
|
|
286
289
|
}
|
|
287
290
|
} catch (err) {
|
|
288
291
|
console.error("Worker Logic Error:", err.message);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rentabots-sdk",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.1",
|
|
4
4
|
"description": "Official SDK for RentaBots AI Agent Marketplace",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -10,7 +10,8 @@
|
|
|
10
10
|
"rentabot-init": "./init.js"
|
|
11
11
|
},
|
|
12
12
|
"scripts": {
|
|
13
|
-
"build": "tsc"
|
|
13
|
+
"build": "tsc",
|
|
14
|
+
"setup": "npm install && npm run build && npm link"
|
|
14
15
|
},
|
|
15
16
|
"keywords": [
|
|
16
17
|
"ai",
|