今日已更新 179 条资讯 | 累计 37084 条内容
关于我们

今日精选

HOT

最新资讯

共 37084 篇
第 1724/1855 页
AI 资讯 Dev.to

I built an n8n MCP Server so Claude can list, run, and monitor my workflows in plain English

I got tired of opening the n8n dashboard every time I needed to check on a workflow. You know the drill: open browser → navigate to executions → find the right workflow → check status → close. Five clicks for something that should be instant. So I built a 9-node n8n workflow that exposes my entire n8n instance to Claude Desktop via the Model Context Protocol (MCP) . Now I just type: "Did my backup automation run successfully last night?" And Claude calls my real n8n API and responds with the execution status. No browser. No clicking. What is MCP? MCP (Model Context Protocol) is an open standard from Anthropic that lets AI assistants connect to external tools and data sources. Instead of just answering questions from training data, Claude can call real APIs, read live data, and take actions. n8n already has an MCP Server Trigger node (available in 1.70+). I used it to expose 4 tools to Claude: Tool What it does list_workflows Returns all active workflows with IDs and names run_workflow Triggers any workflow by ID get_executions Pulls recent execution history with status search_workflows Keyword filter across all workflow names How it works The architecture is simple: Claude Desktop → mcp-remote → n8n MCP Server Trigger → Code nodes → n8n REST API Each of the 4 tools is a Code node that calls the n8n REST API internally using X-N8N-API-KEY authentication. The workflow: MCP Server Trigger — SSE endpoint that Claude connects to list_workflows — GET /api/v1/workflows?active=true run_workflow — POST /api/v1/workflows/{id}/run get_executions — GET /api/v1/executions?workflowId={id}&limit=N search_workflows — keyword filter on workflow names Credentials are stored in n8n Variables ( $vars.N8N_BASE_URL and $vars.N8N_API_KEY ) — never hardcoded. The Claude Desktop config { "mcpServers" : { "n8n" : { "command" : "npx" , "args" : [ "mcp-remote" , "https://your-n8n-instance.com/mcp/your-webhook-id/sse" ] } } } Restart Claude Desktop. Claude now has access to your n8n instance. R

Penumbra Ghost 2026-06-01 02:35 6 原文
AI 资讯 Dev.to

Your MCP servers can read your SSH keys. Anthropic just fixed that.

Every MCP server you run locally executes with your full filesystem and network permissions. That means the GitHub MCP server, the Slack one, that third-party tool you installed from npm last week — all of them can read your SSH keys, .env files, and credential stores by default. Anthropic just open-sourced the fix: sandbox-runtime , the sandboxing layer they built for Claude Code. One-line wrap, no Docker, OS-level enforcement. What actually changed srt (the Sandbox Runtime CLI) enforces filesystem and network restrictions on any process using native OS primitives: macOS : Uses sandbox-exec with dynamically generated Seatbelt profiles Linux : Uses bubblewrap for containerization + network namespace isolation Network filtering : HTTP/HTTPS traffic routes through an HTTP proxy; other TCP goes through SOCKS5 — both enforce your domain allowlists Install it: npm install -g @anthropic-ai/sandbox-runtime Wrap an MCP server in your .mcp.json — change command from npx to srt , move the rest to args : { "mcpServers" : { "filesystem" : { "command" : "srt" , "args" : [ "npx" , "-y" , "@modelcontextprotocol/server-filesystem" ] } } } Then configure what the process is actually allowed to touch in ~/.srt-settings.json : { "filesystem" : { "denyRead" : [ "~/.ssh" ], "allowWrite" : [ "." ], "denyWrite" : [ "~/sensitive-folder" ] }, "network" : { "allowedDomains" : [ "api.github.com" , "*.npmjs.org" ] } } The result: the MCP server can work in your project directory, talk to the domains it needs, and nothing else. Why this matters The threat model is real. An MCP server running compromised code — or simply a server with more ambient access than it needs — can exfiltrate your SSH keys, read your .env files, or phone home to arbitrary hosts. This isn't theoretical; it's the same class of supply-chain risk that exists for any untrusted npm package, except MCP servers are typically long-running processes with broad system access. srt is designed secure-by-default : processes start wit

