@causyne/agent 1.20.75 → 1.20.76

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@causyne/agent",
3
- "version": "1.20.75",
3
+ "version": "1.20.76",
4
4
  "description": "Agentic AI for software, tools, and computer workflows",
5
5
  "main": "bin/causyne.js",
6
6
  "type": "module",
package/src/agentLoop.js CHANGED
@@ -390,6 +390,14 @@ You are Kimi — a model powered by KDA (Kimi Delta Attention) with a massive co
390
390
  You are collaborating through the Antigravity high-performance local peer environment.
391
391
  - Formulate precise, atomic actions and avoid repetitive back-and-forth chatter.
392
392
  - Maintain rigorous execution standards: verify code syntax, inspect file changes, and avoid claiming completion without verified evidence.`;
393
+ }
394
+ if (p === 'openrouter') {
395
+ return `OPENROUTER INFERENCE ACTIVATION:
396
+ You are running via OpenRouter. You have access to Causyne Agent's full tool suite:
397
+ - For web searches, use \`web_search\` or \`browser_act\` with actions: [{ "type": "search", "query": "..." }].
398
+ - For downloading assets or running shell commands, use \`sysRun\` (with curl, python, etc.). Full network access is enabled and functional.
399
+ - Do not assume network access or file operations are blocked. Always execute the requested actions to completion.
400
+ - When generating web UI projects, inspect your work using \`browser_act\` preview or \`fs_read\` before concluding.`;
393
401
  }
394
402
  return "";
395
403
  }
@@ -3333,15 +3341,21 @@ You are operating in a text-and-code modality without direct image pixel renderi
3333
3341
  catch {
3334
3342
  // fail-open
3335
3343
  }
3344
+ const hasVisionCapability = this.llm.supportsVision !== false && visionReady && !visionDeclined;
3336
3345
  const isVerified = Boolean(this.webVerificationState.browserActUsed ||
3337
3346
  hasBrowserActOutcome ||
3338
3347
  this.webVerificationState.screenshotTaken ||
3339
- (!browserReady && this.webVerificationState.htmlInspected) ||
3348
+ ((!browserReady || !hasVisionCapability) && this.webVerificationState.htmlInspected) ||
3340
3349
  hasPassingTests ||
3341
3350
  observerVerified);
