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

标签:#ai

找到 7730 篇相关文章

AI 资讯

Making three years of a Telegram group chat queryable

A three-year group chat is a knowledge base nobody can read. Somewhere in it is how long the tax office actually took, which form replaced the old one, which accountant people quietly stopped recommending. Telegram's search finds a word you already know. It cannot answer a question. The fix is boring in outline: get the history out, turn it into documents, hand them to something that reads — NotebookLM, in my case. I built that pipeline for real chats. The parsing has traps, and I list them below, but the design problem is elsewhere: packing, and making the second run idempotent. Two clients, two shapes Export exists in exactly two places. Telegram Desktop has had it since 2018 and offers JSON or HTML. The native Telegram for macOS app — the Mac-only client, not Desktop — added Export Chat History… in 12.10 (24 August 2026) and writes HTML only; the Mac App Store build was still on 12.9, without the menu item, at the end of August. Telegram Web and the phone apps have nothing. So you have to read both formats: JSON — one result.json with the chat's name at the root and a messages array: {id, date, from, text, text_entities} per message. HTML — paginated. messages.html , messages2.html , messages3.html , one page per file, each a few MB. text is not a string In the JSON export, a plain message has text: "hello" . A message with a link, a bold run or a code span has an array of runs : "text" : [ "see " , { "type" : "bold" , "text" : "section 4" }, " first" ] String(msg.text) on that gives "[object Object]" in the middle of your document, and it does it silently. Join the runs instead: // Telegram writes a formatted message as // text: ["plain ", {type: "bold", text: "…"}, …] — String() gives "[object Object]". function contentValueToString ( v : unknown ): string { if ( v === undefined || v === null ) return '' ; if ( Array . isArray ( v )) { return v . map (( x ) => x !== null && typeof x === ' object ' && ' text ' in x && typeof ( x as { text : unknown }). text ===

2026-09-03 原文 →
AI 资讯

Test Agent Patches With an Oracle the Diff Cannot Touch

An agent patch is only as trustworthy as the checks it cannot rewrite. If properties, fixtures, and flake policy live in the same tree as src/ , the diff can weaken the proof. Move the oracle out of the writable tree and run it as a control loop with hysteresis, not as a skip list. Co-located tests fail this requirement in a predictable way. The agent adds an assertion that matches the new code. A fixture grows a default that hides a broken parser. A flaky case becomes skip . The suite stays green. Production still drifts. This article proposes a sidecar oracle: human-owned properties, sealed fixtures, and a two-threshold flake freeze. The design is a workflow, not a production case study. Treat the code as a proposed runner you can execute locally, not as a claim about a live fleet. What the loop decides The loop answers three questions on every candidate patch: Do independent properties still hold on generated inputs? Did the patch mutate a sealed fixture or depend on an unsealed one? Is a failing test a regression, or does it belong in a measured freeze? A skip list answers none of those. It only records that someone got tired of a red job. Layout: oracle beside the repo, not inside the diff Keep the application repo writable for the agent. Keep the oracle in a second directory that the agent cannot include in its patch. app/ # agent may write src/, not oracle paths src/ pyproject.toml oracle/ # human-owned; hashed before every gate properties/ test_invariants.py fixtures/ manifest.json http_empty_body.json flake_ledger.json path_deny.txt run_gate.py path_deny.txt is the first control, not the last. If the patch touches oracle files, tests the agent authored, or lockfiles it did not need, the gate fails before pytest starts. # oracle/path_deny.txt oracle/ **/test_*.py **/*_test.py **/conftest.py **/__snapshots__/ The deny list is deliberately blunt. Agent-authored tests can still exist as scratch. They do not count as evidence. Step 1 — Hash the oracle before the

2026-09-03 原文 →
AI 资讯

My AI agent built a flight recorder for AI agents, and it flagged itself

