Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions LifeOS/install/LIFEOS/DOCUMENTATION/Hooks/HookSystem.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ event telemetry records added context bytes, not quota usage or private content.
**Configuration:** `~/.claude/settings.json` (GENERATED — merged from `settings.system.json` + `LIFEOS/USER/CONFIG/settings.user.json` by `MergeSettings.ts`; for events the user file defines as a plain array — UserPromptSubmit, PostToolUse, PreToolUse, Stop, SessionEnd — the user array REPLACES the system array, so `settings.json` is the only registration truth. `settings.user.json` does not exist on a fresh install — `MergeSettings` no-ops cleanly until you create it to carry user-side overrides)
**Status:** Active — hook counts below are hand-maintained (the `UpdateCounts.ts` count-cache write was removed 2026-05-06; statusline/Banner read live via `GetCounts.ts`)

> **Install scope.** This public reference describes the public baseline and selected registration examples; it is not a census of any one private installation. Each install derives its effective `settings.json` from the system layer plus its USER overlay, so event coverage, counts and private maintainer hooks can differ. Treat the effective generated settings and the files registered by that install as the source of truth; entries marked maintainer-side, private or not in the public release are not public-install guarantees.

> **Registration (2026-09-30).** On a Claude Code install the hooks are registered through the plugin hook manifest (a `hooks.json` the release build generates), which `skills/LifeOS/Tools/InstallHooks.ts` merges into the generated `settings.json`; the installer adds `TurnOutcome` there. A maintainer install may register further private hooks through its USER overlay. The counts belong to each install: `ls hooks/*.hook.ts` lists what is on disk, and the `hooks` key of `settings.json` lists what is registered. Dispatcher-only modules remain live through `StopGates`, `MemoryTurnStart`, and `PostToolObserver` (`PreToolGuard`, the former PreToolUse dispatcher, was deleted 2026-10-24). `StopGates` runs `IsaCodeSyncGate`, `VerificationGate`, `FormatGate`, `ISAFoldGate`, `ISAGate`, `DeployRegistrationGate`, and `IsaDeployMarkerGate` in that order, followed by any private gates from the optional private gate extension (absent from public installs). Details per event follow.

> **Output gates and records (2026-09-30).** Three hooks carry the Assay hand-off and send path. `OutputRecord` (PostToolUse, composed inside `PostToolObserver` for Write, Edit, MultiEdit, Bash, Artifact, ArtifactData and ArtifactComments, and registered directly on PostToolUseFailure (Bash) and Stop) writes one output line for every file handed to the principal, from the bytes that landed. Its backstop runs a fast change-driven scan of Downloads and Desktop after each call; the daily reconciler walks Downloads and Desktop and checks other roots only by the paths the activity log names. An unknown kind is recorded as "other". `ReplyRecord` (Stop and UserPromptSubmit) logs a substantial reply (300 words or more, or a fenced block over 40 lines) as an output and proofs it at the next prompt; it never blocks. `SendOverride` (UserPromptSubmit) lets only the principal's own explicit prompt mint the one-use token that releases a blocked send. `McpSendGate` was deleted 2026-10-25: MCP sends are held by native `ask` rules, and `LIFEOS/TOOLS/lib/McpWriteVerbs.ts` keeps the one rule that classifies an `mcp__` tool as a write (a read verb and no write verb anywhere is a read) for the output reconciler, plus `gatedInput()` for `OutputRecord`. The gates also cover every `Artifact*` tool, and raw sender commands in Bash are denied so a send goes only through a gated tool. Blocked calls write a line too: `ProofGate` and `SendGate` record the `blocked` decision (`Assay/Records.md`). (maintainer-side; not in the public release)
Expand Down
24 changes: 21 additions & 3 deletions LifeOS/install/LIFEOS/PULSE/Observability/src/app/docs/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,28 @@ export default function DocsLayout({ children }: { children: React.ReactNode })

const docsTree = data?.tree ? filterDocsTree(data.tree) : [];

const openSearch = () => openPalette("wiki");

return (
<div className="flex h-[calc(100vh-3.5rem)]">
<WikiSidebar tree={docsTree} onSearchClick={() => openPalette("wiki")} />
<div className="flex-1 overflow-hidden">{children}</div>
<div className="flex h-[calc(100vh-3.5rem)] min-w-0 flex-col lg:flex-row">
<div className="lg:hidden px-3 pt-3">
<details className="glass rounded-2xl">
<summary className="cursor-pointer list-none px-4 py-3 text-xs text-ink-2">
Documentation navigation
</summary>
<WikiSidebar
tree={docsTree}
onSearchClick={openSearch}
className="w-auto max-h-[60vh] m-3"
/>
</details>
</div>
<WikiSidebar
tree={docsTree}
onSearchClick={openSearch}
className="hidden lg:flex"
/>
<div className="min-w-0 flex-1 overflow-hidden">{children}</div>
</div>
);
}
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ interface TreeNode {
interface WikiSidebarProps {
tree: TreeNode[];
onSearchClick: () => void;
className?: string;
}

const CATEGORY_ICONS: Record<string, typeof BookOpen> = {
Expand Down Expand Up @@ -186,9 +187,9 @@ function TreeItem({ node, depth = 0 }: { node: TreeNode; depth?: number }) {
);
}

export default function WikiSidebar({ tree, onSearchClick }: WikiSidebarProps) {
export default function WikiSidebar({ tree, onSearchClick, className }: WikiSidebarProps) {
return (
<aside className="w-64 shrink-0 glass rounded-2xl m-3 mr-0 overflow-y-auto self-stretch">
<aside className={cn("w-64 shrink-0 glass rounded-2xl m-3 mr-0 overflow-y-auto self-stretch", className)}>
{/* Search trigger */}
<div className="p-3 border-b border-line-1">
<button
Expand Down