Skip to content

Commit 96f94f9

Browse files
committed
Prepare for 1.2.0 release
1 parent b2949ad commit 96f94f9

3 files changed

Lines changed: 11 additions & 35 deletions

File tree

CHANGELOG.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,22 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/) and this
88

99
### Added
1010

11-
- Gemini-format hook config at repo-root `hooks/hooks.json` (`BeforeTool` guards on `run_shell_command` for generic `cpln secret create` and `cpln apply` missing `--file`). Gemini auto-discovers it; Claude and Codex never see it because their plugin root now resolves to `plugins/cpln/`.
11+
- Gemini `SessionStart` hook at repo-root `hooks/hooks.json` that injects the same `alwaysApply: true` rules every Claude and Codex session already receives. Uses Gemini's `${extensionPath}` config-time variable to reach `plugins/cpln/rules/`, and emits the standard `hookSpecificOutput.additionalContext` shape Gemini's hooks docs describe. All three runtimes now do rule injection from one source via one schema.
12+
- Marketplace-level `description` field in `.claude-plugin/marketplace.json`.
1213

1314
### Changed
1415

15-
- **Repo restructured.** All Claude + Codex plugin content (skills, agents, commands, rules, references, assets, hooks, `.claude-plugin/plugin.json`, `.codex-plugin/`, `.claude-mcp.json`, `.app.json`) moved into `plugins/cpln/`. Marketplaces (`.claude-plugin/marketplace.json`, `.agents/plugins/marketplace.json`) now point at `plugins/cpln`. Gemini extension manifest, marketplace JSONs, and contributor docs stay at repo root. Existing install commands are unchanged; users get the new layout on their next `/plugin upgrade` or marketplace re-add.
16-
- Claude + Codex hooks now ship in `plugins/cpln/hooks/cpln-hooks.json` and are declared explicitly via the `hooks` field in each plugin manifest, replacing the auto-discovered default path.
16+
- **Repo restructured into `plugins/cpln/`.** All Claude + Codex plugin content (skills, agents, commands, rules, references, assets, hooks, plugin manifests, MCP configs) moved into `plugins/cpln/`; marketplaces, the Gemini extension manifest, and contributor docs stay at repo root. End-user install commands are unchanged — `/plugin upgrade` and `codex plugin marketplace upgrade` re-resolve automatically. Claude + Codex hooks now live in `plugins/cpln/hooks/cpln-hooks.json` and are declared via each plugin manifest's `hooks` field, freeing the default `hooks/hooks.json` path at the repo root for Gemini's auto-discovery.
1717

1818
### Fixed
1919

20+
- Codex plugin install failing silently with `"local plugin source path must not be empty"`. `.agents/plugins/marketplace.json` source previously declared `path: "./"`, which Codex's path validator rejects, causing the plugin to be dropped on every session so `/plugins` never listed it.
21+
- Codex `defaultPrompt` warning. `interface.defaultPrompt` had 4 entries (Codex max is 3) and was being ignored wholesale; trimmed to 3.
22+
2023
### Removed
2124

25+
- Claude + Codex `PreToolUse` Bash guards that denied generic `cpln secret create` (no type-specific subcommand) and `cpln apply` without `--file`. They caught syntax mistakes the `cpln` CLI itself already rejects with clear errors, so the deny-message added little over the CLI's own output — and the same guidance is now injected upfront via the SessionStart rule content. No corresponding Gemini `BeforeTool` guards shipped (they were drafted then removed in the same release).
26+
2227
## [1.1.0] - 2026-05-11
2328

2429
### Added

