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
10 changes: 7 additions & 3 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -873,11 +873,15 @@ The step:

If `permissions.read` is not configured, this marker is replaced with an empty string.

## {{ copilot_ado_env }}
## {{ engine_env }}

Generates environment variable entries for the copilot AWF step when `permissions.read` is configured. Sets both `AZURE_DEVOPS_EXT_PAT` and `SYSTEM_ACCESSTOKEN` to the read service connection token (`SC_READ_TOKEN`).
Generates engine-specific environment variable entries for the AWF sandbox step via `Engine::env()`. For the Copilot engine, this produces:

If `permissions.read` is not configured, this marker is replaced with an empty string, and ADO access tokens are omitted from the copilot invocation.
- `GITHUB_TOKEN: $(GITHUB_TOKEN)` — GitHub authentication
- `GITHUB_READ_ONLY: 1` — Restricts GitHub API to read-only access
- `COPILOT_OTEL_ENABLED`, `COPILOT_OTEL_EXPORTER_TYPE`, `COPILOT_OTEL_FILE_EXPORTER_PATH` — OpenTelemetry file-based tracing for agent statistics

ADO access tokens (`AZURE_DEVOPS_EXT_PAT`, `SYSTEM_ACCESSTOKEN`) are not part of this marker — they are injected separately by `{{ acquire_ado_token }}` and extension pipeline variable mappings when `permissions.read` is configured.

## {{ acquire_write_token }}

Expand Down
3 changes: 3 additions & 0 deletions src/compile/extensions/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,9 @@ impl<'a> CompileContext<'a> {
}

/// Create a context for tests (no async, no git remote inference).
// TODO: resolve engine from front_matter.engine when multiple engines are supported,
// instead of hardcoding Engine::Copilot. Currently safe because "copilot" is the only
// engine variant, but this will need to call get_engine() once more are added.
#[cfg(test)]
pub fn for_test(front_matter: &'a FrontMatter) -> Self {
Self {
Expand Down
Loading