Skip to content

update - #8

Merged
a9lim merged 5 commits into
mainfrom
dev
Apr 29, 2026
Merged

update#8
a9lim merged 5 commits into
mainfrom
dev

Conversation

@a9lim

@a9lim a9lim commented Apr 29, 2026

Copy link
Copy Markdown
Owner

better hermes support

a9lim added 2 commits April 29, 2026 11:31
Added a section for reporting issues in the README.
@a9lim a9lim changed the title better hermes support update Apr 29, 2026
a9lim and others added 3 commits April 29, 2026 14:57
…opencode install

Five additive features landing together. The provider abstraction is load-bearing
for the rest.

- providers/: Provider ABC and normalized error taxonomy in base.py;
  PiShockProvider extracted out of server.py; OpenShockProvider talks to
  api.openshock.app (or self-hosted via base_url) over httpx with the
  OpenShockToken header; MockProvider replaces dry_run's MagicMock-spec
  gymnastics. Config gains [provider] kind = "pishock" or "openshock" with
  sub-tables; legacy [auth] still loads as a pishock back-compat shim. New
  errors (DeviceOfflineError, DevicePausedError, ShockNotAllowedError,
  ProviderAuthError, ProviderError) are the seam server.py catches on.

- reason: optional str on the rlaif tool, clipped to 200 chars, threaded
  through safety.authorize onto OpRecord. Audit-only, never gates the call.
  Surfaces in rlaif_log.

- [tool] purpose preamble: operator-authored string prepended to the rlaif
  tool description. compose_rlaif_description keeps the spec frame
  byte-for-byte at the tail; test_server.py still locks the frame.

- rlaif log --stats: histograms (intensity buckets, refusal reasons, hourly
  volume) plus counts and an intensity*duration_s energy proxy. Pure read of
  the existing jsonl, no MCP round-trip.

- opencode auto-install: OpencodeJsonAdapter handles opencode's mcp.<name>
  schema with command-as-array. JSONC files redirect to rlaif snippet opencode.

Tests: 219 (was 105). pyright strict clean, ruff clean, rlaif dry-run green.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
CodeQL flagged init.py:write_text as cleartext storage of sensitive data
(rule py/clear-text-storage-sensitive-data). The storage is intentional —
rlaif is a single-user CLI, config.toml is chmod 0600 immediately after
the write, and the pattern matches every MCP client we generate snippets
for. Adding a 7-line block comment at the call site so the rationale is
discoverable from the code, not just from the dismissed alert.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@a9lim
a9lim merged commit df4e6ce into main Apr 29, 2026
11 checks passed
a9lim added a commit that referenced this pull request Apr 30, 2026
Pulls the duplicated authorize -> fire -> commit|rollback shape out of
handle_rlaif_negative and handle_rlaif_positive into a private
_fire_channel helper. Each handler still owns its own typed-error
dispatch table, so Provider and RewardProvider namespaces stay disjoint
at the call site (CLAUDE.md hard rule #8). The watchdog no-refund
contract (hard rule #6) is encoded as the single refund=False entry in
the positive-channel table.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant