feat(research,cli): documents — the template port, the default ability, media's optional peers - #27
Merged
Conversation
…y, media's optional peers The research template attaches PDFs. Ported from the casework where it was built and proved (lloyal-ai/hdk#120 carries the runtime): harness - documents joins the abilities and factories; config-less abilities enable in one loop; a run is staged with the thread's roots (`stagedRoots`) into `agentPool({ attachments })`; the trunk prefill records only PROJECTED roots; `RunDirSink` books the roots a tool result admitted from the `agent:prefilled` bus event, so the meta line, later runs and reopen carry them; the reducer grows the live ask (or the cold brief) as they land. - pipeline: `attachments` flow to the spine block, the planner context and the probe; `researchable()` leaves an ability with an empty catalog off the spine; the citation nudge names `attachment://…/page/N`. targets - one transport fact on the bridge, `contentOrigin()`; `content-urls.ts` derives every door (ingress, manifest, config, source, representation). - Composer accepts `image/*,application/pdf` and shows the ADMITTED thing; Figures shows the document card (first-page render, page facts, the PDF in the lightbox through `/source`); Prose resolves `attachment://` citations. - web: `createContentIngress`, the signal forwarded, the upload allowance from media's constants; Vite pre-bundles `@lloyal-labs/media`. - package.json: `sharp` and `@embedpdf/pdfium` — media's optional peers — so a fresh scaffold can admit an image and a PDF. tests: `content-urls.test.ts`, `documents.scenario.test.ts`, the reducer's admission fold, the run dir's admission via the bus. cli - `DEFAULT_ABILITIES.research` += `lloyal/documents@0.1.0` (merge after the catalog approves it: `lloyal new` vendors it, the harness imports it). - `link-local` knows the documents workspace package. - ci: the template ship-count pin follows the three new files (131 → 134).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
The research template attaches PDFs: the port of the documents arc from the casework where it was built and proved end to end. Runtime side: lloyal-ai/hdk#120.
agentPool({ attachments }); admissions booked from theagent:prefilledbus event (meta line, later runs, reopen) and folded live into the ask;researchable()keeps an ability with an empty catalog off the spine.contentOrigin()on the bridge andcontent-urls.tsfor every door; Composer accepts images and PDFs and shows the admitted thing; Figures shows the document card with page facts and opens the PDF through/source; Prose resolvesattachment://citations; web serve installscreateContentIngresswith media's upload allowance.sharpand@embedpdf/pdfium, media's optional peers. Without them a fresh scaffold fails at the first image or PDF attach.DEFAULT_ABILITIES.research+=lloyal/documents@0.1.0;link-localknows the documents package; the template ship-count pin moves 131 → 134.Merge order
Do not merge before
lloyal/documents@0.1.0is approved in the catalog.lloyal new researchvendors the default abilities from the catalog, and the harness imports the package; a scaffold made before approval would warn at vendoring and fail to boot.Checks
npm run typecheckclean ·vitest run22 files / 211 green (three expectations updated for the third default ability; the post-rename rule now applies to the abilities that were renamed). The scaffold proof against the published alpha.4 set follows the cut.