mirror of
https://github.com/kochetkov-ma/claude-brewcode.git
synced 2026-09-14 20:16:41 +08:00
v3.18.2: brewui -- remove dead hooks (no manifest registration, no skills/agents); docs scrubbed
This commit is contained in:
@@ -6,13 +6,13 @@
|
||||
},
|
||||
"metadata": {
|
||||
"description": "Claude Code plugin suite: brewcode for infinite task execution, brewdoc for documentation tools, brewtools for text utilities, brewui for UI/visual/creative tools",
|
||||
"version": "3.18.1"
|
||||
"version": "3.18.2"
|
||||
},
|
||||
"plugins": [
|
||||
{
|
||||
"name": "brewcode",
|
||||
"description": "Brewcode - full-featured development platform for Claude Code: infinite focus tasks, prompt optimization, skill/agent creation, quorum reviews, rules management",
|
||||
"version": "3.18.1",
|
||||
"version": "3.18.2",
|
||||
"category": "productivity",
|
||||
"keywords": [
|
||||
"brewcode",
|
||||
@@ -46,7 +46,7 @@
|
||||
{
|
||||
"name": "brewdoc",
|
||||
"description": "Brewdoc - Claude Code documentation tools: auto-sync for skills/agents/rules, my-claude installation docs, memory optimization, md-to-pdf conversion",
|
||||
"version": "3.18.1",
|
||||
"version": "3.18.2",
|
||||
"category": "productivity",
|
||||
"keywords": [
|
||||
"brewdoc",
|
||||
@@ -74,7 +74,7 @@
|
||||
{
|
||||
"name": "brewtools",
|
||||
"description": "Brewtools - universal utilities for Claude Code: text optimization, humanization, secrets scanning",
|
||||
"version": "3.18.1",
|
||||
"version": "3.18.2",
|
||||
"category": "productivity",
|
||||
"keywords": [
|
||||
"brewtools",
|
||||
@@ -102,7 +102,7 @@
|
||||
{
|
||||
"name": "brewui",
|
||||
"description": "Placeholder for future UI/visual/creative tools (currently empty, installable)",
|
||||
"version": "3.18.1",
|
||||
"version": "3.18.2",
|
||||
"category": "productivity",
|
||||
"keywords": [
|
||||
"ui",
|
||||
|
||||
@@ -2,6 +2,19 @@
|
||||
|
||||
---
|
||||
|
||||
## v3.18.2 (2026-06-27)
|
||||
|
||||
> Docs: [brewui overview](https://doc-claude.brewcode.app/brewui/overview/)
|
||||
|
||||
Brewui no longer ships any hooks -- they were dead weight (brewui has no skills/agents and never registered hooks in its manifest).
|
||||
|
||||
### brewui
|
||||
|
||||
#### Removed
|
||||
- **hooks:** deleted the entire `brewui/hooks/` directory (`hooks.json`, `session-start.mjs`, `pre-task.mjs`, `lib/utils.mjs`). brewui registered no hooks in `plugin.json`, so these files were inert. `BU_PLUGIN_ROOT` is no longer injected (nothing consumed it). Docs scrubbed accordingly (brewui overview, brewui skills page, brewdoc guide hook catalog).
|
||||
|
||||
---
|
||||
|
||||
## v3.18.1 (2026-06-27)
|
||||
|
||||
> Docs: [brewtools prompt-injection](https://doc-claude.brewcode.app/brewtools/prompt-injection/)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "brewcode",
|
||||
"version": "3.18.1",
|
||||
"version": "3.18.2",
|
||||
"description": "Brewcode - full-featured development platform for Claude Code: infinite focus tasks, prompt optimization, skill/agent creation, quorum reviews, rules management",
|
||||
"author": {
|
||||
"name": "Maksim Kochetkov",
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@
|
||||
|
||||
| Field | Value |
|
||||
|-------|-------|
|
||||
| Version | 3.18.1 |
|
||||
| Version | 3.18.2 |
|
||||
| Skills | 13 |
|
||||
| Agents | 12 |
|
||||
| Hooks | 9 |
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "claude-plugin-brewcode",
|
||||
"version": "3.18.1",
|
||||
"version": "3.18.2",
|
||||
"description": "Infinite task execution with automatic handoff for Claude Code",
|
||||
"keywords": [
|
||||
"claude-code",
|
||||
@@ -36,6 +36,6 @@
|
||||
},
|
||||
"claude-plugin": {
|
||||
"name": "brewcode",
|
||||
"version": "3.18.1"
|
||||
"version": "3.18.2"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "brewdoc",
|
||||
"version": "3.18.1",
|
||||
"version": "3.18.2",
|
||||
"description": "Brewdoc - Claude Code documentation tools: auto-sync for skills/agents/rules, my-claude installation docs, memory optimization",
|
||||
"author": {
|
||||
"name": "Maksim Kochetkov",
|
||||
|
||||
@@ -121,13 +121,6 @@ Response channels: `additionalContext` (inject text), `updatedInput` (PreToolUse
|
||||
| `pre-task.mjs` | PreToolUse:Task\|Agent | Injects `BT_PLUGIN_ROOT` into subagent prompts |
|
||||
| `manager-prompt.mjs` | UserPromptSubmit | Injects Manager prompt on ++m/++mp codeword |
|
||||
|
||||
**brewui (2):**
|
||||
|
||||
| Hook | Event | Purpose |
|
||||
|------|-------|---------|
|
||||
| `session-start.mjs` | SessionStart | Sets `BU_PLUGIN_ROOT`, session bootstrap |
|
||||
| `pre-task.mjs` | PreToolUse:Task\|Agent | Injects `BU_PLUGIN_ROOT` into subagent prompts |
|
||||
|
||||
**brewdoc (1):**
|
||||
|
||||
| Hook | Event | Purpose |
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "brewtools",
|
||||
"version": "3.18.1",
|
||||
"version": "3.18.2",
|
||||
"description": "Brewtools - universal utilities for Claude Code: text optimization, humanization, secrets scanning",
|
||||
"author": {
|
||||
"name": "Maksim Kochetkov",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "brewui",
|
||||
"version": "3.18.1",
|
||||
"version": "3.18.2",
|
||||
"description": "Brewui -- placeholder for future UI/visual/creative tools",
|
||||
"author": {
|
||||
"name": "Maksim Kochetkov",
|
||||
|
||||
+1
-6
@@ -40,7 +40,7 @@ Update anytime with `/brewtools:plugin-update`.
|
||||
|
||||
## Overview
|
||||
|
||||
Brewui is a placeholder plugin for future UI/visual/creative tools. It currently ships no skills or agents, but installs cleanly and registers its hooks so it can be wired into your suite ahead of time. Content will be added in a future release.
|
||||
Brewui is a placeholder plugin for future UI/visual/creative tools. It currently ships no skills, agents, or hooks, but installs cleanly so it can be wired into your suite ahead of time. Content will be added in a future release.
|
||||
|
||||
## Installation
|
||||
|
||||
@@ -67,11 +67,6 @@ No skills yet -- coming soon. Brewui is an empty placeholder; the `/brewui:*` co
|
||||
brewui/
|
||||
├── .claude-plugin/
|
||||
│ └── plugin.json # Plugin manifest
|
||||
├── hooks/
|
||||
│ ├── hooks.json # Hook registry
|
||||
│ ├── session-start.mjs # BU_PLUGIN_ROOT injection
|
||||
│ ├── pre-task.mjs # BU_PLUGIN_ROOT into subagents
|
||||
│ └── lib/utils.mjs # I/O utilities
|
||||
├── skills/ # Empty -- placeholder for future tools
|
||||
└── README.md
|
||||
```
|
||||
|
||||
@@ -1,29 +0,0 @@
|
||||
{
|
||||
"hooks": {
|
||||
"PreToolUse": [
|
||||
{
|
||||
"matcher": "Task|Agent",
|
||||
"hooks": [
|
||||
{
|
||||
"type": "command",
|
||||
"command": "node",
|
||||
"args": ["${CLAUDE_PLUGIN_ROOT}/hooks/pre-task.mjs"],
|
||||
"timeout": 3000
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"SessionStart": [
|
||||
{
|
||||
"hooks": [
|
||||
{
|
||||
"type": "command",
|
||||
"command": "node",
|
||||
"args": ["${CLAUDE_PLUGIN_ROOT}/hooks/session-start.mjs"],
|
||||
"timeout": 2000
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -1,86 +0,0 @@
|
||||
/**
|
||||
* Shared utilities for brewui hooks
|
||||
*/
|
||||
import { existsSync, mkdirSync, appendFileSync, readFileSync } from 'fs';
|
||||
import { dirname, join } from 'path';
|
||||
|
||||
/**
|
||||
* Read JSON from stdin
|
||||
* @returns {Promise<Object>} Parsed JSON input
|
||||
*/
|
||||
export async function readStdin() {
|
||||
const chunks = [];
|
||||
for await (const chunk of process.stdin) {
|
||||
chunks.push(chunk);
|
||||
}
|
||||
const input = Buffer.concat(chunks).toString('utf8');
|
||||
try {
|
||||
return JSON.parse(input);
|
||||
} catch (e) {
|
||||
throw new Error(`Invalid stdin JSON: ${e.message}. Input: ${input.substring(0, 100)}`);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Output hook response as JSON to stdout
|
||||
* @param {Object} response - Hook response object
|
||||
*/
|
||||
export function output(response) {
|
||||
try {
|
||||
console.log(JSON.stringify(response));
|
||||
} catch (e) {
|
||||
console.error(`[output] Serialization failed: ${e.message}`);
|
||||
console.log(JSON.stringify({ error: `Serialization failed: ${e.message}` }));
|
||||
}
|
||||
}
|
||||
|
||||
const LOG_LEVELS = { error: 0, warn: 1, info: 2, debug: 3, trace: 4 };
|
||||
const LOG_FILE = '.claude/logs/brewui.log';
|
||||
const LOG_CONFIG = '.claude/tasks/cfg/brewcode.config.json';
|
||||
const DEFAULT_LEVEL = 'info';
|
||||
|
||||
let _cachedLevel = null;
|
||||
function getLevel(cwd) {
|
||||
if (_cachedLevel) return _cachedLevel;
|
||||
const env = (process.env.BREWCODE_LOG_LEVEL || '').toLowerCase();
|
||||
if (env in LOG_LEVELS) { _cachedLevel = env; return env; }
|
||||
if (cwd) {
|
||||
try {
|
||||
const cfg = JSON.parse(readFileSync(join(cwd, LOG_CONFIG), 'utf8'));
|
||||
const lvl = cfg.logging?.level;
|
||||
if (lvl && lvl in LOG_LEVELS) { _cachedLevel = lvl; return lvl; }
|
||||
} catch {}
|
||||
}
|
||||
_cachedLevel = DEFAULT_LEVEL;
|
||||
return DEFAULT_LEVEL;
|
||||
}
|
||||
|
||||
/**
|
||||
* Log message to file and stderr
|
||||
*/
|
||||
export function log(level, prefix, message, cwd, sessionId = null) {
|
||||
if (!cwd) {
|
||||
if (level === 'error') console.error(`${prefix} ${message}`);
|
||||
return;
|
||||
}
|
||||
if (LOG_LEVELS[level] > LOG_LEVELS[getLevel(cwd)]) return;
|
||||
console.error(`${prefix} ${message}`);
|
||||
|
||||
const timestamp = new Date().toISOString();
|
||||
const levelTag = level.toUpperCase().padEnd(5);
|
||||
const sessionTag = (typeof sessionId === 'string' && sessionId)
|
||||
? `[${sessionId.slice(0, 8)}] `
|
||||
: '';
|
||||
const line = `${timestamp} ${levelTag} ${sessionTag}${prefix} ${message}`;
|
||||
|
||||
try {
|
||||
const logPath = join(cwd, LOG_FILE);
|
||||
const logDir = dirname(logPath);
|
||||
if (!existsSync(logDir)) {
|
||||
mkdirSync(logDir, { recursive: true });
|
||||
}
|
||||
appendFileSync(logPath, line + '\n');
|
||||
} catch {
|
||||
// Ignore file write errors
|
||||
}
|
||||
}
|
||||
@@ -1,54 +0,0 @@
|
||||
#!/usr/bin/env node
|
||||
/**
|
||||
* PreToolUse hook for Task|Agent tools
|
||||
* Injects BU_PLUGIN_ROOT into sub-agent prompts
|
||||
*/
|
||||
import { readStdin, output, log } from './lib/utils.mjs';
|
||||
|
||||
async function main() {
|
||||
let cwd = null;
|
||||
let session_id = null;
|
||||
|
||||
try {
|
||||
cwd = process.cwd();
|
||||
const input = await readStdin();
|
||||
session_id = input.session_id;
|
||||
cwd = input.cwd || cwd;
|
||||
const tool_input = input.tool_input;
|
||||
|
||||
if (!tool_input || !tool_input.subagent_type) {
|
||||
output({});
|
||||
return;
|
||||
}
|
||||
|
||||
let updatedPrompt = tool_input.prompt || '';
|
||||
let modified = false;
|
||||
|
||||
const pluginRoot = process.env.CLAUDE_PLUGIN_ROOT || '';
|
||||
if (pluginRoot) {
|
||||
updatedPrompt = `BU_PLUGIN_ROOT=${pluginRoot}\n\n${updatedPrompt}`;
|
||||
modified = true;
|
||||
log('debug', '[pre-task]', `Injected BU_PLUGIN_ROOT for ${tool_input.subagent_type}`, cwd, session_id);
|
||||
}
|
||||
|
||||
if (modified) {
|
||||
output({
|
||||
hookSpecificOutput: {
|
||||
hookEventName: 'PreToolUse',
|
||||
permissionDecision: 'allow',
|
||||
updatedInput: {
|
||||
...tool_input,
|
||||
prompt: updatedPrompt
|
||||
}
|
||||
}
|
||||
});
|
||||
} else {
|
||||
output({});
|
||||
}
|
||||
} catch (error) {
|
||||
log('error', '[pre-task]', `Error: ${error.message}`, cwd, session_id);
|
||||
output({});
|
||||
}
|
||||
}
|
||||
|
||||
main();
|
||||
@@ -1,36 +0,0 @@
|
||||
#!/usr/bin/env node
|
||||
import { readStdin, output, log } from './lib/utils.mjs';
|
||||
|
||||
async function main() {
|
||||
let cwd = null;
|
||||
let session_id = null;
|
||||
try {
|
||||
cwd = process.cwd();
|
||||
const input = await readStdin();
|
||||
session_id = input.session_id;
|
||||
cwd = input.cwd || cwd;
|
||||
|
||||
const pluginRoot = process.env.CLAUDE_PLUGIN_ROOT || '';
|
||||
const sessionShort = session_id?.slice(0, 8) || 'unknown';
|
||||
const permMode = input.permission_mode; // doc-verified common field (HOOKS-REFERENCE.md 2.1.195)
|
||||
|
||||
const context = pluginRoot
|
||||
? `BU_PLUGIN_ROOT=${pluginRoot}`
|
||||
: `brewui: ${sessionShort}`;
|
||||
|
||||
// systemMessage is fixed-shape (plugin path + 8-char sid + short perm enum) -> well under
|
||||
// the 10K text-channel spill threshold; no capText needed.
|
||||
output({
|
||||
systemMessage: `brewui: ${pluginRoot} | session: ${sessionShort}${permMode ? ` | perm: ${permMode}` : ''}`,
|
||||
hookSpecificOutput: {
|
||||
hookEventName: 'SessionStart',
|
||||
additionalContext: context
|
||||
}
|
||||
});
|
||||
} catch (error) {
|
||||
log('error', '[session-start]', `Error: ${error.message}`, cwd, session_id);
|
||||
output({});
|
||||
}
|
||||
}
|
||||
|
||||
main();
|
||||
@@ -9,7 +9,7 @@ import { Card, CardGrid, Callout, InstallPrompt } from '../../../components/mdx'
|
||||
# Brewui Overview
|
||||
|
||||
Brewui is a placeholder plugin for future UI/visual/creative tools. It currently ships
|
||||
no skills or agents, but it is fully installable and registers its hooks, so it can be
|
||||
no skills, agents, or hooks, but it is fully installable, so it can be
|
||||
wired into your suite ahead of time. Content will be added in a future release.
|
||||
|
||||
## Installation
|
||||
@@ -21,7 +21,7 @@ Install the entire suite:
|
||||
<InstallPrompt plugin="all" mode="install" />
|
||||
|
||||
<Callout type="note" title="Currently empty">
|
||||
Brewui installs cleanly and registers its hooks, but ships no skills or agents yet.
|
||||
Brewui installs cleanly but ships no skills, agents, or hooks yet.
|
||||
Installing it now is safe; tools will appear here in a future release.
|
||||
</Callout>
|
||||
|
||||
@@ -29,22 +29,12 @@ Install the entire suite:
|
||||
|
||||
No skills yet -- coming soon.
|
||||
|
||||
## Plugin variable
|
||||
|
||||
`BU_PLUGIN_ROOT` -- injected by the SessionStart hook into every session context.
|
||||
Subagents use `$BU_PLUGIN_ROOT` to locate plugin resources once skills are added.
|
||||
|
||||
## Architecture
|
||||
|
||||
```
|
||||
brewui/
|
||||
├── .claude-plugin/
|
||||
│ └── plugin.json # Plugin manifest
|
||||
├── hooks/
|
||||
│ ├── hooks.json # Hook registry
|
||||
│ ├── session-start.mjs # BU_PLUGIN_ROOT injection
|
||||
│ ├── pre-task.mjs # BU_PLUGIN_ROOT into subagents
|
||||
│ └── lib/utils.mjs # I/O utilities
|
||||
└── skills/ # Empty -- placeholder for future tools
|
||||
```
|
||||
|
||||
|
||||
@@ -12,8 +12,8 @@ Brewui currently ships **no skills**. This plugin is a placeholder for future
|
||||
UI/visual/creative tools and installs cleanly so it can be added to your suite ahead of time.
|
||||
|
||||
<Callout type="note" title="No skills yet -- coming soon">
|
||||
Skills will appear here in a future release. Installing Brewui now is safe; it registers
|
||||
its hooks and reserves the `/brewui:*` command namespace without adding any commands yet.
|
||||
Skills will appear here in a future release. Installing Brewui now is safe; it reserves
|
||||
the `/brewui:*` command namespace without adding any commands yet.
|
||||
</Callout>
|
||||
|
||||
<CardGrid>
|
||||
|
||||
Reference in New Issue
Block a user