pcmcp 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 (61) hide show
  1. pcmcp-1.1.0/LICENSE +21 -0
  2. pcmcp-1.1.0/PKG-INFO +108 -0
  3. pcmcp-1.1.0/README.md +88 -0
  4. pcmcp-1.1.0/pcmcp.egg-info/PKG-INFO +108 -0
  5. pcmcp-1.1.0/pcmcp.egg-info/SOURCES.txt +59 -0
  6. pcmcp-1.1.0/pcmcp.egg-info/dependency_links.txt +1 -0
  7. pcmcp-1.1.0/pcmcp.egg-info/entry_points.txt +2 -0
  8. pcmcp-1.1.0/pcmcp.egg-info/top_level.txt +1 -0
  9. pcmcp-1.1.0/pcmcp_swarm/__init__.py +6 -0
  10. pcmcp-1.1.0/pcmcp_swarm/__main__.py +288 -0
  11. pcmcp-1.1.0/pcmcp_swarm/bots/__init__.py +0 -0
  12. pcmcp-1.1.0/pcmcp_swarm/bots/bot_a.py +102 -0
  13. pcmcp-1.1.0/pcmcp_swarm/bots/bot_b.py +130 -0
  14. pcmcp-1.1.0/pcmcp_swarm/bots/bot_c.py +56 -0
  15. pcmcp-1.1.0/pcmcp_swarm/bots/bot_e.py +112 -0
  16. pcmcp-1.1.0/pcmcp_swarm/bots/bot_s.py +48 -0
  17. pcmcp-1.1.0/pcmcp_swarm/bots/common.py +132 -0
  18. pcmcp-1.1.0/pcmcp_swarm/checkin/__init__.py +42 -0
  19. pcmcp-1.1.0/pcmcp_swarm/checkin/handler.py +143 -0
  20. pcmcp-1.1.0/pcmcp_swarm/checkin/local_inbox.py +65 -0
  21. pcmcp-1.1.0/pcmcp_swarm/checkin/stubs.py +34 -0
  22. pcmcp-1.1.0/pcmcp_swarm/config.py +137 -0
  23. pcmcp-1.1.0/pcmcp_swarm/daemon.py +70 -0
  24. pcmcp-1.1.0/pcmcp_swarm/doorbell/__init__.py +69 -0
  25. pcmcp-1.1.0/pcmcp_swarm/doorbell/gmail_imap.py +70 -0
  26. pcmcp-1.1.0/pcmcp_swarm/doorbell/local.py +87 -0
  27. pcmcp-1.1.0/pcmcp_swarm/doorbell/stubs.py +13 -0
  28. pcmcp-1.1.0/pcmcp_swarm/drive/__init__.py +39 -0
  29. pcmcp-1.1.0/pcmcp_swarm/drive/_testentry.py +41 -0
  30. pcmcp-1.1.0/pcmcp_swarm/drive/api.py +378 -0
  31. pcmcp-1.1.0/pcmcp_swarm/drive/browse.py +219 -0
  32. pcmcp-1.1.0/pcmcp_swarm/drive/cli.py +541 -0
  33. pcmcp-1.1.0/pcmcp_swarm/drive/compare_icloud.py +78 -0
  34. pcmcp-1.1.0/pcmcp_swarm/drive/fake.py +329 -0
  35. pcmcp-1.1.0/pcmcp_swarm/drive/icloud.py +73 -0
  36. pcmcp-1.1.0/pcmcp_swarm/drive/inventory.py +199 -0
  37. pcmcp-1.1.0/pcmcp_swarm/drive/language_baseline.py +34 -0
  38. pcmcp-1.1.0/pcmcp_swarm/drive/language_experiment.py +147 -0
  39. pcmcp-1.1.0/pcmcp_swarm/drive/owner.py +156 -0
  40. pcmcp-1.1.0/pcmcp_swarm/drive/planfile.py +379 -0
  41. pcmcp-1.1.0/pcmcp_swarm/drive/runs.py +152 -0
  42. pcmcp-1.1.0/pcmcp_swarm/drive/selftest.py +920 -0
  43. pcmcp-1.1.0/pcmcp_swarm/drive/swarm.py +654 -0
  44. pcmcp-1.1.0/pcmcp_swarm/drive/tasks.py +68 -0
  45. pcmcp-1.1.0/pcmcp_swarm/drive/trigger.py +766 -0
  46. pcmcp-1.1.0/pcmcp_swarm/health.py +123 -0
  47. pcmcp-1.1.0/pcmcp_swarm/mcp_server.py +411 -0
  48. pcmcp-1.1.0/pcmcp_swarm/plans.py +112 -0
  49. pcmcp-1.1.0/pcmcp_swarm/registry.py +130 -0
  50. pcmcp-1.1.0/pcmcp_swarm/runner.py +190 -0
  51. pcmcp-1.1.0/pcmcp_swarm/scanner.py +139 -0
  52. pcmcp-1.1.0/pcmcp_swarm/screenshot/__init__.py +15 -0
  53. pcmcp-1.1.0/pcmcp_swarm/screenshot/linux.py +24 -0
  54. pcmcp-1.1.0/pcmcp_swarm/screenshot/macos.py +43 -0
  55. pcmcp-1.1.0/pcmcp_swarm/screenshot/windows.py +21 -0
  56. pcmcp-1.1.0/pcmcp_swarm/secret_store.py +37 -0
  57. pcmcp-1.1.0/pcmcp_swarm/selftest.py +360 -0
  58. pcmcp-1.1.0/pcmcp_swarm/signing.py +95 -0
  59. pcmcp-1.1.0/pcmcp_swarm/util.py +119 -0
  60. pcmcp-1.1.0/pyproject.toml +31 -0
  61. pcmcp-1.1.0/setup.cfg +4 -0
