hyperhive/hive-ag3nt/src
Repository files (latest commit first)
Filename Latest commit message Latest commit date
iris b3f675e367 flake: lift cargo test out of buildPackage so prompt edits don't bust the binary cache (#555)
Per mara's review on PR #561: the previous commit kept
`./hive-ag3nt/prompts` in `cleanSrc` because
`hive-ag3nt::prompt::tests` had a compile-time
`include_str!("../prompts/system.md")`. That meant a prompt edit
still busted the cargo cache.

This change:

- Replaces the test-side `include_str!` with a runtime read from
  `$HIVE_ASSETS_DIR/prompts/system.md` (with a CARGO_MANIFEST_DIR
  fallback for plain `cargo test` from a checked-out repo).
- Drops `./hive-ag3nt/prompts` from `cleanSrc` — it's now
  `craneLib.cleanCargoSource ./.` (Cargo.* + *.rs only).
- Sets `doCheck = false` on `packages.default` and lifts
  `cargo test` into a separate `checks.cargo-test` derivation
  that carries the `hyperhive-assets` build input. That scopes the
  asset rebuild blast radius to the test check — `nix flake check`
  still exercises the suite, but the binary derivation no longer
  carries the assets dep.

Verified cache-invariance matrix (via `echo '' >> <f>; nix eval
.#default.outPath`):

| edit                    | default | cargo-test | clippy |
|-------------------------|---------|------------|--------|
| README.md               | stable  | stable     | stable |
| branding/hyperhive.svg  | stable  | CHANGED    | stable |
| nix/modules/*           | stable  | stable     | stable |
| prompts/system.md       | stable  | CHANGED    | stable |
| hive-c0re/src/main.rs   | CHANGED | CHANGED    | CHANGED |

(`cargo-test` CHANGED on prompts/branding is correct — tests
read the production template + need the assets output.)
2026-05-29 12:59:48 +02:00
..
bin harness: unify agent + manager prompts into single template (closes #519) 2026-05-28 00:33:43 +02:00
client.rs docs: add missing #[must_use], # Errors, # Panics across public api 2026-05-22 19:41:27 +02:00
events.rs clippy: fix lints that crane's cargoClippy properly enforces (#538) 2026-05-29 01:45:48 +02:00
forge_notify.rs clippy: fix lints that crane's cargoClippy properly enforces (#538) 2026-05-29 01:45:48 +02:00
lib.rs harness: unify agent + manager prompts into single template (closes #519) 2026-05-28 00:33:43 +02:00
login.rs refactor: per-agent state paths (/agents/{label}/state), centralize in paths.rs 2026-05-16 15:18:32 +02:00
login_session.rs docs: add missing #[must_use], # Errors, # Panics across public api 2026-05-22 19:41:27 +02:00
mcp.rs clippy: fix lints that crane's cargoClippy properly enforces (#538) 2026-05-29 01:45:48 +02:00
paths.rs fix: manager uses /agents/hm1nd/state, not /state, for HYPERHIVE_STATE_DIR 2026-05-20 13:35:12 +02:00
plugins.rs add optional in_reply_to field on send for conversation threading 2026-05-20 13:35:27 +02:00
prompt.rs flake: lift cargo test out of buildPackage so prompt edits don't bust the binary cache (#555) 2026-05-29 12:59:48 +02:00
serve_common.rs harness: flip into needs_login on 401 mid-turn (closes #419) 2026-05-25 21:50:21 +02:00
stats.rs docs: add missing #[must_use], # Errors, # Panics across public api 2026-05-22 19:41:27 +02:00
turn.rs rust+nix: load static assets at runtime, drop build.rs (#555) 2026-05-29 12:59:48 +02:00
turn_stats.rs docs: add missing #[must_use], # Errors, # Panics across public api 2026-05-22 19:41:27 +02:00
web_ui.rs rust+nix: load static assets at runtime, drop build.rs (#555) 2026-05-29 12:59:48 +02:00