{"_id":"@arcanemachine/pi-session-manager","_rev":"4-30f86a6b51800708b6a2f92b6ff67d11","name":"@arcanemachine/pi-session-manager","dist-tags":{"latest":"0.1.4"},"versions":{"0.1.1":{"name":"@arcanemachine/pi-session-manager","version":"0.1.1","keywords":["pi","pi-coding-agent","extension","tmux","session","fleet","pi-package"],"author":{"name":"Nicholas Moen"},"license":"MIT","_id":"@arcanemachine/pi-session-manager@0.1.1","maintainers":[{"name":"arcanemachine","email":"arcanemachine@gmail.com"}],"homepage":"https://github.com/arcanemachine/pi-session-manager","bugs":{"url":"https://github.com/arcanemachine/pi-session-manager/issues"},"pi":{"extensions":["./src/index.ts"]},"dist":{"shasum":"9c80fc36bc9d146e307a81d198eda589e3f92b61","tarball":"https://registry.npmjs.org/@arcanemachine/pi-session-manager/-/pi-session-manager-0.1.1.tgz","fileCount":12,"integrity":"sha512-3EemFrzpcY43logGjM6Us4Ov0fUhuIn8xN1JkqCLWzLDuLWd7U3baaTK3VEhxhZGcQPHRIt/X9hqDUpb/D/VMg==","signatures":[{"sig":"MEYCIQCziHYmvV2DAeqQRvpXQ7KLqgi45v0EzmnUWLtqUzwMTwIhAIuo5FDvqBrXytSoPhjHGPRMJrP97wCtDAxLaes8B2P9","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":104390},"type":"module","gitHead":"44461a7e365077f2c213162d49a583fe31b7d4e2","scripts":{"test":"vitest run","build":"tsc","watch":"tsc --watch","format":"prettier --write \"src/**/*.ts\" \"tests/**/*.ts\" AGENTS.md README.md CHANGELOG.md LICENSE.md package.json tsconfig.json","typecheck":"tsc --noEmit","format:check":"prettier --check \"src/**/*.ts\" \"tests/**/*.ts\" AGENTS.md README.md CHANGELOG.md LICENSE.md package.json tsconfig.json"},"_npmUser":{"name":"arcanemachine","email":"arcanemachine@gmail.com"},"repository":{"url":"git+https://github.com/arcanemachine/pi-session-manager.git","type":"git"},"_npmVersion":"11.13.0","description":"Pi extension hosting fleets of interactive Pi TUI processes in a dedicated tmux server","directories":{},"_nodeVersion":"24.16.0","_hasShrinkwrap":false,"devDependencies":{"vitest":"^4.1.5","typebox":"1.1.38","prettier":"^3.8.3","typescript":"^5.9.3","@types/node":"^25.3.0","@earendil-works/pi-coding-agent":"0.80.10"},"peerDependencies":{"typebox":"*","@earendil-works/pi-coding-agent":"*"},"peerDependenciesMeta":{"typebox":{"optional":true},"@earendil-works/pi-coding-agent":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/pi-session-manager_0.1.1_1787017813328_0.5552435403049354","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"name":"@arcanemachine/pi-session-manager","version":"0.1.2","keywords":["pi","pi-coding-agent","extension","tmux","session","fleet","pi-package"],"author":{"name":"Nicholas Moen"},"license":"MIT","_id":"@arcanemachine/pi-session-manager@0.1.2","maintainers":[{"name":"arcanemachine","email":"arcanemachine@gmail.com"}],"homepage":"https://github.com/arcanemachine/pi-session-manager","bugs":{"url":"https://github.com/arcanemachine/pi-session-manager/issues"},"pi":{"extensions":["./src/index.ts"]},"dist":{"shasum":"805bfc22f962f48923dea067d0083b67053577c5","tarball":"https://registry.npmjs.org/@arcanemachine/pi-session-manager/-/pi-session-manager-0.1.2.tgz","fileCount":12,"integrity":"sha512-OzMfjuAQ8UXBvXF05cLideioEIzt+9x8wgoaDLH0QKp8dhRYVhk9p0SLKHBFJWX7WlCOaRHepTB34oUABI/vNA==","signatures":[{"sig":"MEUCIQDzhf5ubemKYt0SNEzboxtGtQDhdM5IPh4imMelUUM1aQIgc3YHwl0QljZ/MMIlnol41kwBhZVKCfeSyRPFIGqPFEQ=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEUCIQDVBVJOVf28I9Xm4tkQVB+6uFIubyq+2lM4tJ+2TBXi+gIgOVepdthhnUUY69Fd9RpBxrJViGiJmsYU1QKW5drWxq4=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":103259},"type":"module","gitHead":"b85a4b4e60fb881136e2b3d9929a2b6843cc856e","scripts":{"test":"vitest run","build":"tsc","watch":"tsc --watch","format":"prettier --write \"src/**/*.ts\" \"tests/**/*.ts\" AGENTS.md README.md CHANGELOG.md LICENSE.md package.json tsconfig.json","typecheck":"tsc --noEmit","format:check":"prettier --check \"src/**/*.ts\" \"tests/**/*.ts\" AGENTS.md README.md CHANGELOG.md LICENSE.md package.json tsconfig.json"},"_npmUser":{"name":"arcanemachine","email":"arcanemachine@gmail.com"},"repository":{"url":"git+https://github.com/arcanemachine/pi-session-manager.git","type":"git"},"_npmVersion":"11.13.0","description":"Pi extension hosting fleets of interactive Pi TUI processes in a dedicated tmux server","directories":{},"_nodeVersion":"24.16.0","_hasShrinkwrap":false,"devDependencies":{"vitest":"^4.1.5","typebox":"1.1.38","prettier":"^3.8.3","typescript":"^5.9.3","@types/node":"^25.3.0","@earendil-works/pi-coding-agent":"0.80.10"},"peerDependencies":{"typebox":"*","@earendil-works/pi-coding-agent":"*"},"peerDependenciesMeta":{"typebox":{"optional":true},"@earendil-works/pi-coding-agent":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/pi-session-manager_0.1.2_1787640626199_0.7161111875396229","host":"s3://npm-registry-packages-npm-production"}},"0.1.3":{"name":"@arcanemachine/pi-session-manager","version":"0.1.3","keywords":["pi","pi-coding-agent","extension","tmux","session","fleet","pi-package"],"author":{"name":"Nicholas Moen"},"license":"MIT","_id":"@arcanemachine/pi-session-manager@0.1.3","maintainers":[{"name":"arcanemachine","email":"arcanemachine@gmail.com"}],"homepage":"https://github.com/arcanemachine/pi-session-manager","bugs":{"url":"https://github.com/arcanemachine/pi-session-manager/issues"},"pi":{"extensions":["./src/index.ts"]},"dist":{"shasum":"88d3a76b62bafbea554cb8481af3f3fb5ad03e00","tarball":"https://registry.npmjs.org/@arcanemachine/pi-session-manager/-/pi-session-manager-0.1.3.tgz","fileCount":12,"integrity":"sha512-T/6mogey0xb3//YWhdg8esbpxoQ2EXBMmFLVQJ0Bb35Y40y4fnNoBS54ZN/OsvKGwIxeSj8sOTzFelQkoVMCeg==","signatures":[{"sig":"MEUCIQD2FgDc8zQmDwttvg6mC6BG7veKVxqEtGoU1e77UuMM+QIgRS/IPRiYL1mI22IbRX7PenP7IeqC5KpWWJIp9BWocHw=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEYCIQCZZRKuJR0PvEwKhaU+ddmEswveoZx0Jt9AYJDkmykyMwIhAI82UBnczvM+plet0HiBtAERIQaN8fKSXjyGtUuPutjB","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":103395},"type":"module","gitHead":"2c6e2d039c98568df1b074a208c71842f8f05b3b","scripts":{"test":"vitest run","build":"tsc","watch":"tsc --watch","format":"prettier --write \"src/**/*.ts\" \"tests/**/*.ts\" AGENTS.md README.md CHANGELOG.md LICENSE.md package.json tsconfig.json","typecheck":"tsc --noEmit","format:check":"prettier --check \"src/**/*.ts\" \"tests/**/*.ts\" AGENTS.md README.md CHANGELOG.md LICENSE.md package.json tsconfig.json"},"_npmUser":{"name":"arcanemachine","email":"arcanemachine@gmail.com"},"repository":{"url":"git+https://github.com/arcanemachine/pi-session-manager.git","type":"git"},"_npmVersion":"11.13.0","description":"Pi extension hosting fleets of interactive Pi TUI processes in a dedicated tmux server","directories":{},"_nodeVersion":"24.16.0","_hasShrinkwrap":false,"devDependencies":{"vitest":"^4.1.5","typebox":"1.1.38","prettier":"^3.8.3","typescript":"^5.9.3","@types/node":"^25.3.0","@earendil-works/pi-coding-agent":"0.80.10"},"peerDependencies":{"typebox":"*","@earendil-works/pi-coding-agent":"*"},"peerDependenciesMeta":{"typebox":{"optional":true},"@earendil-works/pi-coding-agent":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/pi-session-manager_0.1.3_1788482001861_0.30876098377754735","host":"s3://npm-registry-packages-npm-production"}},"0.1.4":{"pi":{"image":"https://raw.githubusercontent.com/arcanemachine/pi-session-manager/main/logo.jpg","extensions":["./src/index.ts"]},"_id":"@arcanemachine/pi-session-manager@0.1.4","bugs":{"url":"https://github.com/arcanemachine/pi-session-manager/issues"},"dist":{"shasum":"13ef0fbe090f47b4b574ea71e92b0f4ba0be2b1d","tarball":"https://registry.npmjs.org/@arcanemachine/pi-session-manager/-/pi-session-manager-0.1.4.tgz","fileCount":13,"integrity":"sha512-1YGQYSvNz3zmAjfPIgwfFmqv3ndD9Pu/cKDtZ1A5n6cmCzmIMJXqSdVU+aB0iKrWRXtkf1gySrIwYeEQMa4qCA==","signatures":[{"sig":"MEUCIQClWMuZoTpp4aMpKJ1TWhPbRpYRz/41+A0ijImVNC0n5QIgHOrKo5Dt9LRKPUlo6/ptdjkBf6jABOXnw1fmCIrl/Kw=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIDLslNv1+cEzFcvwkgt1IarcVbpUWLc4kbk+Q6iu0DOKAiAVi8Cbwy3P/VVVjPc4vUBMbRbugeRkah9HDzsIswGm5Q=="}],"unpackedSize":163310},"name":"@arcanemachine/pi-session-manager","type":"module","author":{"name":"Nicholas Moen"},"gitHead":"652d78a630ded8b1085b832cfec3767dcaa1e292","license":"MIT","scripts":{"test":"vitest run","build":"tsc","watch":"tsc --watch","format":"prettier --write \"src/**/*.ts\" \"tests/**/*.ts\" AGENTS.md README.md CHANGELOG.md LICENSE.md package.json tsconfig.json","typecheck":"tsc --noEmit","format:check":"prettier --check \"src/**/*.ts\" \"tests/**/*.ts\" AGENTS.md README.md CHANGELOG.md LICENSE.md package.json tsconfig.json"},"version":"0.1.4","_npmUser":{"name":"arcanemachine","email":"arcanemachine@gmail.com"},"homepage":"https://github.com/arcanemachine/pi-session-manager","keywords":["pi","pi-coding-agent","extension","tmux","session","fleet","pi-package"],"repository":{"url":"git+https://github.com/arcanemachine/pi-session-manager.git","type":"git"},"_npmVersion":"11.13.0","description":"Pi extension hosting fleets of interactive Pi TUI processes in a dedicated tmux server","directories":{},"maintainers":[{"name":"arcanemachine","email":"arcanemachine@gmail.com"}],"_nodeVersion":"24.16.0","_hasShrinkwrap":false,"devDependencies":{"vitest":"^4.1.5","typebox":"1.1.38","prettier":"^3.8.3","typescript":"^5.9.3","@types/node":"^25.3.0","@earendil-works/pi-coding-agent":"0.80.10"},"peerDependencies":{"typebox":"*","@earendil-works/pi-coding-agent":"*"},"peerDependenciesMeta":{"typebox":{"optional":true},"@earendil-works/pi-coding-agent":{"optional":true}},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/pi-session-manager_0.1.4_1788679812253_0.11967228600161728"}}},"time":{"created":"2026-08-18T01:50:13.161Z","modified":"2026-09-06T07:30:12.521Z","0.1.1":"2026-08-18T01:50:13.491Z","0.1.2":"2026-08-25T06:50:26.295Z","0.1.3":"2026-09-04T00:33:21.994Z","0.1.4":"2026-09-06T07:30:12.355Z"},"bugs":{"url":"https://github.com/arcanemachine/pi-session-manager/issues"},"author":{"name":"Nicholas Moen"},"license":"MIT","homepage":"https://github.com/arcanemachine/pi-session-manager","keywords":["pi","pi-coding-agent","extension","tmux","session","fleet","pi-package"],"repository":{"url":"git+https://github.com/arcanemachine/pi-session-manager.git","type":"git"},"description":"Pi extension hosting fleets of interactive Pi TUI processes in a dedicated tmux server","maintainers":[{"name":"arcanemachine","email":"arcanemachine@gmail.com"}],"readme":"# pi-session-manager\n\n<p align=\"center\">\n  <img src=\"https://raw.githubusercontent.com/arcanemachine/pi-session-manager/main/logo.jpg\" alt=\"Pi mascot managing multiple terminal sessions from a control console\" width=\"250\" />\n</p>\n\nA [Pi](https://github.com/badlogic/pi-mono) extension that hosts fleets of\nnormal interactive Pi TUI processes in a dedicated tmux server.\n\nSession Manager is only the terminal and process-hosting layer. It creates and\nobserves independent Pi processes; it does not assign roles, inspect readiness,\nsend prompts or keystrokes, steer work, shut Pi down gracefully, or integrate\nwith inter-agent, pi-role, pi-session-snapshot, or pi-subagent.\n\nFor the optional composition with inter-agent Pi—covering readiness, allowlists,\nsemantic control, and graceful shutdown—see the\n[canonical composition guide](https://github.com/arcanemachine/inter-agent-pi/blob/main/SESSION_MANAGER.md).\n\n> Like this extension? See [my other Pi extensions](https://github.com/arcanemachine/pi-projects).\n\n## Requirements\n\n- Pi extension API 0.80.10 or later\n- tmux 3.5 or later\n- A POSIX environment where tmux is available on `PATH`\n\n## Installation\n\n### From GitHub\n\n```bash\npi install git:github.com/arcanemachine/pi-session-manager\n```\n\nUpdate with:\n\n```bash\npi update git:github.com/arcanemachine/pi-session-manager\n```\n\n### From npm\n\n```bash\npi install npm:@arcanemachine/pi-session-manager\n```\n\n### From a local clone\n\n```bash\ngit clone git@github.com:arcanemachine/pi-session-manager.git\npi install /path/to/pi-session-manager\n```\n\nNo superproject checkout or sibling Pi package is required for normal use.\n\n## Authorization\n\nAll five Session Manager tools are registered at all times, but they deny every\noperation until a human configures authorization in the Manager Pi's\ninteractive TUI:\n\n```text\n/session-manager configure\n/session-manager status\n```\n\n`configure` uses Pi's native selector with exactly `On` and `Off`. The current\nstate is first/default (`Off`, `On` while disabled; `On`, `Off` while enabled),\nand the prompt warns that enabling grants visibility and process/window\nlifecycle authority, including force termination. Selecting the current state\nor cancelling leaves authorization unchanged. Authorization is process-local:\nit survives `/reload`, `/new`, `/resume`, and `/fork` in that same Pi process,\nbut not process exit. It is not written to the transcript, files, environment,\ntmux metadata, or worker arguments, and it never propagates to launched workers.\n\n## Fleets and tmux\n\nSession Manager uses one separate tmux server, never the user's default tmux\nserver. The socket is:\n\n```text\n$PI_CODING_AGENT_DIR/pi-session-manager/tmux.sock\n```\n\nWhen `PI_CODING_AGENT_DIR` is unset, its full default path is:\n\n```text\n~/.pi/agent/pi-session-manager/tmux.sock\n```\n\nA fleet is one tmux session. Fleet names are opaque namespaces that must match\n`[a-z0-9][a-z0-9_-]{0,63}`; the usual convention is `<project>-<role>`. An\ninstance is one full tmux window containing one directly launched interactive\nPi process. Instance numbers are positive integers and equal their tmux window\nindexes; indexes begin at 1 and are never automatically renumbered.\n\nFor example, after creating `myproject-worker` instance 1, attach manually:\n\n```bash\ntmux -S ~/.pi/agent/pi-session-manager/tmux.sock attach -t myproject-worker\n```\n\nSubstitute the configured agent directory when `PI_CODING_AGENT_DIR` is set.\nSession Manager also reports the exact attachment command in its list results.\nIt never attaches, selects windows, or changes terminal focus for you.\n\n## Agent tools\n\nAfter the user has enabled authorization, the Manager Pi agent can call:\n\n- `pi_fleet_list` — list managed fleets and instances; accepts an optional\n  `fleet` filter.\n- `pi_fleet_view` — capture 1–500 lines from one running or exited instance\n  without changing focus; the default is 100 lines.\n- `pi_fleet_create` — create one normal interactive Pi instance. It accepts\n  `fleet`, `instance`, optional `cwd`, and an opaque `piArgs` string array.\n- `pi_fleet_close` — remove one exited managed window only.\n- `pi_fleet_force_close` — remove one live managed window and terminate its Pi\n  process. It requires `confirmProcessTermination: true`.\n\nTypical calls use individual creates, including in one ordinary Pi tool batch:\n\n```text\npi_fleet_create\n```\n\n```json\n{\n  \"fleet\": \"myproject-worker\",\n  \"instance\": 1,\n  \"cwd\": \"/workspace/projects/myproject\"\n}\n```\n\n```text\npi_fleet_view\n```\n\n```json\n{ \"fleet\": \"myproject-worker\", \"instance\": 1, \"lines\": 100 }\n```\n\n```text\npi_fleet_force_close\n```\n\n```json\n{\n  \"fleet\": \"myproject-worker\",\n  \"instance\": 1,\n  \"confirmProcessTermination\": true\n}\n```\n\nThe last example is for `pi_fleet_force_close`, not ordinary close. It removes\nthe live window and terminates the contained process. Use it only when graceful\ncontrol is unavailable or has failed; never use it merely to tidy a fleet or\nbecause a worker is slow. Neither close operation can remove a window currently\nviewed by an attached human tmux client.\n\n`piArgs` are passed directly to `pi`, one argument at a time. They are not shell\nsyntax and Session Manager does not interpret them as role, bus, readiness, or\nchild-tool configuration. No child-tool restriction profile is documented in\nV1 because exact installed child-tool names must be verified before one is\nrecommended.\n\n## Ownership and lifecycle\n\nTmux is the sole source of truth. Session Manager keeps no external registry.\nIt recognizes only exact V1 ownership metadata:\n\n```text\ntmux session: @pi-session-manager-fleet-version = v1\ntmux window:  @pi-session-manager-window-version = v1\n              @pi-session-manager-instance = <positive decimal integer>\n              @pi-session-manager-pane-id = <%pane-id>\n```\n\nThe session name is the fleet name. A managed window must contain exactly one\npane with the stored stable pane ID. Missing, partial, malformed, contradictory,\nor unsupported tags—and windows manually split into multiple panes—are warnings,\nnot managed targets. Session Manager will not adopt, repair, or mutate them.\nManual tmux deletion is valid; the metadata disappears with the object and no\nstale registry remains.\n\nPi exit is retained by tmux, so exited instances remain listable and viewable\nuntil `pi_fleet_close` removes them. If the final window closes, tmux may remove\nthe empty fleet and server naturally.\n\n## Limits and non-goals\n\n- Terminal capture is bounded and observational; it is not task-completion or\n  semantic readiness evidence.\n- Session Manager does not restart workers, provision projects or worktrees,\n  maintain a filesystem database, send keys, or control the default tmux\n  server.\n- It has no multi-user authorization, remote tmux support, per-worker\n  environment overrides, arbitrary shell commands, arbitrary executable\n  selection, or bulk fleet API.\n- Anyone with same-user access to the dedicated socket can use ordinary tmux\n  commands. The authorization gate protects against unintended agent tool use,\n  not malicious same-process extensions or hostile local users.\n\n## Development\n\n```bash\nnpm install --loglevel=warning\nnpm run format:check\nnpm run typecheck\nnpm run test\nnpm run build\n```\n\nDo not run the superproject formatter for package-only work; it rewrites sibling\npackages.\n\n## License\n\nMIT\n","readmeFilename":"README.md"}