fluxflow-cli 1.0.10 → 1.0.12

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.
Files changed (2) hide show
  1. package/dist/fluxflow.js +14 -12
  2. package/package.json +1 -2
package/dist/fluxflow.js CHANGED
@@ -385,10 +385,10 @@ ${isMemoryEnabled ? `2. User-specific long-term memory (USE BASED ON CONVERSATIO
385
385
 
386
386
  // src/data/thinking_prompts.json
387
387
  var thinking_prompts_default = {
388
- Max: "-- START THINKING INSTRUCTIONS --\nEFFORT_LEVEL: MAX\nThink Step by Step in Chain-of-Thought. Provide the thinking in <think>...</think> block, length given. Thinking should be structured in this format:\n\n<think>\n\\n\\n\n**Heading-ing**\n\\n\\n\n* steps...\n\\n\\n\n**Heading-ing**\n\\n\\n\n* steps...\ncontinue.\n\\n\\n\n</think>\\n\\n\n\n(MUST START THE RESPONSE IN NEW LINE AFTER ENDING THINKING BLOCK)\n\n**CRITICAL**: Heading blocks: **MIN 30**, **MAX 50**. EACH HEADING SHOULD HAVE MIN 8, MAX 12 STEPS OF INTERNAL MONOLOGUE. Think LONGER & DEEPER before responding. EXPLORE EDGE CASES & NUANCES.\nPLAN LIKE A SCALABLE ARCHITECTURE\n\nNEVER WRITE FUNCTION CALLS IN THINKING BLOCK WITH 'tool:' PREFIX AND NEVER WRITE '[turn: ...]' INSIDE THINKING BLOCK.\n-- END THINKING INSTRUCTIONS --",
389
- High: "-- START THINKING INSTRUCTIONS --\nEFFORT_LEVEL: HIGH\nThink Step by Step in Chain-of-Thought. Provide the thinking in <think>...</think> block, length given. Thinking should be structured in this format:\n\n<think>\n\\n\\n\n**Heading-ing**\n\\n\\n\n* steps...\n\\n\\n\n**Heading-ing**\n\\n\\n\n* steps...\ncontinue.\n\\n\\n\n</think>\\n\\n\n\n(MUST START THE RESPONSE IN NEW LINE AFTER ENDING THINKING BLOCK)\n\n**CRITICAL**: Heading blocks: **MIN 13**, **MAX 25**. EACH HEADING SHOULD HAVE MIN 6, MAX 8 STEPS OF INTERNAL MONOLOGUE. EXPLORE EDGE CASES & THINK LONGER before responding.\nNEVER WRITE FUNCTION CALLS IN THINKING BLOCK WITH 'tool:' PREFIX AND NEVER WRITE '[turn: ...]' INSIDE THINKING BLOCK.\n-- END THINKING INSTRUCTIONS --",
388
+ Max: "-- START THINKING INSTRUCTIONS --\nEFFORT_LEVEL: MAX\nThink Step by Step in Chain-of-Thought. Provide the thinking in <think>...</think> block, length given. Thinking should be structured in this format:\n\n<think>\n\\n\\n\n**Heading-ing**\n\\n\\n\n* steps...\n\\n\\n\n**Heading-ing**\n\\n\\n\n* steps...\ncontinue.\n\\n\\n\n</think>\\n\\n\n\n(MUST START THE RESPONSE IN NEW LINE AFTER ENDING THINKING BLOCK)\n\n**CRITICAL**: Heading blocks: **MIN 10**, **MAX 30**. EACH HEADING SHOULD HAVE MIN 6, MAX 10 STEPS OF INTERNAL MONOLOGUE. EXPLORE EDGE CASES & NUANCES.\n\nNEVER WRITE FUNCTION CALLS IN THINKING BLOCK WITH 'tool:' PREFIX AND NEVER WRITE '[turn: ...]' INSIDE THINKING BLOCK.\n-- END THINKING INSTRUCTIONS --",
389
+ High: "-- START THINKING INSTRUCTIONS --\nEFFORT_LEVEL: HIGH\nThink Step by Step in Chain-of-Thought. Provide the thinking in <think>...</think> block, length given. Thinking should be structured in this format:\n\n<think>\n\\n\\n\n**Heading-ing**\n\\n\\n\n* steps...\n\\n\\n\n**Heading-ing**\n\\n\\n\n* steps...\ncontinue.\n\\n\\n\n</think>\\n\\n\n\n(MUST START THE RESPONSE IN NEW LINE AFTER ENDING THINKING BLOCK)\n\n**CRITICAL**: Heading blocks: **MIN 8**, **MAX 25**. EACH HEADING SHOULD HAVE MIN 4, MAX 8 STEPS OF INTERNAL MONOLOGUE. EXPLORE EDGE CASES & THINK LONGER before responding.\nNEVER WRITE FUNCTION CALLS IN THINKING BLOCK WITH 'tool:' PREFIX AND NEVER WRITE '[turn: ...]' INSIDE THINKING BLOCK.\n-- END THINKING INSTRUCTIONS --",
390
390
  Medium: "-- START THINKING INSTRUCTIONS --\nEFFORT_LEVEL: MEDIUM\nThink Step by Step in Chain-of-Thought. Provide the thinking in <think>...</think> block, length given. Thinking should be structured in this format:\n\n<think>\n\\n\\n\n**Heading-ing**\n\\n\\n\n* steps...\n\\n\\n\n**Heading-ing**\n\\n\\n\n* steps...\ncontinue.\n\\n\\n\n</think>\\n\\n\n\n(MUST START THE RESPONSE IN NEW LINE AFTER ENDING THINKING BLOCK)\n\n**CRITICAL**: Heading blocks: **MIN 5**, **MAX 9**. EACH HEADING SHOULD HAVE MIN 4, MAX 6 STEPS OF INTERNAL MONOLOGUE. THINK LONGER FOR COMPLEX QUERIES.\nNEVER WRITE FUNCTION CALLS IN THINKING BLOCK WITH 'tool:' PREFIX AND NEVER WRITE '[turn: ...]' INSIDE THINKING BLOCK.\n-- END THINKING INSTRUCTIONS --",
391
- Minimal: "-- START THINKING INSTRUCTIONS --\nEFFORT_LEVEL: MINIMAL\nThink Step by Step in Chain-of-Thought. Provide the thinking in <think>...</think> block, length given. Thinking should be structured in this format:\n\n<think>\n\\n\\n\n**Heading-ing**\n\\n\\n\n* steps...\n\\n\\n\n**Heading-ing**\n\\n\\n\n* steps...\ncontinue.\n\\n\\n\n</think>\\n\\n\n\n(MUST START THE RESPONSE IN NEW LINE AFTER ENDING THINKING BLOCK)\n\n**CRITICAL**: Heading blocks: **MIN 0**, **MAX 3**. EACH HEADING SHOULD HAVE MIN 1, MAX 2 STEPS OF INTERNAL MONOLOGUE. No Thinking is preferred if query is simple.\nNEVER WRITE FUNCTION CALLS IN THINKING BLOCK WITH 'tool:' PREFIX AND NEVER WRITE '[turn: ...]' INSIDE THINKING BLOCK.\n-- END THINKING INSTRUCTIONS --"
391
+ Minimal: "-- START THINKING INSTRUCTIONS --\nEFFORT_LEVEL: LOW\nThink Step by Step in Chain-of-Thought. Provide the thinking in <think>...</think> block, length given. Thinking should be structured in this format:\n\n<think>\n\\n\\n\n**Heading-ing**\n\\n\\n\n* steps...\n\\n\\n\n**Heading-ing**\n\\n\\n\n* steps...\ncontinue.\n\\n\\n\n</think>\\n\\n\n\n(MUST START THE RESPONSE IN NEW LINE AFTER ENDING THINKING BLOCK)\n\n**CRITICAL**: Heading blocks: **MIN 0**, **MAX 3**. EACH HEADING SHOULD HAVE MIN 1, MAX 2 STEPS OF INTERNAL MONOLOGUE. No Thinking is preferred if query is simple.\nNEVER WRITE FUNCTION CALLS IN THINKING BLOCK WITH 'tool:' PREFIX AND NEVER WRITE '[turn: ...]' INSIDE THINKING BLOCK.\n-- END THINKING INSTRUCTIONS --"
392
392
  };
393
393
 
394
394
  // src/utils/prompts.js
@@ -417,7 +417,7 @@ ${userMemories}
417
417
  ` : ""}${isMemoryEnabled ? `${tempMemoriesStr}
418
418
 
419
419
  ` : ""}--- START SYSTEM INSTRUCTION ---
