isShareablePreparedProvider (control-plane/bake-share.ts)

madarco/agentbox · apps/cli/src/control-plane/bake-share.ts · typescript · MIT
infra

* Pure logic for sharing this machine's bake records with the control box and predicting whether the control box will actually ACCEPT them. The control box adopts a shared `prepared/<provider>.json` only when its `base.contextSha256` equals the fingerprint the hub computes for th

// Source: https://github.com/madarco/agentbox | License: MIT | Copyright 2026 Marco D'Alia
// Provided via justclaw.it.com; keep this notice with the code.
/**
 * Pure logic for sharing this machine's bake records with the control box and
 * predicting whether the control box will actually ACCEPT them.
 *
 * The control box adopts a shared `prepared/<provider>.json` only when its
 * `base.contextSha256` equals the fingerprint the hub computes for the same
 * provider (`hydratePreparedFromCustody` → `matchClaudeInstallFingerprint`). A
 * push always succeeds if the box is reachable, so a plain "shared it" is not
 * the whole truth: a record from a different build context is uploaded and then
 * silently ignored, and the hub re-bakes. Callers need to say so.
 *
 * Two things break the match

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key