omp-wechat 1.0.0 → 1.2.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/LICENSE +21 -0
- package/README.md +17 -5
- package/dist/index.js +879 -269
- package/package.json +1 -1
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026
|
|
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.
|
package/README.md
CHANGED
|
@@ -86,12 +86,14 @@ To remove: `/wechat uninstall`
|
|
|
86
86
|
|
|
87
87
|
## Configuration
|
|
88
88
|
|
|
89
|
-
Configuration is loaded from `~/.omp-wechat/config.yml`, falling back to built-in defaults.
|
|
89
|
+
Configuration is loaded from `~/.omp-wechat/config.yml`, falling back to built-in defaults.
|
|
90
90
|
|
|
91
91
|
```yaml
|
|
92
92
|
# ~/.omp-wechat/config.yml
|
|
93
93
|
maxSessions: 50
|
|
94
94
|
dmPolicy: pairing
|
|
95
|
+
model: "@smol" # default model (role alias or provider/id)
|
|
96
|
+
cwd: ~/projects/my-app # working directory for AI sessions
|
|
95
97
|
systemPrompt: |
|
|
96
98
|
You are an AI assistant chatting via WeChat.
|
|
97
99
|
Keep replies concise and in plain text.
|
|
@@ -101,9 +103,11 @@ systemPrompt: |
|
|
|
101
103
|
|---|---|---|
|
|
102
104
|
| `maxSessions` | `50` | Session pool cap (LRU eviction) |
|
|
103
105
|
| `dmPolicy` | `pairing` | Access policy: `pairing` / `allowlist` / `disabled` |
|
|
106
|
+
| `model` | OMP default | Default model: role alias (`@smol`, `@slow`) or `provider/id` |
|
|
107
|
+
| `cwd` | `process.cwd()` | Working directory for AI sessions — determines which project context (CLAUDE.md, .omp/) the agent loads |
|
|
104
108
|
| `systemPrompt` | Built-in | System prompt for WeChat chat sessions |
|
|
105
109
|
|
|
106
|
-
> **Model
|
|
110
|
+
> **Model and tools are managed by OMP/Pi.** `createAgentSession()` automatically calls `discoverAuthStorage()`, reusing your existing `omp login` / `pi login` OAuth, `~/.omp/agent/agent.db` API keys, or `models.yml` config. This project never touches API keys.
|
|
107
111
|
|
|
108
112
|
## Slash Commands
|
|
109
113
|
|
|
@@ -119,6 +123,15 @@ systemPrompt: |
|
|
|
119
123
|
| `/wechat install` | Install boot-time launchd/systemd service |
|
|
120
124
|
| `/wechat uninstall` | Remove boot-time service |
|
|
121
125
|
|
|
126
|
+
### Chat Commands (via WeChat message)
|
|
127
|
+
|
|
128
|
+
| Command | Description |
|
|
129
|
+
|---|---|
|
|
130
|
+
| `/model` | Show current AI model |
|
|
131
|
+
| `/models` | List all available models |
|
|
132
|
+
| `/model provider/id` | Switch model for this chat (e.g. `/model anthropic/claude-haiku-4-5`) |
|
|
133
|
+
| `/new` | Reset session — clear context and start fresh |
|
|
134
|
+
|
|
122
135
|
## Access Control
|
|
123
136
|
|
|
124
137
|
| Mode | Behavior |
|
|
@@ -174,15 +187,14 @@ OMP-Wechat/
|
|
|
174
187
|
|
|
175
188
|
- **Reply-only**: iLink requires `context_token` from an inbound message; you cannot initiate conversations
|
|
176
189
|
- **1:1 only**: iLink Bot API does not support group chats
|
|
177
|
-
- **No message history**: WeChat provides no history API; session context is lost on restart (in-memory sessions)
|
|
178
190
|
- **Single instance**: iLink allows only one bot connection per account
|
|
179
191
|
- **Text only (Phase 1)**: images/voice/video are represented as `(image)` / `(voice)` placeholders; media support is planned
|
|
180
192
|
|
|
181
193
|
## Roadmap
|
|
182
194
|
|
|
183
195
|
- [ ] **Phase 2**: Media support (inbound images as base64, voice transcription)
|
|
184
|
-
- [
|
|
185
|
-
- [
|
|
196
|
+
- [x] **Phase 3**: Persistent sessions — `SessionManager.continueRecent()` per chat, context survives restarts
|
|
197
|
+
- [x] **Phase 4**: Per-chat model selection — `/model` `/models` chat commands for manual switching
|
|
186
198
|
- [ ] **Phase 5**: Fine-grained permissions (per-user tool restrictions, bash approval via WeChat)
|
|
187
199
|
|
|
188
200
|
## License
|