Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions .agents/plugins/marketplace.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@
{
"name": "gitkb",
"source": {
"source": "local",
"path": "./plugins/gitkb"
"source": "git-subdir",
"url": "https://github.com/gitkb/gitkb-codex-plugin.git",
"path": "./plugin",
"sha": "d6b67ba8b244a9072996d63636bb8bf614ffc207"
},
"policy": {
"installation": "AVAILABLE",
Expand Down
24 changes: 20 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,35 @@ on:
branches:
- main

permissions:
contents: read

jobs:
validate:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- name: Install jq
run: sudo apt-get update && sudo apt-get install -y jq
- name: Run release checks
- name: Run catalog release checks
run: make release-check
- name: Read approved canonical source
id: source
run: echo "sha=$(jq -r '.plugins[] | select(.name == "gitkb") | .source.sha' .agents/plugins/marketplace.json)" >> "$GITHUB_OUTPUT"
- name: Checkout exact canonical plugin and tests
uses: actions/checkout@v4
with:
repository: gitkb/gitkb-codex-plugin
ref: ${{ steps.source.outputs.sha }}
path: .canonical
persist-credentials: false
- uses: actions/setup-node@v4
with:
node-version: '22'
- name: Install Codex for MCP launch regression
- name: Install Codex for source and MCP launch regression
run: npm install --prefix "$RUNNER_TEMP/codex" @openai/codex@0.159.2
- name: Test packaged MCP launch through Codex
run: make test-integration CODEX_TEST_BINARY="$RUNNER_TEMP/codex/node_modules/.bin/codex"
- name: Verify canonical package and actual Git-backed installation
run: make test-integration CANONICAL_SOURCE_DIR="$GITHUB_WORKSPACE/.canonical" CODEX_TEST_BINARY="$RUNNER_TEMP/codex/node_modules/.bin/codex"
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,7 @@
.DS_Store

# Temporary source checkout used by CI; never a maintained plugin copy.
.canonical/

# Python regression-test import cache.
__pycache__/
12 changes: 3 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,17 @@ all: lint test

test:
@tests/package-policy.sh
@python3 tests/mcp-contract.py plugins/gitkb
@python3 -B tests/catalog-policy.py

test-integration:
@python3 tests/mcp-startup.py --codex "$(CODEX_TEST_BINARY)"
@python3 -B tests/verify-source.py --codex "$(CODEX_TEST_BINARY)" $(if $(CANONICAL_SOURCE_DIR),--source-checkout "$(CANONICAL_SOURCE_DIR)")

lint: lint-json lint-policy
@echo "All checks passed."

lint-json:
@echo "Checking marketplace.json is valid JSON..."
@echo "Checking marketplace catalog is valid JSON..."
@jq empty .agents/plugins/marketplace.json
@echo "Checking bundled plugin manifest is valid JSON..."
@jq empty plugins/gitkb/.codex-plugin/plugin.json
@echo "Checking bundled hooks config is valid JSON..."
@jq empty plugins/gitkb/hooks/hooks.json
@echo "Checking bundled MCP config is valid JSON..."
@jq empty plugins/gitkb/.mcp.json

lint-policy:
@tests/package-policy.sh
Expand Down
99 changes: 73 additions & 26 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,50 +1,97 @@
# GitKB Codex Plugins

A private Codex plugin marketplace by GitKB.
The Codex plugin marketplace by GitKB.

## Available Plugins

| Plugin | Description |
|--------|-------------|
| [gitkb](https://github.com/gitkb/gitkb-codex-plugin) | Knowledge base and code intelligence for AI-native development. |
| Plugin | Authoritative source |
|--------|----------------------|
| gitkb | [gitkb/gitkb-codex-plugin](https://github.com/gitkb/gitkb-codex-plugin) — knowledge base and code intelligence |

The Claude marketplace also includes [`meta`](https://github.com/gitkb/meta). Add the Codex `meta` plugin here after `gitkb/meta` has a `codex-plugin` payload that mirrors its Claude plugin.
This repository owns the catalog, installation policies and approved source
selectors. The standalone repository owns the plugin payload, hooks, skills,
MCP configuration, package version and behavior tests. Changes to those components
belong there; there is no bundled GitKB payload or sync workflow here.

## Repository Layout
The GitKB entry uses Codex's supported `git-subdir` source, selecting `./plugin`
from the standalone repository by a full immutable commit SHA. See the
[OpenAI packaging documentation](https://developers.openai.com/plugins/build/plugins).

```text
.agents/plugins/marketplace.json # Codex marketplace manifest
plugins/gitkb/ # Installable GitKB Codex plugin payload
```

Codex marketplace entries resolve plugin paths relative to this marketplace repo. The `plugins/gitkb` payload mirrors the private `gitkb-codex-plugin` package while both are under review.
The Claude marketplace also includes [`meta`](https://github.com/gitkb/meta).
Add a Codex entry here once its authoritative repository has a supported payload.

## Usage

```bash
# Add this private marketplace when you have repository access
codex plugin marketplace add gitkb/codex-plugins

# Install a plugin
codex plugin add gitkb@gitkb
```

## License
The installation identity remains `gitkb@gitkb`. Codex fetches the declared
Git source and installs its package; a Harmony meta checkout is not required.
The reference is pinned rather than rolling with `main`, so changes upstream
only reach this catalog after a reviewed pin update.

MIT
For an existing Git-backed marketplace installation:

## MCP Launch Regression Tests
```bash
codex plugin marketplace upgrade gitkb
codex plugin add gitkb@gitkb
```

`make test` checks the packaged environment allowlist and cache version. The
installation test exercises the actual Codex MCP launch boundary with synthetic
sessions, custom registry settings, paths with spaces and Unicode, and credential
canaries. It reuses an isolated plugin installation across two sessions and a
launch without activity context. It does not start a model turn or run an activity
sink, and it does not use your Codex home or credentials.
Then start a new Codex session, or resume through the ATC shim, to launch a new
MCP process. Refreshing a marketplace or installing binaries alone does not
change an already running MCP child's environment. Missing historical activity
is not backfilled.

## Development and Release Promotion

```bash
make release-check
make test-integration CODEX_TEST_BINARY=/absolute/path/to/provider/codex
```

Pass the provider binary, rather than an ATC shim. CI runs this test with Codex
`0.159.2`, in addition to the release checks.
Catalog tests reject duplicate GitKB entries, unexpected sources, mutable or
malformed selectors, escaping package paths, and a reintroduced local payload
or copy of the MCP behavior tests.

The integration command fetches the exact catalog commit into a temporary
checkout and runs its package-owned policy, MCP contract and startup tests. The
startup test installs this catalog's actual Git-backed entry with Codex, compares
every installed package file against the referenced source, and verifies session
and credential isolation. It uses an isolated Codex home and synthetic context,
without model turns or real activity sinks. Pass the provider binary, not an ATC
shim. Source fetches need network access to the public standalone repository;
`make release-check` remains offline.

CI checks out the same source selector and passes it as `CANONICAL_SOURCE_DIR`
to avoid fetching that verification checkout again. Codex still resolves and
fetches the actual Git-backed plugin entry. CI uses Codex `0.159.2`.

To promote a new plugin release:

1. Implement and test the change in `gitkb/gitkb-codex-plugin`, bumping its plugin
version when the installed payload changes.
2. Update only the GitKB entry's `source.sha` to the approved full commit SHA.
3. Run the catalog and delegated source checks, then review and merge the pin PR.

The initial selector contains the tested `0.1.2` payload from standalone
[PR #7](https://github.com/gitkb/gitkb-codex-plugin/pull/7), matching the payload
previously bundled by marketplace PR #5. It is immutable and published, so the
catalog cannot fall back to the pre-fix standalone `main` while that PR is open.

## License

MIT

Source verification compares every file's bytes and executable mode with the
pinned Git tree, independently of the index, ignore rules, replacement refs,
and fsmonitor hooks. Unexpected files (including ignored import shadows),
symlinks, and special files fail before package tests execute. Provided checkouts
must be pristine; use the default temporary checkout when a developer checkout
contains generated files. Delegated checks use a temporary home and omit parent
credentials, Python/shell startup overrides, and ATC session settings. The shared
canonical driver covers both fresh installation and upgrade from a bundled
`0.1.0` fixture. These checks validate catalog selection and the MCP launch
boundary; they are not a sandbox for arbitrary package code or a live ATC
registry acceptance test. Python 3.11 or newer is required.
36 changes: 0 additions & 36 deletions plugins/gitkb/.codex-plugin/plugin.json

This file was deleted.

20 changes: 0 additions & 20 deletions plugins/gitkb/.mcp.json

This file was deleted.

21 changes: 0 additions & 21 deletions plugins/gitkb/LICENSE

This file was deleted.

86 changes: 0 additions & 86 deletions plugins/gitkb/README.md

This file was deleted.

Loading
Loading