Painel de Notícias

Tecnologia

7045 posts · 26 feeds · tópicos e interesse por Jev

Filtros
dev.to

URACE — an open blueprint for persistent autonomous Product evolution across AI agents

URACE (Universal Recursive Autonomous Co-Founder Engine) is an open, implementation-agnostic blueprint for persistent, resource-efficient autonomous Product evolution. It turns retained Intent into a continuous, measurable lifecycle that survives prompts, sessions, agents, models, and runtimes. Agents execute bounded work. URACE governs the continuous Product lifecycle across them. URACE.md is both the blueprint and AI bootstrap/install file: give it to a capable AI with your Product context to instantiate an environment-appropriate URACE implementation. The architecture is independent of any specific AI, vendor, language, or platform. MIT licensed and actively maintained. Technical feedback, issues, pull requests, and contributions are welcome. https://github.com/joaoalbertocsjunior/URACE

IA
Interesse
+1 fonte
dev.to

Title: Why Single-Turn Prompts Fail in Production (And How to Build 3-Stage Prompt Chains)

The Problem with Single-Turn Prompts Context Pollution: The LLM mixes implementation details with missing assumptions. Hallucinated Logic: It invents non-existent methods or helper packages. Conversational Filler: Instead of pure, executable code, you get generic prose surrounding the snippet. In production B2B environments, single-turn prompts lack boundary control. To achieve deterministic, production-grade output, we need to treat LLMs as multi-stage execution engines. The Solution: 3-Stage Prompt Chaining Architecture [ Stage 1: Context Isolation ] ──► [ Stage 2: Blueprint Strategy ] ──► [ Stage 3: Strict Execution ] Stage 1: Context Isolation This stage establishes the operational perimeter without generating final code. It locks down: Language version, frameworks, and allowed libraries. Strictly forbidden patterns (e.g., no external dependencies, no mutable state). Input/output data schemas. Stage 2: Blueprint Strategy Before writing code, the LLM maps out the logical plan. It defines: Architectural patterns (e.g., Dependency Injection, Factory Pattern). Edge case handling (null values, timeout errors). Step-by-step pseudo-logic. Stage 3: Strict Execution The final step executes the plan with maximum constraint: Zero conversational prose or explanations. Pure, executable code or structured format. Embedded inline documentation and assertions. Real-World Example: SOLID Refactoring Chain Bash Act as a Principal Software Architect. Analyze the provided code module. Based on the violations identified in Stage 1, design an abstract interface hierarchy. Implement the refactored solution based strictly on the Stage 2 blueprint. Software Engineering: SOLID Refactoring, Jest/PyTest suites, SQL Index Optimization. B2B Marketing: 3-Step Cold Outreach Sequences, Search Intent Clustering. Visual Design: UI Dashboard Mockups, Studio Product Renders. We are live on Product Hunt today! You can grab the free Notion workspace and support the launch here: 👉 Download the Free No

IADev
Interesse
dev.to

Nothing worked, and nothing said so

Today the session log of the coordinator project has, for Saturday, October 3, four numbered sessions in the Mac's range and four in Windows's without colliding. I built that coexistence that night, after discovering that on Windows nothing worked and nothing said so. The repos were there, but the toolkit assumed the Mac: paths with its username, a file-locking module (fcntl) that only exists on Unix, python3 and bash within reach. With winget I installed Python 3.12 and Git for Windows, and added a python3.exe copy to cover the Microsoft Store shortcut. Still, the hooks didn't throw errors: they did nothing. A character encoding is the table that translates each letter or symbol into bytes. If the program writes a symbol that the machine's table doesn't have, the write fails, and if nobody looks at that failure, the program simply does nothing. Windows prints with cp1252, which doesn't have the arrow →, and my hooks used it. The fix was an environment variable, PYTHONUTF8=1, which is still in my global configuration today. That night's session closed at 20:37. It left the same folder structure on both machines (15 repos moved), one numbering range per machine, V01-V49 for the Mac and V51-V99 for Windows, stored in a local file on each machine. The session index had 250 rows for 126 files; instead of regenerating it, I let git merge the two versions line by line with merge=union. Syncing ran through git over 17 separate repos. I chose to replicate the structure because it left the Mac untouched. At 20:54, seventeen minutes later, another session started to change that. With both machines working at the same time, 17 separate repos meant that session start only pulled the configuration and the open project, that every close needed two commits and two pushes, and that about 30 access tokens were required. The answer was a monorepo: 11 projects inside, 4 products with their own repo because they can be shared or deployed separately, and the configuration on its own. At

Dev
Interesse
dev.to

Docker Scout e Trivy segurança de imagens de contêiner na prática

