Add the oss-oo-lab plugin: laboratory gateway and CI tracking #1

Merged
claude merged 5 commits from oss-oo/oss-oo-lab-plugin-20261027 into main 2026-10-27 12:55:01 +00:00
Member

Claude Code sessions cannot follow oss-oo.io pull requests with the desktop app's PR/CI monitor: it accepts only GitHub-style /pull/<n> URLs, and Forgejo uses /pulls/<n>. This PR adds a Claude Code plugin, oss-oo-lab, that closes the gap without rebuilding what the laboratory already serves.

What it adds

  • Gateway (.mcp.json): the existing remote MCP gateway https://oss-oo.io/mcp (repos, issues, PRs, merges, memory, hand-offs). A headersHelper reads the agent token from the desktop keyring.
  • CI core (lab/labci.py): stdlib Python, GET-only. It goes from the PR head to runs by head_sha (re-checked against commit_sha), then to jobs, steps and a verdict. Matching is always by id, never by title. Job logs are cut to a step's time window, with failure lines first. A CLI (ci, log, watch, gateway-headers) serves any agent or shell.
  • Mod (hooks/register.tsx):
    • tools lab_ci, lab_ci_log, lab_watch, lab_unwatch
    • a background watcher with status line, toasts and a Lab CI pane
    • a <lab-ci-event> that wakes the session when a watched PR's CI is final, with the failed step and a log excerpt marked as data
    • the commands /lab-watch, /lab-unwatch, /lab-ci
    • a guard that refuses the gateway's registrar tools
  • Skill (skills/oss-oo-lab): WIP drafts (WIP: → draft: true, mergeable: false), watching instead of polling, merging.
  • Icon and social preview (assets/): the plugin icon and repository avatar (1024×1024) and the social preview (1280×640), rendered by assets/src/render.py from the laboratory's oss-oo brand pack. Rendering is deterministic and --check guards it. The artwork is CC BY-SA 4.0 like the pack; see assets/ATTRIBUTION.md.

Verification

  • sh scripts/check.sh: 14 Python unit tests OK; claude plugin validate . passed; claude plugin test . passed 8 of 8 (watch → wake once, failure excerpt, wake off, tool errors, registrar guard, pane on terminal and desktop).
  • Live, read-only, one headless claude -p --plugin-dir <checkout> run with no installation:
    • The mod loaded and lab_ci read OSS-OO/laboratory#156: 2 runs, 2 jobs, 16 + 8 steps, verdict success.
    • The gateway connected through the headersHelper and get_pull_request answered.
    • Side finding: the gateway's get_pull_request returns no merged field.
  • The plugin followed this PR's own CI live (labci.py watch OSS-OO/claude-plugin#1). It tracked three pushes, each by its new run id (1981, 1982, 1983; Forgejo cancelled the superseded runs), and exited 0 on run 1983 … success, job 4929 check success (5/5 steps). labci.py log OSS-OO/claude-plugin 4929 --step 3 showed the runner's Ran 15 tests … OK.
  • The latest head a2308e2 (assets) is green: run 1984, job 4930, 5/5 steps, also read with the plugin's own watch.
  • Real-session acceptance, installed plugin: installed at user scope on the owner's station with his OK, from a checkout in ~/tools/oss-oo-lab.
    • A fresh desktop session called lab_watch OSS-OO/claude-plugin#1 and ended its turn.
    • After the push of 3a8e1f3, run 1994 finished at 12:48:19Z.
    • At about 12:48:43Z the plugin woke that session on its own ("The oss-oo-lab plugin sent a message:") with <lab-ci-event target="OSS-OO/claude-plugin#1" verdict="success" sha="3a8e1f33…"> and the CI summary.
    • lab_ci (overview) and lab_unwatch all then answered as designed.
  • The desktop app's bind_pr refused this PR's URL: it expects https://<host>/<owner>/<repo>/pull/<number>.
  • Live CLI checks against laboratory PRs. A private laboratory PR was also read, only read; its details stay out of this public repository. On a failed run there, the CLI named the failed step and put the go test --- FAIL lines first.

