From 40a685b571d3e7c043a026820bb41030cb9b2a05 Mon Sep 17 00:00:00 2001 From: Oussama Bernou Date: Mon, 1 Jun 2026 00:35:52 +0100 Subject: [PATCH 1/4] update cli --- packages/cli/.codex-plugin/plugin.json | 15 +++++++++++++++ packages/cli/openclaw.plugin.json | 11 +++++++++++ packages/cli/package.json | 2 ++ packages/cli/src/package.test.ts | 18 ++++++++++++++++++ .../cli/src/plugin/generate-plugin-json.ts | 19 ++++++++++++++----- 5 files changed, 60 insertions(+), 5 deletions(-) create mode 100644 packages/cli/.codex-plugin/plugin.json create mode 100644 packages/cli/openclaw.plugin.json diff --git a/packages/cli/.codex-plugin/plugin.json b/packages/cli/.codex-plugin/plugin.json new file mode 100644 index 0000000..715bf05 --- /dev/null +++ b/packages/cli/.codex-plugin/plugin.json @@ -0,0 +1,15 @@ +{ + "name": "clankeroverflow", + "version": "1.0.12", + "description": "Search-first memory for AI coding agents — log and reuse verified fixes across sessions", + "author": { + "name": "ClankerOverflow", + "url": "https://clankeroverflow.com" + }, + "homepage": "https://clankeroverflow.com", + "repository": "https://github.com/oussama/clankeroverflow", + "license": "MIT", + "keywords": ["debugging", "solutions", "knowledge-base", "mcp"], + "skills": "./skills/", + "mcpServers": "./.mcp.json" +} diff --git a/packages/cli/openclaw.plugin.json b/packages/cli/openclaw.plugin.json new file mode 100644 index 0000000..9a3bc84 --- /dev/null +++ b/packages/cli/openclaw.plugin.json @@ -0,0 +1,11 @@ +{ + "id": "clankeroverflow", + "name": "ClankerOverflow", + "description": "Search-first memory for AI coding agents — log and reuse verified fixes across sessions", + "version": "1.0.12", + "configSchema": { + "type": "object", + "additionalProperties": false + }, + "skills": ["./skills"] +} diff --git a/packages/cli/package.json b/packages/cli/package.json index 9a42369..1b85f3c 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -7,10 +7,12 @@ }, "files": [ ".claude-plugin", + ".codex-plugin", ".mcp.json", "commands", "dist", "hooks", + "openclaw.plugin.json", "skills" ], "type": "module", diff --git a/packages/cli/src/package.test.ts b/packages/cli/src/package.test.ts index e0e700a..896ee05 100644 --- a/packages/cli/src/package.test.ts +++ b/packages/cli/src/package.test.ts @@ -1,10 +1,14 @@ import { describe, expect, test } from "vitest"; import packageJson from "../package.json"; +import codexPluginJson from "../.codex-plugin/plugin.json"; +import openClawPluginJson from "../openclaw.plugin.json"; describe("packages/cli package metadata", () => { test("publishes bundled skills without a package install hook", () => { expect(packageJson.files).toContain("dist"); expect(packageJson.files).toContain("skills"); + expect(packageJson.files).toContain(".codex-plugin"); + expect(packageJson.files).toContain("openclaw.plugin.json"); expect(packageJson.files).not.toContain("postinstall.mjs"); expect( (packageJson.scripts as Record | undefined)?.postinstall, @@ -23,4 +27,18 @@ describe("packages/cli package metadata", () => { expect(packageJson.devDependencies?.["@clankeroverflow/mcp-logger"]).toBeUndefined(); expect(Object.values(packageJson.dependencies ?? {})).not.toContain("catalog:"); }); + + test("publishes an OpenClaw-compatible ClawHub bundle", () => { + expect(codexPluginJson.name).toBe("clankeroverflow"); + expect(codexPluginJson.version).toBe(packageJson.version); + expect(codexPluginJson.skills).toBe("./skills/"); + expect(codexPluginJson.mcpServers).toBe("./.mcp.json"); + expect(openClawPluginJson.id).toBe("clankeroverflow"); + expect(openClawPluginJson.version).toBe(packageJson.version); + expect(openClawPluginJson.skills).toEqual(["./skills"]); + expect(openClawPluginJson.configSchema).toEqual({ + type: "object", + additionalProperties: false, + }); + }); }); diff --git a/packages/cli/src/plugin/generate-plugin-json.ts b/packages/cli/src/plugin/generate-plugin-json.ts index 0c0d22d..77c266f 100644 --- a/packages/cli/src/plugin/generate-plugin-json.ts +++ b/packages/cli/src/plugin/generate-plugin-json.ts @@ -6,10 +6,19 @@ const packageRoot = path.resolve(path.dirname(fileURLToPath(import.meta.url)), " const pkg = JSON.parse(await readFile(path.join(packageRoot, "package.json"), "utf-8")); -const pluginJsonPath = path.join(packageRoot, ".claude-plugin", "plugin.json"); -const pluginJson = JSON.parse(await readFile(pluginJsonPath, "utf-8")); +const pluginJsonPaths = [ + path.join(packageRoot, ".claude-plugin", "plugin.json"), + path.join(packageRoot, ".codex-plugin", "plugin.json"), + path.join(packageRoot, "openclaw.plugin.json"), +]; -pluginJson.version = pkg.version; +for (const pluginJsonPath of pluginJsonPaths) { + const pluginJson = JSON.parse(await readFile(pluginJsonPath, "utf-8")); -await writeFile(pluginJsonPath, JSON.stringify(pluginJson, null, 2) + "\n"); -console.log(`Stamped plugin.json version: ${pluginJson.version}`); + pluginJson.version = pkg.version; + + await writeFile(pluginJsonPath, JSON.stringify(pluginJson, null, 2) + "\n"); + console.log( + `Stamped ${path.relative(packageRoot, pluginJsonPath)} version: ${pluginJson.version}`, + ); +} From a4943823daf17e2725a667cd45fa0d3fa183b30d Mon Sep 17 00:00:00 2001 From: Oussama Bernou Date: Mon, 1 Jun 2026 00:37:21 +0100 Subject: [PATCH 2/4] update readme --- README.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/README.md b/README.md index 97fed99..69778c1 100644 --- a/README.md +++ b/README.md @@ -34,6 +34,7 @@ Supported agents: - Codex - Claude Code +- OpenClaw - OpenCode - Pi - Cursor @@ -110,6 +111,24 @@ To configure an MCP client manually, run the published package over stdio: `CLANKER_API_KEY` is optional for search-only access. +## OpenClaw + +ClankerOverflow ships an OpenClaw-compatible bundle for ClawHub. After the package is published, install it with: + +```bash +openclaw plugins install clawhub:@clankeroverflow/cli +``` + +The bundle exposes the ClankerOverflow skills and MCP server to OpenClaw. To preview a ClawHub release from this repository without uploading it: + +```bash +clawhub package publish ./packages/cli --family bundle-plugin --dry-run +``` + +CLI and plugin releases are automated by `.github/workflows/release-cli.yml`. Pull requests that modify `packages/cli` validate the npm package and preview the ClawHub bundle. Pushes to `master` publish the npm package and ClawHub bundle after validation. + +Configure the `NPM_TOKEN` repository secret for npm publishing. ClawHub publishing uses GitHub Actions OIDC when trusted publishing is configured; add a `CLAWHUB_TOKEN` repository secret as a fallback. Bump `packages/cli/package.json` before merging a release. + ## Local SQLite Mode Use the MCP server without the hosted service: From 68d3fda03096713fd69da28c8b139569a0189990 Mon Sep 17 00:00:00 2001 From: Oussama Bernou Date: Mon, 1 Jun 2026 00:37:31 +0100 Subject: [PATCH 3/4] add release workflow --- .github/workflows/release-cli.yml | 101 ++++++++++++++++++++++++++++++ 1 file changed, 101 insertions(+) create mode 100644 .github/workflows/release-cli.yml diff --git a/.github/workflows/release-cli.yml b/.github/workflows/release-cli.yml new file mode 100644 index 0000000..753fd9a --- /dev/null +++ b/.github/workflows/release-cli.yml @@ -0,0 +1,101 @@ +name: Release CLI + +on: + pull_request: + paths: + - "packages/cli/**" + - ".github/workflows/release-cli.yml" + push: + branches: + - master + paths: + - "packages/cli/**" + +permissions: + contents: read + +concurrency: + group: release-cli-${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: ${{ github.event_name == 'pull_request' }} + +jobs: + validate: + name: Validate CLI release + runs-on: ubuntu-latest + timeout-minutes: 15 + + steps: + - name: Checkout + uses: actions/checkout@v6 + + - name: Setup pnpm + uses: pnpm/action-setup@v6 + + - name: Setup Node.js + uses: actions/setup-node@v6 + with: + node-version: 24 + cache: pnpm + cache-dependency-path: pnpm-lock.yaml + + - name: Install dependencies + run: pnpm install --frozen-lockfile + + - name: Test CLI + run: pnpm --filter @clankeroverflow/cli test + + - name: Check CLI types + run: pnpm --filter @clankeroverflow/cli check-types + + - name: Build CLI and plugin manifests + run: pnpm --filter @clankeroverflow/cli build + + - name: Check package contents + run: pnpm --filter @clankeroverflow/cli pack --pack-destination /tmp + + - name: Preview ClawHub bundle + run: pnpm dlx clawhub@0.18.0 package publish ./packages/cli --family bundle-plugin --dry-run + + publish: + name: Publish CLI and plugins + if: github.event_name == 'push' && github.ref == 'refs/heads/master' + needs: validate + runs-on: ubuntu-latest + timeout-minutes: 15 + environment: production + permissions: + contents: read + id-token: write + env: + CLAWHUB_TOKEN: ${{ secrets.CLAWHUB_TOKEN }} + + steps: + - name: Checkout + uses: actions/checkout@v6 + + - name: Setup pnpm + uses: pnpm/action-setup@v6 + + - name: Setup Node.js + uses: actions/setup-node@v6 + with: + node-version: 24 + cache: pnpm + cache-dependency-path: pnpm-lock.yaml + registry-url: https://registry.npmjs.org + + - name: Install dependencies + run: pnpm install --frozen-lockfile + + - name: Publish CLI package + working-directory: packages/cli + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + run: pnpm publish --access public --provenance --no-git-checks + + - name: Configure ClawHub token fallback + if: env.CLAWHUB_TOKEN != '' + run: pnpm dlx clawhub@0.18.0 login --token "$CLAWHUB_TOKEN" --no-browser + + - name: Publish ClawHub bundle + run: pnpm dlx clawhub@0.18.0 package publish ./packages/cli --family bundle-plugin --owner clankeroverflow From 7920b291c409fc93aba12da6405cb454a1a97be2 Mon Sep 17 00:00:00 2001 From: Oussama Bernou Date: Mon, 1 Jun 2026 00:50:27 +0100 Subject: [PATCH 4/4] update release workflow --- .github/workflows/release-cli.yml | 7 ++++++- README.md | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release-cli.yml b/.github/workflows/release-cli.yml index 753fd9a..eb1bc68 100644 --- a/.github/workflows/release-cli.yml +++ b/.github/workflows/release-cli.yml @@ -2,6 +2,10 @@ name: Release CLI on: pull_request: + branches: + - master + types: + - closed paths: - "packages/cli/**" - ".github/workflows/release-cli.yml" @@ -21,6 +25,7 @@ concurrency: jobs: validate: name: Validate CLI release + if: github.event_name == 'push' || github.event.pull_request.merged == true runs-on: ubuntu-latest timeout-minutes: 15 @@ -58,7 +63,7 @@ jobs: publish: name: Publish CLI and plugins - if: github.event_name == 'push' && github.ref == 'refs/heads/master' + if: github.event_name == 'push' || github.event.pull_request.merged == true needs: validate runs-on: ubuntu-latest timeout-minutes: 15 diff --git a/README.md b/README.md index 69778c1..627f9fd 100644 --- a/README.md +++ b/README.md @@ -125,7 +125,7 @@ The bundle exposes the ClankerOverflow skills and MCP server to OpenClaw. To pre clawhub package publish ./packages/cli --family bundle-plugin --dry-run ``` -CLI and plugin releases are automated by `.github/workflows/release-cli.yml`. Pull requests that modify `packages/cli` validate the npm package and preview the ClawHub bundle. Pushes to `master` publish the npm package and ClawHub bundle after validation. +CLI and plugin releases are automated by `.github/workflows/release-cli.yml`. When a pull request into `master` modifies `packages/cli` and is merged, or when a matching commit is pushed directly to `master`, the workflow validates the npm package, previews the ClawHub bundle, publishes the npm package, and publishes the ClawHub bundle. Pull request updates do not trigger this release workflow. Configure the `NPM_TOKEN` repository secret for npm publishing. ClawHub publishing uses GitHub Actions OIDC when trusted publishing is configured; add a `CLAWHUB_TOKEN` repository secret as a fallback. Bump `packages/cli/package.json` before merging a release.