@livx.cc/agentx 0.99.76 → 0.99.78

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/cli.js CHANGED
@@ -359,13 +359,13 @@ function clauses(sentence) {
359
359
  return sentence.split(/[,;:]\s*|\s+(?:so|but|and|then|because|however|therefore|thus|although|though)\s+/i).map((c) => c.trim()).filter(Boolean);
360
360
  }
361
361
  function endsOnAnnouncedAction(text) {
362
- const sentences = text.split(/(?<=[.!?])\s+|\n+/).map((s) => s.trim()).filter(Boolean);
362
+ const sentences = text.split(/(?<=[.!?])\s+|\n+/).map((s) => s.replace(/^[\s#>*_`-]+|[*_`]+/g, "").trim()).filter(Boolean);
363
363
  const last = sentences[sentences.length - 1];
364
- if (!last || NEXT_STEP.test(last) || SIGN_OFF.test(last)) return false;
364
+ if (!last || sentences.slice(-2).some((s) => NEXT_STEP.test(s)) || SIGN_OFF.test(last) || AWAITS_USER.test(last)) return false;
365
365
  if (PROGRESSIVE.test(last)) return true;
366
366
  return clauses(last).some((c) => !NEXT_STEP.test(c) && !SIGN_OFF.test(c) && COMMITMENT.test(c));
367
367
  }
368
- var log3, p_sep, IMAGE_ELIDE_STUB, IMAGE_REF_SCHEME, REF_REGISTRY_MAX, refRegistry, isImageRefUrl, bearsImage, COMMITMENT, PROGRESSIVE, NEXT_STEP, SIGN_OFF;
368
+ var log3, p_sep, IMAGE_ELIDE_STUB, IMAGE_REF_SCHEME, REF_REGISTRY_MAX, refRegistry, isImageRefUrl, bearsImage, COMMITMENT, PROGRESSIVE, NEXT_STEP, SIGN_OFF, AWAITS_USER;
369
369
  var init_llm = __esm({
370
370
  "src/llm.ts"() {
371
371
  "use strict";
@@ -383,6 +383,7 @@ var init_llm = __esm({
383
383
  PROGRESSIVE = /^(?:also\s+|now\s+|then\s+)*(?:re-?)?(?:check|search|scan|read|verify|run|inspect|expand|look|examin|continu|proceed|try|fetch|load|open|test|build|grep|find|review|trac|dig|explor)\w*ing\b/i;
384
384
  NEXT_STEP = /^next (?:step|run|up)\b/i;
385
385
  SIGN_OFF = /^let me know\b/i;
386
+ AWAITS_USER = /^(?:do you )?(?:want|need) me to\b|\b(?:once|as soon as|after) you\b|\bwhen you(?:'re| are) ready\b/i;
386
387
  }
387
388
  });
388
389
 
@@ -12082,12 +12083,11 @@ function toClaudeCodeMcp(servers) {
12082
12083
  function claudeCodeProviderOptions(model, cwd, mcpServers) {
12083
12084
  if (!(model ?? "").startsWith("claude-code/")) return void 0;
12084
12085
  const env = (() => {
12085
- if (process.env.AGENTX_CC_USE_API_KEY) return void 0;
12086
- const { ANTHROPIC_API_KEY, ANTHROPIC_AUTH_TOKEN, ...rest } = process.env;
12087
- return rest;
12086
+ const base = process.env.AGENTX_CC_USE_API_KEY ? process.env : (({ ANTHROPIC_API_KEY, ANTHROPIC_AUTH_TOKEN, ...rest }) => rest)(process.env);
12087
+ return { ENABLE_CLAUDEAI_MCP_SERVERS: "false", ...base };
12088
12088
  })();
12089
12089
  const warm = process.env.AGENTX_CC_WARM === "0" ? {} : { claudeCodeSession: randomUUID() };
12090
- return { cwd, ...env ? { env } : {}, ...warm, ...toClaudeCodeMcp(mcpServers) ?? {} };
12090
+ return { cwd, env, ...warm, ...toClaudeCodeMcp(mcpServers) ?? {} };
12091
12091
  }
12092
12092
  function providerOptionsFor(model, cwd, mcpServers, hostMcpServers) {
12093
12093
  return cursorProviderOptions(model, cwd, mcpServers, hostMcpServers) ?? claudeCodeProviderOptions(model, cwd, mcpServers);