← Commit history

Publish 1.1.5

Colby Knox ·a696d98df0 ·3mo ago ·parent 51d149c
6 files changed +38−31
README.md+4−4
@@ -14,20 +14,20 @@ public registry instead, so it works for any user and any agent.  ## How it works -A `UserPromptSubmit` hook runs a throttled, bounded check (`adompkg outdated`,+A `UserPromptSubmit` hook runs a throttled, bounded check (`adom-wiki outdated`, ~every 30 min). When an installed package is behind the registry, it applies the update **in the background** and drops a one-line note into the model's context. It never blocks your prompt.  | Layer | Updates | Cadence | | --- | --- | --- |-| `adompkg` CLI | its own binary | ~2 h, on use |+| `adom-wiki` CLI | its own binary | ~2 h, on use | | `adom/hook` (this) | installed apps + skills | ~30 min, on prompt |  ## Install  ```bash-adompkg install adom/hook+adom-wiki install adom/hook ```  `adom/core` already depends on it, so a normal bootstrap wires it for you.@@ -43,7 +43,7 @@ adompkg install adom/hook ## Uninstall  ```bash-adompkg uninstall adom/hook+adom-wiki uninstall adom/hook ```  Unwires the hook from both `~/.claude/settings.json` and `~/.codex/hooks.json`.
SKILL.md+5−5
@@ -12,8 +12,8 @@ private repository. ## What it does  On every Claude Code and Codex prompt (`UserPromptSubmit`), a throttled check runs-`adompkg outdated`. When something installed is behind the registry, it applies the-update in the background (`adompkg update` + `adompkg install adom/core`) and prints+`adom-wiki outdated`. When something installed is behind the registry, it applies the+update in the background (`adom-wiki update` + `adom-wiki install adom/core`) and prints a one-line note into the model's context. It never blocks the prompt.  This is the registry-native replacement for the old `git fetch` hook: same@@ -22,7 +22,7 @@ works for any user and any agent, with no private-GitHub dependency.  ## Two layers of auto-update -- **CLI layer** -- `adompkg` self-updates its own binary on use (throttled ~2h).+- **CLI layer** -- `adom-wiki` self-updates its own binary on use (throttled ~2h). - **Content layer (this hook)** -- keeps the installed packages (`adom/core`'s apps   and skills) current, throttled ~30 min. @@ -35,11 +35,11 @@ works for any user and any agent, with no private-GitHub dependency. ## Install  ```-adompkg install adom/hook+adom-wiki install adom/hook ```  It is also a dependency of `adom/core`, so a normal bootstrap installs it for you.-`adompkg uninstall adom/hook` unwires it from both agents.+`adom-wiki uninstall adom/hook` unwires it from both agents.  ## Note on Codex 
check-updates.sh+14−14
@@ -1,10 +1,10 @@ #!/usr/bin/env bash # adom auto-update hook -- registry-native and cross-agent. #-# Keeps the adom/core apps and skills current from wiki.adom.inc. No git, no-# private repo. Runs under BOTH Claude Code and Codex `UserPromptSubmit`; its-# stdout becomes the model's additionalContext. Throttled and backgrounded so it-# never blocks a prompt or interrupts the agent.+# Keeps the adom/core apps and skills current from wiki.adom.inc via the+# adom-wiki CLI. No git, no private repo. Runs under BOTH Claude Code and Codex+# `UserPromptSubmit`; its stdout becomes the model's additionalContext. Throttled+# and backgrounded so it never blocks a prompt or interrupts the agent. # # Tunables (env): #   ADOM_HOOK_INTERVAL   seconds between checks (default 1800 = 30 min)@@ -14,8 +14,8 @@ [ -n "${ADOM_HOOK_DISABLE:-}" ] && exit 0  # A UserPromptSubmit hook can fire from a non-login shell whose PATH lacks-# ~/.local/bin (where the bootstrap installs adompkg). Without this the check-# silently no-ops ("command -v adompkg" fails). Put the CLI dir on PATH first.+# ~/.local/bin (where the adom-wiki CLI is installed). Without this the check+# silently no-ops ("command -v adom-wiki" fails). Put the CLI dir on PATH first. export PATH="$HOME/.local/bin:$PATH"  STAMP="${HOME}/.adom/last-core-check"@@ -31,19 +31,19 @@ fi # Stamp the attempt up front: a slow or failed check must not re-fire every prompt. touch "$STAMP" 2>/dev/null -command -v adompkg >/dev/null 2>&1 || exit 0+command -v adom-wiki >/dev/null 2>&1 || exit 0 -# Cheap, bounded staleness probe. `adompkg outdated --quiet` exits non-zero when-# an installed package is behind the registry.-if timeout 12 adompkg outdated --quiet >/dev/null 2>&1; then+# Cheap, bounded staleness probe. `adom-wiki pkg outdated --quiet` exits non-zero+# when an installed package is behind the registry.+if timeout 12 adom-wiki pkg outdated --quiet >/dev/null 2>&1; then   exit 0  # everything current fi  # Behind: apply in the background (detached) so the prompt is never blocked.-# `adompkg update` bumps in-range versions; `install adom/core` re-resolves and-# pulls any newly added core deps. adompkg is resilient (skips needs-sudo-# packages with a note, idempotent on re-run).-( adompkg update >/dev/null 2>&1; adompkg install adom/core >/dev/null 2>&1 ) </dev/null >/dev/null 2>&1 &+# `adom-wiki pkg update` bumps in-range versions; `pkg install adom/core`+# re-resolves and pulls any newly added core deps. It is resilient (skips+# needs-sudo packages with a note, idempotent on re-run).+( adom-wiki pkg update >/dev/null 2>&1; adom-wiki pkg install adom/core >/dev/null 2>&1 ) </dev/null >/dev/null 2>&1 & disown 2>/dev/null  echo "adom: core skills/apps were behind wiki.adom.inc and are updating in the background now. They will be current within a moment. Continue with the user's request."
docs/shot.svg+2−2
@@ -9,14 +9,14 @@   <g font-family="monospace" font-size="19">     <text x="30" y="92" fill="#8b949e"># every prompt (throttled ~30m): is core behind the registry?</text>     <text x="30" y="128" fill="#58a6ff">$</text>-    <text x="56" y="128" fill="#c9d1d9">adompkg outdated --quiet</text>+    <text x="56" y="128" fill="#c9d1d9">adom-wiki outdated --quiet</text>     <text x="56" y="160" fill="#e3b341">  adom/screenshot-paste   2.1.0  ->  2.3.0</text>     <text x="56" y="188" fill="#e3b341">  adom/wiki               4.0.1  ->  4.2.0</text>     <text x="30" y="236" fill="#7ee787">adom: core skills/apps were behind wiki.adom.inc and are</text>     <text x="30" y="262" fill="#7ee787">updating in the background now. They will be current shortly.</text>     <text x="30" y="310" fill="#8b949e"># background, detached - the prompt is never blocked</text>     <text x="30" y="342" fill="#58a6ff">$</text>-    <text x="56" y="342" fill="#c9d1d9">adompkg update &amp;&amp; adompkg install adom/core</text>+    <text x="56" y="342" fill="#c9d1d9">adom-wiki update &amp;&amp; adom-wiki install adom/core</text>     <text x="56" y="374" fill="#c9d1d9">  updated adom/screenshot-paste -> 2.3.0</text>     <text x="56" y="402" fill="#c9d1d9">  updated adom/wiki -> 4.2.0</text>     <text x="56" y="430" fill="#7ee787">  adom/core is current (16 packages)</text>
package.json+11−4
@@ -1,6 +1,6 @@ {   "slug": "hook",-  "version": "1.1.3",+  "version": "1.1.5",   "type": "app",   "org": "adom",   "bundled": true,@@ -10,12 +10,19 @@     "install": "./install.sh",     "uninstall": "./uninstall.sh"   },-  "tags": ["hook", "auto-update", "bootstrap", "claude-code", "codex", "registry"],+  "tags": [+    "hook",+    "auto-update",+    "bootstrap",+    "claude-code",+    "codex",+    "registry"+  ],   "discovery_triggers": [     "auto update skills and apps",     "keep core packages current",     "core packages are behind",-    "adompkg update hook",+    "adom-wiki update hook",     "claude code update hook",     "codex update hook",     "registry auto update"@@ -26,4 +33,4 @@     "screenshot": "docs/shot.png",     "accent": "#7ee787"   }-}+}\ No newline at end of file
page.json+2−2
@@ -1,6 +1,6 @@ {   "slug": "hook",-  "version": "1.1.4",+  "version": "1.1.5",   "type": "app",   "org": "adom",   "bundled": true,@@ -22,7 +22,7 @@     "auto update skills and apps",     "keep core packages current",     "core packages are behind",-    "adompkg update hook",+    "adom-wiki update hook",     "claude code update hook",     "codex update hook",     "registry auto update"