Commit Graph

15 Commits

Author SHA1 Message Date
92d49571b9 pi: fix python env
Some checks failed
Build and Deploy / mreow (push) Successful in 1m14s
Build and Deploy / yarn (push) Successful in 57s
Build and Deploy / muffin (push) Failing after 32s
2026-05-05 03:22:22 -04:00
b248f3592f pi: drop redundant pkgs.ghidra from home.packages
All checks were successful
Build and Deploy / mreow (push) Successful in 2m58s
Build and Deploy / yarn (push) Successful in 1m3s
Build and Deploy / muffin (push) Successful in 1m5s
The pyghidra-mcp wrapper bakes in GHIDRA_INSTALL_DIR via makeWrapperArgs
referencing pkgs.ghidra, which makes ghidra a runtime closure dep.
Adding pkgs.ghidra explicitly to home.packages caused buildEnv to merge
*two* ghidra-12.0.4 store paths (one from pyghidra's propagatedBuildInputs,
one from the explicit list) and fail with a path collision on
GPL/DMG/LICENSE.txt.

Drop the explicit add. The agent-driven workflow doesn't need the GUI;
manual exploration via 'nix run nixpkgs#ghidra' is one command away if
ever wanted.
2026-05-04 20:36:24 -04:00
05b2741ec0 pi: generic-ize ghidra skill (drop game-specific examples) 2026-05-04 20:33:14 -04:00
feae0f8002 pi: package pyghidra-mcp + wire as OMP MCP server
Adds two inline Python derivations to home/progs/pi.nix:

  - ghidrecomp 0.5.9 (clearbluejar/ghidrecomp) — required by pyghidra-mcp,
    not in nixpkgs.
  - pyghidra-mcp 0.2.2 (clearbluejar/pyghidra-mcp) — headless MCP server
    that exposes Ghidra's analysis primitives (decompile, disassemble,
    list_strings, get_xrefs_to, etc.) over Model Context Protocol stdio.

The wrapper bakes in GHIDRA_INSTALL_DIR=${pkgs.ghidra}/lib/ghidra so
pyghidra discovers the Ghidra install at runtime without env munging.

Wires into OMP via:
  - home.packages: pyghidra-mcp + pkgs.ghidra (GUI for occasional manual
    exploration alongside the agent-driven flow).
  - ~/.omp/agent/mcp.json: registers a 'ghidra' MCP server that spawns
    pyghidra-mcp on stdio when any of its tools are invoked.
  - ~/.omp/agent/skills/ghidra/SKILL.md: tells the agent when to reach
    for Ghidra (static binary RE) vs. usbmon (dynamic capture) vs. the
    built-in tools, and gives the canonical exploration workflow.

Replaces the previously-recommended LaurieWired/GhidraMCP, which has
been stale since June 2025. clearbluejar/pyghidra-mcp is actively
maintained (last commit 3 days ago), pure-Python via pyghidra+jpype, and
multi-binary capable in a single session.

