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

今日精选

HOT

最新资讯

共 29586 篇
第 248/1480 页
AI 资讯 Dev.to

Beyond Prompt Injection: The Non-Human Authorization Gap in Enterprise AI

The Hidden Vulnerability in Multi-Agent Chains The biggest architectural risk in enterprise AI today isn’t prompt injection—it’s Delegation Escalation . When a human user triggers an AI Agent Orchestrator, which then delegates tasks to sub-agents and tool execution gateways via MCP or internal APIs, traditional static service accounts break down. If you pass broad bearer tokens or static user API keys down the execution chain, you create a massive Confused Deputy vulnerability. To deploy autonomous multi-agent chains safely at enterprise scale, platform architects must enforce OAuth 2.1 RFC 8693 Token Exchange with explicit actor claims. The Non-Human Authorization (NHA) Flow Human User Authorization: A user authenticates and grants a specific, bounded scope (e.g., read:finance ) to the primary Agent Orchestrator. Token Exchange: The Orchestrator leverages OAuth 2.1 Token Exchange (RFC 8693) via the enterprise identity gateway rather than passing raw user credentials downstream. Actor-Claim Scoped Call: The sub-agent or tool execution layer receives a short-lived token containing a nested actor claim ( act ) identifying both the human subject and the orchestrator, ensuring execution authority is strictly bounded by the intersection of their permissions. 3 Non-Negotiable Rules for Agentic Identity Governance Delegation Over Impersonation (RFC 8693): Never allow an agent to blindly impersonate a user. Enforce OAuth 2.1 Token Exchange so every issued JWT token contains a nested actor claim: Human Subject -> Agent Orchestrator -> Sub-Agent . Every downstream API must verify both who authorized the action and which agent executed it. Intersection of Privileges (User ∩ Agent): An agent’s runtime authority must be the strict mathematical intersection of the user’s IAM permissions and the agent’s registered tool scope. An agent should never acquire more system access than the human user who invoked it. Ephemeral Tokens & DPoP Binding: Eliminate static configuration API keys

Jitendra Gupta 2026-07-27 11:59 10 原文
AI 资讯 Dev.to

From Learning to Implementation: My Journey with Firebase Analytics & GA4

Over the past few weeks, I've been focused on deepening my understanding of mobile analytics—not just by completing a course, but by putting those concepts into practice through hands-on implementation in React Native. Throughout this journey, I explored a wide range of topics, including: Firebase Analytics integration Google Analytics 4 (GA4) Event planning and naming conventions Screen view tracking Custom events and custom definitions Key Events (Conversions) User properties and User ID Acquisition and campaign tracking Audience segmentation Ecommerce measurement Checkout funnel analysis Promotions and marketing attribution BigQuery integration Realtime reporting and DebugView Analytics validation and best practices One of the biggest lessons I learned is that analytics is much more than logging events . A well-designed analytics strategy helps answer important questions about user behavior, feature adoption, user engagement, and conversion optimization. The quality of the insights you gain depends on having a well-planned event architecture, consistent naming conventions, and meaningful data collection from the very beginning. Completing this Udemy course gave me a strong foundation in Firebase Analytics and Google Analytics 4. Reinforcing that knowledge through hands-on implementation in React Native helped me better understand event planning, debugging, reporting, and analytics best practices for modern mobile applications. Course Certificate I'm happy to have successfully completed the Firebase Analytics & Google Analytics 4 (GA4) course on Udemy. Certificate: https://www.udemy.com/certificate/UC-4a23b92f-0857-4a75-83dd-ac186bdfdfbc The course covered both the fundamentals and advanced capabilities of mobile analytics, including GA4 reports, custom events, screen tracking, audiences, BigQuery integration, and data-driven decision making. It has been a valuable learning experience that strengthened both my theoretical understanding and practical implementation

Dainy Jose 2026-07-27 11:51 10 原文
AI 资讯 Dev.to

My Comment Pipeline Marks a Thread "Handled" the Moment I Reply Once. A Follow-Up Question Proved It Wrong.

