Skip to content

Conversation

@jsibbison-square
Copy link
Contributor

@jsibbison-square jsibbison-square commented Sep 8, 2025

Pull Request Description

Implements and closes #4475

Implements the 'file' parameter type for recipes. It will include the content of the filepath provided in the parameter into the recipe at the templated location.

Includes:

  • relative and absolute paths are supported
  • rejects file parameters if a default value is provided to prevent malicious repices from default loading a file

Testing

Sample recipe for testing from the root of the repo:

version: 1.0.0
title: "file content import"
description: "Imports file contents from parameter path"
instructions: |
  {{ joke_file_path | indent(2) }}
prompt: What was the specific joke?
parameters:
  - key: joke_file_path
    input_type: file
    requirement: required
    description: "The file to read"

./target/debug/goose run --recipe recipe.yaml --params joke_file_path=JOKES.md

The recipe will print the content of JOKES.md without extra tool calls as the content is already included. Works with relative and absolute paths.

UI

Note this does not change any of the functionality in the UI, 'file' parameters are still just strings. The frontend has entirely different parameter handling entirely built directly into the frontend :(. This will be rectified as we move recipe logic over to the backend.

@jsibbison-square jsibbison-square marked this pull request as ready for review September 8, 2025 11:45
@jsibbison-square jsibbison-square changed the title feature: Import file contents from recipe parameter feature: Import file contents from recipe 'file' input type parameter Sep 8, 2025
@jsibbison-square jsibbison-square changed the title feature: Import file contents from recipe 'file' input type parameter feat: Import file contents from recipe 'file' input type parameter Sep 8, 2025
@jsibbison-square jsibbison-square merged commit 85fb6d8 into main Sep 10, 2025
11 checks passed
@jsibbison-square jsibbison-square deleted the jsibbison-20250908-file-parameter branch September 10, 2025 11:13
katzdave added a commit that referenced this pull request Sep 10, 2025
…data

* 'main' of github.com:block/goose:
  refactor: add new recipe dependency updater (#4596)
  chore: fix nightly builds to have tags (#4595)
  feat: Import file contents from recipe 'file' input type parameter (#4558)
  also adding this change to the api key send for recipes (#4587)
  Fix local (working directory) recipes storage (#4588)
  fix: don't redact tool calls (#4589)
  Prompt injection detection (simplified - only pattern matching) (#4237)
  feat: add streaming support to Tetrate Agent Router Service provider (#4477)
  docs: goosehints updates (#4581)
  Iand/recipe scanner updates (#4584)
  patching recipe scanning workflows for permissions changes (#4579)
  fix: onboarding endpoints send token secret (#4575)
  Fix : Google AI schema validation by adding missing array items fields (#4569)
  Add unified diff support to text editor (#4522)
zanesq added a commit that referenced this pull request Sep 10, 2025
…links-overflow

* 'main' of github.com:block/goose:
  refactor: add new recipe dependency updater (#4596)
  chore: fix nightly builds to have tags (#4595)
  feat: Import file contents from recipe 'file' input type parameter (#4558)
  also adding this change to the api key send for recipes (#4587)
  Fix local (working directory) recipes storage (#4588)
  fix: don't redact tool calls (#4589)
  Prompt injection detection (simplified - only pattern matching) (#4237)
  feat: add streaming support to Tetrate Agent Router Service provider (#4477)
  docs: goosehints updates (#4581)
  Iand/recipe scanner updates (#4584)

# Conflicts:
#	ui/desktop/src/components/GooseMessage.tsx
michaelneale added a commit that referenced this pull request Sep 10, 2025
* main: (29 commits)
  docs: update built-in extensions list and fix link (#4601)
  Add Message Metadata for Visibility Control (#4538)
  Remove deprecated Claude 3.5 models (#4590)
  Remove unused loadRecipe function (#4599)
  Send the secret with decodeRecipe (#4597)
  fix markdown links overflowing content and hide agent link previews (#4585)
  refactor: add new recipe dependency updater (#4596)
  chore: fix nightly builds to have tags (#4595)
  feat: Import file contents from recipe 'file' input type parameter (#4558)
  also adding this change to the api key send for recipes (#4587)
  Fix local (working directory) recipes storage (#4588)
  fix: don't redact tool calls (#4589)
  Prompt injection detection (simplified - only pattern matching) (#4237)
  feat: add streaming support to Tetrate Agent Router Service provider (#4477)
  docs: goosehints updates (#4581)
  Iand/recipe scanner updates (#4584)
  patching recipe scanning workflows for permissions changes (#4579)
  fix: onboarding endpoints send token secret (#4575)
  Fix : Google AI schema validation by adding missing array items fields (#4569)
  Add unified diff support to text editor (#4522)
  ...
michaelneale added a commit that referenced this pull request Sep 10, 2025
* main: (30 commits)
  docs: update built-in extensions list and fix link (#4601)
  Add Message Metadata for Visibility Control (#4538)
  Remove deprecated Claude 3.5 models (#4590)
  Remove unused loadRecipe function (#4599)
  Send the secret with decodeRecipe (#4597)
  fix markdown links overflowing content and hide agent link previews (#4585)
  refactor: add new recipe dependency updater (#4596)
  chore: fix nightly builds to have tags (#4595)
  feat: Import file contents from recipe 'file' input type parameter (#4558)
  also adding this change to the api key send for recipes (#4587)
  Fix local (working directory) recipes storage (#4588)
  fix: don't redact tool calls (#4589)
  Prompt injection detection (simplified - only pattern matching) (#4237)
  feat: add streaming support to Tetrate Agent Router Service provider (#4477)
  docs: goosehints updates (#4581)
  Iand/recipe scanner updates (#4584)
  patching recipe scanning workflows for permissions changes (#4579)
  fix: onboarding endpoints send token secret (#4575)
  Fix : Google AI schema validation by adding missing array items fields (#4569)
  Add unified diff support to text editor (#4522)
  ...
thebristolsound pushed a commit to thebristolsound/goose that referenced this pull request Sep 11, 2025
…lock#4558)

Signed-off-by: Matt Donovan <mattddonovan@protonmail.com>
@alexhancock alexhancock mentioned this pull request Sep 23, 2025
HikaruEgashira pushed a commit to HikaruEgashira/goose that referenced this pull request Oct 3, 2025
…lock#4558)

Signed-off-by: HikaruEgashira <hikaru-egashira@c-fo.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Recipe: File parameter type to import file content from a path

3 participants