Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
74 changes: 0 additions & 74 deletions src/types/api-proxy-options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -524,78 +524,4 @@ export interface ApiProxyOptions {
*/
anthropicCacheTailTtl?: '5m' | '1h';

/**
* Enable CLI proxy sidecar for secure gh CLI access
*
* When true, deploys a CLI proxy sidecar container that:
* - Routes gh CLI invocations through an external DIFC proxy (mcpg)
* - The DIFC proxy enforces guard policies (min-integrity, repo restrictions)
* - Generates audit logs via mcpg's JSONL output
*
* The agent container gets a /usr/local/bin/gh wrapper script that
* forwards invocations to the CLI proxy sidecar at http://172.30.0.50:11000.
*
* The DIFC proxy (mcpg) is started externally by the gh-aw compiler on the
* host. AWF only launches the cli-proxy container and connects it to the
* external DIFC proxy via a TCP tunnel for TLS hostname matching.
*
* @example 'host.docker.internal:18443'
*/
difcProxyHost?: string;

/**
* Path to the TLS CA certificate written by the external DIFC proxy.
*
* The DIFC proxy generates a self-signed TLS cert. This path points to
* the CA cert on the host filesystem, which is bind-mounted into the
* cli-proxy container for TLS verification.
*
* @example '/tmp/gh-aw/difc-proxy-tls/ca.crt'
*/
difcProxyCaCert?: string;

/**
* GitHub token for the CLI proxy sidecar
*
* When difcProxyHost is set, GitHub tokens are excluded from the agent
* container environment. The token is held by the external DIFC proxy.
*
* Read from GITHUB_TOKEN environment variable when not specified.
*
* @default undefined
*/
githubToken?: string;

/**
* Docker host (socket) to use for AWF's own container operations
*
* When set, overrides the `DOCKER_HOST` environment variable for all
* docker CLI calls made by AWF itself (compose up/down, docker wait, etc.).
*
* Use this when you need to point AWF at a specific local Unix socket that
* is not the system default (`/var/run/docker.sock`).
*
* When not set, AWF auto-detects the Docker host:
* - If `DOCKER_HOST` is a Unix socket, it is used as-is.
* - If `DOCKER_HOST` is a TCP address (e.g. a Docker-in-Docker (DinD) daemon),
* AWF clears it and falls back to the system default socket.
*
* The original `DOCKER_HOST` value (if any) is always forwarded into the
* agent container so the agent workload can still reach the DinD daemon.
*
* @example 'unix:///var/run/docker.sock'
* @example 'unix:///run/user/1000/docker.sock'
*/
awfDockerHost?: string;

/**
* Prefix runner-visible bind-mount source paths for Docker daemon resolution
*
* Use this when the Docker daemon runs in a different filesystem namespace
* than the AWF process (for example, ARC + DinD sidecar setups). AWF will
* prepend this prefix to bind-mount source paths before generating compose.
*
* @example '/host'
*/
dockerHostPathPrefix?: string;
}
47 changes: 47 additions & 0 deletions src/types/cli-proxy-options.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
/**
* CLI proxy sidecar configuration options.
*/

export interface CliProxyOptions {
/**
* Enable CLI proxy sidecar for secure gh CLI access
*
* When set, deploys a CLI proxy sidecar container that:
* - Routes gh CLI invocations through an external DIFC proxy (mcpg)
* - The DIFC proxy enforces guard policies (min-integrity, repo restrictions)
* - Generates audit logs via mcpg's JSONL output
*
* The agent container gets a /usr/local/bin/gh wrapper script that
* forwards invocations to the CLI proxy sidecar at http://172.30.0.50:11000.
*
* The DIFC proxy (mcpg) is started externally by the gh-aw compiler on the
* host. AWF only launches the cli-proxy container and connects it to the
* external DIFC proxy via a TCP tunnel for TLS hostname matching.
*
* @example 'host.docker.internal:18443'
*/
difcProxyHost?: string;

/**
* Path to the TLS CA certificate written by the external DIFC proxy.
*
* The DIFC proxy generates a self-signed TLS cert. This path points to
* the CA cert on the host filesystem, which is bind-mounted into the
* cli-proxy container for TLS verification.
*
* @example '/tmp/gh-aw/difc-proxy-tls/ca.crt'
*/
difcProxyCaCert?: string;

/**
* GitHub token for the CLI proxy sidecar
*
* When difcProxyHost is set, GitHub tokens are excluded from the agent
* container environment. The token is held by the external DIFC proxy.
*
* Read from GITHUB_TOKEN environment variable when not specified.
*
* @default undefined
*/
githubToken?: string;
}
33 changes: 33 additions & 0 deletions src/types/container-image-options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,37 @@ export interface ContainerImageOptions {
* @example 'ghcr.io/catthehacker/ubuntu:runner-22.04'
*/
agentImage?: 'default' | 'act' | string;

/**
* Docker host (socket) to use for AWF's own container operations
*
* When set, overrides the `DOCKER_HOST` environment variable for all
* docker CLI calls made by AWF itself (compose up/down, docker wait, etc.).
*
* Use this when you need to point AWF at a specific local Unix socket that
* is not the system default (`/var/run/docker.sock`).
*
* When not set, AWF auto-detects the Docker host:
* - If `DOCKER_HOST` is a Unix socket, it is used as-is.
* - If `DOCKER_HOST` is a TCP address (e.g. a Docker-in-Docker (DinD) daemon),
* AWF clears it and falls back to the system default socket.
*
* The original `DOCKER_HOST` value (if any) is forwarded into the agent container
* by default so the agent workload can still reach an external DinD daemon, but it may be
* overridden (e.g. in DinD mode when `awfDockerHost` is set to a unix:// socket).
* @example 'unix:///var/run/docker.sock'
* @example 'unix:///run/user/1000/docker.sock'
*/
awfDockerHost?: string;

/**
* Prefix runner-visible bind-mount source paths for Docker daemon resolution
*
* Use this when the Docker daemon runs in a different filesystem namespace
* than the AWF process (for example, ARC + DinD sidecar setups). AWF will
* prepend this prefix to bind-mount source paths before generating compose.
*
* @example '/host'
*/
dockerHostPathPrefix?: string;
}
2 changes: 2 additions & 0 deletions src/types/wrapper-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import type { NetworkOptions } from './network-options';
import type { VolumeOptions } from './volume-options';
import type { SecurityOptions } from './security-options';
import type { ApiProxyOptions } from './api-proxy-options';
import type { CliProxyOptions } from './cli-proxy-options';
import type { RateLimitOptions } from './rate-limit-options';
import type { RuntimeOptions } from './runtime-options';

Expand All @@ -19,5 +20,6 @@ export type WrapperConfig =
& VolumeOptions
& SecurityOptions
& ApiProxyOptions
& CliProxyOptions
& RateLimitOptions
& RuntimeOptions;
Loading