akemon 0.1.73 → 0.1.74
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/server.js +19 -7
- package/package.json +1 -1
package/dist/server.js
CHANGED
|
@@ -1322,7 +1322,19 @@ async function startOrderLoop(options) {
|
|
|
1322
1322
|
engineBusySince = Date.now();
|
|
1323
1323
|
try {
|
|
1324
1324
|
const bios = biosPath(workdir, agentName);
|
|
1325
|
-
|
|
1325
|
+
let taskPrompt;
|
|
1326
|
+
if (engine === "raw") {
|
|
1327
|
+
// Raw engine: simple prompt, harness handles delivery
|
|
1328
|
+
if (order.product_name) {
|
|
1329
|
+
taskPrompt = `Read your operating document at ${bios} for context.\n\n[Order] Product: ${order.product_name}\nBuyer's request: ${order.buyer_task || "(no specific request)"}\n\nComplete the task and respond with your result. RESPOND IN THE SAME LANGUAGE AS THE REQUEST.`;
|
|
1330
|
+
}
|
|
1331
|
+
else {
|
|
1332
|
+
taskPrompt = `Read your operating document at ${bios} for context.\n\n[Task] ${order.buyer_task}\n\nComplete the task and respond with your result. RESPOND IN THE SAME LANGUAGE AS THE REQUEST.`;
|
|
1333
|
+
}
|
|
1334
|
+
}
|
|
1335
|
+
else {
|
|
1336
|
+
// CLI engines: full prompt with self-delivery and delegation
|
|
1337
|
+
const apiGuide = `
|
|
1326
1338
|
|
|
1327
1339
|
## Delivering your result
|
|
1328
1340
|
|
|
@@ -1350,12 +1362,12 @@ If this task requires skills you don't have, delegate via curl:
|
|
|
1350
1362
|
curl -s ${relayHttp}/v1/orders/SUB_ORDER_ID
|
|
1351
1363
|
|
|
1352
1364
|
When sub-order completes, incorporate result_text into YOUR delivery. Then call the deliver endpoint above.`;
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1365
|
+
if (order.product_name) {
|
|
1366
|
+
taskPrompt = `[Order fulfillment] You have an order to fulfill.\n\nProduct: ${order.product_name}\nBuyer's request: ${order.buyer_task || "(no specific request)"}\n\nRead your operating document at ${bios} for context.\nDo NOT ask questions. RESPOND IN THE SAME LANGUAGE AS THE BUYER'S REQUEST.${apiGuide}`;
|
|
1367
|
+
}
|
|
1368
|
+
else {
|
|
1369
|
+
taskPrompt = `[Order fulfillment] Another agent has requested your help.\n\nTask: ${order.buyer_task}\n\nRead your operating document at ${bios} for context.\nComplete this task. Do NOT ask questions. RESPOND IN THE SAME LANGUAGE AS THE REQUEST.${apiGuide}`;
|
|
1370
|
+
}
|
|
1359
1371
|
}
|
|
1360
1372
|
console.log(`[orders] Fulfilling order ${order.id}...`);
|
|
1361
1373
|
const result = await runEngine(engine, model, allowAll, taskPrompt, workdir, ["Bash(curl *)"]);
|