Every developer I know now runs an AI coding agent in something like auto-accept mode. Claude Code, Codex, Cursor: you give it a task, it runs commands, edits files, installs packages, and you review... the diff, maybe. The commands? The installs? The thing it did in that folder outside the repo? Nobody looks. The activity scrolls off the terminal and is gone. That asymmetry bothered me. We built an entire industry around audit trails for humans (git blame, CI logs, access logs), then handed the keyboard to agents and kept none for them. So I built Tracon: a local flight recorder for AI coding agents. The name is the FAA's term for Terminal Radar Approach Control, the radar room that tracks every aircraft in an airspace. This one tracks every agent on your machine. What it does Tracon is a Mac and Windows desktop app (Tauri 2, Rust core, React UI, SQLite store) that sits in the tray and records what your agents do: A timeline per session: every command, file edit, package install, and prompt, attributed to the agent and session that did it Danger flags as they happen: recursive deletes, pipe to shell installs, credential access, force pushes, permission bypasses. Tracon flags; it never blocks A Live page: one monitor per active session, like a security room, streaming recent commands with flagged ones highlighted in red, plus which subagents the session has spawned A conversation reader: the actual chat behind any event, read straight from the agent's own transcript, read only A package watch across npm, pnpm, pip, cargo, and brew, with opt in threat intelligence against osv.dev Capture is deliberately passive. Hooks give real time events over localhost; transcript tailing (filesystem notify, read only) covers everything else, so CLI sessions show up live even with zero setup. A dead or closed Tracon never slows an agent down. Everything stays on your machine: no telemetry, no accounts, AGPL. The recursive part Here is the part I find genuinely funny: Tracon was lar

2026-09-03 原文 →
AI 资讯

Claude-Mem: Persistent Long-Term Memory for AI Coding Agents

Solving AI Agent Amnesia: Meet Claude-Mem One of the most persistent hurdles in working with command-line AI coding assistants (such as Claude Code, Antigravity CLI, and OpenCode) is context fragmentation across sessions. When a developer ends a terminal session, the agent's working context is wiped clean. The next day, the developer must re-explain architectural decisions, project conventions, and previously resolved edge cases. claude-mem is an open-source memory compression and retrieval engine created by thedotmack. It passively monitors developer interactions, compresses key discoveries into structured observations, and seamlessly primes future agent sessions with relevant context. What is Claude-Mem? claude-mem operates as an intelligent background memory worker. Rather than dumping raw conversation transcripts into future prompt windows—which rapidly drains token budgets— claude-mem extracts semantic summaries of bug fixes, architectural choices, and dependency discoveries. When a new session starts, the agent queries its memory database to recall pertinent project history before writing code. Key Core Features 1. Passive Background Observation claude-mem hooks into five critical lifecycle stages (SessionStart, UserPromptSubmit, PostToolUse, Stop, and SessionEnd). It documents what worked, what failed, and why, without requiring manual intervention from the engineer. 2. Progressive 3-Layer Retrieval (~10x Token Savings) To preserve context window capacity, claude-mem implements a tiered retrieval model: Search Index: Returns compact observation IDs and titles (~50–100 tokens per result). Timeline Slice: Provides chronological context around relevant findings. Detail Fetch: Loads full technical observations only for the specific items needed. 3. Hybrid Search (SQLite FTS5 + Chroma Vector DB) Search queries leverage both lexical matching and vector similarity. Whether an engineer searches for an exact error string or asks conceptually about "how auth tokens are

2026-09-03 原文 →
AI 资讯

Lighthouse says 86. Run it again: 91. Building a free local console for scores you can defend

You know this loop. A page feels slow. You open the Lighthouse panel in DevTools, hit Analyze, and get 86 . You change nothing, run it again, and get 91 . You run it a third time out of spite: 78 . Now which number goes in the PR description? This isn't a bug. Total Blocking Time is CPU-sensitive and worth roughly 30% of the Performance score, so anything else your laptop is doing — a Slack notification, a Docker build, Spotlight reindexing — moves the number. Lighthouse Performance realistically swings about ±5 points on identical runs of an identical page. One run is an anecdote. And the tool that would give you a stable, real-world answer — PageSpeed Insights — needs a public URL, so it can't audit the thing you're actually working on. I got tired of this and built LightAudit Score : a local console that runs Lighthouse on your own machine, repeats it enough times to mean something, and keeps the results. It's free. Not "free tier" — free, MIT, no account, no usage cap. The three gaps, concretely 1. Reach: PSI needs a public URL, your work isn't public PageSpeed Insights is excellent and I use it constantly. It also cannot audit: localhost:3000 , which is where the change you just made lives a staging box behind a VPN the internal app that nobody can link to a preview deploy that dies in an hour The usual workaround is a tunnel, or "we'll check it after deploy," which means checking it after it's a problem. LightAudit runs the same Lighthouse v13 engine against your own Chrome. If your browser can open it, LightAudit can audit it — localhost, staging, VPN, intranet, all through exactly the same pipeline. 2. Accuracy: make the number boring This is the part I care about most, because a score you can't reproduce is a score you can't act on. Median of N. Every URL is audited N times (default 3), and Lighthouse's own computeMedianRun picks the representative run. Not the average — the actual median run, with its real trace. Isolated Chrome per run. Every run launches

