fix: register 11 dormant hooks + SmartApprover in v5.0.0 settings.json#1200
Closed
brycemagera wants to merge 4 commits into
Closed
fix: register 11 dormant hooks + SmartApprover in v5.0.0 settings.json#1200brycemagera wants to merge 4 commits into
brycemagera wants to merge 4 commits into
Conversation
observability.ts imports 'yaml' at the top level but it was not declared in package.json or bun.lock. On every cold start Bun cannot resolve it, the observability module silently fails to load, and the Pulse dashboard returns 404 on all routes. Add yaml@^2.8.3 as a runtime dependency and update bun.lock.
PULSE/modules/wiki.ts imports minisearch and PULSE/modules/observability.ts imports yaml, but neither was declared in any package.json. smol-toml is used by pulse.ts and lib.ts to parse PULSE.toml. On cold start Bun cannot resolve these packages, the wiki and observability modules fail to load silently, and all /api/wiki/* routes return 404 (breaking the /knowledge, /docs, /skills, and /hooks Pulse pages). Create PULSE/package.json with all three runtime deps and add its bun.lock. Update .gitignore to carve out PAI/PULSE/bun.lock alongside the existing Observability/bun.lock exception.
The following hooks were deployed in the hooks/ directory but had no settings.json entry, making them dormant: New event type registrations: - PostToolUseFailure → ToolFailureTracker.hook.ts - Elicitation → ElicitationHandler.hook.ts - InstructionsLoaded → InstructionsLoadedHandler.hook.ts - PostCompact → RestoreContext.hook.ts - TaskCreated → TaskGovernance.hook.ts - StopFailure → StopFailureHandler.hook.ts - ConfigChange → ConfigAudit.hook.ts - FileChanged → FileChanged.hook.ts - TeammateIdle → TeammateIdle.hook.ts Existing event type updates: - PostToolUse Write|Edit → ISASync.hook.ts (before TelosSummarySync) - PreToolUse Agent → AgentInvocation.hook.ts (alongside agent-guard) - PostToolUse Agent → AgentInvocation.hook.ts (new matcher entry) Also adds SmartApprover (PermissionRequest) from PR danielmiessler#1136 which was not yet reflected in the release settings.json.
CheckpointPerISC was deployed in hooks/ but had no settings.json entry and no HookSystem.md documentation, leaving it dormant and undiscoverable. This commit: - Registers CheckpointPerISC.hook.ts on PostToolUse Write|Edit (alongside ISASync and TelosSummarySync) - Adds full documentation entry to HookSystem.md covering its trigger, opt-in allowlist mechanism (~/.claude/checkpoint-repos.txt), commit format, idempotency via sidecar state file, and fail-closed semantics Registering the hook is safe without the allowlist — it's a no-op when the allowlist file is missing or empty.
Owner
|
Hey @brycemagera, thank you for the PR and the work that went into it. We're changing how LifeOS ships: from a full We're closing it for that reason, not because the idea was wrong. If the need still stands against the new model, we'd love a fresh PR once it lands. Thanks again for contributing. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The
Releases/v5.0.0/.claude/settings.jsonhad hook files deployed tohooks/but no correspondingsettings.jsonentry — making them permanently dormant. The hooks existed, the code worked, but Claude Code never fired them.An audit found 13 hooks in this state (plus
SmartApproverfrom PR #1136 not yet reflected in the release file).Changes
New event type registrations
These hook event types were added to Claude Code but never wired up in the release settings:
PostToolUseFailure→ToolFailureTracker.hook.tsElicitation→ElicitationHandler.hook.tsInstructionsLoaded→InstructionsLoadedHandler.hook.tsPostCompact→RestoreContext.hook.tsTaskCreated→TaskGovernance.hook.tsStopFailure→StopFailureHandler.hook.tsConfigChange→ConfigAudit.hook.tsFileChanged→FileChanged.hook.tsTeammateIdle→TeammateIdle.hook.tsExisting event type updates
PostToolUseWrite+Edit →ISASync.hook.tsadded beforeTelosSummarySyncPreToolUseAgent →AgentInvocation.hook.tsadded alongside existingagent-guardHTTP hookPostToolUseAgent →AgentInvocation.hook.tsnew matcher entry for stop-side duration trackingAlso includes
SmartApprover.hook.tsonPermissionRequest(Write|Edit|MultiEdit|Bash) — carried over from PR #1136 which was not yet reflected in the release file.Testing
Verified against a live PAI 5.0 install. All hooks fire on their respective events after registration.