Verified: pi.nix parses, the yarn NixOS closure evaluates, both
derivations build, and the wrapped binary's --help works (Ghidra runtime
discovered correctly via GHIDRA_INSTALL_DIR).
2026-05-04 20:28:13 -04:00
35ae3087d2 pi: do not grep/find over /nix/store 2026-05-03 22:59:47 -04:00
69ac586e98 omp: remove patch 2026-05-03 22:42:43 -04:00
8768b285df pi: add android skills 2026-04-30 02:15:24 -04:00
bbdc478e84 omp: update patches
All checks were successful
Build and Deploy / mreow (push) Successful in 13m8s
Build and Deploy / yarn (push) Successful in 1m11s
Build and Deploy / muffin (push) Successful in 7m15s
2026-04-27 01:36:08 -04:00
4b173ef164 jellyfin-qbittorrent-monitor: fix hairpin handling 2026-04-26 01:03:11 -04:00
450b77140b pi: apply omp patches via prePatch (bun2nix.hook overrides patchPhase)
`bun2nix.hook` (used by upstream omp's package.nix) sets

  patchPhase = bunPatchPhase

at the end of its setup-hook unless `dontUseBunPatch` is already set.
`bunPatchPhase` only runs `patchShebangs` plus a HOME mktemp; it never
iterates over `$patches`. The standard nixpkgs `patches` attribute
therefore went into the derivation env but was silently ignored at
build time, leaving the deployed omp binary unpatched.

Switch to applying the two patches via `prePatch` (which `bunPatchPhase`
does call). Verified with strings(1) over the rebuilt binary that both
patch hunks land:

  /wrong_api_format|...|invalid tool parameters/  (patch 0001)
  stubsReasoningContent ... thinkingFormat == "openrouter"  (patch 0002)
2026-04-25 19:20:08 -04:00
318373c09c pi: patch omp to require reasoning_content for OpenRouter reasoning models
DeepSeek V4 Pro (and similar reasoning models reached via OpenRouter) reject
multi-turn requests in thinking mode with:

  400 The `reasoning_content` in the thinking mode must be passed back
  to the API.

omp's existing kimi placeholder injection (`requiresReasoningContentForToolCalls`)
covered this requirement only for `thinkingFormat == "openai"`. OpenRouter
sets `thinkingFormat == "openrouter"`, so the gate never fired even though
the underlying providers behind OpenRouter (DeepSeek, Kimi, etc.) all enforce
the same invariant.

This patch:

1. Extends `requiresReasoningContentForToolCalls` detection: any
   reasoning-capable model fronted by OpenRouter now sets the flag.
2. Extends the placeholder gate in `convertMessages` to accept
   `thinkingFormat == "openrouter"` alongside `"openai"`.

Cross-provider continuations are the dominant trigger: a conversation
warmed up by Anthropic Claude (whose reasoning is redacted/encrypted on
the wire) followed by a switch to DeepSeek V4 Pro via OpenRouter. omp
cannot synthesize plaintext `reasoning_content` from Anthropic's
encrypted blocks, so the placeholder satisfies DeepSeek's validator
without fabricating a reasoning trace. Real captured reasoning, when
present, short-circuits the placeholder via `hasReasoningField` and
survives intact.

Side benefit: also closes a latent gap where Kimi-via-OpenRouter
(`thinkingFormat == "openrouter"`) had the compat flag set but the
placeholder gate silently rejected it.

Applies cleanly on top of patch 0001.
2026-04-25 19:20:05 -04:00
8ab4924948 omp: add patch that fixes deepseek 2026-04-25 15:38:39 -04:00
a1924849d6 pi: edit AGENTS.md
Some checks failed
Build and Deploy / mreow (push) Successful in 51s
Build and Deploy / yarn (push) Successful in 54s
Build and Deploy / muffin (push) Failing after 27s
2026-04-22 21:28:20 -04:00
primary
1719d54ee0 phase 3: new flake.nix + extract common-{nix,doas,shell-fish}; rewire imports
- New unified flake with two nixpkgs channels (unstable for desktops, 25.11 for muffin)
- modules/common-{doas,shell-fish,nix}.nix extracted from duplicated blocks
- modules/desktop-common.nix: renamed from system/common.nix; secret paths point to secrets/desktop/
- hosts/{mreow,yarn}/default.nix import desktop-common; yarn imports modules/no-rgb.nix
- hosts/muffin/default.nix imports common-* + server-prefixed modules + services/; duplicate doas/fish/nix blocks removed; gc retention preserved as mkForce override
- modules/age-secrets.nix: file paths → ../secrets/server/*.age
- services/{minecraft,matrix/livekit}: secret paths → ../secrets/server/
- home/profiles/*.nix: ./progs/ → ../progs/
- hosts/{mreow,yarn}/home.nix: imports rewired to ../../home/profiles/ and ../../home/progs/
- home/progs/pi.nix and hosts/yarn/home.nix: secret reads → ../../secrets/home/
- tests/*.nix: ../modules/security.nix → ../modules/server-security.nix; ../modules/overlays.nix → ../lib/overlays.nix
- lib/default.nix: takes explicit lib param (defaults to nixpkgs-stable.lib)
2026-04-18 00:58:55 -04:00
primary
d13cec76ba phase 2: move home-manager/ → home/{profiles,progs,util,wallpaper} 2026-04-18 00:48:08 -04:00