@plainconceptsplatform/workflows 1.21.2 → 1.21.4

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,15 +1934,23 @@ 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
1937
+ # agent-harness before 3.12.1 writes `resource: *`, a YAML alias that does not parse: opencode drops the agent's
1938
1938
  # mode and refuses to spawn planner and planner-sub ("cannot run as a subagent"). The CI setup repairs the
1939
1939
  # generated files before opencode reads them, and the implement prompt stops at the first spawn error.
1940
+ if ! grep -qF 'resource: ${JSON.stringify(p.resource)}' "${WORKFLOWS_DIR}/shared/opencode-ci.md"; then
1941
+ LEAD_OK=0; echo "FAIL: the CI setup must quote the permission resource in the harness generator, which rewrites the agents at startup" >&2
1942
+ fi
1940
1943
  if ! grep -qF 'resource: "*"' "${WORKFLOWS_DIR}/shared/opencode-ci.md"; then
1941
1944
  LEAD_OK=0; echo "FAIL: the CI setup must quote the generated agents' permission resource (a bare * is a YAML alias)" >&2
1942
1945
  fi
1943
1946
  if worker_installed implement && ! grep -qF 'cannot run as a subagent' "$IMPLEMENT_WORKER_MD"; then
1944
1947
  LEAD_OK=0; echo "FAIL: the implement prompt must stop at a planner-sub spawn error instead of retrying other agents" >&2
1945
1948
  fi
1949
+ # gh-aw strips HTML comments from safe-output comments, so the refine marker never reaches GitHub: the
1950
+ # router's auto-accept found no questions anywhere until it matched refine's visible prefix as well.
1951
+ if ! grep -qF 'contains($prefix)' "$ROUTER_YML" || ! grep -qF 'REFINE_PREFIX: "Refinement update"' "$ROUTER_YML"; then
1952
+ LEAD_OK=0; echo "FAIL: the refine auto-accept must find the questions by refine's visible prefix, not only the stripped marker" >&2
1953
+ fi
1946
1954
  if [ "$LEAD_OK" -eq 1 ]; then PASS=$((PASS + 1)); else FAIL=$((FAIL + 1)); fi
1947
1955
  # The harness plugins only load with .opencode/node_modules installed; without it every CI run
1948
1956
  # spawned untiered workers on the session's model. And the tier model a worker pins has to be one
@@ -251,10 +251,21 @@ pre-agent-steps:
251
251
  # variants visible from the first turn; the doctor is the audit line.
252
252
  run: |
253
253
  set -euo pipefail
254
- if [ -f .opencode/scripts/sync-agents.mjs ] && [ -f .opencode/plugins/pc-subagent-tiers-core.js ]; then
254
+ # agent-harness before 3.12.1 generates `resource: *` (see below). Quoting the generated files alone is not
255
+ # enough: the plugin rewrites them when opencode starts, so the generator itself is patched first. A no-op
256
+ # once the harness quotes the value.
257
+ tiers_core=.opencode/plugins/pc-subagent-tiers-core.js
258
+ if [ -f "$tiers_core" ]; then
259
+ sed -i 's/resource: ${p\.resource}`/resource: ${JSON.stringify(p.resource)}`/' "$tiers_core"
260
+ if grep -qF 'resource: ${p.resource}`' "$tiers_core"; then
261
+ echo "::error::Could not quote the permission resource in $tiers_core; opencode would refuse to spawn planner-sub." >&2
262
+ exit 1
263
+ fi
264
+ fi
265
+ if [ -f .opencode/scripts/sync-agents.mjs ] && [ -f "$tiers_core" ]; then
255
266
  node .opencode/scripts/sync-agents.mjs --strict
256
267
  fi
257
- # agent-harness before 3.11.3 writes `resource: *` into plan.md, planner.md and planner-sub.md. A bare `*` is
268
+ # agent-harness before 3.12.1 writes `resource: *` into plan.md, planner.md and planner-sub.md. A bare `*` is
258
269
  # a YAML alias, so the frontmatter does not parse, opencode drops the agents' `mode`, treats them as primary
259
270
  # and refuses to spawn them ("Agent planner-sub cannot run as a subagent"). These files are generated here on
260
271
  # every run and never committed, so quote the value before opencode reads them; a no-op once the harness does.
@@ -1718,6 +1718,10 @@ jobs:
1718
1718
  GH_TOKEN: ${{ steps.app-token.outputs.token }}
1719
1719
  REPO: ${{ github.repository }}
1720
1720
  REFINE_MARKER: "<!-- agent-refine -->"
1721
+ # gh-aw strips HTML comments from safe-output comments, so the marker above never reaches
1722
+ # GitHub and this step found no questions in any repository. The visible prefix refine
1723
+ # puts first (agent-refine's SAFE_OUTPUT_COMMENT_PREFIX) identifies them instead.
1724
+ REFINE_PREFIX: "Refinement update"
1721
1725
  QUESTIONS_LINE: "I have some questions about this issue"
1722
1726
  PROPOSED_TAG: "**Proposed:**"
1723
1727
  DECISION_TAG: "**Your decision needed:**"
@@ -1744,8 +1748,10 @@ jobs:
1744
1748
  while IFS=$'\t' read -r issue people; do
1745
1749
  [ -n "$issue" ] || continue
1746
1750
  comments=$(gh api --paginate "repos/$REPO/issues/$issue/comments?per_page=100" | jq -s 'add // []')
1747
- asked=$(jq -c --arg marker "$REFINE_MARKER" --arg line "$QUESTIONS_LINE" '
1748
- [.[] | select(.user.type == "Bot" and (.body | contains($marker)) and (.body | contains($line)))]
1751
+ asked=$(jq -c --arg marker "$REFINE_MARKER" --arg prefix "$REFINE_PREFIX" --arg line "$QUESTIONS_LINE" '
1752
+ [.[] | select(.user.type == "Bot"
1753
+ and ((.body | contains($marker)) or (.body | contains($prefix)))
1754
+ and (.body | contains($line)))]
1749
1755
  | last // empty | {id, created_at, body}' <<<"$comments")
1750
1756
  [ -n "$asked" ] || continue
1751
1757
  asked_at=$(jq -r '.created_at' <<<"$asked")
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plainconceptsplatform/workflows",
3
- "version": "1.21.2",
3
+ "version": "1.21.4",
4
4
  "description": "Install and update Platform GitHub agentic workflows.",
5
5
  "keywords": [
6
6
  "github-actions",