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
4 changes: 2 additions & 2 deletions .claude-plugin/marketplace.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@
"source": {
"source": "npm",
"package": "@ruddercode/rudder-plugin",
"version": "0.1.4",
"version": "0.1.5",
"registry": "https://registry.npmjs.org"
},
"description": "Generate focused unit tests from coding-session intent and worktree changes using your existing coding agent.",
"version": "0.1.4",
"version": "0.1.5",
"author": {
"name": "RudderCode",
"email": "vivek@archermoney.com"
Expand Down
5 changes: 2 additions & 3 deletions .claude-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "rudder",
"version": "0.1.4",
"version": "0.1.5",
"description": "Generate focused unit tests from coding-session intent and worktree changes using your existing coding agent.",
"author": {
"name": "Vivek Yanamadula",
Expand All @@ -17,6 +17,5 @@
"coverage"
],
"skills": "./skills/",
"mcpServers": "./.claude-mcp.json",
"hooks": "./hooks/hooks.json"
"mcpServers": "./.claude-mcp.json"
}
2 changes: 1 addition & 1 deletion .codex-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "rudder",
"version": "0.1.4",
"version": "0.1.5",
"description": "Generate focused unit tests from coding-session intent and worktree changes using your existing coding agent.",
"author": {
"name": "Vivek Yanamadula",
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ruddercode/rudder-plugin",
"version": "0.1.4",
"version": "0.1.5",
"description": "Generate focused unit tests from coding-session intent and worktree changes.",
"type": "module",
"engines": {
Expand Down
27 changes: 25 additions & 2 deletions test/plugin-package.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
import assert from 'node:assert/strict';
import { execFileSync } from 'node:child_process';
import { mkdirSync, mkdtempSync, readFileSync, rmSync, writeFileSync } from 'node:fs';
import {
existsSync,
mkdirSync,
mkdtempSync,
readFileSync,
rmSync,
writeFileSync,
} from 'node:fs';
import { tmpdir } from 'node:os';
import { join } from 'node:path';
import { after, before, test } from 'node:test';
Expand Down Expand Up @@ -64,7 +71,6 @@ test('ships matching Codex and Claude plugin metadata', () => {
assert.equal(claude.mcpServers, './.claude-mcp.json');
assert.equal(codex.mcpServers, './.mcp.json');
assert.ok(codex.interface.capabilities.includes('Interactive'));
assert.equal(claude.hooks, './hooks/hooks.json');
assert.ok(codex.interface.shortDescription.length <= 30);
assert.match(codex.interface.privacyPolicyURL, /^https:\/\//);
assert.match(codex.interface.termsOfServiceURL, /^https:\/\//);
Expand Down Expand Up @@ -268,6 +274,23 @@ test('keeps the release PostHog host explicit', () => {
);
});

test('leaves plugin hooks at the path both hosts discover on their own', () => {
const claude = JSON.parse(
readFileSync(join(pluginRoot, '.claude-plugin', 'plugin.json'), 'utf8')
);
const codex = JSON.parse(
readFileSync(join(pluginRoot, '.codex-plugin', 'plugin.json'), 'utf8')
);

// Claude Code and Codex both load hooks/hooks.json from the plugin root without being
// told to. A manifest that names that same path registers the file a second time:
// Claude Code 2.0.60 and later fail the plugin with a duplicate hooks error, and earlier
// releases run every hook twice. Only non-default hook files belong in `hooks`.
assert.ok(existsSync(join(pluginRoot, 'hooks', 'hooks.json')));
assert.equal(claude.hooks, undefined);
assert.equal(codex.hooks, undefined);
});

test('registers prompt submission and stop hooks from the plugin root', () => {
const config = JSON.parse(
readFileSync(join(pluginRoot, 'hooks', 'hooks.json'), 'utf8')
Expand Down
Loading