Not done here

  • Not verified: a git-URL marketplace install (https://oss-oo.io/OSS-OO/claude-plugin.git) waits for the plugin to be on main.
  • Pane and status line: nobody looked at them in the live session; the mod tests cover them on the terminal and desktop surfaces.
  • No tsc type-check: TypeScript is not installed on the station. claude plugin validate and the test runner compile the module.

🤖 Generated with Claude Code

Claude Code sessions cannot follow oss-oo.io pull requests with the desktop app's PR/CI monitor: it accepts only GitHub-style `/pull/<n>` URLs, and Forgejo uses `/pulls/<n>`. This PR adds a Claude Code plugin, `oss-oo-lab`, that closes the gap without rebuilding what the laboratory already serves. ## What it adds - **Gateway (`.mcp.json`)**: the existing remote MCP gateway `https://oss-oo.io/mcp` (repos, issues, PRs, merges, memory, hand-offs). A `headersHelper` reads the agent token from the desktop keyring. - **CI core (`lab/labci.py`)**: stdlib Python, GET-only. It goes from the PR head to runs by `head_sha` (re-checked against `commit_sha`), then to jobs, steps and a verdict. Matching is always by id, never by title. Job logs are cut to a step's time window, with failure lines first. A CLI (`ci`, `log`, `watch`, `gateway-headers`) serves any agent or shell. - **Mod (`hooks/register.tsx`)**: - tools `lab_ci`, `lab_ci_log`, `lab_watch`, `lab_unwatch` - a background watcher with status line, toasts and a **Lab CI** pane - a `<lab-ci-event>` that wakes the session when a watched PR's CI is final, with the failed step and a log excerpt marked as data - the commands `/lab-watch`, `/lab-unwatch`, `/lab-ci` - a guard that refuses the gateway's registrar tools - **Skill (`skills/oss-oo-lab`)**: WIP drafts (`WIP:` → `draft: true`, `mergeable: false`), watching instead of polling, merging. - **Icon and social preview (`assets/`)**: the plugin icon and repository avatar (1024×1024) and the social preview (1280×640), rendered by `assets/src/render.py` from the laboratory's oss-oo brand pack. Rendering is deterministic and `--check` guards it. The artwork is CC BY-SA 4.0 like the pack; see `assets/ATTRIBUTION.md`. ## Verification - `sh scripts/check.sh`: 14 Python unit tests OK; `claude plugin validate .` passed; `claude plugin test .` passed 8 of 8 (watch → wake once, failure excerpt, wake off, tool errors, registrar guard, pane on terminal and desktop). - Live, read-only, one headless `claude -p --plugin-dir <checkout>` run with no installation: - The mod loaded and `lab_ci` read OSS-OO/laboratory#156: 2 runs, 2 jobs, 16 + 8 steps, verdict success. - The gateway connected through the `headersHelper` and `get_pull_request` answered. - Side finding: the gateway's `get_pull_request` returns no `merged` field. - The plugin followed this PR's own CI live (`labci.py watch OSS-OO/claude-plugin#1`). It tracked three pushes, each by its new run id (1981, 1982, 1983; Forgejo cancelled the superseded runs), and exited 0 on `run 1983 … success`, `job 4929 check success (5/5 steps)`. `labci.py log OSS-OO/claude-plugin 4929 --step 3` showed the runner's `Ran 15 tests … OK`. - The latest head `a2308e2` (assets) is green: run 1984, job 4930, 5/5 steps, also read with the plugin's own `watch`. - **Real-session acceptance, installed plugin:** installed at user scope on the owner's station with his OK, from a checkout in `~/tools/oss-oo-lab`. - A fresh desktop session called `lab_watch OSS-OO/claude-plugin#1` and ended its turn. - After the push of `3a8e1f3`, run 1994 finished at 12:48:19Z. - At about 12:48:43Z the plugin woke that session on its own (*"The oss-oo-lab plugin sent a message:"*) with `<lab-ci-event target="OSS-OO/claude-plugin#1" verdict="success" sha="3a8e1f33…">` and the CI summary. - `lab_ci` (overview) and `lab_unwatch all` then answered as designed. - The desktop app's `bind_pr` refused this PR's URL: it expects `https://<host>/<owner>/<repo>/pull/<number>`. - Live CLI checks against laboratory PRs. A private laboratory PR was also read, only read; its details stay out of this public repository. On a failed run there, the CLI named the failed step and put the go test `--- FAIL` lines first. ## Not done here - **Not verified:** a git-URL marketplace install (`https://oss-oo.io/OSS-OO/claude-plugin.git`) waits for the plugin to be on `main`. - **Pane and status line:** nobody looked at them in the live session; the mod tests cover them on the terminal and desktop surfaces. - **No `tsc` type-check:** TypeScript is not installed on the station. `claude plugin validate` and the test runner compile the module. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
claude agent added 1 commit 2026-10-27 12:24:21 +00:00
Add the oss-oo-lab plugin: laboratory gateway and CI tracking
Some checks failed
ci / check (pull_request) Has been cancelled
e0f5416adf
Claude Code cannot follow oss-oo.io pull requests with the desktop app's
PR monitor, which only accepts GitHub-style /pull/<n> URLs. This plugin
connects the laboratory's existing remote MCP gateway and adds what the
gateway lacks: reading and watching Forgejo Actions CI.

- .mcp.json: the remote gateway at https://oss-oo.io/mcp, authorized by
  a headersHelper that reads the agent token from the desktop keyring.
- lab/labci.py: stdlib, GET-only core and CLI. PR head -> runs by
  head_sha (re-checked by commit_sha) -> jobs -> steps -> verdict, plus
  job logs cut to a step's time window with failure lines first, and a
  blocking watch. The token travels only in the Authorization header.
- hooks/register.tsx: a mod with tools lab_ci, lab_ci_log, lab_watch and
  lab_unwatch, a background watcher (status line, toasts, Lab CI pane),
  a <lab-ci-event> that wakes the session when a watched PR's CI is
  final, /lab-watch, /lab-unwatch and /lab-ci, and a guard that refuses
  the gateway's registrar tools.
- skills/oss-oo-lab: WIP drafts, watching instead of polling, merging.
- Tests: 14 Python unit tests on synthetic fixtures, 8 mod tests via
  claude plugin test; scripts/check.sh is the gate, CI runs it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent added 1 commit 2026-10-27 12:25:16 +00:00
labci: a step that has not started has no log lines
Some checks failed
ci / check (pull_request) Has been cancelled
2eb4d36e32
A waiting step has no start time; slicing its window from the empty
start returned the job's setup lines. Found by the read-only live demo.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent added 1 commit 2026-10-27 12:26:27 +00:00
mod: one guarded reader for the timer and the pane's Refresh
All checks were successful
ci / check (pull_request) Successful in 3s
fc2e71ee7d
The pane's Refresh read a watch outside the poll guard, so a press at
the moment CI finished could wake the session twice. Refresh now runs
the guarded poll (forced, so final watches are read too), and the wake
re-reads the watch's notified mark right before announcing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent added 1 commit 2026-10-27 12:31:22 +00:00
Add the icon and the social preview, rendered from the oss-oo brand pack
All checks were successful
ci / check (pull_request) Successful in 3s
a2308e274c
assets/icon.png (1024x1024, transparent corners) nests the oss-oo
twin-crystal mark in a ring of pipeline steps that closes on a check;
it is the plugin icon and the repository avatar. The social preview
(1280x640, indexed to stay under 1 MiB) puts a text panel and the icon
on the brand pack's background, after the laboratory's own card and
the OSS-Singularity applets' render workflow.

assets/src/render.py renders both deterministically from the sources
beside it; --check (run by scripts/check.sh where ImageMagick and
rsvg-convert exist) fails on stale outputs. The artwork is CC BY-SA 4.0
like the brand pack it adapts; assets/ATTRIBUTION.md records sources,
license and changes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent added 1 commit 2026-10-27 12:35:59 +00:00
README: the install path that was exercised
All checks were successful
ci / check (pull_request) Successful in 3s
3a8e1f33b0
The first install (2026-10-27) used a checkout as a directory marketplace
in user scope; record that path, how options are set from a shell, and
that a running session loads the plugin only once restarted. The git-URL
marketplace stays marked as not exercised.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent merged commit 99018b5b85 into main 2026-10-27 12:55:01 +00:00
claude agent deleted branch oss-oo/oss-oo-lab-plugin-20261027 2026-10-27 12:55:01 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
OSS-OO/claude-plugin!1
No description provided.