nova-hook

command
v1.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 15, 2026 License: MIT Imports: 40 Imported by: 0

README

nova-hook

What it is

nova-hook: hooks an identity in: the pushes its role needs, live and proven, without which no bus, friend or sprint tool runs

Why use it

Tools gate the acting identity on the live, proven pushes its role needs. Some nova-bus send and recv mailbox checks are advisory by default; --require-push or NOVA_BUS_REQUIRE_PUSH=1 makes them strict. This is how you hook in, see who is, and unhook.

Install

go install github.com/mas-bandwidth/nova-tools/cmd/nova-hook@latest
nova-hook version

First run

The transcript below is executed line for line by the docs tests; the full record is in docs/TESTS.md.

$ nova-hook status --as m1
$ nova-hook hook --as m1 --role member --once
$ nova-hook unhook --as m1

A session hooks in under its Monitor with nova-hook hook --as <name> --role <role> and answers each HOOK CHALLENGE line it prints with the nova-hook prove line that challenge carries.

The heartbeat: one nova-hook serve --as <name> (hooked in as coordinator or comms) challenges every hooked coordinator, friend and comms name once a minute, as a bus message with the subject HOOK CHALLENGE nonce=<n>, through the push the name already has. Only the model answers, from inside its own turn, with nova-hook prove --as <name> --nonce <n> within the minute; no daemon, loop or script may call prove. Two unanswered in a row unhook the name. Each real change is told once per pass: the coordinator gets one FRIEND DOWN / FRIEND BACK judgment (answer with nova-bus send --re <id>; OVERDUE once after two minutes), everyone else one message (COORDINATOR DOWN as a judgment: who takes over). nova-hook friends --json is every name's state. nova-hook status --as <name> fails with NO CHALLENGE FOR <age> when no challenge came for two intervals: the server is gone.

Verbs

The reference for its verbs is docs/CLI.md.

  • status
  • hook
  • prove
  • unhook
  • friends
  • serve
  • version

Spec

The contract is docs/SPEC-HOOK.md; the module is hook/, the machine tla/Hook.tla.

Documentation

Overview

nova-hook hooks an identity in: the one record, in the bus Redis, of the pushes its role needs (the bus, the sprint, its work), each live while its holder renews a lease and proven while a proof stands (docs/SPEC-HOOK.md; the module is hook/, the machine tla/Hook.tla). Tools gate the acting identity; some bus mailbox proofs are advisory unless --require-push is set or NOVA_BUS_REQUIRE_PUSH=1. The verbs are hook, prove, unhook, status, friends and serve (the heartbeat server); the dispatch, the banner, the help, the version verb, the refusals and the output envelope are pkg/tool's, and the rules are the hook module's.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL