mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-12-02 10:44:52 +01:00
Allow authorized Paperclip actions with native provider defaults
Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
1 parent
da31d69f2e
commit
c0cb095f84
31 files changed
+176
-63
No files matched your search
@@ -144,6 +144,8 @@ suite. Cancelled turns and execution-task runs remain included in billing and
|
||||
cleanup. The production chat directive is injected normally; fixtures do not
|
||||
replace it with completion instructions. Daytona is excluded.
|
||||
|
||||
The native chat profiles use production provider permission defaults, rather than
|
||||
full-auto overrides, for plan handoff, task creation, and reassignment.
|
||||
The native Codex and Claude profiles also cover reassignment of existing ready
|
||||
and backlog tasks. The oracle verifies stable task IDs, preserved descriptions,
|
||||
assignment audit evidence, exactly one successful successor run and its output
|
||||
|
||||
@@ -33,6 +33,22 @@ describe("runner E2E catalog", () => {
|
||||
expect(connectionReviewSuite.tasks.every(task => task.flow === "governed_tool_review")).toBe(true);
|
||||
});
|
||||
|
||||
it("tests native chat plans, tasks, and reassignment with production permission defaults", () => {
|
||||
const suite = runnerSuites.find(suite => suite.id === "agent-chat")!;
|
||||
for (const id of ["runner-codex", "runner-acpx-claude"]) {
|
||||
const profile = suite.profiles.find(profile => profile.id === id)!;
|
||||
const payload = profile.buildAgent({
|
||||
executionId: "default-permissions", workspacePath: "/workspace", environmentId: "env-1", environmentFixtureId: "local",
|
||||
secretRefs: {
|
||||
[profile.credential]: { type: "secret_ref", secretId: "22222222-2222-4222-8222-222222222222", version: "latest" },
|
||||
},
|
||||
});
|
||||
expect(payload.adapterConfig).not.toHaveProperty("acpxPermissionMode");
|
||||
expect(payload.adapterConfig).not.toHaveProperty("codexPermissionMode");
|
||||
expect(suite.tasks.map(task => task.id)).toEqual(expect.arrayContaining(["plan-handoff", "reassign-task"]));
|
||||
}
|
||||
});
|
||||
|
||||
it("validates the core, local-integrity, breadth, and warm suites", () => {
|
||||
expect(runnerProfiles).toHaveLength(7);
|
||||
expect(openRouterBreadthProfiles).toHaveLength(4);
|
||||
|
||||
@@ -197,6 +197,19 @@ function nativeProfile(input: {
|
||||
};
|
||||
}
|
||||
|
||||
/** Chat acceptance exercises the shipped provider defaults, not full-auto fixtures. */
|
||||
function defaultPermissionProfile(profile: RunnerProfileFixture): RunnerProfileFixture {
|
||||
if (profile.generation !== "native") return profile;
|
||||
return {
|
||||
...profile,
|
||||
buildAgent(input) {
|
||||
const payload = profile.buildAgent(input);
|
||||
const { codexPermissionMode: _codex, acpxPermissionMode: _acpx, ...adapterConfig } = payload.adapterConfig as Record<string, unknown>;
|
||||
return { ...payload, adapterConfig };
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
const claudeLegacyModel = "claude-sonnet-4-6";
|
||||
if (!claudeModels.some((model) => model.id === claudeLegacyModel)) {
|
||||
throw new Error(
|
||||
@@ -928,10 +941,10 @@ export const runnerSuites: readonly RunnerSuiteFixture[] = [
|
||||
id: "agent-chat", label: "Persistent Agent Chat",
|
||||
description: "Task-backed conversations, session resets, and project plan handoff.",
|
||||
groups: ["chat"],
|
||||
profiles: runnerProfiles.filter(profile => ["legacy-codex", "legacy-claude", "runner-codex", "runner-acpx-claude"].includes(profile.id)),
|
||||
profiles: runnerProfiles.filter(profile => ["legacy-codex", "legacy-claude", "runner-codex", "runner-acpx-claude"].includes(profile.id)).map(defaultPermissionProfile),
|
||||
environments: [localEnvironment], tasks: chatTasks, expectedMatrixSize: 26,
|
||||
excludedExecutionIds: ["legacy-codex", "legacy-claude"].map(profile => `agent-chat.${profile}.local.reassign-task`),
|
||||
definitionMetadata: { version: 2, resetRunsCountedSeparately: true },
|
||||
definitionMetadata: { version: 3, resetRunsCountedSeparately: true, permissions: "production-defaults" },
|
||||
},
|
||||
...(process.env.PAPERCLIP_RUNNER_E2E_CONNECTION_REVIEWS === "1" ? [connectionReviewSuite] : []),
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user