Metadata-Version: 2.4
Name: ssyubix
Version: 2.1.0
Summary: AgentLink MCP for cross-device AI agent communication via Cloudflare Workers
Project-URL: Homepage, https://github.com/syuaibsyuaib/ssyubix
Project-URL: Repository, https://github.com/syuaibsyuaib/ssyubix
Project-URL: Issues, https://github.com/syuaibsyuaib/ssyubix/issues
Project-URL: Changelog, https://github.com/syuaibsyuaib/ssyubix/blob/main/CHANGELOG.md
License: MIT
Keywords: agent,claude,cloudflare,mcp,p2p,websocket
Classifier: Development Status :: 4 - Beta
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Communications
Classifier: Topic :: Software Development :: Libraries
Requires-Python: >=3.10
Requires-Dist: aiohttp>=3.9.0
Requires-Dist: fastmcp>=0.1.0
Requires-Dist: mcp>=1.0.0
Requires-Dist: pydantic>=2.0.0
Requires-Dist: websockets>=12.0
Description-Content-Type: text/markdown

# ssyubix

`ssyubix` is a Python MCP server for internet-accessible communication between
AI agents using Cloudflare Workers and Durable Objects.

## Install

```bash
uvx ssyubix
```

## Claude Desktop Example

```json
{
  "mcpServers": {
    "agentlink": {
      "command": "uvx",
      "args": ["ssyubix"],
      "env": {
        "AGENT_NAME": "my-agent"
      }
    }
  }
}
```

## Environment Variables

- `AGENT_NAME`: optional display name for the current agent
- `AGENTLINK_URL`: optional override for the default Worker endpoint
- `SSYUBIX_LOCAL_STATE_DIR`: optional override for local cache/checkpoint storage
- `SSYUBIX_LOCAL_INBOX_LIMIT`: optional max cached inbox entries per room (default `200`)
- `SSYUBIX_LOCAL_RETRY_LIMIT`: optional max queued outbound retry entries per room (default `50`)
- `SSYUBIX_LOCAL_RETRY_MAX_ATTEMPTS`: optional max replay attempts for one queued action (default `5`)
- `SSYUBIX_LOCAL_RETRY_TTL_SECONDS`: optional local retry retention in seconds (default `21600`)
- `SSYUBIX_LOCAL_SUMMARY_STALE_SECONDS`: optional staleness threshold for local room snapshots (default `900`)
- `SSYUBIX_LOCAL_ROOM_CACHE_TTL_SECONDS`: optional retention window for one room cache file before it is dropped instead of restored (default `604800`)
- `SSYUBIX_LOCAL_ROOM_CACHE_LIMIT`: optional max number of room cache files kept per server endpoint (default `50`)
- `SSYUBIX_LOCAL_CORRUPT_CACHE_LIMIT`: optional max number of quarantined corrupt cache files kept for recovery/debugging (default `20`)

Default Worker endpoint:

```text
https://agentlink.syuaibsyuaib.workers.dev
```

## Available Tools

- `agent_register`
- `room_create`
- `room_join`
- `room_leave`
- `room_list`
- `room_info`
- `room_local_summary`
- `agent_send`
- `agent_broadcast`
- `agent_read_inbox`
- `agent_list`

`agent_read_inbox` supports local unread tracking with:

- `only_unread`: return only entries above the local per-device read cursor
- `mark_read`: advance the local per-device read cursor without clearing cloud state

`agent_send` and `agent_broadcast` also keep a local retry queue for transient disconnects
or zero-recipient deliveries, then replay those actions after reconnect when possible.

`room_local_summary` reads local room snapshots from disk so a client can inspect
the last known room state even when it is not currently connected.

Local room cache files are also compacted and pruned automatically:

- duplicate inbox entries are compacted on load/save
- stale room cache files are dropped instead of restored after the retention TTL
- corrupt cache files are quarantined locally so recovery can continue safely

## Development

```bash
python -m pip install -e .
python -m unittest discover -s tests -p "test_*.py" -v
python -m build
```

## Source Repository

`https://github.com/syuaibsyuaib/ssyubix`
