@polydeukes/adapter-grok
v0.10.0
Published
Polydeukes adapter for Grok — up-translates PreToolUse hook payloads into the agent-neutral covenant input IR and registers the session surface. Beta.
Readme
@polydeukes/adapter-grok
English · 한국어
This adapter is the install unit for the Grok session surface. It translates Grok PreToolUse
payloads into covenant input IR, spawns the judge, and ships the pdks-grok bin that registers
the surface in a project.
Install it next to polydeukes, which it names as a peerDependency:
npm install --save-dev polydeukes @polydeukes/core @polydeukes/adapter-grok
npx pdks-grok initInstalling both this adapter and @polydeukes/adapter-claude-code in one project can run the
judge twice per call.
Overview
Public contract symbols include:
runHookCOMMAND_ARGSMUTATING_TOOLSSHELL_TOOLS
Examples
import { runHook } from '@polydeukes/adapter-grok';
// Reads the payload from stdin, spawns `pdks covenant check --enforce block` in repoRoot,
// and returns that child's exit code. This is what the generated hook delegator calls.
const { exitCode } = runHook({ repoRoot: process.cwd() });