cgl-interagentmail 1.1.0__tar.gz

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.
Files changed (30) hide show
  1. cgl_interagentmail-1.1.0/CHANGELOG.md +17 -0
  2. cgl_interagentmail-1.1.0/CONTRIBUTING.md +30 -0
  3. cgl_interagentmail-1.1.0/LICENSE +21 -0
  4. cgl_interagentmail-1.1.0/MANIFEST.in +27 -0
  5. cgl_interagentmail-1.1.0/PKG-INFO +131 -0
  6. cgl_interagentmail-1.1.0/README.md +97 -0
  7. cgl_interagentmail-1.1.0/SECURITY.md +17 -0
  8. cgl_interagentmail-1.1.0/SYSTEM.md +146 -0
  9. cgl_interagentmail-1.1.0/cgl_interagentmail.egg-info/PKG-INFO +131 -0
  10. cgl_interagentmail-1.1.0/cgl_interagentmail.egg-info/SOURCES.txt +28 -0
  11. cgl_interagentmail-1.1.0/cgl_interagentmail.egg-info/dependency_links.txt +1 -0
  12. cgl_interagentmail-1.1.0/cgl_interagentmail.egg-info/entry_points.txt +5 -0
  13. cgl_interagentmail-1.1.0/cgl_interagentmail.egg-info/requires.txt +6 -0
  14. cgl_interagentmail-1.1.0/cgl_interagentmail.egg-info/top_level.txt +5 -0
  15. cgl_interagentmail-1.1.0/docs/INSTALL.md +259 -0
  16. cgl_interagentmail-1.1.0/docs/PUBLISHING.md +96 -0
  17. cgl_interagentmail-1.1.0/docs/WEBSITE_COPY.md +53 -0
  18. cgl_interagentmail-1.1.0/iam_codex_bridge.py +656 -0
  19. cgl_interagentmail-1.1.0/iam_mcp_server.py +150 -0
  20. cgl_interagentmail-1.1.0/iam_orchestrator.py +585 -0
  21. cgl_interagentmail-1.1.0/iam_service.py +219 -0
  22. cgl_interagentmail-1.1.0/interagentmail.py +671 -0
  23. cgl_interagentmail-1.1.0/pyproject.toml +54 -0
  24. cgl_interagentmail-1.1.0/scripts/build-release.ps1 +81 -0
  25. cgl_interagentmail-1.1.0/setup.cfg +4 -0
  26. cgl_interagentmail-1.1.0/tests/__init__.py +1 -0
  27. cgl_interagentmail-1.1.0/tests/test_codex_bridge.py +181 -0
  28. cgl_interagentmail-1.1.0/tests/test_iam_service.py +65 -0
  29. cgl_interagentmail-1.1.0/tests/test_mcp_server.py +60 -0
  30. cgl_interagentmail-1.1.0/tests/test_orchestrator.py +148 -0
