#code
Public notes from activescott tagged with #code
All things code!
Tuesday, February 3, 2026
Sunday, February 1, 2026
AgentDojo: A Dynamic Environment to Evaluate Prompt Injection Attacks and Defenses for LLM Agents
To measure the adversarial robustness of AI agents, we introduce AgentDojo, an evaluation framework for agents that execute tools over untrusted data. To capture the evolving nature of attacks and defenses, AgentDojo is not a static test suite, but rather an extensible environment for designing and evaluating new agent tasks, defenses, and adaptive attacks. We populate the environment with 97 realistic tasks (e.g., managing an email client, navigating an e-banking website, or making travel bookings), 629 security test cases, and various attack and defense paradigms from the literature. We find that AgentDojo poses a challenge for both attacks and defenses: state-of-the-art LLMs fail at many tasks (even in the absence of attacks), and existing prompt injection attacks break some security properties but not all. We hope that AgentDojo can foster research on new design principles for AI agents that solve common tasks in a reliable and robust manner.
Saturday, January 31, 2026
google-research/camel-prompt-injection: Code for the paper "Defeating Prompt Injections by Design"
Friday, January 30, 2026
asteasolutions/zod-to-openapi: A library that generates OpenAPI (Swagger) docs from Zod schemas
A library that uses zod schemas to generate an Open API Swagger documentation.
microlinkhq/cloudflare-bot-directory: CloudFlare Radar verified bots directory – 500+ web crawlers and user agents as JSON.
A comprehensive list of 500+ verified bots and web crawlers from CloudFlare Radar, available as a JSON dataset for bot detection, user agent analysis, and web scraping identification.
Why
Identifying legitimate bots from malicious scrapers is essential for web security and analytics. This package provides the official CloudFlare Radar verified bots directory, helping you:
Detect verified bots – Identify legitimate crawlers like Googlebot, Bingbot, and more Filter analytics – Exclude known bots from your traffic reports Allow-list crawlers – Permit verified bots while blocking suspicious traffic User agent lookup – Match user agent strings against known bot patterns
Thursday, January 29, 2026
Intro
Simple cross-stack type-safety for your API, with just a sprinkle of TypeScript magic ✨
🛟 Contract-First API 🌈 It's just HTTP/REST 🔒 Supports all Standard Schema validation libraries 📦 OpenAPI generation
trpc/trpc: 🧙♀️ Move Fast and Break Nothing. End-to-end typesafe APIs made easy.
tRPC allows you to easily build & consume fully typesafe APIs without schemas or code generation. Features
✅ Well-tested and production ready. 🧙♂️ Full static typesafety & autocompletion on the client, for inputs, outputs, and errors. 🐎 Snappy DX - No code generation, run-time bloat, or build pipeline. 🍃 Light - tRPC has zero deps and a tiny client-side footprint. 🐻 Easy to add to your existing brownfield project. 🔋 Batteries included - React.js/Next.js/Express.js/Fastify adapters. (But tRPC is not tied to React, and there are many community adapters for other libraries) 🥃 Subscriptions support. ⚡️ Request batching - requests made at the same time can be automatically combined into one 👀 Quite a few examples in the ./examples-folder
Wednesday, January 28, 2026
TrigenSoftware/simple-release: A simple tool to release projects with monorepo support.
A simple tool to automate version bumps, changelogs, and releases using Conventional Commits.
📄 Uses conventional-changelog to parse commits, determine the next version, and generate a changelog. 🗂️ Supports monorepos and can release multiple packages in a single run. 🧩 Flexible and extensible with custom addons for different project types. 🚀 Has GitHub Action to automate releases in CI/CD pipelines.
Schema Reference - Model Context Protocol
interface ToolAnnotations { title?: string; readOnlyHint?: boolean; destructiveHint?: boolean; idempotentHint?: boolean; openWorldHint?: boolean; }
Additional properties describing a Tool to clients.
NOTE: all properties in ToolAnnotations are hints. They are not guaranteed to provide a faithful description of tool behavior (including descriptive properties like title).
Clients should never make tool use decisions based on ToolAnnotations received from untrusted servers.
Tuesday, January 27, 2026
ChatGPT Containers can now run bash, pip/npm install packages, and download files
ChatGPT can directly run Bash commands now. Previously it was limited to Python code only, although it could run shell commands via the Python subprocess module. It has Node.js and can run JavaScript directly in addition to Python. I also got it to run “hello world” in Ruby, Perl, PHP, Go, Java, Swift, Kotlin, C and C++. No Rust yet though! While the container still can’t make outbound network requests, pip install package and npm install package both work now via a custom proxy mechanism. ChatGPT can locate the URL for a file on the web and use a container.download tool to download that file and save it to a path within the sandboxed container.
Is this a data exfiltration vulnerability though? Could a prompt injection attack trick ChatGPT into leaking private data out to a container.download call to a URL with a query string that includes sensitive information?
I don’t think it can. I tried getting it to assemble a URL with a query string and access it using container.download and it couldn’t do it. It told me that it got back this error:
ERROR: download failed because url not viewed in conversation before. open the file or url using web.run first.
This looks to me like the same safety trick used by Claude’s Web Fetch tool: only allow URL access if that URL was either directly entered by the user or if it came from search results that could not have been influenced by a prompt injection.
MCP Apps - Bringing UI Capabilities To MCP Clients | Model Context Protocol Blog
The architecture of MCP Apps relies on two key MCP primitives:
Tools with UI metadata: Tools include a _meta.ui.resourceUri field pointing to a UI resource UI Resources: Server-side resources served via the ui:// scheme containing bundled HTML/JavaScript // Tool with UI metadata { name: "visualize_data", description: "Visualize data as an interactive chart", inputSchema: { /* ... */ }, _meta: { ui: { resourceUri: "ui://charts/interactive" } } } The host fetches the resource, renders it in a sandboxed iframe, and enables bidirectional communication via JSON-RPC over postMessage.
lancedb/lancedb: Developer-friendly OSS embedded retrieval library for multimodal AI. Search More; Manage Less.
LanceDB is designed for fast, scalable, and production-ready vector search. It is built on top of the Lance columnar format. You can store, index, and search over petabytes of multimodal data and vectors with ease. LanceDB is a central location where developers can build, train and analyze their AI workloads.
Monday, January 26, 2026
awslabs/mountpoint-s3-csi-driver: Built on Mountpoint for Amazon S3, the Mountpoint CSI driver presents an Amazon S3 bucket as a storage volume accessible by containers in your Kubernetes cluster.
the Mountpoint CSI driver presents an Amazon S3 bucket as a storage volume accessible by containers in your Kubernetes cluster
Friday, January 23, 2026
Durable Execution Solutions | Temporal
Temporal is like a distributed state-saving workflow execution engine. Weirdly useful primitive.
The Leading Multi-Agent Platform
Tuesday, January 20, 2026
github/spec-kit: 💫 Toolkit to help you get started with Spec-Driven Development
An open source toolkit that allows you to focus on product scenarios and predictable outcomes instead of vibe coding every piece from scratch.
Monday, January 19, 2026
First impressions of Claude Cowork, Anthropic’s general agent
Anthropic say that Cowork can only access files you grant it access to—it looks to me like they’re mounting those files into a containerized environment, which should mean we can trust Cowork not to be able to access anything outside of that sandbox.
Update: It’s more than just a filesystem sandbox—I had Claude Code reverse engineer the Claude app and it found out that Claude uses VZVirtualMachine—the Apple Virtualization Framework—and downloads and boots a custom Linux root filesystem.
I recently learned that the summarization applied by the WebFetch function in Claude Code and now in Cowork is partly intended as a prompt injection protection layer via this tweet from Claude Code creator Boris Cherny:
Summarization is one thing we do to reduce prompt injection risk. Are you running into specific issues with it?
A quote from Jeremy Daer
Subscribe [On agents using CLI tools in place of REST APIs] To save on context window, yes, but moreso to improve accuracy and success rate when multiple tool calls are involved, particularly when calls must be correctly chained e.g. for pagination, rate-limit backoff, and recognizing authentication failures.
Other major factor: which models can wield the skill? Using the CLI lowers the bar so cheap, fast models (gpt-5-nano, haiku-4.5) can reliably succeed. Using the raw APl is something only the costly "strong" models (gpt-5.2, opus-4.5) can manage, and it squeezes a ton of thinking/reasoning out of them, which means multiple turns/iterations, which means accumulating a ton of context, which means burning loads of expensive tokens. For one-off API requests and ad hoc usage driven by a developer, this is reasonable and even helpful, but for an autonomous agent doing repetitive work, it's a disaster.
antirez/flux2.c: Flux 2 image generation model pure C inference
This program generates images from text prompts (and optionally from other images) using the FLUX.2-klein-4B model from Black Forest Labs. It can be used as a library as well, and is implemented entirely in C, with zero external dependencies beyond the C standard library. MPS and BLAS acceleration are optional but recommended.