fix: restore missing files (package.json etc) and fix sync script logic

This commit is contained in:
xuxiang
2026-01-31 18:55:45 +08:00
parent b1d03833b9
commit 0e5571998f
85 changed files with 17074 additions and 1 deletions

81
schemas/hooks.schema.json Normal file
View File

@@ -0,0 +1,81 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Claude Code Hooks Configuration",
"description": "Configuration for Claude Code hooks. Event types are validated at runtime and must be one of: PreToolUse, PostToolUse, PreCompact, SessionStart, SessionEnd, Stop, Notification, SubagentStop",
"$defs": {
"hookItem": {
"type": "object",
"required": [
"type",
"command"
],
"properties": {
"type": {
"type": "string"
},
"command": {
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"items": {
"type": "string"
}
}
]
}
}
},
"matcherEntry": {
"type": "object",
"required": [
"matcher",
"hooks"
],
"properties": {
"matcher": {
"type": "string"
},
"hooks": {
"type": "array",
"items": {
"$ref": "#/$defs/hookItem"
}
},
"description": {
"type": "string"
}
}
}
},
"oneOf": [
{
"type": "object",
"properties": {
"$schema": {
"type": "string"
},
"hooks": {
"type": "object",
"additionalProperties": {
"type": "array",
"items": {
"$ref": "#/$defs/matcherEntry"
}
}
}
},
"required": [
"hooks"
]
},
{
"type": "array",
"items": {
"$ref": "#/$defs/matcherEntry"
}
}
]
}

View File

@@ -0,0 +1,17 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Package Manager Configuration",
"type": "object",
"properties": {
"packageManager": {
"type": "string",
"enum": [
"npm",
"pnpm",
"yarn",
"bun"
]
}
},
"additionalProperties": false
}

View File

@@ -0,0 +1,13 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Claude Plugin Configuration",
"type": "object",
"required": ["name"],
"properties": {
"name": { "type": "string" },
"description": { "type": "string" },
"author": { "type": "string" },
"repository": { "type": "string" },
"license": { "type": "string" }
}
}