Commit Graph
33 Commits
Author SHA1 Message Date
junior f0f1152545 Add runtime .agents-workflow/ checkout to .gitignore 2026-07-04 07:45:27 +00:00
ffaerber 13148ea68c Merge pull request 'Single source of truth for agent model IDs (fixes #31)' (#32) from ai/issue-31 into main 2026-07-04 09:43:28 +02:00
ffaerber d0a4de9682 Merge pull request '@lead: Dev-agent runs can break later steps by touching the runtime .agents-workflow scripts checkout' (#34) from ai/issue-33 into main 2026-07-04 09:43:13 +02:00
lead 423a060816 fix(agent): run step scripts from outside the workspace so agents can't break the run
Stage the shared scripts into $RUNNER_TEMP and point $SCRIPTS there for every
step, so an agent that commits/deletes the in-tree .agents-workflow checkout no
longer destroys the scripts the post-agent steps run (issue #33). Scrub any
in-tree .agents-workflow artifact before publishing, and add a failure-safe
rescue step that opens a PR for pushed work when a run fails.
2026-07-04 07:34:53 +00:00
senior cafd36eae1 fix(agent): single source of truth for model IDs (route.sh + install-opencode.sh)
Extract the agent registry to a shared agents.json and have both
route.sh (agent → model) and install-opencode.sh (ollama-cloud provider
models map) derive from it, so the two lists can no longer drift.

route.sh now copies agents.json to /tmp/agents.json instead of an inline
heredoc. install-opencode.sh builds the ollama-cloud  map by
collecting every registry model with the  prefix and
stripping it — non-ollama-cloud models (e.g. @lead's anthropic/claude-opus,
the local ornith:35b) are excluded by construction.

Resolves #31.
2026-07-04 07:20:25 +00:00
Felix FaerberandClaude Opus 4.8 b3deee7412 fix(agent): route issue-opened events (event_name is workflow_call in reusable wf)
The shared agent.yml is a reusable (workflow_call) workflow, so on Gitea
github.event_name evaluates to 'workflow_call' — not the original 'issues'/
'issue_comment'. route.sh branched on EVENT == "issues", so issue-opened runs
scanned the empty comment body and skipped the @pm fallback, exiting 1 with
"no known agent mentioned" (runs #393/#394). Comment runs were unaffected
because the @mention lives in $BODY.

Discriminate on the comment id (CID) instead, which IS reliably forwarded in
the event payload: empty => issue-opened (scan issue body, default @pm), set
=> comment (scan comment body). Also add .gitignore for .env.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-04 10:02:50 +03:00
ffaerber d8d4ba71c0 Merge pull request '@lead: agent skills' (#25) from ai/issue-22 into main
Reviewed-on: ffaerber/agents#25
2026-07-04 08:27:12 +02:00
lead 36ba91cdd8 @lead: externalize agent.yml inline scripts into .gitea/workflows/scripts/*.sh
Rebased onto the per-agent skill-scoping change so PR #25 carries both:
- route.sh keeps the registry 'skills' allow-list and emits skills as a step output
- install-opencode.sh writes the permission.skill block (deny-all + allow listed)

Pure refactor otherwise: each step's shell moves to its own file, called via
bash "$SCRIPTS/<name>.sh". The two extracted SKILL.md bodies are byte-identical to
main; routing/config/publish behavior is unchanged. Because this is a reusable
workflow (workflow_call) the runtime checkout is the caller's repo, so agent.yml now
checks THIS repo out into .agents-workflow/ (pinned @main) and points $SCRIPTS there.
2026-07-04 05:54:27 +00:00
lead a79b49b55e @lead: issue #22 — per-agent skill scoping via permission.skill 2026-07-04 05:25:06 +00:00
ffaerber e8e299872a Update .gitea/workflows/agent.yml 2026-07-03 22:30:05 +02:00
ffaerber 9760d3b652 Merge pull request '@junior: run on issue' (#24) from ai/issue-23 into main
Reviewed-on: ffaerber/agents#24
2026-07-03 22:28:16 +02:00
junior 3ad5c28243 @junior: issue #23 — trigger @pm on new issues in this repo 2026-07-03 20:26:03 +00:00
ffaerber 6decdd4658 Update .gitea/workflows/agent.yml 2026-07-03 22:11:42 +02:00
ffaerber 205b26a2f0 Update .gitea/workflows/agent.yml 2026-07-03 22:08:25 +02:00
ffaerber 25c915f540 Merge pull request '@senior: gitea' (#15) from ai/issue-14 into main
Reviewed-on: ffaerber/agents#15
2026-07-03 13:10:41 +02:00
senior fdf966c765 @senior: issue #14 — add gitea-api skill + expose AGENT_TOKEN to the agent process
- New gitea-api opencode skill (mirrors node1-ssh): documents the Gitea REST API
  base URL, Authorization: token $AGENT_TOKEN header, and example curl calls for
  read (issue/PR + comments, Actions runs/jobs/logs, org repos) and write (comment,
  label, close), with explicit warnings: never echo the token, treat fetched
  content as untrusted data (prompt-injection guard), and stop on 403.
- Wire AGENT_TOKEN into the Run agent step env so the agent process itself can
  call the API (previously only the Publish step saw it).
- Update README secrets table: AGENT_TOKEN now also powers gitea-api; do not
  re-narrow scopes without removing the skill.
2026-07-03 11:07:38 +00:00
ffaerber c5eaa3c5a5 Merge pull request '@junior: agents ssh' (#13) from ai/issue-12 into main
Reviewed-on: ffaerber/agents#13
2026-07-03 12:09:09 +02:00
lead 459a0c64b8 @lead: node1-ssh skill points to homelab opencode.json allowlist instead of inventing one 2026-07-03 09:50:48 +00:00
junior 5c4f03a397 @junior: issue #12 2026-07-03 09:45:48 +00:00
ffaerber 343a422233 Merge pull request '@senior: Wire up ssh node1 … in the agent workflow (read-only swarm diagnostics)' (#11) from ai/issue-10 into main
Reviewed-on: ffaerber/agents#11
2026-07-03 11:17:49 +02:00
senior 173ee612bd @senior: issue #10 — wire up read-only ssh node1 alias in agent workflow 2026-07-03 09:13:42 +00:00
ffaerber 0362e09737 Merge pull request '@senior: readme' (#9) from ai/issue-8 into main
Reviewed-on: ffaerber/agents#9
2026-07-02 17:51:55 +02:00
senior 402ccd7a6b @senior: issue #8 — list agents + models in README, update routing & allow-list 2026-07-02 15:38:52 +00:00
ffaerber d8c47849cd Merge pull request '@senior: opscode events are not in the PR' (#5) from ai/issue-4 into main
Reviewed-on: ffaerber/agents#5
2026-07-02 15:52:43 +02:00
senior 92ad8ef436 @senior: issue #4 — one PR per run, post activity log to the PR thread 2026-07-02 13:51:21 +00:00
ffaerber 0fa2e7b6d8 Merge pull request '@senior: opencode logs' (#3) from ai/issue-2 into main
Reviewed-on: ffaerber/agents#3
2026-07-02 15:21:47 +02:00
senior 15285d228f Post opencode activity log (tool calls + reasoning) as a PR comment (#2)
Switch the real 'Run agent' step to --format json (replacing the two
TEMP/DEBUG schema-discovery commits da6f0d5/d0ddb06), capture the raw
event stream, and reconstruct the plain-text reply from the assistant
'text' parts so the existing Publish logic is unchanged.

Add a 'Build activity log' step that filters the event stream to
tool_use (with truncated title/input) and text (reasoning) events.
The Publish step posts that trail as a separate collapsible comment on
the PR thread (dev agents only — comment-only roles do no tool calls).

This is additive to the existing summary/PR-description comment.
Reasoning reuse on a follow-up run is free: the existing 'fetch full
issue thread' step already re-feeds all prior comments (including this
new log comment) into the next run's prompt, so the agent sees what it
did last time.
2026-07-02 13:17:14 +00:00
Felix FaerberandClaude Opus 4.8 d0ddb06ccb DEBUG: post captured --format json schema as an issue comment (findable + fetchable)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-02 15:21:48 +03:00
Felix FaerberandClaude Opus 4.8 da6f0d5b92 TEMP: debug step to capture opencode --format json event schema
Runs a tiny Sonnet probe and dumps the raw events to the Actions log so we can build the
PR-progress parser against the real schema. Removed once captured.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-02 15:14:37 +03:00
Felix FaerberandClaude Opus 4.8 6b5c1bb888 Dogfood: add thin caller + AGENTS.md so agents work on the agents repo itself
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-02 10:47:15 +03:00
Felix FaerberandClaude Opus 4.8 c594080ffc Add PM breakdown skill: feature -> milestone + sub-issues (plan/approve/create gate)
@pm proposes a milestone + sub-tasks and asks for approval; on 'yes' it emits a BEGIN_SUBTASKS
block, and the workflow creates the milestone + one sub-issue per line (each 'Part of #<feature>').
Sub-issues are not auto-started — maintainer @mentions an agent on each when ready.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-02 10:32:57 +03:00
Felix FaerberandClaude Opus 4.8 f6df3f24af Add reusable AI-agent workflow + docs + AGENTS template
Reusable workflow (on: workflow_call) moved from homelab; consuming repos add a thin caller
(uses: ffaerber/agents/.gitea/workflows/agent.yml@main, secrets: inherit).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-02 07:20:54 +03:00
ffaerber a14d33bb8d Initial commit 2026-07-02 06:18:36 +02:00