fix(install): harden Claude settings lifecycle

This commit is contained in:
wellkilo
2026-09-07 01:57:04 +08:00
parent 26d3e0038b
commit f59cfd57c2
19 changed files with 540 additions and 350 deletions
+27 -1
View File
@@ -147,6 +147,24 @@
"type": "string"
}
}
},
"managedMatcherEntry": {
"allOf": [
{ "$ref": "#/$defs/matcherEntry" },
{
"type": "object",
"required": ["id"],
"properties": {
"hooks": { "type": "array", "minItems": 1 }
}
}
]
},
"managedMatcherRequiredEntry": {
"allOf": [
{ "$ref": "#/$defs/managedMatcherEntry" },
{ "type": "object", "required": ["matcher"] }
]
}
},
"oneOf": [
@@ -180,10 +198,18 @@
"SessionEnd"
]
},
"patternProperties": {
"^(SessionStart|PreToolUse|PermissionRequest|PostToolUse|PostToolUseFailure|SubagentStart|PreCompact|InstructionsLoaded|TeammateIdle|TaskCompleted|ConfigChange|WorktreeCreate|WorktreeRemove|SessionEnd)$": {
"type": "array",
"items": {
"$ref": "#/$defs/managedMatcherRequiredEntry"
}
}
},
"additionalProperties": {
"type": "array",
"items": {
"$ref": "#/$defs/matcherEntry"
"$ref": "#/$defs/managedMatcherEntry"
}
}
}
+2 -20
View File
@@ -218,26 +218,8 @@
"type": "object",
"minProperties": 1,
"propertyNames": {
"enum": [
"SessionStart",
"UserPromptSubmit",
"PreToolUse",
"PermissionRequest",
"PostToolUse",
"PostToolUseFailure",
"Notification",
"SubagentStart",
"Stop",
"SubagentStop",
"PreCompact",
"InstructionsLoaded",
"TeammateIdle",
"TaskCompleted",
"ConfigChange",
"WorktreeCreate",
"WorktreeRemove",
"SessionEnd"
]
"type": "string",
"pattern": "\\S"
},
"additionalProperties": {
"type": "array",