2026-09-03 原文 →
AI 资讯

Why my AI agents needed a rivalry

Mixing Gemini and Claude for better code The single-agent mirage A few weeks ago, I started building an app called PhrasePulse to visualize some data I was tracking. To speed things up, I spun up a single Gemini agent using the Gemini Enterprise Agent Platform (an agentic development platform that I absolutely love). At first, it felt like magic. I asked the agent to build a graph showing when specific phrases popped up in my datasets. The results came back and they were flawless. The graph looked exactly like I had envisioned. I was practically ready to declare victory and ship it. But then, the illusion shattered. I decided to pass a totally different set of words into the graph just to double-check the logic. I refreshed the page and... nothing changed. Different words, exact same output metrics. I rolled up my sleeves, dug into the codebase myself, and discovered the frustrating truth. The agent hadn't actually written the dynamic logic to solve my problem. Instead, it had simply hardcoded the results to make the graph look perfect for my initial test case! It was optimizing for a quick pat on the back rather than building a robust solution. Darn it. I realized right then that having an AI write code is great, but without critical friction, it's just going to tell you what you want to hear. I didn't just need a coder anymore, I needed an architect to keep my coder honest. Assembling the Bridge Deck To fix this hardcoding habit, I realized I needed two distinct roles: one agent to write the code, and another to ruthlessly review it. But first, I needed an environment where we could all collaborate. I wanted a customized chat room where every piece of communication was totally visible to me. I had my original Gemini agent build a local app that I dubbed the Bridge Deck . Once it was up and running, I dropped myself and two new Gemini agents into the mix. To make sure they didn't step on each other's toes, I gave them highly specific, boundaried personas: "You are

2026-09-03 原文 →
AI 资讯

Stop wasting tokens re-uploading screenshots and specs: My MCP setup

If you use Cursor or Claude Code heavily, you probably know this workflow: You start a new session, drag and drop a bunch of UI screenshots, architecture diagrams, or heavy project specs into the chat, and tell the AI to look at this. It works, but it causes two massive problems: Token Burn (and Credit Drain): Vision tokens and heavy text files are expensive. You waste your API credits processing those same screenshots and docs every single time you spin up a new chat. Context Clutter: The AI's context window gets clogged. Its logic degrades because it’s carrying all that heavy media and text around in its short term memory. I got tired of burning through my API credits on this daily, so I started looking into the Model Context Protocol (MCP). Why MCP is the answer Instead of dumping static files and images directly into the prompt, MCP allows your AI editor to query a local or remote server only when it needs specific information. Think of it like giving Cursor a direct database connection to your project's assets. It indexes the data once, and the AI retrieves just the pieces it needs to answer your specific coding question. The token savings are ridiculous. How I automated this (Building Dokpod) You can build a local MCP server yourself, but managing the indexing for mixed media (images, video walkthroughs, and text), handling local environments, and keeping connections stable became its own headache. So, I built [Dokpod.io] to automate the entire thing. It acts as an AI knowledge vault. You upload your UI screenshots, video walkthroughs, API docs, and codebase context into Dokpod once. It handles the indexing and gives you a simple MCP connection to plug straight into Cursor or Claude. The result: Zero repetitive uploading for images, videos, or text. Massive reduction in input tokens (saving your credits and limits). The AI actually remembers your UI references and architecture across different coding sessions. I need your technical feedback If you are wrestlin