420
- You are Flux Flow. A CLI AI Agent. Your tone will be friendly, warm, sassy, approchable, respectable, NO ROMANTIC OR FLIRTY WORDS. Dont mention modes unless explicitly asked. ${mode === "Flux" ? "You are currently operating in FLUX (dev) mode. Keep your agentic approach goal oriented. Use provided tools when needed. And should try to minimize number of agentic loops (Agent Loop is limited to 45 per turn, finish your goal by then). Analyze user prompt and project requirements, then plan your approach." : "You are currently operating in Flow (chat) mode. Focus more on conversation quality and user experience. Keep Agentic Loops to minimum (Agent Loop is limited to 5 per turn, finish your goal by then). You will get access to Web Tools only in this mode."}
420
+ You are Flux Flow. A CLI Agent. Your tone will be friendly, warm, sassy, approchable, respectable, NO ROMANTIC OR FLIRTY WORDS. Dont mention modes unless explicitly asked. ${mode === "Flux" ? "You are currently operating in FLUX (dev) mode. Keep your agentic approach goal oriented. Use provided tools when needed. And try to minimize number of agentic loops (Agent Loop is limited to 50 per turn, finish your goal by then). Analyze user prompt and project requirements, then plan your approach." : "You are currently operating in Flow (chat) mode. Focus more on conversation quality and user experience. Keep Agentic Loops to minimum (Agent Loop is limited to 7 per turn, finish your goal by then). You will get access to Web Tools only in this mode."}
421
421
  CURRENT_WORKING_DIRECTORY: ${cwdStr}.
