SLOPSHOPPER

nixie-throw-hook-catch

SDK contract probe: a policy mod whose throwing tool.call hook has a .catch handler

guard
A shopper browsing a rack in a slop shop
Preview · a replayed session in a sandbox
claude · ~/work/app · nixie-throw-hook-catch
› fix the failing auth test and add an audit log call ⏺ Read(src/auth.ts) ⎿ Read 6 lines ⏺ Update(src/auth.ts) ⎿ Added 2 lines, removed 1 line ⏺ Bash(bun test) ⎿ Denied by nixie-throw-hook-catch: nixie policy failed (throw: nixie-throw-hook-catch: hook failed), so the ● Done. refresh now rejects expired claims and logs an audit event. ✻ Worked for 42s · done 4:20 PM ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── › ? for shortcuts
README

<h1>nixie</h1>

A personal assistant platform that its owner runs and controls: every rule readable and editable, every decision recorded, and personal data kept on the owner's own hosts.

<a href="./docs/README.md">Documentation</a> • <a href="./docs/README.md#decisions">Decisions</a> • <a href="./AGENTS.md">Agent Guidelines</a>

Status

nixie is in Phase 2, Research, and has no product code. The work runs in 4 phases: brainstorm, research, design, and decide. Decisions are recorded as research settles each question.

Checks

bun install
bun run check        # every check CI runs

Layout

  • docs/ holds the overview, the principles, the scope, the decision records, and the designs for what is not built yet. Start with the overview.
  • research/ holds the spikes: throwaway experiments that answer research questions.
Source 1 files
hooks/register.js 16 lines
1export function register(on) {
2  // `.catch` here is the mods API's error handler on a registration, not a promise method.
3  // oxlint-disable-next-line promise/prefer-await-to-then
4  on('tool.call', { tool: 'Bash' }, handleToolCall).catch(handleFailure);
5}
6
7function handleToolCall() {
8  throw new Error('nixie-throw-hook-catch: hook failed');
9}
10
11function handleFailure($, event, next) {
12  return {
13    deny: `nixie policy failed (${next.error.kind}: ${next.error.message}), so the command did not run.`,
14  };
15}
16