shark-ai 0.4.1 → 0.4.2
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/bin/shark.js +11 -0
- package/dist/bin/shark.js.map +1 -1
- package/package.json +1 -1
package/dist/bin/shark.js
CHANGED
|
@@ -1769,6 +1769,12 @@ async function runSpecLoop(initialMessage, overrideAgentId) {
|
|
|
1769
1769
|
if (lastResponse && lastResponse.actions) {
|
|
1770
1770
|
let executionResults = "";
|
|
1771
1771
|
let waitingForUser = false;
|
|
1772
|
+
if (lastResponse.message && lastResponse.message.includes("SPEC_UPDATED:")) {
|
|
1773
|
+
const updateSummary = lastResponse.message.split("SPEC_UPDATED:")[1].trim();
|
|
1774
|
+
tui.log.success(`\u2705 Spec Updated: ${updateSummary}`);
|
|
1775
|
+
tui.log.info("\u{1F4CB} Returning to orchestration loop...");
|
|
1776
|
+
return;
|
|
1777
|
+
}
|
|
1772
1778
|
for (const action of lastResponse.actions) {
|
|
1773
1779
|
if (action.type === "talk_with_user") {
|
|
1774
1780
|
tui.log.info(colors.primary("\u{1F916} Architect:"));
|
|
@@ -2571,6 +2577,11 @@ Your goal is to COMPLETE this specific task and then STOP.
|
|
|
2571
2577
|
finalSummary = response.message.split("TASK_COMPLETED:")[1].trim();
|
|
2572
2578
|
keepGoing = false;
|
|
2573
2579
|
}
|
|
2580
|
+
if (response.message && response.message.includes("TASK_FAILED:")) {
|
|
2581
|
+
const failureReason = response.message.split("TASK_FAILED:")[1].trim();
|
|
2582
|
+
tui.log.error(`\u274C Agent reported task failure: ${failureReason}`);
|
|
2583
|
+
return { success: false, summary: failureReason };
|
|
2584
|
+
}
|
|
2574
2585
|
if (actions.length === 0 && response.message && !isTaskCompleted) {
|
|
2575
2586
|
tui.log.info(colors.primary("\u{1F916} Shark Dev:"));
|
|
2576
2587
|
console.log(response.message);
|