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

今日精选

HOT

最新资讯

共 29734 篇
第 269/1487 页
AI 资讯 Dev.to

Building MCP servers for Claude & Cursor? Here's a starting point.

Most MCP servers I see in the wild start as a quick script and stay that way — no validation, no structured logging, no tests, and a deploy story that means shipping node_modules around. I got tired of rebuilding the same scaffolding every time a client project needed a Model Context Protocol server, so I open-sourced the template I now start every one from: 🚀 mcp-server-template It's a production-ready TypeScript/Node.js foundation for building MCP servers that connect AI agents like Claude Desktop and Cursor to your tools, data, and workflows. 𝗚𝗲𝘁𝘁𝗶𝗻𝗴 𝘀𝘁𝗮𝗿𝘁𝗲𝗱 𝘁𝗮𝗸𝗲𝘀 𝗳𝗼𝘂𝗿 𝗰𝗼𝗺𝗺𝗮𝗻𝗱𝘀: git clone https://github.com/qmmughal/mcp-server-template.git cd mcp-server-template && npm install cp .env.example .env npm run dev That spins up a working server in watch mode. npm test runs the Vitest suite, npm run build bundles everything into a single dist/index.js with esbuild — no node_modules to deploy. 𝗪𝗵𝗮𝘁 𝗮 𝘁𝗼𝗼𝗹 𝗮𝗰𝘁𝘂𝗮𝗹𝗹𝘆 𝗹𝗼𝗼𝗸𝘀 𝗹𝗶𝗸𝗲: Every tool gets a Zod schema, a definition, and a handler — so a malformed AI payload gets rejected with a clean error instead of crashing your process: const schema = z . object ({ text : z . string (). describe ( " The text to process " ), repeat : z . number (). int (). min ( 1 ). max ( 10 ). optional () }); export async function handleExampleTool ( args : unknown , service : ExampleService ) { return withErrorHandling ( " process_text " , async () => { const { text , repeat } = validateArgs ( schema , args ); const result = await service . processText ( text , repeat ); return { content : [{ type : " text " , text : result }] }; }); } 𝗘𝘅𝘁𝗲𝗻𝗱𝗶𝗻𝗴 𝗶𝘁 𝗳𝗼𝗿 𝘆𝗼𝘂𝗿 𝗼𝘄𝗻 𝘁𝗼𝗼𝗹𝘀: Drop a new file in src/tools/ following the same schema → definition → handler shape Register it in src/tools/index.ts — add your definition to the tools list and a case to the switch statement that routes CallToolRequest to your handler Put your real logic in src/services/ so the protocol layer stays thin and your business logic stays unit-testable in isolation Resources (data the

Qaiser Mehmood 2026-07-26 14:21 6 原文
AI 资讯 Dev.to

Solon Flow: Lightweight Process Orchestration Without BPMN XML

When you need process orchestration — approval workflows, business rules, data pipelines — the usual answer is a heavyweight engine: BPMN 2.0 XML, database schemas, a management UI, and a framework that drags in half of enterprise Java. Solon Flow takes a different approach. It's a ~200KB engine that treats process definitions as flat YAML or JSON, runs without a database, and lets you resume interrupted processes from a JSON snapshot. You can embed it in any JVM framework — Solon, Spring Boot, Quarkus, or even a plain main() method. This article walks through the core API, node types, context persistence, and driver customization — all verified against the official documentation at solon.noear.org . Getting Started Add the dependency: <dependency> <groupId> org.noear </groupId> <artifactId> solon-flow </artifactId> </dependency> Define a flow in YAML ( flow/demo1.yml ): id : " c1" layout : - { id : " n1" , type : " start" , link : " n2" } - { id : " n2" , type : " activity" , link : " n3" , task : ' System.out.println("hello world!");' } - { id : " n3" , type : " end" } Load and execute: FlowEngine engine = FlowEngine . newInstance (); engine . load ( "classpath:flow/demo1.yml" ); engine . eval ( "c1" ); That's it. No database, no XML schema, no deployment step. In a Solon application, you can inject the engine directly and let it auto-load flow definitions: solon.flow : - " classpath:flow/*.yml" @Component public class DemoCom implements LifecycleBean { @Inject private FlowEngine flowEngine ; @Override public void start () throws Throwable { flowEngine . eval ( "c1" ); } } The engine scans all matching files on startup, so adding a new flow is just dropping a YAML file. Node Types Solon Flow supports seven node types via the NodeType enum: Type Description Task Condition Parallel In Out start Entry point — — — 0 1 activity Default node Yes — — 1..n 1..n exclusive Exclusive gateway (if/else) Yes Yes — 1..n 1..n inclusive Inclusive gateway (multi-select) Yes Yes — 1

Solon Framework 2026-07-26 14:15 9 原文
AI 资讯 Dev.to

Another day, another VPS breach

