Repository navigation
feat: use pi-memory in projects - #2973
maxy-shpfy wants to merge 1 commit into
Conversation
3cec55f to
5e388a5
Compare
🎩 PreviewA preview build has been created at: |
| "@tangent/embed-react": "github:TangleML/tangent-shell#8f2c11c4611eac24732d1e54ac934a2d30905c70&path:packages/embed-react", | ||
| "@tangent/remote-subagent": "github:TangleML/tangent-shell#8f2c11c4611eac24732d1e54ac934a2d30905c70&path:packages/remote-subagent", | ||
| "@tangent/shared": "github:TangleML/tangent-shell#8f2c11c4611eac24732d1e54ac934a2d30905c70&path:packages/shared", | ||
| "@tanstack/history": "1.162.5", | ||
| "@tanstack/react-query": "^5.105.0", |
There was a problem hiding this comment.
This changes are TMP just for tophatting - will be reverted before merge as soon as shell PR TangleML/tangent-shell#145 landed
There was a problem hiding this comment.
AI facilitated response
Still open: the @tangent/* pin to 8f2c11c is still in package.json (the three dependencies and the pnpm.overrides entry). Leaving this unresolved until TangleML/tangent-shell#145 lands and the pin is switched to its merge commit on main, or back to #main.
5e388a5 to
5feeca8
Compare
camielvs
left a comment
There was a problem hiding this comment.
🤖 This is an AI-generated code review comment.
4 findings inline (1 high, 2 medium, 1 low). CI is green; GitHub reports a conflict in pnpm-lock.yaml with master (from #2979), so this needs a rebase.
Cross-repo, for TangleML/tangent-shell#145: shared folders have no access checks there. GET /api/shared-folders returns every folder with its id, and applyMount doesn't check who's asking, so anyone using the same Tangent server could mount another project's shared memory, including projects in workspaces they don't belong to. The fix belongs in tangent-shell, but this PR is the first to write project knowledge into those folders, so it's worth confirming they get the same access limits as sessions before this ships.
5feeca8 to
281e348
Compare
Description
Gives every Tangent session in a project a shared, persistent memory so later sessions build on what earlier ones learned, instead of each session starting cold with its own private store.
On the first session start in a project, a Tangent shared folder is provisioned and its id is saved in the project metadata (
tangentSharedFolderId); subsequent sessions reuse it. Each session then mounts that folder asproject/and binds a composite memory — a human-readablesimple-mdnote underproject/NOTESplus api-memorystore underproject/pi-memory— somemory_*tool writes and files are visible across all sessions in the project. When a shared folder exists, the session's standing memory seed also includes a brief explaining how to use it (record decisions/conventions withmemory_write,memory_searchbefore re-deriving, keepproject/NOTES/MEMORY.mdcurrent, never write secrets).Provisioning is defensive: it reads project metadata from the server (not the cache) because the PATCH replaces the whole metadata object, and re-reads after creating the folder so a folder another tab saved in the meantime wins rather than splitting memory across two stores. The mutation uses a per-project scope so concurrent starts run one at a time and reuse the first folder. Any failure (missing base URL/token, Tangent or project API refusal) resolves to
undefinedso the session still starts — just without the shared folder.Also bumps the
@tangent/*dependencies frommainto a pinned commit that provides thepi-memorymemory binding support.Related Issue and Pull requests
Type of Change
Line Breakdown
Checklist
Screenshots (if applicable)
Tangent.-.Project.memory.preview.mp4
Test Instructions
tangentSharedFolderId.memory_writeto record something, then start a second session in the same project and confirmmemory_searchsurfaces it and files written underproject/are visible.Additional Comments