@plainconceptsplatform/workflows 1.20.0 → 1.20.2

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.
@@ -1934,6 +1934,15 @@ fi
1934
1934
  if worker_installed implement && ! grep -qF 'subagent_type: planner-sub' "$IMPLEMENT_WORKER_MD"; then
1935
1935
  LEAD_OK=0; echo "FAIL: the implement prompt must run propose and archive in the planner-sub agent" >&2
1936
1936
  fi
1937
+ # agent-harness before 3.11.3 writes `resource: *`, a YAML alias that does not parse: opencode drops the agent's
1938
+ # mode and refuses to spawn planner and planner-sub ("cannot run as a subagent"). The CI setup repairs the
1939
+ # generated files before opencode reads them, and the implement prompt stops at the first spawn error.
1940
+ if ! grep -qF 'resource: "*"' "${WORKFLOWS_DIR}/shared/opencode-ci.md"; then
1941
+ LEAD_OK=0; echo "FAIL: the CI setup must quote the generated agents' permission resource (a bare * is a YAML alias)" >&2
1942
+ fi
1943
+ if worker_installed implement && ! grep -qF 'cannot run as a subagent' "$IMPLEMENT_WORKER_MD"; then
1944
+ LEAD_OK=0; echo "FAIL: the implement prompt must stop at a planner-sub spawn error instead of retrying other agents" >&2
1945
+ fi
1937
1946
  if [ "$LEAD_OK" -eq 1 ]; then PASS=$((PASS + 1)); else FAIL=$((FAIL + 1)); fi
1938
1947
  # The harness plugins only load with .opencode/node_modules installed; without it every CI run
1939
1948
  # spawned untiered workers on the session's model. And the tier model a worker pins has to be one
@@ -3682,7 +3691,12 @@ if [ -f "$RTP_YML" ] && worker_installed release; then
3682
3691
  RTP_OK=1
3683
3692
  rtp() { grep -qE "$1" "$2" || { RTP_OK=0; echo "FAIL: release to production: $3" >&2; }; }
3684
3693
  rtp 'uses: \./\.github/workflows/agent-release\.lock\.yml' "$RTP_YML" 'the button must run the release worker'
3685
- rtp '^ deploy: "true"$' "$RTP_YML" 'the button must ask the release worker for a deploy'
3694
+ rtp '^ deploy: true$' "$RTP_YML" 'the button must ask the release worker for a deploy'
3695
+ # A boolean on both sides: a quoted "true" passed to a string input is a bool to actionlint, and
3696
+ # every consumer's workflow lint failed on it, a check this repository cannot run without the lock.
3697
+ if ! awk '/^ deploy:$/{f=1;next} f&&/^ [a-z-]+:$/{exit} f&&/type: boolean/{ok=1} END{exit !ok}' "${WORKFLOWS_DIR}/agent-release.md"; then
3698
+ RTP_OK=0; echo "FAIL: release to production: the release worker's deploy input must be a boolean, as the button passes it" >&2
3699
+ fi
3686
3700
  rtp 'default: minor' "$RTP_YML" 'the button must default to a minor bump'
3687
3701
  rtp '^ permissions: write-all$' "$RTP_YML" 'the button must grant the worker write-all, or the run never starts'
3688
3702
  if grep -qE '^ deploy:' "$ROUTER_YML"; then RTP_OK=0; echo "FAIL: release to production: the router's workflow_dispatch is at the ten-input limit; deploy belongs to the button" >&2; fi
@@ -802,8 +802,11 @@ timeout-minutes: 180
802
802
  (`pc-plan-propose` or `pc-plan-archive`), the issue context path above, the branch, and that it
803
803
  runs in autonomous mode with no one to ask. `planner-sub` runs on the repository's plan model,
804
804
  which these two steps decide the whole change on. Wait for it in the same turn, then continue
805
- with the next phase yourself. If `planner-sub` is not in the task tool's enum, call
806
- `report_incomplete` naming it; do not load `pc-plan-propose` here. Only when the harness is
805
+ with the next phase yourself. If `planner-sub` is not in the task tool's enum, or the task tool
806
+ returns an error when you spawn it (`Agent planner-sub cannot run as a subagent`, `Unknown agent`),
807
+ call `report_incomplete` once with that exact error text and stop: do not retry with `planner` or
808
+ any other agent, and do not load `pc-plan-propose` here. Another attempt fails the same way and
809
+ only spends the run; the cause is the repository's generated agent files, not the issue. Only when the harness is
807
810
  older than 3.4.0 and has neither `planner` nor `planner-sub` may you load the skill here.
808
811
 
809
812
  2. `pc-plan-propose`, even when the issue is refined. It is what turns the issue into
@@ -43,8 +43,8 @@ on:
43
43
  deploy:
44
44
  description: "true when release-to-production.yml asked for a deploy: the release PR then carries the deploy marker"
45
45
  required: false
46
- type: string
47
- default: "false"
46
+ type: boolean
47
+ default: false
48
48
 
49
49
  runs-on: agents-arc
50
50
  runs-on-slim: agents-arc
@@ -42,7 +42,7 @@ jobs:
42
42
  permissions: write-all
43
43
  with:
44
44
  version-bump: ${{ inputs.bump }}
45
- deploy: "true"
45
+ deploy: true
46
46
  secrets:
47
47
  OPENAI_API_KEY: ${{ secrets.FORGE_API_KEY }}
48
48
  # The release PR is pushed and opened with the App token so its CI runs; see the worker's conclude.
@@ -254,6 +254,20 @@ pre-agent-steps:
254
254
  if [ -f .opencode/scripts/sync-agents.mjs ] && [ -f .opencode/plugins/pc-subagent-tiers-core.js ]; then
255
255
  node .opencode/scripts/sync-agents.mjs --strict
256
256
  fi
257
+ # agent-harness before 3.11.3 writes `resource: *` into plan.md, planner.md and planner-sub.md. A bare `*` is
258
+ # a YAML alias, so the frontmatter does not parse, opencode drops the agents' `mode`, treats them as primary
259
+ # and refuses to spawn them ("Agent planner-sub cannot run as a subagent"). These files are generated here on
260
+ # every run and never committed, so quote the value before opencode reads them; a no-op once the harness does.
261
+ if [ -d .opencode/agents ]; then
262
+ for agent_file in .opencode/agents/*.md; do
263
+ [ -e "$agent_file" ] || continue
264
+ sed -i -E 's/resource:[[:space:]]+[*][[:space:]]*$/resource: "*"/' "$agent_file"
265
+ done
266
+ if grep -nE '^[[:space:]]+resource:[[:space:]]+[*]' .opencode/agents/*.md; then
267
+ echo "::error::A generated agent file still has an unquoted permission resource; opencode cannot parse it." >&2
268
+ exit 1
269
+ fi
270
+ fi
257
271
  if [ -f .opencode/scripts/harness-doctor.mjs ]; then
258
272
  node .opencode/scripts/harness-doctor.mjs --strict
259
273
  fi
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plainconceptsplatform/workflows",
3
- "version": "1.20.0",
3
+ "version": "1.20.2",
4
4
  "description": "Install and update Platform GitHub agentic workflows.",
5
5
  "keywords": [
6
6
  "github-actions",