safe-upgrade项目展示了如何通过Jev、LangGraph和Tenuo三个框架的协同,构建安全的依赖升级代理1。该项目的核心架构将决策判断、控制流和权限管理分离,形成一套具有明确权限边界的Agent委托工作流1。
在决策层面,Jev采用System One Model处理依赖升级中的语义判断问题1。TypeSafe SDK的调用示例显示,client.systemOne()返回类型化的Choice响应,包含具体选择、概率分布和置信度信息1。在示例中,系统选择"author_tests"行动的概率为0.74,整体置信度为0.821。权限管理则由Tenuo负责实现任务级授权,为test_author创建了生命周期为600秒的terminal session1。架构还进行了授权拒绝测试,对implementer的write_test_file能力进行了限制,输出"TENUO_TOOL_NOT_AUTHORIZED"1。
该实现基于@typesafe-ai/sdk 0.6.0和@tenuo/core 0.3.0-beta.01。在CI环境中,GitHub Actions权限(如contents: read和pull-requests: write)与Tenuo warrants形成两层控制机制1。项目遵循的核心原则是"保持推荐行动的组件与定义其权限的组件分离"1。
The safe-upgrade project demonstrates a practical approach to building secure AI agent workflows by combining three complementary frameworks to handle dependency upgrades.1 The architecture separates decision-making, control flow, and authorization into distinct components, with Jev processing semantic judgments about upgrades, LangGraph managing workflow state, and Tenuo enforcing task-scoped permissions.1
At the decision layer, Jev's System One Model translates repository evidence into typed probabilistic choices.1 When the TypeSafe SDK client calls systemOne(), it returns a Choice response containing the recommended action, a probability distribution, and a confidence score.1 In the documented example, the system recommended the 'author_tests' action with a 0.74 probability and 0.82 confidence level.1 At the authorization layer, Tenuo implements fine-grained task-level access control, creating scoped terminal sessions with defined lifecycles—such as a 600-second session for the test_author user.1 Authorization failures are explicitly tested and logged; when the implementer role attempts write_test_file without proper warrant, Tenuo returns 'TENUO_TOOL_NOT_AUTHORIZED'.1 In CI environments, GitHub Actions permissions (such as contents: read and pull-requests: write) work in conjunction with Tenuo warrants to establish a two-layer control system.1
The implementation is built on @typesafe-ai/sdk version 0.6.0 and @tenuo/core version 0.3.0-beta.0.1 The design embodies a core principle: keeping the component that recommends actions separate from the component that defines permissions for those actions.1
评论
还没有评论,欢迎留下第一条。