最新资讯
bloomberg.com Nvidia 加强东南亚芯片追踪以打击走私 thestack.technology 模型路由需求升温,Agent Router 推出开源替代方案 unite.ai Cashfree 为 AI Agent 的托管结账加入 WebMCP 工具 dev.to 我们在 DolphinBench 上测试记忆检索:纯关键词搜索暴露了自身回归 dev.to 别再把 Agent 写成 while 循环,把它建模为状态机 analyticsindiamag.com 小语言模型可能重塑企业 AI 部署方式 bloomberg.com Rightmove 与 Scout24 借 AI 产品应对低迷房市并上调展望 stackoverflow.blog 欢迎来到芯片时代:半导体制造、AI 数据中心与芯片设计的未来 www.youtube.com AI Agent 总犯同样的错:CentralAgent AI 将记忆重构为经验系统 pub.towardsai.net Netflix 科学家建议重采样 LLM 评判:5 次仅将误差棒缩小 13% pub.towardsai.net Jev 作为 LLM 前的静默层:构建提示感知的模型路由器 reddit.com OpenAI 称 Astra 仅满足 10% 安全任务标准
多元动态
登录 注册
智能体 x.com · @rauchg

Vercel CEO 发布 gdp-ts:为 TypeScript 引入编译期授权证明

原文 我的收藏

Guillermo Rauch 推出 gdp-ts,一个面向更安全 API 设计的库、linter 与 AI skill。该方案要求敏感函数携带调用方已执行授权检查的 proof,并由类型检查器在编译期验证,从而阻止团队与 agent 引入严重安全缺陷。作者称此类模式在 Haskell 等生态早已存在,但人工评审与认知/语法成本使其小众;如今 agent 写码量超过人工评审能力,硬约束反而更适配。README 以 Vercel API 产品中修改 Project 密码需特定角色与权益 proof 为例。

AI推荐理由 Vercel CEO 发布 gdp-ts,将 Haskell 的 Ghosts of Departed Proofs 模式引入 TypeScript,通过编译期 proof 约束敏感函数必须完成授权检查,并配套 linter 与 AI skill。其新意在于把类型级安全约束与 agent 写码场景结合,README 以 Vercel API 改密码需角色与权益 proof 为例。局限是仍处发布介绍阶段,无独立验证或采用数据,实际效果待观察。

78 浏览 29,321 点赞 599 评论 57 转发 29

正文

Introducing gdp-ts: Ghosts of Departed Proofs for TypeScript. gdp-ts is a library, linter and AI skill for safer API design. Under this contract, sensitive functions require 'proofs' that the caller performed an authorization check. The typechecker verifies these proofs at compile time, preventing your team and agents from shipping catastrophic security (and other kinds of) bugs. While these patterns have existed for quite some time, especially in ecosystems like Haskell, ① human code review and ② cognitive and syntactic overhead made these solutions niche. The situation is now inverted. Agents are writing more code than we can review, and they \*thrive\* in tight loops with hard constraints that would frustrate us. We see this with the rise of Rust, borrow checker, code aesthetics debate and all. The README and examples model a real-world Vercel API product constraint: changing the password on a Project requires a proof of a certain role + a certain entitlement. Thanks to Matt Noonan and Ollie Charles for their research in this space. [github.com/rauchg/gdp-ts](https://github.com/rauchg/gdp-ts) [Your browser does not support the video tag.](https://video.twimg.com/amplify_video/2107106516126044160/vid/avc1/1200x630/wIADZR1_fLQBV4TQ.mp4?tag=29) [🔗 View on Twitter](https://x.com/rauchg/status/2107119811444748555/video/1)

来源报道 · 1 篇 · 以下链接均前往原始媒体

← 返回精选动态 原文

更多内容