SLOPSHOPPER

nixie-busy-loop

SDK contract probe: a policy mod whose tool.call hook blocks the hooks worker

guardcommand
A shopper browsing a rack in a slop shop
Preview · a replayed session in a sandbox
claude · ~/work/app · nixie-busy-loop
› 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) ⎿ 3 pass, 1 fail ● Done. refresh now rejects expired claims and logs an audit event. ✻ Worked for 42s · done 4:20 PM › /nixie-alive ⎿ nixie-busy-loop: nixie-policy alive ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── › ? 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 37 lines
1export function register(on) {
2  on('session.start', handleSessionStart);
3  on('command.run', { command: 'nixie-alive' }, handleAliveCommand);
4  on('tool.call', { tool: 'Bash' }, checkBash);
5}
6
7// The MARK_BLOCK hook never yields, so the hooks worker stops answering.
8// /nixie-alive answers only while the module is loaded, so a host can probe for it.
9async function handleSessionStart($, event, next) {
10  await $.command.register({
11    description: 'Report that the nixie policy mod is loaded',
12    immediate: true,
13    name: 'nixie-alive',
14  });
15  return next(event);
16}
17
18function handleAliveCommand() {
19  return { text: 'nixie-policy alive' };
20}
21
22function checkBash($, event, next) {
23  if (event.command.includes('MARK_BLOCK')) {
24    runForever();
25  }
26  if (event.command.includes('MARK_DENY')) {
27    return { deny: 'nixie-busy-loop denied this command.' };
28  }
29  return next(event);
30}
31
32function runForever() {
33  while (true) {
34    // Spin without awaiting.
35  }
36}
37