@plainconceptsplatform/workflows 1.20.1 → 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
@@ -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
@@ -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.1",
3
+ "version": "1.20.2",
4
4
  "description": "Install and update Platform GitHub agentic workflows.",
5
5
  "keywords": [
6
6
  "github-actions",