@kyan-du/agent-wechat-cli 0.13.2 → 0.14.0
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/README.md +6 -5
- package/dist/cli.js +1187 -120
- package/dist/image-compatibility.json +1 -1
- package/package.json +3 -2
package/README.md
CHANGED
|
@@ -24,7 +24,7 @@ Uninstall with npm after a real install exists. The CLI intentionally has no uni
|
|
|
24
24
|
## Command surface
|
|
25
25
|
|
|
26
26
|
```text
|
|
27
|
-
pnpm cli start [--image <fork-semver-or-digest>] [--pull | --offline] [--proxy <url>]
|
|
27
|
+
pnpm cli start [--image <fork-semver-commit-or-digest>] [--pull | --offline] [--proxy <url>]
|
|
28
28
|
pnpm cli stop [--purge] [--yes]
|
|
29
29
|
pnpm cli restart
|
|
30
30
|
pnpm cli status
|
|
@@ -39,20 +39,21 @@ pnpm cli auth status
|
|
|
39
39
|
pnpm cli chats [--unread] [--limit <n>] [--cursor <cursor>]
|
|
40
40
|
pnpm cli chats show <chat-id>
|
|
41
41
|
pnpm cli chats mark-read <chat-id>
|
|
42
|
+
pnpm cli chats members <group-id> [--limit <n>] [--cursor <cursor>]
|
|
42
43
|
pnpm cli contacts [--limit <n>] [--cursor <cursor>]
|
|
43
44
|
pnpm cli contacts find <name>
|
|
44
45
|
pnpm cli messages <chat-id> [--limit <n>] [--cursor <cursor>]
|
|
45
46
|
pnpm cli send <chat-id> (--text <message> | --image <path> | --file <path>)
|
|
46
47
|
[--idempotency-key <key>] [--confirm-similar]
|
|
47
48
|
|
|
48
|
-
pnpm cli upgrade [--check | --cli | --image <fork-semver-or-digest>]
|
|
49
|
+
pnpm cli upgrade [--check | --cli | --image <fork-semver-commit-or-digest>]
|
|
49
50
|
```
|
|
50
51
|
|
|
51
52
|
The first fork prerelease is deliberately single-instance. Removed `up`, `down`, `update`, and `session` commands exit nonzero with migration guidance; they never execute old behavior and do not migrate historical state.
|
|
52
53
|
|
|
53
54
|
### Lifecycle guarantees
|
|
54
55
|
|
|
55
|
-
- `start` runs a local architecture build during source development, or an explicit fork semver
|
|
56
|
+
- `start` runs a local architecture build during source development, or an explicit fork semver, seven-character commit tag, or digest. Floating `latest`, foreign repositories, and malformed references are rejected.
|
|
56
57
|
- A published tag is pulled and resolved to its immutable fork repository digest. The inventory records the exact container ID, digest, port, volumes, token path, and identity directory.
|
|
57
58
|
- Offline `--offline` succeeds only when the selected compatible image already exists locally.
|
|
58
59
|
- Existing containers are reused only when their ID, ownership label, volumes, identity, port, and requested image match the trusted inventory.
|
|
@@ -63,7 +64,7 @@ The first fork prerelease is deliberately single-instance. Removed `up`, `down`,
|
|
|
63
64
|
|
|
64
65
|
`auth logout` verifies the WeChat UI logout and preserves instance data. `auth reset` stops the session, transactionally clears server-side authentication state, deletes the WeChat home volume, and clears both the host and `/data/device-identity` copies before requiring a fresh `start`/login. It is narrower than full purge: agent DB, token, and the default instance inventory remain.
|
|
65
66
|
|
|
66
|
-
`chats`, `contacts`, and `
|
|
67
|
+
`chats`, `contacts`, `messages`, and `chats members` are read-only. Their opaque, versioned cursor uses stable keyset ordering; adding new rows does not shift later pages. `chats members` requires a stable `@chatroom` id and returns only member id, display name, optional group alias, and optional nickname—never avatars. `chats --unread` means only conversation-level `unreadCount > 0`. Message reads never open the UI or change unread state. `mark-read` is a separate UI operation and succeeds only when the target and before/after unread state are verified.
|
|
67
68
|
|
|
68
69
|
### Sending
|
|
69
70
|
|
|
@@ -77,7 +78,7 @@ Global `--json` emits exactly one versioned JSON envelope on stdout. Diagnostics
|
|
|
77
78
|
|
|
78
79
|
- `wx upgrade --check` is read-only.
|
|
79
80
|
- `pnpm cli upgrade --cli` fails with `CLI_UPGRADE_UNAVAILABLE` until P1-B npm publication is independently verified; it never prints or executes a premature install command.
|
|
80
|
-
- `wx upgrade --image <reference>` resolves an immutable digest, rebuilds the container with persistent volumes, verifies health, and rolls the container/image back on failure.
|
|
81
|
+
- `wx upgrade --image <reference>` accepts a fork semver tag, seven-character commit-verification tag, or digest; it resolves the selected image to an immutable digest, rebuilds the container with persistent volumes, verifies health, and rolls the container/image back on failure. Commit tags are verification artifacts, not formal releases.
|
|
81
82
|
|
|
82
83
|
The hidden `pnpm cli dev sync-server --binary <path> --sha256 <hex>` command is only for checked local development artifacts. It checksum-verifies the binary and restores the previous server if health validation fails.
|
|
83
84
|
|