@chrono-meta/fh-gate 1.4.4 → 1.4.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHEATSHEET.md CHANGED
@@ -173,6 +173,33 @@ claude plugin list
173
173
 
174
174
  ---
175
175
 
176
+ ## 9.5. npx / CLI — zero-install governance gate (any repo, no Claude Code session)
177
+
178
+ The npm package `@chrono-meta/fh-gate` runs FH's governance gate as a plain CLI — no clone, no plugin, no `claude` session. Use it in CI or any repo. It shells out to a backend (`claude --print` or `codex exec`) and returns a machine-parseable verdict + exit code.
179
+
180
+ ```bash
181
+ # Governance gate — wraps any coding agent's output as a post-generation check
182
+ npx --package @chrono-meta/fh-gate fh-gate # auto-detect from git diff
183
+ npx --package @chrono-meta/fh-gate fh-gate "src/foo.ts" full # explicit files + level
184
+ FH_BACKEND=codex npx --package @chrono-meta/fh-gate fh-gate # Codex backend (default: claude)
185
+ # → FH_GATE_VERDICT: PASS | PENDING | BLOCKED | ESCALATE
186
+ # → exit: 0 PASS · 1 PENDING · 2 BLOCKED · 3 ESCALATE · 10 harness error · 11 arg error
187
+
188
+ # Run a skill or agent doc through a backend, outside Claude Code
189
+ npx --package @chrono-meta/fh-gate fh-run --skill <name>
190
+ npx --package @chrono-meta/fh-gate fh-goal "<goal text>" # goal runner
191
+ ```
192
+
193
+ | Knob | Values | Effect |
194
+ |------|--------|--------|
195
+ | `FH_BACKEND` | `claude` \| `codex` \| `auto` | Backend CLI (`auto` prefers Codex when both present) |
196
+ | `FH_MODEL` | model id | Override backend model |
197
+ | level arg | `quick` \| `full` | Gate depth (default `quick`) |
198
+
199
+ > **vs the plugin path (§9):** the plugin gives you interactive `/slash-commands` inside a `claude` session (Claude-only). The npx path is a single-shot CLI that runs **without** Claude Code and works with Codex too — built for CI pipelines and non-Claude users. Exit codes make it gate-able in GitHub Actions.
200
+
201
+ ---
202
+
176
203
  ## 10. Token efficiency best practices (AI collaboration guide)
177
204
 
178
205
  4 levers to reduce context cost. Combine for amplified effect.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chrono-meta/fh-gate",
3
- "version": "1.4.4",
3
+ "version": "1.4.5",
4
4
  "description": "FH runtime adapters — run FH governance, skills, and agents via Claude or Codex with machine-parseable gates.",
5
5
  "license": "MIT",
6
6
  "keywords": [
@@ -7,8 +7,11 @@
7
7
 
8
8
  set -euo pipefail
9
9
 
10
- VERSION="0.1.0"
11
10
  FH_ROOT="$(cd "$(dirname "$0")/.." && pwd)"
11
+ # Single source of truth: read version from the package.json shipped alongside this script.
12
+ # No jq dependency (users may not have it); fall back to "unknown" if unreadable.
13
+ VERSION="$(sed -n 's/.*"version"[[:space:]]*:[[:space:]]*"\([^"]*\)".*/\1/p' "$FH_ROOT/package.json" 2>/dev/null | head -1)"
14
+ VERSION="${VERSION:-unknown}"
12
15
  _TMPDIR="${TMPDIR:-/tmp}"
13
16
 
14
17
  FH_BACKEND="${FH_BACKEND:-codex}"
package/scripts/fh-run.sh CHANGED
@@ -7,8 +7,11 @@
7
7
 
8
8
  set -euo pipefail
9
9
 
10
- VERSION="0.1.0"
11
10
  FH_ROOT="$(cd "$(dirname "$0")/.." && pwd)"
11
+ # Single source of truth: read version from the package.json shipped alongside this script.
12
+ # No jq dependency (users may not have it); fall back to "unknown" if unreadable.
13
+ VERSION="$(sed -n 's/.*"version"[[:space:]]*:[[:space:]]*"\([^"]*\)".*/\1/p' "$FH_ROOT/package.json" 2>/dev/null | head -1)"
14
+ VERSION="${VERSION:-unknown}"
12
15
  _TMPDIR="${TMPDIR:-/tmp}"
13
16
 
14
17
  FH_BACKEND="${FH_BACKEND:-auto}"