tmux-agent-monitor 0.0.1 → 0.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Yuki Yano
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,45 +1,114 @@
1
1
  # tmux-agent-monitor
2
2
 
3
- ## ⚠️ IMPORTANT NOTICE ⚠️
3
+ Monitor tmux sessions from a mobile-friendly web UI with a single CLI. Designed for Codex CLI and Claude Code sessions running inside tmux.
4
4
 
5
- **This package is created solely for the purpose of setting up OIDC (OpenID Connect) trusted publishing with npm.**
5
+ ## Features
6
6
 
7
- This is **NOT** a functional package and contains **NO** code or functionality beyond the OIDC setup configuration.
7
+ - Live session list and activity state
8
+ - Screen capture (text + optional image capture on macOS terminals)
9
+ - Token-based access with optional static auth
10
+ - Read-only mode and rate limits
11
+ - QR code login on startup (when terminal height permits)
12
+ - Claude hooks helper CLI for event logging
8
13
 
9
- ## Purpose
14
+ ## Requirements
10
15
 
11
- This package exists to:
12
- 1. Configure OIDC trusted publishing for the package name `tmux-agent-monitor`
13
- 2. Enable secure, token-less publishing from CI/CD workflows
14
- 3. Establish provenance for packages published under this name
16
+ - Node.js 24+
17
+ - tmux 2.0+ (a running tmux server is required)
18
+ - macOS is required for image capture (uses `osascript`/`screencapture`). Other OSes are text-only.
19
+ - On macOS, Screen Recording and Accessibility permissions may be required.
15
20
 
16
- ## What is OIDC Trusted Publishing?
21
+ ## Install
17
22
 
18
- OIDC trusted publishing allows package maintainers to publish packages directly from their CI/CD workflows without needing to manage npm access tokens. Instead, it uses OpenID Connect to establish trust between the CI/CD provider (like GitHub Actions) and npm.
23
+ ```bash
24
+ npm install -g tmux-agent-monitor
25
+ ```
19
26
 
20
- ## Setup Instructions
27
+ ## Quick start
21
28
 
22
- To properly configure OIDC trusted publishing for this package:
29
+ ```bash
30
+ tmux-agent-monitor
31
+ ```
23
32
 
24
- 1. Go to [npmjs.com](https://www.npmjs.com/) and navigate to your package settings
25
- 2. Configure the trusted publisher (e.g., GitHub Actions)
26
- 3. Specify the repository and workflow that should be allowed to publish
27
- 4. Use the configured workflow to publish your actual package
33
+ The command prints a URL like (and a QR code when possible):
28
34
 
29
- ## DO NOT USE THIS PACKAGE
35
+ ```
36
+ tmux-agent-monitor: http://localhost:11080/?token=...
37
+ ```
30
38
 
31
- This package is a placeholder for OIDC configuration only. It:
32
- - Contains no executable code
33
- - Provides no functionality
34
- - Should not be installed as a dependency
35
- - Exists only for administrative purposes
39
+ Open that URL in a browser to access the UI.
36
40
 
37
- ## More Information
41
+ Recommended access methods:
38
42
 
39
- For more details about npm's trusted publishing feature, see:
40
- - [npm Trusted Publishing Documentation](https://docs.npmjs.com/generating-provenance-statements)
41
- - [GitHub Actions OIDC Documentation](https://docs.github.com/en/actions/deployment/security-hardening-your-deployments/about-security-hardening-with-openid-connect)
43
+ - SSH port-forward
44
+ - Tailscale
45
+ - Private LAN only (avoid exposing to the public internet)
42
46
 
43
- ---
47
+ ## CLI options
44
48
 
45
- **Maintained for OIDC setup purposes only**
49
+ ```
50
+ --public Bind to 0.0.0.0 instead of 127.0.0.1
51
+ --tailscale Use the Tailscale IP when printing the URL
52
+ --no-attach Do not auto-attach tmux panes
53
+ --port <port> Override the server port
54
+ --web-port <p> Override the displayed web port in the printed URL
55
+ --socket-name tmux socket name
56
+ --socket-path tmux socket path
57
+ ```
58
+
59
+ Rotate the auth token:
60
+
61
+ ```bash
62
+ tmux-agent-monitor token rotate
63
+ ```
64
+
65
+ ## Configuration
66
+
67
+ Config is stored at `~/.tmux-agent-monitor/config.json`. It is created automatically on first run.
68
+
69
+ Example (use Alacritty for image capture):
70
+
71
+ ```json
72
+ {
73
+ "screen": {
74
+ "image": {
75
+ "backend": "alacritty"
76
+ }
77
+ }
78
+ }
79
+ ```
80
+
81
+ Supported image backends:
82
+ `alacritty`, `terminal`, `iterm`, `wezterm`, `ghostty`
83
+
84
+ Security defaults:
85
+
86
+ - Token auth is required for API/WebSocket access
87
+ - Default bind is `127.0.0.1` (`--public` is opt-in)
88
+
89
+ ## Claude hooks helper
90
+
91
+ The repo includes a small hook logger CLI:
92
+
93
+ ```bash
94
+ tmux-agent-monitor-hook <HookEventName>
95
+ ```
96
+
97
+ To print a Claude hooks snippet:
98
+
99
+ ```bash
100
+ tmux-agent-monitor claude hooks print
101
+ ```
102
+
103
+ ## Development
104
+
105
+ ```bash
106
+ pnpm install
107
+ pnpm dev
108
+ ```
109
+
110
+ Build the distributable package:
111
+
112
+ ```bash
113
+ pnpm build
114
+ ```
@@ -0,0 +1,29 @@
1
+ # Third-Party Notices
2
+
3
+ This project includes or references components under the following license(s).
4
+
5
+ ---
6
+
7
+ ## claude-code-monitor
8
+
9
+ MIT License
10
+
11
+ Copyright (c) 2026 onikan27
12
+
13
+ Permission is hereby granted, free of charge, to any person obtaining a copy
14
+ of this software and associated documentation files (the "Software"), to deal
15
+ in the Software without restriction, including without limitation the rights
16
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
17
+ copies of the Software, and to permit persons to whom the Software is
18
+ furnished to do so, subject to the following conditions:
19
+
20
+ The above copyright notice and this permission notice shall be included in all
21
+ copies or substantial portions of the Software.
22
+
23
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
24
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
25
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
26
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
27
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
28
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
29
+ SOFTWARE.