Mirrors the federation_send budget envelope work that landed in 7e1cc06
into the user-facing Claude Code plugin so end users can discover and use
the new controls.
Files:
plugins/ruflo-federation/.claude-plugin/plugin.json
Bump 0.1.0 → 0.2.0 (the budget circuit breaker is a meaningful
surface change). Add circuit-breaker / budget / token-quota
keywords. Description gains "and per-call budget circuit breaker
(ADR-097)".
plugins/ruflo-federation/README.md
New "Budget Circuit Breaker (ADR-097)" bullet under What's Included.
Full new section "Budget & Circuit Breaker" with the field table
(maxHops/maxTokens/maxUsd/hopCount/spent), defaults, hard ceilings,
validation behavior, and the Phase 1/2/3 roadmap. Notes constant-
string error responses (HOP_LIMIT_EXCEEDED, BUDGET_EXCEEDED) and
the anti-oracle posture.
plugins/ruflo-federation/commands/federation.md
Add `send <node-id> <message-type> <payload>` subcommand to the
Usage block. Document the seven budget options (--max-hops,
--max-tokens, --max-usd, --hop-count, --spent-tokens,
--spent-usd) with defaults. List the constant-string error codes.
Add the npx invocation step.
plugins/ruflo-federation/agents/federation-coordinator.md
Add responsibility #6 — budget enforcement — to the agent's job
description. Add the `send` invocation under Tools so the agent
knows the new option set.
No code changes — this is the surface that end users actually consume
when they /plugin install ruflo-federation, so it has to track the
underlying plugin's API.
Drove the live-Seed smoke harness from 11/24 to 24/25 covered, then 21/25
passing on link-local HTTP (the remaining 4 are real Seed security
boundaries, not plugin bugs).
Plugin source fixes (cli-commands.ts):
- iot query: handler now accepts --vector "[..]" JSON arg and parses to
number[] (was: passed empty array; result was always nearest-neighbour
to origin)
- iot ingest: handler now accepts --vector "[..]" --metadata "{..}" OR a
JSON array on stdin (was: stub that always passed []; the SDK rejected
empty arrays). Uses the SDK's expected {values, metadata} shape.
- New parseVector helper validates JSON array of numbers.
Smoke harness (__tests__/integration/full-plugin-smoke.mjs):
- Rewrote to 25 commands across 7 tiers (init/lifecycle, read-only,
vector ops, pair round-trip, fleet ops, firmware reads, deregister).
- Pair flow opens pair window via direct API call first (the plugin
doesn't expose pair-window control yet — known gap).
- Bearer-required failures (unpair, ingest write) classified as expected
on link-local; firmware deploy/advance/rollback explicitly skipped
(OTA-can-brick).
- Pass-through dArgs() helper handles cli-commands.ts arg-style
inconsistency (some handlers read args._[0], others args['device-id']).
Cognitum.one mention (per user request):
- v3/@claude-flow/plugin-iot-cognitum/package.json: description now
includes "Get a Seed at https://cognitum.one"; added homepage field.
- New README.md for the npm package — full command reference with
cognitum.one link prominent at the top.
- plugins/ruflo-iot-cognitum/README.md: "Hardware" section added with
cognitum.one link and link-local + LAN endpoint reference.
Bump to 1.0.0-alpha.4. Published to npm (alpha + latest).
Known gaps for follow-up (not blockers, real Seed limits):
- ingest/unpair require bearer auth via https://...:8443 — plugin doesn't
support the bearer transport yet
- pair window opening isn't exposed as a CLI command
- iot pair triggers Seed rate-limiter (HTTP 429) when called repeatedly
- SDK's witness.chain() returns 0 length while raw API shows 49,138
entries — different endpoint shape
Co-authored-by: Reuven <cohen@ruv-mac-mini.local>
The create-plugin skill was instructing agents to generate plugin.json
with skills, commands, and agents arrays — these fields cause
claude plugin validate to fail. Claude Code auto-discovers them.
Co-Authored-By: claude-flow <ruv@ruv.net>