Metadata-Version: 2.4
Name: magic-campus-cli
Version: 0.1.0
Summary: Magic Campus business HTTP SDK and CLI
License-Expression: AGPL-3.0-or-later
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Requires-Dist: httpx<1,>=0.27
Provides-Extra: dev
Requires-Dist: pytest>=8; extra == "dev"
Requires-Dist: build>=1; extra == "dev"
Requires-Dist: twine>=6; extra == "dev"

# magic-campus-cli

Business Python SDK and HTTP-only `magic-campus` command. Install this distribution
in a dedicated tool environment. It provides `magiccampus_sdk` and
`magiccampus_cli`; do not co-install it with the frozen `magic-campus-sdk`.

```python
from magiccampus_sdk import MagicCampusClient, MagicCampusClientConfig

client = MagicCampusClient(MagicCampusClientConfig(apiurl="https://campus.example", apikey="..."))
# client.user, client.feed, client.space, client.playgroup, client.comment
# client.group: HTTP group management, members, and message queries
# client.im.http(): HTTP message sender; client.im also supplies reactions
```

All commands use HTTP. Existing OpenIM HTTP group operations retain their request
semantics; no command initializes a websocket. `im group kick --group ID --users
ID1,ID2` uses the business kick endpoint. Group invitations and member queries use
the business API. `auth status` verifies HTTP credentials and reports
`transport=http_api`, without claiming a websocket is connected.

`im notify history --to user:ID|group:ID --limit N` queries
`POST /api/v1/im/message/query`, then selects the requested conversation. The
server currently accepts a per-conversation limit rather than a target-conversation
filter, so the HTTP response can include other conversations; only the requested
one is returned by the CLI. It does not synchronize or read an IM local database.
Results use the server's message field names. Pagination/search are not invented.

The updater checks only `magic-campus-cli`, uses `cli-update-check.json` and its
own re-execution marker. `MAGIC_CAMPUS_CLI_SOURCE` selects a local source project
for development; it must point to a project named `magic-campus-cli`. The updater
refuses to run in an environment where the frozen `magic-campus-sdk` distribution
is installed. This is an update guard, not a pip installation conflict mechanism:
manual co-installation can still overwrite shared files and is unsupported.
The legacy updater continues to target the frozen package name.

See [package split verification](../README.md) and the iAgent integration document
for controlled migration. This source does not perform an online upgrade.