3342
- if (isWebTask && !browserReady && this.webVerificationState.htmlInspected
3351
+ if (isWebTask && (!browserReady || !hasVisionCapability) && this.webVerificationState.htmlInspected
3343
3352
  && !this.webVerificationState.browserActUsed && !this.webVerificationState.screenshotTaken) {
3344
- this.emitEvent({ type: 'notice', message: 'Source inspection completed. Rendered-page and visual verification were not performed because the browser runtime is unavailable.' });
3353
+ this.emitEvent({
3354
+ type: 'notice',
3355
+ message: !browserReady
3356
+ ? 'Source inspection completed. Rendered-page and visual verification were not performed because the browser runtime is unavailable.'
3357
+ : 'Source inspection completed. Rendered-page visual inspection is not supported by the active model without vision.'
3358
+ });
3345
3359
  }
3346
3360
  if (isWebTask && this.stepsCompleted > 0 && !isVerified) {
3347
3361
  this.emitEvent({
package/src/agentLoop.ts CHANGED
@@ -485,6 +485,15 @@ You are collaborating through the Antigravity high-performance local peer enviro
485
485
  - Maintain rigorous execution standards: verify code syntax, inspect file changes, and avoid claiming completion without verified evidence.`;
486
486
  }
487
487
 
488
+ if (p === 'openrouter') {
489
+ return `OPENROUTER INFERENCE ACTIVATION:
490
+ You are running via OpenRouter. You have access to Causyne Agent's full tool suite:
491
+ - For web searches, use \`web_search\` or \`browser_act\` with actions: [{ "type": "search", "query": "..." }].
492
+ - For downloading assets or running shell commands, use \`sysRun\` (with curl, python, etc.). Full network access is enabled and functional.
493
+ - Do not assume network access or file operations are blocked. Always execute the requested actions to completion.
494
+ - When generating web UI projects, inspect your work using \`browser_act\` preview or \`fs_read\` before concluding.`;
495
+ }
496
+
488
497
  return "";
489
498
  }
490
499
 
@@ -3501,17 +3510,23 @@ You are operating in a text-and-code modality without direct image pixel renderi
3501
3510
  // fail-open
3502
3511
  }
3503
3512
 
3513
+ const hasVisionCapability = this.llm.supportsVision !== false && visionReady && !visionDeclined;
3504
3514
  const isVerified = Boolean(
3505
3515
  this.webVerificationState.browserActUsed ||
3506
3516
  hasBrowserActOutcome ||
3507
3517
  this.webVerificationState.screenshotTaken ||
3508
- (!browserReady && this.webVerificationState.htmlInspected) ||
3518
+ ((!browserReady || !hasVisionCapability) && this.webVerificationState.htmlInspected) ||
3509
3519
  hasPassingTests ||
3510
3520
  observerVerified
3511
3521
  );
3512
- if (isWebTask && !browserReady && this.webVerificationState.htmlInspected
3522
+ if (isWebTask && (!browserReady || !hasVisionCapability) && this.webVerificationState.htmlInspected
3513
3523
  && !this.webVerificationState.browserActUsed && !this.webVerificationState.screenshotTaken) {
3514
- this.emitEvent({ type: 'notice', message: 'Source inspection completed. Rendered-page and visual verification were not performed because the browser runtime is unavailable.' });
3524
+ this.emitEvent({
3525
+ type: 'notice',
3526
+ message: !browserReady
3527
+ ? 'Source inspection completed. Rendered-page and visual verification were not performed because the browser runtime is unavailable.'
3528
+ : 'Source inspection completed. Rendered-page visual inspection is not supported by the active model without vision.'
3529
+ });
3515
3530
  }
3516
3531
  if (isWebTask && this.stepsCompleted > 0 && !isVerified) {
3517
3532
  this.emitEvent({
@@ -329,7 +329,7 @@ export function isBrowserRuntimeInstalled() {
329
329
  if (configured && /(?:chrome|chromium|msedge)(?:\.exe)?$/i.test(path.basename(configured))) {
330
330
  return resolveChromiumRuntime(path.resolve(configured)) !== null;
331
331
  }
332
- return candidates.some(candidate => {
332
+ const hasCamoufox = candidates.some(candidate => {
333
333
  try {
334
334
  assertExecutable(candidate);
335
335
  return Boolean(findResourceDirectory(candidate, realpathSync(candidate)));
@@ -338,6 +338,12 @@ export function isBrowserRuntimeInstalled() {
338
338
  return false;
339
339
  }
340
340
  });
341
+ if (hasCamoufox)
342
+ return true;
343
+ if (!configured) {
344
+ return resolveChromiumRuntime() !== null;
345
+ }
346
+ return false;
341
347
  }
342
348
  catch {
343
349
  return false;
@@ -386,7 +386,7 @@ export function isBrowserRuntimeInstalled(): boolean {
386
386
  if (configured && /(?:chrome|chromium|msedge)(?:\.exe)?$/i.test(path.basename(configured))) {
387
387
  return resolveChromiumRuntime(path.resolve(configured)) !== null;
388
388
  }
389
- return candidates.some(candidate => {
389
+ const hasCamoufox = candidates.some(candidate => {
390
390
  try {
391
391
  assertExecutable(candidate);
392
392
  return Boolean(findResourceDirectory(candidate, realpathSync(candidate)));
@@ -394,6 +394,11 @@ export function isBrowserRuntimeInstalled(): boolean {
394
394
  return false;
395
395
  }
396
396
  });
397
+ if (hasCamoufox) return true;
398
+ if (!configured) {
399
+ return resolveChromiumRuntime() !== null;
400
+ }
401
+ return false;
397
402
  } catch {
398
403
  return false;
399
404
  }