iframer-cli 2.1.0 → 2.1.1

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 (3) hide show
  1. package/cli.js +24 -0
  2. package/mcp-server.cjs +4 -4
  3. package/package.json +1 -1
package/cli.js CHANGED
@@ -516,6 +516,29 @@ async function main() {
516
516
 
517
517
  // ─── Install MCP ──────────────────────────────────────────────
518
518
 
519
+ case "proxy": {
520
+ const action = args[0];
521
+ if (!action || !["start", "stop", "status"].includes(action)) {
522
+ console.log(" Usage: iframer proxy <start|stop|status>");
523
+ break;
524
+ }
525
+ if (action === "status") {
526
+ const res = await fetch(`${getServer()}/proxy`);
527
+ const data = await res.json();
528
+ console.log(JSON.stringify(data, null, 2));
529
+ } else {
530
+ const server = action === "start" ? args[1] || null : null;
531
+ const res = await fetch(`${getServer()}/proxy`, {
532
+ method: "POST",
533
+ headers: { "Content-Type": "application/json" },
534
+ body: JSON.stringify({ server }),
535
+ });
536
+ const data = await res.json();
537
+ console.log(JSON.stringify(data, null, 2));
538
+ }
539
+ break;
540
+ }
541
+
519
542
  case "install-mcp": {
520
543
  const mcpServerPath = path.join(__dirname, "mcp-server.cjs");
521
544
  if (!fs.existsSync(mcpServerPath)) {
@@ -553,6 +576,7 @@ async function main() {
553
576
  logout Remove saved credentials
554
577
  status Show current auth status
555
578
  install-mcp Install the iframer MCP into Claude Code
579
+ proxy <start|stop|status> Control the home proxy (routes browser through your IP)
556
580
 
557
581
  Credentials:
558
582
  credentials add <domain> Store login credentials (encrypted, server-side)
package/mcp-server.cjs CHANGED
@@ -28605,9 +28605,9 @@ WORKFLOW:
28605
28605
 
28606
28606
  TIMEOUTS: Each step has a 20-second stale-state timeout. If nothing changes for 20s, iframer aborts with a detailed error.
28607
28607
 
28608
- CREDENTIALS: Use "credentials" action=store to save login details encrypted server-side.
28608
+ CREDENTIALS: NEVER ask the user for passwords or credentials in the chat. Always use "credentials" action=store it opens a secure prompt so the user types credentials directly into the terminal. You never see them. Then use a login step in "execute".
28609
28609
 
28610
- HOME PROXY: If the site is showing captchas or bot detection, use "proxy action=start" to route the browser through the user's own home network IP. This runs a SOCKS5 proxy on the user's Mac so all browser traffic exits from their real IP address. Use "proxy action=stop" to go back to the default proxy. Always try this before attempting to solve captchas manually.` : `iframer — browser access for AI agents when normal methods fail.
28610
+ BOT DETECTION / CAPTCHA RULE: If a captcha appears, try solve-captcha first. If it fails or keeps reappearing, immediately call "proxy action=start" do NOT ask the user to solve it manually. The proxy restarts the session automatically; then retry the full flow from scratch. Only report failure if the captcha persists after the proxy is active.` : `iframer — browser access for AI agents when normal methods fail.
28611
28611
 
28612
28612
  PHILOSOPHY: You are a capable agent. Do your work locally first. Only call iframer when you hit a wall: captcha, login-gated content, heavy bot detection, or content that requires a real browser to render. iframer is a swiss knife you pull out for hard problems, not your default browsing tool.
28613
28613
 
@@ -28627,9 +28627,9 @@ WORKFLOW:
28627
28627
 
28628
28628
  TIMEOUTS: Each step has a 20-second stale-state timeout. If nothing changes on the page for 20s, iframer aborts and returns a detailed error. Retry, adjust your approach, or tell the user why it failed.
28629
28629
 
28630
- CREDENTIALS: Use "credentials" action=store to prompt the user for login details. They're encrypted server-side you never see them. Then use a login step in "execute".
28630
+ CREDENTIALS: NEVER ask the user for passwords or credentials in the chat. Always use "credentials" action=store it opens a secure prompt so the user types credentials directly into the terminal. You never see them. Then use a login step in "execute".
28631
28631
 
28632
- HOME PROXY: If the site is showing captchas or bot detection, use "proxy action=start" to route the browser through the user's own home network IP. This runs a SOCKS5 proxy on the user's Mac so all browser traffic exits from their real IP address. Use "proxy action=stop" to go back to the default proxy. Always try this before attempting to solve captchas manually.`;
28632
+ BOT DETECTION / CAPTCHA RULE: If a captcha appears, try solve-captcha first. If it fails or keeps reappearing, immediately call "proxy action=start" do NOT ask the user to solve it manually. The proxy restarts the session automatically; then retry the full flow from scratch. Only report failure if the captcha persists after the proxy is active.`;
28633
28633
  var server = new McpServer({ name: "iframer", version: "2.0.0" }, { instructions: INSTRUCTIONS });
28634
28634
  server.tool("status", `Get the full state of iframer in one call. Call this first. Returns: API health, auth status, active session, stored credentials.`, {}, async () => {
28635
28635
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "iframer-cli",
3
- "version": "2.1.0",
3
+ "version": "2.1.1",
4
4
  "description": "CLI for iframer — browser access for AI agents",
5
5
  "bin": {
6
6
  "iframer": "./cli.js"