@thegpvc/gp-foundry 0.2.14 → 0.2.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -128,3 +128,12 @@ within one run.
128
128
  - Nothing here is repo-specific: model, tools, labels, and conventions all
129
129
  arrive as inputs or via the config JSON, so the same action drives every node
130
130
  type in the harness.
131
+
132
+ ## Output contract and stdout
133
+
134
+ `output-contract` (optional) is appended as the prompt's last section, `## Output`,
135
+ after the context payload. `post="review"` lanes use it to ask for a fenced json
136
+ review block. The composite's `stdout-file` output is the path of the file holding
137
+ the agent's stdout from the last attempt, for a later step in the same job (the
138
+ compiled `Post the review` step reads it).
139
+
@@ -118,6 +118,14 @@ inputs:
118
118
  it, so the default gives 15s and then 30s.
119
119
  required: false
120
120
  default: "15"
121
+ output-contract:
122
+ description: >-
123
+ Optional inline text appended as the LAST section of the prompt ("## Output"),
124
+ after the context payload, so it is the final thing the agent reads. The
125
+ compiler uses it for post="review" lanes: the agent prints its review as a
126
+ fenced json block and a workflow step posts it.
127
+ required: false
128
+ default: ""
121
129
  extra-env:
122
130
  description: >-
123
131
  Optional newline-separated NAME=VALUE pairs exported into the agent's
@@ -128,6 +136,14 @@ inputs:
128
136
  required: false
129
137
  default: ""
130
138
 
139
+ outputs:
140
+ stdout-file:
141
+ description: >-
142
+ Path to the file holding the agent's stdout (its final message) from the
143
+ last attempt. A later step in the same job can read it, e.g. to post a
144
+ review the agent printed.
145
+ value: ${{ steps.run.outputs.stdout-file }}
146
+
131
147
  runs:
132
148
  using: composite
133
149
  steps:
@@ -141,6 +157,7 @@ runs:
141
157
  CONVENTIONS: ${{ inputs.conventions }}
142
158
  COMMS_FILE: ${{ inputs.comms-file }}
143
159
  SCOPE_PATH: ${{ inputs.scope-path }}
160
+ OUTPUT_CONTRACT: ${{ inputs.output-contract }}
144
161
  run: |
145
162
  set -euo pipefail
146
163
 
@@ -153,6 +170,7 @@ runs:
153
170
  # 3. conventions (optional — repo guardrails from config)
154
171
  # 4. scope-path (optional — path/boundary config)
155
172
  # 5. context-file (optional — the runtime payload)
173
+ # 6. output-contract (optional — how to hand back the result)
156
174
 
157
175
  # 1. role — include the BODY only. The YAML front-matter (role/type/tools/
158
176
  # handoffs) is compiler metadata, not agent instructions; leaving it in
@@ -204,9 +222,15 @@ runs:
204
222
  printf '\n' >> "$PROMPT_FILE"
205
223
  fi
206
224
 
225
+ # 6. output contract (optional) — last, so it is the final instruction read
226
+ if [ -n "${OUTPUT_CONTRACT:-}" ]; then
227
+ printf '\n## Output\n\n%s\n' "$OUTPUT_CONTRACT" >> "$PROMPT_FILE"
228
+ fi
229
+
207
230
  echo "::notice::Assembled prompt at ${PROMPT_FILE} ($(wc -c < "$PROMPT_FILE") bytes)"
208
231
 
209
232
  - name: Run agent
233
+ id: run
210
234
  shell: bash
211
235
  env:
212
236
  CLAUDE_CODE_OAUTH_TOKEN: ${{ inputs.claude-code-oauth-token }}
@@ -308,6 +332,7 @@ runs:
308
332
  STDERR_LOG="$(mktemp)"
309
333
  STDOUT_LOG="$(mktemp)"
310
334
  EXIT_FILE="$(mktemp)"
335
+ echo "stdout-file=${STDOUT_LOG}" >> "${GITHUB_OUTPUT:-/dev/null}"
311
336
 
312
337
  # classify_failure names why an attempt died, read from the tail of what
313
338
  # the CLI produced. The CLI prints its terminal error last, so a bounded