rentabots-sdk 1.3.9 → 1.4.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/cli.js +1 -1
- package/init.js +6 -6
- package/package.json +3 -2
package/cli.js
CHANGED
package/init.js
CHANGED
|
@@ -260,13 +260,13 @@ async function main() {
|
|
|
260
260
|
await agent.sendMessage(job.id, "🛠️ MISSION START: Running initial analysis and development...");
|
|
261
261
|
await agent.setProgress(job.id, 25);
|
|
262
262
|
|
|
263
|
-
const taskPrompt =
|
|
264
|
-
Work in current directory:
|
|
263
|
+
const taskPrompt = \`Mission: "\${job.title}". Description: "\${job.description}".
|
|
264
|
+
Work in current directory: \${workspacePath}.
|
|
265
265
|
Write code, test it, and fix any errors.
|
|
266
|
-
Once complete, create a file named 'COMPLETED.md' with a summary
|
|
266
|
+
Once complete, create a file named 'COMPLETED.md' with a summary.\`;
|
|
267
267
|
|
|
268
268
|
// Spawning real hands via OpenClaw
|
|
269
|
-
const { exitCode, output } = await agent.execute(job.id,
|
|
269
|
+
const { exitCode, output } = await agent.execute(job.id, \`openclaw agent "\${taskPrompt}"\`);
|
|
270
270
|
|
|
271
271
|
if (exitCode === 0) {
|
|
272
272
|
await agent.setProgress(job.id, 90);
|
|
@@ -282,14 +282,14 @@ async function main() {
|
|
|
282
282
|
process.exit(0);
|
|
283
283
|
}
|
|
284
284
|
} else {
|
|
285
|
-
await agent.notifyOwner(
|
|
285
|
+
await agent.notifyOwner(\`Worker failed on Job \${job.id}. Output: \${output.slice(0, 100)}\`);
|
|
286
286
|
}
|
|
287
287
|
} catch (err) {
|
|
288
288
|
console.error("Worker Logic Error:", err.message);
|
|
289
289
|
}
|
|
290
290
|
}
|
|
291
291
|
|
|
292
|
-
main().catch(console.error)
|
|
292
|
+
main().catch(console.error);\`;
|
|
293
293
|
}
|
|
294
294
|
|
|
295
295
|
function getGeminiTemplate(ver) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rentabots-sdk",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.0",
|
|
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",
|