I run a small script called reply_comments.py that scans my DEV.to articles for comments I haven't replied to yet, and hands me a JSON list so I can draft responses. It's been running twice a day for over a week. This morning, while re-reading it for something unrelated, I noticed the function that decides whether a thread still needs my attention was answering the wrong question — and had been since the day it was written. Here's the function, unchanged until today: def replied_by_me ( comment ): return any ( c [ " user " ][ " username " ] == ME or replied_by_me ( c ) for c in comment [ " children " ]) It walks a comment's entire reply tree and returns True the moment it finds any message from me, anywhere in the subtree. Then pending() uses it as the skip condition: for c in api ( f " /comments?a_id= { a [ ' id ' ] } " ): if c [ " user " ][ " username " ] == ME or replied_by_me ( c ): continue ... out . append ({...}) The logic reads fine in isolation: "did I already reply to this thread? Skip it." The bug is in what "already replied" is being asked to mean. replied_by_me doesn't check whether the latest message in the thread is mine — it checks whether a message from me exists at all, ever, at any depth. Those are the same question exactly once: the first time someone comments and I reply. They stop being the same question the moment the other person replies again. Proving it I wrote a small repro against the real function rather than trusting my read of it: from reply_comments import replied_by_me thread = { " id_code " : " 3c00h " , " user " : { " username " : " alexshev " }, " created_at " : " 2026-07-24T08:00:00Z " , " children " : [ { " user " : { " username " : " enjoy_kumawat " }, " created_at " : " 2026-07-25T10:00:00Z " , " children " : []}, { " user " : { " username " : " alexshev " }, " created_at " : " 2026-07-26T09:00:00Z " , " children " : []}, ], } print ( replied_by_me ( thread )) # True That's True even though the second child — posted a full day

Enjoy Kumawat 2026-07-27 11:51 10 原文
AI 资讯 Dev.to

Building a Financial Document OCR with Claude Vision API: Lessons from Production