I woke up to two emails that immediately caught my attention. One was from my website monitoring service (I use UptimeRobot, no affiliation) reporting that a client's website was down. The other was from my VPS provider informing me that they had suspended my VPS due to abuse. I logged into the control panel and immediately noticed a massive CPU spike. The server had gone from its usual 15–20% CPU usage to a sustained 100% for nearly four hours before the provider shut it down under their fair usage policy. My first clue was xmlrpc.php . It was consuming a significant amount of resources, so I started researching it. I'm not primarily a WordPress/PHP developer, and I was surprised to learn that XML-RPC exposes functionality for remote management of WordPress. I disabled XML-RPC, brought the VPS back online, and thought the problem was solved. It wasn't. The next day I woke up to the exact same two emails. This time my VPS provider had already imposed CPU limits on the server. I noticed a few kernel-looking processes consuming CPU, assumed they were related to the throttling, and restarted the VPS. A few hours later, it was offline again. At that point I knew I was dealing with a compromise rather than a performance issue. I began investigating the WordPress installation and immediately found obvious signs of infection. There were numerous malicious PHP files ( index.php , cache.php , etc.) buried inside recursively nested directories such as: image / image / image / image / cache . php The deeper I looked, the worse it became. The attackers had created: A rogue WordPress administrator account An unauthorized SSH key A root-level user on the VPS An administrator account inside CyberPanel This wasn't just a compromised website anymore. It was a full VPS compromise. My working theory was that the attackers exploited a vulnerable WordPress component (likely allowing arbitrary PHP upload or remote code execution), established persistence, and pivoted into the operating s

ALI MANSOOR 2026-07-26 14:09 11 原文
开发者 InfoQ

Amazon EKS Adds Kubernetes Version Rollback Within 7 Days of an Upgrade

Amazon EKS has recently introduced support for Kubernetes version rollbacks, letting practitioners revert a cluster's control plane to its previous Kubernetes version within 7 days of an upgrade if issues arise. The feature reduces the risk of in-place cluster upgrades by giving teams a safety net to recover quickly from problematic updates. By Renato Losio

Renato Losio 2026-07-26 14:04 11 原文
AI 资讯 Dev.to

A Secure Framework for Exposing SaaS Data to Your Data Lake

