惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

阮一峰的网络日志
阮一峰的网络日志
雷峰网
雷峰网
Last Week in AI
Last Week in AI
T
Tailwind CSS Blog
V
Visual Studio Blog
Jina AI
Jina AI
博客园 - 司徒正美
The Cloudflare Blog
Hugging Face - Blog
Hugging Face - Blog
博客园_首页
S
SegmentFault 最新的问题
博客园 - 三生石上(FineUI控件)
有赞技术团队
有赞技术团队
小众软件
小众软件
V
V2EX
Apple Machine Learning Research
Apple Machine Learning Research
美团技术团队
博客园 - 【当耐特】
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
IT之家
IT之家
WordPress大学
WordPress大学
爱范儿
爱范儿
月光博客
月光博客
大猫的无限游戏
大猫的无限游戏

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant
Permission Mode Lives in APX, Not APC
Manuel Bruña · 2026-06-23 · via DEV Community

Permission Mode Lives in APX, Not APC

APC is the portable context layer. APX is the daily-use runtime and tooling layer. That split is the reason permission mode belongs in APX, not in the repo.

Permissions are not project truth. They are machine policy.

That sounds small, but it matters. A repository should travel cleanly across laptops, desktops, and runners. A permission setting should not force the same risk level everywhere the repo lands. If you bake permission state into APC, you make the project less portable and mix local trust with shared context.

What APX actually stores

The APX code makes the boundary explicit. Permission mode lives in ~/.apx/config.json, not in .apc/.

The available modes are:

  • total - run every tool without confirmation
  • automatico - allow safe reads and safe shell work directly; ask for confirmation on destructive, outbound, runtime, MCP, or filesystem-changing actions
  • permiso - run only tools in allowed_tools directly; everything else needs confirmation

automatico is the default. That is a sane choice for daily use because it keeps the runtime usable without making every action manual.

Why this cannot live in APC

APC is the portable layer: project metadata, agents, skills, MCP hints, and durable project context. That content should be reviewable in git and stable across tools.

Permission mode is different. It depends on:

  • who owns the machine
  • whether the machine is personal or shared
  • whether the current task is exploratory or high-risk
  • how much trust the user wants the runtime to have today

Those are runtime facts, not project facts.

If you move permissions into APC, two bad things happen:

  1. Clone the repo somewhere else and you inherit a policy that may not fit the new machine.
  2. Edit permission state in git and you turn a local safety choice into shared project baggage.

That is the wrong direction. The repo should describe the work. APX should decide how much power the local runtime gets while doing it.

The guard is runtime code, too

APX enforces this boundary in code, not just in docs.

createPermissionGuard() reads globalConfig.super_agent.permission_mode plus allowed_tools, then blocks or allows a tool call based on the active mode.

The rule is simple:

  • total skips the guard
  • automatico blocks dangerous actions unless the user confirms them
  • permiso blocks everything except the explicitly allowed tools

That is a useful shape because it matches real work. Reading a file is not the same as mutating a repo. A safe lookup is not the same as firing a runtime or touching an MCP connection.

APX keeps that distinction in the runtime where it belongs.

Practical example

Say you are on a personal laptop and want APX to be mostly hands-off. automatico fits.

Now imagine the same repo opens on a shared workstation, or inside a setup where only a small tool set should run freely. permiso may be the right fit there.

Same APC project. Different APX policy.

That is exactly the point: the project stays unchanged, but the local runtime can adapt to the machine it is running on.

The deeper rule

A quick test helps decide where a setting belongs:

  • If it answers "what is this project?" it belongs in APC.
  • If it answers "what may this machine do right now?" it belongs in APX.

Permission mode clearly falls in the second group.

That boundary keeps APC portable and reviewable. It keeps APX local and honest. And it keeps a shared repo from accidentally carrying one person's safety choices into every future clone.

Bottom line

Permissions are not part of the portable project contract.

They are runtime policy. APX owns them. APC stays clean.

That is the split that keeps the system sane: one repo, many machines, different trust levels, no confusion about where the decision lives.