mirror of
https://github.com/morluto/rea.git
synced 2026-10-28 10:25:42 +00:00
refactor(app): split session and CLI workflows
This commit is contained in:
1 parent
3e61a63a10
commit
c6ee0049c4
88 files changed
+7428
-6024
No files matched your search
@@ -0,0 +1,26 @@
|
||||
import type { z } from "zod";
|
||||
|
||||
import type { controlledReplayInputSchema } from "../domain/javascriptReplay.js";
|
||||
import type { JavaScriptReplayPolicy } from "./JavaScriptReplayPlanning.js";
|
||||
|
||||
/** Build the exact permission request for one controlled replay operation. */
|
||||
export const replayPermissionRequest = (
|
||||
input: z.output<typeof controlledReplayInputSchema>,
|
||||
policy: JavaScriptReplayPolicy,
|
||||
) => ({
|
||||
capability: "javascript_replay" as const,
|
||||
roots: [...input.left.modules, ...(input.right?.modules ?? [])].map(
|
||||
({ path }) => path,
|
||||
),
|
||||
executables: [
|
||||
policy.nodePath,
|
||||
policy.bubblewrapPath,
|
||||
policy.systemdRunPath,
|
||||
policy.systemctlPath,
|
||||
policy.shellPath,
|
||||
],
|
||||
environment_names: [],
|
||||
network: "none" as const,
|
||||
mount: true,
|
||||
operation_identity: `run_controlled_replay:${input.plan_digest ?? "plan"}`,
|
||||
});
|
||||
Reference in new issue
Block a user