hooks/hooks.json

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,12 @@
11
{
22
"hooks": {
3-
"BeforeTool": [
3+
"SessionStart": [
44
{
5-
"matcher": "run_shell_command",
5+
"matcher": "*",
66
"hooks": [
77
{
88
"type": "command",
9-
"command": "command -v jq >/dev/null 2>&1 || { echo 'cpln plugin: BeforeTool cpln-secret-create guard skipped (jq not installed)' >&2; exit 0; }; input=$(cat); cmd=$(echo \"$input\" | jq -r '.tool_input.command // empty'); if echo \"$cmd\" | grep -qE 'cpln\\s+secret\\s+create\\b' && ! echo \"$cmd\" | grep -qE 'cpln\\s+secret\\s+create-'; then jq -nc '{decision:\"deny\",reason:\"Use type-specific secret commands (cpln secret create-opaque, create-aws, create-tls, etc.). Generic `cpln secret create` does not exist.\"}'; exit 0; fi"
10-
}
11-
]
12-
},
13-
{
14-
"matcher": "run_shell_command",
15-
"hooks": [
16-
{
17-
"type": "command",
18-
"command": "command -v jq >/dev/null 2>&1 || { echo 'cpln plugin: BeforeTool cpln-apply guard skipped (jq not installed)' >&2; exit 0; }; input=$(cat); cmd=$(echo \"$input\" | jq -r '.tool_input.command // empty'); if echo \"$cmd\" | grep -qE 'cpln\\s+apply' && ! echo \"$cmd\" | grep -qE -e '--file|-f\\b'; then jq -nc '{decision:\"deny\",reason:\"cpln apply requires --file flag. Usage: cpln apply --file manifest.yaml\"}'; exit 0; fi"
9+
"command": "command -v jq >/dev/null 2>&1 || { echo 'cpln plugin: SessionStart rule injection skipped (jq not installed)' >&2; exit 0; }; R=\"${extensionPath}/plugins/cpln\"; ctx=\"\"; for f in \"$R\"/rules/*.md; do [ -f \"$f\" ] || continue; if sed -n '/^---$/,/^---$/p' \"$f\" | grep -qE '^alwaysApply:[[:space:]]*true[[:space:]]*$'; then ctx=\"$ctx$(cat \"$f\")\"$'\\n'; fi; done; [ -z \"$ctx\" ] && exit 0; jq -nc --arg c \"$ctx\" '{hookSpecificOutput:{hookEventName:\"SessionStart\",additionalContext:$c}}'"
1910
}
2011
]
2112
}

plugins/cpln/hooks/cpln-hooks.json

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -11,26 +11,6 @@
1111
}
1212
]
1313
}
14-
],
15-
"PreToolUse": [
16-
{
17-
"matcher": "Bash",
18-
"hooks": [
19-
{
20-
"type": "command",
21-
"command": "command -v jq >/dev/null 2>&1 || { echo 'cpln plugin: PreToolUse Bash guard skipped (jq not installed)' >&2; exit 0; }; input=$(cat); cmd=$(echo \"$input\" | jq -r '.tool_input.command // empty'); if echo \"$cmd\" | grep -qE 'cpln\\s+secret\\s+create\\b' && ! echo \"$cmd\" | grep -qE 'cpln\\s+secret\\s+create-'; then echo 'BLOCK: Use type-specific secret commands (cpln secret create-opaque, create-aws, create-tls, etc.). Generic cpln secret create does not exist.' >&2; exit 1; fi"
22-
}
23-
]
24-
},
25-
{
26-
"matcher": "Bash",
27-
"hooks": [
28-
{
29-
"type": "command",
30-
"command": "command -v jq >/dev/null 2>&1 || { echo 'cpln plugin: PreToolUse Bash guard skipped (jq not installed)' >&2; exit 0; }; input=$(cat); cmd=$(echo \"$input\" | jq -r '.tool_input.command // empty'); if echo \"$cmd\" | grep -qE 'cpln\\s+apply' && ! echo \"$cmd\" | grep -qE -e '--file|-f\\b'; then echo 'BLOCK: cpln apply requires --file flag. Usage: cpln apply --file manifest.yaml' >&2; exit 1; fi"
31-
}
32-
]
33-
}
3414
]
3515
}
3616
}

0 commit comments

Comments
 (0)