# updateAgentAcp

<!-- https://uncage.vercel.app/docs/api/agent/functions/updateagentacp/ -->

```ts
function updateAgentAcp(home, fn): Promise<{
  agents: object[];
  autoDetect: boolean;
  consented: Record<string, {
     args: string[];
     cmd?: string;
     env: Record<string, string>;
     package?: string;
     runner: "local" | "npx" | "uvx";
  }>;
  disable: string[];
  enable: string[];
  presets: "auto" | "off";
}>;
```

Defined in: agent/src/config.ts:291

Applies `fn` to `runtimes.acp` (e.g. `uncage runtimes enable|disable`: `enable`, `consented`, `disable`) and writes it back like
`updateAgentSites`. Only the changed keys are rewritten, so comments elsewhere survive; `agents`
is hand-edited and never rewritten.

## Parameters

| Parameter | Type |
| ------ | ------ |
| `home` | `string` |
| `fn` | (`acp`) => `object` |

## Returns

`Promise`\<\{
  `agents`: `object`[];
  `autoDetect`: `boolean`;
  `consented`: `Record`\<`string`, \{
     `args`: `string`[];
     `cmd?`: `string`;
     `env`: `Record`\<`string`, `string`\>;
     `package?`: `string`;
     `runner`: `"local"` \| `"npx"` \| `"uvx"`;
  \}\>;
  `disable`: `string`[];
  `enable`: `string`[];
  `presets`: `"auto"` \| `"off"`;
\}\>
