feat(slides): bucket C — slide linking, hash-based staleness, folder.pick (closes #54) #55
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "development_mik"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #54
Implements the five JSON-RPC methods declared in
openrpc.jsonthat were returning-32000 "Method not found":slide.setLink,slide.clearLink,slide.getStaleness,deck.staleness,folder.pick.Per the locked design in #54 (mik-tf, 2026-05-10) with three reconciliations vs the issue body, all captured in
decisions/D-09-slide-linking-and-staleness.mdin the workspace tracker:compute_inputs_hash,DeckInputsContext,last_generatedsnapshot) rather than file mtimes. Produces per-component reasons:content_edited/theme_edited/context_edited/prompts_edited/model_changed/link_broken/never_generated/inputs_changed.SlideLink+SlideMetaEntry.source_linkrather than a rawlinked_tostring. Cycle detection atsetLinktime rejects A→B→A loops.setLinkcopies the source slide PNG into the destinationoutput/for immediate display;clearLinkremoves the link but leaves the PNG.folder.pickreads a hero_proc secret allowlist (folder_pick_allowed_roots, contexthero_slides, newline-separated) with~/Documentsfallback. Schema description flipped from "native OS dialog" (architecturally wrong over JSON-RPC) to allowlist semantics. Params/result shape unchanged.Also fixes a pre-existing bug surfaced during e2e verification:
slide_generate_with_selectionandslide_generate_with_contextonly persistedSlideMetaEntry.hashon successful AI render, never the ADR-0007 inputs-hash snapshot fields. Without those, every generated slide stayed in the back-fill rule forever andcontent_editednever fired. Snapshot is now written in both functions.openrpc.client.generated.rsis thebuild.rsregeneration of the typed client (deck.staleness+slide.getStalenessparam flip to{collection, deck[, slide]}, plus newreasonsfield).Test plan (verified locally before push)
folder.pickreturns~/Documentsvia dashboardrpc()deck.staleness+slide.getStalenesswith correct reasons attribution on real post-ADR-0007 entryslide.setLinkcycle rejection (self-link + A→B→A both error)slide.setLinksource-PNG mirror verified md5-byte-for-byte to destinationslide.clearLinkremovessource_linkfrom metadata, leaves PNGRequires the matching aibroker fix at https://forge.ourworld.tf/lhumina_code/hero_aibroker for image response passthrough.
Signed-off-by: mik-tf