From 9962cf0a2b6f7899e3c72947873621f9a64353fc Mon Sep 17 00:00:00 2001 From: Abir Abbas Date: Fri, 26 Jun 2026 14:52:08 -0400 Subject: [PATCH 1/2] chore: add agentfield-package.yaml for `af install` Declares this node's entrypoint, default port, and required/optional environment so it can be installed and started with `af install`/`af run` (see Agent-Field/agentfield#692). Secrets are prompted once and stored encrypted; nothing is committed in plaintext. Co-Authored-By: Claude Opus 4.8 (1M context) --- agentfield-package.yaml | 43 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 agentfield-package.yaml diff --git a/agentfield-package.yaml b/agentfield-package.yaml new file mode 100644 index 0000000..c742c8a --- /dev/null +++ b/agentfield-package.yaml @@ -0,0 +1,43 @@ +name: pr-af +version: 0.1.0 +description: Opens draft pull requests from a task description +author: Agent-Field + +entrypoint: + start: python -m pr_af.app + healthcheck: /health + +agent_node: + node_id: pr-af + default_port: 8004 + +user_environment: + required: + - name: OPENROUTER_API_KEY + description: LLM provider key (OpenRouter) + type: secret + scope: global + optional: + - name: AGENTFIELD_SERVER + description: Control-plane URL + default: http://localhost:8080 + - name: AGENTFIELD_API_KEY + description: Control-plane API key (if auth is enabled) + type: secret + scope: global + - name: GH_TOKEN + description: GitHub token for cloning repos / opening PRs + type: secret + scope: global + - name: PR_AF_PROVIDER + description: Coding-agent harness provider + default: opencode + - name: PR_AF_MODEL + description: Model the harness uses + default: openrouter/moonshotai/kimi-k2.5 + - name: PR_AF_MAX_COST_USD + description: Per-run cost ceiling (USD) + default: "2.0" + - name: PR_AF_MAX_DURATION_SECONDS + description: Per-run wall-clock ceiling (seconds) + default: "300" From e1d0de352e90998052751b0e54597629cdb3bfef Mon Sep 17 00:00:00 2001 From: Abir Abbas Date: Tue, 7 Jul 2026 21:03:43 -0400 Subject: [PATCH 2/2] chore: stamp config_version: v1 and require GH_TOKEN MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Declare the manifest schema version explicitly (v1 — the current format; omitting it means legacy v0). Also promote GH_TOKEN from optional to required: pr-af's core loop clones the target repo, pushes a branch, and opens a pull request, so setup should prompt for it up front rather than failing partway through a run. Co-Authored-By: Claude Opus 4.8 (1M context) --- agentfield-package.yaml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/agentfield-package.yaml b/agentfield-package.yaml index c742c8a..a737174 100644 --- a/agentfield-package.yaml +++ b/agentfield-package.yaml @@ -1,3 +1,4 @@ +config_version: v1 # manifest schema version (omit = legacy v0) name: pr-af version: 0.1.0 description: Opens draft pull requests from a task description @@ -17,6 +18,13 @@ user_environment: description: LLM provider key (OpenRouter) type: secret scope: global + # pr-af's core loop clones the target repo, pushes a branch, and opens a + # pull request — all need GitHub write access (see app.py / github/client.py). + # Required so setup prompts for it up front instead of failing mid-run. + - name: GH_TOKEN + description: GitHub token (repo scope) for cloning repos and opening pull requests + type: secret + scope: global optional: - name: AGENTFIELD_SERVER description: Control-plane URL @@ -25,10 +33,6 @@ user_environment: description: Control-plane API key (if auth is enabled) type: secret scope: global - - name: GH_TOKEN - description: GitHub token for cloning repos / opening PRs - type: secret - scope: global - name: PR_AF_PROVIDER description: Coding-agent harness provider default: opencode