mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-12-02 10:44:52 +01:00
fix(runner): require repository acquisition permission in restrictive modes
Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
1 parent
10a873b76c
commit
d31081ef1a
3 files changed
+19
-2
No files matched your search
@@ -245,6 +245,11 @@ do not change workspace isolation or grant credentials or connection access.
|
||||
task tools; `approve-reads` allows assigned reads; `deny-all` rejects requests.
|
||||
None of these restrictive modes is the default.
|
||||
|
||||
`prepare_repository` requires a provider permission decision in restrictive
|
||||
modes, including `approve-paperclip`: repository acquisition can clone onto the
|
||||
controller and is not automatically approved as a planning action. Full auto
|
||||
still allows it; repository acquisition currently has no cumulative disk quota.
|
||||
|
||||
Restrictive profiles route supported permission decisions through durable runtime
|
||||
requests and the existing task interaction controls. Requests are persisted
|
||||
before presentation; answers are checked against the offered decisions and
|
||||
|
||||
@@ -53,6 +53,16 @@ describe("ACPX permission policy", () => {
|
||||
});
|
||||
});
|
||||
|
||||
it.each(["approve-reads", "approve-paperclip"] as const)("requires repository acquisition approval in %s", (mode) => {
|
||||
const tools = ["prepare_repository", "paperclip__prepare_repository", "mcp__paperclip__prepare_repository"]
|
||||
.map(name => ({ name, annotations: { readOnlyHint: true, effect: "read" } }));
|
||||
expect(claudePaperclipPermissionRules(tools, mode)).toEqual([]);
|
||||
expect(decideAcpxPermission("claude", mode, {
|
||||
inferredKind: "read",
|
||||
raw: { toolCall: { name: "mcp__paperclip__prepare_repository" } },
|
||||
})).toBe("delegate");
|
||||
});
|
||||
|
||||
it.each([
|
||||
["approve-all", "execute", "allow_once"],
|
||||
["approve-reads", "read", "delegate"],
|
||||
|
||||
@@ -19,12 +19,14 @@ export class AcpxApprovalRequiredError extends Error {
|
||||
// Review additions explicitly: a newly catalogued mutation must not inherit
|
||||
// automatic provider permission. These operations implement the bounded plan,
|
||||
// task, and handoff workflow; governance decisions, generic APIs, and workspace
|
||||
// controls deliberately stay outside it. Asking a human does not approve work.
|
||||
// controls deliberately stay outside it. Repository acquisition also stays
|
||||
// outside: it can trigger host-side clones with unbounded cumulative disk use.
|
||||
// Asking a human does not approve work.
|
||||
const AUTOMATIC_PAPERCLIP_WORKFLOW_ACTIONS = new Set([
|
||||
"report_progress", "answer_status_question", "write_document",
|
||||
"request_human_input", "register_deliverable", "finish_task", "block_task",
|
||||
"set_task_title", "request_review", "create_task", "reassign_task", "set_dependencies",
|
||||
"create_project", "select_workspace", "prepare_repository", "request_approval",
|
||||
"create_project", "select_workspace", "request_approval",
|
||||
]);
|
||||
|
||||
/** Exact SDK rules for the run's runner-owned Paperclip MCP connection. */
|
||||
|
||||
Reference in new issue
Block a user