pcmcp-1.1.0/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Angela Christine Wilkinson
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.
pcmcp-1.1.0/PKG-INFO ADDED
@@ -0,0 +1,108 @@
1
+ Metadata-Version: 2.4
2
+ Name: pcmcp
3
+ Version: 1.1.0
4
+ Summary: PCMCP: cross-platform instant file-state change bot swarm with a stdlib-only MCP server.
5
+ Author-email: Angela Wilkinson <angie@synhumanitylabs.com>
6
+ License: MIT
7
+ Project-URL: Homepage, https://synomize.io
8
+ Project-URL: Repository, https://github.com/Missprincessish/PCMCP
9
+ Project-URL: Issues, https://github.com/Missprincessish/PCMCP/issues
10
+ Keywords: mcp,model-context-protocol,swarm,automation,mac
11
+ Classifier: Intended Audience :: Developers
12
+ Classifier: Operating System :: MacOS
13
+ Classifier: Operating System :: POSIX
14
+ Classifier: Programming Language :: Python :: 3
15
+ Classifier: Topic :: System :: Systems Administration
16
+ Requires-Python: >=3.9
17
+ Description-Content-Type: text/markdown
18
+ License-File: LICENSE
19
+ Dynamic: license-file
20
+
21
+ <img width="512" height="279" alt="PCMCP logo" src="https://github.com/user-attachments/assets/712ad48c-ddf6-422b-ab1f-d522f1aa8c2c" />
22
+
23
+ # PCMCP
24
+
25
+ **Start on Mac. Continue anywhere. Send it back. Nothing gets lost.**
26
+
27
+ PCMCP is two things in one repo:
28
+
29
+ 1. **The original WebMCP cross-platform task handoff demo** (browser MCP tools hand a task capsule between machines).
30
+ 2. **The PCMCP Deterministic Bot Swarm** — up to 100 deterministic, hash-logged, reversible file bots, plus an iMessage text trigger so a phone can ask a Mac for status, screenshots and more.
31
+
32
+ ## What actually works (tested, no hand-waving)
33
+
34
+ | Feature | Status |
35
+ |---|---|
36
+ | WebMCP capsule handoff demo (`send_capsule` / `receive_capsule`) | works; run locally with `npm start` |
37
+ | Swarm selftest (bots, registry, plans, approval, undo, crash-resume, doorbell, signed check-in) | 57/57 on macOS (arm64), Python 3.15 |
38
+ | iMessage text trigger → screenshot, attached back to the chat as `.png` | verified live: attachment confirmed present in the Messages database, not just "sent" |
39
+ | iMessage text trigger → screensaver start | verified live (bounded launch, honest failure reporting) |
40
+ | Text trigger commands: `status`, `live`, `inventory`, `task`, `browse`, `run` | implemented and unit-tested |
41
+ | Trigger parser: a command quoted inside a normal sentence is never executed | 10/10 unit tests; line-anchored full-match parsing |
42
+ | Cross-platform selftest | 57/57 on macOS (arm64) and Linux, verified from a fresh public-repo download; Windows not yet run |
43
+
44
+ ## The iMessage text trigger
45
+
46
+ The Mac reads the Messages database read-only. A text from an allowed sender can do:
47
+
48
+ ```text
49
+ PCMCP-<secret> status live swarm status
50
+ PCMCP-<secret> live listener health: uptime, poll rate, active jobs, last acted command + age, free disk
51
+ PCMCP-<secret> screensaver start the Mac screensaver (reversible action; verified launch only)
52
+ PCMCP-<secret> screenshot screenshot of the screen, attached back as .png
53
+ PCMCP-<secret> inventory drive read-only Google Drive inventory (attached .txt listing)
54
+ PCMCP-<secret> inventory icloud look-only iCloud Drive listing (names, sizes, downloaded/cloud-only)
55
+ PCMCP-<secret> inventory missing compare iCloud with Documents and Downloads (read-only)
56
+ PCMCP-<secret> task <name> one named read-only task (attached .txt)
57
+ PCMCP-<secret> browse <alias.index> browse approved folders by numbered child directories
58
+ PCMCP-<secret> run <plan-prefix> start a plan the owner already signed with a passphrase
59
+ ```
60
+
61
+ Safety rules that matter:
62
+
63
+ - **The secret is a doorbell, not an approval.** There is no text command for approve.
64
+ - One command per line: a command quoted inside a normal sentence is never executed.
65
+ - The Mac stores only the SHA-256 of the secret; replies never contain it; each message acts at most once, only if new, incoming, from an allowed sender, inside the rate limit.
66
+ - Nothing a text can reach writes, moves or deletes — except `run`, which executes only a plan signed with the owner passphrase, one shot per approval, never after her stop or a rollback.
67
+
68
+ See the docstring of `pcmcp_swarm/drive/trigger.py` for the full safety model.
69
+
70
+ ## Deterministic bot swarm
71
+
72
+ Up to 100 bots: plain Python, no AI, no randomness. Every action is pre-approved by the owner, logged with SHA-256 hashes, and reversible (deletes and overwrites are staged, never destroyed). Doorbell + HMAC-signed instruction batches: the orchestrator can propose; only the local owner CLI can approve.
73
+
74
+ - Docs: [SWARM_README.md](SWARM_README.md) • Data format: [SPEC.md](SPEC.md) • Task ledger: [SWARM_TASKS.md](SWARM_TASKS.md) • Drive plan format: [DRIVE_PLAN_SPEC.md](DRIVE_PLAN_SPEC.md)
75
+ - Code: [`pcmcp_swarm/`](pcmcp_swarm/) (Python standard library only, no `pip install`)
76
+ - Selftest: `python3 -m pcmcp_swarm.selftest`
77
+
78
+ ## MCP server
79
+
80
+ The swarm speaks Model Context Protocol, standard library only, no `pip install`:
81
+
82
+ ```bash
83
+ python3 -m pcmcp_swarm mcp
84
+ ```
85
+
86
+ Tools: `swarm_status`, `swarm_meter` (fleet health meter: per-bot verdict OK / WARN / STALLED / BROKEN with evidence and repair advice, so the client knows which arm of the swarm is broken), `swarm_plan_list`, `swarm_plan_show`, `swarm_scan` (proposes a plan, changes nothing), `swarm_execute` (dry-run by default), `swarm_undo` (restores), `swarm_approve` (refuses unless the owner sets `mcp.allow_approval: true` in the config), and `swarm_screenshot` (returns a PNG inline as MCP image content so a vision-capable client can see the screen; refuses unless `mcp.allow_screenshots: true`). Real execution additionally requires `mcp.allow_real_execution: true`. All gates default to false: out of the box an MCP client can look, propose and dry-run, never approve, destroy or photograph anything. A repaired bot returns to OK once its failed op is re-run and completed. Every call is logged to `logs/mcp.jsonl`. Also exposes the bot registry key as an MCP resource (`pcmcp://registry`), answers `prompts/list` and `logging/setLevel`, and speaks protocol versions 2024-11-05, 2025-03-26 and 2025-06-18. Conformance-tested against the documented client wire format: handshake, version fallback, notification silence, parse errors and every startup probe a real client sends.
87
+
88
+ ## Built around Instinct
89
+
90
+ PCMCP is built for the new texting agents. I use Instinct daily: it texts my Mac a command (over iMessage), the deterministic swarm does the work, and results come back to the chat, screenshot or file attached. The agent never gets a shell, never gets approve rights, and can only propose work for the owner to approve locally. The trigger parser is hardened so a command quoted inside a normal sentence is never executed, and reply delivery is verified against the Messages database instead of trusting AppleScript's word for it.
91
+
92
+ ## WebMCP handoff demo (the original PCMCP)
93
+
94
+ A browser exposes real `document.modelContext.registerTool(...)` WebMCP tools that let an agent send and receive a neutral task capsule, so the same task state can move between computers without remote-controlling the other machine.
95
+
96
+ ```bash
97
+ npm start
98
+ ```
99
+
100
+ Then open `http://localhost:4173` in your browser. (The live demo used a temporary Cloudflare tunnel; those URLs die by design, so run locally for a fresh one.)
101
+
102
+ ## License
103
+
104
+ MIT
105
+
106
+ ---
107
+
108
+ Built by **Angela Wilkinson** at **SynHumanity Labs** • [synomize.io](https://synomize.io)
pcmcp-1.1.0/README.md ADDED
@@ -0,0 +1,88 @@
1
+ <img width="512" height="279" alt="PCMCP logo" src="https://github.com/user-attachments/assets/712ad48c-ddf6-422b-ab1f-d522f1aa8c2c" />
2
+
3
+ # PCMCP
4
+
5
+ **Start on Mac. Continue anywhere. Send it back. Nothing gets lost.**
6
+
7
+ PCMCP is two things in one repo:
8
+
9
+ 1. **The original WebMCP cross-platform task handoff demo** (browser MCP tools hand a task capsule between machines).
10
+ 2. **The PCMCP Deterministic Bot Swarm** — up to 100 deterministic, hash-logged, reversible file bots, plus an iMessage text trigger so a phone can ask a Mac for status, screenshots and more.
11
+
12
+ ## What actually works (tested, no hand-waving)
13
+
14
+ | Feature | Status |
15
+ |---|---|
16
+ | WebMCP capsule handoff demo (`send_capsule` / `receive_capsule`) | works; run locally with `npm start` |
17
+ | Swarm selftest (bots, registry, plans, approval, undo, crash-resume, doorbell, signed check-in) | 57/57 on macOS (arm64), Python 3.15 |
18
+ | iMessage text trigger → screenshot, attached back to the chat as `.png` | verified live: attachment confirmed present in the Messages database, not just "sent" |
19
+ | iMessage text trigger → screensaver start | verified live (bounded launch, honest failure reporting) |
20
+ | Text trigger commands: `status`, `live`, `inventory`, `task`, `browse`, `run` | implemented and unit-tested |
21
+ | Trigger parser: a command quoted inside a normal sentence is never executed | 10/10 unit tests; line-anchored full-match parsing |
22
+ | Cross-platform selftest | 57/57 on macOS (arm64) and Linux, verified from a fresh public-repo download; Windows not yet run |
23
+
24
+ ## The iMessage text trigger
25
+
26
+ The Mac reads the Messages database read-only. A text from an allowed sender can do:
27
+
28
+ ```text
29
+ PCMCP-<secret> status live swarm status
30
+ PCMCP-<secret> live listener health: uptime, poll rate, active jobs, last acted command + age, free disk
31
+ PCMCP-<secret> screensaver start the Mac screensaver (reversible action; verified launch only)
32
+ PCMCP-<secret> screenshot screenshot of the screen, attached back as .png
33
+ PCMCP-<secret> inventory drive read-only Google Drive inventory (attached .txt listing)
34
+ PCMCP-<secret> inventory icloud look-only iCloud Drive listing (names, sizes, downloaded/cloud-only)
35
+ PCMCP-<secret> inventory missing compare iCloud with Documents and Downloads (read-only)
36
+ PCMCP-<secret> task <name> one named read-only task (attached .txt)
37
+ PCMCP-<secret> browse <alias.index> browse approved folders by numbered child directories
38
+ PCMCP-<secret> run <plan-prefix> start a plan the owner already signed with a passphrase
39
+ ```
40
+
41
+ Safety rules that matter:
42
+
43
+ - **The secret is a doorbell, not an approval.** There is no text command for approve.
44
+ - One command per line: a command quoted inside a normal sentence is never executed.
45
+ - The Mac stores only the SHA-256 of the secret; replies never contain it; each message acts at most once, only if new, incoming, from an allowed sender, inside the rate limit.
46
+ - Nothing a text can reach writes, moves or deletes — except `run`, which executes only a plan signed with the owner passphrase, one shot per approval, never after her stop or a rollback.
47
+
48
+ See the docstring of `pcmcp_swarm/drive/trigger.py` for the full safety model.
49
+
50
+ ## Deterministic bot swarm
51
+
52
+ Up to 100 bots: plain Python, no AI, no randomness. Every action is pre-approved by the owner, logged with SHA-256 hashes, and reversible (deletes and overwrites are staged, never destroyed). Doorbell + HMAC-signed instruction batches: the orchestrator can propose; only the local owner CLI can approve.
53
+
54
+ - Docs: [SWARM_README.md](SWARM_README.md) • Data format: [SPEC.md](SPEC.md) • Task ledger: [SWARM_TASKS.md](SWARM_TASKS.md) • Drive plan format: [DRIVE_PLAN_SPEC.md](DRIVE_PLAN_SPEC.md)
55
+ - Code: [`pcmcp_swarm/`](pcmcp_swarm/) (Python standard library only, no `pip install`)
56
+ - Selftest: `python3 -m pcmcp_swarm.selftest`
57
+
58
+ ## MCP server
59
+
60
+ The swarm speaks Model Context Protocol, standard library only, no `pip install`:
61
+
62
+ ```bash
63
+ python3 -m pcmcp_swarm mcp
64
+ ```
65
+
66
+ Tools: `swarm_status`, `swarm_meter` (fleet health meter: per-bot verdict OK / WARN / STALLED / BROKEN with evidence and repair advice, so the client knows which arm of the swarm is broken), `swarm_plan_list`, `swarm_plan_show`, `swarm_scan` (proposes a plan, changes nothing), `swarm_execute` (dry-run by default), `swarm_undo` (restores), `swarm_approve` (refuses unless the owner sets `mcp.allow_approval: true` in the config), and `swarm_screenshot` (returns a PNG inline as MCP image content so a vision-capable client can see the screen; refuses unless `mcp.allow_screenshots: true`). Real execution additionally requires `mcp.allow_real_execution: true`. All gates default to false: out of the box an MCP client can look, propose and dry-run, never approve, destroy or photograph anything. A repaired bot returns to OK once its failed op is re-run and completed. Every call is logged to `logs/mcp.jsonl`. Also exposes the bot registry key as an MCP resource (`pcmcp://registry`), answers `prompts/list` and `logging/setLevel`, and speaks protocol versions 2024-11-05, 2025-03-26 and 2025-06-18. Conformance-tested against the documented client wire format: handshake, version fallback, notification silence, parse errors and every startup probe a real client sends.
67
+
68
+ ## Built around Instinct
69
+
70
+ PCMCP is built for the new texting agents. I use Instinct daily: it texts my Mac a command (over iMessage), the deterministic swarm does the work, and results come back to the chat, screenshot or file attached. The agent never gets a shell, never gets approve rights, and can only propose work for the owner to approve locally. The trigger parser is hardened so a command quoted inside a normal sentence is never executed, and reply delivery is verified against the Messages database instead of trusting AppleScript's word for it.
71
+
72
+ ## WebMCP handoff demo (the original PCMCP)
73
+
74
+ A browser exposes real `document.modelContext.registerTool(...)` WebMCP tools that let an agent send and receive a neutral task capsule, so the same task state can move between computers without remote-controlling the other machine.
75
+
76
+ ```bash
77
+ npm start
78
+ ```
79
+
80
+ Then open `http://localhost:4173` in your browser. (The live demo used a temporary Cloudflare tunnel; those URLs die by design, so run locally for a fresh one.)
81
+
82
+ ## License
83
+
84
+ MIT
85
+
86
+ ---
87
+
88
+ Built by **Angela Wilkinson** at **SynHumanity Labs** • [synomize.io](https://synomize.io)
@@ -0,0 +1,108 @@
1
+ Metadata-Version: 2.4
2
+ Name: pcmcp
3
+ Version: 1.1.0
4
+ Summary: PCMCP: cross-platform instant file-state change bot swarm with a stdlib-only MCP server.
5
+ Author-email: Angela Wilkinson <angie@synhumanitylabs.com>
6
+ License: MIT
7
+ Project-URL: Homepage, https://synomize.io
8
+ Project-URL: Repository, https://github.com/Missprincessish/PCMCP
9
+ Project-URL: Issues, https://github.com/Missprincessish/PCMCP/issues
10
+ Keywords: mcp,model-context-protocol,swarm,automation,mac
11
+ Classifier: Intended Audience :: Developers
12
+ Classifier: Operating System :: MacOS
13
+ Classifier: Operating System :: POSIX
14
+ Classifier: Programming Language :: Python :: 3
15
+ Classifier: Topic :: System :: Systems Administration
16
+ Requires-Python: >=3.9
17
+ Description-Content-Type: text/markdown
18
+ License-File: LICENSE
19
+ Dynamic: license-file
20
+
21
+ <img width="512" height="279" alt="PCMCP logo" src="https://github.com/user-attachments/assets/712ad48c-ddf6-422b-ab1f-d522f1aa8c2c" />
22
+
23
+ # PCMCP
24
+
25
+ **Start on Mac. Continue anywhere. Send it back. Nothing gets lost.**
26
+
27
+ PCMCP is two things in one repo:
28
+
29
+ 1. **The original WebMCP cross-platform task handoff demo** (browser MCP tools hand a task capsule between machines).
30
+ 2. **The PCMCP Deterministic Bot Swarm** — up to 100 deterministic, hash-logged, reversible file bots, plus an iMessage text trigger so a phone can ask a Mac for status, screenshots and more.
31
+
32
+ ## What actually works (tested, no hand-waving)
33
+
34
+ | Feature | Status |
35
+ |---|---|
36
+ | WebMCP capsule handoff demo (`send_capsule` / `receive_capsule`) | works; run locally with `npm start` |
37
+ | Swarm selftest (bots, registry, plans, approval, undo, crash-resume, doorbell, signed check-in) | 57/57 on macOS (arm64), Python 3.15 |
38
+ | iMessage text trigger → screenshot, attached back to the chat as `.png` | verified live: attachment confirmed present in the Messages database, not just "sent" |
39
+ | iMessage text trigger → screensaver start | verified live (bounded launch, honest failure reporting) |
40
+ | Text trigger commands: `status`, `live`, `inventory`, `task`, `browse`, `run` | implemented and unit-tested |
41
+ | Trigger parser: a command quoted inside a normal sentence is never executed | 10/10 unit tests; line-anchored full-match parsing |
42
+ | Cross-platform selftest | 57/57 on macOS (arm64) and Linux, verified from a fresh public-repo download; Windows not yet run |
43
+
44
+ ## The iMessage text trigger
45
+
46
+ The Mac reads the Messages database read-only. A text from an allowed sender can do:
47
+
48
+ ```text
49
+ PCMCP-<secret> status live swarm status
50
+ PCMCP-<secret> live listener health: uptime, poll rate, active jobs, last acted command + age, free disk
51
+ PCMCP-<secret> screensaver start the Mac screensaver (reversible action; verified launch only)
52
+ PCMCP-<secret> screenshot screenshot of the screen, attached back as .png
53
+ PCMCP-<secret> inventory drive read-only Google Drive inventory (attached .txt listing)
54
+ PCMCP-<secret> inventory icloud look-only iCloud Drive listing (names, sizes, downloaded/cloud-only)
55
+ PCMCP-<secret> inventory missing compare iCloud with Documents and Downloads (read-only)
56
+ PCMCP-<secret> task <name> one named read-only task (attached .txt)
57
+ PCMCP-<secret> browse <alias.index> browse approved folders by numbered child directories
58
+ PCMCP-<secret> run <plan-prefix> start a plan the owner already signed with a passphrase
59
+ ```
60
+
61
+ Safety rules that matter:
62
+
63
+ - **The secret is a doorbell, not an approval.** There is no text command for approve.
64
+ - One command per line: a command quoted inside a normal sentence is never executed.
65
+ - The Mac stores only the SHA-256 of the secret; replies never contain it; each message acts at most once, only if new, incoming, from an allowed sender, inside the rate limit.
66
+ - Nothing a text can reach writes, moves or deletes — except `run`, which executes only a plan signed with the owner passphrase, one shot per approval, never after her stop or a rollback.
67
+
68
+ See the docstring of `pcmcp_swarm/drive/trigger.py` for the full safety model.
69
+
70
+ ## Deterministic bot swarm
71
+
72
+ Up to 100 bots: plain Python, no AI, no randomness. Every action is pre-approved by the owner, logged with SHA-256 hashes, and reversible (deletes and overwrites are staged, never destroyed). Doorbell + HMAC-signed instruction batches: the orchestrator can propose; only the local owner CLI can approve.
73
+
74
+ - Docs: [SWARM_README.md](SWARM_README.md) • Data format: [SPEC.md](SPEC.md) • Task ledger: [SWARM_TASKS.md](SWARM_TASKS.md) • Drive plan format: [DRIVE_PLAN_SPEC.md](DRIVE_PLAN_SPEC.md)
75
+ - Code: [`pcmcp_swarm/`](pcmcp_swarm/) (Python standard library only, no `pip install`)
76
+ - Selftest: `python3 -m pcmcp_swarm.selftest`
77
+
78
+ ## MCP server
79
+
80
+ The swarm speaks Model Context Protocol, standard library only, no `pip install`:
81
+
82
+ ```bash
83
+ python3 -m pcmcp_swarm mcp
84
+ ```
85
+
86
+ Tools: `swarm_status`, `swarm_meter` (fleet health meter: per-bot verdict OK / WARN / STALLED / BROKEN with evidence and repair advice, so the client knows which arm of the swarm is broken), `swarm_plan_list`, `swarm_plan_show`, `swarm_scan` (proposes a plan, changes nothing), `swarm_execute` (dry-run by default), `swarm_undo` (restores), `swarm_approve` (refuses unless the owner sets `mcp.allow_approval: true` in the config), and `swarm_screenshot` (returns a PNG inline as MCP image content so a vision-capable client can see the screen; refuses unless `mcp.allow_screenshots: true`). Real execution additionally requires `mcp.allow_real_execution: true`. All gates default to false: out of the box an MCP client can look, propose and dry-run, never approve, destroy or photograph anything. A repaired bot returns to OK once its failed op is re-run and completed. Every call is logged to `logs/mcp.jsonl`. Also exposes the bot registry key as an MCP resource (`pcmcp://registry`), answers `prompts/list` and `logging/setLevel`, and speaks protocol versions 2024-11-05, 2025-03-26 and 2025-06-18. Conformance-tested against the documented client wire format: handshake, version fallback, notification silence, parse errors and every startup probe a real client sends.
87
+
88
+ ## Built around Instinct
89
+
90
+ PCMCP is built for the new texting agents. I use Instinct daily: it texts my Mac a command (over iMessage), the deterministic swarm does the work, and results come back to the chat, screenshot or file attached. The agent never gets a shell, never gets approve rights, and can only propose work for the owner to approve locally. The trigger parser is hardened so a command quoted inside a normal sentence is never executed, and reply delivery is verified against the Messages database instead of trusting AppleScript's word for it.
91
+
92
+ ## WebMCP handoff demo (the original PCMCP)
93
+
94
+ A browser exposes real `document.modelContext.registerTool(...)` WebMCP tools that let an agent send and receive a neutral task capsule, so the same task state can move between computers without remote-controlling the other machine.
95
+
96
+ ```bash
97
+ npm start
98
+ ```
99
+
100
+ Then open `http://localhost:4173` in your browser. (The live demo used a temporary Cloudflare tunnel; those URLs die by design, so run locally for a fresh one.)
101
+
102
+ ## License
103
+
104
+ MIT
105
+
106
+ ---
107
+
108
+ Built by **Angela Wilkinson** at **SynHumanity Labs** • [synomize.io](https://synomize.io)
@@ -0,0 +1,59 @@
1
+ LICENSE
2
+ README.md
3
+ pyproject.toml
4
+ pcmcp.egg-info/PKG-INFO
5
+ pcmcp.egg-info/SOURCES.txt
6
+ pcmcp.egg-info/dependency_links.txt
7
+ pcmcp.egg-info/entry_points.txt
8
+ pcmcp.egg-info/top_level.txt
9
+ pcmcp_swarm/__init__.py
10
+ pcmcp_swarm/__main__.py
11
+ pcmcp_swarm/config.py
12
+ pcmcp_swarm/daemon.py
13
+ pcmcp_swarm/health.py
14
+ pcmcp_swarm/mcp_server.py
15
+ pcmcp_swarm/plans.py
16
+ pcmcp_swarm/registry.py
17
+ pcmcp_swarm/runner.py
18
+ pcmcp_swarm/scanner.py
19
+ pcmcp_swarm/secret_store.py
20
+ pcmcp_swarm/selftest.py
21
+ pcmcp_swarm/signing.py
22
+ pcmcp_swarm/util.py
23
+ pcmcp_swarm/bots/__init__.py
24
+ pcmcp_swarm/bots/bot_a.py
25
+ pcmcp_swarm/bots/bot_b.py
26
+ pcmcp_swarm/bots/bot_c.py
27
+ pcmcp_swarm/bots/bot_e.py
28
+ pcmcp_swarm/bots/bot_s.py
29
+ pcmcp_swarm/bots/common.py
30
+ pcmcp_swarm/checkin/__init__.py
31
+ pcmcp_swarm/checkin/handler.py
32
+ pcmcp_swarm/checkin/local_inbox.py
33
+ pcmcp_swarm/checkin/stubs.py
34
+ pcmcp_swarm/doorbell/__init__.py
35
+ pcmcp_swarm/doorbell/gmail_imap.py
36
+ pcmcp_swarm/doorbell/local.py
37
+ pcmcp_swarm/doorbell/stubs.py
38
+ pcmcp_swarm/drive/__init__.py
39
+ pcmcp_swarm/drive/_testentry.py
40
+ pcmcp_swarm/drive/api.py
41
+ pcmcp_swarm/drive/browse.py
42
+ pcmcp_swarm/drive/cli.py
43
+ pcmcp_swarm/drive/compare_icloud.py
44
+ pcmcp_swarm/drive/fake.py
45
+ pcmcp_swarm/drive/icloud.py
46
+ pcmcp_swarm/drive/inventory.py
47
+ pcmcp_swarm/drive/language_baseline.py
48
+ pcmcp_swarm/drive/language_experiment.py
49
+ pcmcp_swarm/drive/owner.py
50
+ pcmcp_swarm/drive/planfile.py
51
+ pcmcp_swarm/drive/runs.py
52
+ pcmcp_swarm/drive/selftest.py
53
+ pcmcp_swarm/drive/swarm.py
54
+ pcmcp_swarm/drive/tasks.py
55
+ pcmcp_swarm/drive/trigger.py
56
+ pcmcp_swarm/screenshot/__init__.py
57
+ pcmcp_swarm/screenshot/linux.py
58
+ pcmcp_swarm/screenshot/macos.py
59
+ pcmcp_swarm/screenshot/windows.py
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ pcmcp-swarm = pcmcp_swarm.__main__:main
@@ -0,0 +1 @@
1
+ pcmcp_swarm
@@ -0,0 +1,6 @@
1
+ """PCMCP Deterministic Bot Swarm.
2
+
3
+ Plain, deterministic software bots. No AI/ML, no randomness, no inference.
4
+ Every on-disk artifact is plain JSON described in SPEC.md (schema version below).
5
+ """
6
+ SCHEMA_VERSION = 1