Skip to content

feat: watch a NextExplorer location as the consume folder - #11

Draft
helix-a wants to merge 1 commit into
mainfrom
feat/nextexplorer-consume
Draft

helix-a wants to merge 1 commit into
mainfrom
feat/nextexplorer-consume

Conversation

@helix-a

@helix-a helix-a commented Sep 25, 2026

Copy link
Copy Markdown
Member

Summary

Closes #10. Set Consume Folder gets a third source: a NextExplorer location (default Paperless). Documents dropped into it are imported and then deleted, the same as with FileBrowser Quantum (#9).

  • Mount: NextExplorer's data volume, read-write, at /mnt/nextexplorer, only while this source is selected. PAPERLESS_CONSUMPTION_DIR is /mnt/nextexplorer/<location>. Read-write is required for the reason feat: watch a FileBrowser Quantum folder as the consume folder #9 gives. NextExplorer chowns its volume to uid 1000 on every start, the same uid Paperless runs as, so no idmap is needed.
  • The location is NextExplorer's own. The action runs NextExplorer's add-location directly (feat: let dependents run add-location Start9Labs/nextexplorer-startos#6 opens it with access: 'dependent'). NextExplorer's own checks apply to the name, so it cannot land in _users or on a reserved prefix. An existing location is accepted, and the location shows up under Locations in NextExplorer. Nextcloud already exposes every NextExplorer location except _users as external storage, so drop-to-ingest from Nextcloud (Feature Request: Optionally share Paperless consume folder with Nextcloud for drop-to-ingest #3) works.
  • Ordering: the OS lets only a declared dependent run the action, so the handler does three things in order:
    1. Refuses up front if NextExplorer isn't installed.
    2. Declares the nextexplorer dependency and runs add-location.
    3. Writes the store only after that succeeds. So a rejected name never reaches the daemon; on failure the dependency set is recomputed from the unchanged store.
  • Dependency: nextexplorer, exists, >=3.1.0:1 && <4.0.0:0, declared only while it is the source. This is the same upper cap Nextcloud uses.
  • paperlessDaemons takes one consumeFolder argument (filebrowser | nextexplorer | null) in place of filebrowserSubfolder. The install bootstrap still passes null, so feat: watch a FileBrowser Quantum folder as the consume folder #9's fix for the re-running init is kept.
  • The prefill now reads with .once(), per the guide.
  • nextexplorer-startos#next is added as a type-only dependency, for the typed mountDependency.
  • The version goes to 2.20.15:6, since :5 is on community-prod.

Draft until the SDK 3.0 sweep lands here

Running another package's action with input is @start9labs/start-sdk 3.0.0 (Start9Labs/start-technologies#4069), which needs StartOS 0.4.0.2. The 3.0.0 bump belongs to the fleet sweep's PR, so against 2.0.9 this does not type-check. Against a local 3.0.0 build, startos/ is clean. The only error is inside node_modules/nextexplorer-startos (the sweep's §5 execFail change), which clears once NextExplorer's own bump lands on its next.

To finish:

Not exercised on a box.

🤖 Generated with Claude Code

Set Consume Folder gains a third source, a NextExplorer location
(default `Paperless`), mounted like FileBrowser Quantum's volume:
NextExplorer's `data` read-write at /mnt/nextexplorer, with
PAPERLESS_CONSUMPTION_DIR at the location. NextExplorer also serves its
volume as uid 1000, so no idmap is needed.

The action creates the location itself by running NextExplorer's
add-location (`access: 'dependent'`). The OS admits the call only from a
declared dependent, so the handler declares the dependency first. The
store is written only after the location exists, so a name NextExplorer
rejects never reaches the daemon; on failure the dependency declaration
is recomputed from the unchanged store.

paperlessDaemons takes a single `consumeFolder` argument in place of
`filebrowserSubfolder`, so the install bootstrap keeps passing `null`.

Closes #10. Built against @start9labs/start-sdk 3.0.0; held as a draft
until the 3.0.0 fleet sweep and NextExplorer's matching change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Add NextExplorer as a selectable source for the Set Consume Folder action

1 participant