Skip to content

feat(pibox): take pi from llm-agents.nix, bump flake locks on a schedule - #8

Merged
sshine merged 3 commits into
mainfrom
fix/pibox-npm-lock
Jul 25, 2026
Merged

feat(pibox): take pi from llm-agents.nix, bump flake locks on a schedule#8
sshine merged 3 commits into
mainfrom
fix/pibox-npm-lock

Conversation

@sshine

@sshine sshine commented Jul 25, 2026

Copy link
Copy Markdown
Member

importNpmLock assessment

Not needed. Switching to llm-agents.nix deletes the whole buildNpmPackage, and with it the
npmDepsHash that was going stale — importNpmLock would have fixed the symptom while keeping a
pi-mono monorepo build we don't want to maintain. Also gone: the tsgo --noCheck patch, the
dist save/restore around npmInstallHook, and the canvas native buildInputs.

Side effects worth knowing:

  • pi 0.71.0 → 0.82.1, and it now tracks npm releases rather than pi-mono's default branch.
  • Upstream moved to earendil-works/pi; homepage and README updated.
  • llm-agents covers the same systems as hermes-agent (no x86_64-darwin), so pi.nix gets the
    same or (throw ...) guard hermes.nix already uses.
  • No nixpkgs.follows on llm-agents: it pins nixpkgs to match its own binary cache.

Weekly lock bump

.github/workflows/update-flake-locks.yml — Mondays plus workflow_dispatch, updates both locks
(root and the agents partition), runs nix flake check, opens a PR carrying nix flake update's
input diff. Set an optional FLAKE_UPDATE_TOKEN secret to get CI running on the bump PR;
GITHUB_TOKEN opens it but won't trigger workflows.

Also

main was failing nix flake check before this branch — treefmt wants markdown link references
below the prose. Fixed in its own commit.

Verified

nix flake check, nix run .#pibox -- --help, and nix run .#pibox -- -- --version (0.82.1
answering from inside the sandbox) on x86_64-linux.

sshine added 3 commits July 26, 2026 00:47
README:
- treefmt's markdown formatter moves reference definitions below the prose; the tree was left red.
nix/agents/pi.nix:
- Drop the local buildNpmPackage: numtide's llm-agents.nix already packages pi, at 0.82.1 vs 0.71.0.
- Also drops the tsgo --noCheck patch, the dist save/restore dance around npmInstallHook, and the
  native buildInputs for canvas — all upstream's problem now.
- Same shape as hermes.nix: an input's package with a throw for systems it doesn't cover.

npm lock:
- No importNpmLock needed. The reported failure was npmDepsHash going stale whenever upstream
  regenerated its lockfile; deleting the derivation deletes the hash, so there is nothing to pin.
- importNpmLock would have fixed the symptom while keeping a monorepo build we don't want to own.

pi upstream:
- pi moved from badlogic/pi-mono to earendil-works/pi; homepage and README updated accordingly.
- llm-agents builds from the published npm tarball, so pibox now tracks releases, not main.

llm-agents deliberately gets no nixpkgs.follows: it pins nixpkgs to match its own binary cache,
and overriding that trades cache hits for rebuilds of every agent in the set.
update-flake-locks.yml:
- Weekly on Mondays plus workflow_dispatch; updates the root lock and the agents partition's lock.
- Runs nix flake check before opening the PR, so a bump that breaks the tree fails in the job.
- Optional FLAKE_UPDATE_TOKEN secret; without it GITHUB_TOKEN opens the PR but CI won't run on it.
- PR body carries nix flake update's own input diff for both locks.

Pinned inputs only move when a consumer overrides them with .follows, which quietly pairs stale
pins with an unrelated nixpkgs. Bumping on a schedule keeps the defaults near what consumers build.
@sshine

sshine commented Jul 25, 2026

Copy link
Copy Markdown
Member Author

@aisamu: I saw your fork's feature branches. Unfortunately you submitted a pull request against your own branch, so I was not able to merge it. In the meantime, I've addressed both of your improvements here.

@sshine
sshine merged commit a31e1a1 into main Jul 25, 2026
@sshine
sshine deleted the fix/pibox-npm-lock branch July 25, 2026 23:36
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.

Improve pibox's npm lock

1 participant