@@ -0,0 +1,17 @@
1
+ # Changelog
2
+
3
+ ## 1.1.0 - 2026-07-29
4
+
5
+ - Added the `iam` setup and lifecycle command.
6
+ - Added one shared background Codex app-server and mailbox supervisor for all registered projects.
7
+ - Added project-bound MCP configuration during setup.
8
+ - Added persistent, correctly rooted Codex threads with automatic replacement of non-resumable sessions.
9
+ - Added hidden background processes on Windows.
10
+ - Added safe unattended defaults and explicit full-access opt-in.
11
+ - Added `iam unregister` for clean project removal without deleting mail.
12
+ - Released InterAgentMail as open-source software under the MIT License.
13
+
14
+ ## 1.0.0
15
+
16
+ - Added durable local JSON mailboxes, replies, channels, and archive operations.
17
+ - Added the InterAgentMail MCP server and low-level Codex bridge.
@@ -0,0 +1,30 @@
1
+ # Contributing to InterAgentMail
2
+
3
+ InterAgentMail is a Cerberus Game Labs gift to the agent-development community. Bug reports, documentation improvements, compatibility fixes, and focused feature contributions are welcome.
4
+
5
+ ## Before opening an issue
6
+
7
+ - Search the existing issues.
8
+ - Run `iam --version`, `codex --version`, and `iam status`.
9
+ - Remove private project paths, message bodies, tokens, and account information from logs.
10
+ - Use the private process in `SECURITY.md` for suspected vulnerabilities.
11
+
12
+ ## Development setup
13
+
14
+ ```console
15
+ python -m venv .venv
16
+ python -m pip install -e .
17
+ python -m unittest discover -s tests -v
18
+ ```
19
+
20
+ On Windows, activate the virtual environment or invoke `.venv\Scripts\python.exe` directly. On macOS/Linux, use `.venv/bin/python`.
21
+
22
+ ## Pull requests
23
+
24
+ - Keep changes focused and explain the user-visible behavior.
25
+ - Add or update tests for behavior changes.
26
+ - Preserve safe defaults: unattended work must never grant its own approval.
27
+ - Do not commit mailbox data, messages, Codex session IDs, logs, credentials, or machine-specific paths.
28
+ - Update `README.md`, `docs/INSTALL.md`, and `CHANGELOG.md` when user-facing behavior changes.
29
+
30
+ By contributing, you agree that your contribution is licensed under the repository's MIT License.
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Cerberus Game Labs
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.
@@ -0,0 +1,27 @@
1
+ include README.md
2
+ include SYSTEM.md
3
+ include CHANGELOG.md
4
+ include CONTRIBUTING.md
5
+ include LICENSE
6
+ include SECURITY.md
7
+ include pyproject.toml
8
+ recursive-include docs *.md
9
+ recursive-include scripts *.ps1
10
+ recursive-include tests *.py
11
+ prune .agents
12
+ prune .codex
13
+ prune .git
14
+ prune .venv
15
+ prune build
16
+ prune chats
17
+ prune DEV
18
+ prune dist
19
+ prune InterAgentChatReader
20
+ prune mailboxes
21
+ prune run
22
+ prune skills
23
+ exclude config.json
24
+ exclude InterAgentChatReader.zip
25
+ global-exclude *.py[cod]
26
+ global-exclude __pycache__
27
+ global-exclude .DS_Store
@@ -0,0 +1,131 @@
1
+ Metadata-Version: 2.4
2
+ Name: cgl-interagentmail
3
+ Version: 1.1.0
4
+ Summary: File-backed local mail, MCP tools, and push delivery for Codex project agents
5
+ Author: Cerberus Game Labs
6
+ License-Expression: MIT
7
+ Project-URL: Homepage, https://cerberusgamelabs.xyz
8
+ Project-URL: Repository, https://github.com/cerberusgamelabs/cgl-interagentmail
9
+ Project-URL: Documentation, https://github.com/cerberusgamelabs/cgl-interagentmail/blob/main/docs/INSTALL.md
10
+ Project-URL: Issues, https://github.com/cerberusgamelabs/cgl-interagentmail/issues
11
+ Project-URL: Changelog, https://github.com/cerberusgamelabs/cgl-interagentmail/blob/main/CHANGELOG.md
12
+ Keywords: codex,mcp,agents,mailbox,automation
13
+ Classifier: Development Status :: 4 - Beta
14
+ Classifier: Environment :: Console
15
+ Classifier: Intended Audience :: Developers
16
+ Classifier: Operating System :: Microsoft :: Windows
17
+ Classifier: Operating System :: MacOS
18
+ Classifier: Operating System :: POSIX :: Linux
19
+ Classifier: Programming Language :: Python :: 3
20
+ Classifier: Programming Language :: Python :: 3.10
21
+ Classifier: Programming Language :: Python :: 3.11
22
+ Classifier: Programming Language :: Python :: 3.12
23
+ Classifier: Programming Language :: Python :: 3.13
24
+ Classifier: Topic :: Software Development :: Libraries :: Application Frameworks
25
+ Requires-Python: >=3.10
26
+ Description-Content-Type: text/markdown
27
+ License-File: LICENSE
28
+ Requires-Dist: mcp<3,>=2.0
29
+ Requires-Dist: websockets<16,>=14
30
+ Provides-Extra: release
31
+ Requires-Dist: build<2,>=1.2; extra == "release"
32
+ Requires-Dist: twine<7,>=6; extra == "release"
33
+ Dynamic: license-file
34
+
35
+ # InterAgentMail
36
+
37
+ InterAgentMail gives local Codex project agents durable mailboxes, MCP tools, and automatic wake-up delivery. Messages are stored as JSON on disk, so they remain queued while Codex or the receiving agent is offline.
38
+
39
+ One shared Codex app-server and one background InterAgentMail supervisor manage every registered project. Users do not need a bridge terminal, a port per agent, or copied Codex session IDs.
40
+
41
+ ## Requirements
42
+
43
+ - Python 3.10 or newer
44
+ - The OpenAI Codex CLI installed, available on `PATH`, and signed in
45
+ - Windows, macOS, or Linux; background operation is tested most heavily on Windows
46
+
47
+ ## Install
48
+
49
+ Install the isolated command-line application with `pipx`:
50
+
51
+ ```console
52
+ pipx install cgl-interagentmail
53
+ ```
54
+
55
+ Register one or more Codex projects, then start delivery:
56
+
57
+ ```console
58
+ iam setup "C:\Projects\MainApp" "C:\Projects\SecurityReviewer" "C:\Projects\UXReviewer"
59
+ iam start
60
+ ```
61
+
62
+ Open the correct agent from any registered project:
63
+
64
+ ```console
65
+ cd C:\Projects\SecurityReviewer
66
+ iam open
67
+ ```
68
+
69
+ The complete Windows, macOS, Linux, upgrade, troubleshooting, and uninstall instructions are in [docs/INSTALL.md](docs/INSTALL.md).
70
+
71
+ Source code, releases, and issue tracking are hosted at <https://github.com/cerberusgamelabs/cgl-interagentmail>.
72
+
73
+ ## Everyday commands
74
+
75
+ ```console
76
+ iam status
77
+ iam open [PROJECT]
78
+ iam restart
79
+ iam stop
80
+ iam stop --all
81
+ iam unregister [PROJECT ...]
82
+ ```
83
+
84
+ - `iam status` shows services, projects, and pinned thread IDs.
85
+ - `iam open` resumes the exact thread owned by the current or named project.
86
+ - `iam stop` stops mail delivery but leaves the shared app-server running.
87
+ - `iam stop --all` stops both IAM-managed background services.
88
+ - `iam unregister` removes IAM's managed MCP block and project registration while preserving mailbox data.
89
+
90
+ ## Setup behavior
91
+
92
+ `iam setup` is safe to run again. It:
93
+
94
+ 1. Initializes the project's durable mailbox.
95
+ 2. Records its project directory and safety policy.
96
+ 3. Adds a clearly marked `mcp_servers.interagentmail` block to `.codex/config.toml`.
97
+ 4. Establishes the existing-inbox baseline so old mail does not unexpectedly trigger work.
98
+
99
+ Use `iam setup --process-existing` when existing inbox messages should be delivered immediately.
100
+
101
+ Installed releases keep data under `%LOCALAPPDATA%\InterAgentMail` on Windows or `~/.local/share/interagentmail` on macOS/Linux. Set `INTERAGENTMAIL_HOME` before setup to use another shared data directory.
102
+
103
+ ## Safety
104
+
105
+ New agents use `workspace-write` with `on-request` approvals. The unattended supervisor rejects interactive approval requests instead of granting them. A task that needs approval remains uncompleted until a person opens that agent.
106
+
107
+ Only for a trusted project that genuinely requires unrestricted filesystem and network access:
108
+
109
+ ```console
110
+ iam setup "C:\Projects\SecurityReviewer" --full-access
111
+ ```
112
+
113
+ InterAgentMail is a local coordination mechanism, not an authentication boundary. Any local process that can write to its data directory can inject or modify mail. Do not share that directory with untrusted users or accept untrusted message content as instructions.
114
+
115
+ ## Sending mail
116
+
117
+ Agents normally use the project-bound InterAgentMail MCP tools. People and fallback workflows can use the CLI:
118
+
119
+ ```console
120
+ interagentmail send --project-root "C:\Projects\MainApp" --to SecurityReviewer --subject "Security review" --body "Review the current release and send back actionable findings."
121
+ ```
122
+
123
+ The receiving supervisor wakes the correct Codex thread. The agent reads the message through MCP, performs the work, sends a substantive reply when appropriate, and archives the message only after it is handled.
124
+
125
+ Protocol and low-level bridge details are in [SYSTEM.md](SYSTEM.md). Release history is in [CHANGELOG.md](CHANGELOG.md).
126
+
127
+ ## License
128
+
129
+ InterAgentMail is open-source software released under the [MIT License](LICENSE). Use it, modify it, distribute it, and build on it. Copyright 2026 Cerberus Game Labs.
130
+
131
+ Contributions are welcome; see [CONTRIBUTING.md](CONTRIBUTING.md).
@@ -0,0 +1,97 @@
1
+ # InterAgentMail
2
+
3
+ InterAgentMail gives local Codex project agents durable mailboxes, MCP tools, and automatic wake-up delivery. Messages are stored as JSON on disk, so they remain queued while Codex or the receiving agent is offline.
4
+
5
+ One shared Codex app-server and one background InterAgentMail supervisor manage every registered project. Users do not need a bridge terminal, a port per agent, or copied Codex session IDs.
6
+
7
+ ## Requirements
8
+
9
+ - Python 3.10 or newer
10
+ - The OpenAI Codex CLI installed, available on `PATH`, and signed in
11
+ - Windows, macOS, or Linux; background operation is tested most heavily on Windows
12
+
13
+ ## Install
14
+
15
+ Install the isolated command-line application with `pipx`:
16
+
17
+ ```console
18
+ pipx install cgl-interagentmail
19
+ ```
20
+
21
+ Register one or more Codex projects, then start delivery:
22
+
23
+ ```console
24
+ iam setup "C:\Projects\MainApp" "C:\Projects\SecurityReviewer" "C:\Projects\UXReviewer"
25
+ iam start
26
+ ```
27
+
28
+ Open the correct agent from any registered project:
29
+
30
+ ```console
31
+ cd C:\Projects\SecurityReviewer
32
+ iam open
33
+ ```
34
+
35
+ The complete Windows, macOS, Linux, upgrade, troubleshooting, and uninstall instructions are in [docs/INSTALL.md](docs/INSTALL.md).
36
+
37
+ Source code, releases, and issue tracking are hosted at <https://github.com/cerberusgamelabs/cgl-interagentmail>.
38
+
39
+ ## Everyday commands
40
+
41
+ ```console
42
+ iam status
43
+ iam open [PROJECT]
44
+ iam restart
45
+ iam stop
46
+ iam stop --all
47
+ iam unregister [PROJECT ...]
48
+ ```
49
+
50
+ - `iam status` shows services, projects, and pinned thread IDs.
51
+ - `iam open` resumes the exact thread owned by the current or named project.
52
+ - `iam stop` stops mail delivery but leaves the shared app-server running.
53
+ - `iam stop --all` stops both IAM-managed background services.
54
+ - `iam unregister` removes IAM's managed MCP block and project registration while preserving mailbox data.
55
+
56
+ ## Setup behavior
57
+
58
+ `iam setup` is safe to run again. It:
59
+
60
+ 1. Initializes the project's durable mailbox.
61
+ 2. Records its project directory and safety policy.
62
+ 3. Adds a clearly marked `mcp_servers.interagentmail` block to `.codex/config.toml`.
63
+ 4. Establishes the existing-inbox baseline so old mail does not unexpectedly trigger work.
64
+
65
+ Use `iam setup --process-existing` when existing inbox messages should be delivered immediately.
66
+
67
+ Installed releases keep data under `%LOCALAPPDATA%\InterAgentMail` on Windows or `~/.local/share/interagentmail` on macOS/Linux. Set `INTERAGENTMAIL_HOME` before setup to use another shared data directory.
68
+
69
+ ## Safety
70
+
71
+ New agents use `workspace-write` with `on-request` approvals. The unattended supervisor rejects interactive approval requests instead of granting them. A task that needs approval remains uncompleted until a person opens that agent.
72
+
73
+ Only for a trusted project that genuinely requires unrestricted filesystem and network access:
74
+
75
+ ```console
76
+ iam setup "C:\Projects\SecurityReviewer" --full-access
77
+ ```
78
+
79
+ InterAgentMail is a local coordination mechanism, not an authentication boundary. Any local process that can write to its data directory can inject or modify mail. Do not share that directory with untrusted users or accept untrusted message content as instructions.
80
+
81
+ ## Sending mail
82
+
83
+ Agents normally use the project-bound InterAgentMail MCP tools. People and fallback workflows can use the CLI:
84
+
85
+ ```console
86
+ interagentmail send --project-root "C:\Projects\MainApp" --to SecurityReviewer --subject "Security review" --body "Review the current release and send back actionable findings."
87
+ ```
88
+
89
+ The receiving supervisor wakes the correct Codex thread. The agent reads the message through MCP, performs the work, sends a substantive reply when appropriate, and archives the message only after it is handled.
90
+
91
+ Protocol and low-level bridge details are in [SYSTEM.md](SYSTEM.md). Release history is in [CHANGELOG.md](CHANGELOG.md).
92
+
93
+ ## License
94
+
95
+ InterAgentMail is open-source software released under the [MIT License](LICENSE). Use it, modify it, distribute it, and build on it. Copyright 2026 Cerberus Game Labs.
96
+
97
+ Contributions are welcome; see [CONTRIBUTING.md](CONTRIBUTING.md).
@@ -0,0 +1,17 @@
1
+ # Security policy
2
+
3
+ ## Supported versions
4
+
5
+ Security fixes are provided for the latest published InterAgentMail release.
6
+
7
+ ## Reporting a vulnerability
8
+
9
+ Do not open a public issue for a suspected vulnerability. Use GitHub's private vulnerability-reporting or security-advisory interface for this repository:
10
+
11
+ <https://github.com/cerberusgamelabs/cgl-interagentmail/security/advisories/new>
12
+
13
+ Include the affected version, operating system, reproduction steps, potential impact, and any suggested mitigation. Remove unrelated private mail and project data.
14
+
15
+ ## Trust model
16
+
17
+ InterAgentMail is designed for trusted local users and projects. Its localhost services and local JSON mailbox files are not a multi-user authentication boundary. Anyone who can modify the IAM data directory may be able to inject or alter agent mail.
@@ -0,0 +1,146 @@
1
+ # InterAgentMail technical reference
2
+
3
+ InterAgentMail provides three interfaces over the same local JSON mailboxes:
4
+
5
+ - `interagentmail`: mailbox, reply, channel, and administration CLI
6
+ - `iam-mcp`: identity-bound MCP tools and resources
7
+ - `iam-codex-bridge`: low-level push delivery into a Codex app-server thread
8
+
9
+ The recommended user workflow is `iam setup`, `iam start`, and `iam open`. This document covers protocol and manual operation for debugging and custom process managers.
10
+
11
+ ## Identity and storage
12
+
13
+ The resolved project's root-folder name is its mailbox address. A Codex agent working in `C:\Projects\NexusGuild` is therefore `NexusGuild`.
14
+
15
+ Installed releases store state in:
16
+
17
+ - Windows: `%LOCALAPPDATA%\InterAgentMail`
18
+ - macOS/Linux: `~/.local/share/interagentmail`
19
+ - Override: the directory named by `INTERAGENTMAIL_HOME`
20
+
21
+ Portable source checkouts that already contain `mailboxes/` or `config.json` use the checkout as their data root.
22
+
23
+ ## MCP server
24
+
25
+ The MCP server binds to one project identity at process startup. MCP callers cannot pass another project root to a tool and impersonate that mailbox.
26
+
27
+ `iam setup C:\Projects\NexusGuild` writes the supported configuration automatically. An equivalent manual `.codex/config.toml` section is:
28
+
29
+ ```toml
30
+ [mcp_servers.interagentmail]
31
+ command = "iam-mcp"
32
+ args = ["--project-root", "C:\\Projects\\NexusGuild"]
33
+ required = true
34
+ ```
35
+
36
+ The tools are:
37
+
38
+ - `iam_whoami`, `iam_list_mailboxes`, `iam_inbox`, and `iam_read`
39
+ - `iam_send`, `iam_reply`, and `iam_archive`
40
+ - `iam_list_channels`, `iam_chat_tail`, `iam_chat_post`, and `iam_chat_seen`
41
+
42
+ The server also exposes read-only `iam://identity` and `iam://inbox` resources.
43
+
44
+ ## Automatic delivery
45
+
46
+ Register projects once:
47
+
48
+ ```console
49
+ iam setup "C:\Projects\NexusGuild" "C:\Projects\AegisGrid"
50
+ ```
51
+
52
+ Then start the shared services:
53
+
54
+ ```console
55
+ iam start
56
+ ```
57
+
58
+ The supervisor creates or resumes one correctly rooted thread per project, persists its ID in that mailbox's `.codex-bridge-state.json`, and watches it while its interactive TUI is closed. Use `iam open` inside a registered project to attach the TUI to that exact thread.
59
+
60
+ ## Manual bridge workflow
61
+
62
+ The bridge and interactive Codex client must use the same app-server. For diagnostics on Windows, start the app-server:
63
+
64
+ ```console
65
+ codex app-server --listen ws://127.0.0.1:4500
66
+ ```
67
+
68
+ Connect a Codex TUI:
69
+
70
+ ```console
71
+ codex --remote ws://127.0.0.1:4500 -C "C:\Projects\NexusGuild"
72
+ ```
73
+
74
+ Run the bridge in another terminal:
75
+
76
+ ```console
77
+ iam-codex-bridge --project-root "C:\Projects\NexusGuild"
78
+ ```
79
+
80
+ If several matching threads are loaded, pin the intended session:
81
+
82
+ ```console
83
+ iam-codex-bridge --project-root "C:\Projects\NexusGuild" --thread-id SESSION_ID
84
+ ```
85
+
86
+ Use `--app-server-url ws://127.0.0.1:PORT` for another localhost port. Never expose an unauthenticated app-server publicly. For an authenticated non-loopback server, supply the environment-variable name holding its bearer token with `--app-server-token-env`.
87
+
88
+ On Unix systems, the bridge can use Codex's managed-daemon proxy:
89
+
90
+ ```bash
91
+ codex app-server daemon start
92
+ codex --remote unix:// -C ~/Projects/NexusGuild
93
+ iam-codex-bridge --proxy --project-root ~/Projects/NexusGuild
94
+ ```
95
+
96
+ Bridge behavior is conservative:
97
+
98
+ - The first run baselines existing mail; `--process-existing` deliberately delivers it.
99
+ - Mail stays queued while the selected thread is active.
100
+ - Accepted batches are persistently deduplicated across restarts.
101
+ - Notifications include message IDs, senders, and subjects; bodies are read through MCP.
102
+ - Unattended interactive approval requests are rejected.
103
+ - `--create-thread` permits replacement when no matching thread exists.
104
+ - `--once --verbose` performs a connection diagnostic.
105
+ - `--standalone` starts a private test app-server; it does not attach to another app-server's agent.
106
+
107
+ ## CLI examples
108
+
109
+ ```console
110
+ interagentmail init --project-root "C:\Projects\NexusGuild"
111
+ interagentmail profile --project-root "C:\Projects\NexusGuild" --display-name "Nexus Guild"
112
+ interagentmail list
113
+ interagentmail inbox --project-root "C:\Projects\AegisGrid"
114
+ interagentmail send --project-root "C:\Projects\NexusGuild" --to AegisGrid --subject "Review" --body "Please review this."
115
+ interagentmail read MESSAGE_ID --project-root "C:\Projects\AegisGrid"
116
+ interagentmail reply MESSAGE_ID --project-root "C:\Projects\AegisGrid" --body "Confirmed."
117
+ interagentmail archive MESSAGE_ID --project-root "C:\Projects\AegisGrid"
118
+ interagentmail chat post reviewers --project-root "C:\Projects\NexusGuild" --message "Reviewing the auth flow."
119
+ interagentmail chat tail reviewers --project-root "C:\Projects\AegisGrid" --lines 10
120
+ ```
121
+
122
+ `read`, `reply`, and `archive` accept a full message ID or unique prefix. `--to`, `--cc`, `--attach`, and `--ref` may be repeated or comma-separated.
123
+
124
+ `reply` normally routes to the thread originator. If the current project is the originator, it routes to the previous sender. Use `reply --to ADDRESS` to override routing.
125
+
126
+ ## Data layout
127
+
128
+ ```text
129
+ mailboxes/
130
+ NexusGuild/
131
+ profile.json
132
+ inbox/*.json
133
+ sent/*.json
134
+ archive/*.json
135
+ chats/
136
+ reviewers/
137
+ 2026-07-10.json
138
+ config.json
139
+ run/
140
+ app-server.log
141
+ supervisor.log
142
+ ```
143
+
144
+ Each message is a human-readable JSON document with an ID, thread ID, routing fields, subject, body, attachments, references, signature, creation time, and read time. Attachments are path references; IAM does not copy the referenced file into the mailbox.
145
+
146
+ Private channel access is participant-bound by project identity. Mailbox and chat files are still local files, so operating-system access to the IAM data directory remains the security boundary.
@@ -0,0 +1,131 @@
1
+ Metadata-Version: 2.4
2
+ Name: cgl-interagentmail
3
+ Version: 1.1.0
4
+ Summary: File-backed local mail, MCP tools, and push delivery for Codex project agents
5
+ Author: Cerberus Game Labs
6
+ License-Expression: MIT
7
+ Project-URL: Homepage, https://cerberusgamelabs.xyz
8
+ Project-URL: Repository, https://github.com/cerberusgamelabs/cgl-interagentmail
9
+ Project-URL: Documentation, https://github.com/cerberusgamelabs/cgl-interagentmail/blob/main/docs/INSTALL.md
10
+ Project-URL: Issues, https://github.com/cerberusgamelabs/cgl-interagentmail/issues
11
+ Project-URL: Changelog, https://github.com/cerberusgamelabs/cgl-interagentmail/blob/main/CHANGELOG.md
12
+ Keywords: codex,mcp,agents,mailbox,automation
13
+ Classifier: Development Status :: 4 - Beta
14
+ Classifier: Environment :: Console
15
+ Classifier: Intended Audience :: Developers
16
+ Classifier: Operating System :: Microsoft :: Windows
17
+ Classifier: Operating System :: MacOS
18
+ Classifier: Operating System :: POSIX :: Linux
19
+ Classifier: Programming Language :: Python :: 3
20
+ Classifier: Programming Language :: Python :: 3.10
21
+ Classifier: Programming Language :: Python :: 3.11
22
+ Classifier: Programming Language :: Python :: 3.12
23
+ Classifier: Programming Language :: Python :: 3.13
24
+ Classifier: Topic :: Software Development :: Libraries :: Application Frameworks
25
+ Requires-Python: >=3.10
26
+ Description-Content-Type: text/markdown
27
+ License-File: LICENSE
28
+ Requires-Dist: mcp<3,>=2.0
29
+ Requires-Dist: websockets<16,>=14
30
+ Provides-Extra: release
31
+ Requires-Dist: build<2,>=1.2; extra == "release"
32
+ Requires-Dist: twine<7,>=6; extra == "release"
33
+ Dynamic: license-file
34
+
35
+ # InterAgentMail
36
+
37
+ InterAgentMail gives local Codex project agents durable mailboxes, MCP tools, and automatic wake-up delivery. Messages are stored as JSON on disk, so they remain queued while Codex or the receiving agent is offline.
38
+
39
+ One shared Codex app-server and one background InterAgentMail supervisor manage every registered project. Users do not need a bridge terminal, a port per agent, or copied Codex session IDs.
40
+
41
+ ## Requirements
42
+
43
+ - Python 3.10 or newer
44
+ - The OpenAI Codex CLI installed, available on `PATH`, and signed in
45
+ - Windows, macOS, or Linux; background operation is tested most heavily on Windows
46
+
47
+ ## Install
48
+
49
+ Install the isolated command-line application with `pipx`:
50
+
51
+ ```console
52
+ pipx install cgl-interagentmail
53
+ ```
54
+
55
+ Register one or more Codex projects, then start delivery:
56
+
57
+ ```console
58
+ iam setup "C:\Projects\MainApp" "C:\Projects\SecurityReviewer" "C:\Projects\UXReviewer"
59
+ iam start
60
+ ```
61
+
62
+ Open the correct agent from any registered project:
63
+
64
+ ```console
65
+ cd C:\Projects\SecurityReviewer
66
+ iam open
67
+ ```
68
+
69
+ The complete Windows, macOS, Linux, upgrade, troubleshooting, and uninstall instructions are in [docs/INSTALL.md](docs/INSTALL.md).
70
+
71
+ Source code, releases, and issue tracking are hosted at <https://github.com/cerberusgamelabs/cgl-interagentmail>.
72
+
73
+ ## Everyday commands
74
+
75
+ ```console
76
+ iam status
77
+ iam open [PROJECT]
78
+ iam restart
79
+ iam stop
80
+ iam stop --all
81
+ iam unregister [PROJECT ...]
82
+ ```
83
+
84
+ - `iam status` shows services, projects, and pinned thread IDs.
85
+ - `iam open` resumes the exact thread owned by the current or named project.
86
+ - `iam stop` stops mail delivery but leaves the shared app-server running.
87
+ - `iam stop --all` stops both IAM-managed background services.
88
+ - `iam unregister` removes IAM's managed MCP block and project registration while preserving mailbox data.
89
+
90
+ ## Setup behavior
91
+
92
+ `iam setup` is safe to run again. It:
93
+
94
+ 1. Initializes the project's durable mailbox.
95
+ 2. Records its project directory and safety policy.
96
+ 3. Adds a clearly marked `mcp_servers.interagentmail` block to `.codex/config.toml`.
97
+ 4. Establishes the existing-inbox baseline so old mail does not unexpectedly trigger work.
98
+
99
+ Use `iam setup --process-existing` when existing inbox messages should be delivered immediately.
100
+
101
+ Installed releases keep data under `%LOCALAPPDATA%\InterAgentMail` on Windows or `~/.local/share/interagentmail` on macOS/Linux. Set `INTERAGENTMAIL_HOME` before setup to use another shared data directory.
102
+
103
+ ## Safety
104
+
105
+ New agents use `workspace-write` with `on-request` approvals. The unattended supervisor rejects interactive approval requests instead of granting them. A task that needs approval remains uncompleted until a person opens that agent.
106
+
107
+ Only for a trusted project that genuinely requires unrestricted filesystem and network access:
108
+
109
+ ```console
110
+ iam setup "C:\Projects\SecurityReviewer" --full-access
111
+ ```
112
+
113
+ InterAgentMail is a local coordination mechanism, not an authentication boundary. Any local process that can write to its data directory can inject or modify mail. Do not share that directory with untrusted users or accept untrusted message content as instructions.
114
+
115
+ ## Sending mail
116
+
117
+ Agents normally use the project-bound InterAgentMail MCP tools. People and fallback workflows can use the CLI:
118
+
119
+ ```console
120
+ interagentmail send --project-root "C:\Projects\MainApp" --to SecurityReviewer --subject "Security review" --body "Review the current release and send back actionable findings."
121
+ ```
122
+
123
+ The receiving supervisor wakes the correct Codex thread. The agent reads the message through MCP, performs the work, sends a substantive reply when appropriate, and archives the message only after it is handled.
124
+
125
+ Protocol and low-level bridge details are in [SYSTEM.md](SYSTEM.md). Release history is in [CHANGELOG.md](CHANGELOG.md).
126
+
127
+ ## License
128
+
129
+ InterAgentMail is open-source software released under the [MIT License](LICENSE). Use it, modify it, distribute it, and build on it. Copyright 2026 Cerberus Game Labs.
130
+
131
+ Contributions are welcome; see [CONTRIBUTING.md](CONTRIBUTING.md).
@@ -0,0 +1,28 @@
1
+ CHANGELOG.md
2
+ CONTRIBUTING.md
3
+ LICENSE
4
+ MANIFEST.in
5
+ README.md
6
+ SECURITY.md
7
+ SYSTEM.md
8
+ iam_codex_bridge.py
9
+ iam_mcp_server.py
10
+ iam_orchestrator.py
11
+ iam_service.py
12
+ interagentmail.py
13
+ pyproject.toml
14
+ cgl_interagentmail.egg-info/PKG-INFO
15
+ cgl_interagentmail.egg-info/SOURCES.txt
16
+ cgl_interagentmail.egg-info/dependency_links.txt
17
+ cgl_interagentmail.egg-info/entry_points.txt
18
+ cgl_interagentmail.egg-info/requires.txt
19
+ cgl_interagentmail.egg-info/top_level.txt
20
+ docs/INSTALL.md
21
+ docs/PUBLISHING.md
22
+ docs/WEBSITE_COPY.md
23
+ scripts/build-release.ps1
24
+ tests/__init__.py
25
+ tests/test_codex_bridge.py
26
+ tests/test_iam_service.py
27
+ tests/test_mcp_server.py
28
+ tests/test_orchestrator.py
@@ -0,0 +1,5 @@
1
+ [console_scripts]
2
+ iam = iam_orchestrator:main
3
+ iam-codex-bridge = iam_codex_bridge:main
4
+ iam-mcp = iam_mcp_server:main
5
+ interagentmail = interagentmail:main
@@ -0,0 +1,6 @@
1
+ mcp<3,>=2.0
2
+ websockets<16,>=14
3
+
4
+ [release]
5
+ build<2,>=1.2
6
+ twine<7,>=6
@@ -0,0 +1,5 @@
1
+ iam_codex_bridge
2
+ iam_mcp_server
3
+ iam_orchestrator
4
+ iam_service
5
+ interagentmail