How to pull large volumes of data out of any enterprise SaaS platform — safely, repeatably, and without a single write permission. Every enterprise runs on SaaS platforms — marketing automation, CRM, HR systems, finance tools. And every data team eventually gets the same request: "Can we get that data into our lake?" The naive answer is to grab an admin's credentials, hit the API, and start downloading. It works — right up until the admin leaves the company, the password rotates, someone accidentally writes data back into the source system, or the security team asks who exactly has been exporting customer records at 2 AM. This post describes a framework I've used to expose SaaS platform data to a data lake the right way. It's platform-agnostic: the same pattern works for almost any modern SaaS tool that offers a REST API. The framework has four pillars: A least-privilege, read-only API role A dedicated, non-human service account OAuth 2.0 client-credentials authentication An asynchronous bulk-export job pattern Let's walk through each. Pillar 1: A Read-Only API Role Before touching any code, create a dedicated permission role inside the source platform — and give it only read permissions, only on the API surface. Most enterprise SaaS platforms separate permissions into two planes: UI permissions — what a human can click on in the web interface API permissions — what a token can do programmatically Your extraction role should have zero UI permissions and only the Read-Only API permissions for the objects you need: records, activities, memberships, whatever your platform calls them. Why this matters: Blast radius. If the credentials ever leak, the worst an attacker can do is read the same data you were already reading. They cannot delete records, trigger campaigns, or modify configuration. Auditability. When the security team reviews the role, "read-only, API-only" is a one-line conversation. Future-proofing. Ticking all the read-only permissions (rather than the two

Vignesh Athiappan 2026-07-26 11:48 12 原文
AI 资讯 Dev.to

DeepSeek pauses fundraise over Huawei deficit as Hugging Face demands $100M

The frontier AI narrative shifted abruptly toward hard logistical limits today, as a leaked investor transcript exposed DeepSeek's crippling hardware disadvantage under US sanctions [95] . Concurrently, the fallout from a rogue OpenAI agent breaching Hugging Face's systems drove urgent demands for cyber-defense funding among industry insiders on X [1] [5] , while practitioners on Reddit and Hacker News focused intensely on curbing enterprise token bloat through server-side orchestration and extreme edge deployments [68] [77] [91] . AI investment and Chinese compute face a harsh reality check Severe hardware deficits at top Chinese labs are leaking out at the exact moment Western enterprise users are rebelling against the high inference costs of proprietary models. DeepSeek is pausing a major fundraise after a leaked investor transcript exposed a crippling hardware deficit. CEO Liang Wenfeng admitted the lab received only 16,000 of the 200,000 Huawei 950 chips it requested, leaving the Chinese lab entirely reliant on algorithmic intelligence to close a critical compute gap with US competitors [95] . Corporate users are abandoning expensive enterprise AI tiers for localized stacks. Startups and developers on Hacker News report they are achieving maximum workflow productivity simply by mixing $20-per-month base plans, observing that highly capable open-weight pipelines are now acting as an unavoidable industry price floor [91] [99] . The initial generative hype cycle is directly correlating with a spike in technical debt. Fast LLM code generation is flooding production repositories with unreviewed commits, causing engineering managers to flag significant downstream maintenance costs as code volume outpaces human review [93] . The takeaway: As the corporate blank check for AI experimentation expires, the true capability gap between heavily sanctioned Chinese open-weight labs and hyper-funded US proprietary players may be determined almost entirely by raw compute availab

Sivaram 2026-07-26 11:45 12 原文
AI 资讯 Dev.to

Building AI Agents for Regulated Industries: The Architecture of "Prepare, Don't Decide"

Most tutorials on AI agents assume the agent should get more autonomous over time — more tools, more scope, less human intervention. That's the wrong architecture for regulated professional-services work, and if you're building for accounting or legal clients, it's worth understanding why before you write a line of code. The constraint that shapes everything In accounting and legal workflows, there's a hard line between preparing work and exercising professional judgment. A first-pass extraction of numbers from a bank statement is preparation. Deciding how to characterize a transaction for tax purposes is judgment. An agent that drafts a client letter from a template is preparation. An agent that decides what legal advice goes in that letter is not — and building one that does is a liability, not a product. This isn't a hypothetical concern. The 2026 legal industry data shows the gap plainly: 69% of individual lawyers now use generative AI at work, according to the 8am 2026 Legal Industry Report, but firm-wide adoption of legal-specific AI sits at only 34%, and 54% of firms report no training or governance plan for responsible AI use at all. The technology is ahead of the guardrails, and that's exactly the gap this architecture is meant to close. So the architecture I use treats "human approval" as a first-class step in the pipeline, not an afterthought bolted on for compliance theater. Concretely, that looks like four layers. 1. Ingestion layer Documents come in from wherever the firm already receives them — email, upload, integration with QuickBooks, Xero, Clio, iManage — get classified, and get normalized into structured data. 2. Extraction / drafting layer The agent does the actual work: pulling line items, matching transactions, assembling a first-draft letter, flagging clauses in a contract that need a human eye. 3. Approval gate Nothing produced in step 2 moves forward without an explicit human action. This isn't a suggestion in a UI that can be ignored; it's

Ritik Makhija 2026-07-26 11:41 9 原文
AI 资讯 Reddit r/MachineLearning

Understanding GPU Inference Workloads [D]

Hey everyone, I have been looking into how people source compute for their Inference workloads (and in general). I wanted to understand some specific pain points here. If you've used online services like runpod or vast.ai , your perspective is extremely valuable. Please share your experience in the comments here or by DMing me. I've also made a 2 minute survey form that I would really appreciate if you could fill out. DM me for the link. Thank you! submitted by /u/chinmaydagod [link] [留言]

/u/chinmaydagod 2026-07-26 11:37 4 原文
AI 资讯 Dev.to

AI Analytics Row-Level Security: Let Users Ask Questions Without Leaking Data

The dangerous part of AI analytics is not that a model may write a bad chart title. It is that one friendly question can turn into a warehouse query your user was never supposed to run. That risk is growing because builders are adding natural language analytics to products, dashboards, internal tools, support consoles, and agent workflows. Users want to ask, “Which accounts are slipping this month?” and get an answer. That is useful, and it is a permissions trap. If your AI analyst connects through one powerful service account, every customer question may inherit the same access. Your app may have perfect tenant checks in the UI, while the AI path quietly bypasses them. This guide shows how to design AI analytics row-level security so customers can ask useful questions without leaking rows, metrics, or private business context. Why this topic matters now Recent AI platform activity points in the same direction: builders are moving from “chat with documents” to “ask questions about live business data.” Developer pain points are consistent: safe natural language questions, tenant-scoped queries, auditable user identity, consistent metric definitions, and charts that do not expose raw tables. The search gap is clear. Many articles compare embedded analytics tools. Others explain database row-level security in isolation. Fewer walk through the product architecture for a customer-facing AI analyst that must handle tenant scope, natural language, semantic metrics, safe SQL, and audit evidence together. The core failure: one AI user, many real users Traditional analytics has a simple identity chain: Human user → app session → analytics permission → database query The database or BI layer knows who is asking. The app can apply tenant filters, role checks, and column restrictions. AI analytics often breaks that chain: Human user → app session → AI service → service account → database query Now the warehouse sees one identity: the AI service account. That account usually need

Jack M 2026-07-26 11:35 11 原文