diff --git a/.github/aw/memory.md b/.github/aw/memory.md index 43d5389f9d9..2f0d64d3aed 100644 --- a/.github/aw/memory.md +++ b/.github/aw/memory.md @@ -219,6 +219,8 @@ tools: Compiler creates a separate `push_repo_memory` job with `contents: write`; main agent job stays read-only. +To push to ruleset-protected memory branches, add `github-app: {client-id, private-key}` (app needs **Contents: read and write**). Use `github-app-read` / `github-app-write` to split read and write apps; only the write app needs the ruleset bypass. Without an app, `github.token` is used. + ### Structured event history: standalone ledger (experimental) For immutable, structured events where each run appends records and later runs diff --git a/.github/aw/safe-outputs-content.md b/.github/aw/safe-outputs-content.md index 0e6e32e1e1c..2172183285d 100644 --- a/.github/aw/safe-outputs-content.md +++ b/.github/aw/safe-outputs-content.md @@ -113,6 +113,9 @@ description: Safe-output reference for issue, discussion, comment, and pull requ close-older-issues: true # Optional: close previous issues from same workflow (default: false) close-older-key: "my-key" # Optional: explicit deduplication key for close-older matching (uses gh-aw-close-key marker) deduplicate-by-title: true # Optional: skip creating an issue when one with the same title exists; integer N allows fuzzy matches up to edit distance N (default: off) + deduplicate-by-labels: [triage] # Optional: drop when an open/recently closed issue has ALL labels; ANDed with deduplicate-by-title + max-issue-artifacts: 10 # Optional: max `artifacts` per issue (default: 10; <=0 disables) + max-issue-artifact-size: 1mb # Optional: max UTF-8 size per artifact body (bytes or 512kb/1mb; default: 1mb) require-temporary-id: true # Optional: require temporary_id on every create_issue call (default: false) normalize-closing-keywords: true # Optional: strip backticks around recognized issue-closing keywords in body text # create_issue output may set blocked_by to an issue reference or list of references @@ -125,6 +128,8 @@ description: Safe-output reference for issue, discussion, comment, and pull requ - `body` minimum length: **20** characters - `body` maximum length: **65000** characters + **Issue artifacts**: `create_issue` accepts optional `artifacts: [{name, body | path, type?}]` (`type`: `generic`, `plan`, `link`, `embedded_html`). `path` must be a literal absolute path under the workspace or `/tmp/gh-aw/agent`; the unprivileged MCP backend reads it so content never enters the agent context. Oversized or over-limit requests are rejected before creation (no truncation). See [docs: Issue Artifacts](https://github.github.com/gh-aw/reference/safe-outputs/#issue-artifacts). + **Auto-Expiration**: The `expires` field auto-closes issues after a time period. Supports integers (days) or relative formats (2h, 7d, 2w, 1m, 1y). Generates `agentics-maintenance.yml` workflow that runs at minimum required frequency based on shortest expiration time: 1 day or less → every 2 hours, 2 days → every 6 hours, 3-4 days → every 12 hours, 5+ days → daily. **Deduplication for Scheduled Workflows**: When `schedule:` is combined with `create-issue`, use `skip-if-match:` in the `on:` block to prevent opening a duplicate issue every run. Pair with `expires:` to clean up stale issues: diff --git a/.github/aw/syntax-core.md b/.github/aw/syntax-core.md index 4804c8bb0a1..2e93342ffc4 100644 --- a/.github/aw/syntax-core.md +++ b/.github/aw/syntax-core.md @@ -154,7 +154,7 @@ The YAML frontmatter supports these fields: - **`steps:`** - Custom workflow steps before AI execution (object). **Security Notice**: Custom steps run OUTSIDE the firewall sandbox with standard GitHub Actions security but NO network egress controls. Use only for deterministic data preparation, not agentic compute. **Secrets restriction**: Using `${{ secrets.* }}` expressions (other than `secrets.GITHUB_TOKEN`) in custom steps is an error in strict mode and a warning otherwise — move secret-dependent operations to a separate job outside the agent job. **App-token scoping**: a manually-authored `actions/create-github-app-token` step must set explicit `repositories:` and at least one `permission-*` input — missing either is an error in strict mode and a warning otherwise (declarative `github-app:` blocks compute these automatically and are unaffected). - **`pre-agent-steps:`** - Custom workflow steps to run before MCP gateway startup (object or array). Use when preparation must install or configure MCP dependencies before the gateway starts. Same security restrictions apply as for `steps:`. - **`post-steps:`** - Custom workflow steps after AI execution (object). **Security Notice**: Post-execution steps run OUTSIDE the firewall sandbox. Use only for deterministic cleanup, artifact uploads, or notifications—not agentic compute or untrusted AI execution. Same secrets restriction applies as for `steps:`. **Compile-time enforcement**: user-provided `post-steps:` cannot create issues (`gh issue create`, REST `POST /repos/.../issues`, octokit `.issues.create()`/`.request('POST /repos/.../issues')`) or read safe-output storage (`GH_AW_AGENT_OUTPUT`, `GH_AW_SAFE_OUTPUTS`, `agent_output.json`, `outputs.jsonl`) — these are compiler errors, not just discouraged patterns. -- **`environment:`** - Environment that the job references for protection rules (string or object) +- **`environment:`** - Environment that the job references for protection rules (string or object `{name, url, deployment}`). Set `deployment: false` to use the environment's secrets and protection rules without creating a GitHub deployment. - **`container:`** - Container to run job steps in (string or object) - **`services:`** - Service containers that run alongside the job (object) - **`secrets:`** - Secret values passed to workflow execution (object)