{"_id":"@arvoretech/pi-cloud-sessions","_rev":"4-c0de44eec284444b9372f692bc437834","name":"@arvoretech/pi-cloud-sessions","dist-tags":{"latest":"0.2.2"},"versions":{"0.1.0":{"name":"@arvoretech/pi-cloud-sessions","version":"0.1.0","keywords":["pi","extension","sessions","sync","cloud","git","icloud"],"author":{"name":"Arvore"},"license":"MIT","_id":"@arvoretech/pi-cloud-sessions@0.1.0","maintainers":[{"name":"joao.barros.arvore","email":"joao.barros@arvore.com.br"},{"name":"rafsouza","email":"rafasouza@protonmail.com"},{"name":"pedro.adas","email":"pedro.adas@gmail.com"},{"name":"guilhermebs","email":"guilhermebscontact@gmail.com"},{"name":"ricardoraposorfox","email":"ricardorbxx1@gmail.com"},{"name":"jott4","email":"jvgcunha2002@gmail.com"},{"name":"vitor.piovezan","email":"vitor.piovezan@arvore.com.br"}],"homepage":"https://github.com/arvoreeducacao/arvore-pi-extensions#readme","bugs":{"url":"https://github.com/arvoreeducacao/arvore-pi-extensions/issues"},"pi":{"extensions":["./dist/index.js"]},"dist":{"shasum":"7221077fcf92f503279836738ad22bc996cc3b03","tarball":"https://registry.npmjs.org/@arvoretech/pi-cloud-sessions/-/pi-cloud-sessions-0.1.0.tgz","fileCount":38,"integrity":"sha512-4NAUtQHW88dkG0Ln5Wca4wAOxVvKMCQSW1HcdQcrvdtODMECghDVFxByuyW09FtcgcEeFb5Zu01Cv8NADSoQCQ==","signatures":[{"sig":"MEUCIQDD27IrGr8akVZiGbL+E9yADZsun4Bpg4IEXMcYCXzG+gIgSYpdwtpMXJmX4HvnoXZc4poFHVAiLJ41ZNiAxdwr4ig=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":59856},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","gitHead":"b93c9d74c6fc594ea77bd30fd72b06963e7c32bc","scripts":{"dev":"tsc --watch","lint":"tsc --noEmit","build":"tsc"},"_npmUser":{"name":"joao.barros.arvore","email":"joao.barros@arvore.com.br"},"repository":{"url":"git+https://github.com/arvoreeducacao/arvore-pi-extensions.git","type":"git","directory":"packages/cloud-sessions"},"_npmVersion":"10.9.8","description":"PI extension that syncs your pi sessions to a cloud backend (private Git repo or iCloud Drive) so you can resume them from any machine","directories":{},"_nodeVersion":"22.22.3","_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.3.0","@types/node":"^20.10.0","@earendil-works/pi-ai":"^0.79.4","@earendil-works/pi-tui":"^0.79.4","@earendil-works/pi-coding-agent":"^0.79.4"},"peerDependencies":{"@earendil-works/pi-coding-agent":">=0.74.0"},"_npmOperationalInternal":{"tmp":"tmp/pi-cloud-sessions_0.1.0_1781911090718_0.5315434217380173","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@arvoretech/pi-cloud-sessions","version":"0.2.0","keywords":["pi","extension","sessions","sync","cloud","git","icloud"],"author":{"name":"Arvore"},"license":"MIT","_id":"@arvoretech/pi-cloud-sessions@0.2.0","maintainers":[{"name":"joao.barros.arvore","email":"joao.barros@arvore.com.br"},{"name":"rafsouza","email":"rafasouza@protonmail.com"},{"name":"pedro.adas","email":"pedro.adas@gmail.com"},{"name":"guilhermebs","email":"guilhermebscontact@gmail.com"},{"name":"ricardoraposorfox","email":"ricardorbxx1@gmail.com"},{"name":"jott4","email":"jvgcunha2002@gmail.com"},{"name":"vitor.piovezan","email":"vitor.piovezan@arvore.com.br"}],"homepage":"https://github.com/arvoreeducacao/arvore-pi-extensions#readme","bugs":{"url":"https://github.com/arvoreeducacao/arvore-pi-extensions/issues"},"pi":{"extensions":["./dist/index.js"]},"dist":{"shasum":"d804997f85d5af7f6aee38d551f41b5d406551f2","tarball":"https://registry.npmjs.org/@arvoretech/pi-cloud-sessions/-/pi-cloud-sessions-0.2.0.tgz","fileCount":38,"integrity":"sha512-cBMHNCr7uujX6qoH7L/m9LYn7MEUAn3LSvZ1BOyKQx6DzL+vDfgWck3JXqsUrLFUzr2UCioXpmmaokKerIALYw==","signatures":[{"sig":"MEYCIQCKSrqzANlC4GsBLHLP9PXimctCPf1bPQ8OsvxQ49teeQIhALz0DlW3ugCbbGm3l6TK/Jk1W+qentIXgeX1YATsdcDQ","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@arvoretech%2fpi-cloud-sessions@0.2.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":66419},"main":"dist/index.js","type":"module","_from":"file:/tmp/arvoretech-pi-cloud-sessions-0.2.0.tgz","types":"dist/index.d.ts","scripts":{"dev":"tsc --watch","lint":"tsc --noEmit","build":"tsc"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:3b2fd564-98c2-440d-9278-e34eaa9e4e75"}},"_resolved":"/tmp/arvoretech-pi-cloud-sessions-0.2.0.tgz","_integrity":"sha512-cBMHNCr7uujX6qoH7L/m9LYn7MEUAn3LSvZ1BOyKQx6DzL+vDfgWck3JXqsUrLFUzr2UCioXpmmaokKerIALYw==","repository":{"url":"git+https://github.com/arvoreeducacao/arvore-pi-extensions.git","type":"git","directory":"packages/cloud-sessions"},"_npmVersion":"11.17.0","description":"PI extension that syncs your pi sessions to a cloud backend (private Git repo or iCloud Drive) so you can resume them from any machine","directories":{},"_nodeVersion":"22.22.3","_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.3.0","@types/node":"^20.10.0","@earendil-works/pi-ai":"^0.79.4","@earendil-works/pi-tui":"^0.79.4","@earendil-works/pi-coding-agent":"^0.79.4"},"peerDependencies":{"@earendil-works/pi-coding-agent":">=0.74.0"},"_npmOperationalInternal":{"tmp":"tmp/pi-cloud-sessions_0.2.0_1782141037175_0.9869456424317293","host":"s3://npm-registry-packages-npm-production"}},"0.2.1":{"name":"@arvoretech/pi-cloud-sessions","version":"0.2.1","keywords":["pi-package","pi","extension","sessions","sync","cloud","git","icloud"],"author":{"name":"Arvore"},"license":"MIT","_id":"@arvoretech/pi-cloud-sessions@0.2.1","maintainers":[{"name":"joao.barros.arvore","email":"joao.barros@arvore.com.br"},{"name":"rafsouza","email":"rafasouza@protonmail.com"},{"name":"pedro.adas","email":"pedro.adas@gmail.com"},{"name":"guilhermebs","email":"guilhermebscontact@gmail.com"},{"name":"ricardoraposorfox","email":"ricardorbxx1@gmail.com"},{"name":"jott4","email":"jvgcunha2002@gmail.com"},{"name":"vitor.piovezan","email":"vitor.piovezan@arvore.com.br"}],"homepage":"https://github.com/arvoreeducacao/arvore-pi-extensions#readme","bugs":{"url":"https://github.com/arvoreeducacao/arvore-pi-extensions/issues"},"pi":{"extensions":["./dist/index.js"]},"dist":{"shasum":"498c2df07659fe25955f9038755807a109ef5d29","tarball":"https://registry.npmjs.org/@arvoretech/pi-cloud-sessions/-/pi-cloud-sessions-0.2.1.tgz","fileCount":38,"integrity":"sha512-lY5UdW3tAO93kQxiar4qy6gPNW+Gb2F+7fMsSlJih9uEITz8OYAY+JysQ2Q7g2lMOLZa2ebf0hFC1Ufp6o7lEA==","signatures":[{"sig":"MEQCIBGJnTo/tpQp8Nj8bl80ww6dHvwhKl/Et1ycbQx7NXH7AiA/uq0Sw8QSVqRIH4GLMMQh51j9iVia7y+on248VSUUWg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@arvoretech%2fpi-cloud-sessions@0.2.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":66437},"main":"dist/index.js","type":"module","_from":"file:/tmp/arvoretech-pi-cloud-sessions-0.2.1.tgz","types":"dist/index.d.ts","scripts":{"dev":"tsc --watch","lint":"tsc --noEmit","build":"tsc"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:3b2fd564-98c2-440d-9278-e34eaa9e4e75"}},"_resolved":"/tmp/arvoretech-pi-cloud-sessions-0.2.1.tgz","_integrity":"sha512-lY5UdW3tAO93kQxiar4qy6gPNW+Gb2F+7fMsSlJih9uEITz8OYAY+JysQ2Q7g2lMOLZa2ebf0hFC1Ufp6o7lEA==","repository":{"url":"git+https://github.com/arvoreeducacao/arvore-pi-extensions.git","type":"git","directory":"packages/cloud-sessions"},"_npmVersion":"11.17.0","description":"PI extension that syncs your pi sessions to a cloud backend (private Git repo or iCloud Drive) so you can resume them from any machine","directories":{},"_nodeVersion":"22.22.3","_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.3.0","@types/node":"^20.10.0","@earendil-works/pi-ai":"^0.79.4","@earendil-works/pi-tui":"^0.79.4","@earendil-works/pi-coding-agent":"^0.79.4"},"peerDependencies":{"@earendil-works/pi-coding-agent":">=0.74.0"},"_npmOperationalInternal":{"tmp":"tmp/pi-cloud-sessions_0.2.1_1782216693745_0.2214990439187159","host":"s3://npm-registry-packages-npm-production"}},"0.2.2":{"name":"@arvoretech/pi-cloud-sessions","version":"0.2.2","description":"PI extension that syncs your pi sessions to a cloud backend (private Git repo or iCloud Drive) so you can resume them from any machine","main":"dist/index.js","types":"dist/index.d.ts","type":"module","peerDependencies":{"@earendil-works/pi-coding-agent":">=0.74.0"},"devDependencies":{"@earendil-works/pi-coding-agent":"^0.79.4","@earendil-works/pi-ai":"^0.79.4","@earendil-works/pi-tui":"^0.79.4","@types/node":"^20.10.0","typescript":"^5.3.0"},"pi":{"extensions":["./dist/index.js"]},"keywords":["pi-package","pi","extension","sessions","sync","cloud","git","icloud"],"repository":{"type":"git","url":"git+https://github.com/arvoreeducacao/arvore-pi-extensions.git","directory":"packages/cloud-sessions"},"author":{"name":"Arvore"},"license":"MIT","scripts":{"build":"tsc","dev":"tsc --watch","lint":"tsc --noEmit"},"_id":"@arvoretech/pi-cloud-sessions@0.2.2","bugs":{"url":"https://github.com/arvoreeducacao/arvore-pi-extensions/issues"},"homepage":"https://github.com/arvoreeducacao/arvore-pi-extensions#readme","_integrity":"sha512-v5RhXLZO3YLDUI0tDLL03La+T9FCCAwaPK+156jTdt9LsvDieutgQ0ZZU49PQ8MKi8C00WaYHypDlX1P4QvqtA==","_resolved":"/tmp/arvoretech-pi-cloud-sessions-0.2.2.tgz","_from":"file:/tmp/arvoretech-pi-cloud-sessions-0.2.2.tgz","_nodeVersion":"22.22.3","_npmVersion":"11.17.0","dist":{"integrity":"sha512-v5RhXLZO3YLDUI0tDLL03La+T9FCCAwaPK+156jTdt9LsvDieutgQ0ZZU49PQ8MKi8C00WaYHypDlX1P4QvqtA==","shasum":"e0c8878e588748072392ff15bc600960a08756d2","tarball":"https://registry.npmjs.org/@arvoretech/pi-cloud-sessions/-/pi-cloud-sessions-0.2.2.tgz","fileCount":38,"unpackedSize":66867,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@arvoretech%2fpi-cloud-sessions@0.2.2","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCICcqmUXwcAaJmzW/Ad45fBZzDysjZGgqjFCEdYpnqzmeAiAR05sMMrsEZWfj4/2VMIZsVf3rCER47bjTQuV0005Jsw=="}]},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:3b2fd564-98c2-440d-9278-e34eaa9e4e75"}},"directories":{},"maintainers":[{"name":"joao.barros.arvore","email":"joao.barros@arvore.com.br"},{"name":"rafsouza","email":"rafasouza@protonmail.com"},{"name":"pedro.adas","email":"pedro.adas@gmail.com"},{"name":"guilhermebs","email":"guilhermebscontact@gmail.com"},{"name":"ricardoraposorfox","email":"ricardorbxx1@gmail.com"},{"name":"jott4","email":"jvgcunha2002@gmail.com"},{"name":"vitor.piovezan","email":"vitor.piovezan@arvore.com.br"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/pi-cloud-sessions_0.2.2_1782302233809_0.7849649348758454"},"_hasShrinkwrap":false}},"time":{"created":"2026-06-19T23:18:10.535Z","modified":"2026-06-24T11:57:14.350Z","0.1.0":"2026-06-19T23:18:10.881Z","0.2.0":"2026-06-22T15:10:37.324Z","0.2.1":"2026-06-23T12:11:33.905Z","0.2.2":"2026-06-24T11:57:13.960Z"},"bugs":{"url":"https://github.com/arvoreeducacao/arvore-pi-extensions/issues"},"author":{"name":"Arvore"},"license":"MIT","homepage":"https://github.com/arvoreeducacao/arvore-pi-extensions#readme","keywords":["pi-package","pi","extension","sessions","sync","cloud","git","icloud"],"repository":{"type":"git","url":"git+https://github.com/arvoreeducacao/arvore-pi-extensions.git","directory":"packages/cloud-sessions"},"description":"PI extension that syncs your pi sessions to a cloud backend (private Git repo or iCloud Drive) so you can resume them from any machine","maintainers":[{"name":"joao.barros.arvore","email":"joao.barros@arvore.com.br"},{"name":"rafsouza","email":"rafasouza@protonmail.com"},{"name":"pedro.adas","email":"pedro.adas@gmail.com"},{"name":"guilhermebs","email":"guilhermebscontact@gmail.com"},{"name":"ricardoraposorfox","email":"ricardorbxx1@gmail.com"},{"name":"jott4","email":"jvgcunha2002@gmail.com"},{"name":"vitor.piovezan","email":"vitor.piovezan@arvore.com.br"}],"readme":"# @arvoretech/pi-cloud-sessions\n\nSync your pi sessions to a cloud backend so you can start a conversation on one\nmachine and resume it on another. The full session is synced — messages, tree,\nlabels, and the session name — by mirroring the JSONL files pi stores under\n`~/.pi/agent/sessions/`.\n\nTwo backends are supported:\n\n- **git** — a private Git repo you own (versioned history, free, works anywhere).\n- **icloud** — a folder inside iCloud Drive (zero infra, Macs on the same Apple ID).\n\n## How it works\n\npi stores each session as a JSONL file under\n`<agent-dir>/sessions/--<project-path>--/<timestamp>_<uuid>.jsonl`. This\nextension mirrors that tree to the chosen backend:\n\n- On startup it **pulls** newer sessions from the backend into your local store.\n- Every `pollIntervalMs` (default 60s) it **pulls in the background**, so sessions created on another machine show up in `/resume` even while pi is open.\n- Before resuming/switching to a session it **pulls** so the loaded session is the freshest version.\n- After each turn it **pushes** the current state (debounced).\n- On shutdown it flushes a final sync.\n\nConflict resolution is **last-write-wins per file** by modification time. File\nmtimes are preserved across machines so the newest edit wins regardless of which\nmachine synced last. Sessions are append-only/branching, so concurrent edits to\nthe same file are rare.\n\n## Setup\n\nRun the setup command inside pi:\n\n```bash\n/cloud-sessions-setup\n```\n\nIt asks for the backend and writes `~/.config/pi/cloud-sessions.json`.\n\n### Git backend\n\nCreate an **empty private repo** (e.g. `git@github.com:you/pi-sessions.git`) and\nmake sure your local `git` can push to it (SSH key or `gh auth`). Then:\n\n```jsonc\n// ~/.config/pi/cloud-sessions.json\n{\n  \"provider\": \"git\",\n  \"git\": { \"repo\": \"git@github.com:you/pi-sessions.git\", \"branch\": \"main\" }\n}\n```\n\nThe repo is cloned to `~/.config/pi/cloud-sessions/repo` and kept in sync.\n\n### iCloud backend\n\n```jsonc\n{\n  \"provider\": \"icloud\",\n  \"icloud\": {\n    \"dir\": \"~/Library/Mobile Documents/com~apple~CloudDocs/pi-sessions\"\n  }\n}\n```\n\n## Resuming on another machine\n\nEverything is automatic — you never have to run a sync command:\n\n1. Use pi on machine A. Sessions push after each turn.\n2. Open pi on machine B (same project path). Startup pull brings A's sessions; background polling keeps them coming even if B was already open.\n3. Run `/resume` — A's session is listed. Pick it and continue.\n\n**Caveat — session must share the same `cwd`.** Sessions are stored per working\ndirectory (`--<project-path>--`). For a session to appear in `/resume` on machine\nB, B must be in the same absolute project path as A. If your username/home path\ndiffers between machines, the paths won't match.\n\n**Caveat — no live two-way editing.** The sync is serial: finish on one machine,\ncontinue on the other. A session already loaded in memory is not hot-reloaded\nwhen a newer version is pulled.\n\n## Commands\n\n- `/cloud-sessions-sync` — pull + push now (optional; sync is automatic).\n- `/cloud-sessions-status` — show config and current state.\n- `/cloud-sessions-setup` — configure the backend interactively.\n\n## Configuration\n\nAll options can be set in `~/.config/pi/cloud-sessions.json` or via env vars:\n\n| Setting        | JSON key         | Env var                            | Default                |\n| -------------- | ---------------- | ---------------------------------- | ---------------------- |\n| Backend        | `provider`       | `PI_CLOUD_SESSIONS_PROVIDER`       | `git`                  |\n| Auto push      | `autoPush`       | `PI_CLOUD_SESSIONS_AUTO_PUSH`      | `true`                 |\n| Pull on start  | `pullOnStart`    | `PI_CLOUD_SESSIONS_PULL_ON_START`  | `true`                 |\n| Push debounce  | `pushDebounceMs` | `PI_CLOUD_SESSIONS_DEBOUNCE_MS`    | `4000`                 |\n| Poll interval  | `pollIntervalMs` | `PI_CLOUD_SESSIONS_POLL_MS`        | `60000` (0 disables)   |\n| Machine label  | `machineId`      | `PI_CLOUD_SESSIONS_MACHINE_ID`     | hostname               |\n| Git repo       | `git.repo`       | `PI_CLOUD_SESSIONS_GIT_REPO`       | —                      |\n| Git branch     | `git.branch`     | `PI_CLOUD_SESSIONS_GIT_BRANCH`     | `main`                 |\n| iCloud folder  | `icloud.dir`     | `PI_CLOUD_SESSIONS_ICLOUD_DIR`     | iCloud Drive/pi-sessions |\n\n## Privacy\n\nSessions can contain anything you typed or any file content the agent read.\nUse a **private** repo and treat the backend as sensitive. There is no\nencryption layer — the JSONL is stored as-is.\n\n## Install\n\nPlace the built extension under a trusted pi extensions directory, or load it\ndirectly:\n\n```bash\npi -e ./packages/cloud-sessions/dist/index.js\n```\n","readmeFilename":"README.md"}