apex-dev 3.6.0 → 3.8.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.
Files changed (2) hide show
  1. package/dist/index.js +14 -33
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -31674,12 +31674,12 @@ var require_openai = __commonJS((exports, module2) => {
31674
31674
  var require_config = __commonJS((exports, module2) => {
31675
31675
  var OpenAI = require_openai();
31676
31676
  var NVIDIA_MODEL = "z-ai/glm4.7";
31677
- var REVIEWER_MODEL = "nvidia/llama-3.3-nemotron-70b-instruct";
31677
+ var REVIEWER_MODEL = "nvidia/llama-3.3-nemotron-super-49b-v1.5";
31678
31678
  var FILE_PICKER_MODEL = "qwen/qwen3-coder-480b-a35b-instruct";
31679
31679
  var THINKER_MODEL = "z-ai/glm4.7";
31680
- var COMMANDER_MODEL = "nvidia/llama-3.3-nemotron-70b-instruct";
31681
- var CONTEXT_PRUNER_MODEL = "nvidia/llama-3.3-nemotron-70b-instruct";
31682
- var RESEARCHER_MODEL = "nvidia/llama-3.3-nemotron-70b-instruct";
31680
+ var COMMANDER_MODEL = "nvidia/llama-3.3-nemotron-super-49b-v1.5";
31681
+ var CONTEXT_PRUNER_MODEL = "nvidia/llama-3.3-nemotron-super-49b-v1.5";
31682
+ var RESEARCHER_MODEL = "nvidia/llama-3.3-nemotron-super-49b-v1.5";
31683
31683
  var GENERAL_AGENT_MODEL = "z-ai/glm4.7";
31684
31684
  var MAX_TOOL_ITERATIONS = 50;
31685
31685
  var MAX_OUTPUT_LEN = 12000;
@@ -31919,6 +31919,7 @@ Scripts: ${Object.keys(pkg.scripts).join(", ")}`;
31919
31919
  - **Do what the user asks:** If the user asks you to do something, even running a risky command, do it.
31920
31920
  - **If a tool fails, try again or try a different tool.** Don't give up after one attempt.
31921
31921
  - **Act on errors.** If the user pastes an error or stack trace, locate the source, identify root cause, and fix it. Never punt back with "try checking X."
31922
+ - **Nothing is automatic.** The agent loop is a thin shell \u2014 it only executes tool calls you explicitly make. No code review, no context pruning, no validation happens unless YOU call the corresponding tool.
31922
31923
  - **Use <think></think> tags for moderate reasoning.** Call the Thinker sub-agent for anything more complex.
31923
31924
 
31924
31925
  # Output Style
@@ -31947,7 +31948,7 @@ Scripts: ${Object.keys(pkg.scripts).join(", ")}`;
31947
31948
 
31948
31949
  # Sub-Agent Orchestration
31949
31950
 
31950
- You have specialized sub-agents available as tools. **Your strong default should be to delegate to sub-agents** for anything beyond trivially simple operations. Sub-agents are specialists \u2014 they produce better, more thorough results than you chaining basic tools manually.
31951
+ You have specialized sub-agents available as tools. **Nothing happens automatically \u2014 you are responsible for orchestrating ALL sub-agent work through your own tool calls.** No code review, no context pruning, no validation runs unless YOU explicitly call the appropriate tool. Sub-agents are specialists \u2014 they produce better, more thorough results than you chaining basic tools manually.
31951
31952
 
31952
31953
  ## Available Sub-Agents
31953
31954
 
@@ -31966,8 +31967,8 @@ You have specialized sub-agents available as tools. **Your strong default should
31966
31967
  - **Commander** \u2014 Terminal command specialist. Plans and executes shell commands for a goal. Use instead of calling Bash directly for multi-step operations.
31967
31968
 
31968
31969
  **Review & Maintenance:**
31969
- - **CodeReview** / **CodeReviewMulti** \u2014 Reviews code changes for bugs, security, edge cases. CodeReviewMulti runs automatically after edits.
31970
- - **ContextPruner** \u2014 Summarizes conversation history to free context space.
31970
+ - **CodeReview** / **CodeReviewMulti** \u2014 Reviews code changes for bugs, security, edge cases. You MUST call one of these yourself after making code changes.
31971
+ - **ContextPruner** \u2014 Summarizes conversation history to free context space. Call when the conversation is getting long.
31971
31972
 
31972
31973
  ## How to Orchestrate (use your judgment)
31973
31974
 
@@ -31993,7 +31994,7 @@ You have specialized sub-agents available as tools. **Your strong default should
31993
31994
  - If checks fail, fix and re-run. If blocked, clearly state what's failing.
31994
31995
 
31995
31996
  **Phase 5 \u2014 Review:**
31996
- - CodeReviewMulti runs automatically after edits \u2014 don't duplicate its work.
31997
+ - After making code changes, call CodeReview or CodeReviewMulti yourself to review the changes. Nothing runs automatically.
31997
31998
  - If the review finds issues, fix them and re-validate.
31998
31999
 
31999
32000
  ## When to Skip Sub-Agents and Act Directly
@@ -32474,7 +32475,11 @@ var require_toolExecutors = __commonJS((exports, module2) => {
32474
32475
  return response.choices[0]?.message?.content || response.choices[0]?.message?.reasoning_content || "";
32475
32476
  }
32476
32477
  } catch (err) {
32477
- if (attempt < 2 && err.status >= 400 && err.status < 500) {
32478
+ if (err.status === 404 && params.model !== NVIDIA_MODEL && attempt < 2) {
32479
+ params = { ...params, model: NVIDIA_MODEL };
32480
+ continue;
32481
+ }
32482
+ if (attempt < 2 && (err.status === 429 || err.status >= 500)) {
32478
32483
  await sleep(1000 * Math.pow(2, attempt));
32479
32484
  continue;
32480
32485
  }
@@ -33763,9 +33768,7 @@ var require_agent = __commonJS((exports, module2) => {
33763
33768
  session.turnCount++;
33764
33769
  store.addMessage({ role: "user", content: userInput });
33765
33770
  session.conversationHistory.push({ role: "user", content: userInput });
33766
- const startTime2 = Date.now();
33767
33771
  let turnTokens = 0;
33768
- let turnToolCalls = 0;
33769
33772
  try {
33770
33773
  store.addMessage({ role: "divider" });
33771
33774
  const systemPrompt = buildSystemPrompt();
@@ -34037,7 +34040,6 @@ var require_agent = __commonJS((exports, module2) => {
34037
34040
  const success = !result.startsWith("Error");
34038
34041
  const elapsed = Date.now() - callStart;
34039
34042
  session.toolCallCount++;
34040
- turnToolCalls++;
34041
34043
  if (msgId) {
34042
34044
  store.updateMessage(msgId, {
34043
34045
  detail,
@@ -34078,27 +34080,6 @@ var require_agent = __commonJS((exports, module2) => {
34078
34080
  store.addMessage({ role: "system", content: `\u26A0 Reached maximum tool iterations (${MAX_TOOL_ITERATIONS}). Stopping.` });
34079
34081
  }
34080
34082
  session.totalTokens += turnTokens;
34081
- if (session.filesModified.size > 0) {
34082
- const reviewPrompt = `User request: ${userInput}
34083
-
34084
- ${turnTokens > 0 ? `Processed with ${turnTokens} tokens and ${turnToolCalls} tool calls.` : ""}`;
34085
- const reviewId = store.addMessage({ role: "system", content: "Multi-perspective code review...", label: "\uD83D\uDCCB Code Review" });
34086
- try {
34087
- const reviewResult = await executeTool("CodeReviewMulti", { prompt: reviewPrompt }, (partial) => {
34088
- store.updateMessage(reviewId, { content: partial, label: "\uD83D\uDCCB Code Review" });
34089
- });
34090
- store.updateMessage(reviewId, { content: reviewResult, label: "\uD83D\uDCCB Code Review" });
34091
- session.conversationHistory.push({
34092
- role: "assistant",
34093
- content: `
34094
-
34095
- --- Code Review ---
34096
- ${reviewResult}`
34097
- });
34098
- } catch (err) {
34099
- store.updateMessage(reviewId, { content: `Code review failed: ${err.message}` });
34100
- }
34101
- }
34102
34083
  } catch (err) {
34103
34084
  store.clearStreaming();
34104
34085
  let errorMsg = `Error: ${err.message}`;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "apex-dev",
3
- "version": "3.6.0",
3
+ "version": "3.8.0",
4
4
  "description": "Apex AI - a friendly agentic coding assistant for the terminal",
5
5
  "main": "dist/index.js",
6
6
  "bin": {