After processing thousands of bank statements, invoices, and receipts through Claude Vision API, I've learned that financial document OCR is harder than it looks. Here's what actually works in production. The Problem: Why Traditional OCR Fails on Financial Documents Traditional OCR tools like Tesseract or AWS Textract struggle with financial documents for three reasons: Table structure is implicit — Banks don't use HTML tables. Columns are separated by whitespace, making it hard to know where one column ends and another begins. Numbers must be perfect — Confusing 1 with l or 0 with O creates accounting errors. A single misread digit can break double-entry bookkeeping. Format chaos — Every bank uses different layouts. Chase statements look nothing like Wells Fargo statements. Traditional OCR gives you raw text. You still need to write hundreds of lines of regex to parse it into structured data. Why Claude Vision API Changes the Game Claude Vision doesn't just extract text — it understands document structure . You give it an image and a prompt like: "Extract this bank statement into JSON with transaction date, description, debit, credit, and balance columns." Claude returns structured JSON directly. No regex. No manual column detection. Real Example Input: Bank statement PDF (converted to PNG) Prompt: Extract all transactions from this bank statement. Return JSON with: - header: {accountNumber, statementPeriod, bankName} - transactions: [{date, description, debit, credit, balance}] Rules: - Dates in YYYY-MM-DD format - All amounts as numbers (no currency symbols) - If a field is unclear, use null (never guess) Output: { "header" : { "accountNumber" : "****1234" , "statementPeriod" : "2024-01-01 to 2024-01-31" , "bankName" : "Chase Bank" }, "transactions" : [ { "date" : "2024-01-03" , "description" : "Amazon.com" , "debit" : 49.99 , "credit" : null , "balance" : 1450.01 }, { "date" : "2024-01-05" , "description" : "Salary Deposit" , "debit" : null , "credit" : 3500.00

cleanstmt 2026-07-27 11:43 11 原文
AI 资讯 Dev.to

How I Reduced My OPEX By 99.5% Using Go

Previously, I wrote about How I Processed 666K Pages Of Flattened PDFs into a Full Text Search Engine called the Apario writer . Upon on the conclusion of the last segment, I was able to optimize the compilation time of the original collection of data by rewriting the sidekiq Ruby pipeline script into a dedicated Go Application. Regardless of what compiling the PDF assets would look like, I still needed to serve those assets - and that's where the writer did little to nothing to actually address the OPEX of the project from 2020. Given the size of the data set, the 666K pages ended up compiling into a directory of ~1.13TB in size. This was held in storage that was distributed across several high volume storage dedicated servers on OVH behind MinIO . This provided an S3 compatible API directly. What I Know About OPEX OPEX or Op erational Ex pense is how you describe a spending of money that is used explicitly for the operations of the business versus a capital expense. Hardware was considered a CAPEX or Cap ital Ex pense. So when Bit Fry Game Studios needed their DevOps pipeline upgraded for the 9 hour game builds into a 30 minute private enterprise cloud build, it required a CAPEX investment of $69K plus trust in me in order to achieve a -$15K/month OPEX savings. Annualized over a hardware lifecycle, over $472K can be recovered from OPEX by making a small CAPEX expense up front. One of the first projects that I ever worked on was in PHP and MySQL on Ubuntu 8.04 . It was to balance the budget of a department that had ACME Bucks so to speak. It required me to write a finance module, fully tested, that managed Blue , Green and Black dollars. Blue dollars were for OPEX. Green dollars were for CAPEX. Black dollars were for external vendors where money left the company (versus moving between departments). Black depreciated instantly - meaning 100% of it was paid immediately. Blue dollars were borrowed over a 12 month pay-back period. Green dollars were borrowed over a 36

Andrei Merlescu 2026-07-27 11:37 12 原文
AI 资讯 Dev.to

Why Your AI Agent Drowns in 50,000 Tokens of Tool Definitions

Why Your AI Agent Drowns in 50,000 Tokens of Tool Definitions Every time you connect an MCP server to your AI agent, you're adding thousands of tokens of tool definitions to your context window. Connect 10 servers? That's 50,000 tokens of tool schemas before you've even asked a question. Your agent is drowning in tools it doesn't need. The Problem Traditional MCP integration dumps every available tool into the context: { "tools" : [ { "name" : "file_read" , "description" : "Read a file..." }, { "name" : "file_write" , "description" : "Write a file..." }, { "name" : "shell_exec" , "description" : "Execute shell..." }, // ... 500 more tools ] } Your 200K context window is now 25% full of tool definitions. The model gets confused, response quality drops, and you're paying for tokens that add zero value. The Solution: Progressive Tool Routing HyperNexus implements a multi-layered progressive disclosure system: Semantic Search : Local vector embeddings match your prompt against a global MCP directory The Router : Only the top 3 most relevant tool schemas are injected into context Universal Parity : Byte-for-byte identical tool signatures across Claude Code, Cursor, Codex, Gemini CLI, Copilot, and Windsurf // Only inject what's relevant tools := router . FindRelevantTools ( prompt , 3 ) context . AddTools ( tools ) Results 95% reduction in tool-related context usage 3x improvement in tool selection accuracy Zero hallucinations from irrelevant tool noise Try It Yourself HyperNexus is open source and free for personal use: # Install go install github.com/HyperNexusSoft/HyperNexus@latest # Run hypernexus serve # Connect your MCP servers hypernexus mcp add filesystem hypernexus mcp add github Your AI agent will now only see the tools it needs for each request. This article was originally published on hypernexus.site

HyperNexus 2026-07-27 11:37 10 原文
AI 资讯 Dev.to

Cherry-picking your hotfix twice is the real pipeline smell

We had a gitflow pipeline that looked clean on paper: develop feeds a release branch, the same build artifact promotes through dev, qa, sit, uat, and prod, and once prod is green we tag the commit on main. Textbook. Then a production bug showed up on a Tuesday afternoon, and the diagram stopped mattering. The standard gitflow answer is to branch a hotfix off the tag, PR it back into release, run it through the pipeline, and once it's proven in UAT, merge to main and cherry-pick the same commit back into develop. We built exactly that. It works. Until you ask the question nobody wants to answer out loud: release still has whatever was mid-flight when you cut the last tag. Untested code. Feature work three sprints deep in QA, sitting on the same branch you're now supposed to route your hotfix through. So the real question we ended up arguing about wasn't "how do we release a hotfix." It was "do we trust the release branch enough to put a hotfix through it." Most of the time, the honest answer is no. The gate everyone obsesses over is the wrong one Five environments, five sign-offs, a change ticket for each one: that's the smell people point at first when a pipeline feels slow. It's real. It's just not the dangerous one. A slow gate costs you time. A gate you route around because you didn't trust your own process costs you an incident. Here's what we landed on after the argument: release the hotfix directly from the hotfix branch, not through release. On Azure, that means deploying to the UAT slot, smoke-testing against production data shape, then toggling the slot. Same infrastructure, same config, none of release's baggage riding along. Once it's live, cherry-pick the commit into both develop and main, retag, and let the normal pipeline catch up on its own schedule whenever it gets there. That's a smaller number of gates (one real test in the slot, one human sign-off) that actually mean something, instead of five theatrical ones inherited from a process built for pla

Tummala Krishna Kishore 2026-07-27 11:20 8 原文
AI 资讯 Dev.to

Spark Performance Deep Dive on Databricks: Shuffle Tuning, Skew Handling, and Z-Ordering with Delta Lake + Unity Catalog

The problem with "just add more workers" Most Spark performance issues on Databricks aren't solved by scaling the cluster — they're caused by shuffle and skew , and no amount of extra nodes fixes a badly partitioned join. This post builds a realistic pipeline (order events joined against a small dimension table, aggregated, and written to Delta Lake) from the ground up, and uses it to work through: How Spark's shuffle actually behaves during a wide transformation Diagnosing and fixing data skew with salting and adaptive query execution (AQE) Laying out the resulting Delta table with Z-Ordering so downstream queries skip irrelevant files Governing access to the whole pipeline with Unity Catalog Architecture overview Pipeline shape — a batch job reading raw events, joining against a dimension table, aggregating, and writing to a governed Delta table: What happens inside a shuffle stage — this is the part most tutorials skip, and it's the key to understanding why skew hurts: Step 1 — Set up governed tables in Unity Catalog Everything downstream depends on tables being registered under Unity Catalog, which gives you centralized access control and lineage instead of per-workspace table grants. -- setup.sql, run in a Databricks SQL or notebook cell CREATE CATALOG IF NOT EXISTS retail_analytics ; CREATE SCHEMA IF NOT EXISTS retail_analytics . events ; CREATE TABLE IF NOT EXISTS retail_analytics . events . raw_orders ( order_id STRING , customer_id STRING , product_id STRING , quantity INT , event_ts TIMESTAMP ) USING DELTA LOCATION 'abfss://data@<storage-account>.dfs.core.windows.net/raw_orders' ; CREATE TABLE IF NOT EXISTS retail_analytics . events . dim_products ( product_id STRING , category STRING , unit_cost DOUBLE ) USING DELTA LOCATION 'abfss://data@<storage-account>.dfs.core.windows.net/dim_products' ; GRANT SELECT ON TABLE retail_analytics . events . raw_orders TO `analysts` ; Step 2 — Read and force a broadcast join for the small dimension table dim_products is s

Jubin Soni 2026-07-27 11:14 9 原文
AI 资讯 Dev.to

Six months of running a GBA emulator

I shipped GoGBA (Android + iOS) to both stores in late December 2025. Six months in: MAU peaked at 8.3k, currently steady around 7.4k. No paid advertising, ever. This is a write-up of what the six months actually involved. I'll be specific about the technical work, and equally specific about the mistake that cost me RetroAchievements hardcore certification — because that part is the most useful thing here for anyone building in this space. Why GBA only I grew up on a GBA — Super Robot Wars, Fire Emblem, Pokémon, Castlevania, Zelda. Later NDS/3DS/PSP/Vita/Switch arrived and the GBA did its job and retired. On PC the emulator I remember is VisualBoyAdvance. I've used GBA, NDS and PSP emulators on phones. I kept coming back to GBA, for four reasons that are all practical rather than nostalgic: Pixel art holds up. Personal taste, no defense offered. Battery. A GBA game survives a long-haul flight. Single screen. The remaining screen space is exactly where virtual buttons want to go. NDS dual-screen on a phone is always a compromise. ROM hacks. The GBA hack scene is the richest of any handheld. Point 3 is the one that made me build something: GBA is the only handheld whose form factor natively fits a phone. That's a product observation, not sentiment. What existing emulators get wrong (for me) I used the main ones on both platforms: Delta and Linkboy on iOS; Pizzaboy, Linkboy and Lemuroid on Android. Lemuroid is open source and a lot of shipped emulators are built on it. They're all good. Every one of them had small things that annoyed me. The only genuinely cross-platform one is Linkboy (formerly MyBoy), but its configuration surface is extremely deep — second only to RetroArch in complexity. That's the gap. Everyone was solving "can it run" and "can it be tuned perfectly." Nobody was solving "pick it up and play." The methodology was just dogfooding I'm a Flutter GDE and tech lead for a 40-person cross-platform team; GoGBA was a solo test of that experience. The only r

Hamber 2026-07-27 11:12 9 原文
AI 资讯 Dev.to

Title: How to Automate A4 Batch ID Card Printing in React (Without a Backend)

The Nightmare of HTML-to-PDF in React If you’ve ever built a School ERP, HR portal, or Event Management system, you’ve probably hit this exact wall: Your client needs to print 5,000 ID cards or badges. Usually, this forces frontend teams to do one of two terrible things: Pay for an expensive backend PDF generation API (which raises huge GDPR/privacy concerns because you have to send sensitive employee photos to a 3rd-party server). Force the non-technical HR team to manually type names into Canva, crop photos, and manually drag them onto an A4 grid (an 80-hour manual data entry nightmare). I got tired of rebuilding complex html2canvas and jsPDF calculators from scratch for every project. So, I decided to automate the entire pipeline natively in the browser. Enter @stratametriq/id-card-designer — an open-source, turnkey drag-and-drop ID card studio and A4 mathematical rendering engine for React. What it does out of the box: Instead of building a canvas from scratch, you install this NPM package in one line of code. It gives your end-users a complete visual dashboard directly inside your own application. Here is a 60-second video of how it looks running in a live production environment: 👉 https://youtu.be/l9aXWqRSFCM?si=nEIaaqsxypmzCflm The Core Features: Dynamic Handlebars Data Binding Your users can design a visual template and drop in tags like {{studentName}} or {{employeeId}}. Our engine automatically binds these variables to your live database array. No manual typing required. Scannable Barcodes & QR Codes We built native QR and Barcode generators directly into the canvas. You just pass the ID string, and the engine renders a scannable vector code instantly. The Magic Moment: Precision A4 Batch Matrix When your HR admin selects 500 employees and hits "Batch Print", the real magic happens. Our client-side mathematical matrix calculates exact millimeter dimensions—arranging exactly nine PVC cards perfectly on standard A4 cut-sheets, complete with professional 0.35

Aabid Hussain Wani 2026-07-27 11:08 6 原文
AI 资讯 Dev.to

React useDeepCompareEffect: Fix useEffect Object Dependencies (2026)

React useDeepCompareEffect: Fix useEffect Object Dependencies (2026) You wire up a fetch. The endpoint takes a query object, so you pass it in the dependency array. The effect fires, sets state, the component re-renders, the query object is rebuilt — a brand-new object with identical contents — and the effect fires again. You have written an infinite loop, and React thinks it did exactly what you asked. function Results ({ term , page }: Props ) { const [ rows , setRows ] = useState ([]); const query = { term , page , sort : ' desc ' }; // new object, every render useEffect (() => { fetchRows ( query ). then ( setRows ); // setRows → re-render → new query → 🔁 }, [ query ]); } useDeepCompareEffect from @reactuses/core is a drop-in replacement for useEffect that compares dependencies by value instead of by reference. Same signature, same cleanup semantics — the effect just stops firing when nothing actually changed. Everything below is the real implementation, TypeScript-first, including the parts that cost you something. Why useEffect Can't See It React compares dependency arrays with Object.is , element by element. For primitives that's exactly what you want: 5 is 5 , 'desc' is 'desc' . For anything with an identity — objects, arrays, Date s, Map s, functions — it compares the reference , and a literal written inside a component body produces a fresh reference on every single render: Object . is ({ term : ' react ' }, { term : ' react ' }); // false — different objects So the dependency "changed" on every render, by React's definition. This isn't a bug in useEffect ; reference equality is the only comparison that's O(1), and React runs it on every render of every component. The cost of value comparison is real, and React declines to pay it on your behalf. Which leaves you paying it — one way or another. The Usual Workarounds, and Where They Fray Memoize the object. Correct, and the right answer when there's one dependency: const query = useMemo (() => ({ term , page

reactuse.com 2026-07-27 11:05 5 原文
AI 资讯 Dev.to

CSS Box model

In CSS, the term "box model" is used when talking about web design and layout.The CSS box model is essentially a box that wraps around every HTML element. Every box consists of four parts: content, padding, borders and margins. EXPLANATION Content - The content of the box, where text and images appear Padding - Clears an area around the content. The padding is transparent Border- A border that goes around the padding and content Margin - Clears an area outside the border. The margin is transparent div { width : 400px ; border : 12px solid green ; padding : 50px ; margin : 20px ; }

Jaisurya 2026-07-27 11:04 4 原文