Repository navigation
✨ Inbox: drag and drop documents into the Inbox - #18411
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Open PR overlap checkBase branch: Conflicts are checked with every PR merged onto the current tip of
|
|
Hive status — updated in place; edits do not notify. Full history is in the Activity Monitor. @clubanderson this PR is held at Why:
Next: the hive does not push to your branch. Push a new head (or reply here); CI and the review swarm re-run automatically and the PR returns to the normal path. Evidence bundle `#184115116c99` sha256:69e51a0bf4afb078eb57bbbeede2b2bb266bf0552811523f8623ad31ff238459 — download from the dashboard or `hivectl review evidence #18411`. |
Drop files onto the Inbox, use the new Add button, or paste them with Ctrl/Cmd+V: Markdown, text, JSON, JSON Lines, YAML, CSV and TSV become upload items with extracted markdown and a Knowledge fact. - Content sniffing (magic bytes, UTF-8, parse check), never the name or client MIME alone; executables, archives, PDF, Office and media refused. - Per-file progress rows and errors; owner and read-write only. - Storage under connector-state/uploads/<id>/ (0700/0600), per-hive quota, files-per-drop and per-file caps (inbox.uploads.*, env overrides), retention sweep for originals. - Extracted text fenced with WrapUntrusted in the fact and before any agent prompt; audited per user as inbox_upload. Signed-off-by: Andy Anderson <andy@clubanderson.com>
… items Signed-off-by: Andy Anderson <andy@clubanderson.com>
…imit Signed-off-by: Andy Anderson <andy@clubanderson.com>
92772aa to
5116c99
Compare
|
merged by Hive trusted-author auto-merge: author @clubanderson holds role owner and GitHub permission admin on repo; CI green at 5116c99. |
Mutation testing⏱️ The 900s mutation budget ran out, so 1 package(s) were not fully mutated and the results below do not cover them:
❌ gremlins did not produce a report for 1 package(s), so no verdict can be derived from this run (see the job log):
6 mutant(s) in changed files are not reached by any test (NOT COVERED). A maintainer may apply the
Verdict: |
First PR of drag-and-drop ingest for the Inbox: text documents, the drop/Add UI and the new
uploadsource. URL fetch (SSRF guard), docx, sandboxed PDF and audio/video drops follow in separate PRs; audio/video will plug into the in-hive recording pipeline once it lands.What it does
uploadandPOST /api/inbox/uploads(multipart, one or morefilefields). Items showupload · <filename>, who added them, and work with the Share menu, fact status and route history like any other item. Audited per user asinbox_upload(outcome or refusal code, size; never content or file name).#heading.gopkg.in/yaml.v3(already a dependency, MIT/Apache-2.0); fenced block with a summary.encoding/csv; markdown table preview of the first 20 rows (pipes escaped, 20 columns max) with row and column counts..doc,.rtf,.odt,.pptx,.xlsxare refused with a message saying what to save it as.connector-state/uploads/<id>/(0700) withoriginal,extracted.md,meta.json(0600, exclusive create). Ids are validated by regexp, so request paths never leave the store.connectors/personal/upload-<id>.md(source: upload,attr_upload_content: ready,attr_added_by), with the text inside theWrapUntrustedenvelope; the vault is connected and reindexed at once. Destinations get the text viaContent.Markdown(labelled## Document), and the agent prompt wraps it again.inbox.uploads.*, env overridesHIVE_INBOX_UPLOADS_*):max_file_bytes25 MiB,max_files_per_drop20,quota_bytes2 GiB,document_retention_days0 (keep),media_retention_days5. An hourly retention sweep deletes only originals; text, meta, item and fact stay.Sec-Fetch-Site: cross-site) are refused on top of the SameSite=Lax session cookie.Tests
SetSourceskeeping the source, config defaults/env/validation, and the HTTP role matrix (read 403, unverified owner 403, cross-site 403), per-file statuses, mixed drops and audit entries.Docs
New
docs/inbox-uploads.md(types, limits, retention, privacy, API), API reference row,dashboard/openapi.json, security model paragraph, env vars, documentation map, changelog fragment.static/index.htmlregenerated.No new dependencies.
🤖 Generated with Claude Code