Trivy e Docker Scout resolvem o mesmo problema central: descobrir, antes da produção, quais vulnerabilidades, licenças e dependências estão dentro das suas imagens de contêiner. Eles chegam a esse objetivo por caminhos diferentes, e entender essa diferença define qual usar, ou se usar os dois. Uma imagem Docker raramente contém apenas o seu código. Ela carrega um sistema operacional base, bibliotecas do sistema, o runtime da linguagem (JRE, Node.js, Python) e dezenas ou centenas de dependências transitivas. Cada camada é uma superfície de ataque herdada, e a maior parte dessas vulnerabilidades não está no código que você escreveu. Este artigo explica como cada ferramenta funciona, mostra os comandos do dia a dia, compara os dois lado a lado e apresenta um pipeline de CI/CD com GitHub Actions que aplica ambos. Os exemplos usam Java/Spring Boot e Node.js apenas como cenário; os comandos valem para qualquer stack. Sete conceitos aparecem em toda conversa sobre scan de imagens, e confundi-los é a origem da maioria dos relatórios mal interpretados. Conceito O que é Por que importa no scan CVE Identificador público de uma vulnerabilidade (ex.: CVE-2024-XXXX) É a unidade que os scanners reportam CVSS Nota de severidade de 0 a 10 (Low, Medium, High, Critical) Base para filtros como --severity HIGH,CRITICAL EPSS Probabilidade estimada de exploração real nos próximos 30 dias Ajuda a priorizar: CVSS alto com EPSS baixo pode esperar KEV Catálogo da CISA de vulnerabilidades já exploradas ativamente Tratar como prioridade máxima, independentemente do CVSS SBOM Inventário de componentes da imagem (formatos SPDX e CycloneDX) Permite reavaliar vulnerabilidades sem reescanear a imagem VEX Declaração de que uma CVE existe no componente, mas não é explorável no seu contexto Forma auditável de suprimir falsos positivos Provenance Atestado de como, onde e por quem a imagem foi construída (SLSA) Prova a origem da imagem na cadeia de suprimentos Duas ideias completam o quadro. A base image

SegurançaDev
Interesse
dev.to

State Bags vs Events in FiveM: Syncing Vehicle and Player State the Simple Way

When you write a FiveM script that needs every player to agree on something (a car is locked, a player is on duty, the weather is rainy), there are two common tools: network events and state bags. Both work, but they solve different problems. Picking the wrong one is why some scripts show a car locked for one player and unlocked for another. This post compares the two with small Lua examples. Events are messages. The server says "this just happened" and every client that receives it reacts. If a client wasn't connected, or the entity wasn't loaded on their side, they never hear about it. State bags are stored values attached to something: an entity, a player or the whole server. Clients that come into range later still see the current value, because they read the state rather than waiting for a message. A useful rule: if you are describing something that happened, use an event. If you are describing how something currently is, use a state bag. Entity(entity).state: attached to a networked entity such as a vehicle, ped or object. Entity state bags rely on OneSync, which most roleplay servers run. Player(source).state on the server, LocalPlayer.state on the client: attached to a player. GlobalState: server-wide values that the server writes and every client can read. Values should be simple data (strings, numbers, booleans and small tables). Functions can't be stored, and large tables that change often are a bad fit. -- server RegisterNetEvent('locks:toggle', function(netId) TriggerClientEvent('locks:apply', -1, netId, true) end) -- client RegisterNetEvent('locks:apply', function(netId, locked) local veh = NetToVeh(netId) if veh ~= 0 then SetVehicleDoorsLocked(veh, locked and 2 or 1) end end) This works until a player drives into the area after the event fired, or joins later. Their client never got the message, so the doors are open for them. Patching that with "request current state" callbacks means rebuilding state bags by hand. -- server RegisterNetEvent('locks:to

DevGames
Interesse
dev.to

Low-Cost AI Chatbot Backend: How Startup SaaS Compares 2 Token Budgets

TL;DR: a startup SaaS should choose a low-cost AI chatbot backend by enforcing two budgets on its own support-ticket set: a quality floor for routing decisions and a latency ceiling for the customer-facing reply. Per-token pricing matters only after a candidate clears both. For a one-person SaaS serving Europe and the United States, the practical default is a small synchronous path for obvious tickets, an escalation path for uncertain ones, and batching for work that does not need to block the reply. Path Use it when Quality rule Latency rule Cost lever Fast classify Intent is clear Must clear the routing floor Must fit the interactive ceiling Short output and stable prefix Escalate Confidence is low or impact is high Prefer a stronger judgment Extra delay is explicit Spend only on the hard slice Deferred enrich Tags or summaries can arrive later Evaluate before write-back No customer wait Batch queued work Recommendation: buy neither the cheapest token nor the highest benchmark score in isolation. Run the same ticket replay against every candidate, reject any path that misses a budget, then compare the remaining cost per accepted ticket. That keeps the decision tied to support outcomes instead of a price page. Quality is first because a cheap wrong route creates a second support task. For triage, score the decisions the application consumes: queue, urgency, language, and whether a human must review. A fluent explanation is not the acceptance criterion. A correct structured decision is. Use a fixed, versioned ticket set with terse messages, pasted logs, mixed-language text, billing disputes, security concerns, and near-duplicate intents. Keep a hidden holdout set so prompt edits do not quietly overfit the examples you stare at every week. The quality floor can differ by field: a wrong product-area tag is annoying, while a missed security escalation is unacceptable. Latency is the second criterion, but measure the part users feel. Record end-to-end time from receipt