Andrew Kew 2026-06-01 02:31 10 原文
AI 资讯 Dev.to

I Built an Autonomous RBI Regulatory Digest Agent with Hermes Agent

This is a submission for the Hermes Agent Challenge : Build With Hermes Agent The Problem Nobody Talks About Every time the Reserve Bank of India publishes a circular, somewhere inside an Indian bank, a compliance officer opens a PDF. They read it. They try to figure out what it means for their institution specifically. They write a summary email. They forward it to five department heads. They chase those department heads for two weeks to confirm it's been actioned. They build a spreadsheet to track all of this. And then the next circular drops and the cycle starts again. RBI publishes hundreds of circulars a year. SEBI publishes more. MCA publishes more still. Compliance teams at Indian banks are drowning — not because they're incompetent, but because the volume of regulatory output has outpaced any reasonable human ability to track it manually. The fine for missing a deadline isn't a polite reminder. It's a penalty notice. This is the problem I built for. What I Built RBI Regulatory Digest Agent — an autonomous multi-step agent powered by Hermes Agent that monitors RBI and SEBI publication feeds, reads every new circular, extracts structured action points from the regulatory text, and delivers a formatted intelligence report to compliance teams automatically. No human reads the circular first. No human decides what's important. No human routes it to the right department. The agent does all of that. The pipeline RBI/SEBI feeds → new circular detected → full text extracted → LLM analysis → structured action points → risk classification → HTML dashboard generated → email delivered Every action point extracted contains: What needs to be done — specific and actionable, not a vague summary Deadline — parsed from the circular text Responsible department — Credit, Compliance, Treasury, Operations, IT, Legal Evidence required — what documentation confirms completion Priority — Critical (overdue or <7 days), High, Medium, Low From a new circular to a structured compliance b

Kunal Pratap Singh 2026-06-01 02:30 10 原文
AI 资讯 Dev.to

Error: Cannot Set Headers After They Are Sent to the Client

