-
Notifications
You must be signed in to change notification settings - Fork 0
feat(claude-code): add MCP server and hooks #24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| #!/usr/bin/env node | ||
| import { runHookCli } from "obsxa/claude-code-hooks"; | ||
|
|
||
| runHookCli(process.argv.slice(2)).catch((err) => { | ||
| console.error("[obsxa] Hook error:", err); | ||
| process.exit(1); | ||
| }); |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| export { registerTools, startMcpServer } from "../src/claude-code.ts"; | ||
| export { | ||
| handleHookEvent, | ||
| handlePostToolUse, | ||
| handleSessionStart, | ||
| handleStop, | ||
| runHookCli, | ||
| } from "../src/claude-code-hooks.ts"; | ||
| export type { HookInput } from "../src/claude-code-hooks.ts"; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| #!/usr/bin/env node | ||
| import { startMcpServer } from "obsxa/claude-code"; | ||
|
|
||
| startMcpServer(process.argv.slice(2)).catch((err) => { | ||
| console.error("[obsxa] Fatal:", err); | ||
| process.exit(1); | ||
| }); |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| { | ||
| "name": "obsxa-claude-code", | ||
| "version": "0.0.3", | ||
| "description": "Claude Code plugin wrapper package for obsxa (MCP server + hooks)", | ||
| "license": "MIT", | ||
| "repository": { | ||
| "type": "git", | ||
| "url": "git+https://github.com/oritwoen/obsxa.git" | ||
| }, | ||
| "bin": { | ||
| "obsxa-claude-code": "./index.mjs", | ||
| "obsxa-hooks": "./hooks.mjs", | ||
| "obsxa-mcp": "./index.mjs" | ||
| }, | ||
| "files": [ | ||
| "index.mjs", | ||
| "hooks.mjs", | ||
| "index.d.mts" | ||
| ], | ||
| "type": "module", | ||
| "main": "./index.mjs", | ||
| "types": "./index.d.mts", | ||
| "exports": { | ||
| ".": { | ||
| "types": "./index.d.mts", | ||
| "default": "./index.mjs" | ||
| }, | ||
| "./hooks": { | ||
| "default": "./hooks.mjs" | ||
| } | ||
|
Comment on lines
+21
to
+30
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Don't export the CLI bootstrap as
🤖 Prompt for AI Agents |
||
| }, | ||
| "dependencies": { | ||
| "obsxa": "0.0.3" | ||
| } | ||
| } | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Published typings point to files that are not in the tarball.
Per the
claude-code/index.d.mtschange in this PR, the type barrel re-exports../src/claude-code.tsand../src/claude-code-hooks.ts. This package only publishesindex.mjs,hooks.mjs, andindex.d.mts, so those declaration imports go dead after publish andtscwill fail on first import. Ship local.d.mtsfiles for those modules or rewrite the barrel to only reference files included here.🤖 Prompt for AI Agents