IADev
Interesse
dev.to

Drop Vault: A Traveling Clipboard for Operators Who Have Suffered Enough

“Commander, I need this snippet on the other machine.” “Did you email it to yourself?” “Yes.” “Then congratulations. Our clipboard now has a marketing department.” We can do better. Drop Vault is MatrixSwarm’s encrypted, shared traveling clipboard. Paste text or drop a small file in Phoenix on one computer, then retrieve it from another Phoenix connected to the same live drop_vault agent. Give the item a title, add a note, pick it up at the other workstation, and delete it when you’re done. A useful little agent with a useful little job. The clipboard has orders. It does not need a strategic offsite. The deployment: one vault, one way in, one way back Inside an existing MatrixSwarm deployment, Drop Vault only needs the normal command ingress and callback egress agents to communicate with Phoenix. A straightforward arrangement is: Matrix core ├── matrix_https → command ingress from Phoenix ├── matrix_websocket → callback egress to Phoenix (hive.rpc) └── drop_vault → encrypted shared clipboard The Matrix core still handles the swarm’s normal routing. “Simple” here means adding a regular agent to that foundation, with an ingress/egress pair doing the transport work. Already have that pair working? Reuse it. There is no prize for deploying a second front door because the first one looked lonely. The ingress brings commands in. Drop Vault handles storage and retrieval. The egress relay carries replies back to the requesting Phoenix session. That last part matters: an accepted request with no working return path is the distributed-systems equivalent of shouting into a walkie-talkie with the battery removed. There is one additional setup requirement: a dedicated Registry persistent_state record. That is the vault’s storage identity and key assignment, not another agent. Create it as a simple workspace agent Use a build that includes Drop Vault on both sides. Phoenix needs the palette entry and panel; MatrixOS needs the agent package, including both drop_vault.py and store.

InfraDev
Interesse
dev.to

هوش مصنوعی از چت‌بات بیرون آمد و وارد ابزارهای روزمره شد

تا همین یک‌دو سال پیش «کار با هوش مصنوعی» برای بیشتر ما یعنی باز کردن یک چت‌بات و تایپ کردن پرامپت. مدل جواب می‌داد، ما کپی می‌کردیم و در جای دیگری استفاده می‌کردیم؛ یک رفت‌وبرگشت دستی و خسته‌کننده. حالا این تصویر در حال عوض شدن است: هوش مصنوعی دارد مستقیم وارد ابزارهایی می‌شود که هر روز بازشان می‌کنیم — ایمیل، تقویم، سندهای کاری و پیام‌رسان‌ها. به‌جای اینکه ما به سراغ AI برویم، AI به سراغ محیط کار ما می‌آید. منطقش هم روشن است. بیشترِ ارزش واقعی مدل‌های زبانی وقتی آزاد می‌شود که به «زمینه» (context) دسترسی داشته باشند: ایمیل‌های تو، فایل‌های تو، تقویم تو. داخل همان ابزار، مدل می‌داند درباره چه چیزی حرف می‌زنی و لازم نیست هر بار از اول توضیح بدهی. نمونه بارز این روند، آمدن Claude به Google Workspace است؛ جایی که دستیار هوش مصنوعی کنار جیمیل، داکس و درایو می‌نشیند. در فناوری کده به‌طور کامل توضیح داده‌ایم که Claude برای Google Workspace چیست و چه کارهایی از دستش برمی‌آید. این روند یک پیامد مهم هم دارد: رقابت دیگر فقط بر سر «قوی‌ترین مدل» نیست، بلکه بر سر «بهترین ادغام با ابزارهای روزمره» است. هر شرکتی که AI را عمیق‌تر در اکوسیستم خودش بنشاند، کاربر را بیشتر نگه می‌دارد. جمع‌بندی: آینده هوش مصنوعی احتمالاً کمتر شبیه یک وب‌سایت جدا و بیشتر شبیه یک لایه نامرئی داخل همه ابزارهاست — و این تازه شروع ماجراست.

IA
Interesse
dev.to

How I Built an In-Browser, Zero-Upload PDF Merger & Converter Using WebAssembly and Canvas