422
422
  ${nameStr}${nicknameStr}${userInstrStr}
423
423
 
@@ -450,9 +450,8 @@ Every ${isMemoryEnabled ? "Prompt, Responses & Memories" : "Prompt & Responses"}
450
450
  -- START FORMATTING RULES --
451
451
  - Use markdown.
452
452
  - Structure responses VISUALLY pleasing, easy to read, and beautiful.
453
- - NEVER USE table format markdown. Gently avoid if explicitly asked.
454
- - NEVER USE LaTeX format.
455
- - Use emojis. But dont overdo it.
453
+ - **CRITICAL**: NEVER USE table format markdown & LaTeX IN TERMINAL RESPONSES (exception: file content).
454
+ - Use emojis.
456
455
  -- END FORMATTING RULES --
457
456
 
458
457
  -- START REPONSE FINISH PROTOCOL --
@@ -1311,9 +1310,12 @@ USER_PROMPT: ${agentText}`.trim();
1311
1310
  throw new Error("Error: Daily Quota Exausted for Agent");
1312
1311
  }
1313
1312
  let targetModel = modelName;
1314
- if (retryCount >= 5) {
1313
+ if (retryCount === 5) {
1314
+ targetModel = "gemini-3-flash-preview";
1315
+ yield { type: "model_update", content: "Trying with fallback model (v3)" };
1316
+ } else if (retryCount >= 6) {
1315
1317
  targetModel = "gemini-3.1-flash-lite-preview";
1316
- yield { type: "model_update", content: "Trying with fallback model" };
1318
+ yield { type: "model_update", content: "Trying with fallback model (v3.1)" };
1317
1319
  } else if (retryCount > 0) {
1318
1320
  yield { type: "model_update", content: null };
1319
1321
  }
@@ -1321,7 +1323,7 @@ USER_PROMPT: ${agentText}`.trim();
1321
1323
  model: targetModel,
1322
1324
  contents,
1323
1325
  config: {
1324
- temperature: mode === "Flux" ? 0.9 : 1.3,
1326
+ temperature: mode === "Flux" ? 1 : 1.4,
1325
1327
  thinkingConfig: {
1326
1328
  includeThoughts: false,
1327
1329
  thinkingLevel: ThinkingLevel.MINIMAL
@@ -1343,7 +1345,7 @@ USER_PROMPT: ${agentText}`.trim();
1343
1345
  yield { type: "status", content: `Retrying (${retryCount}/${MAX_RETRIES})...` };
1344
1346
  await new Promise((resolve) => setTimeout(resolve, waitTime));
1345
1347
  } else {
1346
- throw new Error(`Model cannot be reached: ${errMsg}`);
1348
+ throw new Error(`Model cannot be reached: ${errMsg}. (Failed ${MAX_RETRIES} times)`);
1347
1349
  }
1348
1350
  }
1349
1351
  }
@@ -2309,7 +2311,7 @@ OUTPUT: ${execOutputRef.current}`;
2309
2311
  return newMsgs;
2310
2312
  });
2311
2313
  } else if (!inThinkMode) {
2312
- const cleanedText = chunkText.replace("<think>", "").replace(signalRegex, "");
2314
+ const cleanedText = chunkText.replace(/<\/?think>/gi, "").replace(signalRegex, "");
2313
2315
  if (!currentAgentId) {
2314
2316
  currentAgentId = "agent-" + Date.now();
2315
2317
  setMessages((prev) => [...prev, { id: currentAgentId, role: "agent", text: cleanedText }]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fluxflow-cli",
3
- "version": "1.0.10",
3
+ "version": "1.0.12",
4
4
  "description": "A high-fidelity agentic terminal assistant for the Flux Era.",
5
5
  "keywords": [
6
6
  "ai",
@@ -40,7 +40,6 @@
40
40
  "@google/genai": "^1.50.1",
41
41
  "chalk": "^5.6.2",
42
42
  "cuimp": "^1.10.0",
43
- "duck-duck-scrape": "^2.2.7",
44
43
  "fs-extra": "^11.3.4",
45
44
  "gradient-string": "^3.0.0",
46
45
  "ink": "^7.0.1",