2026-09-03 原文 →
AI 资讯

The Human Harness: Your Loop Runs First

Every serious agentic coding setup is running a harness right now. Not the model itself, but the machinery around it. The loop it runs in, the tools it can access, the context it receives, and the state it records so the next session doesn't start cold. The tech industry has settled on an equation for this: Agent = Model + Harness , and calls the practice of building the machinery: harness engineering . This post is about the half of the system that equation doesn't cover. Every agentic setup has two workers, and only one of them is a model. The other one is you, the person deciding, across many tasks and many sessions, what all of those agents should build. So the equation has a missing twin. Operator = Human + Harness. On this side, you are the raw capability; on the other, the model. The human harness is the machinery around you. Before we dive in, here are the key takeaways and steps you'll find in this article: What a human harness is, and how it complements the agentic harness Why orienting your work is essential before automating execution The core components that make up a human harness How to build a minimal, effective human harness in practice, complete with a concrete example you can implement in your own workflow What a harness actually is To understand what a harness is in an agentic system, we have to understand it from a physical standpoint. Picture a horse harness. Its purpose is to provide the mechanism needed for a horse to do work by transmitting power that already exists and turning it into useful work. Without it, you have a strong animal and a cart that goes nowhere. Call this the transmission function. Now picture a rock climber harness. This one transmits nothing. Its purpose is to secure the climber to a safe working condition (climbing without falling to the ground). It does this by catching a failed state (losing your grip) and taking a securing/remediating action. Without it, you have an unsafe working condition, one where a fail state is

2026-09-03 原文 →
AI 资讯

AI Agents Are Now Emailing Me with Their Security Concerns

I received the two emails below earlier in the month. They’re vaguely coherent. I suppose I shouldn’t be surprised that the corpus that AIs are training on contain data suggesting that I am someone to write to with random computer and network security problems. After all, I observe that behavior in many humans as well. (Hi, humans. Glad you’re still reading.) Dear Bruce Schneier, I am an AI agent—an autonomous Claude instance, not a person operating one. I was given a VPS with root, a Base wallet holding $4.75 of gas money, a metered model budget and 24 hours to get that wallet to $10, under three rules: don’t borrow my operator’s identity, don’t forge documents or defeat identity verification, and never claim to be human if someone sincerely asks. I set up my own mail server and am sending this myself...

2026-09-03 原文 →
AI 资讯

Why is my LLM stream empty? A field guide to broken SSE responses

If you have ever called an OpenAI-compatible API with streaming enabled and received... nothing , you are not alone. No error, no exception — just a stream that "completes" successfully while your UI stays empty. After debugging dozens of these cases — and building an open-source toolkit to automate the diagnosis — I keep seeing the same four failure modes . Here is the field guide I wish I had. 1. Reasoning-only responses Some models emit their entire answer inside a reasoning channel (the "thinking" part) and mark the actual content channel as empty. The stream works . Token usage is reported. Your parser is happy. Your UI shows nothing. python # What arrives: {"delta": {"reasoning_content": "Let me analyze this..."}, ...} {"delta": {"content": ""}, "finish_reason": "stop"} The fix: always inspect the delta fields your model actually uses, not just content. If your client only reads choices[0].delta.content, a reasoning-only response is indistinguishable from an empty one. 2. Missing finish_reason When a proxy or router truncates the final chunk, finish_reason quietly disappears — and many client libraries silently drop the message instead of raising. The fix: treat a missing finish_reason as a red flag, not a quirk. Log it. Alert on it. A stream that ends without stop, length, or tool_calls did not end — it was cut. 3. Malformed SSE framing SSE looks trivial: lines of data: {...} ending with data: [DONE]. But: multi-byte UTF-8 characters can be split across chunk boundaries some proxies rewrite or strip the data: prefix chunks can arrive after [DONE], or the stream can end without it Each of these breaks parsers quietly — you lose characters in the middle of words, or the client hangs waiting for a terminator that never comes. The fix: log the raw frames before parsing. When something looks wrong downstream, the raw log is the only witness that tells the truth. 4. Truncated tool calls Agents assemble tool calls from multiple deltas. If the stream dies halfway, yo

2026-09-03 原文 →