Error: Cannot Set Headers After They Are Sent to the Client If you've built APIs with Express for any length of time, you've probably seen this error: Error [ ERR_HTTP_HEADERS_SENT]: Cannot set headers after they are sent to the client Or: Cannot set headers after they are sent to the client The frustrating part is that the application often works for some requests and fails only under specific conditions. This error is almost always caused by sending multiple responses for the same request. Let's break down why it happens and how to prevent it in production code. Problem Consider this Express route: app . get ( " /users/:id " , ( req , res ) => { if ( ! req . params . id ) { res . status ( 400 ). json ({ error : " User ID required " }); } res . json ({ id : req . params . id }); }); Looks harmless. But if the first response is sent, Express continues executing the remaining code. Result: Error [ ERR_HTTP_HEADERS_SENT]: Cannot set headers after they are sent to the client The server attempts to send two responses for a single request. HTTP doesn't allow that. Why It Happens A request can only receive one response. Once Express sends: res . send (); or res . json (); or res . redirect (); or res . end (); the HTTP headers are already transmitted. Any attempt to modify headers or send another response will trigger the error. In production systems, this usually happens because of: Missing return statements Multiple async operations Duplicate error handling Middleware issues Promise and callback mixing Race conditions Example Missing Return Statement This is the most common cause. app . get ( " /profile " , ( req , res ) => { if ( ! req . user ) { res . status ( 401 ). json ({ error : " Unauthorized " }); } res . json ( req . user ); }); If req.user is missing: res . status ( 401 ). json (...) runs first. Then: res . json ( req . user ) runs immediately afterward. Two responses. One request. Crash. Correct Version app . get ( " /profile " , ( req , res ) => { if ( ! req

Nilesh Raut 2026-06-01 02:30 10 原文
AI 资讯 Dev.to

Novelty by AI ที่มา Disproved Erdős Planar Unit Distance Problem

AI จะครองโลก เป็นคำที่ได้ยินมานาน เท่าที่ผู้เขียนจำความได้ก็มี Judgement Day ยุคหนัง Terminator แต่หากจะจริงจังขนาดโยงเข้าความเป็นจริงก็ยังไม่มีอะไรชัดเจน แต่วันนี้เรามีหลักฐานพิสูจน์ได้จริงแล้ว ด้วยความ Novelty จาก OpenAI ที่สามารถค้นพบความรู้ใหม่ที่ไม่เคยมีมนุษย์ค้นพบมาก่อน หักล้างความเชื่อที่ว่า AI ทำได้เพียงนำสิ่งที่มนุษย์ค้นพบแล้วมาเรียงต่อกัน ในเดือนพฤษภาคม 2026 reasoning model ภายในของ OpenAI ได้ disprove Erdős Planar Unit Distance Problem ซึ่งเป็นปัญหาและข้อคาดการณ์ทาง Combinatorial geometry ที่ Paul Erdős ตั้งไว้ตั้งแต่ปี 1946 โจทย์ระบุว่า เมื่อวางจุด nn n จุดบนระนาบ จำนวนของคู่จุดที่ห่างกันพอดี 1 หน่วยจะมีได้มากที่สุดเท่าใด Erdős แสดงความเป็นไปได้ผ่านการจัดเรียงแบบ grid ว่าได้จำนวนคู่ที่เติบโตเหนือเส้นตรงเพียงเล็กน้อย และตั้งข้อคาดการณ์ว่าไม่มีโครงสร้างใดทำได้ดีกว่านี้อย่างมีนัยสำคัญ ข้อคาดการณ์นี้ได้รับการยอมรับในวงกว้างตลอด 80 ปีที่ผ่านมา และยังไม่มีข้อคาดการณ์ที่ดีกว่านี้ จนกระทั่ง OpenAI ได้เผยแพร่ Chain of Thought (CoT) เรียบเรียงความยาว 125 หน้า ซึ่งบันทึกลำดับการให้เหตุผลของโมเดลไว้ทั้งกระบวนการว่าโมเดลไปถึงคำตอบอย่างไร กรอบของคำตอบ: lower bound กับ upper bound ก่อนเข้ากระบวนการทำงานของโมเดล ขออธิบาย "กรอบ" ของคำตอบของปัญหานี้ก่อน เพราะคำตอบถูกล้อมไว้ด้วย lower bound จำนวนที่สร้างได้จริงแล้ว อย่างน้อยเท่านี้ และ upper bound เพดานที่พิสูจน์แล้วว่าเกินไม่ได้ ด้าน lower bound นั้น Erdős เอง (1946) ใช้การจัดเรียงแบบ grid แสดงว่าสร้างได้ถึง n1+Ω(1/log⁡log⁡n)n^{1+\Omega(1/\log\log n)} n 1 + Ω ( 1/ l o g l o g n ) ซึ่งมากกว่าเส้นตรงเพียงเล็กน้อย และเข้าใกล้ศูนย์เมื่อ nn n ใหญ่ขึ้น ส่วนด้าน upper bound นั้น Erdős พิสูจน์เพดานแรกไว้ที่ O(n3/2)O(n^{3/2}) O ( n 3/2 ) จากวงกลมหนึ่งหน่วยสองวงตัดกันได้ไม่เกินสองจุด โดยต่อมา Spencer–Szemerédi–Trotter (1984) บีบเพดานนี้ลงมาเป็น O(n4/3)O(n^{4/3}) O ( n 4/3 ) ซึ่งเป็น upper bound ที่ดีที่สุดจนถึงปัจจุบัน และยังคงอยู่หลังการค้นพบของ OpenAI model วิธีเก่าของ Erdős: วงกลมรัศมีเลือกมาลากผ่านจุด grid หลายจุดพร้อมกัน ทำให้ระยะซ้ำมีมาก สิ่งที่ Erdős คาดการณ์คือ คำตอบจริงของ Planar Unit Distance Problem ควรอยู่ชิดด้าน lower

terngr 2026-06-01 02:29 9 原文
AI 资讯 Dev.to

Markov Chain Coin Sequence: E[HH] vs E[HTH] Explained

In This Article The Question The Intuition Trap Building the State Machine for HH Solving the System: E[HH] = 6 Building the State Machine for HTH Solving the System: E[HTH] = 10 Why Overlapping Patterns Change Everything Python Simulation: 100,000 Trials Business Application: Credit Migration & Web Ranking The Question You flip a fair coin — one with probability 1/2 of landing heads and 1/2 of landing tails — repeatedly, recording every result. What is the expected number of flips required until the sequence HH appears for the first time as consecutive results? What is the expected number of flips required until HTH appears for the first time? Both questions have the same surface structure: you want a specific consecutive pattern, and you want to know, on average, how many flips it takes to observe it. The coin is fair, the flips are independent, and the patterns are short. These seem like they should yield similar answers. They do not. HH takes exactly 6 flips on average. HTH takes exactly 10. The four-flip gap between those two answers is not a rounding artifact or a computational error — it is a precise consequence of the internal structure of each pattern, and deriving it rigorously is one of the cleanest demonstrations of absorbing Markov chain analysis you will encounter. This problem appears frequently in quantitative finance interviews — at firms like Jane Street, Citadel, and Two Sigma — precisely because it separates candidates who understand Markov structure from those who rely on heuristic reasoning. Getting the answer right, and being able to explain it, requires building a state machine, writing the system of first-step equations, and solving it algebraically. That is exactly what we will do. The Intuition Trap Before the formal derivation, it is worth examining why intuition fails here. The most common wrong answer from candidates is that both expected values should be "similar" because the patterns are comparable in length. This intuition imports th

White Oak Intelligence 2026-06-01 02:25 12 原文
AI 资讯 Dev.to

LLM Deal Flow Automation in CRM

In This Article The Deal Intelligence Gap Data Model Design Transcript Analysis with Claude Automated Follow-Up Drafting PostgreSQL JSONB Storage Putting It Together The Deal Intelligence Gap Most CRM systems are excellent at storing what happened — call logged, email sent, stage updated — and poor at capturing what was learned. A sales call produces qualitative intelligence that is genuinely valuable for deal strategy: what objections surfaced, how strongly the prospect signaled interest, what next steps were agreed to, and what risk flags the conversation revealed. That intelligence almost never makes it into the CRM because it requires someone to spend 15 minutes synthesizing unstructured notes into structured fields. Large language models change this equation. Given a call transcript, Claude can extract structured deal intelligence in seconds — categorizing sentiment, identifying specific objections, recommending stage movement, and flagging risk signals — with accuracy that equals or exceeds what a well-trained sales analyst would produce manually. Data Model Design The data model centers on two tables. The deals table stores core deal attributes as a JSONB column, which allows flexible schema evolution without migrations as the intelligence fields change over time. The deal_activities table records each interaction — calls, emails, meetings — with the raw content in TEXT and the extracted intelligence in a separate JSONB column. A GIN index on both JSONB columns enables fast attribute queries across the deal pipeline. CREATE TABLE deals ( id UUID PRIMARY KEY DEFAULT gen_random_uuid (), company TEXT NOT NULL , contact TEXT , stage TEXT , attributes JSONB DEFAULT '{}' , created_at TIMESTAMPTZ DEFAULT now (), updated_at TIMESTAMPTZ DEFAULT now () ); CREATE TABLE deal_activities ( id UUID PRIMARY KEY DEFAULT gen_random_uuid (), deal_id UUID REFERENCES deals ( id ), activity_type TEXT , raw_content TEXT , intelligence JSONB , created_at TIMESTAMPTZ DEFAULT now () )

White Oak Intelligence 2026-06-01 02:25 12 原文
AI 资讯 Dev.to

pypdf vs PdfPig: Text Extraction at Scale

Overview PDF text extraction is a common pre-processing step in data pipelines — ingesting research papers, legal documents, or reports before embedding or indexing. Both pypdf and PdfPig are pure managed-code parsers: no native binaries, no OCR, no system PDF renderer. They implement the same PDF specification operations in their respective languages. This makes the benchmark unusually clean: the performance difference is entirely due to language execution speed, not library architecture differences. Benchmark Setup 200 recent arXiv PDFs (mixed technical papers, 5–40 pages each). Tested on subsets of 10, 50, 100, and 200 files. Both libraries extract all text from all pages; output is validated for page-count agreement and character-count agreement within 15% (pypdf and PdfPig decode whitespace and encoding tables slightly differently). Results PDFs Pages Python (pypdf) .NET (PdfPig) Speedup 10 ~120 ~0.9 s ~230 ms 3.9× 50 ~600 ~4.2 s ~810 ms 5.2× 100 ~1,200 ~8.5 s ~1.4 s 6.1× 200 ~2,400 ~17 s ~2.7 s 6.2× The speedup grows slightly with corpus size, suggesting pypdf has a per-document startup cost that compounds as PdfPig's JIT gets warmer. Why PdfPig Is Faster PDF parsing is byte-heavy: every page is a stream of PostScript-like operators (move, show text, set font, etc.). Each operator must be lexed, looked up in a dispatch table, and executed against a graphics state machine. In Python, each operator dispatch is a Python method call — the CPython bytecode interpreter has overhead per call regardless of what the method does. In .NET, the JIT compiles the dispatch loop to native code the first time it runs; subsequent pages pay only the cost of the actual work. Additionally, PdfPig's content-stream parser operates on ReadOnlySpan<byte> — zero-copy slicing through the raw page bytes with no intermediate string allocations. pypdf builds Python string objects for each token. Key Code // PdfPig — zero-copy span-based page extraction public Result Extract ( string path )

Milliseconds.dev 2026-06-01 02:20 14 原文
开发者 Dev.to

NetworkX vs CSR + TensorPrimitives: PageRank on 28M Edges

Overview PageRank is the canonical graph algorithm. NetworkX implements it in pure Python — its dict-of-dict adjacency representation means every power-iteration step dispatches millions of Python attribute lookups. When the graph has 1.8 million nodes and 28.5 million edges (Wikipedia category hyperlinks), those lookups dominate the runtime. The .NET replacement uses a CSR (Compressed Sparse Row) matrix — two flat int[] arrays for the graph structure — and TensorPrimitives for the SIMD-accelerated normalization step inside each iteration. Benchmark Setup Five SNAP datasets of increasing size: Dataset Nodes Edges wiki-Vote 7,115 103,689 soc-Epinions1 75,879 508,837 web-Stanford 281,903 2,312,497 web-Google 875,713 5,105,039 wiki-topcats 1,791,489 28,511,807 Algorithm: power-iteration PageRank, damping=0.85, tol=1e-6. Both implementations converge to identical top-10 node rankings. Results Dataset Python (NetworkX) .NET (CSR) Speedup wiki-Vote (103k edges) ~0.8 s ~100 ms ~8× soc-Epinions1 (508k edges) ~8 s ~600 ms ~13× web-Stanford (2.3M edges) ~120 s ~5 s ~24× web-Google (5.1M edges) ~5.5 min ~12 s ~28× wiki-topcats (28.5M edges) ~47 min ~60 s ~47× The speedup grows with graph size because NetworkX's Python dispatch cost scales with edge count, while the CSR inner loop is a tight JIT-compiled SIMD pass. Why CSR Beats NetworkX NetworkX represents each node's neighbors as a Python dict. Iterating the adjacency in one power-iteration step means: Calling G.neighbors(node) — a Python method call Iterating a dict — unboxing int keys, chasing heap pointers Accumulating a float into another dict value — another boxing step That happens for every edge, every iteration, roughly 50–80 times to convergence. CSR collapses the graph to two arrays: rowPtr[n+1] (where each node's neighbors start) and colIdx[edges] (the neighbor list). Iterating neighbors of node v is a tight C loop from rowPtr[v] to rowPtr[v+1] . No Python objects, no dict hashing, no pointer chasing. Key Code // P

Milliseconds.dev 2026-06-01 02:20 12 原文
AI 资讯 Dev.to

CareSync: A Local Health Memory Agent for Family Caregivers

This is a submission for the * Hermes Agent Challenge * : Build With Hermes Agent What I Built CareSync is a local health memory agent for student caregivers. I'm Naomi, a 21-year-old engineering student. Between classes I help care for my grandma Kamala (78, high blood pressure, type 2 diabetes). I often forgot details from previous doctor visits, missed symptom patterns, and struggled to hand over care information to family members. CareSync solves that with longitudinal memory. Symptoms, meals, vitals, medications, and reports are stored in a local SQLite database. The CLI can search history, identify patterns, and generate appointment summaries. Hermes Agent exposes the same capabilities through natural language. What you get: One-line logging: ./caresync add "dizzy spell after lunch" Pattern search across weeks of history Medication tracking and report imports Doctor questions, appointment briefs, and handoff notes Full audit log of agent actions 7 Hermes skills mapped to real terminal commands Local-first design with no cloud storage CareSync is not medical advice. It helps caregivers observe, organize, and prepare. Demo The demo walks through: Logging a new symptom Searching health history for recurring patterns Generating doctor questions and appointment briefs Using Hermes in natural language to query past events Reviewing the audit trail of actions taken Example commands shown in the demo: ./caresync search --person Kamala --query dizziness ./caresync timeline --person Kamala ./caresync questions --person Kamala ./caresync brief --person Kamala --days 14 ./caresync chat "has grandma been dizzy before?" Code Repository: https://github.com/Byte-Sized-Brain/caresync Architecture My Tech Stack Hermes Agent Python 3.12 SQLite agentskills.io skill framework Terminal-based CLI Nous Portal How I Used Hermes Agent CareSync uses Hermes Agent as the orchestration layer between natural language and real caregiving workflows. I created 7 Hermes skills that map directly

Naomi Pereira 2026-06-01 02:20 10 原文
AI 资讯 Dev.to

The compiler caught a lot. It didn't catch enough.

I built a small web scraping framework in Rust, mostly with an AI doing the typing. It's called ferrous — a Colly-style collector: register CSS selector callbacks, queue URLs, write JSONL. About 700 lines. The pitch I kept hearing, and half-believed, was that Rust and LLMs are a good match now: the borrow checker is a correctness oracle the model can lean on, so the class of bugs that plagues AI-written Python just won't compile. That's true. It's also where the story gets uncomfortable, because the build was green and the code was still wrong. How I worked I'm not a Rust native. ferrous was partly an excuse to get fluent — build something real instead of reading about lifetimes — and partly a test of how far an LLM could carry the typing while I drove. The loop was plain: describe the next change in English, let the model write the Rust, read what came back, run cargo , move on. It kept observations.md as a running design journal, one entry per change, each with a short rationale for the decision it made. That setup has a soft spot, and it's the whole point of this post. When you drive a language you don't fully know, the only reviewer you've got with real authority is the compiler. Everything past that — is this idiomatic, is it the right abstraction, does it actually do what the journal claims — depends on already knowing what correct looks like. Which is exactly the knowledge a learner doesn't have yet. Keep that in mind through the next part, because it's the difference between the one bug I could have caught and the six I couldn't. The bug that the toolchain told me wasn't there I ship two fetch backends. The default goes through the Zyte API; an optional one, gated behind a wreq feature, makes direct requests with browser TLS emulation. Each has an example. After a refactor that added URL resolution — ctx.resolve_and_visit(href) so callbacks stop hand-building absolute URLs — I had the model update the examples to use it. It did, and it wrote up the change in

John Rooney 2026-06-01 02:20 14 原文