* refactor(agent): route approval decisions through a single policy Operations, assistant write tools, MCP tool approval, delegated-child approval and the child tool guard each compared access levels on their own. They now ask policy.Decide, which maps an action's risk and the run's rules to allow or ask. Behaviour is unchanged: MCP tools still follow only the workspace per-tool flag and delegation, and a write that reaches a read-only run still asks. Add design docs for the agent permission model and scheduled automation. * refactor(agent): replace interactive flags with a run mode Runs are attended, deferred or unattended. Unattended runs refuse every approval, including MCP approvals that used to wait out the timeout; deferred runs suspend at once. * feat(agent): apply access levels to MCP tools and every agent MCP tools get a risk: the workspace's explicit setting, else the service's readOnlyHint, never lower than a risk the service declared before. The run's access level now decides MCP calls as it does operations; read-only runs neither see nor run tools that change data. Ordinary agents get a configurable ceiling that defaults to auto_write, and delegated children take the lower of their parent's level and their own ceiling instead of asking for every MCP call. * feat(agent): persist approval grants with session/automation scopes Remembered "allow for this conversation" approvals move from prompt history into an agent_grants table keyed by root session (or automation binding), so delegated children share the root grant and unattended runs honour it. MCP write tools now offer the grant, keyed by service, tool and input schema. Users can list and revoke their grants from the chat header. * feat(agent): acting-via identity, decision logs and grant lapse reasons Principal gains ActingVia so work done on a user's behalf (automations) is told apart in audit details and policy decision logs. Every non-read policy decision is logged with its action, risk, level, mode and verdict. Automation grants bind to a hash of the agent setup, owner role and access ceiling; a grant that no longer applies asks again and the card says why. * docs(agent): record permission model implementation status * chore(handler): check c.Error in agent grant handlers * chore(handler): check c.Error in MCP tool policy handler * fix(agent): raise MCP observed risk atomically and scope worker access - Compare observed_risk inside the upsert so a stale lower observation cannot overwrite a higher one recorded concurrently. - Delegated workers use the same conditional level as attach: the assistant ceiling applies only under an assistant parent. - Mock @/api/assistant in useModalShell tests; gofmt internal/mcp/client.go. * docs(agent): allow destructive pre-grants only in automation scope Decide against a level that skips every prompt: Always stays unwaivable and destructive actions may only be pre-approved per resource when an automation is set up. Note that automation runs must look up both automation and session grants. * feat(agent): standing grant scope and risk-bounded grants Grants record the risk they were approved for and never cover a riskier call. Destructive calls are now named for matching, so an automation's standing grant can cover one, but the card still offers to remember only writes. The gate looks up the run's own scope and then its standing scope; approvals during a run are written only to the run's scope. |
||
|---|---|---|
| .. | ||
| assets | ||
| design | ||
| images | ||
| poc/docker-sandbox | ||
| LITE.md | ||
| README.md | ||
| docs.go | ||
| release-v0.8.3-audit.md | ||
| swag.overrides | ||
| swagger.json | ||
| swagger.yaml | ||
| swagger_contract_test.go | ||
README.md
文档已迁至 website-docs
产品、部署、API 和开发文档统一维护在 website-docs。已迁移、重复和过时的旧手写文档已删除;历史内容可从 Git 历史查看。
本目录仅保留以下工程资源及本入口说明:
docs.go、swagger.json、swagger.yaml与契约测试:参与后端编译和测试,生成物仍由make docs更新。LITE.md:Lite 发布包复制为离线 README。images/、assets/:README、Helm 等仍使用的图片资源。poc/docker-sandbox/:独立 Go 实验模块,保留源码和运行说明,不作为当前产品指南。
这些资源尚有编译、发布或历史实验用途,不能直接整目录删除。新的产品说明不要再放入此处。