Whenever you search for a simple utility like "Merge PDF" or "Convert WebP to PNG", you are usually greeted by the same frustrating experience: A 15MB file upload limit behind an aggressive paywall. A subscription pop-up asking for $12/month. Your sensitive personal documents (tax returns, signed contracts, medical records) getting uploaded to an untrusted remote server. As developers, we know that modern browsers have hardware-accelerated GPUs, multi-threaded Web Workers, and WebAssembly. There is zero technical justification for uploading a document to a cloud server just to merge two pages or change an image format. So I decided to build SwiftUtils — a suite of 100% client-side, zero-upload web utilities that process everything directly in browser memory. Here is the exact technical architecture behind how it works. Most online PDF services transmit your PDFs across the wire to a backend running poppler or pdfcpu. Instead, we can load the document structure directly into browser memory using pdf-lib: javascript import { PDFDocument } from 'pdf-lib'; async function mergePDFsInBrowser(fileList) { // 1. Create a fresh document in browser memory const mergedPdf = await PDFDocument.create(); for (const file of fileList) { const arrayBuffer = await file.arrayBuffer(); // 2. Parse the PDF structure locally const pdf = await PDFDocument.load(arrayBuffer); const copiedPages = await mergedPdf.copyPages(pdf, pdf.getPageIndices()); // 3. Append pages to the merged document copiedPages.forEach((page) => mergedPdf.addPage(page)); } // 4. Save and generate a local memory blob const pdfBytes = await mergedPdf.save(); const blob = new Blob([pdfBytes], { type: 'application/pdf' }); return URL.createObjectURL(blob); }

Dev
Interesse
dev.to

Yield Strategy Optimization Report: PancakeSwap AMM

Yield Strategy Optimization Report: PancakeSwap AMM Target Protocol: PancakeSwap AMM (TVL: $1834.0M) Protocol: PancakeSwap Automated Market Maker (AMM) Chain(s): Ethereum (Mainnet) & L2 roll‑ups (Arbitrum, Optimism) – aggregated TVL ≈ $1.834 B Date: 7 Oct 2026 Prepared by: Senior DeFi Security Researcher – Smart‑Contract Auditing Team PancakeSwap’s AMM remains one of the most capital‑intensive liquidity‑provision platforms in the multi‑chain DeFi ecosystem. Its core contracts (Factory, Pair, Router, MasterChef‑style farms, and the newer V3‑style concentrated‑liquidity modules) have been battle‑tested for over three years, but the rapid migration of TVL to Ethereum L2s and the introduction of novel yield‑optimisation strategies (auto‑compound vaults, leveraged LP positions, and cross‑chain arbitrage bots) have expanded the attack surface. Our audit focused on the yield‑strategy layer that sits atop the vanilla AMM – i.e., the smart‑contract modules that (a) auto‑harvest and reinvest PancakeSwap rewards, (b) manage leveraged LP positions via external lending protocols, and (c) execute cross‑chain rebalancing. The review covered the latest main‑net deployments (v2.3.1‑router, v3‑pair contracts, and the YieldOptimizer suite v1.4) and the corresponding L2 proxies. Key Findings # Category Severity Brief Description 1 Reward‑Harvest Re‑entrancy High (8/10) The harvest() function in YieldOptimizer calls external IPancakeRouter.swapExactTokensForTokens before updating the internal lastHarvest timestamp, enabling a re‑entrancy that can double‑claim rewards. 2 Oracle Manipulation (TWAP) Medium‑High (7/10) The strategy relies on a 30‑minute TWAP from the PancakeSwap pair contract for slippage checks. An attacker controlling a modest amount of liquidity can shift the TWAP during the vulnerable window, causing the strategy to execute sub‑optimal swaps. 3 Leveraged LP Liquidation Loop Medium (5/10) When a leveraged LP position is under‑collateralised, the contract calls an externa

Segurança
Interesse
dev.to

I Made My Own Programming Language — Can Someone Test It?

Hey developers 👋️ I'm samwise1776. I've spent six months creating free software. https://github.com/samwise1776/velice git clone https://github.com/samwise1776/velice.git cd velice python3 -m velice run examples/hello_world.velice Please tell me whether it works on your computer! All feedback is appreciated.

Dev
Interesse
dev.to

The Python Developer Workbench and Workflow Orchestrator That Looks Like Call of Duty

Pylerium: The Python Developer Workbench and Workflow Orchestrator That Looks Like Call of Duty Imagine launching a Python development environment and being greeted by an immersive, military-grade tactical heads-up display (HUD). Instead of staring at a dry terminal line or an enterprise cloud dashboard, you are tuning script parameters inside an application built to look exactly like a multiplayer video game lobby. Pylerium, an original, open-source project by independent developer Sh1tmunch3r. Built from scratch using Python, PyQt6, and hardware-accelerated ModernGL, Pylerium completely changes the feel of daily automation, script management, and local developer pipelines. 🎮 Gamifying the Development Process Pylerium completely replaces boring configuration workflows with a beautifully stylized Call of Duty Modern Warfare / Warzone HUD aesthetic. The user interface translates common development actions directly into tactical multiplayer terms: Pylerium captures live STDOUT and STDERR terminal logs and wraps them in custom themes. Complete with progress bars, connection matrix tables, and stylized error/warning badges, monitoring a live pipeline looks like reading active mission telemetry. 🚀 Heavyweight Features in a Local Sandbox Behind its clever gaming-inspired visual presentation sits an incredibly useful suite of developer tools designed for standalone desktop usage: Interactive 3D GPU Asset Renderer The application integrates a custom ModernGL rendering viewport into the right panel of the workspace. If your scripts handle structural generation, graphic manipulation, or 3D asset workflows, the panel directly pulls your local GPU to render, rotate, and inspect 3D files natively inside the app window. Built-in "Workshop" Exporter One of Pylerium's most powerful native modules is its visual application packager. Through a simple interface, you can select any local project and bundle it into a standalone Windows .exe application via PyInstaller. It features an

Dev
Interesse
dev.to

How AI search picks fragments: query fan-out and RAG explained

Hi again 👋 In my last post, How to become an SEO (AI) specialist in the coming 2027 #2, I wrote that without understanding the mechanics of AI search there is no "AI SEO", only guessing. A lot of you asked me to go deeper. So today we open the hood 🔧 In this post I will explain, step by step, what happens between the moment a user types a question into AI Mode, ChatGPT or Perplexity and the moment an answer with citations appears on the screen. And, most importantly, where in that process your content wins or loses. Why an SEO needs to understand RAG The big picture: from question to answer Step 1: query understanding and fan-out Step 2: retrieval Step 3: reranking and fragment selection Step 4: generation, grounding and citations Not every AI searches the same way What this means for SEO in practice Myths I keep seeing on LinkedIn RAG stands for Retrieval-Augmented Generation. In plain words: the model does not answer only from memory. First it searches, then it reads what it found, and only then writes an answer based on it. Almost every AI search product works this way: Google AI Overviews and AI Mode, ChatGPT Search, Perplexity, Copilot, Gemini. The details differ, but the skeleton is the same. Why does it matter for us? Because classic SEO optimized for one moment: ranking a URL for a keyword. RAG has four moments where your content can drop out: the system never asks a question your page answers (fan-out), your page is not retrieved for that question (retrieval), your page is retrieved, but another fragment scores higher (reranking), your fragment is read, but the model does not cite it (generation). Ranking #1 helps with only some of these. That is why you can rank first and still be invisible in the AI answer 🤯 Before we go into details, here is the whole pipeline in one place. Every AI search system has its own version, but they all follow roughly these steps: Query understanding. The model reads the question, the conversation history and the context (lo

IA
Interesse
dev.to

I replaced theoretical study with high-intensity practice — and the result? I passed the AWS Solutions Architect Associate exam.

As I progressed through my AWS learning journey, I went from being familiar with EC2 to working with services like Lambda, IAM, VPC, RDS, DynamoDB, Aurora, and several others. At some point, I felt I had built enough knowledge to take the AWS Certified Solutions Architect – Associate exam. Until I decided to solve Tutorials Dojo practice questions. That was my rude awakening. I quickly realized that knowing AWS services was not the same as knowing how to architect solutions on AWS. I came across Tutorials Dojo frequently while researching how other people prepared for the exam, especially through the AWS Certifications Reddit community. NB: This Reddit community was extremely helpful throughout my preparation. If you're preparing for an AWS certification, I'd recommend spending some time going through the posts, discussions, study tips, and experiences shared there. The scenario-based questions weren't simply asking: "What does this AWS service do?" They were asking me to think through situations such as: Which architecture best satisfies these requirements? What is the most cost-effective solution? Which solution provides the highest availability? What trade-offs should I consider in this scenario? Which service or configuration minimizes operational overhead? Which option satisfies the requirements with the least amount of change? That was when I realized I had to change my study approach. I was studying AWS services. The exam was testing whether I could use those services to make the right architectural decisions. That changed how I approached my preparation. I went through Stephane Maarek's AWS Solutions Architect Associate course on Udemy to build and strengthen my understanding of the exam objectives and AWS services. But I didn't stop there. I used Tutorials Dojo extensively to get accustomed to the scenario-based nature of the questions. I primarily used the review mode, and I developed a simple rule for myself: Every wrong answer had to become a learning op

Infra
Interesse
dev.to

How a Single Unlicensed Image Can Cost Startups Six Figures

Photo by Matt Popovich on Unsplash A tiny oversight in handling user‑generated images can turn a fledgling tech venture into a courtroom drama before it records its first revenue. For many startups, the allure of rapid growth overshadows the need for rigorous compliance, and a single misstep with copyrighted material can trigger a six‑figure legal bill. When a startup relies on images uploaded by users or sourced from the internet without proper clearance, it opens the door to statutory damages that can quickly eclipse early‑stage budgets. A liability of this magnitude can deplete cash reserves, scare investors, and stall product development, threatening the very survival of the company. U.S. copyright law provides for statutory damages that range widely, but courts have the discretion to award the maximum amount when infringement is deemed willful. This framework is intended to deter unauthorized use and to compensate rights holders, but it also means that a single act of infringement can generate a claim far beyond the actual market value of the image. One analysis notes that statutory damages for image misuse can rise to $150,000 per work, especially when the infringement is intentional, and that attorney’s fees may be added on top of that amount[1]. A recent lawsuit against a popular reading platform illustrates the risk: the company was sued for $150,000 over a user‑uploaded photograph that violated copyright[2]. Legal commentary reinforces that courts may award up to $150,000 per act of infringement when the violation is found to be willful[3]. Startups can mitigate this exposure by instituting clear image‑use policies, securing licenses for any third‑party visuals, and implementing automated checks that flag potentially infringing content before it goes live. Registering a designated copyright agent and maintaining thorough records of permissions further strengthens a company’s defensive posture. By treating image compliance as a core component of product dev

Geral
Interesse
dev.to

How I Built TokenSaver: An Image Optimizer for AI Tools

I recently built a small Firefox extension called TokenSaver. The idea started with a simple observation: AI tools don't necessarily need every pixel in a huge screenshot. But we often send them exactly that. A screenshot from a MacBook can easily be thousands of pixels wide. If I'm asking an AI model to read a small piece of code or understand an error message, most of that image may not be useful. So I built a tool to optimize the image before sending it. 👉 Try TokenSaver on Firefox AI coding assistants are becoming part of my daily development workflow. I regularly send screenshots for things like: UI debugging Error messages Code snippets Documentation Terminal output Design feedback The problem is that screenshots can be much larger than necessary. A 3000×2000 screenshot and a smaller optimized version may contain essentially the same information for the task I'm asking the model to perform. But the image still has to be processed as an image input. That's where the idea for TokenSaver came from. The workflow is intentionally simple: Screenshot ↓ TokenSaver ↓ Optimize dimensions ↓ Estimate image tokens ↓ AI tool Instead of: Screenshot ↓ AI tool The goal isn't to destroy image quality. It's to remove unnecessary image data while keeping the information that matters. TokenSaver currently supports several ways of providing an image: File picker Drag and drop Paste screenshots directly It can then optimize the image based on the selected mode. The extension also displays an estimated token count before and after optimization. This gives you an idea of whether the optimization actually made a meaningful difference. I didn't want to create a single "compress" button. Sometimes quality matters. Sometimes saving as much as possible matters more. So TokenSaver provides different optimization modes, including: Sharp — prioritize image quality Auto — balance quality and optimization Max Saving — prioritize reducing the image size This makes it possible to choose based on

IADev
Interesse
dev.to

The AI That Never Leaves My Laptop

Show almost any enterprise a useful AI workflow and the demo goes well right up until someone from security asks the only question that matters: where does the data go? For every mainstream assistant the answer is some version of "to a datacentre we operate, under a policy you should read." For a lot of teams that's fine. For the ones I work with — regulated industries, client-confidential material, an internal audit function with opinions — it ends the conversation. Not because the tool is bad, but because the paperwork to say yes costs more than the productivity it buys. So I built the other thing. OnDevice.ai is a private AI workspace that runs on my own machine: streaming chat, project-based context, file analysis, and real PowerPoint, Excel and Word generation. Inference runs locally through Ollama or LM Studio. Cloud is an option, not an assumption. Running a 30B model locally on a MacBook. Backend: Ollama · Model: Glimmer 30B (GGUF). There's an obvious way to make an AI produce a PowerPoint file: ask the model for one. It's also a bad way. OOXML is a zip of interdependent XML parts with relationship graphs and content-type manifests, and a single malformed relationship gives you a file that refuses to open — usually when your client double-clicks it. So the model never touches the bytes: The model produces a JSON intermediate spec (SlideDeckSpec, WorkbookSpec, DocumentSpec), which is schema-validated first. A fixed, deterministic generator built on python-pptx, openpyxl or python-docx turns the spec into the file. Structural validation is a hard gate on download — zip, OOXML parts, relationship graph, well-formed XML. Fail, and the file is never offered. LibreOffice render checks run too, but only as advisory, in an isolated process on temp copies. LLMs handle conversation, analysis and planning language. Generators own bytes. The payoff: a file that downloads is a file that opens. Not "usually." Next.js + TypeScript at the front, FastAPI + Python behind it,

IADev
Interesse
dev.to

How to Shape Insurance Claims Retrieval Architecture: 5 Access Rules for Auditable Intake

Short answer: use a staged retrieval design with explicit collections, bounded queries, and source context that survives every handoff. For an insurance claims intake system, that usually means separating policy wording, claim evidence, and operational rules, then recording which collection and document version produced each answer. The bill is mostly a retention decision, not a search-engine decision. Keeping every OCR fragment, duplicate attachment, and superseded endorsement in the hot retrieval set increases index work and makes reviewers inspect noise. A deliberate re-index policy, plus removal of deleted records, changes that dominant term. The cost is that a deleted source is no longer available for a later replay, so the audit trail must retain a deletion event and the source identifier even after the vector is gone. Before choosing an endpoint, write the answer a claims adjuster is allowed to see. A contract should name the retrieval unit (for example, one endorsement section or one evidence page), required metadata filters, and the freshness requirement. It also states the citation payload: source ID, version, page or span, and ingestion timestamp. That contract is an access rule, not a prompt instruction. A query for “does this collision qualify?” should not search a single undifferentiated collection. Policy text can establish coverage; the claim file can establish facts; underwriting guidance can explain an exception. Mixing those authorities makes a plausible answer that cannot be reconciled later. I keep the query bounded by tenant, policy, claim, jurisdiction, and effective date. The bound is intentionally boring. It prevents a high-similarity snippet from another insured becoming part of the answer. Use a staged path with a hard stop between retrieval and generation: Resolve identity and claim scope. Select collections whose authority is valid for that scope. Run a bounded vector query, then apply metadata and effective-date filters. Carry source co

IA
Interesse
dev.to

Announcing NgRx Traits 22

Hey everyone! We're excited to announce NgRx Traits version 22, fully compatible with Angular 22 and NgRx Signals 22! Along with the version bump, this release brings the biggest new feature the library has had in a while: withLink, a way to connect your store to component signals, models, inputs, outputs and Angular Signal Forms, without writing sync logic by hand. There is also an Angular Resource view of your calls, new state setter features, a shorter way to call the withEntities* features, a refreshed docs site, and an AI agent skill that teaches coding agents how to use the library. When a store has to work with a form, or with a parent component's model(), input() or output(), you usually end up writing glue code: a linkedSignal to follow the store, sometimes effects to copy changes back and forth, and guards so the two sides don't keep triggering each other in an echo loop. withLink generates that for you. Given a state prop, withLink generates a link[StateProp]() method that returns a linkedSignal: reading it reads the store prop, and setting it writes to the store. const Store = signalStore( withState({ filter: { search: '' } }), // 👇 generates linkFilter() withLink('filter'), ); // In component store = inject(Store); filter = this.store.linkFilter(); // filter() => { search: '' } filter.set({ search: 'shoes' }); // store.filter() => { search: 'shoes' } By default writes go through patchState, but you can route them through a store method instead with set: const ProductsStore = signalStore( withEntities(productEntityConfig), withEntitiesLocalFilter(productEntityConfig, { defaultFilter: { search: '' }, filterFn: (entity, filter) => !filter?.search || entity.name.toLowerCase().includes(filter.search.toLowerCase()), }), // 👇 generates linkProductEntitiesFilter() withLink('productEntitiesFilter', { set: (value, store) => store.filterProductEntities({ filter: value, debounce: 0 }), }), ); Because the returned value is just a WritableSignal, it can be handed s

Dev
Interesse
dev.to

Automating PR-Based Development with Claude Task Master

Automating PR-Based Development with Claude Task Master Claude Task Master (claudetm) is a command line tool that keeps Claude working until a goal is achieved. It is built on the Claude Agent SDK and follows a strict PR-based workflow. This article explains how to set up the tool, how it orchestrates tasks, and how you can extend it with its REST API and webhook system. The tool operates in a loop that consists of four stages: planning, working, PR lifecycle, and verification. In the planning stage it reads the codebase, creates a task list and defines success criteria. During the working stage it makes code changes, runs tests, commits and pushes each change. The PR lifecycle stage opens a pull request, waits for CI, fixes failures and addresses review comments. Finally verification runs a final set of checks to confirm that all success criteria are met before marking the task as complete. PLANNING → WORKING → PR LIFECYCLE → VERIFICATION All work flows through pull requests, which means the code is never committed directly to the main branch. This approach gives teams a clear audit trail and integrates naturally with existing review processes. Install the package with pip, uv or Docker. The following example uses uv: uv tool install claude-task-master Authenticate with Claude Code first: claude login Then run a task in your project directory: cd my-project claudetm start "Add user authentication with tests" The CLI will create a plan, open a pull request, handle CI failures and merge when the PR is approved. If the process is interrupted, the tool persists its state and resumes exactly where it left off. Claude Task Master supports multiple isolated profiles. A profile can be an oauth profile that uses a separate Claude Code configuration directory, or an api-key profile that points to a direct Anthropic-compatible endpoint. claudetm --profile my-team start "Implement payment gateway" Using profiles prevents two Claude subscriptions from clobbering each other and

DevIA
Interesse
dev.to

Mirroring an Android Phone to a Mac

Sometimes you want to see and control your Android phone's screen right on your Mac, wirelessly. Here's the whole setup in a few steps. adb and scrcpy installed (brew install android-platform-tools scrcpy on Mac) Developer Options + USB debugging enabled on the phone Phone and Mac on the same Wi-Fi network Plug the phone in via USB once, then switch adb to wireless mode: adb tcpip 5555 Find the phone's IP (Settings → About phone → Status, or adb shell ip addr), then connect: adb connect :5555 Confirm it's attached: adb devices -l Note: If adb connect times out, it's usually a stale/wrong IP — phones often switch Wi-Fi networks or get a new DHCP lease. Re-check the IP on the phone and retry. With the device connected, launch scrcpy pointed at that address: scrcpy -s :5555 A window opens mirroring the phone's screen in real time, and you can control it with mouse/keyboard. By default the phone's screen can still lock mid-session. Add these flags: scrcpy -s :5555 -w --screen-off-timeout=3600 -w keeps the device awake while scrcpy runs --screen-off-timeout=3600 extends the phone's timeout to an hour for the session 💛 Enjoyed this post? Support this blog by donating to a cause you care about.

MobileDev
Interesse
dev.to

fieldmemo: keep the phone in your pocket, talk to it, get a field journal at home

This is a submission for the Hacktoberfest Open-Source AI Challenge Week 1: Touch Grass AI disclosure: I built this with an AI coding agent, which wrote most of the code and the first draft of this post. I read it, watched the demo and approved the text. Everything below about what worked and what broke comes from the build log in the repo, not from memory. fieldmemo turns the voice memos you record on a walk into a field journal, on your own machine, with no internet. The idea is that the phone stays in your pocket. When you see something, you press record and say it: "two buzzards circling over the ridge", "the stile after the second field has a broken step, report it to the council", "come back for the blackberries next September". No app to open, no form to fill in, no typing with cold fingers. Then you put the phone away and keep walking. At home you run one command on the folder of memos, plus the GPX track from your phone or watch if you recorded one: fieldmemo walks/2026-10-08/memos --gpx walks/2026-10-08/track.gpx and get three files: journal.md: what you saw, what you heard but didn't see, path problems with a map link for each, a to-do list, and a timeline with every memo's transcript. walk.geojson: the track and a pin for each memo, for QGIS, uMap or geojson.io. notes.csv: one row per sighting, hazard or to-do. It's for walkers, birders and ramblers who want a record of a walk without spending the walk looking at a screen, and for anyone who reports broken stiles and flooded paths to their council and wants the time and position written down for them. That's the full run on the sample walk in the repo: seven memos in, journal out, about 48 seconds on an 8-core CPU with no GPU. This is the "At a glance" block it wrote, with only the map links shortened: **Seen:** buzzard, fly agaric x12, blackberry **Heard (not seen):** green woodpecker **Path problems** - 10:02 ground: soaked from last night (map) - 10:02 path: by the first gate is basically a pond (map)

IAMobile
Interesse
dev.to

Axios timeout for chunked responses

ALRIGHT, this was an interesting one. I use Axios in one of my pet projects. Basically, the project is a Telegram bot that transforms voice messages into text. I know that Telegram now has this feature for premium subscribers, but this is not something we are about to cover in this article. Here I want to talk about the tricky way the Axios timeout works. Let's start with the simple HTTP server (I use Express as an example) and a single API endpoint, which takes 10 seconds to resolve: import { createServer } from 'node:http'; import express from 'express'; const api = express(); // I have an API endpoint which takes 10s to resolve api.post('/regular', (_, res) => { setTimeout(() => res.status(200).send({}), 10000); }); const server = createServer(api); server.listen(3000); If we deep dive into the documentation, we will find that Axios supports the timeout property, and it works quite well: import axios from 'axios'; const start = new Date().getTime(); try { console.log('Start request'); await axios.request({ method: 'POST', url: 'http://localhost:3000/regular', timeout: 5000 }); console.log('Request was successful'); } catch (err) { console.error(err); } const end = new Date().getTime(); const requestTime = Math.floor((end - start) / 1000); console.log(`Request took ${requestTime}s,`, 'should be 5s!'); // Start request // // AxiosError: timeout of 5000ms exceeded // at RedirectableRequest.handleRequestTimeout (/axios-streaming-timeout/node_modules/axios/lib/adapters/http.js:630:16) // at RedirectableRequest.emit (node:events:513:28) // at Timeout. (/axios-streaming-timeout/node_modules/follow-redirects/index.js:169:12) // at listOnTimeout (node:internal/timers:569:17) // at process.processTimers (node:internal/timers:512:7) { // code: 'ECONNABORTED', // // Request took 5s, should be 5s! If it works fine, what is the problem then, you ask me. Here is the thing: as I said, I have a Telegram bot that converts voice messages into text. It basically decompresses the voi

Dev
Interesse
The Verge

BMW’s iX4 SUV is a 428-mile defensive weapon against China’s EV takeover

While much of the automotive world sits dumbfounded as China gobbles up all its customers, BMW continues to roll out extremely well-crafted, technologically advanced electric vehicles that impress in both drive quality and price. The latest is the BMW iX4, a coupe-shaped SUV that puts a sportier spin on the automaker's iX3. The iX4 is the third vehicle to be released on BMW's next-generation Neue Klasse platform, following the iX3 and i3 models. The iX4 50 xDrive will come first in March 2027, followed by an even more high-performance M60 xDrive version later in the year. The automaker is positioning this new lineup as its bulwark against t … Read the full story at The Verge.

Geral
Interesse