Skip to content

feat: shared folders - #137

Open
maxy-shpfy wants to merge 1 commit into
mainfrom
maxy/feat--shared-folders
Open

maxy-shpfy wants to merge 1 commit into
mainfrom
maxy/feat--shared-folders

Conversation

@maxy-shpfy

@maxy-shpfy maxy-shpfy commented Oct 29, 2026 •

Copy link
Copy Markdown
Collaborator

Description

Adds shared folders: server-managed "project" directories that live outside any single
session so multiple sessions can collaborate in one live workspace.

  • Bytes live under a new SHARED_ROOT/<id> directory; metadata is tracked in a new
    shared_folders SQLite table (migration 0024) with a SharedFolderStore
    (SQLite + in-memory implementations).
  • New REST surface under /api/shared-folders:
    • GET /api/shared-folders — list every shared folder (oldest first).
    • POST /api/shared-folders — create a folder and its backing directory; the creator is
      resolved from their identity when available, and the name defaults to Shared folder N.
  • Sessions can mount a shared folder via a new mount host-resource kind. A mount creates a
    one-way symlink at the session root pointing at the shared folder, so the agent reads and
    writes it with its ordinary file tools. mountName is an optional single-segment symlink
    name (defaults to a sanitized form of the folder's name).
  • Mounting is one-way — removing the catalog entry leaves the symlink in place; there is
    no unmount.
  • Session resource wiring now threads SharedFolderStore through the resource routes and
    seed deps.

Contracts (@tangent/shared), the embed types, and server docs/README are updated to
describe the feature and the new SHARED_ROOT config.

Screenshots

N/A

How to test

  1. pnpm --filter @tangent/server db:migrate to apply migration 0024.
  2. pnpm dev (local run points SHARED_ROOT at a gitignored .shared folder).
  3. POST /api/shared-folders with an optional { "name": "..." } and confirm a 201 with the
    created folder plus a backing directory under SHARED_ROOT/<id>.
  4. GET /api/shared-folders and confirm it lists the folder.
  5. Add a mount host resource to a session referencing the folderId; confirm a symlink
    appears at the session root and that two sessions mounting the same folder see each other's
    writes live.
  6. Run the server suite:
    • pnpm --filter @tangent/server exec tsx --test src/store/sqliteSharedFolderStore.test.ts
    • pnpm --filter @tangent/server exec tsx --test src/routes/sessions/resources.test.ts

Notes

  • Adds SHARED_ROOT env var — set it in deployed environments; pnpm dev defaults to
    .shared.
  • Mounting is intentionally one-way for this iteration (no unmount).

Stack created with GitHub Stacks CLI • Give Feedback 💬

@maxy-shpfy
maxy-shpfy added this pull request to stack #116 October 29, 2026 15:23
@maxy-shpfy
maxy-shpfy marked this pull request as ready for review October 29, 2026 18:50
@maxy-shpfy
maxy-shpfy removed this pull request from stack #116 October 29, 2026 18:53
@maxy-shpfy
maxy-shpfy force-pushed the maxy/feat--shared-folders branch from acc1bc7 to b26db1e Compare October 29, 2026 18:54
@maxy-shpfy
maxy-shpfy changed the base branch from maxy/feat--gate-local-agents-by-owner to maxy/fix--restore-session-envs-on-revive October 29, 2026 18:54
@maxy-shpfy
maxy-shpfy added this pull request to stack #139 October 29, 2026 18:54
@maxy-shpfy
maxy-shpfy marked this pull request as draft October 29, 2026 18:57
Base automatically changed from maxy/fix--restore-session-envs-on-revive to main October 30, 2026 00:01
@maxy-shpfy
maxy-shpfy force-pushed the maxy/feat--shared-folders branch 3 times, most recently from a29a3e7 to 9165713 Compare October 31, 2026 04:51
@maxy-shpfy
maxy-shpfy force-pushed the maxy/feat--shared-folders branch from 9165713 to ce3c98f Compare October 31, 2026 05:02
@maxy-shpfy
maxy-shpfy marked this pull request as ready for review October 31, 2026 06:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants