Open source Loom alternative. Beautiful, shareable screen recordings.
Rust appcapcossloommacnextjsnextjs15open-sourceossreactrecordrustscreen-capturescreen-recorderscreenshotsolidjstauritauri-apptypescriptvite
refactor(web): remove agent write access env gate
Richie McIlroy9b4671decacc
diff --git a/apps/web/__tests__/e2e/agent-local-e2e.test.ts b/apps/web/__tests__/e2e/agent-local-e2e.test.tsindex 5b6e6a692..33e8d4996 100644--- a/apps/web/__tests__/e2e/agent-local-e2e.test.ts+++ b/apps/web/__tests__/e2e/agent-local-e2e.test.ts@@ -482,7 +482,6 @@ agentE2e("Cap agent local Docker E2E", () => {NEXT_PUBLIC_WEB_URL: "http://127.0.0.1",NEXT_PUBLIC_IS_CAP: "false",NODE_ENV: "test",- CAP_AGENT_API_WRITE_ENABLED: "true",CAP_AWS_BUCKET: bucket,CAP_AWS_REGION: "us-east-1",CAP_AWS_ACCESS_KEY: "capS3root",diff --git a/apps/web/app/api/v1/[...route]/route.ts b/apps/web/app/api/v1/[...route]/route.tsindex a8aa882d1..ca9726bbc 100644--- a/apps/web/app/api/v1/[...route]/route.ts+++ b/apps/web/app/api/v1/[...route]/route.ts@@ -110,7 +110,6 @@ import {import {createAgentFeedback,isAgentIdempotencyKey,- isAgentWriteAccessEnabled,runAgentExternalMutation,runAgentMutation,updateAgentCap,@@ -1129,18 +1128,7 @@ const unlockCap = Effect.fn("Agent.unlockCap")(function* (};});-const requireAgentWrites = (requestId: string) =>- isAgentWriteAccessEnabled({- nodeEnv: process.env.NODE_ENV,- enabled: process.env.CAP_AGENT_API_WRITE_ENABLED,- })- ? Effect.void- : Effect.fail(- temporarilyUnavailable(- requestId,- "Cap agent mutations are currently disabled",- ),- );+const requireAgentWrites = (_requestId: string) => Effect.void;const capabilityFailure = (requestId: string,diff --git a/apps/web/lib/agent-write.ts b/apps/web/lib/agent-write.tsindex 4b10ee689..e47abf6c2 100644--- a/apps/web/lib/agent-write.ts+++ b/apps/web/lib/agent-write.ts@@ -53,11 +53,6 @@ export const isAgentIdempotencyKey = (value: string | undefined) =>value.length <= 128 &&/^[A-Za-z0-9._-]+$/.test(value);-export const isAgentWriteAccessEnabled = (input: {- nodeEnv: string | undefined;- enabled: string | undefined;-}) => input.nodeEnv !== "production" || input.enabled === "true";-const acquireIdempotency = async (tx: Transaction, input: IdempotencyInput) => {const keyHash = hash(input.key);const candidateId = nanoId();