@aladac/hu 0.1.0-a1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.tool-versions +1 -0
- package/CLAUDE.md +122 -0
- package/HOOKS-DATA-INTEGRATION.md +457 -0
- package/SAMPLE.md +378 -0
- package/TODO.md +25 -0
- package/biome.json +51 -0
- package/commands/bootstrap.md +13 -0
- package/commands/c.md +1 -0
- package/commands/check-name.md +62 -0
- package/commands/disk.md +141 -0
- package/commands/docs/archive.md +27 -0
- package/commands/docs/check-internal.md +53 -0
- package/commands/docs/cleanup.md +65 -0
- package/commands/docs/consolidate.md +72 -0
- package/commands/docs/get.md +101 -0
- package/commands/docs/list.md +61 -0
- package/commands/docs/sync.md +64 -0
- package/commands/docs/update.md +49 -0
- package/commands/plans/clear.md +23 -0
- package/commands/plans/create.md +71 -0
- package/commands/plans/list.md +21 -0
- package/commands/plans/sync.md +38 -0
- package/commands/reinstall.md +20 -0
- package/commands/replicate.md +303 -0
- package/commands/warp.md +0 -0
- package/doc/README.md +35 -0
- package/doc/claude-code/capabilities.md +202 -0
- package/doc/claude-code/directory-structure.md +246 -0
- package/doc/claude-code/hooks.md +348 -0
- package/doc/claude-code/overview.md +109 -0
- package/doc/claude-code/plugins.md +273 -0
- package/doc/claude-code/sdk-protocols.md +202 -0
- package/document-manifest.toml +29 -0
- package/justfile +39 -0
- package/package.json +33 -0
- package/plans/compiled-watching-feather.md +217 -0
- package/plans/crispy-crafting-pnueli.md +103 -0
- package/plans/greedy-booping-coral.md +146 -0
- package/plans/imperative-sleeping-flamingo.md +192 -0
- package/plans/jaunty-sprouting-marble.md +171 -0
- package/plans/jiggly-discovering-lake.md +68 -0
- package/plans/magical-nibbling-spark.md +144 -0
- package/plans/mellow-kindling-acorn.md +110 -0
- package/plans/recursive-questing-engelbart.md +65 -0
- package/plans/serialized-roaming-kernighan.md +227 -0
- package/plans/structured-wondering-wirth.md +230 -0
- package/plans/vectorized-dreaming-iverson.md +191 -0
- package/plans/velvety-enchanting-ocean.md +92 -0
- package/plans/wiggly-sparking-pixel.md +48 -0
- package/plans/zippy-shimmying-fox.md +188 -0
- package/plugins/installed_plugins.json +4 -0
- package/sample-hooks.json +298 -0
- package/settings.json +24 -0
- package/settings.local.json +7 -0
- package/src/commands/bump.ts +130 -0
- package/src/commands/disk.ts +419 -0
- package/src/commands/docs.ts +729 -0
- package/src/commands/plans.ts +259 -0
- package/src/commands/utils.ts +299 -0
- package/src/index.ts +26 -0
- package/src/lib/colors.ts +87 -0
- package/src/lib/exec.ts +25 -0
- package/src/lib/fs.ts +119 -0
- package/src/lib/html.ts +205 -0
- package/src/lib/spinner.ts +42 -0
- package/src/types/index.ts +61 -0
- package/tests/lib/colors.test.ts +69 -0
- package/tests/lib/fs.test.ts +65 -0
- package/tsconfig.json +20 -0
- package/vitest.config.ts +15 -0
|
@@ -0,0 +1,273 @@
|
|
|
1
|
+
---
|
|
2
|
+
source: https://code.claude.com/docs/en/plugins
|
|
3
|
+
fetched: 2026-01-13
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Claude Code Plugins
|
|
7
|
+
|
|
8
|
+
Plugins extend Claude Code with custom slash commands, agents, hooks, Skills, and MCP servers. They can be shared across projects and teams through marketplaces.
|
|
9
|
+
|
|
10
|
+
## When to Use Plugins vs Standalone
|
|
11
|
+
|
|
12
|
+
| Approach | Command Names | Best For |
|
|
13
|
+
|----------|---------------|----------|
|
|
14
|
+
| **Standalone** (`.claude/` directory) | `/hello` | Personal workflows, project-specific, quick experiments |
|
|
15
|
+
| **Plugins** (`.claude-plugin/plugin.json`) | `/plugin-name:hello` | Team sharing, community distribution, reusable across projects |
|
|
16
|
+
|
|
17
|
+
**Use standalone** when customizing for a single project, personal use, experimenting, or wanting short command names.
|
|
18
|
+
|
|
19
|
+
**Use plugins** when sharing with teams/community, needing the same commands across projects, wanting version control, or distributing through marketplaces.
|
|
20
|
+
|
|
21
|
+
Start with standalone in `.claude/` for quick iteration, then convert to a plugin when ready to share.
|
|
22
|
+
|
|
23
|
+
## Installation
|
|
24
|
+
|
|
25
|
+
### Using the /plugin Command
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
# Add a marketplace first
|
|
29
|
+
/plugin marketplace add user-or-org/repo-name
|
|
30
|
+
|
|
31
|
+
# Then browse and install plugins
|
|
32
|
+
/plugin
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
### Community CLI Tool
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
npx claude-plugins install @anthropics/claude-code-plugins/frontend-design
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
Requires Claude Code v1.0.33 or higher.
|
|
42
|
+
|
|
43
|
+
## Creating Plugins
|
|
44
|
+
|
|
45
|
+
### Quickstart
|
|
46
|
+
|
|
47
|
+
1. **Create the plugin directory:**
|
|
48
|
+
```bash
|
|
49
|
+
mkdir my-plugin
|
|
50
|
+
mkdir my-plugin/.claude-plugin
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
2. **Create the manifest** (`my-plugin/.claude-plugin/plugin.json`):
|
|
54
|
+
```json
|
|
55
|
+
{
|
|
56
|
+
"name": "my-plugin",
|
|
57
|
+
"description": "A greeting plugin to learn the basics",
|
|
58
|
+
"version": "1.0.0",
|
|
59
|
+
"author": {
|
|
60
|
+
"name": "Your Name"
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
3. **Add a slash command** (`my-plugin/commands/hello.md`):
|
|
66
|
+
```markdown
|
|
67
|
+
---
|
|
68
|
+
description: Greet the user with a friendly message
|
|
69
|
+
---
|
|
70
|
+
|
|
71
|
+
# Hello Command
|
|
72
|
+
|
|
73
|
+
Greet the user named "$ARGUMENTS" warmly and ask how you can help them today.
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
4. **Test your plugin:**
|
|
77
|
+
```bash
|
|
78
|
+
claude --plugin-dir ./my-plugin
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
Then run `/my-plugin:hello Alex`.
|
|
82
|
+
|
|
83
|
+
## Plugin Structure
|
|
84
|
+
|
|
85
|
+
```
|
|
86
|
+
my-plugin/
|
|
87
|
+
├── .claude-plugin/
|
|
88
|
+
│ └── plugin.json # Required: plugin metadata
|
|
89
|
+
├── commands/ # Slash commands
|
|
90
|
+
│ └── hello.md
|
|
91
|
+
├── agents/ # Custom agent definitions
|
|
92
|
+
├── skills/ # Agent Skills
|
|
93
|
+
│ └── skill-name/
|
|
94
|
+
│ └── SKILL.md
|
|
95
|
+
├── hooks/ # Event handlers
|
|
96
|
+
│ └── hooks.json
|
|
97
|
+
├── .mcp.json # MCP server configurations
|
|
98
|
+
├── .lsp.json # LSP server configurations
|
|
99
|
+
└── README.md # Documentation
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
**Important:** Don't put `commands/`, `agents/`, `skills/`, or `hooks/` inside `.claude-plugin/`. Only `plugin.json` goes there.
|
|
103
|
+
|
|
104
|
+
## Plugin Components
|
|
105
|
+
|
|
106
|
+
### Slash Commands
|
|
107
|
+
|
|
108
|
+
Create Markdown files in `commands/`. The filename becomes the command name, prefixed with the plugin namespace:
|
|
109
|
+
|
|
110
|
+
```markdown
|
|
111
|
+
---
|
|
112
|
+
description: Description shown in command menu
|
|
113
|
+
---
|
|
114
|
+
|
|
115
|
+
# Command Title
|
|
116
|
+
|
|
117
|
+
Your prompt instructions here. Use $ARGUMENTS for user input.
|
|
118
|
+
Use $1, $2 for individual parameters.
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
### Agent Skills <!-- updated: 2026-01-13 -->
|
|
122
|
+
|
|
123
|
+
Skills are model-invoked capabilities that Claude automatically uses based on task context. Create `skills/skill-name/SKILL.md`:
|
|
124
|
+
|
|
125
|
+
```markdown
|
|
126
|
+
---
|
|
127
|
+
name: code-review
|
|
128
|
+
description: Reviews code for best practices. Use when reviewing code or PRs.
|
|
129
|
+
---
|
|
130
|
+
|
|
131
|
+
When reviewing code, check for:
|
|
132
|
+
1. Code organization and structure
|
|
133
|
+
2. Error handling
|
|
134
|
+
3. Security concerns
|
|
135
|
+
4. Test coverage
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
After installing the plugin, restart Claude Code to load the Skills.
|
|
139
|
+
|
|
140
|
+
### Hooks
|
|
141
|
+
|
|
142
|
+
Create `hooks/hooks.json`:
|
|
143
|
+
|
|
144
|
+
```json
|
|
145
|
+
{
|
|
146
|
+
"hooks": {
|
|
147
|
+
"PostToolUse": [
|
|
148
|
+
{
|
|
149
|
+
"matcher": "Write|Edit",
|
|
150
|
+
"hooks": [{ "type": "command", "command": "npm run lint:fix $FILE" }]
|
|
151
|
+
}
|
|
152
|
+
]
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
### LSP Servers <!-- updated: 2026-01-13 -->
|
|
158
|
+
|
|
159
|
+
For common languages (TypeScript, Python, Rust), install pre-built LSP plugins from official marketplaces. Create custom LSP plugins only for languages not already covered.
|
|
160
|
+
|
|
161
|
+
Create `.lsp.json` for language server support:
|
|
162
|
+
|
|
163
|
+
```json
|
|
164
|
+
{
|
|
165
|
+
"go": {
|
|
166
|
+
"command": "gopls",
|
|
167
|
+
"args": ["serve"],
|
|
168
|
+
"extensionToLanguage": {
|
|
169
|
+
".go": "go"
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
Users must have the language server binary installed on their machine.
|
|
176
|
+
|
|
177
|
+
### MCP Servers
|
|
178
|
+
|
|
179
|
+
Create `.mcp.json` for external tool integration:
|
|
180
|
+
|
|
181
|
+
```json
|
|
182
|
+
{
|
|
183
|
+
"servers": {
|
|
184
|
+
"my-server": {
|
|
185
|
+
"command": "npx",
|
|
186
|
+
"args": ["my-mcp-server"]
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
## Official Plugins
|
|
193
|
+
|
|
194
|
+
| Name | Description |
|
|
195
|
+
|------|-------------|
|
|
196
|
+
| **agent-sdk-dev** | Development kit for Claude Agent SDK projects |
|
|
197
|
+
| **code-review** | Automated PR review using multiple specialized agents |
|
|
198
|
+
| **commit-commands** | Git workflow: `/commit`, `/commit-push-pr`, `/clean_gone` |
|
|
199
|
+
| **feature-dev** | 7-phase feature development with explorer, architect, reviewer agents |
|
|
200
|
+
| **frontend-design** | Create distinctive, production-grade frontend interfaces |
|
|
201
|
+
| **hookify** | Create custom hooks to prevent unwanted behaviors |
|
|
202
|
+
| **plugin-dev** | Toolkit for developing Claude Code plugins |
|
|
203
|
+
| **pr-review-toolkit** | Comprehensive PR review with 6 specialized reviewers |
|
|
204
|
+
| **security-guidance** | Security reminder hook (injection, XSS, eval, etc.) |
|
|
205
|
+
|
|
206
|
+
## Testing and Debugging
|
|
207
|
+
|
|
208
|
+
### Load During Development
|
|
209
|
+
|
|
210
|
+
```bash
|
|
211
|
+
# Single plugin
|
|
212
|
+
claude --plugin-dir ./my-plugin
|
|
213
|
+
|
|
214
|
+
# Multiple plugins
|
|
215
|
+
claude --plugin-dir ./plugin-one --plugin-dir ./plugin-two
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
### Verify Components
|
|
219
|
+
|
|
220
|
+
- Run commands with `/command-name`
|
|
221
|
+
- Check agents appear in `/agents`
|
|
222
|
+
- Verify hooks trigger correctly
|
|
223
|
+
- Use validation and debugging tools (see Plugins reference)
|
|
224
|
+
|
|
225
|
+
## Migrating Standalone to Plugin
|
|
226
|
+
|
|
227
|
+
1. Create plugin structure:
|
|
228
|
+
```bash
|
|
229
|
+
mkdir -p my-plugin/.claude-plugin
|
|
230
|
+
```
|
|
231
|
+
|
|
232
|
+
2. Create manifest (`my-plugin/.claude-plugin/plugin.json`)
|
|
233
|
+
|
|
234
|
+
3. Copy existing files:
|
|
235
|
+
```bash
|
|
236
|
+
cp -r .claude/commands my-plugin/
|
|
237
|
+
cp -r .claude/agents my-plugin/
|
|
238
|
+
cp -r .claude/skills my-plugin/
|
|
239
|
+
```
|
|
240
|
+
|
|
241
|
+
4. Migrate hooks from `.claude/settings.json` to `my-plugin/hooks/hooks.json`
|
|
242
|
+
|
|
243
|
+
5. Test with `claude --plugin-dir ./my-plugin`
|
|
244
|
+
|
|
245
|
+
## Publishing
|
|
246
|
+
|
|
247
|
+
### Plugin Manifest Optional Fields
|
|
248
|
+
|
|
249
|
+
```json
|
|
250
|
+
{
|
|
251
|
+
"name": "my-plugin",
|
|
252
|
+
"description": "Plugin description",
|
|
253
|
+
"version": "1.0.0",
|
|
254
|
+
"author": { "name": "Your Name" },
|
|
255
|
+
"homepage": "https://example.com",
|
|
256
|
+
"repository": "https://github.com/user/repo",
|
|
257
|
+
"license": "MIT",
|
|
258
|
+
"keywords": ["utility", "workflow"]
|
|
259
|
+
}
|
|
260
|
+
```
|
|
261
|
+
|
|
262
|
+
### Creating a Marketplace
|
|
263
|
+
|
|
264
|
+
To host a marketplace, create a git repository with `.claude-plugin/marketplace.json`. See the [plugin marketplaces documentation](https://code.claude.com/docs/en/plugin-marketplaces) for details.
|
|
265
|
+
|
|
266
|
+
## Resources
|
|
267
|
+
|
|
268
|
+
- [Official Plugin Docs](https://code.claude.com/docs/en/plugins)
|
|
269
|
+
- [Plugins Reference](https://code.claude.com/docs/en/plugins-reference)
|
|
270
|
+
- [Discover Plugins](https://code.claude.com/docs/en/discover-plugins)
|
|
271
|
+
- [Plugin Marketplaces](https://code.claude.com/docs/en/plugin-marketplaces)
|
|
272
|
+
- [Agent Skills](https://code.claude.com/docs/en/skills)
|
|
273
|
+
- [Anthropic Official Plugins](https://github.com/anthropics/claude-code/tree/main/plugins)
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
---
|
|
2
|
+
source: https://github.com/anthropics/claude-agent-sdk-typescript
|
|
3
|
+
additional_sources:
|
|
4
|
+
- https://github.com/modelcontextprotocol/typescript-sdk
|
|
5
|
+
- https://github.com/agentclientprotocol/agent-client-protocol
|
|
6
|
+
- https://www.npmjs.com/package/@anthropic-ai/claude-agent-sdk
|
|
7
|
+
fetched: 2026-01-13
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Claude Code SDK & Protocols
|
|
11
|
+
|
|
12
|
+
The packages powering Claude Code's capabilities.
|
|
13
|
+
|
|
14
|
+
## @anthropic-ai/claude-agent-sdk
|
|
15
|
+
|
|
16
|
+
The Claude Agent SDK enables programmatic building of AI agents with Claude Code's capabilities.
|
|
17
|
+
|
|
18
|
+
**Install**:
|
|
19
|
+
```bash
|
|
20
|
+
npm install @anthropic-ai/claude-agent-sdk
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
**Package**: 71.7 MB, v0.2.5 (as of 2026-01)
|
|
24
|
+
|
|
25
|
+
**Key exports**:
|
|
26
|
+
```typescript
|
|
27
|
+
import {
|
|
28
|
+
query, // Main entry point (async iterator)
|
|
29
|
+
type Options,
|
|
30
|
+
type Query,
|
|
31
|
+
type SDKMessage,
|
|
32
|
+
type SDKResultMessage,
|
|
33
|
+
type AgentDefinition,
|
|
34
|
+
type PermissionResult,
|
|
35
|
+
type HookCallback,
|
|
36
|
+
// V2 API (unstable)
|
|
37
|
+
unstable_v2_createSession,
|
|
38
|
+
unstable_v2_resumeSession,
|
|
39
|
+
unstable_v2_prompt,
|
|
40
|
+
// MCP tools
|
|
41
|
+
createSdkMcpServer,
|
|
42
|
+
tool,
|
|
43
|
+
} from '@anthropic-ai/claude-agent-sdk';
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
**Features**:
|
|
47
|
+
- Context management
|
|
48
|
+
- Permission model
|
|
49
|
+
- Session & error management
|
|
50
|
+
- Built-in tools (file ops, Bash, web search)
|
|
51
|
+
- MCP integration for custom tools
|
|
52
|
+
|
|
53
|
+
**Authentication**:
|
|
54
|
+
- `ANTHROPIC_API_KEY` environment variable
|
|
55
|
+
- Or `apiKey` in config
|
|
56
|
+
- Also supports AWS Bedrock and Google Vertex AI
|
|
57
|
+
|
|
58
|
+
**Resources**:
|
|
59
|
+
- [GitHub](https://github.com/anthropics/claude-agent-sdk-typescript)
|
|
60
|
+
- [npm](https://www.npmjs.com/package/@anthropic-ai/claude-agent-sdk)
|
|
61
|
+
- [Docs](https://docs.claude.com/en/api/agent-sdk/overview)
|
|
62
|
+
- [Migration Guide](https://docs.claude.com/en/docs/claude-code/sdk/migration-guide) (from Claude Code SDK)
|
|
63
|
+
|
|
64
|
+
---
|
|
65
|
+
|
|
66
|
+
## @modelcontextprotocol/sdk (MCP)
|
|
67
|
+
|
|
68
|
+
The Model Context Protocol standardizes how applications provide context for LLMs.
|
|
69
|
+
|
|
70
|
+
**Install** (v2 - pre-alpha, v1.x recommended for production):
|
|
71
|
+
```bash
|
|
72
|
+
# Server
|
|
73
|
+
npm install @modelcontextprotocol/server zod
|
|
74
|
+
|
|
75
|
+
# Client
|
|
76
|
+
npm install @modelcontextprotocol/client zod
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
**Package**: v1.25.2 stable, v2 in development (Q1 2026)
|
|
80
|
+
|
|
81
|
+
**Requires**: Zod ^3.25 peer dependency
|
|
82
|
+
|
|
83
|
+
**Concepts**:
|
|
84
|
+
- **Tools**: Let LLMs ask your server to take actions
|
|
85
|
+
- **Resources**: Expose read-only data to clients/models
|
|
86
|
+
- **Prompts**: Reusable templates for consistent interaction
|
|
87
|
+
- **Sampling**: Server-side tools can request LLM completions
|
|
88
|
+
|
|
89
|
+
**Transports**:
|
|
90
|
+
- **Streamable HTTP** (recommended for remote servers)
|
|
91
|
+
- **stdio** (standard I/O)
|
|
92
|
+
- HTTP + SSE (backwards compatibility only)
|
|
93
|
+
|
|
94
|
+
**Documentation**:
|
|
95
|
+
- [docs/server.md](https://github.com/modelcontextprotocol/typescript-sdk/blob/main/docs/server.md) - Building servers
|
|
96
|
+
- [docs/client.md](https://github.com/modelcontextprotocol/typescript-sdk/blob/main/docs/client.md) - Building clients
|
|
97
|
+
- [docs/capabilities.md](https://github.com/modelcontextprotocol/typescript-sdk/blob/main/docs/capabilities.md) - Sampling, elicitation
|
|
98
|
+
- [MCP Specification](https://spec.modelcontextprotocol.io)
|
|
99
|
+
- [modelcontextprotocol.io](https://modelcontextprotocol.io)
|
|
100
|
+
|
|
101
|
+
---
|
|
102
|
+
|
|
103
|
+
## @agentclientprotocol/sdk (ACP)
|
|
104
|
+
|
|
105
|
+
The Agent Client Protocol standardizes communication between code editors and coding agents.
|
|
106
|
+
|
|
107
|
+
**Install**:
|
|
108
|
+
```bash
|
|
109
|
+
npm install @agentclientprotocol/sdk
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
**Communication**: JSON-RPC over stdio
|
|
113
|
+
|
|
114
|
+
**Relationship to MCP**: ACP reuses MCP specifications where possible, adding editor-specific types. MCP handles "what" (data/tools), ACP handles "where" (editor integration).
|
|
115
|
+
|
|
116
|
+
**Supported Editors**:
|
|
117
|
+
- Zed
|
|
118
|
+
- Neovim
|
|
119
|
+
- Marimo
|
|
120
|
+
- JetBrains (in progress)
|
|
121
|
+
|
|
122
|
+
**Supported Agents**:
|
|
123
|
+
- Claude Code
|
|
124
|
+
- Codex CLI
|
|
125
|
+
- Gemini CLI
|
|
126
|
+
- goose
|
|
127
|
+
- StackPack
|
|
128
|
+
|
|
129
|
+
**Official Libraries**:
|
|
130
|
+
- TypeScript: `@agentclientprotocol/sdk`
|
|
131
|
+
- Python: `python-sdk`
|
|
132
|
+
- Rust: `agent-client-protocol` (crates.io)
|
|
133
|
+
- Kotlin: `acp-kotlin`
|
|
134
|
+
|
|
135
|
+
**Resources**:
|
|
136
|
+
- [agentclientprotocol.com](https://agentclientprotocol.com/)
|
|
137
|
+
- [GitHub](https://github.com/agentclientprotocol/agent-client-protocol)
|
|
138
|
+
- [Schema](https://github.com/agentclientprotocol/agent-client-protocol/blob/main/schema/schema.json)
|
|
139
|
+
|
|
140
|
+
---
|
|
141
|
+
|
|
142
|
+
## Protocol Relationships
|
|
143
|
+
|
|
144
|
+
```
|
|
145
|
+
┌─────────────────────────────────────────────────────────────┐
|
|
146
|
+
│ Code Editor │
|
|
147
|
+
│ (Zed, JetBrains, etc.) │
|
|
148
|
+
└─────────────────────────┬───────────────────────────────────┘
|
|
149
|
+
│ ACP (JSON-RPC/stdio)
|
|
150
|
+
▼
|
|
151
|
+
┌─────────────────────────────────────────────────────────────┐
|
|
152
|
+
│ Coding Agent │
|
|
153
|
+
│ (Claude Code, Gemini CLI) │
|
|
154
|
+
│ │ │
|
|
155
|
+
│ ┌─────────────────────┼─────────────────────┐ │
|
|
156
|
+
│ │ │ │ │
|
|
157
|
+
│ ▼ ▼ ▼ │
|
|
158
|
+
│ Built-in Tools MCP Servers LLM API │
|
|
159
|
+
│ (File, Bash) (custom tools) (Anthropic) │
|
|
160
|
+
└─────────────────────────────────────────────────────────────┘
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
**ACP**: Editor ↔ Agent communication
|
|
164
|
+
**MCP**: Agent ↔ Tools/Data communication
|
|
165
|
+
**Agent SDK**: Building agents with Claude capabilities
|
|
166
|
+
|
|
167
|
+
---
|
|
168
|
+
|
|
169
|
+
## Using with honbu
|
|
170
|
+
|
|
171
|
+
These protocols enable honbu hook integration:
|
|
172
|
+
|
|
173
|
+
### As MCP Server
|
|
174
|
+
|
|
175
|
+
honbu could expose tools via MCP:
|
|
176
|
+
```typescript
|
|
177
|
+
import { createSdkMcpServer, tool } from '@anthropic-ai/claude-agent-sdk';
|
|
178
|
+
|
|
179
|
+
const server = createSdkMcpServer({
|
|
180
|
+
tools: [
|
|
181
|
+
tool({
|
|
182
|
+
name: 'chi_data_search',
|
|
183
|
+
description: 'Search Claude Code session data',
|
|
184
|
+
parameters: z.object({ query: z.string() }),
|
|
185
|
+
execute: async ({ query }) => {
|
|
186
|
+
// Search sessions, return results
|
|
187
|
+
}
|
|
188
|
+
})
|
|
189
|
+
]
|
|
190
|
+
});
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
### As Hook Handler
|
|
194
|
+
|
|
195
|
+
honbu receives hook events (JSON via stdin) and returns decisions (JSON via stdout), fitting naturally into the ACP/MCP ecosystem.
|
|
196
|
+
|
|
197
|
+
### Data Access Layer
|
|
198
|
+
|
|
199
|
+
The SDK's session/context management aligns with honbu's data access goals:
|
|
200
|
+
- Read session transcripts
|
|
201
|
+
- Query knowledge base
|
|
202
|
+
- Track tool usage patterns
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
[[docs]]
|
|
2
|
+
path = "doc/claude-code/hooks.md"
|
|
3
|
+
source = "https://code.claude.com/docs/en/hooks"
|
|
4
|
+
fetched = "2026-01-13"
|
|
5
|
+
|
|
6
|
+
[[docs]]
|
|
7
|
+
path = "doc/claude-code/capabilities.md"
|
|
8
|
+
source = "https://code.claude.com/docs/en/cli-reference"
|
|
9
|
+
fetched = "2026-01-13"
|
|
10
|
+
|
|
11
|
+
[[docs]]
|
|
12
|
+
path = "doc/claude-code/overview.md"
|
|
13
|
+
source = "https://code.claude.com/docs/en/overview"
|
|
14
|
+
fetched = "2026-01-13"
|
|
15
|
+
|
|
16
|
+
[[docs]]
|
|
17
|
+
path = "doc/claude-code/plugins.md"
|
|
18
|
+
source = "https://code.claude.com/docs/en/plugins"
|
|
19
|
+
fetched = "2026-01-13"
|
|
20
|
+
|
|
21
|
+
[[docs]]
|
|
22
|
+
path = "doc/claude-code/directory-structure.md"
|
|
23
|
+
source = "https://idsc2025.substack.com/p/the-complete-technical-guide-to-claude"
|
|
24
|
+
fetched = "2026-01-13"
|
|
25
|
+
|
|
26
|
+
[[docs]]
|
|
27
|
+
path = "doc/claude-code/sdk-protocols.md"
|
|
28
|
+
source = "https://github.com/anthropics/claude-agent-sdk-typescript"
|
|
29
|
+
fetched = "2026-01-13"
|
package/justfile
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# hu (@aladac/hu)
|
|
2
|
+
|
|
3
|
+
default: lint-fix format typecheck
|
|
4
|
+
|
|
5
|
+
# Development
|
|
6
|
+
dev:
|
|
7
|
+
npm run dev
|
|
8
|
+
|
|
9
|
+
test:
|
|
10
|
+
npm test
|
|
11
|
+
|
|
12
|
+
lint:
|
|
13
|
+
npm run lint
|
|
14
|
+
|
|
15
|
+
lint-fix:
|
|
16
|
+
npm run lint:fix
|
|
17
|
+
|
|
18
|
+
format:
|
|
19
|
+
npm run format
|
|
20
|
+
|
|
21
|
+
typecheck:
|
|
22
|
+
npm run typecheck
|
|
23
|
+
|
|
24
|
+
# Install/reinstall globally
|
|
25
|
+
install:
|
|
26
|
+
npm install && npm link
|
|
27
|
+
|
|
28
|
+
# Version bumping
|
|
29
|
+
# Usage: just bump [patch|minor|major]
|
|
30
|
+
# - No args: bump pre-release number (1.0.0-pre1 -> 1.0.0-pre2)
|
|
31
|
+
# - patch: bump patch version (1.0.0 -> 1.0.1)
|
|
32
|
+
# - minor: bump minor version (1.0.0 -> 1.1.0)
|
|
33
|
+
# - major: bump major version (1.0.0 -> 2.0.0)
|
|
34
|
+
bump *args:
|
|
35
|
+
npx tsx src/commands/bump.ts {{args}}
|
|
36
|
+
|
|
37
|
+
# Clean
|
|
38
|
+
clean:
|
|
39
|
+
rm -rf node_modules
|
package/package.json
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@aladac/hu",
|
|
3
|
+
"version": "0.1.0-a1",
|
|
4
|
+
"description": "CLI tools for Claude Code workflows",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"bin": {
|
|
7
|
+
"hu": "./src/index.ts"
|
|
8
|
+
},
|
|
9
|
+
"scripts": {
|
|
10
|
+
"dev": "node src/index.ts",
|
|
11
|
+
"test": "vitest",
|
|
12
|
+
"test:run": "vitest run",
|
|
13
|
+
"lint": "biome check .",
|
|
14
|
+
"lint:fix": "biome check --write .",
|
|
15
|
+
"format": "biome format --write .",
|
|
16
|
+
"typecheck": "tsc --noEmit"
|
|
17
|
+
},
|
|
18
|
+
"dependencies": {
|
|
19
|
+
"cheerio": "^1.1.2",
|
|
20
|
+
"citty": "^0.1.6",
|
|
21
|
+
"turndown": "^7.2.2"
|
|
22
|
+
},
|
|
23
|
+
"devDependencies": {
|
|
24
|
+
"@biomejs/biome": "^1.9.0",
|
|
25
|
+
"@types/node": "^22.0.0",
|
|
26
|
+
"@types/turndown": "^5.0.5",
|
|
27
|
+
"typescript": "^5.7.0",
|
|
28
|
+
"vitest": "^2.1.0"
|
|
29
|
+
},
|
|
30
|
+
"engines": {
|
|
31
|
+
"node": ">=23.6.0"
|
|
32
|
+
}
|
|
33
|
+
}
|