From dad6c917af557fa8c7b2fa1cc63ffba1da8a79f4 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 13 Feb 2026 08:28:29 +0000 Subject: [PATCH] Document allowed-extensions field and update default behavior - Add allowed-extensions documentation to memory.md for both cache-memory and repo-memory - Update frontmatter-full.md to reflect new default: empty array (all files allowed) - Explain file type restriction validation behavior Co-Authored-By: Claude Sonnet 4.5 --- .../content/docs/reference/frontmatter-full.md | 8 ++++---- docs/src/content/docs/reference/memory.md | 18 ++++++++++++++++++ 2 files changed, 22 insertions(+), 4 deletions(-) diff --git a/docs/src/content/docs/reference/frontmatter-full.md b/docs/src/content/docs/reference/frontmatter-full.md index fae631480f..a21604fc5d 100644 --- a/docs/src/content/docs/reference/frontmatter-full.md +++ b/docs/src/content/docs/reference/frontmatter-full.md @@ -1517,8 +1517,8 @@ tools: # (optional) scope: "workflow" - # List of allowed file extensions (e.g., [".json", ".txt"]). Default: [".json", - # ".jsonl", ".txt", ".md", ".csv"] + # List of allowed file extensions (e.g., [".json", ".txt"]). Default: [] (empty/all + # files allowed). When specified, only files with listed extensions can be stored. # (optional) allowed-extensions: [] # Array of strings @@ -1720,8 +1720,8 @@ tools: # (optional) create-orphan: true - # List of allowed file extensions (e.g., [".json", ".txt"]). Default: [".json", - # ".jsonl", ".txt", ".md", ".csv"] + # List of allowed file extensions (e.g., [".json", ".txt"]). Default: [] (empty/all + # files allowed). When specified, only files with listed extensions can be stored. # (optional) allowed-extensions: [] # Array of strings diff --git a/docs/src/content/docs/reference/memory.md b/docs/src/content/docs/reference/memory.md index f6386601a8..ae13dfd676 100644 --- a/docs/src/content/docs/reference/memory.md +++ b/docs/src/content/docs/reference/memory.md @@ -30,9 +30,24 @@ tools: cache-memory: key: custom-memory-${{ github.workflow }}-${{ github.run_id }} retention-days: 30 # 1-90 days, extends access beyond cache expiration + allowed-extensions: [".json", ".txt", ".md"] # Restrict file types (default: empty/all files allowed) --- ``` +### File Type Restrictions + +The `allowed-extensions` field restricts which file types can be written to cache-memory. By default, all file types are allowed (empty array). When specified, only files with listed extensions can be stored. + +```aw wrap +--- +tools: + cache-memory: + allowed-extensions: [".json", ".jsonl", ".txt"] # Only these extensions allowed +--- +``` + +If files with disallowed extensions are found, the workflow will report validation failures. + ## Multiple Cache Configurations ```aw wrap @@ -118,11 +133,14 @@ tools: max-file-count: 50 # default 100 target-repo: "owner/repository" create-orphan: true # default + allowed-extensions: [".json", ".txt", ".md"] # Restrict file types (default: empty/all files allowed) --- ``` **Branch Prefix**: Use `branch-prefix` to customize the branch name prefix (default is `memory`). The prefix must be 4-32 characters, alphanumeric with hyphens/underscores, and cannot be `copilot`. When set, branches are created as `{branch-prefix}/{id}` instead of `memory/{id}`. +**File Type Restrictions**: Use `allowed-extensions` to restrict which file types can be stored (default: empty/all files allowed). When specified, only files with listed extensions (e.g., `[".json", ".txt", ".md"]`) can be saved. Files with disallowed extensions will trigger validation failures. + **Note**: File glob patterns must include the full branch path structure. For branch `memory/custom-agent-for-aw`, use patterns like `memory/custom-agent-for-aw/*.json` to match files stored at that path within the branch. ## Multiple Repo Memory Configurations